powell-react 0.0.41 → 0.0.45

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.
Files changed (181) hide show
  1. package/dist/{_virtual → cjs/_virtual}/jsx-runtime.js +0 -2
  2. package/dist/{_virtual → cjs/_virtual}/jsx-runtime.js.map +1 -1
  3. package/dist/{_virtual → cjs/_virtual}/react-jsx-runtime.development.js +0 -2
  4. package/dist/{_virtual → cjs/_virtual}/react-jsx-runtime.development.js.map +1 -1
  5. package/dist/{_virtual → cjs/_virtual}/react-jsx-runtime.production.min.js +0 -2
  6. package/dist/{_virtual → cjs/_virtual}/react-jsx-runtime.production.min.js.map +1 -1
  7. package/dist/{node_modules → cjs/node_modules}/react/cjs/react-jsx-runtime.development.js +2 -4
  8. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
  9. package/dist/{node_modules → cjs/node_modules}/react/cjs/react-jsx-runtime.production.min.js +2 -4
  10. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
  11. package/dist/{node_modules → cjs/node_modules}/react/jsx-runtime.js +3 -5
  12. package/dist/cjs/node_modules/react/jsx-runtime.js.map +1 -0
  13. package/dist/{powell → cjs/powell}/api/PowellProvider.js +22 -23
  14. package/dist/cjs/powell/api/PowellProvider.js.map +1 -0
  15. package/dist/{powell → cjs/powell}/api/configService.js +1 -3
  16. package/dist/cjs/powell/api/configService.js.map +1 -0
  17. package/dist/{powell → cjs/powell}/api/overlayEmitter.js +2 -4
  18. package/dist/cjs/powell/api/overlayEmitter.js.map +1 -0
  19. package/dist/{powell → cjs/powell}/api/powellDefaults.js +5 -7
  20. package/dist/cjs/powell/api/powellDefaults.js.map +1 -0
  21. package/dist/{powell → cjs/powell}/components/Button/Button.js +36 -40
  22. package/dist/cjs/powell/components/Button/Button.js.map +1 -0
  23. package/dist/cjs/powell/components/FormContainer/FormContext.js +9 -0
  24. package/dist/cjs/powell/components/FormContainer/FormContext.js.map +1 -0
  25. package/dist/{powell → cjs/powell}/components/Toast/Toast.js +10 -11
  26. package/dist/cjs/powell/components/Toast/Toast.js.map +1 -0
  27. package/dist/{powell → cjs/powell}/hooks/useApplyConfig.js +14 -10
  28. package/dist/cjs/powell/hooks/useApplyConfig.js.map +1 -0
  29. package/dist/{powell → cjs/powell}/hooks/useFormContext.js +10 -10
  30. package/dist/cjs/powell/hooks/useFormContext.js.map +1 -0
  31. package/dist/{powell → cjs/powell}/hooks/usePowellConfig.js +34 -33
  32. package/dist/cjs/powell/hooks/usePowellConfig.js.map +1 -0
  33. package/dist/cjs/powell/index.js +768 -0
  34. package/dist/{powell → cjs/powell}/index.js.map +1 -1
  35. package/dist/{powell → cjs/powell}/utils/globalState.js +3 -5
  36. package/dist/cjs/powell/utils/globalState.js.map +1 -0
  37. package/dist/esm/_virtual/jsx-runtime.js +4 -0
  38. package/dist/esm/_virtual/jsx-runtime.js.map +1 -0
  39. package/dist/esm/_virtual/react-jsx-runtime.development.js +4 -0
  40. package/dist/esm/_virtual/react-jsx-runtime.development.js.map +1 -0
  41. package/dist/esm/_virtual/react-jsx-runtime.production.min.js +4 -0
  42. package/dist/esm/_virtual/react-jsx-runtime.production.min.js.map +1 -0
  43. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.development.js +1326 -0
  44. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
  45. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +25 -0
  46. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
  47. package/dist/esm/node_modules/react/jsx-runtime.js +14 -0
  48. package/dist/esm/node_modules/react/jsx-runtime.js.map +1 -0
  49. package/dist/esm/powell/api/PowellProvider.js +141 -0
  50. package/dist/esm/powell/api/PowellProvider.js.map +1 -0
  51. package/dist/esm/powell/api/configService.js +6 -0
  52. package/dist/esm/powell/api/configService.js.map +1 -0
  53. package/dist/esm/powell/api/overlayEmitter.js +22 -0
  54. package/dist/esm/powell/api/overlayEmitter.js.map +1 -0
  55. package/dist/esm/powell/api/powellDefaults.js +14 -0
  56. package/dist/esm/powell/api/powellDefaults.js.map +1 -0
  57. package/dist/esm/powell/components/Button/Button.js +161 -0
  58. package/dist/esm/powell/components/Button/Button.js.map +1 -0
  59. package/dist/esm/powell/components/FormContainer/FormContext.js +7 -0
  60. package/dist/esm/powell/components/FormContainer/FormContext.js.map +1 -0
  61. package/dist/esm/powell/components/Toast/Toast.js +120 -0
  62. package/dist/esm/powell/components/Toast/Toast.js.map +1 -0
  63. package/dist/esm/powell/hooks/useApplyConfig.js +57 -0
  64. package/dist/esm/powell/hooks/useApplyConfig.js.map +1 -0
  65. package/dist/esm/powell/hooks/useFormContext.js +125 -0
  66. package/dist/esm/powell/hooks/useFormContext.js.map +1 -0
  67. package/dist/esm/powell/hooks/usePowellConfig.js +199 -0
  68. package/dist/esm/powell/hooks/usePowellConfig.js.map +1 -0
  69. package/dist/esm/powell/index.js +106 -0
  70. package/dist/esm/powell/index.js.map +1 -0
  71. package/dist/esm/powell/utils/globalState.js +59 -0
  72. package/dist/esm/powell/utils/globalState.js.map +1 -0
  73. package/dist/types/index.d.ts +539 -0
  74. package/package.json +42 -93
  75. package/dist/assets/style-nnktSJs6.css +0 -1163
  76. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
  77. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +0 -1
  78. package/dist/node_modules/react/jsx-runtime.js.map +0 -1
  79. package/dist/powell/api/PowellProvider.js.map +0 -1
  80. package/dist/powell/api/configService.js.map +0 -1
  81. package/dist/powell/api/overlayEmitter.js.map +0 -1
  82. package/dist/powell/api/powellDefaults.js.map +0 -1
  83. package/dist/powell/components/Button/Button.js.map +0 -1
  84. package/dist/powell/components/FormContainer/FormContainer.js +0 -120
  85. package/dist/powell/components/FormContainer/FormContainer.js.map +0 -1
  86. package/dist/powell/components/FormContainer/FormContext.js +0 -16
  87. package/dist/powell/components/FormContainer/FormContext.js.map +0 -1
  88. package/dist/powell/components/Toast/Toast.js.map +0 -1
  89. package/dist/powell/hooks/useApplyConfig.js.map +0 -1
  90. package/dist/powell/hooks/useFormContext.js.map +0 -1
  91. package/dist/powell/hooks/usePowellConfig.js.map +0 -1
  92. package/dist/powell/index.js +0 -771
  93. package/dist/powell/utils/globalState.js.map +0 -1
  94. package/dist/types/powell/api/PowellProvider.d.ts +0 -6
  95. package/dist/types/powell/api/configService.d.ts +0 -3
  96. package/dist/types/powell/api/forms.d.ts +0 -74
  97. package/dist/types/powell/api/index.d.ts +0 -5
  98. package/dist/types/powell/api/overlayEmitter.d.ts +0 -11
  99. package/dist/types/powell/api/overlayService.d.ts +0 -10
  100. package/dist/types/powell/api/powellDefaults.d.ts +0 -3
  101. package/dist/types/powell/api/primereact.d.ts +0 -981
  102. package/dist/types/powell/components/AutoComplete/AutoComplete.d.ts +0 -3
  103. package/dist/types/powell/components/AutoComplete/index.d.ts +0 -1
  104. package/dist/types/powell/components/Button/Button.d.ts +0 -3
  105. package/dist/types/powell/components/Button/index.d.ts +0 -1
  106. package/dist/types/powell/components/CascadeSelect/CascadeSelect.d.ts +0 -3
  107. package/dist/types/powell/components/CascadeSelect/index.d.ts +0 -1
  108. package/dist/types/powell/components/Checkbox/Checkbox.d.ts +0 -3
  109. package/dist/types/powell/components/Checkbox/index.d.ts +0 -1
  110. package/dist/types/powell/components/Chips/Chips.d.ts +0 -3
  111. package/dist/types/powell/components/Chips/index.d.ts +0 -1
  112. package/dist/types/powell/components/ColorPicker/ColorPicker.d.ts +0 -3
  113. package/dist/types/powell/components/ColorPicker/index.d.ts +0 -1
  114. package/dist/types/powell/components/Dialog/Dialog.d.ts +0 -3
  115. package/dist/types/powell/components/Dialog/index.d.ts +0 -1
  116. package/dist/types/powell/components/DialogForm/DialogForm.d.ts +0 -3
  117. package/dist/types/powell/components/DialogForm/index.d.ts +0 -1
  118. package/dist/types/powell/components/Dropdown/Dropdown.d.ts +0 -3
  119. package/dist/types/powell/components/Dropdown/index.d.ts +0 -1
  120. package/dist/types/powell/components/Editor/Editor.d.ts +0 -3
  121. package/dist/types/powell/components/Editor/index.d.ts +0 -1
  122. package/dist/types/powell/components/FieldControl/FieldControl.d.ts +0 -3
  123. package/dist/types/powell/components/FieldControl/index.d.ts +0 -1
  124. package/dist/types/powell/components/FieldLayout/FieldLayout.d.ts +0 -4
  125. package/dist/types/powell/components/FieldLayout/index.d.ts +0 -1
  126. package/dist/types/powell/components/FormContainer/FormContainer.d.ts +0 -4
  127. package/dist/types/powell/components/FormContainer/FormContext.d.ts +0 -5
  128. package/dist/types/powell/components/FormContainer/index.d.ts +0 -2
  129. package/dist/types/powell/components/InputMask/InputMask.d.ts +0 -3
  130. package/dist/types/powell/components/InputMask/index.d.ts +0 -1
  131. package/dist/types/powell/components/InputNumber/InputNumber.d.ts +0 -3
  132. package/dist/types/powell/components/InputNumber/index.d.ts +0 -1
  133. package/dist/types/powell/components/InputOtp/InputOtp.d.ts +0 -3
  134. package/dist/types/powell/components/InputOtp/index.d.ts +0 -1
  135. package/dist/types/powell/components/InputPassword/InputPassword.d.ts +0 -3
  136. package/dist/types/powell/components/InputPassword/index.d.ts +0 -1
  137. package/dist/types/powell/components/InputSwitch/InputSwitch.d.ts +0 -3
  138. package/dist/types/powell/components/InputSwitch/index.d.ts +0 -1
  139. package/dist/types/powell/components/InputText/InputText.d.ts +0 -3
  140. package/dist/types/powell/components/InputText/index.d.ts +0 -1
  141. package/dist/types/powell/components/InputTextarea/InputTextarea.d.ts +0 -3
  142. package/dist/types/powell/components/InputTextarea/index.d.ts +0 -1
  143. package/dist/types/powell/components/Knob/Knob.d.ts +0 -3
  144. package/dist/types/powell/components/Knob/index.d.ts +0 -1
  145. package/dist/types/powell/components/ListBox/ListBox.d.ts +0 -3
  146. package/dist/types/powell/components/ListBox/index.d.ts +0 -1
  147. package/dist/types/powell/components/Mention/Mention.d.ts +0 -3
  148. package/dist/types/powell/components/Mention/index.d.ts +0 -1
  149. package/dist/types/powell/components/MultiSelect/MultiSelect.d.ts +0 -3
  150. package/dist/types/powell/components/MultiSelect/index.d.ts +0 -1
  151. package/dist/types/powell/components/MultiStateCheckbox/MultiStateCheckbox.d.ts +0 -3
  152. package/dist/types/powell/components/MultiStateCheckbox/index.d.ts +0 -1
  153. package/dist/types/powell/components/RadioGroup/RadioGroup.d.ts +0 -3
  154. package/dist/types/powell/components/RadioGroup/index.d.ts +0 -1
  155. package/dist/types/powell/components/Rating/Rating.d.ts +0 -3
  156. package/dist/types/powell/components/Rating/index.d.ts +0 -1
  157. package/dist/types/powell/components/SelectButton/SelectButton.d.ts +0 -3
  158. package/dist/types/powell/components/SelectButton/index.d.ts +0 -1
  159. package/dist/types/powell/components/Slider/Slider.d.ts +0 -3
  160. package/dist/types/powell/components/Slider/index.d.ts +0 -1
  161. package/dist/types/powell/components/Toast/Toast.d.ts +0 -3
  162. package/dist/types/powell/components/Toast/index.d.ts +0 -1
  163. package/dist/types/powell/components/ToggleButton/ToggleButton.d.ts +0 -3
  164. package/dist/types/powell/components/ToggleButton/index.d.ts +0 -1
  165. package/dist/types/powell/components/TreeSelect/TreeSelect.d.ts +0 -3
  166. package/dist/types/powell/components/TreeSelect/index.d.ts +0 -1
  167. package/dist/types/powell/components/TriStateCheckbox/TriStateCheckbox.d.ts +0 -3
  168. package/dist/types/powell/components/TriStateCheckbox/index.d.ts +0 -1
  169. package/dist/types/powell/hooks/index.d.ts +0 -3
  170. package/dist/types/powell/hooks/useApplyConfig.d.ts +0 -24
  171. package/dist/types/powell/hooks/useFormContext.d.ts +0 -5
  172. package/dist/types/powell/hooks/usePowellConfig.d.ts +0 -4
  173. package/dist/types/powell/index.d.ts +0 -5
  174. package/dist/types/powell/models/common.d.ts +0 -10
  175. package/dist/types/powell/models/config.d.ts +0 -16
  176. package/dist/types/powell/models/forms.d.ts +0 -28
  177. package/dist/types/powell/models/index.d.ts +0 -5
  178. package/dist/types/powell/models/overlay.d.ts +0 -222
  179. package/dist/types/powell/models/props.d.ts +0 -109
  180. package/dist/types/powell/utils/globalState.d.ts +0 -20
  181. package/dist/types/powell/utils/index.d.ts +0 -1
