neo-register 1.0.10 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,342 @@
1
- import e from"vue";function t(e,t,r=!0){const n=function(e,t=!0){const r=e&&e.__super?Object.create(e.__super,{__super:{value:e.__super,writable:!1,enumerable:!1}}):Object.create(Object.prototype);return t&&e&&Object.keys(e).forEach(t=>r[t]=e[t]),r}(e,r);return t&&Object.keys(t).forEach(e=>n[e]=t[e]),n}const r="[neo-register]";function n(e){return"object"==typeof e&&(e._compiled&&e.components||e.__file&&e.__file.endsWith(".vue"))}var o,a;function u(e,t,n){if(e&&function(e){let t=!1;if(!e)return!1;const n=new e;return n.label?n.tags&&!Array.isArray(n.tags)?console.error(`${r} / registerNeoEditorModel: 自定义组件注册失败,组件分类(tags)格式异常。`):(n.iconSrc||Object.assign(e.prototype,{iconSrc:"https://neo-widgets.bj.bcebos.com/custom-widget.svg"}),t=!0):console.error(`${r} / registerNeoEditorModel: 自定义组件注册失败,名称(label)不能为空。`),t}(e)){const o=t||(new e).cmpType;o||console.error(`${r} / registerNeoEditorModel: 自定义组件注册失败,cmpType 不能为空。`);const a=n||{},u=new e;if(Object.assign(e.prototype,{...u,cmpType:o,custom:!0,tags:u.tags??a.tags??["自定义组件"],targetPage:u.targetPage??a.targetPage??["customPage"],exposedToDesigner:u.exposedToDesigner??a.exposedToDesigner??!0,namespace:u.namespace??a.namespace??"neo-cmp-cli",enableDuplicate:u.enableDuplicate??a.enableDuplicate??!0}),window&&window.postMessage){const t=function(e,t){window&&!window.NEOEditorCustomModels&&(window.NEOEditorCustomModels={});if(!window.NEOEditorCustomModels[e])return window.NEOEditorCustomModels[e]=t,e;console.error(`${r}注册自定义组件模型失败,已存在重名插件(${e})。`);return null}(o,e);t&&(console.info(`${r}触发注册自定义组件模型(${o})事件`),window.postMessage({type:"neo-model-register-event",eventMsg:`${r}注册一个 neo-editor 自定义组件模型`,cmpType:o},"*"))}}}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(e){e.renderer="renderer",e.formitem="formitem"}(o||(o={})),function(e){e.react="react",e.vue2="vue2",e.vue3="vue3",e.jquery="jquery"}(a||(a={}));var c,s,l,f={exports:{}},p={};function d(){if(s)return c;s=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return c=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(n,o){for(var a,u,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(n),c=1;c<arguments.length;c++){for(var s in a=Object(arguments[c]))t.call(a,s)&&(i[s]=a[s]);if(e){u=e(a);for(var l=0;l<u.length;l++)r.call(a,u[l])&&(i[u[l]]=a[u[l]])}}return i},c}
1
+ import Vue from 'vue';
2
+
3
+ function _extends() {
4
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
5
+ for (var e = 1; e < arguments.length; e++) {
6
+ var t = arguments[e];
7
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8
+ }
9
+ return n;
10
+ }, _extends.apply(null, arguments);
11
+ }
12
+
13
+ function cloneObject(target, persistOwnProps) {
14
+ if (persistOwnProps === void 0) {
15
+ persistOwnProps = true;
16
+ }
17
+ var obj = target && target.__super ? Object.create(target.__super, {
18
+ __super: {
19
+ value: target.__super,
20
+ writable: false,
21
+ enumerable: false
22
+ }
23
+ }) : Object.create(Object.prototype);
24
+ persistOwnProps && target && Object.keys(target).forEach(function (key) {
25
+ return obj[key] = target[key];
26
+ });
27
+ return obj;
28
+ }
29
+ function extendObject(target, src, persistOwnProps) {
30
+ if (persistOwnProps === void 0) {
31
+ persistOwnProps = true;
32
+ }
33
+ var obj = cloneObject(target, persistOwnProps);
34
+ src && Object.keys(src).forEach(function (key) {
35
+ return obj[key] = src[key];
36
+ });
37
+ return obj;
38
+ }
39
+
40
+ var consoleTag = '[neo-register]'; // 输出标记
41
+ /**
42
+ * 获取技术栈标识
43
+ * 目的:兼容用户非标准写法
44
+ */
45
+ function getFramework(_framework) {
46
+ var defaultFramework = Framework.react;
47
+ if (!_framework) {
48
+ return defaultFramework;
49
+ }
50
+ var curFramework = _framework.toLowerCase().trim();
51
+ switch (curFramework) {
52
+ case 'jquery':
53
+ case 'jq':
54
+ curFramework = Framework.jquery;
55
+ break;
56
+ case 'vue2':
57
+ case 'vue 2':
58
+ case 'vue2.0':
59
+ case 'vue 2.0':
60
+ curFramework = Framework.vue2;
61
+ break;
62
+ case 'vue':
63
+ case 'vue3':
64
+ case 'vue 3':
65
+ case 'vue3.0':
66
+ case 'vue 3.0':
67
+ curFramework = Framework.vue3;
68
+ console.error(consoleTag + " \u6682\u4E0D\u652F\u6301 vue3.0 \u6280\u672F\u6808\u3002");
69
+ break;
70
+ default:
71
+ curFramework = Framework.react;
72
+ }
73
+ return curFramework;
74
+ }
75
+ /**
76
+ * 识别自定义组件技术栈类型
77
+ * react 编译后是 一个函数组件
78
+ * vue 编译后是 一个类对象: { render: ƒ, __file: 'xx/xx.vue', __compiled: true, ... }
79
+ */
80
+ function getFrameworkByCmp(component) {
81
+ if (isVueComponent(component)) {
82
+ return 'vue2';
83
+ }
84
+ return 'react';
85
+ }
86
+ function isVueComponent(component) {
87
+ return typeof component === 'object' && (component._compiled && component.components || component.__file && component.__file.endsWith('.vue'));
88
+ }
89
+ var Usage;
90
+ (function (Usage) {
91
+ Usage["renderer"] = "renderer";
92
+ Usage["formitem"] = "formitem";
93
+ })(Usage || (Usage = {}));
94
+ /**
95
+ * 获取neo渲染器类型标识
96
+ * 目的:兼容用户非标准写法
97
+ */
98
+ function getUsage(_usage) {
99
+ var defaultUsage = Usage.renderer;
100
+ if (!_usage) {
101
+ return defaultUsage;
102
+ }
103
+ var curUsage = _usage.toLowerCase().trim();
104
+ switch (curUsage) {
105
+ case 'renderer':
106
+ case 'renderers':
107
+ curUsage = Usage.renderer;
108
+ break;
109
+ case 'formitem':
110
+ case 'form-item':
111
+ case 'form item':
112
+ curUsage = Usage.formitem;
113
+ break;
114
+ default:
115
+ curUsage = Usage.renderer;
116
+ }
117
+ return curUsage;
118
+ }
119
+ /**
120
+ * 当前 neo-register 支持的技术栈
121
+ * 备注:vue2 和 vue3 不能同时存在
122
+ */
123
+ var Framework;
124
+ (function (Framework) {
125
+ Framework["react"] = "react";
126
+ Framework["vue2"] = "vue2";
127
+ Framework["vue3"] = "vue3";
128
+ Framework["jquery"] = "jquery";
129
+ })(Framework || (Framework = {}));
130
+ // 判断是否缺失 editor 自定义组件模型关键字段
131
+ function isEditorModel(EditorModelClass) {
132
+ var _isEditorModel = false;
133
+ if (!EditorModelClass) {
134
+ return false;
135
+ }
136
+ var _editorPluginObj = new EditorModelClass();
137
+ if (!_editorPluginObj.label) {
138
+ console.error(consoleTag + " / registerNeoEditorModel: \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25\uFF0C\u540D\u79F0\uFF08label\uFF09\u4E0D\u80FD\u4E3A\u7A7A\u3002");
139
+ } else if (_editorPluginObj.tags && !Array.isArray(_editorPluginObj.tags)) {
140
+ console.error(consoleTag + " / registerNeoEditorModel: \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25\uFF0C\u7EC4\u4EF6\u5206\u7C7B\uFF08tags\uFF09\u683C\u5F0F\u5F02\u5E38\u3002");
141
+ } else {
142
+ // 1.设置一个默认 icon
143
+ if (!_editorPluginObj.iconUrl) {
144
+ Object.assign(EditorModelClass.prototype, {
145
+ iconUrl: 'https://neo-widgets.bj.bcebos.com/custom-widget.svg'
146
+ });
147
+ }
148
+ _isEditorModel = true;
149
+ }
150
+ return _isEditorModel;
151
+ }
152
+ // 判断是否是字符串类型
153
+ function isString(str) {
154
+ return Object.prototype.toString.call(str).slice(8, -1) === 'String';
155
+ }
156
+ function isProxy(obj) {
157
+ if (!obj) {
158
+ return false;
159
+ }
160
+ var hasMSTProperties = !!(obj.$treenode || obj.$mstObservable || obj.$modelType || obj.$modelId);
161
+ return hasMSTProperties || Object.prototype.toString.call(obj) === '[object Proxy]';
162
+ }
163
+
164
+ /**
165
+ * registerNeoEditorModel: 注册 neo-editor 自定义组件模型
166
+ *
167
+ * targetPage 取值说明
168
+ * all: 1 全页面
169
+ * indexPage: 2 首页
170
+ * entityListPage: 3 实体列表页
171
+ * entityFormPage: 4 实体表单页
172
+ * entityDetailPage: 5 实体详情页
173
+ * customPage: 6 自定义页面
174
+ * bizPage: 7 业务页面
175
+ */
176
+ function registerNeoEditorModel(curEditorModel, cmpType, options) {
177
+ if (curEditorModel && isEditorModel(curEditorModel)) {
178
+ var _ref, _curEditorModelObj$ta, _ref2, _curOptions$iconUrl, _ref3, _curEditorModelObj$ta2, _ref4, _curEditorModelObj$ex, _ref5, _curEditorModelObj$na, _ref6, _curEditorModelObj$en;
179
+ var curCmpType = cmpType || new curEditorModel().cmpType;
180
+ if (!curCmpType) {
181
+ console.error(consoleTag + " / registerNeoEditorModel: \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25\uFF0CcmpType \u4E0D\u80FD\u4E3A\u7A7A\u3002");
182
+ }
183
+ var curOptions = options || {};
184
+ var curEditorModelObj = new curEditorModel(); // 注册前进行一次实例化
185
+ Object.assign(curEditorModel.prototype, _extends({}, curEditorModelObj, {
186
+ cmpType: curCmpType,
187
+ custom: true,
188
+ tags: (_ref = (_curEditorModelObj$ta = curEditorModelObj.tags) !== null && _curEditorModelObj$ta !== void 0 ? _curEditorModelObj$ta : curOptions.tags) !== null && _ref !== void 0 ? _ref : ['自定义组件'],
189
+ iconUrl: (_ref2 = (_curOptions$iconUrl = curOptions.iconUrl) !== null && _curOptions$iconUrl !== void 0 ? _curOptions$iconUrl : curEditorModelObj.iconSrc) !== null && _ref2 !== void 0 ? _ref2 : 'https://neo-widgets.bj.bcebos.com/custom-widget.svg',
190
+ targetPage: (_ref3 = (_curEditorModelObj$ta2 = curEditorModelObj.targetPage) !== null && _curEditorModelObj$ta2 !== void 0 ? _curEditorModelObj$ta2 : curOptions.targetPage) !== null && _ref3 !== void 0 ? _ref3 : ['all'],
191
+ exposedToDesigner: (_ref4 = (_curEditorModelObj$ex = curEditorModelObj.exposedToDesigner) !== null && _curEditorModelObj$ex !== void 0 ? _curEditorModelObj$ex : curOptions.exposedToDesigner) !== null && _ref4 !== void 0 ? _ref4 : true,
192
+ namespace: (_ref5 = (_curEditorModelObj$na = curEditorModelObj.namespace) !== null && _curEditorModelObj$na !== void 0 ? _curEditorModelObj$na : curOptions.namespace) !== null && _ref5 !== void 0 ? _ref5 : 'neo-cmp-cli',
193
+ enableDuplicate: (_ref6 = (_curEditorModelObj$en = curEditorModelObj.enableDuplicate) !== null && _curEditorModelObj$en !== void 0 ? _curEditorModelObj$en : curOptions.enableDuplicate) !== null && _ref6 !== void 0 ? _ref6 : true // 默认在设计器中允许重复插入
194
+ }));
195
+ // registerEditorModel(curEditorModel); // 不直接注册为 neo-editor 插件
196
+ // 通过 postMessage 告知 neo-editor 注册一个新的插件
197
+ if (window && window.postMessage) {
198
+ var newComponentType = AddCustomEditorModel(curCmpType, curEditorModel);
199
+ if (newComponentType) {
200
+ console.info(consoleTag + "\u89E6\u53D1\u6CE8\u518C\u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6A21\u578B(" + curCmpType + ")\u4E8B\u4EF6");
201
+ window.postMessage({
202
+ type: 'neo-model-register-event',
203
+ eventMsg: consoleTag + "\u6CE8\u518C\u4E00\u4E2A neo-editor \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6A21\u578B",
204
+ cmpType: curCmpType
205
+ }, '*');
206
+ }
207
+ }
208
+ }
209
+ }
210
+ function AddCustomEditorModel(cmpType, model) {
211
+ if (window && !window.NEOEditorCustomModels) {
212
+ window.NEOEditorCustomModels = {};
213
+ }
214
+ if (!window.NEOEditorCustomModels[cmpType]) {
215
+ window.NEOEditorCustomModels[cmpType] = model;
216
+ return cmpType;
217
+ } else {
218
+ console.error(consoleTag + "\u6CE8\u518C\u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6A21\u578B\u5931\u8D25\uFF0C\u5DF2\u5B58\u5728\u91CD\u540D\u63D2\u4EF6(" + cmpType + ")\u3002");
219
+ }
220
+ return null;
221
+ }
222
+
223
+ function _objectWithoutPropertiesLoose(r, e) {
224
+ if (null == r) return {};
225
+ var t = {};
226
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
227
+ if (-1 !== e.indexOf(n)) continue;
228
+ t[n] = r[n];
229
+ }
230
+ return t;
231
+ }
232
+
233
+ function _setPrototypeOf(t, e) {
234
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
235
+ return t.__proto__ = e, t;
236
+ }, _setPrototypeOf(t, e);
237
+ }
238
+
239
+ function _inheritsLoose(t, o) {
240
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
241
+ }
242
+
243
+ function getDefaultExportFromCjs (x) {
244
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
245
+ }
246
+
247
+ var react = {exports: {}};
248
+
249
+ var react_production_min = {};
250
+
251
+ /*
252
+ object-assign
253
+ (c) Sindre Sorhus
254
+ @license MIT
255
+ */
256
+
257
+ var objectAssign;
258
+ var hasRequiredObjectAssign;
259
+
260
+ function requireObjectAssign () {
261
+ if (hasRequiredObjectAssign) return objectAssign;
262
+ hasRequiredObjectAssign = 1;
263
+
264
+ /* eslint-disable no-unused-vars */
265
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
266
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
267
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
268
+ function toObject(val) {
269
+ if (val === null || val === undefined) {
270
+ throw new TypeError('Object.assign cannot be called with null or undefined');
271
+ }
272
+ return Object(val);
273
+ }
274
+ function shouldUseNative() {
275
+ try {
276
+ if (!Object.assign) {
277
+ return false;
278
+ }
279
+
280
+ // Detect buggy property enumeration order in older V8 versions.
281
+
282
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
283
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
284
+ test1[5] = 'de';
285
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
286
+ return false;
287
+ }
288
+
289
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
290
+ var test2 = {};
291
+ for (var i = 0; i < 10; i++) {
292
+ test2['_' + String.fromCharCode(i)] = i;
293
+ }
294
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
295
+ return test2[n];
296
+ });
297
+ if (order2.join('') !== '0123456789') {
298
+ return false;
299
+ }
300
+
301
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
302
+ var test3 = {};
303
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
304
+ test3[letter] = letter;
305
+ });
306
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
307
+ return false;
308
+ }
309
+ return true;
310
+ } catch (err) {
311
+ // We don't expect any of the above to throw, but better to be safe.
312
+ return false;
313
+ }
314
+ }
315
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
316
+ var from;
317
+ var to = toObject(target);
318
+ var symbols;
319
+ for (var s = 1; s < arguments.length; s++) {
320
+ from = Object(arguments[s]);
321
+ for (var key in from) {
322
+ if (hasOwnProperty.call(from, key)) {
323
+ to[key] = from[key];
324
+ }
325
+ }
326
+ if (getOwnPropertySymbols) {
327
+ symbols = getOwnPropertySymbols(from);
328
+ for (var i = 0; i < symbols.length; i++) {
329
+ if (propIsEnumerable.call(from, symbols[i])) {
330
+ to[symbols[i]] = from[symbols[i]];
331
+ }
332
+ }
333
+ }
334
+ }
335
+ return to;
336
+ };
337
+ return objectAssign;
338
+ }
339
+
2
340
  /** @license React v16.14.0
3
341
  * react.production.min.js
4
342
  *
@@ -6,7 +344,487 @@ import e from"vue";function t(e,t,r=!0){const n=function(e,t=!0){const r=e&&e.__
6
344
  *
7
345
  * This source code is licensed under the MIT license found in the
8
346
  * LICENSE file in the root directory of this source tree.
9
- */function y(){if(l)return p;l=1;var e=d(),t="function"==typeof Symbol&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,u=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function w(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||b}function _(){}function C(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var k=C.prototype=new _;k.constructor=C,e(k,w.prototype),k.isPureReactComponent=!0;var j={current:null},O=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function $(e,t,n){var o,a={},u=null,i=null;if(null!=t)for(o in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(u=""+t.key),t)O.call(t,o)&&!S.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:r,type:e,key:u,ref:i,props:a,_owner:j.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var P=/\/+/g,E=[];function x(e,t,r,n){if(E.length){var o=E.pop();return o.result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function T(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>E.length&&E.push(e)}function N(e,t,o,a){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var i=!1;if(null===e)i=!0;else switch(u){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case r:case n:i=!0}}if(i)return o(a,e,""===t?"."+A(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=t+A(u=e[c],c);i+=N(u,s,o,a)}else if(null===e||"object"!=typeof e?s=null:s="function"==typeof(s=v&&e[v]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),c=0;!(u=e.next()).done;)i+=N(u=u.value,s=t+A(u,c++),o,a);else if("object"===u)throw o=""+e,Error(h(31,"[object Object]"===o?"object with keys {"+Object.keys(e).join(", ")+"}":o,""));return i}function D(e,t,r){return null==e?0:N(e,"",t,r)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function I(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var o=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?U(e,o,n,function(e){return e}):null!=e&&(R(e)&&(e=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),o.push(e))}function U(e,t,r,n,o){var a="";null!=r&&(a=(""+r).replace(P,"$&/")+"/"),D(e,M,t=x(t,a,n,o)),T(t)}var F={current:null};function q(){var e=F.current;if(null===e)throw Error(h(321));return e}var V={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:j,IsSomeRendererActing:{current:!1},assign:e};return p.Children={map:function(e,t,r){if(null==e)return e;var n=[];return U(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;D(e,I,t=x(null,null,t,r)),T(t)},count:function(e){return D(e,function(){return null},null)},toArray:function(e){var t=[];return U(e,t,null,function(e){return e}),t},only:function(e){if(!R(e))throw Error(h(143));return e}},p.Component=w,p.Fragment=o,p.Profiler=u,p.PureComponent=C,p.StrictMode=a,p.Suspense=f,p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,p.cloneElement=function(t,n,o){if(null==t)throw Error(h(267,t));var a=e({},t.props),u=t.key,i=t.ref,c=t._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,c=j.current),void 0!==n.key&&(u=""+n.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(l in n)O.call(n,l)&&!S.hasOwnProperty(l)&&(a[l]=void 0===n[l]&&void 0!==s?s[l]:n[l])}var l=arguments.length-2;if(1===l)a.children=o;else if(1<l){s=Array(l);for(var f=0;f<l;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:r,type:t.type,key:u,ref:i,props:a,_owner:c}},p.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:c,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},p.createElement=$,p.createFactory=function(e){var t=$.bind(null,e);return t.type=e,t},p.createRef=function(){return{current:null}},p.forwardRef=function(e){return{$$typeof:s,render:e}},p.isValidElement=R,p.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},p.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},p.useCallback=function(e,t){return q().useCallback(e,t)},p.useContext=function(e,t){return q().useContext(e,t)},p.useDebugValue=function(){},p.useEffect=function(e,t){return q().useEffect(e,t)},p.useImperativeHandle=function(e,t,r){return q().useImperativeHandle(e,t,r)},p.useLayoutEffect=function(e,t){return q().useLayoutEffect(e,t)},p.useMemo=function(e,t){return q().useMemo(e,t)},p.useReducer=function(e,t,r){return q().useReducer(e,t,r)},p.useRef=function(e){return q().useRef(e)},p.useState=function(e){return q().useState(e)},p.version="16.14.0",p}var m,v,h,b,g,w,_,C,k={};function j(){if(v)return m;v=1;return m="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function O(){return b?h:(b=1,h=Function.call.bind(Object.prototype.hasOwnProperty))}function S(){if(w)return g;w=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=j(),r={},n=O();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,u,i,c){if("production"!==process.env.NODE_ENV)for(var s in o)if(n(o,s)){var l;try{if("function"!=typeof o[s]){var f=Error((i||"React class")+": "+u+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}l=o[s](a,s,i,u,null,t)}catch(e){l=e}if(!l||l instanceof Error||e((i||"React class")+": type specification of "+u+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in r)){r[l.message]=!0;var p=c?c():"";e("Failed "+u+" type: "+l.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},g=o}
347
+ */
348
+
349
+ var hasRequiredReact_production_min;
350
+
351
+ function requireReact_production_min () {
352
+ if (hasRequiredReact_production_min) return react_production_min;
353
+ hasRequiredReact_production_min = 1;
354
+
355
+ var l = requireObjectAssign(),
356
+ n = "function" === typeof Symbol && Symbol["for"],
357
+ p = n ? Symbol["for"]("react.element") : 60103,
358
+ q = n ? Symbol["for"]("react.portal") : 60106,
359
+ r = n ? Symbol["for"]("react.fragment") : 60107,
360
+ t = n ? Symbol["for"]("react.strict_mode") : 60108,
361
+ u = n ? Symbol["for"]("react.profiler") : 60114,
362
+ v = n ? Symbol["for"]("react.provider") : 60109,
363
+ w = n ? Symbol["for"]("react.context") : 60110,
364
+ x = n ? Symbol["for"]("react.forward_ref") : 60112,
365
+ y = n ? Symbol["for"]("react.suspense") : 60113,
366
+ z = n ? Symbol["for"]("react.memo") : 60115,
367
+ A = n ? Symbol["for"]("react.lazy") : 60116,
368
+ B = "function" === typeof Symbol && Symbol.iterator;
369
+ function C(a) {
370
+ for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
371
+ 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.";
372
+ }
373
+ var D = {
374
+ isMounted: function isMounted() {
375
+ return false;
376
+ },
377
+ enqueueForceUpdate: function enqueueForceUpdate() {},
378
+ enqueueReplaceState: function enqueueReplaceState() {},
379
+ enqueueSetState: function enqueueSetState() {}
380
+ },
381
+ E = {};
382
+ function F(a, b, c) {
383
+ this.props = a;
384
+ this.context = b;
385
+ this.refs = E;
386
+ this.updater = c || D;
387
+ }
388
+ F.prototype.isReactComponent = {};
389
+ F.prototype.setState = function (a, b) {
390
+ if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error(C(85));
391
+ this.updater.enqueueSetState(this, a, b, "setState");
392
+ };
393
+ F.prototype.forceUpdate = function (a) {
394
+ this.updater.enqueueForceUpdate(this, a, "forceUpdate");
395
+ };
396
+ function G() {}
397
+ G.prototype = F.prototype;
398
+ function H(a, b, c) {
399
+ this.props = a;
400
+ this.context = b;
401
+ this.refs = E;
402
+ this.updater = c || D;
403
+ }
404
+ var I = H.prototype = new G();
405
+ I.constructor = H;
406
+ l(I, F.prototype);
407
+ I.isPureReactComponent = true;
408
+ var J = {
409
+ current: null
410
+ },
411
+ K = Object.prototype.hasOwnProperty,
412
+ L = {
413
+ key: true,
414
+ ref: true,
415
+ __self: true,
416
+ __source: true
417
+ };
418
+ function M(a, b, c) {
419
+ var e,
420
+ d = {},
421
+ g = null,
422
+ k = null;
423
+ if (null != b) for (e in void 0 !== b.ref && (k = b.ref), void 0 !== b.key && (g = "" + b.key), b) K.call(b, e) && !L.hasOwnProperty(e) && (d[e] = b[e]);
424
+ var f = arguments.length - 2;
425
+ if (1 === f) d.children = c;else if (1 < f) {
426
+ for (var h = Array(f), m = 0; m < f; m++) h[m] = arguments[m + 2];
427
+ d.children = h;
428
+ }
429
+ if (a && a.defaultProps) for (e in f = a.defaultProps, f) void 0 === d[e] && (d[e] = f[e]);
430
+ return {
431
+ $$typeof: p,
432
+ type: a,
433
+ key: g,
434
+ ref: k,
435
+ props: d,
436
+ _owner: J.current
437
+ };
438
+ }
439
+ function N(a, b) {
440
+ return {
441
+ $$typeof: p,
442
+ type: a.type,
443
+ key: b,
444
+ ref: a.ref,
445
+ props: a.props,
446
+ _owner: a._owner
447
+ };
448
+ }
449
+ function O(a) {
450
+ return "object" === typeof a && null !== a && a.$$typeof === p;
451
+ }
452
+ function escape(a) {
453
+ var b = {
454
+ "=": "=0",
455
+ ":": "=2"
456
+ };
457
+ return "$" + ("" + a).replace(/[=:]/g, function (a) {
458
+ return b[a];
459
+ });
460
+ }
461
+ var P = /\/+/g,
462
+ Q = [];
463
+ function R(a, b, c, e) {
464
+ if (Q.length) {
465
+ var d = Q.pop();
466
+ d.result = a;
467
+ d.keyPrefix = b;
468
+ d.func = c;
469
+ d.context = e;
470
+ d.count = 0;
471
+ return d;
472
+ }
473
+ return {
474
+ result: a,
475
+ keyPrefix: b,
476
+ func: c,
477
+ context: e,
478
+ count: 0
479
+ };
480
+ }
481
+ function S(a) {
482
+ a.result = null;
483
+ a.keyPrefix = null;
484
+ a.func = null;
485
+ a.context = null;
486
+ a.count = 0;
487
+ 10 > Q.length && Q.push(a);
488
+ }
489
+ function T(a, b, c, e) {
490
+ var d = typeof a;
491
+ if ("undefined" === d || "boolean" === d) a = null;
492
+ var g = false;
493
+ if (null === a) g = true;else switch (d) {
494
+ case "string":
495
+ case "number":
496
+ g = true;
497
+ break;
498
+ case "object":
499
+ switch (a.$$typeof) {
500
+ case p:
501
+ case q:
502
+ g = true;
503
+ }
504
+ }
505
+ if (g) return c(e, a, "" === b ? "." + U(a, 0) : b), 1;
506
+ g = 0;
507
+ b = "" === b ? "." : b + ":";
508
+ if (Array.isArray(a)) for (var k = 0; k < a.length; k++) {
509
+ d = a[k];
510
+ var f = b + U(d, k);
511
+ g += T(d, f, c, e);
512
+ } else if (null === a || "object" !== typeof a ? f = null : (f = B && a[B] || a["@@iterator"], f = "function" === typeof f ? f : null), "function" === typeof f) for (a = f.call(a), k = 0; !(d = a.next()).done;) d = d.value, f = b + U(d, k++), g += T(d, f, c, e);else if ("object" === d) throw c = "" + a, Error(C(31, "[object Object]" === c ? "object with keys {" + Object.keys(a).join(", ") + "}" : c, ""));
513
+ return g;
514
+ }
515
+ function V(a, b, c) {
516
+ return null == a ? 0 : T(a, "", b, c);
517
+ }
518
+ function U(a, b) {
519
+ return "object" === typeof a && null !== a && null != a.key ? escape(a.key) : b.toString(36);
520
+ }
521
+ function W(a, b) {
522
+ a.func.call(a.context, b, a.count++);
523
+ }
524
+ function aa(a, b, c) {
525
+ var e = a.result,
526
+ d = a.keyPrefix;
527
+ a = a.func.call(a.context, b, a.count++);
528
+ Array.isArray(a) ? X(a, e, c, function (a) {
529
+ return a;
530
+ }) : null != a && (O(a) && (a = N(a, d + (!a.key || b && b.key === a.key ? "" : ("" + a.key).replace(P, "$&/") + "/") + c)), e.push(a));
531
+ }
532
+ function X(a, b, c, e, d) {
533
+ var g = "";
534
+ null != c && (g = ("" + c).replace(P, "$&/") + "/");
535
+ b = R(b, g, e, d);
536
+ V(a, aa, b);
537
+ S(b);
538
+ }
539
+ var Y = {
540
+ current: null
541
+ };
542
+ function Z() {
543
+ var a = Y.current;
544
+ if (null === a) throw Error(C(321));
545
+ return a;
546
+ }
547
+ var ba = {
548
+ ReactCurrentDispatcher: Y,
549
+ ReactCurrentBatchConfig: {
550
+ suspense: null
551
+ },
552
+ ReactCurrentOwner: J,
553
+ IsSomeRendererActing: {
554
+ current: false
555
+ },
556
+ assign: l
557
+ };
558
+ react_production_min.Children = {
559
+ map: function map(a, b, c) {
560
+ if (null == a) return a;
561
+ var e = [];
562
+ X(a, e, null, b, c);
563
+ return e;
564
+ },
565
+ forEach: function forEach(a, b, c) {
566
+ if (null == a) return a;
567
+ b = R(null, null, b, c);
568
+ V(a, W, b);
569
+ S(b);
570
+ },
571
+ count: function count(a) {
572
+ return V(a, function () {
573
+ return null;
574
+ }, null);
575
+ },
576
+ toArray: function toArray(a) {
577
+ var b = [];
578
+ X(a, b, null, function (a) {
579
+ return a;
580
+ });
581
+ return b;
582
+ },
583
+ only: function only(a) {
584
+ if (!O(a)) throw Error(C(143));
585
+ return a;
586
+ }
587
+ };
588
+ react_production_min.Component = F;
589
+ react_production_min.Fragment = r;
590
+ react_production_min.Profiler = u;
591
+ react_production_min.PureComponent = H;
592
+ react_production_min.StrictMode = t;
593
+ react_production_min.Suspense = y;
594
+ react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ba;
595
+ react_production_min.cloneElement = function (a, b, c) {
596
+ if (null === a || void 0 === a) throw Error(C(267, a));
597
+ var e = l({}, a.props),
598
+ d = a.key,
599
+ g = a.ref,
600
+ k = a._owner;
601
+ if (null != b) {
602
+ void 0 !== b.ref && (g = b.ref, k = J.current);
603
+ void 0 !== b.key && (d = "" + b.key);
604
+ if (a.type && a.type.defaultProps) var f = a.type.defaultProps;
605
+ for (h in b) K.call(b, h) && !L.hasOwnProperty(h) && (e[h] = void 0 === b[h] && void 0 !== f ? f[h] : b[h]);
606
+ }
607
+ var h = arguments.length - 2;
608
+ if (1 === h) e.children = c;else if (1 < h) {
609
+ f = Array(h);
610
+ for (var m = 0; m < h; m++) f[m] = arguments[m + 2];
611
+ e.children = f;
612
+ }
613
+ return {
614
+ $$typeof: p,
615
+ type: a.type,
616
+ key: d,
617
+ ref: g,
618
+ props: e,
619
+ _owner: k
620
+ };
621
+ };
622
+ react_production_min.createContext = function (a, b) {
623
+ void 0 === b && (b = null);
624
+ a = {
625
+ $$typeof: w,
626
+ _calculateChangedBits: b,
627
+ _currentValue: a,
628
+ _currentValue2: a,
629
+ _threadCount: 0,
630
+ Provider: null,
631
+ Consumer: null
632
+ };
633
+ a.Provider = {
634
+ $$typeof: v,
635
+ _context: a
636
+ };
637
+ return a.Consumer = a;
638
+ };
639
+ react_production_min.createElement = M;
640
+ react_production_min.createFactory = function (a) {
641
+ var b = M.bind(null, a);
642
+ b.type = a;
643
+ return b;
644
+ };
645
+ react_production_min.createRef = function () {
646
+ return {
647
+ current: null
648
+ };
649
+ };
650
+ react_production_min.forwardRef = function (a) {
651
+ return {
652
+ $$typeof: x,
653
+ render: a
654
+ };
655
+ };
656
+ react_production_min.isValidElement = O;
657
+ react_production_min.lazy = function (a) {
658
+ return {
659
+ $$typeof: A,
660
+ _ctor: a,
661
+ _status: -1,
662
+ _result: null
663
+ };
664
+ };
665
+ react_production_min.memo = function (a, b) {
666
+ return {
667
+ $$typeof: z,
668
+ type: a,
669
+ compare: void 0 === b ? null : b
670
+ };
671
+ };
672
+ react_production_min.useCallback = function (a, b) {
673
+ return Z().useCallback(a, b);
674
+ };
675
+ react_production_min.useContext = function (a, b) {
676
+ return Z().useContext(a, b);
677
+ };
678
+ react_production_min.useDebugValue = function () {};
679
+ react_production_min.useEffect = function (a, b) {
680
+ return Z().useEffect(a, b);
681
+ };
682
+ react_production_min.useImperativeHandle = function (a, b, c) {
683
+ return Z().useImperativeHandle(a, b, c);
684
+ };
685
+ react_production_min.useLayoutEffect = function (a, b) {
686
+ return Z().useLayoutEffect(a, b);
687
+ };
688
+ react_production_min.useMemo = function (a, b) {
689
+ return Z().useMemo(a, b);
690
+ };
691
+ react_production_min.useReducer = function (a, b, c) {
692
+ return Z().useReducer(a, b, c);
693
+ };
694
+ react_production_min.useRef = function (a) {
695
+ return Z().useRef(a);
696
+ };
697
+ react_production_min.useState = function (a) {
698
+ return Z().useState(a);
699
+ };
700
+ react_production_min.version = "16.14.0";
701
+ return react_production_min;
702
+ }
703
+
704
+ var react_development = {};
705
+
706
+ /**
707
+ * Copyright (c) 2013-present, Facebook, Inc.
708
+ *
709
+ * This source code is licensed under the MIT license found in the
710
+ * LICENSE file in the root directory of this source tree.
711
+ */
712
+
713
+ var ReactPropTypesSecret_1;
714
+ var hasRequiredReactPropTypesSecret;
715
+
716
+ function requireReactPropTypesSecret () {
717
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
718
+ hasRequiredReactPropTypesSecret = 1;
719
+
720
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
721
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
722
+ return ReactPropTypesSecret_1;
723
+ }
724
+
725
+ var has;
726
+ var hasRequiredHas;
727
+
728
+ function requireHas () {
729
+ if (hasRequiredHas) return has;
730
+ hasRequiredHas = 1;
731
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
732
+ return has;
733
+ }
734
+
735
+ /**
736
+ * Copyright (c) 2013-present, Facebook, Inc.
737
+ *
738
+ * This source code is licensed under the MIT license found in the
739
+ * LICENSE file in the root directory of this source tree.
740
+ */
741
+
742
+ var checkPropTypes_1;
743
+ var hasRequiredCheckPropTypes;
744
+
745
+ function requireCheckPropTypes () {
746
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
747
+ hasRequiredCheckPropTypes = 1;
748
+
749
+ var printWarning = function printWarning() {};
750
+ if (process.env.NODE_ENV !== 'production') {
751
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
752
+ var loggedTypeFailures = {};
753
+ var has = /*@__PURE__*/ requireHas();
754
+ printWarning = function printWarning(text) {
755
+ var message = 'Warning: ' + text;
756
+ if (typeof console !== 'undefined') {
757
+ console.error(message);
758
+ }
759
+ try {
760
+ // --- Welcome to debugging React ---
761
+ // This error was thrown as a convenience so that you can use this stack
762
+ // to find the callsite that caused this warning to fire.
763
+ throw new Error(message);
764
+ } catch (x) {/**/}
765
+ };
766
+ }
767
+
768
+ /**
769
+ * Assert that the values match with the type specs.
770
+ * Error messages are memorized and will only be shown once.
771
+ *
772
+ * @param {object} typeSpecs Map of name to a ReactPropType
773
+ * @param {object} values Runtime values that need to be type-checked
774
+ * @param {string} location e.g. "prop", "context", "child context"
775
+ * @param {string} componentName Name of the component for error messages.
776
+ * @param {?Function} getStack Returns the component stack.
777
+ * @private
778
+ */
779
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
780
+ if (process.env.NODE_ENV !== 'production') {
781
+ for (var typeSpecName in typeSpecs) {
782
+ if (has(typeSpecs, typeSpecName)) {
783
+ var error;
784
+ // Prop type validation may throw. In case they do, we don't want to
785
+ // fail the render phase where it didn't fail before. So we log it.
786
+ // After these have been cleaned up, we'll let them throw.
787
+ try {
788
+ // This is intentionally an invariant that gets caught. It's the same
789
+ // behavior as without this statement except with a better message.
790
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
791
+ 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`.');
792
+ err.name = 'Invariant Violation';
793
+ throw err;
794
+ }
795
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
796
+ } catch (ex) {
797
+ error = ex;
798
+ }
799
+ if (error && !(error instanceof Error)) {
800
+ printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
801
+ }
802
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
803
+ // Only monitor this failure once because there tends to be a lot of the
804
+ // same error.
805
+ loggedTypeFailures[error.message] = true;
806
+ var stack = getStack ? getStack() : '';
807
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
808
+ }
809
+ }
810
+ }
811
+ }
812
+ }
813
+
814
+ /**
815
+ * Resets warning cache when testing.
816
+ *
817
+ * @private
818
+ */
819
+ checkPropTypes.resetWarningCache = function () {
820
+ if (process.env.NODE_ENV !== 'production') {
821
+ loggedTypeFailures = {};
822
+ }
823
+ };
824
+ checkPropTypes_1 = checkPropTypes;
825
+ return checkPropTypes_1;
826
+ }
827
+
10
828
  /** @license React v16.14.0
11
829
  * react.development.js
12
830
  *
@@ -14,4 +832,1914 @@ import e from"vue";function t(e,t,r=!0){const n=function(e,t=!0){const r=e&&e.__
14
832
  *
15
833
  * This source code is licensed under the MIT license found in the
16
834
  * LICENSE file in the root directory of this source tree.
17
- */function $(){return _||(_=1,"production"!==process.env.NODE_ENV&&function(){var e=d(),t=S(),r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,i=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,h=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119,_="function"==typeof Symbol&&Symbol.iterator;function C(e){if(null===e||"object"!=typeof e)return null;var t=_&&e[_]||e["@@iterator"];return"function"==typeof t?t:null}var j={current:null},O={current:null},$=/^(.*)[\\\/]/;function R(e){if(null==e)return null;if("number"==typeof e.tag&&D("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case a:return"Fragment";case o:return"Portal";case i:return"Profiler";case u:return"StrictMode";case p:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return"Context.Consumer";case c:return"Context.Provider";case f:return n=e,l=e.render,d="ForwardRef",b=l.displayName||l.name||"",n.displayName||(""!==b?d+"("+b+")":d);case m:return R(e.type);case h:return R(e.render);case v:var t=1===(r=e)._status?r._result:null;if(t)return R(t)}var r,n,l,d,b;return null}var P={},E=null;function x(e){E=e}P.getCurrentStack=null,P.getStackAddendum=function(){var e="";if(E){var t=R(E.type),r=E._owner;e+=function(e,t,r){var n="";if(t){var o=t.fileName,a=o.replace($,"");if(/^index\./.test(a)){var u=o.match($);if(u){var i=u[1];i&&(a=i.replace($,"")+"/"+a)}}n=" (at "+a+":"+t.lineNumber+")"}else r&&(n=" (created by "+r+")");return"\n in "+(e||"Unknown")+n}(t,E._source,r&&R(r.type))}var n=P.getCurrentStack;return n&&(e+=n()||""),e};var T={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:e};function N(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];A("warn",e,r)}function D(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];A("error",e,r)}function A(e,t,r){if(!(r.length>0&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in"))){var n=T.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]))}var o=r.map(function(e){return""+e});o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o);try{var a=0,u="Warning: "+t.replace(/%s/g,function(){return r[a++]});throw new Error(u)}catch(e){}}e(T,{ReactDebugCurrentFrame:P,ReactComponentTreeHook:{}});var I={};function M(e,t){var r=e.constructor,n=r&&(r.displayName||r.name)||"ReactClass",o=n+"."+t;I[o]||(D("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.",t,n),I[o]=!0)}var U={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){M(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){M(e,"replaceState")},enqueueSetState:function(e,t,r,n){M(e,"setState")}},F={};function q(e,t,r){this.props=e,this.context=t,this.refs=F,this.updater=r||U}Object.freeze(F),q.prototype.isReactComponent={},q.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},q.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var V={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},L=function(e,t){Object.defineProperty(q.prototype,e,{get:function(){N("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var z in V)V.hasOwnProperty(z)&&L(z,V[z]);function W(){}function B(e,t,r){this.props=e,this.context=t,this.refs=F,this.updater=r||U}W.prototype=q.prototype;var H=B.prototype=new W;H.constructor=B,e(H,q.prototype),H.isPureReactComponent=!0;var Y,J,X,G=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0};function Q(e){if(G.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function Z(e){if(G.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}X={};var ee=function(e,t,r,o,a,u,i){var c={$$typeof:n,type:e,key:t,ref:r,props:i,_owner:u,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function te(e,t,r){var n,o={},a=null,u=null,i=null,c=null;if(null!=t)for(n in Q(t)&&(u=t.ref,function(e){if("string"==typeof e.ref&&O.current&&e.__self&&O.current.stateNode!==e.__self){var t=R(O.current.type);X[t]||(D('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',R(O.current.type),e.ref),X[t]=!0)}}(t)),Z(t)&&(a=""+t.key),i=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source,t)G.call(t,n)&&!K.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(1===s)o.children=r;else if(s>1){for(var l=Array(s),f=0;f<s;f++)l[f]=arguments[f+2];Object.freeze&&Object.freeze(l),o.children=l}if(e&&e.defaultProps){var p=e.defaultProps;for(n in p)void 0===o[n]&&(o[n]=p[n])}if(a||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var r=function(){Y||(Y=!0,D("%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)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,d),u&&function(e,t){var r=function(){J||(J=!0,D("%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)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(o,d)}return ee(e,a,u,i,c,O.current,o)}function re(t,r,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o,a,u=e({},t.props),i=t.key,c=t.ref,s=t._self,l=t._source,f=t._owner;if(null!=r)for(o in Q(r)&&(c=r.ref,f=O.current),Z(r)&&(i=""+r.key),t.type&&t.type.defaultProps&&(a=t.type.defaultProps),r)G.call(r,o)&&!K.hasOwnProperty(o)&&(void 0===r[o]&&void 0!==a?u[o]=a[o]:u[o]=r[o]);var p=arguments.length-2;if(1===p)u.children=n;else if(p>1){for(var d=Array(p),y=0;y<p;y++)d[y]=arguments[y+2];u.children=d}return ee(t.type,i,c,s,l,f,u)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var oe=!1,ae=/\/+/g;function ue(e){return(""+e).replace(ae,"$&/")}var ie,ce=[];function se(e,t,r,n){if(ce.length){var o=ce.pop();return o.result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function le(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,ce.length<10&&ce.push(e)}function fe(e,t,r,a){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var i,c=!1;if(null===e)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case o:c=!0}}if(c)return r(a,e,""===t?"."+de(e,0):t),1;var s=0,l=""===t?".":t+":";if(Array.isArray(e))for(var f=0;f<e.length;f++)s+=fe(i=e[f],l+de(i,f),r,a);else{var p=C(e);if("function"==typeof p){p===e.entries&&(oe||N("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."),oe=!0);for(var d,y=p.call(e),m=0;!(d=y.next()).done;)s+=fe(i=d.value,l+de(i,m++),r,a)}else if("object"===u){var v;v=" If you meant to render a collection of children, use an array instead."+P.getStackAddendum();var h=""+e;throw Error("Objects are not valid as a React child (found: "+("[object Object]"===h?"object with keys {"+Object.keys(e).join(", ")+"}":h)+")."+v)}}return s}function pe(e,t,r){return null==e?0:fe(e,"",t,r)}function de(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=e.key,n={"=":"=0",":":"=2"},"$"+(""+r).replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function ye(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function me(e,t,r){var n,o,a=e.result,u=e.keyPrefix,i=e.func,c=e.context,s=i.call(c,t,e.count++);Array.isArray(s)?ve(s,a,r,function(e){return e}):null!=s&&(ne(s)&&(n=s,o=u+(!s.key||t&&t.key===s.key?"":ue(s.key)+"/")+r,s=ee(n.type,o,n.ref,n._self,n._source,n._owner,n.props)),a.push(s))}function ve(e,t,r,n,o){var a="";null!=r&&(a=ue(r)+"/");var u=se(t,a,n,o);pe(e,me,u),le(u)}function he(e){return"string"==typeof e||"function"==typeof e||e===a||e===l||e===i||e===u||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===c||e.$$typeof===s||e.$$typeof===f||e.$$typeof===b||e.$$typeof===g||e.$$typeof===w||e.$$typeof===h)}function be(){var e=j.current;if(null===e)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.");return e}function ge(){if(O.current){var e=R(O.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ie=!1;var we={};function _e(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=ge();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!we[r]){we[r]=!0;var n="";e&&e._owner&&e._owner!==O.current&&(n=" It was passed a child from "+R(e._owner.type)+"."),x(e),D('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',r,n),x(null)}}}function Ce(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];ne(n)&&_e(n,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=C(e);if("function"==typeof o&&o!==e.entries)for(var a,u=o.call(e);!(a=u.next()).done;)ne(a.value)&&_e(a.value,t)}}function ke(e){var r=e.type;if(null!=r&&"string"!=typeof r){var n,o=R(r);if("function"==typeof r)n=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==f&&r.$$typeof!==m)return;n=r.propTypes}n?(x(e),t(n,e.props,"prop",o,P.getStackAddendum),x(null)):void 0===r.PropTypes||ie||(ie=!0,D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")),"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function je(e,t,r){var o,u,i=he(e);if(!i){var c="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var s,l=null!=(o=t)&&void 0!==(u=o.__source)?"\n\nCheck your code at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+".":"";c+=l||ge(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===n?(s="<"+(R(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,D("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,c)}var f=te.apply(this,arguments);if(null==f)return f;if(i)for(var p=2;p<arguments.length;p++)Ce(arguments[p],e);return e===a?function(e){x(e);for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n);break}}null!==e.ref&&D("Invalid attribute `ref` supplied to `React.Fragment`."),x(null)}(f):ke(f),f}var Oe=!1;try{var Se=Object.freeze({}),$e=new Map([[Se,null]]),Re=new Set([Se]);$e.set(0,0),Re.add(0)}catch(e){}var Pe=je,Ee=function(e,t,r){for(var n=re.apply(this,arguments),o=2;o<arguments.length;o++)Ce(arguments[o],n.type);return ke(n),n},xe=function(e){var t=je.bind(null,e);return t.type=e,Oe||(Oe=!0,N("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return N("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},Te={map:function(e,t,r){if(null==e)return e;var n=[];return ve(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;var n=se(null,null,t,r);pe(e,ye,n),le(n)},count:function(e){return pe(e,function(){return null},null)},toArray:function(e){var t=[];return ve(e,t,null,function(e){return e}),t},only:function(e){if(!ne(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};k.Children=Te,k.Component=q,k.Fragment=a,k.Profiler=i,k.PureComponent=B,k.StrictMode=u,k.Suspense=p,k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,k.cloneElement=Ee,k.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&D("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};r.Provider={$$typeof:c,_context:r};var n=!1,o=!1,a={$$typeof:s,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(a,{Provider:{get:function(){return o||(o=!0,D("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,D("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=a,r._currentRenderer=null,r._currentRenderer2=null,r},k.createElement=Pe,k.createFactory=xe,k.createRef=function(){var e={current:null};return Object.seal(e),e},k.forwardRef=function(e){return null!=e&&e.$$typeof===m?D("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?D("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&D("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||D("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?")),{$$typeof:f,render:e}},k.isValidElement=ne,k.lazy=function(e){var t,r,n={$$typeof:v,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){D("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."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){D("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."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},k.memo=function(e,t){return he(e)||D("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:m,type:e,compare:void 0===t?null:t}},k.useCallback=function(e,t){return be().useCallback(e,t)},k.useContext=function(e,t){var r=be();if(void 0!==t&&D("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&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":""),void 0!==e._context){var n=e._context;n.Consumer===e?D("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?"):n.Provider===e&&D("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return r.useContext(e,t)},k.useDebugValue=function(e,t){return be().useDebugValue(e,t)},k.useEffect=function(e,t){return be().useEffect(e,t)},k.useImperativeHandle=function(e,t,r){return be().useImperativeHandle(e,t,r)},k.useLayoutEffect=function(e,t){return be().useLayoutEffect(e,t)},k.useMemo=function(e,t){return be().useMemo(e,t)},k.useReducer=function(e,t,r){return be().useReducer(e,t,r)},k.useRef=function(e){return be().useRef(e)},k.useState=function(e){return be().useState(e)},k.version="16.14.0"}()),k}var R=i((C||(C=1,"production"===process.env.NODE_ENV?f.exports=y():f.exports=$()),f.exports));function P(r){if(r&&("function"==typeof r||"object"==typeof r)){class n extends R.Component{domRef;vm;isUnmount;constructor(e,t){super(e),this.domRef=R.createRef(),this.isUnmount=!1,this.resolveNeoProps=this.resolveNeoProps.bind(this)}componentDidMount(){const{neoData:n,neoMSTData:o,neoFunc:a}=this.resolveNeoProps(),{data:u,...i}=r="function"==typeof r?new r:r,c=t("function"==typeof u?u():u,n);this.vm=new e({...i,data:()=>c,props:t(a,{...i.props||{},...o})}),Object.keys(a).forEach(e=>{this.vm.$props[e]=a[e]}),this.domRef.current&&this.domRef.current.appendChild(this.vm.$mount().$el)}componentDidUpdate(){if(!this.isUnmount){const{neoData:e}=this.resolveNeoProps();this.vm&&(Object.keys(e).forEach(t=>{this.vm[t]=e[t]}),this.vm.$forceUpdate())}}componentWillUnmount(){this.isUnmount=!0,this.vm&&this.vm.$destroy()}resolveNeoProps(){let e={},t={},r={};return Object.keys(this.props).forEach(n=>{const o=this.props[n];var a;"function"==typeof o?e[n]=o:(a=o)&&(a.$treenode||a.$mstObservable||a.$modelType||a.$modelId||"[object Proxy]"===Object.prototype.toString.call(a))?r[n]=o:t[n]=o}),{neoData:t,neoMSTData:r,neoFunc:e}}reload(){this.vm&&this.vm.reload?this.vm.reload():console.warn("自定义组件暂不支持reload动作。")}doAction(e,t){this.vm&&this.vm.doAction?this.vm.doAction(e,t):console.warn("自定义组件中不存在 doAction。")}render(){return R.createElement("div",{ref:this.domRef})}}return n}}function E(e){return n(e)?P(e):e}function x(e,t){if(!e)return;const u={cmpType:"",usage:o.renderer,weight:0};var i;if(t&&(i=t,"String"===Object.prototype.toString.call(i).slice(8,-1))?Object.assign(u,{cmpType:t}):Object.assign(u,t),u&&!u.cmpType)console.error(`${r} / registerNeoCmp: 自定义组件注册失败,cmpType 不能为空。`);else{u.framework=u.framework?function(e){let t=a.react;if(!e)return t;let n=e.toLowerCase().trim();switch(n){case"jquery":case"jq":n=a.jquery;break;case"vue2":case"vue 2":case"vue2.0":case"vue 2.0":n=a.vue2;break;case"vue":case"vue3":case"vue 3":case"vue3.0":case"vue 3.0":n=a.vue3,console.error(`${r} 暂不支持 vue3.0 技术栈。`);break;default:n=a.react}return n}(u.framework):n(e)?"vue2":"react",u.usage=function(e){let t=o.renderer;if(!e)return t;let r=e.toLowerCase().trim();switch(r){case"renderer":case"renderers":default:r=o.renderer;break;case"formitem":case"form-item":case"form item":r=o.formitem}return r}(u.usage);const t={renderer:()=>{},formitem:()=>{}},i={react:e=>e,vue2:P,vue3:P}[u.framework](e);if(t[u.usage]){if(window&&window.postMessage){const e=function(e,t){window&&!window.NeoCustomCmps&&(window.NeoCustomCmps={});if(!window.NeoCustomCmps[e])return window.NeoCustomCmps[e]=t,e;console.error(`${r} / registerNeoCmp: 自定义组件注册失败,已存在重名渲染器(${e})。`);return null}(u.cmpType,{cmpType:u.cmpType,weight:u.weight,usage:u.usage,framework:u.framework,component:i,config:u});e&&(console.info(`${r}触发注册自定义组件(${e})事件`),window.postMessage({type:"neo-cmp-register-event",eventMsg:`${r}注册一个自定义组件`,neoRenderer:{cmpType:e,weight:u.weight,usage:u.usage,config:u}},"*"))}}else console.error(`${r} / registerNeoCmp: 自定义组件注册失败,暂不支持 ${u.usage} 组件类型。`)}}export{E as autoConvertVueComponent,P as createVue2Component,x as registerNeoCmp,u as registerNeoEditorModel};
835
+ */
836
+
837
+ var hasRequiredReact_development;
838
+
839
+ function requireReact_development () {
840
+ if (hasRequiredReact_development) return react_development;
841
+ hasRequiredReact_development = 1;
842
+
843
+ if (process.env.NODE_ENV !== "production") {
844
+ (function () {
845
+
846
+ var _assign = requireObjectAssign();
847
+ var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes();
848
+ var ReactVersion = '16.14.0';
849
+
850
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
851
+ // nor polyfill, then a plain number is used for performance.
852
+ var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
853
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol["for"]('react.element') : 0xeac7;
854
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol["for"]('react.portal') : 0xeaca;
855
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol["for"]('react.fragment') : 0xeacb;
856
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.strict_mode') : 0xeacc;
857
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol["for"]('react.profiler') : 0xead2;
858
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol["for"]('react.provider') : 0xeacd;
859
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol["for"]('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
860
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.concurrent_mode') : 0xeacf;
861
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol["for"]('react.forward_ref') : 0xead0;
862
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol["for"]('react.suspense') : 0xead1;
863
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol["for"]('react.suspense_list') : 0xead8;
864
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol["for"]('react.memo') : 0xead3;
865
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol["for"]('react.lazy') : 0xead4;
866
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol["for"]('react.block') : 0xead9;
867
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol["for"]('react.fundamental') : 0xead5;
868
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol["for"]('react.responder') : 0xead6;
869
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol["for"]('react.scope') : 0xead7;
870
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
871
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
872
+ function getIteratorFn(maybeIterable) {
873
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
874
+ return null;
875
+ }
876
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
877
+ if (typeof maybeIterator === 'function') {
878
+ return maybeIterator;
879
+ }
880
+ return null;
881
+ }
882
+
883
+ /**
884
+ * Keeps track of the current dispatcher.
885
+ */
886
+ var ReactCurrentDispatcher = {
887
+ /**
888
+ * @internal
889
+ * @type {ReactComponent}
890
+ */
891
+ current: null
892
+ };
893
+
894
+ /**
895
+ * Keeps track of the current batch's configuration such as how long an update
896
+ * should suspend for if it needs to.
897
+ */
898
+ var ReactCurrentBatchConfig = {
899
+ suspense: null
900
+ };
901
+
902
+ /**
903
+ * Keeps track of the current owner.
904
+ *
905
+ * The current owner is the component who should own any components that are
906
+ * currently being constructed.
907
+ */
908
+ var ReactCurrentOwner = {
909
+ /**
910
+ * @internal
911
+ * @type {ReactComponent}
912
+ */
913
+ current: null
914
+ };
915
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
916
+ function describeComponentFrame(name, source, ownerName) {
917
+ var sourceInfo = '';
918
+ if (source) {
919
+ var path = source.fileName;
920
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
921
+ {
922
+ // In DEV, include code for a common special case:
923
+ // prefer "folder/index.js" instead of just "index.js".
924
+ if (/^index\./.test(fileName)) {
925
+ var match = path.match(BEFORE_SLASH_RE);
926
+ if (match) {
927
+ var pathBeforeSlash = match[1];
928
+ if (pathBeforeSlash) {
929
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
930
+ fileName = folderName + '/' + fileName;
931
+ }
932
+ }
933
+ }
934
+ }
935
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
936
+ } else if (ownerName) {
937
+ sourceInfo = ' (created by ' + ownerName + ')';
938
+ }
939
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
940
+ }
941
+ var Resolved = 1;
942
+ function refineResolvedLazyComponent(lazyComponent) {
943
+ return lazyComponent._status === Resolved ? lazyComponent._result : null;
944
+ }
945
+ function getWrappedName(outerType, innerType, wrapperName) {
946
+ var functionName = innerType.displayName || innerType.name || '';
947
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
948
+ }
949
+ function getComponentName(type) {
950
+ if (type == null) {
951
+ // Host root, text node or just invalid type.
952
+ return null;
953
+ }
954
+ {
955
+ if (typeof type.tag === 'number') {
956
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
957
+ }
958
+ }
959
+ if (typeof type === 'function') {
960
+ return type.displayName || type.name || null;
961
+ }
962
+ if (typeof type === 'string') {
963
+ return type;
964
+ }
965
+ switch (type) {
966
+ case REACT_FRAGMENT_TYPE:
967
+ return 'Fragment';
968
+ case REACT_PORTAL_TYPE:
969
+ return 'Portal';
970
+ case REACT_PROFILER_TYPE:
971
+ return "Profiler";
972
+ case REACT_STRICT_MODE_TYPE:
973
+ return 'StrictMode';
974
+ case REACT_SUSPENSE_TYPE:
975
+ return 'Suspense';
976
+ case REACT_SUSPENSE_LIST_TYPE:
977
+ return 'SuspenseList';
978
+ }
979
+ if (typeof type === 'object') {
980
+ switch (type.$$typeof) {
981
+ case REACT_CONTEXT_TYPE:
982
+ return 'Context.Consumer';
983
+ case REACT_PROVIDER_TYPE:
984
+ return 'Context.Provider';
985
+ case REACT_FORWARD_REF_TYPE:
986
+ return getWrappedName(type, type.render, 'ForwardRef');
987
+ case REACT_MEMO_TYPE:
988
+ return getComponentName(type.type);
989
+ case REACT_BLOCK_TYPE:
990
+ return getComponentName(type.render);
991
+ case REACT_LAZY_TYPE:
992
+ {
993
+ var thenable = type;
994
+ var resolvedThenable = refineResolvedLazyComponent(thenable);
995
+ if (resolvedThenable) {
996
+ return getComponentName(resolvedThenable);
997
+ }
998
+ break;
999
+ }
1000
+ }
1001
+ }
1002
+ return null;
1003
+ }
1004
+ var ReactDebugCurrentFrame = {};
1005
+ var currentlyValidatingElement = null;
1006
+ function setCurrentlyValidatingElement(element) {
1007
+ {
1008
+ currentlyValidatingElement = element;
1009
+ }
1010
+ }
1011
+ {
1012
+ // Stack implementation injected by the current renderer.
1013
+ ReactDebugCurrentFrame.getCurrentStack = null;
1014
+ ReactDebugCurrentFrame.getStackAddendum = function () {
1015
+ var stack = ''; // Add an extra top frame while an element is being validated
1016
+
1017
+ if (currentlyValidatingElement) {
1018
+ var name = getComponentName(currentlyValidatingElement.type);
1019
+ var owner = currentlyValidatingElement._owner;
1020
+ stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
1021
+ } // Delegate to the injected renderer-specific implementation
1022
+
1023
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
1024
+ if (impl) {
1025
+ stack += impl() || '';
1026
+ }
1027
+ return stack;
1028
+ };
1029
+ }
1030
+
1031
+ /**
1032
+ * Used by act() to track whether you're inside an act() scope.
1033
+ */
1034
+ var IsSomeRendererActing = {
1035
+ current: false
1036
+ };
1037
+ var ReactSharedInternals = {
1038
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
1039
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
1040
+ ReactCurrentOwner: ReactCurrentOwner,
1041
+ IsSomeRendererActing: IsSomeRendererActing,
1042
+ // Used by renderers to avoid bundling object-assign twice in UMD bundles:
1043
+ assign: _assign
1044
+ };
1045
+ {
1046
+ _assign(ReactSharedInternals, {
1047
+ // These should not be included in production.
1048
+ ReactDebugCurrentFrame: ReactDebugCurrentFrame,
1049
+ // Shim for React DOM 16.0.0 which still destructured (but not used) this.
1050
+ // TODO: remove in React 17.0.
1051
+ ReactComponentTreeHook: {}
1052
+ });
1053
+ }
1054
+
1055
+ // by calls to these methods by a Babel plugin.
1056
+ //
1057
+ // In PROD (or in packages without access to React internals),
1058
+ // they are left as they are instead.
1059
+
1060
+ function warn(format) {
1061
+ {
1062
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1063
+ args[_key - 1] = arguments[_key];
1064
+ }
1065
+ printWarning('warn', format, args);
1066
+ }
1067
+ }
1068
+ function error(format) {
1069
+ {
1070
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1071
+ args[_key2 - 1] = arguments[_key2];
1072
+ }
1073
+ printWarning('error', format, args);
1074
+ }
1075
+ }
1076
+ function printWarning(level, format, args) {
1077
+ // When changing this logic, you might want to also
1078
+ // update consoleWithStackDev.www.js as well.
1079
+ {
1080
+ var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
1081
+ if (!hasExistingStack) {
1082
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1083
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
1084
+ if (stack !== '') {
1085
+ format += '%s';
1086
+ args = args.concat([stack]);
1087
+ }
1088
+ }
1089
+ var argsWithFormat = args.map(function (item) {
1090
+ return '' + item;
1091
+ }); // Careful: RN currently depends on this prefix
1092
+
1093
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
1094
+ // breaks IE9: https://github.com/facebook/react/issues/13610
1095
+ // eslint-disable-next-line react-internal/no-production-logging
1096
+
1097
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
1098
+ try {
1099
+ // --- Welcome to debugging React ---
1100
+ // This error was thrown as a convenience so that you can use this stack
1101
+ // to find the callsite that caused this warning to fire.
1102
+ var argIndex = 0;
1103
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
1104
+ return args[argIndex++];
1105
+ });
1106
+ throw new Error(message);
1107
+ } catch (x) {}
1108
+ }
1109
+ }
1110
+ var didWarnStateUpdateForUnmountedComponent = {};
1111
+ function warnNoop(publicInstance, callerName) {
1112
+ {
1113
+ var _constructor = publicInstance.constructor;
1114
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
1115
+ var warningKey = componentName + "." + callerName;
1116
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
1117
+ return;
1118
+ }
1119
+ 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);
1120
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
1121
+ }
1122
+ }
1123
+ /**
1124
+ * This is the abstract API for an update queue.
1125
+ */
1126
+
1127
+ var ReactNoopUpdateQueue = {
1128
+ /**
1129
+ * Checks whether or not this composite component is mounted.
1130
+ * @param {ReactClass} publicInstance The instance we want to test.
1131
+ * @return {boolean} True if mounted, false otherwise.
1132
+ * @protected
1133
+ * @final
1134
+ */
1135
+ isMounted: function isMounted(publicInstance) {
1136
+ return false;
1137
+ },
1138
+ /**
1139
+ * Forces an update. This should only be invoked when it is known with
1140
+ * certainty that we are **not** in a DOM transaction.
1141
+ *
1142
+ * You may want to call this when you know that some deeper aspect of the
1143
+ * component's state has changed but `setState` was not called.
1144
+ *
1145
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
1146
+ * `componentWillUpdate` and `componentDidUpdate`.
1147
+ *
1148
+ * @param {ReactClass} publicInstance The instance that should rerender.
1149
+ * @param {?function} callback Called after component is updated.
1150
+ * @param {?string} callerName name of the calling function in the public API.
1151
+ * @internal
1152
+ */
1153
+ enqueueForceUpdate: function enqueueForceUpdate(publicInstance, callback, callerName) {
1154
+ warnNoop(publicInstance, 'forceUpdate');
1155
+ },
1156
+ /**
1157
+ * Replaces all of the state. Always use this or `setState` to mutate state.
1158
+ * You should treat `this.state` as immutable.
1159
+ *
1160
+ * There is no guarantee that `this.state` will be immediately updated, so
1161
+ * accessing `this.state` after calling this method may return the old value.
1162
+ *
1163
+ * @param {ReactClass} publicInstance The instance that should rerender.
1164
+ * @param {object} completeState Next state.
1165
+ * @param {?function} callback Called after component is updated.
1166
+ * @param {?string} callerName name of the calling function in the public API.
1167
+ * @internal
1168
+ */
1169
+ enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState, callback, callerName) {
1170
+ warnNoop(publicInstance, 'replaceState');
1171
+ },
1172
+ /**
1173
+ * Sets a subset of the state. This only exists because _pendingState is
1174
+ * internal. This provides a merging strategy that is not available to deep
1175
+ * properties which is confusing. TODO: Expose pendingState or don't use it
1176
+ * during the merge.
1177
+ *
1178
+ * @param {ReactClass} publicInstance The instance that should rerender.
1179
+ * @param {object} partialState Next partial state to be merged with state.
1180
+ * @param {?function} callback Called after component is updated.
1181
+ * @param {?string} Name of the calling function in the public API.
1182
+ * @internal
1183
+ */
1184
+ enqueueSetState: function enqueueSetState(publicInstance, partialState, callback, callerName) {
1185
+ warnNoop(publicInstance, 'setState');
1186
+ }
1187
+ };
1188
+ var emptyObject = {};
1189
+ {
1190
+ Object.freeze(emptyObject);
1191
+ }
1192
+ /**
1193
+ * Base class helpers for the updating state of a component.
1194
+ */
1195
+
1196
+ function Component(props, context, updater) {
1197
+ this.props = props;
1198
+ this.context = context; // If a component has string refs, we will assign a different object later.
1199
+
1200
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
1201
+ // renderer.
1202
+
1203
+ this.updater = updater || ReactNoopUpdateQueue;
1204
+ }
1205
+ Component.prototype.isReactComponent = {};
1206
+ /**
1207
+ * Sets a subset of the state. Always use this to mutate
1208
+ * state. You should treat `this.state` as immutable.
1209
+ *
1210
+ * There is no guarantee that `this.state` will be immediately updated, so
1211
+ * accessing `this.state` after calling this method may return the old value.
1212
+ *
1213
+ * There is no guarantee that calls to `setState` will run synchronously,
1214
+ * as they may eventually be batched together. You can provide an optional
1215
+ * callback that will be executed when the call to setState is actually
1216
+ * completed.
1217
+ *
1218
+ * When a function is provided to setState, it will be called at some point in
1219
+ * the future (not synchronously). It will be called with the up to date
1220
+ * component arguments (state, props, context). These values can be different
1221
+ * from this.* because your function may be called after receiveProps but before
1222
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
1223
+ * assigned to this.
1224
+ *
1225
+ * @param {object|function} partialState Next partial state or function to
1226
+ * produce next partial state to be merged with current state.
1227
+ * @param {?function} callback Called after state is updated.
1228
+ * @final
1229
+ * @protected
1230
+ */
1231
+
1232
+ Component.prototype.setState = function (partialState, callback) {
1233
+ if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
1234
+ {
1235
+ throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
1236
+ }
1237
+ }
1238
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
1239
+ };
1240
+ /**
1241
+ * Forces an update. This should only be invoked when it is known with
1242
+ * certainty that we are **not** in a DOM transaction.
1243
+ *
1244
+ * You may want to call this when you know that some deeper aspect of the
1245
+ * component's state has changed but `setState` was not called.
1246
+ *
1247
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
1248
+ * `componentWillUpdate` and `componentDidUpdate`.
1249
+ *
1250
+ * @param {?function} callback Called after update is complete.
1251
+ * @final
1252
+ * @protected
1253
+ */
1254
+
1255
+ Component.prototype.forceUpdate = function (callback) {
1256
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
1257
+ };
1258
+ /**
1259
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
1260
+ * we would like to deprecate them, we're not going to move them over to this
1261
+ * modern base class. Instead, we define a getter that warns if it's accessed.
1262
+ */
1263
+
1264
+ {
1265
+ var deprecatedAPIs = {
1266
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1267
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1268
+ };
1269
+ var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) {
1270
+ Object.defineProperty(Component.prototype, methodName, {
1271
+ get: function get() {
1272
+ warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
1273
+ return undefined;
1274
+ }
1275
+ });
1276
+ };
1277
+ for (var fnName in deprecatedAPIs) {
1278
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
1279
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1280
+ }
1281
+ }
1282
+ }
1283
+ function ComponentDummy() {}
1284
+ ComponentDummy.prototype = Component.prototype;
1285
+ /**
1286
+ * Convenience component with default shallow equality check for sCU.
1287
+ */
1288
+
1289
+ function PureComponent(props, context, updater) {
1290
+ this.props = props;
1291
+ this.context = context; // If a component has string refs, we will assign a different object later.
1292
+
1293
+ this.refs = emptyObject;
1294
+ this.updater = updater || ReactNoopUpdateQueue;
1295
+ }
1296
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
1297
+ pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
1298
+
1299
+ _assign(pureComponentPrototype, Component.prototype);
1300
+ pureComponentPrototype.isPureReactComponent = true;
1301
+
1302
+ // an immutable object with a single mutable value
1303
+ function createRef() {
1304
+ var refObject = {
1305
+ current: null
1306
+ };
1307
+ {
1308
+ Object.seal(refObject);
1309
+ }
1310
+ return refObject;
1311
+ }
1312
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1313
+ var RESERVED_PROPS = {
1314
+ key: true,
1315
+ ref: true,
1316
+ __self: true,
1317
+ __source: true
1318
+ };
1319
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
1320
+ {
1321
+ didWarnAboutStringRefs = {};
1322
+ }
1323
+ function hasValidRef(config) {
1324
+ {
1325
+ if (hasOwnProperty.call(config, 'ref')) {
1326
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
1327
+ if (getter && getter.isReactWarning) {
1328
+ return false;
1329
+ }
1330
+ }
1331
+ }
1332
+ return config.ref !== undefined;
1333
+ }
1334
+ function hasValidKey(config) {
1335
+ {
1336
+ if (hasOwnProperty.call(config, 'key')) {
1337
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
1338
+ if (getter && getter.isReactWarning) {
1339
+ return false;
1340
+ }
1341
+ }
1342
+ }
1343
+ return config.key !== undefined;
1344
+ }
1345
+ function defineKeyPropWarningGetter(props, displayName) {
1346
+ var warnAboutAccessingKey = function warnAboutAccessingKey() {
1347
+ {
1348
+ if (!specialPropKeyWarningShown) {
1349
+ specialPropKeyWarningShown = true;
1350
+ 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);
1351
+ }
1352
+ }
1353
+ };
1354
+ warnAboutAccessingKey.isReactWarning = true;
1355
+ Object.defineProperty(props, 'key', {
1356
+ get: warnAboutAccessingKey,
1357
+ configurable: true
1358
+ });
1359
+ }
1360
+ function defineRefPropWarningGetter(props, displayName) {
1361
+ var warnAboutAccessingRef = function warnAboutAccessingRef() {
1362
+ {
1363
+ if (!specialPropRefWarningShown) {
1364
+ specialPropRefWarningShown = true;
1365
+ 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);
1366
+ }
1367
+ }
1368
+ };
1369
+ warnAboutAccessingRef.isReactWarning = true;
1370
+ Object.defineProperty(props, 'ref', {
1371
+ get: warnAboutAccessingRef,
1372
+ configurable: true
1373
+ });
1374
+ }
1375
+ function warnIfStringRefCannotBeAutoConverted(config) {
1376
+ {
1377
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
1378
+ var componentName = getComponentName(ReactCurrentOwner.current.type);
1379
+ if (!didWarnAboutStringRefs[componentName]) {
1380
+ 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);
1381
+ didWarnAboutStringRefs[componentName] = true;
1382
+ }
1383
+ }
1384
+ }
1385
+ }
1386
+ /**
1387
+ * Factory method to create a new React element. This no longer adheres to
1388
+ * the class pattern, so do not use new to call it. Also, instanceof check
1389
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
1390
+ * if something is a React Element.
1391
+ *
1392
+ * @param {*} type
1393
+ * @param {*} props
1394
+ * @param {*} key
1395
+ * @param {string|object} ref
1396
+ * @param {*} owner
1397
+ * @param {*} self A *temporary* helper to detect places where `this` is
1398
+ * different from the `owner` when React.createElement is called, so that we
1399
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
1400
+ * functions, and as long as `this` and owner are the same, there will be no
1401
+ * change in behavior.
1402
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
1403
+ * indicating filename, line number, and/or other information.
1404
+ * @internal
1405
+ */
1406
+
1407
+ var ReactElement = function ReactElement(type, key, ref, self, source, owner, props) {
1408
+ var element = {
1409
+ // This tag allows us to uniquely identify this as a React Element
1410
+ $$typeof: REACT_ELEMENT_TYPE,
1411
+ // Built-in properties that belong on the element
1412
+ type: type,
1413
+ key: key,
1414
+ ref: ref,
1415
+ props: props,
1416
+ // Record the component responsible for creating this element.
1417
+ _owner: owner
1418
+ };
1419
+ {
1420
+ // The validation flag is currently mutative. We put it on
1421
+ // an external backing store so that we can freeze the whole object.
1422
+ // This can be replaced with a WeakMap once they are implemented in
1423
+ // commonly used development environments.
1424
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
1425
+ // the validation flag non-enumerable (where possible, which should
1426
+ // include every environment we run tests in), so the test framework
1427
+ // ignores it.
1428
+
1429
+ Object.defineProperty(element._store, 'validated', {
1430
+ configurable: false,
1431
+ enumerable: false,
1432
+ writable: true,
1433
+ value: false
1434
+ }); // self and source are DEV only properties.
1435
+
1436
+ Object.defineProperty(element, '_self', {
1437
+ configurable: false,
1438
+ enumerable: false,
1439
+ writable: false,
1440
+ value: self
1441
+ }); // Two elements created in two different places should be considered
1442
+ // equal for testing purposes and therefore we hide it from enumeration.
1443
+
1444
+ Object.defineProperty(element, '_source', {
1445
+ configurable: false,
1446
+ enumerable: false,
1447
+ writable: false,
1448
+ value: source
1449
+ });
1450
+ if (Object.freeze) {
1451
+ Object.freeze(element.props);
1452
+ Object.freeze(element);
1453
+ }
1454
+ }
1455
+ return element;
1456
+ };
1457
+ /**
1458
+ * Create and return a new ReactElement of the given type.
1459
+ * See https://reactjs.org/docs/react-api.html#createelement
1460
+ */
1461
+
1462
+ function createElement(type, config, children) {
1463
+ var propName; // Reserved names are extracted
1464
+
1465
+ var props = {};
1466
+ var key = null;
1467
+ var ref = null;
1468
+ var self = null;
1469
+ var source = null;
1470
+ if (config != null) {
1471
+ if (hasValidRef(config)) {
1472
+ ref = config.ref;
1473
+ {
1474
+ warnIfStringRefCannotBeAutoConverted(config);
1475
+ }
1476
+ }
1477
+ if (hasValidKey(config)) {
1478
+ key = '' + config.key;
1479
+ }
1480
+ self = config.__self === undefined ? null : config.__self;
1481
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
1482
+
1483
+ for (propName in config) {
1484
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1485
+ props[propName] = config[propName];
1486
+ }
1487
+ }
1488
+ } // Children can be more than one argument, and those are transferred onto
1489
+ // the newly allocated props object.
1490
+
1491
+ var childrenLength = arguments.length - 2;
1492
+ if (childrenLength === 1) {
1493
+ props.children = children;
1494
+ } else if (childrenLength > 1) {
1495
+ var childArray = Array(childrenLength);
1496
+ for (var i = 0; i < childrenLength; i++) {
1497
+ childArray[i] = arguments[i + 2];
1498
+ }
1499
+ {
1500
+ if (Object.freeze) {
1501
+ Object.freeze(childArray);
1502
+ }
1503
+ }
1504
+ props.children = childArray;
1505
+ } // Resolve default props
1506
+
1507
+ if (type && type.defaultProps) {
1508
+ var defaultProps = type.defaultProps;
1509
+ for (propName in defaultProps) {
1510
+ if (props[propName] === undefined) {
1511
+ props[propName] = defaultProps[propName];
1512
+ }
1513
+ }
1514
+ }
1515
+ {
1516
+ if (key || ref) {
1517
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1518
+ if (key) {
1519
+ defineKeyPropWarningGetter(props, displayName);
1520
+ }
1521
+ if (ref) {
1522
+ defineRefPropWarningGetter(props, displayName);
1523
+ }
1524
+ }
1525
+ }
1526
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1527
+ }
1528
+ function cloneAndReplaceKey(oldElement, newKey) {
1529
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
1530
+ return newElement;
1531
+ }
1532
+ /**
1533
+ * Clone and return a new ReactElement using element as the starting point.
1534
+ * See https://reactjs.org/docs/react-api.html#cloneelement
1535
+ */
1536
+
1537
+ function cloneElement(element, config, children) {
1538
+ if (!!(element === null || element === undefined)) {
1539
+ {
1540
+ throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
1541
+ }
1542
+ }
1543
+ var propName; // Original props are copied
1544
+
1545
+ var props = _assign({}, element.props); // Reserved names are extracted
1546
+
1547
+ var key = element.key;
1548
+ var ref = element.ref; // Self is preserved since the owner is preserved.
1549
+
1550
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
1551
+ // transpiler, and the original source is probably a better indicator of the
1552
+ // true owner.
1553
+
1554
+ var source = element._source; // Owner will be preserved, unless ref is overridden
1555
+
1556
+ var owner = element._owner;
1557
+ if (config != null) {
1558
+ if (hasValidRef(config)) {
1559
+ // Silently steal the ref from the parent.
1560
+ ref = config.ref;
1561
+ owner = ReactCurrentOwner.current;
1562
+ }
1563
+ if (hasValidKey(config)) {
1564
+ key = '' + config.key;
1565
+ } // Remaining properties override existing props
1566
+
1567
+ var defaultProps;
1568
+ if (element.type && element.type.defaultProps) {
1569
+ defaultProps = element.type.defaultProps;
1570
+ }
1571
+ for (propName in config) {
1572
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1573
+ if (config[propName] === undefined && defaultProps !== undefined) {
1574
+ // Resolve default props
1575
+ props[propName] = defaultProps[propName];
1576
+ } else {
1577
+ props[propName] = config[propName];
1578
+ }
1579
+ }
1580
+ }
1581
+ } // Children can be more than one argument, and those are transferred onto
1582
+ // the newly allocated props object.
1583
+
1584
+ var childrenLength = arguments.length - 2;
1585
+ if (childrenLength === 1) {
1586
+ props.children = children;
1587
+ } else if (childrenLength > 1) {
1588
+ var childArray = Array(childrenLength);
1589
+ for (var i = 0; i < childrenLength; i++) {
1590
+ childArray[i] = arguments[i + 2];
1591
+ }
1592
+ props.children = childArray;
1593
+ }
1594
+ return ReactElement(element.type, key, ref, self, source, owner, props);
1595
+ }
1596
+ /**
1597
+ * Verifies the object is a ReactElement.
1598
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
1599
+ * @param {?object} object
1600
+ * @return {boolean} True if `object` is a ReactElement.
1601
+ * @final
1602
+ */
1603
+
1604
+ function isValidElement(object) {
1605
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1606
+ }
1607
+ var SEPARATOR = '.';
1608
+ var SUBSEPARATOR = ':';
1609
+ /**
1610
+ * Escape and wrap key so it is safe to use as a reactid
1611
+ *
1612
+ * @param {string} key to be escaped.
1613
+ * @return {string} the escaped key.
1614
+ */
1615
+
1616
+ function escape(key) {
1617
+ var escapeRegex = /[=:]/g;
1618
+ var escaperLookup = {
1619
+ '=': '=0',
1620
+ ':': '=2'
1621
+ };
1622
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
1623
+ return escaperLookup[match];
1624
+ });
1625
+ return '$' + escapedString;
1626
+ }
1627
+ /**
1628
+ * TODO: Test that a single child and an array with one item have the same key
1629
+ * pattern.
1630
+ */
1631
+
1632
+ var didWarnAboutMaps = false;
1633
+ var userProvidedKeyEscapeRegex = /\/+/g;
1634
+ function escapeUserProvidedKey(text) {
1635
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
1636
+ }
1637
+ var POOL_SIZE = 10;
1638
+ var traverseContextPool = [];
1639
+ function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
1640
+ if (traverseContextPool.length) {
1641
+ var traverseContext = traverseContextPool.pop();
1642
+ traverseContext.result = mapResult;
1643
+ traverseContext.keyPrefix = keyPrefix;
1644
+ traverseContext.func = mapFunction;
1645
+ traverseContext.context = mapContext;
1646
+ traverseContext.count = 0;
1647
+ return traverseContext;
1648
+ } else {
1649
+ return {
1650
+ result: mapResult,
1651
+ keyPrefix: keyPrefix,
1652
+ func: mapFunction,
1653
+ context: mapContext,
1654
+ count: 0
1655
+ };
1656
+ }
1657
+ }
1658
+ function releaseTraverseContext(traverseContext) {
1659
+ traverseContext.result = null;
1660
+ traverseContext.keyPrefix = null;
1661
+ traverseContext.func = null;
1662
+ traverseContext.context = null;
1663
+ traverseContext.count = 0;
1664
+ if (traverseContextPool.length < POOL_SIZE) {
1665
+ traverseContextPool.push(traverseContext);
1666
+ }
1667
+ }
1668
+ /**
1669
+ * @param {?*} children Children tree container.
1670
+ * @param {!string} nameSoFar Name of the key path so far.
1671
+ * @param {!function} callback Callback to invoke with each child found.
1672
+ * @param {?*} traverseContext Used to pass information throughout the traversal
1673
+ * process.
1674
+ * @return {!number} The number of children in this subtree.
1675
+ */
1676
+
1677
+ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
1678
+ var type = typeof children;
1679
+ if (type === 'undefined' || type === 'boolean') {
1680
+ // All of the above are perceived as null.
1681
+ children = null;
1682
+ }
1683
+ var invokeCallback = false;
1684
+ if (children === null) {
1685
+ invokeCallback = true;
1686
+ } else {
1687
+ switch (type) {
1688
+ case 'string':
1689
+ case 'number':
1690
+ invokeCallback = true;
1691
+ break;
1692
+ case 'object':
1693
+ switch (children.$$typeof) {
1694
+ case REACT_ELEMENT_TYPE:
1695
+ case REACT_PORTAL_TYPE:
1696
+ invokeCallback = true;
1697
+ }
1698
+ }
1699
+ }
1700
+ if (invokeCallback) {
1701
+ callback(traverseContext, children,
1702
+ // If it's the only child, treat the name as if it was wrapped in an array
1703
+ // so that it's consistent if the number of children grows.
1704
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
1705
+ return 1;
1706
+ }
1707
+ var child;
1708
+ var nextName;
1709
+ var subtreeCount = 0; // Count of children found in the current subtree.
1710
+
1711
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1712
+ if (Array.isArray(children)) {
1713
+ for (var i = 0; i < children.length; i++) {
1714
+ child = children[i];
1715
+ nextName = nextNamePrefix + getComponentKey(child, i);
1716
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1717
+ }
1718
+ } else {
1719
+ var iteratorFn = getIteratorFn(children);
1720
+ if (typeof iteratorFn === 'function') {
1721
+ {
1722
+ // Warn about using Maps as children
1723
+ if (iteratorFn === children.entries) {
1724
+ if (!didWarnAboutMaps) {
1725
+ 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.');
1726
+ }
1727
+ didWarnAboutMaps = true;
1728
+ }
1729
+ }
1730
+ var iterator = iteratorFn.call(children);
1731
+ var step;
1732
+ var ii = 0;
1733
+ while (!(step = iterator.next()).done) {
1734
+ child = step.value;
1735
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
1736
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1737
+ }
1738
+ } else if (type === 'object') {
1739
+ var addendum = '';
1740
+ {
1741
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
1742
+ }
1743
+ var childrenString = '' + children;
1744
+ {
1745
+ {
1746
+ throw Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum);
1747
+ }
1748
+ }
1749
+ }
1750
+ }
1751
+ return subtreeCount;
1752
+ }
1753
+ /**
1754
+ * Traverses children that are typically specified as `props.children`, but
1755
+ * might also be specified through attributes:
1756
+ *
1757
+ * - `traverseAllChildren(this.props.children, ...)`
1758
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
1759
+ *
1760
+ * The `traverseContext` is an optional argument that is passed through the
1761
+ * entire traversal. It can be used to store accumulations or anything else that
1762
+ * the callback might find relevant.
1763
+ *
1764
+ * @param {?*} children Children tree object.
1765
+ * @param {!function} callback To invoke upon traversing each child.
1766
+ * @param {?*} traverseContext Context for traversal.
1767
+ * @return {!number} The number of children in this subtree.
1768
+ */
1769
+
1770
+ function traverseAllChildren(children, callback, traverseContext) {
1771
+ if (children == null) {
1772
+ return 0;
1773
+ }
1774
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
1775
+ }
1776
+ /**
1777
+ * Generate a key string that identifies a component within a set.
1778
+ *
1779
+ * @param {*} component A component that could contain a manual key.
1780
+ * @param {number} index Index that is used if a manual key is not provided.
1781
+ * @return {string}
1782
+ */
1783
+
1784
+ function getComponentKey(component, index) {
1785
+ // Do some typechecking here since we call this blindly. We want to ensure
1786
+ // that we don't block potential future ES APIs.
1787
+ if (typeof component === 'object' && component !== null && component.key != null) {
1788
+ // Explicit key
1789
+ return escape(component.key);
1790
+ } // Implicit key determined by the index in the set
1791
+
1792
+ return index.toString(36);
1793
+ }
1794
+ function forEachSingleChild(bookKeeping, child, name) {
1795
+ var func = bookKeeping.func,
1796
+ context = bookKeeping.context;
1797
+ func.call(context, child, bookKeeping.count++);
1798
+ }
1799
+ /**
1800
+ * Iterates through children that are typically specified as `props.children`.
1801
+ *
1802
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1803
+ *
1804
+ * The provided forEachFunc(child, index) will be called for each
1805
+ * leaf child.
1806
+ *
1807
+ * @param {?*} children Children tree container.
1808
+ * @param {function(*, int)} forEachFunc
1809
+ * @param {*} forEachContext Context for forEachContext.
1810
+ */
1811
+
1812
+ function forEachChildren(children, forEachFunc, forEachContext) {
1813
+ if (children == null) {
1814
+ return children;
1815
+ }
1816
+ var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
1817
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
1818
+ releaseTraverseContext(traverseContext);
1819
+ }
1820
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1821
+ var result = bookKeeping.result,
1822
+ keyPrefix = bookKeeping.keyPrefix,
1823
+ func = bookKeeping.func,
1824
+ context = bookKeeping.context;
1825
+ var mappedChild = func.call(context, child, bookKeeping.count++);
1826
+ if (Array.isArray(mappedChild)) {
1827
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
1828
+ return c;
1829
+ });
1830
+ } else if (mappedChild != null) {
1831
+ if (isValidElement(mappedChild)) {
1832
+ mappedChild = cloneAndReplaceKey(mappedChild,
1833
+ // Keep both the (mapped) and old keys if they differ, just as
1834
+ // traverseAllChildren used to do for objects as children
1835
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
1836
+ }
1837
+ result.push(mappedChild);
1838
+ }
1839
+ }
1840
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
1841
+ var escapedPrefix = '';
1842
+ if (prefix != null) {
1843
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
1844
+ }
1845
+ var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
1846
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
1847
+ releaseTraverseContext(traverseContext);
1848
+ }
1849
+ /**
1850
+ * Maps children that are typically specified as `props.children`.
1851
+ *
1852
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1853
+ *
1854
+ * The provided mapFunction(child, key, index) will be called for each
1855
+ * leaf child.
1856
+ *
1857
+ * @param {?*} children Children tree container.
1858
+ * @param {function(*, int)} func The map function.
1859
+ * @param {*} context Context for mapFunction.
1860
+ * @return {object} Object containing the ordered map of results.
1861
+ */
1862
+
1863
+ function mapChildren(children, func, context) {
1864
+ if (children == null) {
1865
+ return children;
1866
+ }
1867
+ var result = [];
1868
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
1869
+ return result;
1870
+ }
1871
+ /**
1872
+ * Count the number of children that are typically specified as
1873
+ * `props.children`.
1874
+ *
1875
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
1876
+ *
1877
+ * @param {?*} children Children tree container.
1878
+ * @return {number} The number of children.
1879
+ */
1880
+
1881
+ function countChildren(children) {
1882
+ return traverseAllChildren(children, function () {
1883
+ return null;
1884
+ }, null);
1885
+ }
1886
+ /**
1887
+ * Flatten a children object (typically specified as `props.children`) and
1888
+ * return an array with appropriately re-keyed children.
1889
+ *
1890
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1891
+ */
1892
+
1893
+ function toArray(children) {
1894
+ var result = [];
1895
+ mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
1896
+ return child;
1897
+ });
1898
+ return result;
1899
+ }
1900
+ /**
1901
+ * Returns the first child in a collection of children and verifies that there
1902
+ * is only one child in the collection.
1903
+ *
1904
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1905
+ *
1906
+ * The current implementation of this function assumes that a single child gets
1907
+ * passed without a wrapper, but the purpose of this helper function is to
1908
+ * abstract away the particular structure of children.
1909
+ *
1910
+ * @param {?object} children Child collection structure.
1911
+ * @return {ReactElement} The first and only `ReactElement` contained in the
1912
+ * structure.
1913
+ */
1914
+
1915
+ function onlyChild(children) {
1916
+ if (!isValidElement(children)) {
1917
+ {
1918
+ throw Error("React.Children.only expected to receive a single React element child.");
1919
+ }
1920
+ }
1921
+ return children;
1922
+ }
1923
+ function createContext(defaultValue, calculateChangedBits) {
1924
+ if (calculateChangedBits === undefined) {
1925
+ calculateChangedBits = null;
1926
+ } else {
1927
+ {
1928
+ if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
1929
+ error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
1930
+ }
1931
+ }
1932
+ }
1933
+ var context = {
1934
+ $$typeof: REACT_CONTEXT_TYPE,
1935
+ _calculateChangedBits: calculateChangedBits,
1936
+ // As a workaround to support multiple concurrent renderers, we categorize
1937
+ // some renderers as primary and others as secondary. We only expect
1938
+ // there to be two concurrent renderers at most: React Native (primary) and
1939
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
1940
+ // Secondary renderers store their context values on separate fields.
1941
+ _currentValue: defaultValue,
1942
+ _currentValue2: defaultValue,
1943
+ // Used to track how many concurrent renderers this context currently
1944
+ // supports within in a single renderer. Such as parallel server rendering.
1945
+ _threadCount: 0,
1946
+ // These are circular
1947
+ Provider: null,
1948
+ Consumer: null
1949
+ };
1950
+ context.Provider = {
1951
+ $$typeof: REACT_PROVIDER_TYPE,
1952
+ _context: context
1953
+ };
1954
+ var hasWarnedAboutUsingNestedContextConsumers = false;
1955
+ var hasWarnedAboutUsingConsumerProvider = false;
1956
+ {
1957
+ // A separate object, but proxies back to the original context object for
1958
+ // backwards compatibility. It has a different $$typeof, so we can properly
1959
+ // warn for the incorrect usage of Context as a Consumer.
1960
+ var Consumer = {
1961
+ $$typeof: REACT_CONTEXT_TYPE,
1962
+ _context: context,
1963
+ _calculateChangedBits: context._calculateChangedBits
1964
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
1965
+
1966
+ Object.defineProperties(Consumer, {
1967
+ Provider: {
1968
+ get: function get() {
1969
+ if (!hasWarnedAboutUsingConsumerProvider) {
1970
+ hasWarnedAboutUsingConsumerProvider = true;
1971
+ 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?');
1972
+ }
1973
+ return context.Provider;
1974
+ },
1975
+ set: function set(_Provider) {
1976
+ context.Provider = _Provider;
1977
+ }
1978
+ },
1979
+ _currentValue: {
1980
+ get: function get() {
1981
+ return context._currentValue;
1982
+ },
1983
+ set: function set(_currentValue) {
1984
+ context._currentValue = _currentValue;
1985
+ }
1986
+ },
1987
+ _currentValue2: {
1988
+ get: function get() {
1989
+ return context._currentValue2;
1990
+ },
1991
+ set: function set(_currentValue2) {
1992
+ context._currentValue2 = _currentValue2;
1993
+ }
1994
+ },
1995
+ _threadCount: {
1996
+ get: function get() {
1997
+ return context._threadCount;
1998
+ },
1999
+ set: function set(_threadCount) {
2000
+ context._threadCount = _threadCount;
2001
+ }
2002
+ },
2003
+ Consumer: {
2004
+ get: function get() {
2005
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
2006
+ hasWarnedAboutUsingNestedContextConsumers = true;
2007
+ 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?');
2008
+ }
2009
+ return context.Consumer;
2010
+ }
2011
+ }
2012
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
2013
+
2014
+ context.Consumer = Consumer;
2015
+ }
2016
+ {
2017
+ context._currentRenderer = null;
2018
+ context._currentRenderer2 = null;
2019
+ }
2020
+ return context;
2021
+ }
2022
+ function lazy(ctor) {
2023
+ var lazyType = {
2024
+ $$typeof: REACT_LAZY_TYPE,
2025
+ _ctor: ctor,
2026
+ // React uses these fields to store the result.
2027
+ _status: -1,
2028
+ _result: null
2029
+ };
2030
+ {
2031
+ // In production, this would just set it on the object.
2032
+ var defaultProps;
2033
+ var propTypes;
2034
+ Object.defineProperties(lazyType, {
2035
+ defaultProps: {
2036
+ configurable: true,
2037
+ get: function get() {
2038
+ return defaultProps;
2039
+ },
2040
+ set: function set(newDefaultProps) {
2041
+ 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.');
2042
+ defaultProps = newDefaultProps; // Match production behavior more closely:
2043
+
2044
+ Object.defineProperty(lazyType, 'defaultProps', {
2045
+ enumerable: true
2046
+ });
2047
+ }
2048
+ },
2049
+ propTypes: {
2050
+ configurable: true,
2051
+ get: function get() {
2052
+ return propTypes;
2053
+ },
2054
+ set: function set(newPropTypes) {
2055
+ 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.');
2056
+ propTypes = newPropTypes; // Match production behavior more closely:
2057
+
2058
+ Object.defineProperty(lazyType, 'propTypes', {
2059
+ enumerable: true
2060
+ });
2061
+ }
2062
+ }
2063
+ });
2064
+ }
2065
+ return lazyType;
2066
+ }
2067
+ function forwardRef(render) {
2068
+ {
2069
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
2070
+ error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
2071
+ } else if (typeof render !== 'function') {
2072
+ error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
2073
+ } else {
2074
+ if (render.length !== 0 && render.length !== 2) {
2075
+ 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.');
2076
+ }
2077
+ }
2078
+ if (render != null) {
2079
+ if (render.defaultProps != null || render.propTypes != null) {
2080
+ error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
2081
+ }
2082
+ }
2083
+ }
2084
+ return {
2085
+ $$typeof: REACT_FORWARD_REF_TYPE,
2086
+ render: render
2087
+ };
2088
+ }
2089
+ function isValidElementType(type) {
2090
+ return typeof type === 'string' || typeof type === 'function' ||
2091
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
2092
+ 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);
2093
+ }
2094
+ function memo(type, compare) {
2095
+ {
2096
+ if (!isValidElementType(type)) {
2097
+ error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
2098
+ }
2099
+ }
2100
+ return {
2101
+ $$typeof: REACT_MEMO_TYPE,
2102
+ type: type,
2103
+ compare: compare === undefined ? null : compare
2104
+ };
2105
+ }
2106
+ function resolveDispatcher() {
2107
+ var dispatcher = ReactCurrentDispatcher.current;
2108
+ if (!(dispatcher !== null)) {
2109
+ {
2110
+ 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.");
2111
+ }
2112
+ }
2113
+ return dispatcher;
2114
+ }
2115
+ function useContext(Context, unstable_observedBits) {
2116
+ var dispatcher = resolveDispatcher();
2117
+ {
2118
+ if (unstable_observedBits !== undefined) {
2119
+ 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' : '');
2120
+ } // TODO: add a more generic warning for invalid values.
2121
+
2122
+ if (Context._context !== undefined) {
2123
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
2124
+ // and nobody should be using this in existing code.
2125
+
2126
+ if (realContext.Consumer === Context) {
2127
+ 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?');
2128
+ } else if (realContext.Provider === Context) {
2129
+ error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
2130
+ }
2131
+ }
2132
+ }
2133
+ return dispatcher.useContext(Context, unstable_observedBits);
2134
+ }
2135
+ function useState(initialState) {
2136
+ var dispatcher = resolveDispatcher();
2137
+ return dispatcher.useState(initialState);
2138
+ }
2139
+ function useReducer(reducer, initialArg, init) {
2140
+ var dispatcher = resolveDispatcher();
2141
+ return dispatcher.useReducer(reducer, initialArg, init);
2142
+ }
2143
+ function useRef(initialValue) {
2144
+ var dispatcher = resolveDispatcher();
2145
+ return dispatcher.useRef(initialValue);
2146
+ }
2147
+ function useEffect(create, deps) {
2148
+ var dispatcher = resolveDispatcher();
2149
+ return dispatcher.useEffect(create, deps);
2150
+ }
2151
+ function useLayoutEffect(create, deps) {
2152
+ var dispatcher = resolveDispatcher();
2153
+ return dispatcher.useLayoutEffect(create, deps);
2154
+ }
2155
+ function useCallback(callback, deps) {
2156
+ var dispatcher = resolveDispatcher();
2157
+ return dispatcher.useCallback(callback, deps);
2158
+ }
2159
+ function useMemo(create, deps) {
2160
+ var dispatcher = resolveDispatcher();
2161
+ return dispatcher.useMemo(create, deps);
2162
+ }
2163
+ function useImperativeHandle(ref, create, deps) {
2164
+ var dispatcher = resolveDispatcher();
2165
+ return dispatcher.useImperativeHandle(ref, create, deps);
2166
+ }
2167
+ function useDebugValue(value, formatterFn) {
2168
+ {
2169
+ var dispatcher = resolveDispatcher();
2170
+ return dispatcher.useDebugValue(value, formatterFn);
2171
+ }
2172
+ }
2173
+ var propTypesMisspellWarningShown;
2174
+ {
2175
+ propTypesMisspellWarningShown = false;
2176
+ }
2177
+ function getDeclarationErrorAddendum() {
2178
+ if (ReactCurrentOwner.current) {
2179
+ var name = getComponentName(ReactCurrentOwner.current.type);
2180
+ if (name) {
2181
+ return '\n\nCheck the render method of `' + name + '`.';
2182
+ }
2183
+ }
2184
+ return '';
2185
+ }
2186
+ function getSourceInfoErrorAddendum(source) {
2187
+ if (source !== undefined) {
2188
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2189
+ var lineNumber = source.lineNumber;
2190
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2191
+ }
2192
+ return '';
2193
+ }
2194
+ function getSourceInfoErrorAddendumForProps(elementProps) {
2195
+ if (elementProps !== null && elementProps !== undefined) {
2196
+ return getSourceInfoErrorAddendum(elementProps.__source);
2197
+ }
2198
+ return '';
2199
+ }
2200
+ /**
2201
+ * Warn if there's no key explicitly set on dynamic arrays of children or
2202
+ * object keys are not valid. This allows us to keep track of children between
2203
+ * updates.
2204
+ */
2205
+
2206
+ var ownerHasKeyUseWarning = {};
2207
+ function getCurrentComponentErrorInfo(parentType) {
2208
+ var info = getDeclarationErrorAddendum();
2209
+ if (!info) {
2210
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2211
+ if (parentName) {
2212
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2213
+ }
2214
+ }
2215
+ return info;
2216
+ }
2217
+ /**
2218
+ * Warn if the element doesn't have an explicit key assigned to it.
2219
+ * This element is in an array. The array could grow and shrink or be
2220
+ * reordered. All children that haven't already been validated are required to
2221
+ * have a "key" property assigned to it. Error statuses are cached so a warning
2222
+ * will only be shown once.
2223
+ *
2224
+ * @internal
2225
+ * @param {ReactElement} element Element that requires a key.
2226
+ * @param {*} parentType element's parent's type.
2227
+ */
2228
+
2229
+ function validateExplicitKey(element, parentType) {
2230
+ if (!element._store || element._store.validated || element.key != null) {
2231
+ return;
2232
+ }
2233
+ element._store.validated = true;
2234
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2235
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2236
+ return;
2237
+ }
2238
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
2239
+ // property, it may be the creator of the child that's responsible for
2240
+ // assigning it a key.
2241
+
2242
+ var childOwner = '';
2243
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2244
+ // Give the component that originally created this child.
2245
+ childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
2246
+ }
2247
+ setCurrentlyValidatingElement(element);
2248
+ {
2249
+ 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);
2250
+ }
2251
+ setCurrentlyValidatingElement(null);
2252
+ }
2253
+ /**
2254
+ * Ensure that every element either is passed in a static location, in an
2255
+ * array with an explicit keys property defined, or in an object literal
2256
+ * with valid key property.
2257
+ *
2258
+ * @internal
2259
+ * @param {ReactNode} node Statically passed child of any type.
2260
+ * @param {*} parentType node's parent's type.
2261
+ */
2262
+
2263
+ function validateChildKeys(node, parentType) {
2264
+ if (typeof node !== 'object') {
2265
+ return;
2266
+ }
2267
+ if (Array.isArray(node)) {
2268
+ for (var i = 0; i < node.length; i++) {
2269
+ var child = node[i];
2270
+ if (isValidElement(child)) {
2271
+ validateExplicitKey(child, parentType);
2272
+ }
2273
+ }
2274
+ } else if (isValidElement(node)) {
2275
+ // This element was passed in a valid location.
2276
+ if (node._store) {
2277
+ node._store.validated = true;
2278
+ }
2279
+ } else if (node) {
2280
+ var iteratorFn = getIteratorFn(node);
2281
+ if (typeof iteratorFn === 'function') {
2282
+ // Entry iterators used to provide implicit keys,
2283
+ // but now we print a separate warning for them later.
2284
+ if (iteratorFn !== node.entries) {
2285
+ var iterator = iteratorFn.call(node);
2286
+ var step;
2287
+ while (!(step = iterator.next()).done) {
2288
+ if (isValidElement(step.value)) {
2289
+ validateExplicitKey(step.value, parentType);
2290
+ }
2291
+ }
2292
+ }
2293
+ }
2294
+ }
2295
+ }
2296
+ /**
2297
+ * Given an element, validate that its props follow the propTypes definition,
2298
+ * provided by the type.
2299
+ *
2300
+ * @param {ReactElement} element
2301
+ */
2302
+
2303
+ function validatePropTypes(element) {
2304
+ {
2305
+ var type = element.type;
2306
+ if (type === null || type === undefined || typeof type === 'string') {
2307
+ return;
2308
+ }
2309
+ var name = getComponentName(type);
2310
+ var propTypes;
2311
+ if (typeof type === 'function') {
2312
+ propTypes = type.propTypes;
2313
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
2314
+ // Note: Memo only checks outer props here.
2315
+ // Inner props are checked in the reconciler.
2316
+ type.$$typeof === REACT_MEMO_TYPE)) {
2317
+ propTypes = type.propTypes;
2318
+ } else {
2319
+ return;
2320
+ }
2321
+ if (propTypes) {
2322
+ setCurrentlyValidatingElement(element);
2323
+ checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
2324
+ setCurrentlyValidatingElement(null);
2325
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2326
+ propTypesMisspellWarningShown = true;
2327
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
2328
+ }
2329
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
2330
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
2331
+ }
2332
+ }
2333
+ }
2334
+ /**
2335
+ * Given a fragment, validate that it can only be provided with fragment props
2336
+ * @param {ReactElement} fragment
2337
+ */
2338
+
2339
+ function validateFragmentProps(fragment) {
2340
+ {
2341
+ setCurrentlyValidatingElement(fragment);
2342
+ var keys = Object.keys(fragment.props);
2343
+ for (var i = 0; i < keys.length; i++) {
2344
+ var key = keys[i];
2345
+ if (key !== 'children' && key !== 'key') {
2346
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
2347
+ break;
2348
+ }
2349
+ }
2350
+ if (fragment.ref !== null) {
2351
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
2352
+ }
2353
+ setCurrentlyValidatingElement(null);
2354
+ }
2355
+ }
2356
+ function createElementWithValidation(type, props, children) {
2357
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
2358
+ // succeed and there will likely be errors in render.
2359
+
2360
+ if (!validType) {
2361
+ var info = '';
2362
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2363
+ 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.";
2364
+ }
2365
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
2366
+ if (sourceInfo) {
2367
+ info += sourceInfo;
2368
+ } else {
2369
+ info += getDeclarationErrorAddendum();
2370
+ }
2371
+ var typeString;
2372
+ if (type === null) {
2373
+ typeString = 'null';
2374
+ } else if (Array.isArray(type)) {
2375
+ typeString = 'array';
2376
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
2377
+ typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
2378
+ info = ' Did you accidentally export a JSX literal instead of a component?';
2379
+ } else {
2380
+ typeString = typeof type;
2381
+ }
2382
+ {
2383
+ 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);
2384
+ }
2385
+ }
2386
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
2387
+ // TODO: Drop this when these are no longer allowed as the type argument.
2388
+
2389
+ if (element == null) {
2390
+ return element;
2391
+ } // Skip key warning if the type isn't valid since our key validation logic
2392
+ // doesn't expect a non-string/function type and can throw confusing errors.
2393
+ // We don't want exception behavior to differ between dev and prod.
2394
+ // (Rendering will throw with a helpful message and as soon as the type is
2395
+ // fixed, the key warnings will appear.)
2396
+
2397
+ if (validType) {
2398
+ for (var i = 2; i < arguments.length; i++) {
2399
+ validateChildKeys(arguments[i], type);
2400
+ }
2401
+ }
2402
+ if (type === REACT_FRAGMENT_TYPE) {
2403
+ validateFragmentProps(element);
2404
+ } else {
2405
+ validatePropTypes(element);
2406
+ }
2407
+ return element;
2408
+ }
2409
+ var didWarnAboutDeprecatedCreateFactory = false;
2410
+ function createFactoryWithValidation(type) {
2411
+ var validatedFactory = createElementWithValidation.bind(null, type);
2412
+ validatedFactory.type = type;
2413
+ {
2414
+ if (!didWarnAboutDeprecatedCreateFactory) {
2415
+ didWarnAboutDeprecatedCreateFactory = true;
2416
+ warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
2417
+ } // Legacy hook: remove it
2418
+
2419
+ Object.defineProperty(validatedFactory, 'type', {
2420
+ enumerable: false,
2421
+ get: function get() {
2422
+ warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
2423
+ Object.defineProperty(this, 'type', {
2424
+ value: type
2425
+ });
2426
+ return type;
2427
+ }
2428
+ });
2429
+ }
2430
+ return validatedFactory;
2431
+ }
2432
+ function cloneElementWithValidation(element, props, children) {
2433
+ var newElement = cloneElement.apply(this, arguments);
2434
+ for (var i = 2; i < arguments.length; i++) {
2435
+ validateChildKeys(arguments[i], newElement.type);
2436
+ }
2437
+ validatePropTypes(newElement);
2438
+ return newElement;
2439
+ }
2440
+ {
2441
+ try {
2442
+ var frozenObject = Object.freeze({});
2443
+ var testMap = new Map([[frozenObject, null]]);
2444
+ var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
2445
+ // https://github.com/rollup/rollup/issues/1771
2446
+ // TODO: we can remove these if Rollup fixes the bug.
2447
+
2448
+ testMap.set(0, 0);
2449
+ testSet.add(0);
2450
+ } catch (e) {}
2451
+ }
2452
+ var createElement$1 = createElementWithValidation;
2453
+ var cloneElement$1 = cloneElementWithValidation;
2454
+ var createFactory = createFactoryWithValidation;
2455
+ var Children = {
2456
+ map: mapChildren,
2457
+ forEach: forEachChildren,
2458
+ count: countChildren,
2459
+ toArray: toArray,
2460
+ only: onlyChild
2461
+ };
2462
+ react_development.Children = Children;
2463
+ react_development.Component = Component;
2464
+ react_development.Fragment = REACT_FRAGMENT_TYPE;
2465
+ react_development.Profiler = REACT_PROFILER_TYPE;
2466
+ react_development.PureComponent = PureComponent;
2467
+ react_development.StrictMode = REACT_STRICT_MODE_TYPE;
2468
+ react_development.Suspense = REACT_SUSPENSE_TYPE;
2469
+ react_development.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2470
+ react_development.cloneElement = cloneElement$1;
2471
+ react_development.createContext = createContext;
2472
+ react_development.createElement = createElement$1;
2473
+ react_development.createFactory = createFactory;
2474
+ react_development.createRef = createRef;
2475
+ react_development.forwardRef = forwardRef;
2476
+ react_development.isValidElement = isValidElement;
2477
+ react_development.lazy = lazy;
2478
+ react_development.memo = memo;
2479
+ react_development.useCallback = useCallback;
2480
+ react_development.useContext = useContext;
2481
+ react_development.useDebugValue = useDebugValue;
2482
+ react_development.useEffect = useEffect;
2483
+ react_development.useImperativeHandle = useImperativeHandle;
2484
+ react_development.useLayoutEffect = useLayoutEffect;
2485
+ react_development.useMemo = useMemo;
2486
+ react_development.useReducer = useReducer;
2487
+ react_development.useRef = useRef;
2488
+ react_development.useState = useState;
2489
+ react_development.version = ReactVersion;
2490
+ })();
2491
+ }
2492
+ return react_development;
2493
+ }
2494
+
2495
+ var hasRequiredReact;
2496
+
2497
+ function requireReact () {
2498
+ if (hasRequiredReact) return react.exports;
2499
+ hasRequiredReact = 1;
2500
+
2501
+ if (process.env.NODE_ENV === 'production') {
2502
+ react.exports = requireReact_production_min();
2503
+ } else {
2504
+ react.exports = requireReact_development();
2505
+ }
2506
+ return react.exports;
2507
+ }
2508
+
2509
+ var reactExports = requireReact();
2510
+ var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
2511
+
2512
+ var _excluded = ["data"];
2513
+ function createVue2Component(vueObj) {
2514
+ if (!vueObj || typeof vueObj !== 'function' && typeof vueObj !== 'object') {
2515
+ return;
2516
+ }
2517
+ var VueFactory = /*#__PURE__*/function (_React$Component) {
2518
+ // 指定 contextType 读取当前的 scope context。
2519
+ // React 会往上找到最近的 scope Provider,然后使用它的值。
2520
+ // static contextType = ScopedContext; // 待支持
2521
+ function VueFactory(props, context) {
2522
+ var _this;
2523
+ _this = _React$Component.call(this, props) || this;
2524
+ _this.domRef = void 0;
2525
+ _this.vm = void 0;
2526
+ _this.isUnmount = void 0;
2527
+ _this.domRef = /*#__PURE__*/React.createRef();
2528
+ _this.isUnmount = false;
2529
+ /*
2530
+ // 待支持(自定义组件支持事件动作)
2531
+ const scoped = context;
2532
+ scoped.registerComponent(this);
2533
+ */
2534
+ _this.resolveNeoProps = _this.resolveNeoProps.bind(_this);
2535
+ return _this;
2536
+ }
2537
+ _inheritsLoose(VueFactory, _React$Component);
2538
+ var _proto = VueFactory.prototype;
2539
+ _proto.componentDidMount = function componentDidMount() {
2540
+ var _this2 = this;
2541
+ var _this$resolveNeoProps = this.resolveNeoProps(),
2542
+ neoData = _this$resolveNeoProps.neoData,
2543
+ neoMSTData = _this$resolveNeoProps.neoMSTData,
2544
+ neoFunc = _this$resolveNeoProps.neoFunc;
2545
+ var _vueObj = vueObj = typeof vueObj === 'function' ? new vueObj() : vueObj,
2546
+ data = _vueObj.data,
2547
+ rest = _objectWithoutPropertiesLoose(_vueObj, _excluded);
2548
+ var vueData = typeof data === 'function' ? data() : data;
2549
+ var curVueData = extendObject(vueData, neoData);
2550
+ // 传入的Vue属性
2551
+ this.vm = new Vue(_extends({}, rest, {
2552
+ data: function data() {
2553
+ return curVueData;
2554
+ },
2555
+ props: extendObject(neoFunc, _extends({}, rest.props || {}, neoMSTData))
2556
+ }));
2557
+ Object.keys(neoFunc).forEach(function (key) {
2558
+ _this2.vm.$props[key] = neoFunc[key];
2559
+ });
2560
+ if (this.domRef.current) {
2561
+ this.domRef.current.appendChild(this.vm.$mount().$el);
2562
+ }
2563
+ };
2564
+ _proto.componentDidUpdate = function componentDidUpdate() {
2565
+ var _this3 = this;
2566
+ if (!this.isUnmount) {
2567
+ var _this$resolveNeoProps2 = this.resolveNeoProps(),
2568
+ neoData = _this$resolveNeoProps2.neoData;
2569
+ if (this.vm) {
2570
+ Object.keys(neoData).forEach(function (key) {
2571
+ _this3.vm[key] = neoData[key];
2572
+ });
2573
+ this.vm.$forceUpdate();
2574
+ }
2575
+ }
2576
+ };
2577
+ _proto.componentWillUnmount = function componentWillUnmount() {
2578
+ this.isUnmount = true;
2579
+ /*
2580
+ // 待支持
2581
+ const scoped = this.context;
2582
+ scoped.unRegisterComponent(this);
2583
+ */
2584
+ if (this.vm) {
2585
+ this.vm.$destroy();
2586
+ }
2587
+ };
2588
+ _proto.resolveNeoProps = function resolveNeoProps() {
2589
+ var _this4 = this;
2590
+ var neoFunc = {};
2591
+ var neoData = {};
2592
+ var neoMSTData = {};
2593
+ Object.keys(this.props).forEach(function (key) {
2594
+ var value = _this4.props[key];
2595
+ if (typeof value === 'function') {
2596
+ neoFunc[key] = value;
2597
+ } else if (isProxy(value)) {
2598
+ neoMSTData[key] = value;
2599
+ } else {
2600
+ neoData[key] = value;
2601
+ }
2602
+ });
2603
+ return {
2604
+ neoData: neoData,
2605
+ neoMSTData: neoMSTData,
2606
+ neoFunc: neoFunc
2607
+ };
2608
+ }
2609
+ /**
2610
+ * reload动作处理
2611
+ */;
2612
+ _proto.reload = function reload() {
2613
+ if (this.vm && this.vm.reload) {
2614
+ this.vm.reload();
2615
+ } else {
2616
+ console.warn('自定义组件暂不支持reload动作。');
2617
+ }
2618
+ }
2619
+ /**
2620
+ * 事件动作处理:
2621
+ * 在这里设置自定义组件对外暴露的动作,其他组件可以通过组件动作触发自定义组件的对应动作
2622
+ */;
2623
+ _proto.doAction = function doAction(action, args) {
2624
+ if (this.vm && this.vm.doAction) {
2625
+ this.vm.doAction(action, args);
2626
+ } else {
2627
+ console.warn('自定义组件中不存在 doAction。');
2628
+ }
2629
+ };
2630
+ _proto.render = function render() {
2631
+ return /*#__PURE__*/React.createElement("div", {
2632
+ ref: this.domRef
2633
+ });
2634
+ };
2635
+ return VueFactory;
2636
+ }(React.Component);
2637
+ return VueFactory;
2638
+ }
2639
+ // 自动识别并转换 vue 组件
2640
+ function autoConvertVueComponent(component) {
2641
+ if (isVueComponent(component)) {
2642
+ return createVue2Component(component);
2643
+ }
2644
+ return component;
2645
+ }
2646
+
2647
+ /**
2648
+ * registerNeoCmp: 根据type类型注册 neo 自定义组件
2649
+ *【方法参数说明】
2650
+ * newRenderer: 自定义组件,
2651
+ * rendererOption: {
2652
+ * cmpType: 自定义组件的type类型,比如:input、text-area、select-user等
2653
+ * usage?: neo普通渲染器、neo表单渲染器,默认值为 neo普通渲染器
2654
+ * weight?: 自定义组件权重
2655
+ * framework?: 技术栈类型,默认为 react 技术栈,可选技术栈:vue2、react
2656
+ * }
2657
+ * 备注:暂不支持 vue3.0 技术栈
2658
+ */
2659
+ function registerNeoCmp(newRenderer, rendererOption) {
2660
+ if (!newRenderer) {
2661
+ return;
2662
+ }
2663
+ // 1.默认注册配置参数
2664
+ var curRendererOption = {
2665
+ cmpType: '',
2666
+ usage: Usage.renderer,
2667
+ weight: 0
2668
+ // framework: Framework.react, // 默认为 react 技术栈
2669
+ };
2670
+ // 2.获取相关配置参数
2671
+ if (rendererOption && isString(rendererOption)) {
2672
+ // rendererOption为字符串则将其设置为type
2673
+ Object.assign(curRendererOption, {
2674
+ cmpType: rendererOption
2675
+ });
2676
+ } else {
2677
+ Object.assign(curRendererOption, rendererOption);
2678
+ }
2679
+ if (curRendererOption && !curRendererOption.cmpType) {
2680
+ console.error(consoleTag + " / registerNeoCmp: \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25\uFF0CcmpType \u4E0D\u80FD\u4E3A\u7A7A\u3002");
2681
+ } else {
2682
+ // 根据组件结构自动识别组件技术栈
2683
+ curRendererOption.framework = curRendererOption.framework ? getFramework(curRendererOption.framework) : getFrameworkByCmp(newRenderer);
2684
+ // 修正usage数值
2685
+ curRendererOption.usage = getUsage(curRendererOption.usage);
2686
+ // 当前支持注册的渲染器类型
2687
+ var registerMap = {
2688
+ renderer: function renderer() {},
2689
+ formitem: function formitem() {} // FormItem
2690
+ };
2691
+ // 当前支持的技术栈类型
2692
+ var resolverMap = {
2693
+ react: function react(i) {
2694
+ return i;
2695
+ },
2696
+ vue2: createVue2Component,
2697
+ vue3: createVue2Component // createVue3Component,
2698
+ };
2699
+ // 支持多技术栈
2700
+ var curRendererComponent = resolverMap[curRendererOption.framework](newRenderer);
2701
+ // 注册neo渲染器
2702
+ if (!registerMap[curRendererOption.usage]) {
2703
+ console.error(consoleTag + " / registerNeoCmp: \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25\uFF0C\u6682\u4E0D\u652F\u6301 " + curRendererOption.usage + " \u7EC4\u4EF6\u7C7B\u578B\u3002");
2704
+ } else {
2705
+ // 通过 postMessage 告知 neo 注册一个新的渲染器
2706
+ if (window && window.postMessage) {
2707
+ var newComponentType = AddNeoCustomCmp(curRendererOption.cmpType, {
2708
+ cmpType: curRendererOption.cmpType,
2709
+ weight: curRendererOption.weight,
2710
+ usage: curRendererOption.usage,
2711
+ framework: curRendererOption.framework,
2712
+ component: curRendererComponent,
2713
+ config: curRendererOption
2714
+ });
2715
+ if (newComponentType) {
2716
+ console.info(consoleTag + "\u89E6\u53D1\u6CE8\u518C\u81EA\u5B9A\u4E49\u7EC4\u4EF6(" + newComponentType + ")\u4E8B\u4EF6");
2717
+ window.postMessage({
2718
+ type: 'neo-cmp-register-event',
2719
+ eventMsg: consoleTag + "\u6CE8\u518C\u4E00\u4E2A\u81EA\u5B9A\u4E49\u7EC4\u4EF6",
2720
+ neoRenderer: {
2721
+ cmpType: newComponentType,
2722
+ weight: curRendererOption.weight,
2723
+ usage: curRendererOption.usage,
2724
+ config: curRendererOption
2725
+ }
2726
+ }, '*');
2727
+ }
2728
+ }
2729
+ }
2730
+ }
2731
+ }
2732
+ function AddNeoCustomCmp(componentType, rendererData) {
2733
+ if (window && !window.NeoCustomCmps) {
2734
+ window.NeoCustomCmps = {};
2735
+ }
2736
+ if (!window.NeoCustomCmps[componentType]) {
2737
+ window.NeoCustomCmps[componentType] = rendererData;
2738
+ return componentType;
2739
+ } else {
2740
+ console.error(consoleTag + " / registerNeoCmp: \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6CE8\u518C\u5931\u8D25\uFF0C\u5DF2\u5B58\u5728\u91CD\u540D\u6E32\u67D3\u5668(" + componentType + ")\u3002");
2741
+ }
2742
+ return null;
2743
+ }
2744
+
2745
+ export { autoConvertVueComponent, createVue2Component, registerNeoCmp, registerNeoEditorModel };