@easy-editor/react-renderer 0.0.4 → 0.0.5

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.
@@ -1,7 +1,7 @@
1
1
  import { observer } from 'mobx-react';
2
- import require$$0, { createContext, useContext, useMemo, Component, forwardRef, createElement, PureComponent } from 'react';
3
- import { isSetterConfig, createLogger, isJSExpression, TRANSFORM_STAGE, DESIGNER_EVENT, isJSFunction, logger as logger$1 } from '@easy-editor/core';
4
- import { debounce, isEmpty, forEach } from 'lodash-es';
2
+ import { createContext, useContext, useMemo, Component, forwardRef, createElement, PureComponent } from 'react';
3
+ import { isSetterConfig, createLogger, isJSExpression, DESIGNER_EVENT, TRANSFORM_STAGE, isJSFunction, logger as logger$1 } from '@easy-editor/core';
4
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
 
6
6
  const SettingRendererContext = /*#__PURE__*/createContext({});
7
7
  const useSettingRendererContext = () => {
@@ -13,964 +13,6 @@ const useSettingRendererContext = () => {
13
13
  return {};
14
14
  };
15
15
 
16
- var jsxRuntime = {exports: {}};
17
-
18
- var reactJsxRuntime_production_min = {};
19
-
20
- /**
21
- * @license React
22
- * react-jsx-runtime.production.min.js
23
- *
24
- * Copyright (c) Facebook, Inc. and its affiliates.
25
- *
26
- * This source code is licensed under the MIT license found in the
27
- * LICENSE file in the root directory of this source tree.
28
- */
29
- var hasRequiredReactJsxRuntime_production_min;
30
- function requireReactJsxRuntime_production_min() {
31
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
32
- hasRequiredReactJsxRuntime_production_min = 1;
33
- var f = require$$0,
34
- k = Symbol.for("react.element"),
35
- l = Symbol.for("react.fragment"),
36
- m = Object.prototype.hasOwnProperty,
37
- n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
38
- p = {
39
- key: !0,
40
- ref: !0,
41
- __self: !0,
42
- __source: !0
43
- };
44
- function q(c, a, g) {
45
- var b,
46
- d = {},
47
- e = null,
48
- h = null;
49
- void 0 !== g && (e = "" + g);
50
- void 0 !== a.key && (e = "" + a.key);
51
- void 0 !== a.ref && (h = a.ref);
52
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
53
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
54
- return {
55
- $$typeof: k,
56
- type: c,
57
- key: e,
58
- ref: h,
59
- props: d,
60
- _owner: n.current
61
- };
62
- }
63
- reactJsxRuntime_production_min.Fragment = l;
64
- reactJsxRuntime_production_min.jsx = q;
65
- reactJsxRuntime_production_min.jsxs = q;
66
- return reactJsxRuntime_production_min;
67
- }
68
-
69
- var reactJsxRuntime_development = {};
70
-
71
- /**
72
- * @license React
73
- * react-jsx-runtime.development.js
74
- *
75
- * Copyright (c) Facebook, Inc. and its affiliates.
76
- *
77
- * This source code is licensed under the MIT license found in the
78
- * LICENSE file in the root directory of this source tree.
79
- */
80
- var hasRequiredReactJsxRuntime_development;
81
- function requireReactJsxRuntime_development() {
82
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
83
- hasRequiredReactJsxRuntime_development = 1;
84
- if (process.env.NODE_ENV !== "production") {
85
- (function () {
86
- var React = require$$0;
87
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
88
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
89
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
90
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
91
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
92
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
93
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
94
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
95
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
96
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
97
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
98
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
99
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
100
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
101
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
102
- function getIteratorFn(maybeIterable) {
103
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
104
- return null;
105
- }
106
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
107
- if (typeof maybeIterator === 'function') {
108
- return maybeIterator;
109
- }
110
- return null;
111
- }
112
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
113
- function error(format) {
114
- {
115
- {
116
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
117
- args[_key2 - 1] = arguments[_key2];
118
- }
119
- printWarning('error', format, args);
120
- }
121
- }
122
- }
123
- function printWarning(level, format, args) {
124
- {
125
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
126
- var stack = ReactDebugCurrentFrame.getStackAddendum();
127
- if (stack !== '') {
128
- format += '%s';
129
- args = args.concat([stack]);
130
- }
131
- var argsWithFormat = args.map(function (item) {
132
- return String(item);
133
- });
134
- argsWithFormat.unshift('Warning: ' + format);
135
- Function.prototype.apply.call(console[level], console, argsWithFormat);
136
- }
137
- }
138
- var enableScopeAPI = false;
139
- var enableCacheElement = false;
140
- var enableTransitionTracing = false;
141
- var enableLegacyHidden = false;
142
- var enableDebugTracing = false;
143
- var REACT_MODULE_REFERENCE;
144
- {
145
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
146
- }
147
- function isValidElementType(type) {
148
- if (typeof type === 'string' || typeof type === 'function') {
149
- return true;
150
- }
151
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
152
- return true;
153
- }
154
- if (typeof type === 'object' && type !== null) {
155
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
156
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
157
- return true;
158
- }
159
- }
160
- return false;
161
- }
162
- function getWrappedName(outerType, innerType, wrapperName) {
163
- var displayName = outerType.displayName;
164
- if (displayName) {
165
- return displayName;
166
- }
167
- var functionName = innerType.displayName || innerType.name || '';
168
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
169
- }
170
- function getContextName(type) {
171
- return type.displayName || 'Context';
172
- }
173
- function getComponentNameFromType(type) {
174
- if (type == null) {
175
- return null;
176
- }
177
- {
178
- if (typeof type.tag === 'number') {
179
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
180
- }
181
- }
182
- if (typeof type === 'function') {
183
- return type.displayName || type.name || null;
184
- }
185
- if (typeof type === 'string') {
186
- return type;
187
- }
188
- switch (type) {
189
- case REACT_FRAGMENT_TYPE:
190
- return 'Fragment';
191
- case REACT_PORTAL_TYPE:
192
- return 'Portal';
193
- case REACT_PROFILER_TYPE:
194
- return 'Profiler';
195
- case REACT_STRICT_MODE_TYPE:
196
- return 'StrictMode';
197
- case REACT_SUSPENSE_TYPE:
198
- return 'Suspense';
199
- case REACT_SUSPENSE_LIST_TYPE:
200
- return 'SuspenseList';
201
- }
202
- if (typeof type === 'object') {
203
- switch (type.$$typeof) {
204
- case REACT_CONTEXT_TYPE:
205
- var context = type;
206
- return getContextName(context) + '.Consumer';
207
- case REACT_PROVIDER_TYPE:
208
- var provider = type;
209
- return getContextName(provider._context) + '.Provider';
210
- case REACT_FORWARD_REF_TYPE:
211
- return getWrappedName(type, type.render, 'ForwardRef');
212
- case REACT_MEMO_TYPE:
213
- var outerName = type.displayName || null;
214
- if (outerName !== null) {
215
- return outerName;
216
- }
217
- return getComponentNameFromType(type.type) || 'Memo';
218
- case REACT_LAZY_TYPE:
219
- {
220
- var lazyComponent = type;
221
- var payload = lazyComponent._payload;
222
- var init = lazyComponent._init;
223
- try {
224
- return getComponentNameFromType(init(payload));
225
- } catch (x) {
226
- return null;
227
- }
228
- }
229
- }
230
- }
231
- return null;
232
- }
233
- var assign = Object.assign;
234
- var disabledDepth = 0;
235
- var prevLog;
236
- var prevInfo;
237
- var prevWarn;
238
- var prevError;
239
- var prevGroup;
240
- var prevGroupCollapsed;
241
- var prevGroupEnd;
242
- function disabledLog() {}
243
- disabledLog.__reactDisabledLog = true;
244
- function disableLogs() {
245
- {
246
- if (disabledDepth === 0) {
247
- prevLog = console.log;
248
- prevInfo = console.info;
249
- prevWarn = console.warn;
250
- prevError = console.error;
251
- prevGroup = console.group;
252
- prevGroupCollapsed = console.groupCollapsed;
253
- prevGroupEnd = console.groupEnd;
254
- var props = {
255
- configurable: true,
256
- enumerable: true,
257
- value: disabledLog,
258
- writable: true
259
- };
260
- Object.defineProperties(console, {
261
- info: props,
262
- log: props,
263
- warn: props,
264
- error: props,
265
- group: props,
266
- groupCollapsed: props,
267
- groupEnd: props
268
- });
269
- }
270
- disabledDepth++;
271
- }
272
- }
273
- function reenableLogs() {
274
- {
275
- disabledDepth--;
276
- if (disabledDepth === 0) {
277
- var props = {
278
- configurable: true,
279
- enumerable: true,
280
- writable: true
281
- };
282
- Object.defineProperties(console, {
283
- log: assign({}, props, {
284
- value: prevLog
285
- }),
286
- info: assign({}, props, {
287
- value: prevInfo
288
- }),
289
- warn: assign({}, props, {
290
- value: prevWarn
291
- }),
292
- error: assign({}, props, {
293
- value: prevError
294
- }),
295
- group: assign({}, props, {
296
- value: prevGroup
297
- }),
298
- groupCollapsed: assign({}, props, {
299
- value: prevGroupCollapsed
300
- }),
301
- groupEnd: assign({}, props, {
302
- value: prevGroupEnd
303
- })
304
- });
305
- }
306
- if (disabledDepth < 0) {
307
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
308
- }
309
- }
310
- }
311
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
312
- var prefix;
313
- function describeBuiltInComponentFrame(name, source, ownerFn) {
314
- {
315
- if (prefix === undefined) {
316
- try {
317
- throw Error();
318
- } catch (x) {
319
- var match = x.stack.trim().match(/\n( *(at )?)/);
320
- prefix = match && match[1] || '';
321
- }
322
- }
323
- return '\n' + prefix + name;
324
- }
325
- }
326
- var reentry = false;
327
- var componentFrameCache;
328
- {
329
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
330
- componentFrameCache = new PossiblyWeakMap();
331
- }
332
- function describeNativeComponentFrame(fn, construct) {
333
- if (!fn || reentry) {
334
- return '';
335
- }
336
- {
337
- var frame = componentFrameCache.get(fn);
338
- if (frame !== undefined) {
339
- return frame;
340
- }
341
- }
342
- var control;
343
- reentry = true;
344
- var previousPrepareStackTrace = Error.prepareStackTrace;
345
- Error.prepareStackTrace = undefined;
346
- var previousDispatcher;
347
- {
348
- previousDispatcher = ReactCurrentDispatcher.current;
349
- ReactCurrentDispatcher.current = null;
350
- disableLogs();
351
- }
352
- try {
353
- if (construct) {
354
- var Fake = function () {
355
- throw Error();
356
- };
357
- Object.defineProperty(Fake.prototype, 'props', {
358
- set: function () {
359
- throw Error();
360
- }
361
- });
362
- if (typeof Reflect === 'object' && Reflect.construct) {
363
- try {
364
- Reflect.construct(Fake, []);
365
- } catch (x) {
366
- control = x;
367
- }
368
- Reflect.construct(fn, [], Fake);
369
- } else {
370
- try {
371
- Fake.call();
372
- } catch (x) {
373
- control = x;
374
- }
375
- fn.call(Fake.prototype);
376
- }
377
- } else {
378
- try {
379
- throw Error();
380
- } catch (x) {
381
- control = x;
382
- }
383
- fn();
384
- }
385
- } catch (sample) {
386
- if (sample && control && typeof sample.stack === 'string') {
387
- var sampleLines = sample.stack.split('\n');
388
- var controlLines = control.stack.split('\n');
389
- var s = sampleLines.length - 1;
390
- var c = controlLines.length - 1;
391
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
392
- c--;
393
- }
394
- for (; s >= 1 && c >= 0; s--, c--) {
395
- if (sampleLines[s] !== controlLines[c]) {
396
- if (s !== 1 || c !== 1) {
397
- do {
398
- s--;
399
- c--;
400
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
401
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
402
- if (fn.displayName && _frame.includes('<anonymous>')) {
403
- _frame = _frame.replace('<anonymous>', fn.displayName);
404
- }
405
- {
406
- if (typeof fn === 'function') {
407
- componentFrameCache.set(fn, _frame);
408
- }
409
- }
410
- return _frame;
411
- }
412
- } while (s >= 1 && c >= 0);
413
- }
414
- break;
415
- }
416
- }
417
- }
418
- } finally {
419
- reentry = false;
420
- {
421
- ReactCurrentDispatcher.current = previousDispatcher;
422
- reenableLogs();
423
- }
424
- Error.prepareStackTrace = previousPrepareStackTrace;
425
- }
426
- var name = fn ? fn.displayName || fn.name : '';
427
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
428
- {
429
- if (typeof fn === 'function') {
430
- componentFrameCache.set(fn, syntheticFrame);
431
- }
432
- }
433
- return syntheticFrame;
434
- }
435
- function describeFunctionComponentFrame(fn, source, ownerFn) {
436
- {
437
- return describeNativeComponentFrame(fn, false);
438
- }
439
- }
440
- function shouldConstruct(Component) {
441
- var prototype = Component.prototype;
442
- return !!(prototype && prototype.isReactComponent);
443
- }
444
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
445
- if (type == null) {
446
- return '';
447
- }
448
- if (typeof type === 'function') {
449
- {
450
- return describeNativeComponentFrame(type, shouldConstruct(type));
451
- }
452
- }
453
- if (typeof type === 'string') {
454
- return describeBuiltInComponentFrame(type);
455
- }
456
- switch (type) {
457
- case REACT_SUSPENSE_TYPE:
458
- return describeBuiltInComponentFrame('Suspense');
459
- case REACT_SUSPENSE_LIST_TYPE:
460
- return describeBuiltInComponentFrame('SuspenseList');
461
- }
462
- if (typeof type === 'object') {
463
- switch (type.$$typeof) {
464
- case REACT_FORWARD_REF_TYPE:
465
- return describeFunctionComponentFrame(type.render);
466
- case REACT_MEMO_TYPE:
467
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
468
- case REACT_LAZY_TYPE:
469
- {
470
- var lazyComponent = type;
471
- var payload = lazyComponent._payload;
472
- var init = lazyComponent._init;
473
- try {
474
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
475
- } catch (x) {}
476
- }
477
- }
478
- }
479
- return '';
480
- }
481
- var hasOwnProperty = Object.prototype.hasOwnProperty;
482
- var loggedTypeFailures = {};
483
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
484
- function setCurrentlyValidatingElement(element) {
485
- {
486
- if (element) {
487
- var owner = element._owner;
488
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
489
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
490
- } else {
491
- ReactDebugCurrentFrame.setExtraStackFrame(null);
492
- }
493
- }
494
- }
495
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
496
- {
497
- var has = Function.call.bind(hasOwnProperty);
498
- for (var typeSpecName in typeSpecs) {
499
- if (has(typeSpecs, typeSpecName)) {
500
- var error$1 = void 0;
501
- try {
502
- if (typeof typeSpecs[typeSpecName] !== 'function') {
503
- 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`.');
504
- err.name = 'Invariant Violation';
505
- throw err;
506
- }
507
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
508
- } catch (ex) {
509
- error$1 = ex;
510
- }
511
- if (error$1 && !(error$1 instanceof Error)) {
512
- setCurrentlyValidatingElement(element);
513
- error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
514
- setCurrentlyValidatingElement(null);
515
- }
516
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
517
- loggedTypeFailures[error$1.message] = true;
518
- setCurrentlyValidatingElement(element);
519
- error('Failed %s type: %s', location, error$1.message);
520
- setCurrentlyValidatingElement(null);
521
- }
522
- }
523
- }
524
- }
525
- }
526
- var isArrayImpl = Array.isArray;
527
- function isArray(a) {
528
- return isArrayImpl(a);
529
- }
530
- function typeName(value) {
531
- {
532
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
533
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
534
- return type;
535
- }
536
- }
537
- function willCoercionThrow(value) {
538
- {
539
- try {
540
- testStringCoercion(value);
541
- return false;
542
- } catch (e) {
543
- return true;
544
- }
545
- }
546
- }
547
- function testStringCoercion(value) {
548
- return '' + value;
549
- }
550
- function checkKeyStringCoercion(value) {
551
- {
552
- if (willCoercionThrow(value)) {
553
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
554
- return testStringCoercion(value);
555
- }
556
- }
557
- }
558
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
559
- var RESERVED_PROPS = {
560
- key: true,
561
- ref: true,
562
- __self: true,
563
- __source: true
564
- };
565
- var specialPropKeyWarningShown;
566
- var specialPropRefWarningShown;
567
- var didWarnAboutStringRefs;
568
- {
569
- didWarnAboutStringRefs = {};
570
- }
571
- function hasValidRef(config) {
572
- {
573
- if (hasOwnProperty.call(config, 'ref')) {
574
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
575
- if (getter && getter.isReactWarning) {
576
- return false;
577
- }
578
- }
579
- }
580
- return config.ref !== undefined;
581
- }
582
- function hasValidKey(config) {
583
- {
584
- if (hasOwnProperty.call(config, 'key')) {
585
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
586
- if (getter && getter.isReactWarning) {
587
- return false;
588
- }
589
- }
590
- }
591
- return config.key !== undefined;
592
- }
593
- function warnIfStringRefCannotBeAutoConverted(config, self) {
594
- {
595
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
596
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
597
- if (!didWarnAboutStringRefs[componentName]) {
598
- 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://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
599
- didWarnAboutStringRefs[componentName] = true;
600
- }
601
- }
602
- }
603
- }
604
- function defineKeyPropWarningGetter(props, displayName) {
605
- {
606
- var warnAboutAccessingKey = function () {
607
- if (!specialPropKeyWarningShown) {
608
- specialPropKeyWarningShown = true;
609
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
610
- }
611
- };
612
- warnAboutAccessingKey.isReactWarning = true;
613
- Object.defineProperty(props, 'key', {
614
- get: warnAboutAccessingKey,
615
- configurable: true
616
- });
617
- }
618
- }
619
- function defineRefPropWarningGetter(props, displayName) {
620
- {
621
- var warnAboutAccessingRef = function () {
622
- if (!specialPropRefWarningShown) {
623
- specialPropRefWarningShown = true;
624
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
625
- }
626
- };
627
- warnAboutAccessingRef.isReactWarning = true;
628
- Object.defineProperty(props, 'ref', {
629
- get: warnAboutAccessingRef,
630
- configurable: true
631
- });
632
- }
633
- }
634
- var ReactElement = function (type, key, ref, self, source, owner, props) {
635
- var element = {
636
- $$typeof: REACT_ELEMENT_TYPE,
637
- type: type,
638
- key: key,
639
- ref: ref,
640
- props: props,
641
- _owner: owner
642
- };
643
- {
644
- element._store = {};
645
- Object.defineProperty(element._store, 'validated', {
646
- configurable: false,
647
- enumerable: false,
648
- writable: true,
649
- value: false
650
- });
651
- Object.defineProperty(element, '_self', {
652
- configurable: false,
653
- enumerable: false,
654
- writable: false,
655
- value: self
656
- });
657
- Object.defineProperty(element, '_source', {
658
- configurable: false,
659
- enumerable: false,
660
- writable: false,
661
- value: source
662
- });
663
- if (Object.freeze) {
664
- Object.freeze(element.props);
665
- Object.freeze(element);
666
- }
667
- }
668
- return element;
669
- };
670
- function jsxDEV(type, config, maybeKey, source, self) {
671
- {
672
- var propName;
673
- var props = {};
674
- var key = null;
675
- var ref = null;
676
- if (maybeKey !== undefined) {
677
- {
678
- checkKeyStringCoercion(maybeKey);
679
- }
680
- key = '' + maybeKey;
681
- }
682
- if (hasValidKey(config)) {
683
- {
684
- checkKeyStringCoercion(config.key);
685
- }
686
- key = '' + config.key;
687
- }
688
- if (hasValidRef(config)) {
689
- ref = config.ref;
690
- warnIfStringRefCannotBeAutoConverted(config, self);
691
- }
692
- for (propName in config) {
693
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
694
- props[propName] = config[propName];
695
- }
696
- }
697
- if (type && type.defaultProps) {
698
- var defaultProps = type.defaultProps;
699
- for (propName in defaultProps) {
700
- if (props[propName] === undefined) {
701
- props[propName] = defaultProps[propName];
702
- }
703
- }
704
- }
705
- if (key || ref) {
706
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
707
- if (key) {
708
- defineKeyPropWarningGetter(props, displayName);
709
- }
710
- if (ref) {
711
- defineRefPropWarningGetter(props, displayName);
712
- }
713
- }
714
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
715
- }
716
- }
717
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
718
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
719
- function setCurrentlyValidatingElement$1(element) {
720
- {
721
- if (element) {
722
- var owner = element._owner;
723
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
724
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
725
- } else {
726
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
727
- }
728
- }
729
- }
730
- var propTypesMisspellWarningShown;
731
- {
732
- propTypesMisspellWarningShown = false;
733
- }
734
- function isValidElement(object) {
735
- {
736
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
737
- }
738
- }
739
- function getDeclarationErrorAddendum() {
740
- {
741
- if (ReactCurrentOwner$1.current) {
742
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
743
- if (name) {
744
- return '\n\nCheck the render method of `' + name + '`.';
745
- }
746
- }
747
- return '';
748
- }
749
- }
750
- function getSourceInfoErrorAddendum(source) {
751
- {
752
- return '';
753
- }
754
- }
755
- var ownerHasKeyUseWarning = {};
756
- function getCurrentComponentErrorInfo(parentType) {
757
- {
758
- var info = getDeclarationErrorAddendum();
759
- if (!info) {
760
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
761
- if (parentName) {
762
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
763
- }
764
- }
765
- return info;
766
- }
767
- }
768
- function validateExplicitKey(element, parentType) {
769
- {
770
- if (!element._store || element._store.validated || element.key != null) {
771
- return;
772
- }
773
- element._store.validated = true;
774
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
775
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
776
- return;
777
- }
778
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
779
- var childOwner = '';
780
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
781
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
782
- }
783
- setCurrentlyValidatingElement$1(element);
784
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
785
- setCurrentlyValidatingElement$1(null);
786
- }
787
- }
788
- function validateChildKeys(node, parentType) {
789
- {
790
- if (typeof node !== 'object') {
791
- return;
792
- }
793
- if (isArray(node)) {
794
- for (var i = 0; i < node.length; i++) {
795
- var child = node[i];
796
- if (isValidElement(child)) {
797
- validateExplicitKey(child, parentType);
798
- }
799
- }
800
- } else if (isValidElement(node)) {
801
- if (node._store) {
802
- node._store.validated = true;
803
- }
804
- } else if (node) {
805
- var iteratorFn = getIteratorFn(node);
806
- if (typeof iteratorFn === 'function') {
807
- if (iteratorFn !== node.entries) {
808
- var iterator = iteratorFn.call(node);
809
- var step;
810
- while (!(step = iterator.next()).done) {
811
- if (isValidElement(step.value)) {
812
- validateExplicitKey(step.value, parentType);
813
- }
814
- }
815
- }
816
- }
817
- }
818
- }
819
- }
820
- function validatePropTypes(element) {
821
- {
822
- var type = element.type;
823
- if (type === null || type === undefined || typeof type === 'string') {
824
- return;
825
- }
826
- var propTypes;
827
- if (typeof type === 'function') {
828
- propTypes = type.propTypes;
829
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
830
- type.$$typeof === REACT_MEMO_TYPE)) {
831
- propTypes = type.propTypes;
832
- } else {
833
- return;
834
- }
835
- if (propTypes) {
836
- var name = getComponentNameFromType(type);
837
- checkPropTypes(propTypes, element.props, 'prop', name, element);
838
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
839
- propTypesMisspellWarningShown = true;
840
- var _name = getComponentNameFromType(type);
841
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
842
- }
843
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
844
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
845
- }
846
- }
847
- }
848
- function validateFragmentProps(fragment) {
849
- {
850
- var keys = Object.keys(fragment.props);
851
- for (var i = 0; i < keys.length; i++) {
852
- var key = keys[i];
853
- if (key !== 'children' && key !== 'key') {
854
- setCurrentlyValidatingElement$1(fragment);
855
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
856
- setCurrentlyValidatingElement$1(null);
857
- break;
858
- }
859
- }
860
- if (fragment.ref !== null) {
861
- setCurrentlyValidatingElement$1(fragment);
862
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
863
- setCurrentlyValidatingElement$1(null);
864
- }
865
- }
866
- }
867
- var didWarnAboutKeySpread = {};
868
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
869
- {
870
- var validType = isValidElementType(type);
871
- if (!validType) {
872
- var info = '';
873
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
874
- 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.";
875
- }
876
- var sourceInfo = getSourceInfoErrorAddendum();
877
- if (sourceInfo) {
878
- info += sourceInfo;
879
- } else {
880
- info += getDeclarationErrorAddendum();
881
- }
882
- var typeString;
883
- if (type === null) {
884
- typeString = 'null';
885
- } else if (isArray(type)) {
886
- typeString = 'array';
887
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
888
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
889
- info = ' Did you accidentally export a JSX literal instead of a component?';
890
- } else {
891
- typeString = typeof type;
892
- }
893
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
894
- }
895
- var element = jsxDEV(type, props, key, source, self);
896
- if (element == null) {
897
- return element;
898
- }
899
- if (validType) {
900
- var children = props.children;
901
- if (children !== undefined) {
902
- if (isStaticChildren) {
903
- if (isArray(children)) {
904
- for (var i = 0; i < children.length; i++) {
905
- validateChildKeys(children[i], type);
906
- }
907
- if (Object.freeze) {
908
- Object.freeze(children);
909
- }
910
- } else {
911
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
912
- }
913
- } else {
914
- validateChildKeys(children, type);
915
- }
916
- }
917
- }
918
- {
919
- if (hasOwnProperty.call(props, 'key')) {
920
- var componentName = getComponentNameFromType(type);
921
- var keys = Object.keys(props).filter(function (k) {
922
- return k !== 'key';
923
- });
924
- var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
925
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
926
- var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
927
- error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
928
- didWarnAboutKeySpread[componentName + beforeExample] = true;
929
- }
930
- }
931
- }
932
- if (type === REACT_FRAGMENT_TYPE) {
933
- validateFragmentProps(element);
934
- } else {
935
- validatePropTypes(element);
936
- }
937
- return element;
938
- }
939
- }
940
- function jsxWithValidationStatic(type, props, key) {
941
- {
942
- return jsxWithValidation(type, props, key, true);
943
- }
944
- }
945
- function jsxWithValidationDynamic(type, props, key) {
946
- {
947
- return jsxWithValidation(type, props, key, false);
948
- }
949
- }
950
- var jsx = jsxWithValidationDynamic;
951
- var jsxs = jsxWithValidationStatic;
952
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
953
- reactJsxRuntime_development.jsx = jsx;
954
- reactJsxRuntime_development.jsxs = jsxs;
955
- })();
956
- }
957
- return reactJsxRuntime_development;
958
- }
959
-
960
- var hasRequiredJsxRuntime;
961
- function requireJsxRuntime() {
962
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
963
- hasRequiredJsxRuntime = 1;
964
- if (process.env.NODE_ENV === 'production') {
965
- jsxRuntime.exports = requireReactJsxRuntime_production_min();
966
- } else {
967
- jsxRuntime.exports = requireReactJsxRuntime_development();
968
- }
969
- return jsxRuntime.exports;
970
- }
971
-
972
- var jsxRuntimeExports = requireJsxRuntime();
973
-
974
16
  const getSetterInfo = field => {
975
17
  const {
976
18
  extraProps,
@@ -1047,7 +89,7 @@ const SettingSetter = observer(({
1047
89
  component: SetterComponent,
1048
90
  props: mixedSetterProps
1049
91
  } = setterManager.createSetterContent(setterType, setterProps);
1050
- return /*#__PURE__*/jsxRuntimeExports.jsx(SetterComponent, {
92
+ return /*#__PURE__*/jsx(SetterComponent, {
1051
93
  field: field,
1052
94
  selected: field.top?.getNode(),
1053
95
  initialValue: initialValue,
@@ -1080,17 +122,17 @@ const SettingFieldItem = observer(({
1080
122
  customFieldItem
1081
123
  } = useSettingRendererContext();
1082
124
  if (customFieldItem) {
1083
- return customFieldItem(field, /*#__PURE__*/jsxRuntimeExports.jsx(SettingSetter, {
125
+ return customFieldItem(field, /*#__PURE__*/jsx(SettingSetter, {
1084
126
  field: field
1085
127
  }));
1086
128
  }
1087
- return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
129
+ return /*#__PURE__*/jsxs("div", {
1088
130
  className: "space-y-2",
1089
- children: [/*#__PURE__*/jsxRuntimeExports.jsx("label", {
131
+ children: [/*#__PURE__*/jsx("label", {
1090
132
  htmlFor: field.id,
1091
133
  className: "block text-sm font-medium text-gray-700",
1092
134
  children: field.title
1093
- }), /*#__PURE__*/jsxRuntimeExports.jsx(SettingSetter, {
135
+ }), /*#__PURE__*/jsx(SettingSetter, {
1094
136
  field: field
1095
137
  })]
1096
138
  });
@@ -1102,16 +144,16 @@ const SettingFieldGroup = observer(({
1102
144
  customFieldGroup
1103
145
  } = useSettingRendererContext();
1104
146
  if (customFieldGroup) {
1105
- return customFieldGroup(field, /*#__PURE__*/jsxRuntimeExports.jsx(SettingSetter, {
147
+ return customFieldGroup(field, /*#__PURE__*/jsx(SettingSetter, {
1106
148
  field: field,
1107
- children: field.items?.map(item => /*#__PURE__*/jsxRuntimeExports.jsx(SettingFieldView, {
149
+ children: field.items?.map(item => /*#__PURE__*/jsx(SettingFieldView, {
1108
150
  field: item
1109
151
  }, item.id))
1110
152
  }));
1111
153
  }
1112
- return /*#__PURE__*/jsxRuntimeExports.jsx(SettingSetter, {
154
+ return /*#__PURE__*/jsx(SettingSetter, {
1113
155
  field: field,
1114
- children: field.items?.map(item => /*#__PURE__*/jsxRuntimeExports.jsx(SettingFieldView, {
156
+ children: field.items?.map(item => /*#__PURE__*/jsx(SettingFieldView, {
1115
157
  field: item
1116
158
  }, item.id))
1117
159
  });
@@ -1120,11 +162,11 @@ const SettingFieldView = ({
1120
162
  field
1121
163
  }) => {
1122
164
  if (field.isGroup) {
1123
- return /*#__PURE__*/jsxRuntimeExports.jsx(SettingFieldGroup, {
165
+ return /*#__PURE__*/jsx(SettingFieldGroup, {
1124
166
  field: field
1125
167
  }, field.id);
1126
168
  } else {
1127
- return /*#__PURE__*/jsxRuntimeExports.jsx(SettingFieldItem, {
169
+ return /*#__PURE__*/jsx(SettingFieldItem, {
1128
170
  field: field
1129
171
  }, field.id);
1130
172
  }
@@ -1154,11 +196,11 @@ const SettingRender = observer(props => {
1154
196
  }, [setterManager, settingsManager, customFieldItem, customFieldGroup]);
1155
197
  if (!settings) {
1156
198
  // 未选中节点,提示选中 或者 显示根节点设置
1157
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
199
+ return /*#__PURE__*/jsx("div", {
1158
200
  className: "lc-settings-main",
1159
- children: /*#__PURE__*/jsxRuntimeExports.jsx("div", {
201
+ children: /*#__PURE__*/jsx("div", {
1160
202
  className: "lc-settings-notice",
1161
- children: /*#__PURE__*/jsxRuntimeExports.jsx("p", {
203
+ children: /*#__PURE__*/jsx("p", {
1162
204
  children: "Please select a node in canvas"
1163
205
  })
1164
206
  })
@@ -1167,22 +209,22 @@ const SettingRender = observer(props => {
1167
209
 
1168
210
  // 当节点被锁定,且未开启锁定后容器可设置属性
1169
211
  if (settings.isLocked) {
1170
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
212
+ return /*#__PURE__*/jsx("div", {
1171
213
  className: "lc-settings-main",
1172
- children: /*#__PURE__*/jsxRuntimeExports.jsx("div", {
214
+ children: /*#__PURE__*/jsx("div", {
1173
215
  className: "lc-settings-notice",
1174
- children: /*#__PURE__*/jsxRuntimeExports.jsx("p", {
216
+ children: /*#__PURE__*/jsx("p", {
1175
217
  children: "Current node is locked"
1176
218
  })
1177
219
  })
1178
220
  });
1179
221
  }
1180
222
  if (Array.isArray(settings.items) && settings.items.length === 0) {
1181
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
223
+ return /*#__PURE__*/jsx("div", {
1182
224
  className: "lc-settings-main",
1183
- children: /*#__PURE__*/jsxRuntimeExports.jsx("div", {
225
+ children: /*#__PURE__*/jsx("div", {
1184
226
  className: "lc-settings-notice",
1185
- children: /*#__PURE__*/jsxRuntimeExports.jsx("p", {
227
+ children: /*#__PURE__*/jsx("p", {
1186
228
  children: "No config found for this type of component"
1187
229
  })
1188
230
  })
@@ -1190,19 +232,19 @@ const SettingRender = observer(props => {
1190
232
  }
1191
233
  if (!settings.isSameComponent) {
1192
234
  // TODO: future support 获取设置项交集编辑
1193
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
235
+ return /*#__PURE__*/jsx("div", {
1194
236
  className: "lc-settings-main",
1195
- children: /*#__PURE__*/jsxRuntimeExports.jsx("div", {
237
+ children: /*#__PURE__*/jsx("div", {
1196
238
  className: "lc-settings-notice",
1197
- children: /*#__PURE__*/jsxRuntimeExports.jsx("p", {
239
+ children: /*#__PURE__*/jsx("p", {
1198
240
  children: "Please select same kind of components"
1199
241
  })
1200
242
  })
1201
243
  });
1202
244
  }
1203
- return /*#__PURE__*/jsxRuntimeExports.jsx(SettingRendererContext.Provider, {
245
+ return /*#__PURE__*/jsx(SettingRendererContext.Provider, {
1204
246
  value: ctx,
1205
- children: items?.map(item => /*#__PURE__*/jsxRuntimeExports.jsx(SettingFieldView, {
247
+ children: items?.map(item => /*#__PURE__*/jsx(SettingFieldView, {
1206
248
  field: item
1207
249
  }, item.id))
1208
250
  });
@@ -1228,6 +270,566 @@ class Adapter {
1228
270
  }
1229
271
  const adapter = new Adapter();
1230
272
 
273
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
274
+
275
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
276
+ var root = freeGlobal || freeSelf || Function('return this')();
277
+
278
+ var Symbol = root.Symbol;
279
+
280
+ var objectProto$7 = Object.prototype;
281
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
282
+ var nativeObjectToString$1 = objectProto$7.toString;
283
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
284
+ function getRawTag(value) {
285
+ var isOwn = hasOwnProperty$5.call(value, symToStringTag$1),
286
+ tag = value[symToStringTag$1];
287
+ try {
288
+ value[symToStringTag$1] = undefined;
289
+ var unmasked = true;
290
+ } catch (e) {}
291
+ var result = nativeObjectToString$1.call(value);
292
+ if (unmasked) {
293
+ if (isOwn) {
294
+ value[symToStringTag$1] = tag;
295
+ } else {
296
+ delete value[symToStringTag$1];
297
+ }
298
+ }
299
+ return result;
300
+ }
301
+
302
+ var objectProto$6 = Object.prototype;
303
+ var nativeObjectToString = objectProto$6.toString;
304
+ function objectToString(value) {
305
+ return nativeObjectToString.call(value);
306
+ }
307
+
308
+ var nullTag = '[object Null]',
309
+ undefinedTag = '[object Undefined]';
310
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
311
+ function baseGetTag(value) {
312
+ if (value == null) {
313
+ return value === undefined ? undefinedTag : nullTag;
314
+ }
315
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
316
+ }
317
+
318
+ function isObjectLike(value) {
319
+ return value != null && typeof value == 'object';
320
+ }
321
+
322
+ var symbolTag = '[object Symbol]';
323
+ function isSymbol(value) {
324
+ return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
325
+ }
326
+
327
+ var isArray = Array.isArray;
328
+
329
+ var reWhitespace = /\s/;
330
+ function trimmedEndIndex(string) {
331
+ var index = string.length;
332
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
333
+ return index;
334
+ }
335
+
336
+ var reTrimStart = /^\s+/;
337
+ function baseTrim(string) {
338
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string;
339
+ }
340
+
341
+ function isObject(value) {
342
+ var type = typeof value;
343
+ return value != null && (type == 'object' || type == 'function');
344
+ }
345
+
346
+ var NAN = 0 / 0;
347
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
348
+ var reIsBinary = /^0b[01]+$/i;
349
+ var reIsOctal = /^0o[0-7]+$/i;
350
+ var freeParseInt = parseInt;
351
+ function toNumber(value) {
352
+ if (typeof value == 'number') {
353
+ return value;
354
+ }
355
+ if (isSymbol(value)) {
356
+ return NAN;
357
+ }
358
+ if (isObject(value)) {
359
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
360
+ value = isObject(other) ? other + '' : other;
361
+ }
362
+ if (typeof value != 'string') {
363
+ return value === 0 ? value : +value;
364
+ }
365
+ value = baseTrim(value);
366
+ var isBinary = reIsBinary.test(value);
367
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
368
+ }
369
+
370
+ function identity(value) {
371
+ return value;
372
+ }
373
+
374
+ var asyncTag = '[object AsyncFunction]',
375
+ funcTag$1 = '[object Function]',
376
+ genTag = '[object GeneratorFunction]',
377
+ proxyTag = '[object Proxy]';
378
+ function isFunction(value) {
379
+ if (!isObject(value)) {
380
+ return false;
381
+ }
382
+ var tag = baseGetTag(value);
383
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
384
+ }
385
+
386
+ var coreJsData = root['__core-js_shared__'];
387
+
388
+ var maskSrcKey = function () {
389
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
390
+ return uid ? 'Symbol(src)_1.' + uid : '';
391
+ }();
392
+ function isMasked(func) {
393
+ return !!maskSrcKey && maskSrcKey in func;
394
+ }
395
+
396
+ var funcProto$1 = Function.prototype;
397
+ var funcToString$1 = funcProto$1.toString;
398
+ function toSource(func) {
399
+ if (func != null) {
400
+ try {
401
+ return funcToString$1.call(func);
402
+ } catch (e) {}
403
+ try {
404
+ return func + '';
405
+ } catch (e) {}
406
+ }
407
+ return '';
408
+ }
409
+
410
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
411
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
412
+ var funcProto = Function.prototype,
413
+ objectProto$5 = Object.prototype;
414
+ var funcToString = funcProto.toString;
415
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
416
+ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$4).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
417
+ function baseIsNative(value) {
418
+ if (!isObject(value) || isMasked(value)) {
419
+ return false;
420
+ }
421
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
422
+ return pattern.test(toSource(value));
423
+ }
424
+
425
+ function getValue$1(object, key) {
426
+ return object == null ? undefined : object[key];
427
+ }
428
+
429
+ function getNative(object, key) {
430
+ var value = getValue$1(object, key);
431
+ return baseIsNative(value) ? value : undefined;
432
+ }
433
+
434
+ var WeakMap = getNative(root, 'WeakMap');
435
+
436
+ function arrayEach(array, iteratee) {
437
+ var index = -1,
438
+ length = array == null ? 0 : array.length;
439
+ while (++index < length) {
440
+ if (iteratee(array[index], index, array) === false) {
441
+ break;
442
+ }
443
+ }
444
+ return array;
445
+ }
446
+
447
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
448
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
449
+ function isIndex(value, length) {
450
+ var type = typeof value;
451
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
452
+ return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
453
+ }
454
+
455
+ var MAX_SAFE_INTEGER = 9007199254740991;
456
+ function isLength(value) {
457
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
458
+ }
459
+
460
+ function isArrayLike(value) {
461
+ return value != null && isLength(value.length) && !isFunction(value);
462
+ }
463
+
464
+ var objectProto$4 = Object.prototype;
465
+ function isPrototype(value) {
466
+ var Ctor = value && value.constructor,
467
+ proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$4;
468
+ return value === proto;
469
+ }
470
+
471
+ function baseTimes(n, iteratee) {
472
+ var index = -1,
473
+ result = Array(n);
474
+ while (++index < n) {
475
+ result[index] = iteratee(index);
476
+ }
477
+ return result;
478
+ }
479
+
480
+ var argsTag$1 = '[object Arguments]';
481
+ function baseIsArguments(value) {
482
+ return isObjectLike(value) && baseGetTag(value) == argsTag$1;
483
+ }
484
+
485
+ var objectProto$3 = Object.prototype;
486
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
487
+ var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
488
+ var isArguments = baseIsArguments(function () {
489
+ return arguments;
490
+ }()) ? baseIsArguments : function (value) {
491
+ return isObjectLike(value) && hasOwnProperty$3.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
492
+ };
493
+
494
+ function stubFalse() {
495
+ return false;
496
+ }
497
+
498
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
499
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
500
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
501
+ var Buffer = moduleExports$1 ? root.Buffer : undefined;
502
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
503
+ var isBuffer = nativeIsBuffer || stubFalse;
504
+
505
+ var argsTag = '[object Arguments]',
506
+ arrayTag = '[object Array]',
507
+ boolTag = '[object Boolean]',
508
+ dateTag = '[object Date]',
509
+ errorTag = '[object Error]',
510
+ funcTag = '[object Function]',
511
+ mapTag$2 = '[object Map]',
512
+ numberTag = '[object Number]',
513
+ objectTag$1 = '[object Object]',
514
+ regexpTag = '[object RegExp]',
515
+ setTag$2 = '[object Set]',
516
+ stringTag = '[object String]',
517
+ weakMapTag$1 = '[object WeakMap]';
518
+ var arrayBufferTag = '[object ArrayBuffer]',
519
+ dataViewTag$1 = '[object DataView]',
520
+ float32Tag = '[object Float32Array]',
521
+ float64Tag = '[object Float64Array]',
522
+ int8Tag = '[object Int8Array]',
523
+ int16Tag = '[object Int16Array]',
524
+ int32Tag = '[object Int32Array]',
525
+ uint8Tag = '[object Uint8Array]',
526
+ uint8ClampedTag = '[object Uint8ClampedArray]',
527
+ uint16Tag = '[object Uint16Array]',
528
+ uint32Tag = '[object Uint32Array]';
529
+ var typedArrayTags = {};
530
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
531
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag$2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
532
+ function baseIsTypedArray(value) {
533
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
534
+ }
535
+
536
+ function baseUnary(func) {
537
+ return function (value) {
538
+ return func(value);
539
+ };
540
+ }
541
+
542
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
543
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
544
+ var moduleExports = freeModule && freeModule.exports === freeExports;
545
+ var freeProcess = moduleExports && freeGlobal.process;
546
+ var nodeUtil = function () {
547
+ try {
548
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
549
+ if (types) {
550
+ return types;
551
+ }
552
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
553
+ } catch (e) {}
554
+ }();
555
+
556
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
557
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
558
+
559
+ var objectProto$2 = Object.prototype;
560
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
561
+ function arrayLikeKeys(value, inherited) {
562
+ var isArr = isArray(value),
563
+ isArg = !isArr && isArguments(value),
564
+ isBuff = !isArr && !isArg && isBuffer(value),
565
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
566
+ skipIndexes = isArr || isArg || isBuff || isType,
567
+ result = skipIndexes ? baseTimes(value.length, String) : [],
568
+ length = result.length;
569
+ for (var key in value) {
570
+ if ((hasOwnProperty$2.call(value, key)) && !(skipIndexes && (
571
+ key == 'length' ||
572
+ isBuff && (key == 'offset' || key == 'parent') ||
573
+ isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
574
+ isIndex(key, length)))) {
575
+ result.push(key);
576
+ }
577
+ }
578
+ return result;
579
+ }
580
+
581
+ function overArg(func, transform) {
582
+ return function (arg) {
583
+ return func(transform(arg));
584
+ };
585
+ }
586
+
587
+ var nativeKeys = overArg(Object.keys, Object);
588
+
589
+ var objectProto$1 = Object.prototype;
590
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
591
+ function baseKeys(object) {
592
+ if (!isPrototype(object)) {
593
+ return nativeKeys(object);
594
+ }
595
+ var result = [];
596
+ for (var key in Object(object)) {
597
+ if (hasOwnProperty$1.call(object, key) && key != 'constructor') {
598
+ result.push(key);
599
+ }
600
+ }
601
+ return result;
602
+ }
603
+
604
+ function keys(object) {
605
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
606
+ }
607
+
608
+ var Map$1 = getNative(root, 'Map');
609
+
610
+ var DataView = getNative(root, 'DataView');
611
+
612
+ var Promise$1 = getNative(root, 'Promise');
613
+
614
+ var Set = getNative(root, 'Set');
615
+
616
+ var mapTag$1 = '[object Map]',
617
+ objectTag = '[object Object]',
618
+ promiseTag = '[object Promise]',
619
+ setTag$1 = '[object Set]',
620
+ weakMapTag = '[object WeakMap]';
621
+ var dataViewTag = '[object DataView]';
622
+ var dataViewCtorString = toSource(DataView),
623
+ mapCtorString = toSource(Map$1),
624
+ promiseCtorString = toSource(Promise$1),
625
+ setCtorString = toSource(Set),
626
+ weakMapCtorString = toSource(WeakMap);
627
+ var getTag = baseGetTag;
628
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag(new Map$1()) != mapTag$1 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag$1 || WeakMap && getTag(new WeakMap()) != weakMapTag) {
629
+ getTag = function (value) {
630
+ var result = baseGetTag(value),
631
+ Ctor = result == objectTag ? value.constructor : undefined,
632
+ ctorString = Ctor ? toSource(Ctor) : '';
633
+ if (ctorString) {
634
+ switch (ctorString) {
635
+ case dataViewCtorString:
636
+ return dataViewTag;
637
+ case mapCtorString:
638
+ return mapTag$1;
639
+ case promiseCtorString:
640
+ return promiseTag;
641
+ case setCtorString:
642
+ return setTag$1;
643
+ case weakMapCtorString:
644
+ return weakMapTag;
645
+ }
646
+ }
647
+ return result;
648
+ };
649
+ }
650
+
651
+ function createBaseFor(fromRight) {
652
+ return function (object, iteratee, keysFunc) {
653
+ var index = -1,
654
+ iterable = Object(object),
655
+ props = keysFunc(object),
656
+ length = props.length;
657
+ while (length--) {
658
+ var key = props[++index];
659
+ if (iteratee(iterable[key], key, iterable) === false) {
660
+ break;
661
+ }
662
+ }
663
+ return object;
664
+ };
665
+ }
666
+
667
+ var baseFor = createBaseFor();
668
+
669
+ function baseForOwn(object, iteratee) {
670
+ return object && baseFor(object, iteratee, keys);
671
+ }
672
+
673
+ function createBaseEach(eachFunc, fromRight) {
674
+ return function (collection, iteratee) {
675
+ if (collection == null) {
676
+ return collection;
677
+ }
678
+ if (!isArrayLike(collection)) {
679
+ return eachFunc(collection, iteratee);
680
+ }
681
+ var length = collection.length,
682
+ index = -1,
683
+ iterable = Object(collection);
684
+ while (++index < length) {
685
+ if (iteratee(iterable[index], index, iterable) === false) {
686
+ break;
687
+ }
688
+ }
689
+ return collection;
690
+ };
691
+ }
692
+
693
+ var baseEach = createBaseEach(baseForOwn);
694
+
695
+ var now = function () {
696
+ return root.Date.now();
697
+ };
698
+
699
+ var FUNC_ERROR_TEXT = 'Expected a function';
700
+ var nativeMax = Math.max,
701
+ nativeMin = Math.min;
702
+ function debounce(func, wait, options) {
703
+ var lastArgs,
704
+ lastThis,
705
+ maxWait,
706
+ result,
707
+ timerId,
708
+ lastCallTime,
709
+ lastInvokeTime = 0,
710
+ leading = false,
711
+ maxing = false,
712
+ trailing = true;
713
+ if (typeof func != 'function') {
714
+ throw new TypeError(FUNC_ERROR_TEXT);
715
+ }
716
+ wait = toNumber(wait) || 0;
717
+ if (isObject(options)) {
718
+ leading = !!options.leading;
719
+ maxing = 'maxWait' in options;
720
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
721
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
722
+ }
723
+ function invokeFunc(time) {
724
+ var args = lastArgs,
725
+ thisArg = lastThis;
726
+ lastArgs = lastThis = undefined;
727
+ lastInvokeTime = time;
728
+ result = func.apply(thisArg, args);
729
+ return result;
730
+ }
731
+ function leadingEdge(time) {
732
+ lastInvokeTime = time;
733
+ timerId = setTimeout(timerExpired, wait);
734
+ return leading ? invokeFunc(time) : result;
735
+ }
736
+ function remainingWait(time) {
737
+ var timeSinceLastCall = time - lastCallTime,
738
+ timeSinceLastInvoke = time - lastInvokeTime,
739
+ timeWaiting = wait - timeSinceLastCall;
740
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
741
+ }
742
+ function shouldInvoke(time) {
743
+ var timeSinceLastCall = time - lastCallTime,
744
+ timeSinceLastInvoke = time - lastInvokeTime;
745
+ return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
746
+ }
747
+ function timerExpired() {
748
+ var time = now();
749
+ if (shouldInvoke(time)) {
750
+ return trailingEdge(time);
751
+ }
752
+ timerId = setTimeout(timerExpired, remainingWait(time));
753
+ }
754
+ function trailingEdge(time) {
755
+ timerId = undefined;
756
+ if (trailing && lastArgs) {
757
+ return invokeFunc(time);
758
+ }
759
+ lastArgs = lastThis = undefined;
760
+ return result;
761
+ }
762
+ function cancel() {
763
+ if (timerId !== undefined) {
764
+ clearTimeout(timerId);
765
+ }
766
+ lastInvokeTime = 0;
767
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
768
+ }
769
+ function flush() {
770
+ return timerId === undefined ? result : trailingEdge(now());
771
+ }
772
+ function debounced() {
773
+ var time = now(),
774
+ isInvoking = shouldInvoke(time);
775
+ lastArgs = arguments;
776
+ lastThis = this;
777
+ lastCallTime = time;
778
+ if (isInvoking) {
779
+ if (timerId === undefined) {
780
+ return leadingEdge(lastCallTime);
781
+ }
782
+ if (maxing) {
783
+ clearTimeout(timerId);
784
+ timerId = setTimeout(timerExpired, wait);
785
+ return invokeFunc(lastCallTime);
786
+ }
787
+ }
788
+ if (timerId === undefined) {
789
+ timerId = setTimeout(timerExpired, wait);
790
+ }
791
+ return result;
792
+ }
793
+ debounced.cancel = cancel;
794
+ debounced.flush = flush;
795
+ return debounced;
796
+ }
797
+
798
+ function castFunction(value) {
799
+ return typeof value == 'function' ? value : identity;
800
+ }
801
+
802
+ function forEach(collection, iteratee) {
803
+ var func = isArray(collection) ? arrayEach : baseEach;
804
+ return func(collection, castFunction(iteratee));
805
+ }
806
+
807
+ var mapTag = '[object Map]',
808
+ setTag = '[object Set]';
809
+ var objectProto = Object.prototype;
810
+ var hasOwnProperty = objectProto.hasOwnProperty;
811
+ function isEmpty(value) {
812
+ if (value == null) {
813
+ return true;
814
+ }
815
+ if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
816
+ return !value.length;
817
+ }
818
+ var tag = getTag(value);
819
+ if (tag == mapTag || tag == setTag) {
820
+ return !value.size;
821
+ }
822
+ if (isPrototype(value)) {
823
+ return !baseKeys(value).length;
824
+ }
825
+ for (var key in value) {
826
+ if (hasOwnProperty.call(value, key)) {
827
+ return false;
828
+ }
829
+ }
830
+ return true;
831
+ }
832
+
1231
833
  const RendererContext = /*#__PURE__*/createContext({});
1232
834
  const useRendererContext = () => {
1233
835
  try {
@@ -2710,7 +2312,7 @@ function baseRendererFactory() {
2710
2312
  return this.__instanceMap[id];
2711
2313
  }
2712
2314
  __renderContextProvider = (customProps, children) => {
2713
- return /*#__PURE__*/jsxRuntimeExports.jsx(RendererContext.Provider, {
2315
+ return /*#__PURE__*/jsx(RendererContext.Provider, {
2714
2316
  value: {
2715
2317
  ...this.context,
2716
2318
  blockContext: this,
@@ -2720,7 +2322,7 @@ function baseRendererFactory() {
2720
2322
  });
2721
2323
  };
2722
2324
  __renderContextConsumer = children => {
2723
- return /*#__PURE__*/jsxRuntimeExports.jsx(RendererContext.Consumer, {
2325
+ return /*#__PURE__*/jsx(RendererContext.Consumer, {
2724
2326
  children: children
2725
2327
  });
2726
2328
  };
@@ -2786,7 +2388,7 @@ function baseRendererFactory() {
2786
2388
  ...(typeof this.props.style === 'object' ? this.props.style : {})
2787
2389
  };
2788
2390
  const id = this.props.id || parsedProps.id;
2789
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
2391
+ return /*#__PURE__*/jsx("div", {
2790
2392
  ref: this.__getRef,
2791
2393
  className: className,
2792
2394
  id: id,
@@ -2928,7 +2530,7 @@ const FaultComponent = ({
2928
2530
  error
2929
2531
  }) => {
2930
2532
  logger.error(`${componentName} 组件渲染异常, 异常原因: ${error?.message || error || '未知'}`);
2931
- return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
2533
+ return /*#__PURE__*/jsxs("div", {
2932
2534
  role: "alert",
2933
2535
  "aria-label": `${componentName} 组件渲染异常`,
2934
2536
  style: {
@@ -2951,11 +2553,11 @@ const NotFoundComponent = ({
2951
2553
  }) => {
2952
2554
  logger.warn(`Component ${componentName} not found`);
2953
2555
  if (enableStrictNotFoundMode) {
2954
- return /*#__PURE__*/jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
2556
+ return /*#__PURE__*/jsx(Fragment, {
2955
2557
  children: `${componentName} Component Not Found`
2956
2558
  });
2957
2559
  }
2958
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", {
2560
+ return /*#__PURE__*/jsx("div", {
2959
2561
  role: "alert",
2960
2562
  "aria-label": `${componentName} component not found`,
2961
2563
  style: {
@@ -3055,13 +2657,13 @@ function rendererFactory() {
3055
2657
  if (!Comp) {
3056
2658
  return null;
3057
2659
  }
3058
- return /*#__PURE__*/jsxRuntimeExports.jsx(RendererContext.Provider, {
2660
+ return /*#__PURE__*/jsx(RendererContext.Provider, {
3059
2661
  value: {
3060
2662
  appHelper,
3061
2663
  components: allComponents,
3062
2664
  engine: this
3063
2665
  },
3064
- children: /*#__PURE__*/jsxRuntimeExports.jsx(Comp, {
2666
+ children: /*#__PURE__*/jsx(Comp, {
3065
2667
  // ref={this.__getRef}
3066
2668
  __appHelper: appHelper,
3067
2669
  __components: allComponents,