@@ -0,0 +1,1326 @@
1
+ import { __exports as reactJsxRuntime_development } from '../../../_virtual/react-jsx-runtime.development.js';
2
+ import require$$0 from 'react';
3
+
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.development.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+
14
+ var hasRequiredReactJsxRuntime_development;
15
+
16
+ function requireReactJsxRuntime_development () {
17
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
18
+ hasRequiredReactJsxRuntime_development = 1;
19
+
20
+ if (process.env.NODE_ENV !== "production") {
21
+ (function() {
22
+
23
+ var React = require$$0;
24
+
25
+ // ATTENTION
26
+ // When adding new symbols to this file,
27
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
28
+ // The Symbol used to tag the ReactElement-like types.
29
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
30
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
31
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
32
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
33
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
34
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
35
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
36
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
37
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
38
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
39
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
40
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
41
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
42
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
43
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
44
+ function getIteratorFn(maybeIterable) {
45
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
46
+ return null;
47
+ }
48
+
49
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
50
+
51
+ if (typeof maybeIterator === 'function') {
52
+ return maybeIterator;
53
+ }
54
+
55
+ return null;
56
+ }
57
+
58
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
59
+
60
+ function error(format) {
61
+ {
62
+ {
63
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
64
+ args[_key2 - 1] = arguments[_key2];
65
+ }
66
+
67
+ printWarning('error', format, args);
68
+ }
69
+ }
70
+ }
71
+
72
+ function printWarning(level, format, args) {
73
+ // When changing this logic, you might want to also
74
+ // update consoleWithStackDev.www.js as well.
75
+ {
76
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
77
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
78
+
79
+ if (stack !== '') {
80
+ format += '%s';
81
+ args = args.concat([stack]);
82
+ } // eslint-disable-next-line react-internal/safe-string-coercion
83
+
84
+
85
+ var argsWithFormat = args.map(function (item) {
86
+ return String(item);
87
+ }); // Careful: RN currently depends on this prefix
88
+
89
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
90
+ // breaks IE9: https://github.com/facebook/react/issues/13610
91
+ // eslint-disable-next-line react-internal/no-production-logging
92
+
93
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
94
+ }
95
+ }
96
+
97
+ // -----------------------------------------------------------------------------
98
+
99
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
100
+ var enableCacheElement = false;
101
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
102
+
103
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
104
+ // stuff. Intended to enable React core members to more easily debug scheduling
105
+ // issues in DEV builds.
106
+
107
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
108
+
109
+ var REACT_MODULE_REFERENCE;
110
+
111
+ {
112
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
113
+ }
114
+
115
+ function isValidElementType(type) {
116
+ if (typeof type === 'string' || typeof type === 'function') {
117
+ return true;
118
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
119
+
120
+
121
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
122
+ return true;
123
+ }
124
+
125
+ if (typeof type === 'object' && type !== null) {
126
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
127
+ // types supported by any Flight configuration anywhere since
128
+ // we don't know which Flight build this will end up being used
129
+ // with.
130
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
131
+ return true;
132
+ }
133
+ }
134
+
135
+ return false;
136
+ }
137
+
138
+ function getWrappedName(outerType, innerType, wrapperName) {
139
+ var displayName = outerType.displayName;
140
+
141
+ if (displayName) {
142
+ return displayName;
143
+ }
144
+
145
+ var functionName = innerType.displayName || innerType.name || '';
146
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
147
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
148
+
149
+
150
+ function getContextName(type) {
151
+ return type.displayName || 'Context';
152
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
153
+
154
+
155
+ function getComponentNameFromType(type) {
156
+ if (type == null) {
157
+ // Host root, text node or just invalid type.
158
+ return null;
159
+ }
160
+
161
+ {
162
+ if (typeof type.tag === 'number') {
163
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
164
+ }
165
+ }
166
+
167
+ if (typeof type === 'function') {
168
+ return type.displayName || type.name || null;
169
+ }
170
+
171
+ if (typeof type === 'string') {
172
+ return type;
173
+ }
174
+
175
+ switch (type) {
176
+ case REACT_FRAGMENT_TYPE:
177
+ return 'Fragment';
178
+
179
+ case REACT_PORTAL_TYPE:
180
+ return 'Portal';
181
+
182
+ case REACT_PROFILER_TYPE:
183
+ return 'Profiler';
184
+
185
+ case REACT_STRICT_MODE_TYPE:
186
+ return 'StrictMode';
187
+
188
+ case REACT_SUSPENSE_TYPE:
189
+ return 'Suspense';
190
+
191
+ case REACT_SUSPENSE_LIST_TYPE:
192
+ return 'SuspenseList';
193
+
194
+ }
195
+
196
+ if (typeof type === 'object') {
197
+ switch (type.$$typeof) {
198
+ case REACT_CONTEXT_TYPE:
199
+ var context = type;
200
+ return getContextName(context) + '.Consumer';
201
+
202
+ case REACT_PROVIDER_TYPE:
203
+ var provider = type;
204
+ return getContextName(provider._context) + '.Provider';
205
+
206
+ case REACT_FORWARD_REF_TYPE:
207
+ return getWrappedName(type, type.render, 'ForwardRef');
208
+
209
+ case REACT_MEMO_TYPE:
210
+ var outerName = type.displayName || null;
211
+
212
+ if (outerName !== null) {
213
+ return outerName;
214
+ }
215
+
216
+ return getComponentNameFromType(type.type) || 'Memo';
217
+
218
+ case REACT_LAZY_TYPE:
219
+ {
220
+ var lazyComponent = type;
221
+ var payload = lazyComponent._payload;
222
+ var init = lazyComponent._init;
223
+
224
+ try {
225
+ return getComponentNameFromType(init(payload));
226
+ } catch (x) {
227
+ return null;
228
+ }
229
+ }
230
+
231
+ // eslint-disable-next-line no-fallthrough
232
+ }
233
+ }
234
+
235
+ return null;
236
+ }
237
+
238
+ var assign = Object.assign;
239
+
240
+ // Helpers to patch console.logs to avoid logging during side-effect free
241
+ // replaying on render function. This currently only patches the object
242
+ // lazily which won't cover if the log function was extracted eagerly.
243
+ // We could also eagerly patch the method.
244
+ var disabledDepth = 0;
245
+ var prevLog;
246
+ var prevInfo;
247
+ var prevWarn;
248
+ var prevError;
249
+ var prevGroup;
250
+ var prevGroupCollapsed;
251
+ var prevGroupEnd;
252
+
253
+ function disabledLog() {}
254
+
255
+ disabledLog.__reactDisabledLog = true;
256
+ function disableLogs() {
257
+ {
258
+ if (disabledDepth === 0) {
259
+ /* eslint-disable react-internal/no-production-logging */
260
+ prevLog = console.log;
261
+ prevInfo = console.info;
262
+ prevWarn = console.warn;
263
+ prevError = console.error;
264
+ prevGroup = console.group;
265
+ prevGroupCollapsed = console.groupCollapsed;
266
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
267
+
268
+ var props = {
269
+ configurable: true,
270
+ enumerable: true,
271
+ value: disabledLog,
272
+ writable: true
273
+ }; // $FlowFixMe Flow thinks console is immutable.
274
+
275
+ Object.defineProperties(console, {
276
+ info: props,
277
+ log: props,
278
+ warn: props,
279
+ error: props,
280
+ group: props,
281
+ groupCollapsed: props,
282
+ groupEnd: props
283
+ });
284
+ /* eslint-enable react-internal/no-production-logging */
285
+ }
286
+
287
+ disabledDepth++;
288
+ }
289
+ }
290
+ function reenableLogs() {
291
+ {
292
+ disabledDepth--;
293
+
294
+ if (disabledDepth === 0) {
295
+ /* eslint-disable react-internal/no-production-logging */
296
+ var props = {
297
+ configurable: true,
298
+ enumerable: true,
299
+ writable: true
300
+ }; // $FlowFixMe Flow thinks console is immutable.
301
+
302
+ Object.defineProperties(console, {
303
+ log: assign({}, props, {
304
+ value: prevLog
305
+ }),
306
+ info: assign({}, props, {
307
+ value: prevInfo
308
+ }),
309
+ warn: assign({}, props, {
310
+ value: prevWarn
311
+ }),
312
+ error: assign({}, props, {
313
+ value: prevError
314
+ }),
315
+ group: assign({}, props, {
316
+ value: prevGroup
317
+ }),
318
+ groupCollapsed: assign({}, props, {
319
+ value: prevGroupCollapsed
320
+ }),
321
+ groupEnd: assign({}, props, {
322
+ value: prevGroupEnd
323
+ })
324
+ });
325
+ /* eslint-enable react-internal/no-production-logging */
326
+ }
327
+
328
+ if (disabledDepth < 0) {
329
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
330
+ }
331
+ }
332
+ }
333
+
334
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
335
+ var prefix;
336
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
337
+ {
338
+ if (prefix === undefined) {
339
+ // Extract the VM specific prefix used by each line.
340
+ try {
341
+ throw Error();
342
+ } catch (x) {
343
+ var match = x.stack.trim().match(/\n( *(at )?)/);
344
+ prefix = match && match[1] || '';
345
+ }
346
+ } // We use the prefix to ensure our stacks line up with native stack frames.
347
+
348
+
349
+ return '\n' + prefix + name;
350
+ }
351
+ }
352
+ var reentry = false;
353
+ var componentFrameCache;
354
+
355
+ {
356
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
357
+ componentFrameCache = new PossiblyWeakMap();
358
+ }
359
+
360
+ function describeNativeComponentFrame(fn, construct) {
361
+ // If something asked for a stack inside a fake render, it should get ignored.
362
+ if ( !fn || reentry) {
363
+ return '';
364
+ }
365
+
366
+ {
367
+ var frame = componentFrameCache.get(fn);
368
+
369
+ if (frame !== undefined) {
370
+ return frame;
371
+ }
372
+ }
373
+
374
+ var control;
375
+ reentry = true;
376
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
377
+
378
+ Error.prepareStackTrace = undefined;
379
+ var previousDispatcher;
380
+
381
+ {
382
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
383
+ // for warnings.
384
+
385
+ ReactCurrentDispatcher.current = null;
386
+ disableLogs();
387
+ }
388
+
389
+ try {
390
+ // This should throw.
391
+ if (construct) {
392
+ // Something should be setting the props in the constructor.
393
+ var Fake = function () {
394
+ throw Error();
395
+ }; // $FlowFixMe
396
+
397
+
398
+ Object.defineProperty(Fake.prototype, 'props', {
399
+ set: function () {
400
+ // We use a throwing setter instead of frozen or non-writable props
401
+ // because that won't throw in a non-strict mode function.
402
+ throw Error();
403
+ }
404
+ });
405
+
406
+ if (typeof Reflect === 'object' && Reflect.construct) {
407
+ // We construct a different control for this case to include any extra
408
+ // frames added by the construct call.
409
+ try {
410
+ Reflect.construct(Fake, []);
411
+ } catch (x) {
412
+ control = x;
413
+ }
414
+
415
+ Reflect.construct(fn, [], Fake);
416
+ } else {
417
+ try {
418
+ Fake.call();
419
+ } catch (x) {
420
+ control = x;
421
+ }
422
+
423
+ fn.call(Fake.prototype);
424
+ }
425
+ } else {
426
+ try {
427
+ throw Error();
428
+ } catch (x) {
429
+ control = x;
430
+ }
431
+
432
+ fn();
433
+ }
434
+ } catch (sample) {
435
+ // This is inlined manually because closure doesn't do it for us.
436
+ if (sample && control && typeof sample.stack === 'string') {
437
+ // This extracts the first frame from the sample that isn't also in the control.
438
+ // Skipping one frame that we assume is the frame that calls the two.
439
+ var sampleLines = sample.stack.split('\n');
440
+ var controlLines = control.stack.split('\n');
441
+ var s = sampleLines.length - 1;
442
+ var c = controlLines.length - 1;
443
+
444
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
445
+ // We expect at least one stack frame to be shared.
446
+ // Typically this will be the root most one. However, stack frames may be
447
+ // cut off due to maximum stack limits. In this case, one maybe cut off
448
+ // earlier than the other. We assume that the sample is longer or the same
449
+ // and there for cut off earlier. So we should find the root most frame in
450
+ // the sample somewhere in the control.
451
+ c--;
452
+ }
453
+
454
+ for (; s >= 1 && c >= 0; s--, c--) {
455
+ // Next we find the first one that isn't the same which should be the
456
+ // frame that called our sample function and the control.
457
+ if (sampleLines[s] !== controlLines[c]) {
458
+ // In V8, the first line is describing the message but other VMs don't.
459
+ // If we're about to return the first line, and the control is also on the same
460
+ // line, that's a pretty good indicator that our sample threw at same line as
461
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
462
+ // This can happen if you passed a class to function component, or non-function.
463
+ if (s !== 1 || c !== 1) {
464
+ do {
465
+ s--;
466
+ c--; // We may still have similar intermediate frames from the construct call.
467
+ // The next one that isn't the same should be our match though.
468
+
469
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
470
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
471
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
472
+ // but we have a user-provided "displayName"
473
+ // splice it in to make the stack more readable.
474
+
475
+
476
+ if (fn.displayName && _frame.includes('<anonymous>')) {
477
+ _frame = _frame.replace('<anonymous>', fn.displayName);
478
+ }
479
+
480
+ {
481
+ if (typeof fn === 'function') {
482
+ componentFrameCache.set(fn, _frame);
483
+ }
484
+ } // Return the line we found.
485
+
486
+
487
+ return _frame;
488
+ }
489
+ } while (s >= 1 && c >= 0);
490
+ }
491
+
492
+ break;
493
+ }
494
+ }
495
+ }
496
+ } finally {
497
+ reentry = false;
498
+
499
+ {
500
+ ReactCurrentDispatcher.current = previousDispatcher;
501
+ reenableLogs();
502
+ }
503
+
504
+ Error.prepareStackTrace = previousPrepareStackTrace;
505
+ } // Fallback to just using the name if we couldn't make it throw.
506
+
507
+
508
+ var name = fn ? fn.displayName || fn.name : '';
509
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
510
+
511
+ {
512
+ if (typeof fn === 'function') {
513
+ componentFrameCache.set(fn, syntheticFrame);
514
+ }
515
+ }
516
+
517
+ return syntheticFrame;
518
+ }
519
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
520
+ {
521
+ return describeNativeComponentFrame(fn, false);
522
+ }
523
+ }
524
+
525
+ function shouldConstruct(Component) {
526
+ var prototype = Component.prototype;
527
+ return !!(prototype && prototype.isReactComponent);
528
+ }
529
+
530
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
531
+
532
+ if (type == null) {
533
+ return '';
534
+ }
535
+
536
+ if (typeof type === 'function') {
537
+ {
538
+ return describeNativeComponentFrame(type, shouldConstruct(type));
539
+ }
540
+ }
541
+
542
+ if (typeof type === 'string') {
543
+ return describeBuiltInComponentFrame(type);
544
+ }
545
+
546
+ switch (type) {
547
+ case REACT_SUSPENSE_TYPE:
548
+ return describeBuiltInComponentFrame('Suspense');
549
+
550
+ case REACT_SUSPENSE_LIST_TYPE:
551
+ return describeBuiltInComponentFrame('SuspenseList');
552
+ }
553
+
554
+ if (typeof type === 'object') {
555
+ switch (type.$$typeof) {
556
+ case REACT_FORWARD_REF_TYPE:
557
+ return describeFunctionComponentFrame(type.render);
558
+
559
+ case REACT_MEMO_TYPE:
560
+ // Memo may contain any component type so we recursively resolve it.
561
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
562
+
563
+ case REACT_LAZY_TYPE:
564
+ {
565
+ var lazyComponent = type;
566
+ var payload = lazyComponent._payload;
567
+ var init = lazyComponent._init;
568
+
569
+ try {
570
+ // Lazy may contain any component type so we recursively resolve it.
571
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
572
+ } catch (x) {}
573
+ }
574
+ }
575
+ }
576
+
577
+ return '';
578
+ }
579
+
580
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
581
+
582
+ var loggedTypeFailures = {};
583
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
584
+
585
+ function setCurrentlyValidatingElement(element) {
586
+ {
587
+ if (element) {
588
+ var owner = element._owner;
589
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
590
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
591
+ } else {
592
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
593
+ }
594
+ }
595
+ }
596
+
597
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
598
+ {
599
+ // $FlowFixMe This is okay but Flow doesn't know it.
600
+ var has = Function.call.bind(hasOwnProperty);
601
+
602
+ for (var typeSpecName in typeSpecs) {
603
+ if (has(typeSpecs, typeSpecName)) {
604
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
605
+ // fail the render phase where it didn't fail before. So we log it.
606
+ // After these have been cleaned up, we'll let them throw.
607
+
608
+ try {
609
+ // This is intentionally an invariant that gets caught. It's the same
610
+ // behavior as without this statement except with a better message.
611
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
612
+ // eslint-disable-next-line react-internal/prod-error-codes
613
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
614
+ err.name = 'Invariant Violation';
615
+ throw err;
616
+ }
617
+
618
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
619
+ } catch (ex) {
620
+ error$1 = ex;
621
+ }
622
+
623
+ if (error$1 && !(error$1 instanceof Error)) {
624
+ setCurrentlyValidatingElement(element);
625
+
626
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
627
+
628
+ setCurrentlyValidatingElement(null);
629
+ }
630
+
631
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
632
+ // Only monitor this failure once because there tends to be a lot of the
633
+ // same error.
634
+ loggedTypeFailures[error$1.message] = true;
635
+ setCurrentlyValidatingElement(element);
636
+
637
+ error('Failed %s type: %s', location, error$1.message);
638
+
639
+ setCurrentlyValidatingElement(null);
640
+ }
641
+ }
642
+ }
643
+ }
644
+ }
645
+
646
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
647
+
648
+ function isArray(a) {
649
+ return isArrayImpl(a);
650
+ }
651
+
652
+ /*
653
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
654
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
655
+ *
656
+ * The functions in this module will throw an easier-to-understand,
657
+ * easier-to-debug exception with a clear errors message message explaining the
658
+ * problem. (Instead of a confusing exception thrown inside the implementation
659
+ * of the `value` object).
660
+ */
661
+ // $FlowFixMe only called in DEV, so void return is not possible.
662
+ function typeName(value) {
663
+ {
664
+ // toStringTag is needed for namespaced types like Temporal.Instant
665
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
666
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
667
+ return type;
668
+ }
669
+ } // $FlowFixMe only called in DEV, so void return is not possible.
670
+
671
+
672
+ function willCoercionThrow(value) {
673
+ {
674
+ try {
675
+ testStringCoercion(value);
676
+ return false;
677
+ } catch (e) {
678
+ return true;
679
+ }
680
+ }
681
+ }
682
+
683
+ function testStringCoercion(value) {
684
+ // If you ended up here by following an exception call stack, here's what's
685
+ // happened: you supplied an object or symbol value to React (as a prop, key,
686
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
687
+ // coerce it to a string using `'' + value`, an exception was thrown.
688
+ //
689
+ // The most common types that will cause this exception are `Symbol` instances
690
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
691
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
692
+ // exception. (Library authors do this to prevent users from using built-in
693
+ // numeric operators like `+` or comparison operators like `>=` because custom
694
+ // methods are needed to perform accurate arithmetic or comparison.)
695
+ //
696
+ // To fix the problem, coerce this object or symbol value to a string before
697
+ // passing it to React. The most reliable way is usually `String(value)`.
698
+ //
699
+ // To find which value is throwing, check the browser or debugger console.
700
+ // Before this exception was thrown, there should be `console.error` output
701
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
702
+ // problem and how that type was used: key, atrribute, input value prop, etc.
703
+ // In most cases, this console output also shows the component and its
704
+ // ancestor components where the exception happened.
705
+ //
706
+ // eslint-disable-next-line react-internal/safe-string-coercion
707
+ return '' + value;
708
+ }
709
+ function checkKeyStringCoercion(value) {
710
+ {
711
+ if (willCoercionThrow(value)) {
712
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
713
+
714
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
715
+ }
716
+ }
717
+ }
718
+
719
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
720
+ var RESERVED_PROPS = {
721
+ key: true,
722
+ ref: true,
723
+ __self: true,
724
+ __source: true
725
+ };
726
+ var specialPropKeyWarningShown;
727
+ var specialPropRefWarningShown;
728
+
729
+ function hasValidRef(config) {
730
+ {
731
+ if (hasOwnProperty.call(config, 'ref')) {
732
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
733
+
734
+ if (getter && getter.isReactWarning) {
735
+ return false;
736
+ }
737
+ }
738
+ }
739
+
740
+ return config.ref !== undefined;
741
+ }
742
+
743
+ function hasValidKey(config) {
744
+ {
745
+ if (hasOwnProperty.call(config, 'key')) {
746
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
747
+
748
+ if (getter && getter.isReactWarning) {
749
+ return false;
750
+ }
751
+ }
752
+ }
753
+
754
+ return config.key !== undefined;
755
+ }
756
+
757
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
758
+ {
759
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
760
+ }
761
+ }
762
+
763
+ function defineKeyPropWarningGetter(props, displayName) {
764
+ {
765
+ var warnAboutAccessingKey = function () {
766
+ if (!specialPropKeyWarningShown) {
767
+ specialPropKeyWarningShown = true;
768
+
769
+ 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://reactjs.org/link/special-props)', displayName);
770
+ }
771
+ };
772
+
773
+ warnAboutAccessingKey.isReactWarning = true;
774
+ Object.defineProperty(props, 'key', {
775
+ get: warnAboutAccessingKey,
776
+ configurable: true
777
+ });
778
+ }
779
+ }
780
+
781
+ function defineRefPropWarningGetter(props, displayName) {
782
+ {
783
+ var warnAboutAccessingRef = function () {
784
+ if (!specialPropRefWarningShown) {
785
+ specialPropRefWarningShown = true;
786
+
787
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
788
+ }
789
+ };
790
+
791
+ warnAboutAccessingRef.isReactWarning = true;
792
+ Object.defineProperty(props, 'ref', {
793
+ get: warnAboutAccessingRef,
794
+ configurable: true
795
+ });
796
+ }
797
+ }
798
+ /**
799
+ * Factory method to create a new React element. This no longer adheres to
800
+ * the class pattern, so do not use new to call it. Also, instanceof check
801
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
802
+ * if something is a React Element.
803
+ *
804
+ * @param {*} type
805
+ * @param {*} props
806
+ * @param {*} key
807
+ * @param {string|object} ref
808
+ * @param {*} owner
809
+ * @param {*} self A *temporary* helper to detect places where `this` is
810
+ * different from the `owner` when React.createElement is called, so that we
811
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
812
+ * functions, and as long as `this` and owner are the same, there will be no
813
+ * change in behavior.
814
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
815
+ * indicating filename, line number, and/or other information.
816
+ * @internal
817
+ */
818
+
819
+
820
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
821
+ var element = {
822
+ // This tag allows us to uniquely identify this as a React Element
823
+ $$typeof: REACT_ELEMENT_TYPE,
824
+ // Built-in properties that belong on the element
825
+ type: type,
826
+ key: key,
827
+ ref: ref,
828
+ props: props,
829
+ // Record the component responsible for creating this element.
830
+ _owner: owner
831
+ };
832
+
833
+ {
834
+ // The validation flag is currently mutative. We put it on
835
+ // an external backing store so that we can freeze the whole object.
836
+ // This can be replaced with a WeakMap once they are implemented in
837
+ // commonly used development environments.
838
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
839
+ // the validation flag non-enumerable (where possible, which should
840
+ // include every environment we run tests in), so the test framework
841
+ // ignores it.
842
+
843
+ Object.defineProperty(element._store, 'validated', {
844
+ configurable: false,
845
+ enumerable: false,
846
+ writable: true,
847
+ value: false
848
+ }); // self and source are DEV only properties.
849
+
850
+ Object.defineProperty(element, '_self', {
851
+ configurable: false,
852
+ enumerable: false,
853
+ writable: false,
854
+ value: self
855
+ }); // Two elements created in two different places should be considered
856
+ // equal for testing purposes and therefore we hide it from enumeration.
857
+
858
+ Object.defineProperty(element, '_source', {
859
+ configurable: false,
860
+ enumerable: false,
861
+ writable: false,
862
+ value: source
863
+ });
864
+
865
+ if (Object.freeze) {
866
+ Object.freeze(element.props);
867
+ Object.freeze(element);
868
+ }
869
+ }
870
+
871
+ return element;
872
+ };
873
+ /**
874
+ * https://github.com/reactjs/rfcs/pull/107
875
+ * @param {*} type
876
+ * @param {object} props
877
+ * @param {string} key
878
+ */
879
+
880
+ function jsxDEV(type, config, maybeKey, source, self) {
881
+ {
882
+ var propName; // Reserved names are extracted
883
+
884
+ var props = {};
885
+ var key = null;
886
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
887
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
888
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
889
+ // but as an intermediary step, we will use jsxDEV for everything except
890
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
891
+ // key is explicitly declared to be undefined or not.
892
+
893
+ if (maybeKey !== undefined) {
894
+ {
895
+ checkKeyStringCoercion(maybeKey);
896
+ }
897
+
898
+ key = '' + maybeKey;
899
+ }
900
+
901
+ if (hasValidKey(config)) {
902
+ {
903
+ checkKeyStringCoercion(config.key);
904
+ }
905
+
906
+ key = '' + config.key;
907
+ }
908
+
909
+ if (hasValidRef(config)) {
910
+ ref = config.ref;
911
+ warnIfStringRefCannotBeAutoConverted(config, self);
912
+ } // Remaining properties are added to a new props object
913
+
914
+
915
+ for (propName in config) {
916
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
917
+ props[propName] = config[propName];
918
+ }
919
+ } // Resolve default props
920
+
921
+
922
+ if (type && type.defaultProps) {
923
+ var defaultProps = type.defaultProps;
924
+
925
+ for (propName in defaultProps) {
926
+ if (props[propName] === undefined) {
927
+ props[propName] = defaultProps[propName];
928
+ }
929
+ }
930
+ }
931
+
932
+ if (key || ref) {
933
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
934
+
935
+ if (key) {
936
+ defineKeyPropWarningGetter(props, displayName);
937
+ }
938
+
939
+ if (ref) {
940
+ defineRefPropWarningGetter(props, displayName);
941
+ }
942
+ }
943
+
944
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
945
+ }
946
+ }
947
+
948
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
949
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
950
+
951
+ function setCurrentlyValidatingElement$1(element) {
952
+ {
953
+ if (element) {
954
+ var owner = element._owner;
955
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
956
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
957
+ } else {
958
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
959
+ }
960
+ }
961
+ }
962
+
963
+ var propTypesMisspellWarningShown;
964
+
965
+ {
966
+ propTypesMisspellWarningShown = false;
967
+ }
968
+ /**
969
+ * Verifies the object is a ReactElement.
970
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
971
+ * @param {?object} object
972
+ * @return {boolean} True if `object` is a ReactElement.
973
+ * @final
974
+ */
975
+
976
+
977
+ function isValidElement(object) {
978
+ {
979
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
980
+ }
981
+ }
982
+
983
+ function getDeclarationErrorAddendum() {
984
+ {
985
+ if (ReactCurrentOwner$1.current) {
986
+ var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
987
+
988
+ if (name) {
989
+ return '\n\nCheck the render method of `' + name + '`.';
990
+ }
991
+ }
992
+
993
+ return '';
994
+ }
995
+ }
996
+
997
+ function getSourceInfoErrorAddendum(source) {
998
+ {
999
+
1000
+ return '';
1001
+ }
1002
+ }
1003
+ /**
1004
+ * Warn if there's no key explicitly set on dynamic arrays of children or
1005
+ * object keys are not valid. This allows us to keep track of children between
1006
+ * updates.
1007
+ */
1008
+
1009
+
1010
+ var ownerHasKeyUseWarning = {};
1011
+
1012
+ function getCurrentComponentErrorInfo(parentType) {
1013
+ {
1014
+ var info = getDeclarationErrorAddendum();
1015
+
1016
+ if (!info) {
1017
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
1018
+
1019
+ if (parentName) {
1020
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1021
+ }
1022
+ }
1023
+
1024
+ return info;
1025
+ }
1026
+ }
1027
+ /**
1028
+ * Warn if the element doesn't have an explicit key assigned to it.
1029
+ * This element is in an array. The array could grow and shrink or be
1030
+ * reordered. All children that haven't already been validated are required to
1031
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1032
+ * will only be shown once.
1033
+ *
1034
+ * @internal
1035
+ * @param {ReactElement} element Element that requires a key.
1036
+ * @param {*} parentType element's parent's type.
1037
+ */
1038
+
1039
+
1040
+ function validateExplicitKey(element, parentType) {
1041
+ {
1042
+ if (!element._store || element._store.validated || element.key != null) {
1043
+ return;
1044
+ }
1045
+
1046
+ element._store.validated = true;
1047
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1048
+
1049
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1050
+ return;
1051
+ }
1052
+
1053
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1054
+ // property, it may be the creator of the child that's responsible for
1055
+ // assigning it a key.
1056
+
1057
+ var childOwner = '';
1058
+
1059
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
1060
+ // Give the component that originally created this child.
1061
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1062
+ }
1063
+
1064
+ setCurrentlyValidatingElement$1(element);
1065
+
1066
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1067
+
1068
+ setCurrentlyValidatingElement$1(null);
1069
+ }
1070
+ }
1071
+ /**
1072
+ * Ensure that every element either is passed in a static location, in an
1073
+ * array with an explicit keys property defined, or in an object literal
1074
+ * with valid key property.
1075
+ *
1076
+ * @internal
1077
+ * @param {ReactNode} node Statically passed child of any type.
1078
+ * @param {*} parentType node's parent's type.
1079
+ */
1080
+
1081
+
1082
+ function validateChildKeys(node, parentType) {
1083
+ {
1084
+ if (typeof node !== 'object') {
1085
+ return;
1086
+ }
1087
+
1088
+ if (isArray(node)) {
1089
+ for (var i = 0; i < node.length; i++) {
1090
+ var child = node[i];
1091
+
1092
+ if (isValidElement(child)) {
1093
+ validateExplicitKey(child, parentType);
1094
+ }
1095
+ }
1096
+ } else if (isValidElement(node)) {
1097
+ // This element was passed in a valid location.
1098
+ if (node._store) {
1099
+ node._store.validated = true;
1100
+ }
1101
+ } else if (node) {
1102
+ var iteratorFn = getIteratorFn(node);
1103
+
1104
+ if (typeof iteratorFn === 'function') {
1105
+ // Entry iterators used to provide implicit keys,
1106
+ // but now we print a separate warning for them later.
1107
+ if (iteratorFn !== node.entries) {
1108
+ var iterator = iteratorFn.call(node);
1109
+ var step;
1110
+
1111
+ while (!(step = iterator.next()).done) {
1112
+ if (isValidElement(step.value)) {
1113
+ validateExplicitKey(step.value, parentType);
1114
+ }
1115
+ }
1116
+ }
1117
+ }
1118
+ }
1119
+ }
1120
+ }
1121
+ /**
1122
+ * Given an element, validate that its props follow the propTypes definition,
1123
+ * provided by the type.
1124
+ *
1125
+ * @param {ReactElement} element
1126
+ */
1127
+
1128
+
1129
+ function validatePropTypes(element) {
1130
+ {
1131
+ var type = element.type;
1132
+
1133
+ if (type === null || type === undefined || typeof type === 'string') {
1134
+ return;
1135
+ }
1136
+
1137
+ var propTypes;
1138
+
1139
+ if (typeof type === 'function') {
1140
+ propTypes = type.propTypes;
1141
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1142
+ // Inner props are checked in the reconciler.
1143
+ type.$$typeof === REACT_MEMO_TYPE)) {
1144
+ propTypes = type.propTypes;
1145
+ } else {
1146
+ return;
1147
+ }
1148
+
1149
+ if (propTypes) {
1150
+ // Intentionally inside to avoid triggering lazy initializers:
1151
+ var name = getComponentNameFromType(type);
1152
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
1153
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
1154
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
1155
+
1156
+ var _name = getComponentNameFromType(type);
1157
+
1158
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
1159
+ }
1160
+
1161
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
1162
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1163
+ }
1164
+ }
1165
+ }
1166
+ /**
1167
+ * Given a fragment, validate that it can only be provided with fragment props
1168
+ * @param {ReactElement} fragment
1169
+ */
1170
+
1171
+
1172
+ function validateFragmentProps(fragment) {
1173
+ {
1174
+ var keys = Object.keys(fragment.props);
1175
+
1176
+ for (var i = 0; i < keys.length; i++) {
1177
+ var key = keys[i];
1178
+
1179
+ if (key !== 'children' && key !== 'key') {
1180
+ setCurrentlyValidatingElement$1(fragment);
1181
+
1182
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1183
+
1184
+ setCurrentlyValidatingElement$1(null);
1185
+ break;
1186
+ }
1187
+ }
1188
+
1189
+ if (fragment.ref !== null) {
1190
+ setCurrentlyValidatingElement$1(fragment);
1191
+
1192
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
1193
+
1194
+ setCurrentlyValidatingElement$1(null);
1195
+ }
1196
+ }
1197
+ }
1198
+
1199
+ var didWarnAboutKeySpread = {};
1200
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
1201
+ {
1202
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1203
+ // succeed and there will likely be errors in render.
1204
+
1205
+ if (!validType) {
1206
+ var info = '';
1207
+
1208
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1209
+ 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.";
1210
+ }
1211
+
1212
+ var sourceInfo = getSourceInfoErrorAddendum();
1213
+
1214
+ if (sourceInfo) {
1215
+ info += sourceInfo;
1216
+ } else {
1217
+ info += getDeclarationErrorAddendum();
1218
+ }
1219
+
1220
+ var typeString;
1221
+
1222
+ if (type === null) {
1223
+ typeString = 'null';
1224
+ } else if (isArray(type)) {
1225
+ typeString = 'array';
1226
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1227
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
1228
+ info = ' Did you accidentally export a JSX literal instead of a component?';
1229
+ } else {
1230
+ typeString = typeof type;
1231
+ }
1232
+
1233
+ error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1234
+ }
1235
+
1236
+ var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
1237
+ // TODO: Drop this when these are no longer allowed as the type argument.
1238
+
1239
+ if (element == null) {
1240
+ return element;
1241
+ } // Skip key warning if the type isn't valid since our key validation logic
1242
+ // doesn't expect a non-string/function type and can throw confusing errors.
1243
+ // We don't want exception behavior to differ between dev and prod.
1244
+ // (Rendering will throw with a helpful message and as soon as the type is
1245
+ // fixed, the key warnings will appear.)
1246
+
1247
+
1248
+ if (validType) {
1249
+ var children = props.children;
1250
+
1251
+ if (children !== undefined) {
1252
+ if (isStaticChildren) {
1253
+ if (isArray(children)) {
1254
+ for (var i = 0; i < children.length; i++) {
1255
+ validateChildKeys(children[i], type);
1256
+ }
1257
+
1258
+ if (Object.freeze) {
1259
+ Object.freeze(children);
1260
+ }
1261
+ } else {
1262
+ error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
1263
+ }
1264
+ } else {
1265
+ validateChildKeys(children, type);
1266
+ }
1267
+ }
1268
+ }
1269
+
1270
+ {
1271
+ if (hasOwnProperty.call(props, 'key')) {
1272
+ var componentName = getComponentNameFromType(type);
1273
+ var keys = Object.keys(props).filter(function (k) {
1274
+ return k !== 'key';
1275
+ });
1276
+ var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
1277
+
1278
+ if (!didWarnAboutKeySpread[componentName + beforeExample]) {
1279
+ var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
1280
+
1281
+ error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
1282
+
1283
+ didWarnAboutKeySpread[componentName + beforeExample] = true;
1284
+ }
1285
+ }
1286
+ }
1287
+
1288
+ if (type === REACT_FRAGMENT_TYPE) {
1289
+ validateFragmentProps(element);
1290
+ } else {
1291
+ validatePropTypes(element);
1292
+ }
1293
+
1294
+ return element;
1295
+ }
1296
+ } // These two functions exist to still get child warnings in dev
1297
+ // even with the prod transform. This means that jsxDEV is purely
1298
+ // opt-in behavior for better messages but that we won't stop
1299
+ // giving you warnings if you use production apis.
1300
+
1301
+ function jsxWithValidationStatic(type, props, key) {
1302
+ {
1303
+ return jsxWithValidation(type, props, key, true);
1304
+ }
1305
+ }
1306
+ function jsxWithValidationDynamic(type, props, key) {
1307
+ {
1308
+ return jsxWithValidation(type, props, key, false);
1309
+ }
1310
+ }
1311
+
1312
+ var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
1313
+ // for now we can ship identical prod functions
1314
+
1315
+ var jsxs = jsxWithValidationStatic ;
1316
+
1317
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
1318
+ reactJsxRuntime_development.jsx = jsx;
1319
+ reactJsxRuntime_development.jsxs = jsxs;
1320
+ })();
1321
+ }
1322
+ return reactJsxRuntime_development;
1323
+ }
1324
+
1325
+ export { requireReactJsxRuntime_development as __require };
1326
+ //# sourceMappingURL=react-jsx-runtime.development.js.map