@bolttech/form-engine 3.1.0-beta.7 → 3.1.0-beta.9

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/index.esm.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { createContext, useContext, useRef, useMemo, useState, useEffect, useCallback, Suspense } from 'react';
3
- import { FormGroup, FormField, FormCore } from '@bolttech/form-engine-core';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { createContext, useContext, useRef, useEffect, useState, useMemo, useCallback, Suspense } from 'react';
3
+ import { FormGroup, FormCore, FormField } from '@bolttech/form-engine-core';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
 
7
- var fails$e = function (exec) {
7
+ var fails$b = function (exec) {
8
8
  try {
9
9
  return !!exec();
10
10
  } catch (error) {
@@ -12,9 +12,9 @@ var fails$e = function (exec) {
12
12
  }
13
13
  };
14
14
 
15
- var fails$d = fails$e;
15
+ var fails$a = fails$b;
16
16
 
17
- var functionBindNative = !fails$d(function () {
17
+ var functionBindNative = !fails$a(function () {
18
18
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
19
19
  var test = (function () { /* empty */ }).bind();
20
20
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -24,39 +24,39 @@ var functionBindNative = !fails$d(function () {
24
24
  var NATIVE_BIND$1 = functionBindNative;
25
25
 
26
26
  var FunctionPrototype$1 = Function.prototype;
27
- var call$7 = FunctionPrototype$1.call;
28
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$7, call$7);
27
+ var call$6 = FunctionPrototype$1.call;
28
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$6, call$6);
29
29
 
30
30
  var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
31
31
  return function () {
32
- return call$7.apply(fn, arguments);
32
+ return call$6.apply(fn, arguments);
33
33
  };
34
34
  };
35
35
 
36
- var uncurryThis$e = functionUncurryThis;
36
+ var uncurryThis$a = functionUncurryThis;
37
37
 
38
- var toString$4 = uncurryThis$e({}.toString);
39
- var stringSlice$2 = uncurryThis$e(''.slice);
38
+ var toString$1 = uncurryThis$a({}.toString);
39
+ var stringSlice$1 = uncurryThis$a(''.slice);
40
40
 
41
- var classofRaw$2 = function (it) {
42
- return stringSlice$2(toString$4(it), 8, -1);
41
+ var classofRaw = function (it) {
42
+ return stringSlice$1(toString$1(it), 8, -1);
43
43
  };
44
44
 
45
- var uncurryThis$d = functionUncurryThis;
46
- var fails$c = fails$e;
47
- var classof$3 = classofRaw$2;
45
+ var uncurryThis$9 = functionUncurryThis;
46
+ var fails$9 = fails$b;
47
+ var classof = classofRaw;
48
48
 
49
- var $Object$4 = Object;
50
- var split = uncurryThis$d(''.split);
49
+ var $Object$3 = Object;
50
+ var split = uncurryThis$9(''.split);
51
51
 
52
52
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
53
- var indexedObject = fails$c(function () {
53
+ var indexedObject = fails$9(function () {
54
54
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
55
55
  // eslint-disable-next-line no-prototype-builtins -- safe
56
- return !$Object$4('z').propertyIsEnumerable(0);
56
+ return !$Object$3('z').propertyIsEnumerable(0);
57
57
  }) ? function (it) {
58
- return classof$3(it) === 'String' ? split(it, '') : $Object$4(it);
59
- } : $Object$4;
58
+ return classof(it) === 'String' ? split(it, '') : $Object$3(it);
59
+ } : $Object$3;
60
60
 
61
61
  // we can't use just `it == null` since of `document.all` special case
62
62
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
@@ -66,21 +66,21 @@ var isNullOrUndefined$2 = function (it) {
66
66
 
67
67
  var isNullOrUndefined$1 = isNullOrUndefined$2;
68
68
 
69
- var $TypeError$8 = TypeError;
69
+ var $TypeError$6 = TypeError;
70
70
 
71
71
  // `RequireObjectCoercible` abstract operation
72
72
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
73
- var requireObjectCoercible$4 = function (it) {
74
- if (isNullOrUndefined$1(it)) throw new $TypeError$8("Can't call method on " + it);
73
+ var requireObjectCoercible$3 = function (it) {
74
+ if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
75
75
  return it;
76
76
  };
77
77
 
78
78
  // toObject with fallback for non-array-like ES3 strings
79
79
  var IndexedObject$1 = indexedObject;
80
- var requireObjectCoercible$3 = requireObjectCoercible$4;
80
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
81
81
 
82
82
  var toIndexedObject$5 = function (it) {
83
- return IndexedObject$1(requireObjectCoercible$3(it));
83
+ return IndexedObject$1(requireObjectCoercible$2(it));
84
84
  };
85
85
 
86
86
  var check = function (it) {
@@ -134,42 +134,42 @@ var shared$3 = function (key, value) {
134
134
  return store$2[key] || (store$2[key] = value || {});
135
135
  };
136
136
 
137
- var requireObjectCoercible$2 = requireObjectCoercible$4;
137
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
138
138
 
139
- var $Object$3 = Object;
139
+ var $Object$2 = Object;
140
140
 
141
141
  // `ToObject` abstract operation
142
142
  // https://tc39.es/ecma262/#sec-toobject
143
- var toObject$4 = function (argument) {
144
- return $Object$3(requireObjectCoercible$2(argument));
143
+ var toObject$3 = function (argument) {
144
+ return $Object$2(requireObjectCoercible$1(argument));
145
145
  };
146
146
 
147
- var uncurryThis$c = functionUncurryThis;
148
- var toObject$3 = toObject$4;
147
+ var uncurryThis$8 = functionUncurryThis;
148
+ var toObject$2 = toObject$3;
149
149
 
150
- var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
150
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
151
151
 
152
152
  // `HasOwnProperty` abstract operation
153
153
  // https://tc39.es/ecma262/#sec-hasownproperty
154
154
  // eslint-disable-next-line es/no-object-hasown -- safe
155
155
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
156
- return hasOwnProperty(toObject$3(it), key);
156
+ return hasOwnProperty(toObject$2(it), key);
157
157
  };
158
158
 
159
- var uncurryThis$b = functionUncurryThis;
159
+ var uncurryThis$7 = functionUncurryThis;
160
160
 
161
161
  var id = 0;
162
162
  var postfix = Math.random();
163
- var toString$3 = uncurryThis$b(1.0.toString);
163
+ var toString = uncurryThis$7(1.0.toString);
164
164
 
165
165
  var uid$2 = function (key) {
166
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
166
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
167
167
  };
168
168
 
169
169
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
170
170
 
171
171
  var global$9 = global$b;
172
- var userAgent$2 = engineUserAgent;
172
+ var userAgent = engineUserAgent;
173
173
 
174
174
  var process = global$9.process;
175
175
  var Deno = global$9.Deno;
@@ -186,10 +186,10 @@ if (v8) {
186
186
 
187
187
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
188
188
  // so check `userAgent` even if `.v8` exists, but 0
189
- if (!version && userAgent$2) {
190
- match = userAgent$2.match(/Edge\/(\d+)/);
189
+ if (!version && userAgent) {
190
+ match = userAgent.match(/Edge\/(\d+)/);
191
191
  if (!match || match[1] >= 74) {
192
- match = userAgent$2.match(/Chrome\/(\d+)/);
192
+ match = userAgent.match(/Chrome\/(\d+)/);
193
193
  if (match) version = +match[1];
194
194
  }
195
195
  }
@@ -198,19 +198,19 @@ var engineV8Version = version;
198
198
 
199
199
  /* eslint-disable es/no-symbol -- required for testing */
200
200
  var V8_VERSION = engineV8Version;
201
- var fails$b = fails$e;
201
+ var fails$8 = fails$b;
202
202
  var global$8 = global$b;
203
203
 
204
- var $String$5 = global$8.String;
204
+ var $String$4 = global$8.String;
205
205
 
206
206
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
207
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$b(function () {
207
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
208
208
  var symbol = Symbol('symbol detection');
209
209
  // Chrome 38 Symbol has incorrect toString conversion
210
210
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
211
211
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
212
212
  // of course, fail.
213
- return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
213
+ return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
214
214
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
215
215
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
216
216
  });
@@ -224,7 +224,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
224
224
 
225
225
  var global$7 = global$b;
226
226
  var shared$2 = shared$3;
227
- var hasOwn$9 = hasOwnProperty_1;
227
+ var hasOwn$8 = hasOwnProperty_1;
228
228
  var uid$1 = uid$2;
229
229
  var NATIVE_SYMBOL = symbolConstructorDetection;
230
230
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
@@ -233,9 +233,9 @@ var Symbol$1 = global$7.Symbol;
233
233
  var WellKnownSymbolsStore = shared$2('wks');
234
234
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
235
235
 
236
- var wellKnownSymbol$a = function (name) {
237
- if (!hasOwn$9(WellKnownSymbolsStore, name)) {
238
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
236
+ var wellKnownSymbol$6 = function (name) {
237
+ if (!hasOwn$8(WellKnownSymbolsStore, name)) {
238
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
239
239
  ? Symbol$1[name]
240
240
  : createWellKnownSymbol('Symbol.' + name);
241
241
  } return WellKnownSymbolsStore[name];
@@ -247,45 +247,45 @@ var documentAll = typeof document == 'object' && document.all;
247
247
  // `IsCallable` abstract operation
248
248
  // https://tc39.es/ecma262/#sec-iscallable
249
249
  // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
250
- var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
250
+ var isCallable$d = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
251
251
  return typeof argument == 'function' || argument === documentAll;
252
252
  } : function (argument) {
253
253
  return typeof argument == 'function';
254
254
  };
255
255
 
256
- var isCallable$d = isCallable$e;
256
+ var isCallable$c = isCallable$d;
257
257
 
258
- var isObject$9 = function (it) {
259
- return typeof it == 'object' ? it !== null : isCallable$d(it);
258
+ var isObject$8 = function (it) {
259
+ return typeof it == 'object' ? it !== null : isCallable$c(it);
260
260
  };
261
261
 
262
- var isObject$8 = isObject$9;
262
+ var isObject$7 = isObject$8;
263
263
 
264
- var $String$4 = String;
265
- var $TypeError$7 = TypeError;
264
+ var $String$3 = String;
265
+ var $TypeError$5 = TypeError;
266
266
 
267
267
  // `Assert: Type(argument) is Object`
268
- var anObject$6 = function (argument) {
269
- if (isObject$8(argument)) return argument;
270
- throw new $TypeError$7($String$4(argument) + ' is not an object');
268
+ var anObject$4 = function (argument) {
269
+ if (isObject$7(argument)) return argument;
270
+ throw new $TypeError$5($String$3(argument) + ' is not an object');
271
271
  };
272
272
 
273
273
  var objectDefineProperties = {};
274
274
 
275
- var fails$a = fails$e;
275
+ var fails$7 = fails$b;
276
276
 
277
277
  // Detect IE8's incomplete defineProperty implementation
278
- var descriptors = !fails$a(function () {
278
+ var descriptors = !fails$7(function () {
279
279
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
280
280
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
281
281
  });
282
282
 
283
283
  var DESCRIPTORS$9 = descriptors;
284
- var fails$9 = fails$e;
284
+ var fails$6 = fails$b;
285
285
 
286
286
  // V8 ~ Chrome 36-
287
287
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
288
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$9(function () {
288
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$6(function () {
289
289
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
290
290
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
291
291
  value: 42,
@@ -296,22 +296,22 @@ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$9(function () {
296
296
  var objectDefineProperty = {};
297
297
 
298
298
  var global$6 = global$b;
299
- var isObject$7 = isObject$9;
299
+ var isObject$6 = isObject$8;
300
300
 
301
301
  var document$1 = global$6.document;
302
302
  // typeof document.createElement is 'object' in old IE
303
- var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
303
+ var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement);
304
304
 
305
305
  var documentCreateElement$2 = function (it) {
306
306
  return EXISTS$1 ? document$1.createElement(it) : {};
307
307
  };
308
308
 
309
309
  var DESCRIPTORS$8 = descriptors;
310
- var fails$8 = fails$e;
310
+ var fails$5 = fails$b;
311
311
  var createElement = documentCreateElement$2;
312
312
 
313
313
  // Thanks to IE8 for its funny defineProperty
314
- var ie8DomDefine = !DESCRIPTORS$8 && !fails$8(function () {
314
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$5(function () {
315
315
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
316
316
  return Object.defineProperty(createElement('div'), 'a', {
317
317
  get: function () { return 7; }
@@ -320,109 +320,109 @@ var ie8DomDefine = !DESCRIPTORS$8 && !fails$8(function () {
320
320
 
321
321
  var NATIVE_BIND = functionBindNative;
322
322
 
323
- var call$6 = Function.prototype.call;
323
+ var call$5 = Function.prototype.call;
324
324
 
325
- var functionCall = NATIVE_BIND ? call$6.bind(call$6) : function () {
326
- return call$6.apply(call$6, arguments);
325
+ var functionCall = NATIVE_BIND ? call$5.bind(call$5) : function () {
326
+ return call$5.apply(call$5, arguments);
327
327
  };
328
328
 
329
329
  var global$5 = global$b;
330
- var isCallable$c = isCallable$e;
330
+ var isCallable$b = isCallable$d;
331
331
 
332
332
  var aFunction = function (argument) {
333
- return isCallable$c(argument) ? argument : undefined;
333
+ return isCallable$b(argument) ? argument : undefined;
334
334
  };
335
335
 
336
336
  var getBuiltIn$3 = function (namespace, method) {
337
337
  return arguments.length < 2 ? aFunction(global$5[namespace]) : global$5[namespace] && global$5[namespace][method];
338
338
  };
339
339
 
340
- var uncurryThis$a = functionUncurryThis;
340
+ var uncurryThis$6 = functionUncurryThis;
341
341
 
342
- var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
342
+ var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
343
343
 
344
344
  var getBuiltIn$2 = getBuiltIn$3;
345
- var isCallable$b = isCallable$e;
346
- var isPrototypeOf$1 = objectIsPrototypeOf;
345
+ var isCallable$a = isCallable$d;
346
+ var isPrototypeOf = objectIsPrototypeOf;
347
347
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
348
348
 
349
- var $Object$2 = Object;
349
+ var $Object$1 = Object;
350
350
 
351
351
  var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
352
352
  return typeof it == 'symbol';
353
353
  } : function (it) {
354
354
  var $Symbol = getBuiltIn$2('Symbol');
355
- return isCallable$b($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
355
+ return isCallable$a($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
356
356
  };
357
357
 
358
- var $String$3 = String;
358
+ var $String$2 = String;
359
359
 
360
- var tryToString$2 = function (argument) {
360
+ var tryToString$1 = function (argument) {
361
361
  try {
362
- return $String$3(argument);
362
+ return $String$2(argument);
363
363
  } catch (error) {
364
364
  return 'Object';
365
365
  }
366
366
  };
367
367
 
368
- var isCallable$a = isCallable$e;
369
- var tryToString$1 = tryToString$2;
368
+ var isCallable$9 = isCallable$d;
369
+ var tryToString = tryToString$1;
370
370
 
371
- var $TypeError$6 = TypeError;
371
+ var $TypeError$4 = TypeError;
372
372
 
373
373
  // `Assert: IsCallable(argument) is true`
374
- var aCallable$3 = function (argument) {
375
- if (isCallable$a(argument)) return argument;
376
- throw new $TypeError$6(tryToString$1(argument) + ' is not a function');
374
+ var aCallable$2 = function (argument) {
375
+ if (isCallable$9(argument)) return argument;
376
+ throw new $TypeError$4(tryToString(argument) + ' is not a function');
377
377
  };
378
378
 
379
- var aCallable$2 = aCallable$3;
379
+ var aCallable$1 = aCallable$2;
380
380
  var isNullOrUndefined = isNullOrUndefined$2;
381
381
 
382
382
  // `GetMethod` abstract operation
383
383
  // https://tc39.es/ecma262/#sec-getmethod
384
384
  var getMethod$1 = function (V, P) {
385
385
  var func = V[P];
386
- return isNullOrUndefined(func) ? undefined : aCallable$2(func);
386
+ return isNullOrUndefined(func) ? undefined : aCallable$1(func);
387
387
  };
388
388
 
389
- var call$5 = functionCall;
390
- var isCallable$9 = isCallable$e;
391
- var isObject$6 = isObject$9;
389
+ var call$4 = functionCall;
390
+ var isCallable$8 = isCallable$d;
391
+ var isObject$5 = isObject$8;
392
392
 
393
- var $TypeError$5 = TypeError;
393
+ var $TypeError$3 = TypeError;
394
394
 
395
395
  // `OrdinaryToPrimitive` abstract operation
396
396
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
397
397
  var ordinaryToPrimitive$1 = function (input, pref) {
398
398
  var fn, val;
399
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
400
- if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$5(fn, input))) return val;
401
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
402
- throw new $TypeError$5("Can't convert object to primitive value");
399
+ if (pref === 'string' && isCallable$8(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
400
+ if (isCallable$8(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
401
+ if (pref !== 'string' && isCallable$8(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
402
+ throw new $TypeError$3("Can't convert object to primitive value");
403
403
  };
404
404
 
405
- var call$4 = functionCall;
406
- var isObject$5 = isObject$9;
405
+ var call$3 = functionCall;
406
+ var isObject$4 = isObject$8;
407
407
  var isSymbol$1 = isSymbol$2;
408
408
  var getMethod = getMethod$1;
409
409
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
410
- var wellKnownSymbol$9 = wellKnownSymbol$a;
410
+ var wellKnownSymbol$5 = wellKnownSymbol$6;
411
411
 
412
- var $TypeError$4 = TypeError;
413
- var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
412
+ var $TypeError$2 = TypeError;
413
+ var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
414
414
 
415
415
  // `ToPrimitive` abstract operation
416
416
  // https://tc39.es/ecma262/#sec-toprimitive
417
417
  var toPrimitive$1 = function (input, pref) {
418
- if (!isObject$5(input) || isSymbol$1(input)) return input;
418
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
419
419
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
420
420
  var result;
421
421
  if (exoticToPrim) {
422
422
  if (pref === undefined) pref = 'default';
423
- result = call$4(exoticToPrim, input, pref);
424
- if (!isObject$5(result) || isSymbol$1(result)) return result;
425
- throw new $TypeError$4("Can't convert object to primitive value");
423
+ result = call$3(exoticToPrim, input, pref);
424
+ if (!isObject$4(result) || isSymbol$1(result)) return result;
425
+ throw new $TypeError$2("Can't convert object to primitive value");
426
426
  }
427
427
  if (pref === undefined) pref = 'number';
428
428
  return ordinaryToPrimitive(input, pref);
@@ -441,10 +441,10 @@ var toPropertyKey$2 = function (argument) {
441
441
  var DESCRIPTORS$7 = descriptors;
442
442
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
443
443
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
444
- var anObject$5 = anObject$6;
444
+ var anObject$3 = anObject$4;
445
445
  var toPropertyKey$1 = toPropertyKey$2;
446
446
 
447
- var $TypeError$3 = TypeError;
447
+ var $TypeError$1 = TypeError;
448
448
  // eslint-disable-next-line es/no-object-defineproperty -- safe
449
449
  var $defineProperty = Object.defineProperty;
450
450
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -456,9 +456,9 @@ var WRITABLE = 'writable';
456
456
  // `Object.defineProperty` method
457
457
  // https://tc39.es/ecma262/#sec-object.defineproperty
458
458
  objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
459
- anObject$5(O);
459
+ anObject$3(O);
460
460
  P = toPropertyKey$1(P);
461
- anObject$5(Attributes);
461
+ anObject$3(Attributes);
462
462
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
463
463
  var current = $getOwnPropertyDescriptor$1(O, P);
464
464
  if (current && current[WRITABLE]) {
@@ -471,26 +471,26 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
471
471
  }
472
472
  } return $defineProperty(O, P, Attributes);
473
473
  } : $defineProperty : function defineProperty(O, P, Attributes) {
474
- anObject$5(O);
474
+ anObject$3(O);
475
475
  P = toPropertyKey$1(P);
476
- anObject$5(Attributes);
476
+ anObject$3(Attributes);
477
477
  if (IE8_DOM_DEFINE$1) try {
478
478
  return $defineProperty(O, P, Attributes);
479
479
  } catch (error) { /* empty */ }
480
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
480
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$1('Accessors not supported');
481
481
  if ('value' in Attributes) O[P] = Attributes.value;
482
482
  return O;
483
483
  };
484
484
 
485
485
  var ceil = Math.ceil;
486
- var floor$1 = Math.floor;
486
+ var floor = Math.floor;
487
487
 
488
488
  // `Math.trunc` method
489
489
  // https://tc39.es/ecma262/#sec-math.trunc
490
490
  // eslint-disable-next-line es/no-math-trunc -- safe
491
491
  var mathTrunc = Math.trunc || function trunc(x) {
492
492
  var n = +x;
493
- return (n > 0 ? floor$1 : ceil)(n);
493
+ return (n > 0 ? floor : ceil)(n);
494
494
  };
495
495
 
496
496
  var trunc = mathTrunc;
@@ -506,44 +506,44 @@ var toIntegerOrInfinity$2 = function (argument) {
506
506
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
507
507
 
508
508
  var max = Math.max;
509
- var min$2 = Math.min;
509
+ var min$1 = Math.min;
510
510
 
511
511
  // Helper for a popular repeating case of the spec:
512
512
  // Let integer be ? ToInteger(index).
513
513
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
514
514
  var toAbsoluteIndex$1 = function (index, length) {
515
515
  var integer = toIntegerOrInfinity$1(index);
516
- return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
516
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
517
517
  };
518
518
 
519
519
  var toIntegerOrInfinity = toIntegerOrInfinity$2;
520
520
 
521
- var min$1 = Math.min;
521
+ var min = Math.min;
522
522
 
523
523
  // `ToLength` abstract operation
524
524
  // https://tc39.es/ecma262/#sec-tolength
525
- var toLength$2 = function (argument) {
525
+ var toLength$1 = function (argument) {
526
526
  var len = toIntegerOrInfinity(argument);
527
- return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
527
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
528
528
  };
529
529
 
530
- var toLength$1 = toLength$2;
530
+ var toLength = toLength$1;
531
531
 
532
532
  // `LengthOfArrayLike` abstract operation
533
533
  // https://tc39.es/ecma262/#sec-lengthofarraylike
534
- var lengthOfArrayLike$2 = function (obj) {
535
- return toLength$1(obj.length);
534
+ var lengthOfArrayLike$1 = function (obj) {
535
+ return toLength(obj.length);
536
536
  };
537
537
 
538
538
  var toIndexedObject$4 = toIndexedObject$5;
539
539
  var toAbsoluteIndex = toAbsoluteIndex$1;
540
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
540
+ var lengthOfArrayLike = lengthOfArrayLike$1;
541
541
 
542
542
  // `Array.prototype.{ indexOf, includes }` methods implementation
543
543
  var createMethod = function (IS_INCLUDES) {
544
544
  return function ($this, el, fromIndex) {
545
545
  var O = toIndexedObject$4($this);
546
- var length = lengthOfArrayLike$1(O);
546
+ var length = lengthOfArrayLike(O);
547
547
  if (length === 0) return !IS_INCLUDES && -1;
548
548
  var index = toAbsoluteIndex(fromIndex, length);
549
549
  var value;
@@ -571,23 +571,23 @@ var arrayIncludes = {
571
571
 
572
572
  var hiddenKeys$4 = {};
573
573
 
574
- var uncurryThis$9 = functionUncurryThis;
575
- var hasOwn$8 = hasOwnProperty_1;
574
+ var uncurryThis$5 = functionUncurryThis;
575
+ var hasOwn$7 = hasOwnProperty_1;
576
576
  var toIndexedObject$3 = toIndexedObject$5;
577
577
  var indexOf = arrayIncludes.indexOf;
578
578
  var hiddenKeys$3 = hiddenKeys$4;
579
579
 
580
- var push$1 = uncurryThis$9([].push);
580
+ var push = uncurryThis$5([].push);
581
581
 
582
582
  var objectKeysInternal = function (object, names) {
583
583
  var O = toIndexedObject$3(object);
584
584
  var i = 0;
585
585
  var result = [];
586
586
  var key;
587
- for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push$1(result, key);
587
+ for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push(result, key);
588
588
  // Don't enum bug & hidden keys
589
- while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
590
- ~indexOf(result, key) || push$1(result, key);
589
+ while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
590
+ ~indexOf(result, key) || push(result, key);
591
591
  }
592
592
  return result;
593
593
  };
@@ -616,7 +616,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
616
616
  var DESCRIPTORS$6 = descriptors;
617
617
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
618
618
  var definePropertyModule$3 = objectDefineProperty;
619
- var anObject$4 = anObject$6;
619
+ var anObject$2 = anObject$4;
620
620
  var toIndexedObject$2 = toIndexedObject$5;
621
621
  var objectKeys$1 = objectKeys$2;
622
622
 
@@ -624,7 +624,7 @@ var objectKeys$1 = objectKeys$2;
624
624
  // https://tc39.es/ecma262/#sec-object.defineproperties
625
625
  // eslint-disable-next-line es/no-object-defineproperties -- safe
626
626
  objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
627
- anObject$4(O);
627
+ anObject$2(O);
628
628
  var props = toIndexedObject$2(Properties);
629
629
  var keys = objectKeys$1(Properties);
630
630
  var length = keys.length;
@@ -648,7 +648,7 @@ var sharedKey$3 = function (key) {
648
648
  };
649
649
 
650
650
  /* global ActiveXObject -- old IE, WSH */
651
- var anObject$3 = anObject$6;
651
+ var anObject$1 = anObject$4;
652
652
  var definePropertiesModule = objectDefineProperties;
653
653
  var enumBugKeys$1 = enumBugKeys$3;
654
654
  var hiddenKeys$2 = hiddenKeys$4;
@@ -722,7 +722,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
722
722
  var objectCreate = Object.create || function create(O, Properties) {
723
723
  var result;
724
724
  if (O !== null) {
725
- EmptyConstructor[PROTOTYPE] = anObject$3(O);
725
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
726
726
  result = new EmptyConstructor();
727
727
  EmptyConstructor[PROTOTYPE] = null;
728
728
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -731,11 +731,11 @@ var objectCreate = Object.create || function create(O, Properties) {
731
731
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
732
732
  };
733
733
 
734
- var wellKnownSymbol$8 = wellKnownSymbol$a;
734
+ var wellKnownSymbol$4 = wellKnownSymbol$6;
735
735
  var create$1 = objectCreate;
736
736
  var defineProperty$4 = objectDefineProperty.f;
737
737
 
738
- var UNSCOPABLES = wellKnownSymbol$8('unscopables');
738
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
739
739
  var ArrayPrototype = Array.prototype;
740
740
 
741
741
  // Array.prototype[@@unscopables]
@@ -755,11 +755,11 @@ var addToUnscopables$1 = function (key) {
755
755
  var iterators = {};
756
756
 
757
757
  var global$4 = global$b;
758
- var isCallable$8 = isCallable$e;
758
+ var isCallable$7 = isCallable$d;
759
759
 
760
760
  var WeakMap$1 = global$4.WeakMap;
761
761
 
762
- var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
762
+ var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
763
763
 
764
764
  var createPropertyDescriptor$3 = function (bitmap, value) {
765
765
  return {
@@ -783,9 +783,9 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value
783
783
 
784
784
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
785
785
  var global$3 = global$b;
786
- var isObject$4 = isObject$9;
786
+ var isObject$3 = isObject$8;
787
787
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
788
- var hasOwn$7 = hasOwnProperty_1;
788
+ var hasOwn$6 = hasOwnProperty_1;
789
789
  var shared = sharedStore.exports;
790
790
  var sharedKey$1 = sharedKey$3;
791
791
  var hiddenKeys$1 = hiddenKeys$4;
@@ -802,7 +802,7 @@ var enforce = function (it) {
802
802
  var getterFor = function (TYPE) {
803
803
  return function (it) {
804
804
  var state;
805
- if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
805
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
806
806
  throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
807
807
  } return state;
808
808
  };
@@ -831,16 +831,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
831
831
  var STATE = sharedKey$1('state');
832
832
  hiddenKeys$1[STATE] = true;
833
833
  set = function (it, metadata) {
834
- if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
834
+ if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
835
835
  metadata.facade = it;
836
836
  createNonEnumerableProperty$3(it, STATE, metadata);
837
837
  return metadata;
838
838
  };
839
839
  get = function (it) {
840
- return hasOwn$7(it, STATE) ? it[STATE] : {};
840
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
841
841
  };
842
842
  has = function (it) {
843
- return hasOwn$7(it, STATE);
843
+ return hasOwn$6(it, STATE);
844
844
  };
845
845
  }
846
846
 
@@ -858,25 +858,25 @@ var objectPropertyIsEnumerable = {};
858
858
 
859
859
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
860
860
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
861
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
861
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
862
862
 
863
863
  // Nashorn ~ JDK8 bug
864
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
864
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
865
865
 
866
866
  // `Object.prototype.propertyIsEnumerable` method implementation
867
867
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
868
868
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
869
- var descriptor = getOwnPropertyDescriptor$2(this, V);
869
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
870
870
  return !!descriptor && descriptor.enumerable;
871
871
  } : $propertyIsEnumerable;
872
872
 
873
873
  var DESCRIPTORS$4 = descriptors;
874
- var call$3 = functionCall;
874
+ var call$2 = functionCall;
875
875
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
876
876
  var createPropertyDescriptor$1 = createPropertyDescriptor$3;
877
877
  var toIndexedObject$1 = toIndexedObject$5;
878
878
  var toPropertyKey = toPropertyKey$2;
879
- var hasOwn$6 = hasOwnProperty_1;
879
+ var hasOwn$5 = hasOwnProperty_1;
880
880
  var IE8_DOM_DEFINE = ie8DomDefine;
881
881
 
882
882
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -890,19 +890,19 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : f
890
890
  if (IE8_DOM_DEFINE) try {
891
891
  return $getOwnPropertyDescriptor(O, P);
892
892
  } catch (error) { /* empty */ }
893
- if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
893
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
894
894
  };
895
895
 
896
896
  var makeBuiltIn$2 = {exports: {}};
897
897
 
898
898
  var DESCRIPTORS$3 = descriptors;
899
- var hasOwn$5 = hasOwnProperty_1;
899
+ var hasOwn$4 = hasOwnProperty_1;
900
900
 
901
901
  var FunctionPrototype = Function.prototype;
902
902
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
903
903
  var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
904
904
 
905
- var EXISTS = hasOwn$5(FunctionPrototype, 'name');
905
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
906
906
  // additional protection from minified / mangled / dropped function names
907
907
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
908
908
  var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
@@ -913,14 +913,14 @@ var functionName = {
913
913
  CONFIGURABLE: CONFIGURABLE
914
914
  };
915
915
 
916
- var uncurryThis$8 = functionUncurryThis;
917
- var isCallable$7 = isCallable$e;
916
+ var uncurryThis$4 = functionUncurryThis;
917
+ var isCallable$6 = isCallable$d;
918
918
  var store = sharedStore.exports;
919
919
 
920
- var functionToString = uncurryThis$8(Function.toString);
920
+ var functionToString = uncurryThis$4(Function.toString);
921
921
 
922
922
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
923
- if (!isCallable$7(store.inspectSource)) {
923
+ if (!isCallable$6(store.inspectSource)) {
924
924
  store.inspectSource = function (it) {
925
925
  return functionToString(it);
926
926
  };
@@ -928,10 +928,10 @@ if (!isCallable$7(store.inspectSource)) {
928
928
 
929
929
  var inspectSource$1 = store.inspectSource;
930
930
 
931
- var uncurryThis$7 = functionUncurryThis;
932
- var fails$7 = fails$e;
933
- var isCallable$6 = isCallable$e;
934
- var hasOwn$4 = hasOwnProperty_1;
931
+ var uncurryThis$3 = functionUncurryThis;
932
+ var fails$4 = fails$b;
933
+ var isCallable$5 = isCallable$d;
934
+ var hasOwn$3 = hasOwnProperty_1;
935
935
  var DESCRIPTORS$2 = descriptors;
936
936
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
937
937
  var inspectSource = inspectSource$1;
@@ -939,40 +939,40 @@ var InternalStateModule$1 = internalState;
939
939
 
940
940
  var enforceInternalState = InternalStateModule$1.enforce;
941
941
  var getInternalState$1 = InternalStateModule$1.get;
942
- var $String$2 = String;
942
+ var $String$1 = String;
943
943
  // eslint-disable-next-line es/no-object-defineproperty -- safe
944
944
  var defineProperty$3 = Object.defineProperty;
945
- var stringSlice$1 = uncurryThis$7(''.slice);
946
- var replace = uncurryThis$7(''.replace);
947
- var join = uncurryThis$7([].join);
945
+ var stringSlice = uncurryThis$3(''.slice);
946
+ var replace = uncurryThis$3(''.replace);
947
+ var join = uncurryThis$3([].join);
948
948
 
949
- var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$7(function () {
949
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$4(function () {
950
950
  return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
951
951
  });
952
952
 
953
953
  var TEMPLATE = String(String).split('String');
954
954
 
955
955
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
956
- if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
957
- name = '[' + replace($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
956
+ if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
957
+ name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
958
958
  }
959
959
  if (options && options.getter) name = 'get ' + name;
960
960
  if (options && options.setter) name = 'set ' + name;
961
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
961
+ if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
962
962
  if (DESCRIPTORS$2) defineProperty$3(value, 'name', { value: name, configurable: true });
963
963
  else value.name = name;
964
964
  }
965
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
965
+ if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
966
966
  defineProperty$3(value, 'length', { value: options.arity });
967
967
  }
968
968
  try {
969
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
969
+ if (options && hasOwn$3(options, 'constructor') && options.constructor) {
970
970
  if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
971
971
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
972
972
  } else if (value.prototype) value.prototype = undefined;
973
973
  } catch (error) { /* empty */ }
974
974
  var state = enforceInternalState(value);
975
- if (!hasOwn$4(state, 'source')) {
975
+ if (!hasOwn$3(state, 'source')) {
976
976
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
977
977
  } return value;
978
978
  };
@@ -980,19 +980,19 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
980
980
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
981
981
  // eslint-disable-next-line no-extend-native -- required
982
982
  Function.prototype.toString = makeBuiltIn$1(function toString() {
983
- return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
983
+ return isCallable$5(this) && getInternalState$1(this).source || inspectSource(this);
984
984
  }, 'toString');
985
985
 
986
- var isCallable$5 = isCallable$e;
986
+ var isCallable$4 = isCallable$d;
987
987
  var definePropertyModule$1 = objectDefineProperty;
988
988
  var makeBuiltIn = makeBuiltIn$2.exports;
989
989
  var defineGlobalProperty$1 = defineGlobalProperty$3;
990
990
 
991
- var defineBuiltIn$4 = function (O, key, value, options) {
991
+ var defineBuiltIn$3 = function (O, key, value, options) {
992
992
  if (!options) options = {};
993
993
  var simple = options.enumerable;
994
994
  var name = options.name !== undefined ? options.name : key;
995
- if (isCallable$5(value)) makeBuiltIn(value, name, options);
995
+ if (isCallable$4(value)) makeBuiltIn(value, name, options);
996
996
  if (options.global) {
997
997
  if (simple) O[key] = value;
998
998
  else defineGlobalProperty$1(key, value);
@@ -1031,21 +1031,21 @@ var objectGetOwnPropertySymbols = {};
1031
1031
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1032
1032
 
1033
1033
  var getBuiltIn = getBuiltIn$3;
1034
- var uncurryThis$6 = functionUncurryThis;
1034
+ var uncurryThis$2 = functionUncurryThis;
1035
1035
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1036
1036
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1037
- var anObject$2 = anObject$6;
1037
+ var anObject = anObject$4;
1038
1038
 
1039
- var concat$1 = uncurryThis$6([].concat);
1039
+ var concat$1 = uncurryThis$2([].concat);
1040
1040
 
1041
1041
  // all object keys, includes non-enumerable and symbols
1042
1042
  var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1043
- var keys = getOwnPropertyNamesModule.f(anObject$2(it));
1043
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
1044
1044
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1045
1045
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1046
1046
  };
1047
1047
 
1048
- var hasOwn$3 = hasOwnProperty_1;
1048
+ var hasOwn$2 = hasOwnProperty_1;
1049
1049
  var ownKeys = ownKeys$1;
1050
1050
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1051
1051
  var definePropertyModule = objectDefineProperty;
@@ -1056,14 +1056,14 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
1056
1056
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1057
1057
  for (var i = 0; i < keys.length; i++) {
1058
1058
  var key = keys[i];
1059
- if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
1059
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1060
1060
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1061
1061
  }
1062
1062
  }
1063
1063
  };
1064
1064
 
1065
- var fails$6 = fails$e;
1066
- var isCallable$4 = isCallable$e;
1065
+ var fails$3 = fails$b;
1066
+ var isCallable$3 = isCallable$d;
1067
1067
 
1068
1068
  var replacement = /#|\.prototype\./;
1069
1069
 
@@ -1071,7 +1071,7 @@ var isForced$1 = function (feature, detection) {
1071
1071
  var value = data[normalize(feature)];
1072
1072
  return value === POLYFILL ? true
1073
1073
  : value === NATIVE ? false
1074
- : isCallable$4(detection) ? fails$6(detection)
1074
+ : isCallable$3(detection) ? fails$3(detection)
1075
1075
  : !!detection;
1076
1076
  };
1077
1077
 
@@ -1086,9 +1086,9 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
1086
1086
  var isForced_1 = isForced$1;
1087
1087
 
1088
1088
  var global$2 = global$b;
1089
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1089
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1090
1090
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1091
- var defineBuiltIn$3 = defineBuiltIn$4;
1091
+ var defineBuiltIn$2 = defineBuiltIn$3;
1092
1092
  var defineGlobalProperty = defineGlobalProperty$3;
1093
1093
  var copyConstructorProperties = copyConstructorProperties$1;
1094
1094
  var isForced = isForced_1;
@@ -1123,7 +1123,7 @@ var _export = function (options, source) {
1123
1123
  if (target) for (key in source) {
1124
1124
  sourceProperty = source[key];
1125
1125
  if (options.dontCallGetSet) {
1126
- descriptor = getOwnPropertyDescriptor$1(target, key);
1126
+ descriptor = getOwnPropertyDescriptor(target, key);
1127
1127
  targetProperty = descriptor && descriptor.value;
1128
1128
  } else targetProperty = target[key];
1129
1129
  FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
@@ -1136,49 +1136,49 @@ var _export = function (options, source) {
1136
1136
  if (options.sham || (targetProperty && targetProperty.sham)) {
1137
1137
  createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1138
1138
  }
1139
- defineBuiltIn$3(target, key, sourceProperty, options);
1139
+ defineBuiltIn$2(target, key, sourceProperty, options);
1140
1140
  }
1141
1141
  };
1142
1142
 
1143
- var fails$5 = fails$e;
1143
+ var fails$2 = fails$b;
1144
1144
 
1145
- var correctPrototypeGetter = !fails$5(function () {
1145
+ var correctPrototypeGetter = !fails$2(function () {
1146
1146
  function F() { /* empty */ }
1147
1147
  F.prototype.constructor = null;
1148
1148
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1149
1149
  return Object.getPrototypeOf(new F()) !== F.prototype;
1150
1150
  });
1151
1151
 
1152
- var hasOwn$2 = hasOwnProperty_1;
1153
- var isCallable$3 = isCallable$e;
1154
- var toObject$2 = toObject$4;
1152
+ var hasOwn$1 = hasOwnProperty_1;
1153
+ var isCallable$2 = isCallable$d;
1154
+ var toObject$1 = toObject$3;
1155
1155
  var sharedKey = sharedKey$3;
1156
1156
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1157
1157
 
1158
1158
  var IE_PROTO = sharedKey('IE_PROTO');
1159
- var $Object$1 = Object;
1160
- var ObjectPrototype = $Object$1.prototype;
1159
+ var $Object = Object;
1160
+ var ObjectPrototype = $Object.prototype;
1161
1161
 
1162
1162
  // `Object.getPrototypeOf` method
1163
1163
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1164
1164
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1165
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1166
- var object = toObject$2(O);
1167
- if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1165
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1166
+ var object = toObject$1(O);
1167
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1168
1168
  var constructor = object.constructor;
1169
- if (isCallable$3(constructor) && object instanceof constructor) {
1169
+ if (isCallable$2(constructor) && object instanceof constructor) {
1170
1170
  return constructor.prototype;
1171
- } return object instanceof $Object$1 ? ObjectPrototype : null;
1171
+ } return object instanceof $Object ? ObjectPrototype : null;
1172
1172
  };
1173
1173
 
1174
- var fails$4 = fails$e;
1175
- var isCallable$2 = isCallable$e;
1176
- var isObject$3 = isObject$9;
1174
+ var fails$1 = fails$b;
1175
+ var isCallable$1 = isCallable$d;
1176
+ var isObject$2 = isObject$8;
1177
1177
  var getPrototypeOf$1 = objectGetPrototypeOf;
1178
- var defineBuiltIn$2 = defineBuiltIn$4;
1179
- var wellKnownSymbol$7 = wellKnownSymbol$a;
1178
+ var defineBuiltIn$1 = defineBuiltIn$3;
1179
+ var wellKnownSymbol$3 = wellKnownSymbol$6;
1180
1180
 
1181
- var ITERATOR$2 = wellKnownSymbol$7('iterator');
1181
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1182
1182
  var BUGGY_SAFARI_ITERATORS$1 = false;
1183
1183
 
1184
1184
  // `%IteratorPrototype%` object
@@ -1196,7 +1196,7 @@ if ([].keys) {
1196
1196
  }
1197
1197
  }
1198
1198
 
1199
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$4(function () {
1199
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$1(function () {
1200
1200
  var test = {};
1201
1201
  // FF44- legacy iterators case
1202
1202
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1206,8 +1206,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1206
1206
 
1207
1207
  // `%IteratorPrototype%[@@iterator]()` method
1208
1208
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1209
- if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
1210
- defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1209
+ if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
1210
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1211
1211
  return this;
1212
1212
  });
1213
1213
  }
@@ -1218,15 +1218,15 @@ var iteratorsCore = {
1218
1218
  };
1219
1219
 
1220
1220
  var defineProperty$2 = objectDefineProperty.f;
1221
- var hasOwn$1 = hasOwnProperty_1;
1222
- var wellKnownSymbol$6 = wellKnownSymbol$a;
1221
+ var hasOwn = hasOwnProperty_1;
1222
+ var wellKnownSymbol$2 = wellKnownSymbol$6;
1223
1223
 
1224
- var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
1224
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1225
1225
 
1226
1226
  var setToStringTag$3 = function (target, TAG, STATIC) {
1227
1227
  if (target && !STATIC) target = target.prototype;
1228
- if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1229
- defineProperty$2(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1228
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
1229
+ defineProperty$2(target, TO_STRING_TAG, { configurable: true, value: TAG });
1230
1230
  }
1231
1231
  };
1232
1232
 
@@ -1246,36 +1246,36 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1246
1246
  return IteratorConstructor;
1247
1247
  };
1248
1248
 
1249
- var uncurryThis$5 = functionUncurryThis;
1250
- var aCallable$1 = aCallable$3;
1249
+ var uncurryThis$1 = functionUncurryThis;
1250
+ var aCallable = aCallable$2;
1251
1251
 
1252
1252
  var functionUncurryThisAccessor = function (object, key, method) {
1253
1253
  try {
1254
1254
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1255
- return uncurryThis$5(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1255
+ return uncurryThis$1(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1256
1256
  } catch (error) { /* empty */ }
1257
1257
  };
1258
1258
 
1259
- var isObject$2 = isObject$9;
1259
+ var isObject$1 = isObject$8;
1260
1260
 
1261
1261
  var isPossiblePrototype$1 = function (argument) {
1262
- return isObject$2(argument) || argument === null;
1262
+ return isObject$1(argument) || argument === null;
1263
1263
  };
1264
1264
 
1265
1265
  var isPossiblePrototype = isPossiblePrototype$1;
1266
1266
 
1267
- var $String$1 = String;
1268
- var $TypeError$2 = TypeError;
1267
+ var $String = String;
1268
+ var $TypeError = TypeError;
1269
1269
 
1270
1270
  var aPossiblePrototype$1 = function (argument) {
1271
1271
  if (isPossiblePrototype(argument)) return argument;
1272
- throw new $TypeError$2("Can't set " + $String$1(argument) + ' as a prototype');
1272
+ throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
1273
1273
  };
1274
1274
 
1275
1275
  /* eslint-disable no-proto -- safe */
1276
1276
  var uncurryThisAccessor = functionUncurryThisAccessor;
1277
- var isObject$1 = isObject$9;
1278
- var requireObjectCoercible$1 = requireObjectCoercible$4;
1277
+ var isObject = isObject$8;
1278
+ var requireObjectCoercible = requireObjectCoercible$3;
1279
1279
  var aPossiblePrototype = aPossiblePrototype$1;
1280
1280
 
1281
1281
  // `Object.setPrototypeOf` method
@@ -1292,34 +1292,34 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1292
1292
  CORRECT_SETTER = test instanceof Array;
1293
1293
  } catch (error) { /* empty */ }
1294
1294
  return function setPrototypeOf(O, proto) {
1295
- requireObjectCoercible$1(O);
1295
+ requireObjectCoercible(O);
1296
1296
  aPossiblePrototype(proto);
1297
- if (!isObject$1(O)) return O;
1297
+ if (!isObject(O)) return O;
1298
1298
  if (CORRECT_SETTER) setter(O, proto);
1299
1299
  else O.__proto__ = proto;
1300
1300
  return O;
1301
1301
  };
1302
1302
  }() : undefined);
1303
1303
 
1304
- var $$3 = _export;
1305
- var call$2 = functionCall;
1304
+ var $$1 = _export;
1305
+ var call$1 = functionCall;
1306
1306
  var FunctionName = functionName;
1307
- var isCallable$1 = isCallable$e;
1307
+ var isCallable = isCallable$d;
1308
1308
  var createIteratorConstructor = iteratorCreateConstructor;
1309
1309
  var getPrototypeOf = objectGetPrototypeOf;
1310
1310
  var setPrototypeOf = objectSetPrototypeOf;
1311
1311
  var setToStringTag$1 = setToStringTag$3;
1312
1312
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1313
- var defineBuiltIn$1 = defineBuiltIn$4;
1314
- var wellKnownSymbol$5 = wellKnownSymbol$a;
1313
+ var defineBuiltIn = defineBuiltIn$3;
1314
+ var wellKnownSymbol$1 = wellKnownSymbol$6;
1315
1315
  var Iterators$1 = iterators;
1316
1316
  var IteratorsCore = iteratorsCore;
1317
1317
 
1318
- var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1318
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1319
1319
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1320
1320
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1321
1321
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1322
- var ITERATOR$1 = wellKnownSymbol$5('iterator');
1322
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1323
1323
  var KEYS = 'keys';
1324
1324
  var VALUES = 'values';
1325
1325
  var ENTRIES = 'entries';
@@ -1359,8 +1359,8 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1359
1359
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1360
1360
  if (setPrototypeOf) {
1361
1361
  setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1362
- } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$1])) {
1363
- defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1362
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1363
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1364
1364
  }
1365
1365
  }
1366
1366
  // Set @@toStringTag to native iterators
@@ -1369,12 +1369,12 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1369
1369
  }
1370
1370
 
1371
1371
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1372
- if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1372
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1373
1373
  if (CONFIGURABLE_FUNCTION_NAME) {
1374
1374
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1375
1375
  } else {
1376
1376
  INCORRECT_VALUES_NAME = true;
1377
- defaultIterator = function values() { return call$2(nativeIterator, this); };
1377
+ defaultIterator = function values() { return call$1(nativeIterator, this); };
1378
1378
  }
1379
1379
  }
1380
1380
 
@@ -1387,14 +1387,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1387
1387
  };
1388
1388
  if (FORCED) for (KEY in methods) {
1389
1389
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1390
- defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1390
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1391
1391
  }
1392
- } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1392
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1393
1393
  }
1394
1394
 
1395
1395
  // define iterator
1396
1396
  if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1397
- defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1397
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1398
1398
  }
1399
1399
  Iterators$1[NAME] = defaultIterator;
1400
1400
 
@@ -1518,9 +1518,9 @@ var DOMTokenListPrototype = domTokenListPrototype;
1518
1518
  var ArrayIteratorMethods = es_array_iterator;
1519
1519
  var createNonEnumerableProperty = createNonEnumerableProperty$4;
1520
1520
  var setToStringTag = setToStringTag$3;
1521
- var wellKnownSymbol$4 = wellKnownSymbol$a;
1521
+ var wellKnownSymbol = wellKnownSymbol$6;
1522
1522
 
1523
- var ITERATOR = wellKnownSymbol$4('iterator');
1523
+ var ITERATOR = wellKnownSymbol('iterator');
1524
1524
  var ArrayValues = ArrayIteratorMethods.values;
1525
1525
 
1526
1526
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
@@ -1549,259 +1549,25 @@ for (var COLLECTION_NAME in DOMIterables) {
1549
1549
 
1550
1550
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1551
1551
 
1552
- var tryToString = tryToString$2;
1553
-
1554
- var $TypeError$1 = TypeError;
1555
-
1556
- var deletePropertyOrThrow$1 = function (O, P) {
1557
- if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
1558
- };
1559
-
1560
- var wellKnownSymbol$3 = wellKnownSymbol$a;
1561
-
1562
- var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
1563
- var test$1 = {};
1564
-
1565
- test$1[TO_STRING_TAG$1] = 'z';
1566
-
1567
- var toStringTagSupport = String(test$1) === '[object z]';
1568
-
1569
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1570
- var isCallable = isCallable$e;
1571
- var classofRaw$1 = classofRaw$2;
1572
- var wellKnownSymbol$2 = wellKnownSymbol$a;
1573
-
1574
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1575
- var $Object = Object;
1576
-
1577
- // ES3 wrong here
1578
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
1579
-
1580
- // fallback for IE11 Script Access Denied error
1581
- var tryGet = function (it, key) {
1582
- try {
1583
- return it[key];
1584
- } catch (error) { /* empty */ }
1585
- };
1586
-
1587
- // getting tag from ES6+ `Object.prototype.toString`
1588
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1589
- var O, tag, result;
1590
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1591
- // @@toStringTag case
1592
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1593
- // builtinTag case
1594
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1595
- // ES3 arguments fallback
1596
- : (result = classofRaw$1(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1597
- };
1598
-
1599
- var classof$1 = classof$2;
1600
-
1601
- var $String = String;
1602
-
1603
- var toString$2 = function (argument) {
1604
- if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1605
- return $String(argument);
1606
- };
1607
-
1608
- var uncurryThis$4 = functionUncurryThis;
1609
-
1610
- var arraySlice$1 = uncurryThis$4([].slice);
1611
-
1612
- var arraySlice = arraySlice$1;
1613
-
1614
- var floor = Math.floor;
1615
-
1616
- var sort = function (array, comparefn) {
1617
- var length = array.length;
1618
-
1619
- if (length < 8) {
1620
- // insertion sort
1621
- var i = 1;
1622
- var element, j;
1623
-
1624
- while (i < length) {
1625
- j = i;
1626
- element = array[i];
1627
- while (j && comparefn(array[j - 1], element) > 0) {
1628
- array[j] = array[--j];
1629
- }
1630
- if (j !== i++) array[j] = element;
1631
- }
1632
- } else {
1633
- // merge sort
1634
- var middle = floor(length / 2);
1635
- var left = sort(arraySlice(array, 0, middle), comparefn);
1636
- var right = sort(arraySlice(array, middle), comparefn);
1637
- var llength = left.length;
1638
- var rlength = right.length;
1639
- var lindex = 0;
1640
- var rindex = 0;
1641
-
1642
- while (lindex < llength || rindex < rlength) {
1643
- array[lindex + rindex] = (lindex < llength && rindex < rlength)
1644
- ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
1645
- : lindex < llength ? left[lindex++] : right[rindex++];
1646
- }
1647
- }
1648
-
1649
- return array;
1650
- };
1651
-
1652
- var arraySort = sort;
1653
-
1654
- var fails$3 = fails$e;
1655
-
1656
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1657
- var method = [][METHOD_NAME];
1658
- return !!method && fails$3(function () {
1659
- // eslint-disable-next-line no-useless-call -- required for testing
1660
- method.call(null, argument || function () { return 1; }, 1);
1661
- });
1662
- };
1663
-
1664
- var userAgent$1 = engineUserAgent;
1665
-
1666
- var firefox = userAgent$1.match(/firefox\/(\d+)/i);
1667
-
1668
- var engineFfVersion = !!firefox && +firefox[1];
1669
-
1670
- var UA = engineUserAgent;
1671
-
1672
- var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
1673
-
1674
- var userAgent = engineUserAgent;
1675
-
1676
- var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
1677
-
1678
- var engineWebkitVersion = !!webkit && +webkit[1];
1679
-
1680
- var $$2 = _export;
1681
- var uncurryThis$3 = functionUncurryThis;
1682
- var aCallable = aCallable$3;
1683
- var toObject$1 = toObject$4;
1684
- var lengthOfArrayLike = lengthOfArrayLike$2;
1685
- var deletePropertyOrThrow = deletePropertyOrThrow$1;
1686
- var toString$1 = toString$2;
1687
- var fails$2 = fails$e;
1688
- var internalSort = arraySort;
1689
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
1690
- var FF = engineFfVersion;
1691
- var IE_OR_EDGE = engineIsIeOrEdge;
1692
- var V8 = engineV8Version;
1693
- var WEBKIT = engineWebkitVersion;
1694
-
1695
- var test = [];
1696
- var nativeSort = uncurryThis$3(test.sort);
1697
- var push = uncurryThis$3(test.push);
1698
-
1699
- // IE8-
1700
- var FAILS_ON_UNDEFINED = fails$2(function () {
1701
- test.sort(undefined);
1702
- });
1703
- // V8 bug
1704
- var FAILS_ON_NULL = fails$2(function () {
1705
- test.sort(null);
1706
- });
1707
- // Old WebKit
1708
- var STRICT_METHOD = arrayMethodIsStrict('sort');
1709
-
1710
- var STABLE_SORT = !fails$2(function () {
1711
- // feature detection can be too slow, so check engines versions
1712
- if (V8) return V8 < 70;
1713
- if (FF && FF > 3) return;
1714
- if (IE_OR_EDGE) return true;
1715
- if (WEBKIT) return WEBKIT < 603;
1716
-
1717
- var result = '';
1718
- var code, chr, value, index;
1719
-
1720
- // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
1721
- for (code = 65; code < 76; code++) {
1722
- chr = String.fromCharCode(code);
1723
-
1724
- switch (code) {
1725
- case 66: case 69: case 70: case 72: value = 3; break;
1726
- case 68: case 71: value = 4; break;
1727
- default: value = 2;
1728
- }
1729
-
1730
- for (index = 0; index < 47; index++) {
1731
- test.push({ k: chr + index, v: value });
1732
- }
1733
- }
1734
-
1735
- test.sort(function (a, b) { return b.v - a.v; });
1736
-
1737
- for (index = 0; index < test.length; index++) {
1738
- chr = test[index].k.charAt(0);
1739
- if (result.charAt(result.length - 1) !== chr) result += chr;
1740
- }
1741
-
1742
- return result !== 'DGBEFHACIJK';
1743
- });
1744
-
1745
- var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
1746
-
1747
- var getSortCompare = function (comparefn) {
1748
- return function (x, y) {
1749
- if (y === undefined) return -1;
1750
- if (x === undefined) return 1;
1751
- if (comparefn !== undefined) return +comparefn(x, y) || 0;
1752
- return toString$1(x) > toString$1(y) ? 1 : -1;
1753
- };
1754
- };
1755
-
1756
- // `Array.prototype.sort` method
1757
- // https://tc39.es/ecma262/#sec-array.prototype.sort
1758
- $$2({ target: 'Array', proto: true, forced: FORCED }, {
1759
- sort: function sort(comparefn) {
1760
- if (comparefn !== undefined) aCallable(comparefn);
1761
-
1762
- var array = toObject$1(this);
1763
-
1764
- if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
1765
-
1766
- var items = [];
1767
- var arrayLength = lengthOfArrayLike(array);
1768
- var itemsLength, index;
1769
-
1770
- for (index = 0; index < arrayLength; index++) {
1771
- if (index in array) push(items, array[index]);
1772
- }
1773
-
1774
- internalSort(items, getSortCompare(comparefn));
1775
-
1776
- itemsLength = lengthOfArrayLike(items);
1777
- index = 0;
1778
-
1779
- while (index < itemsLength) array[index] = items[index++];
1780
- while (index < arrayLength) deletePropertyOrThrow(array, index++);
1781
-
1782
- return array;
1783
- }
1784
- });
1785
-
1786
1552
  var DESCRIPTORS = descriptors;
1787
- var uncurryThis$2 = functionUncurryThis;
1788
- var call$1 = functionCall;
1789
- var fails$1 = fails$e;
1553
+ var uncurryThis = functionUncurryThis;
1554
+ var call = functionCall;
1555
+ var fails = fails$b;
1790
1556
  var objectKeys = objectKeys$2;
1791
1557
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1792
1558
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1793
- var toObject = toObject$4;
1559
+ var toObject = toObject$3;
1794
1560
  var IndexedObject = indexedObject;
1795
1561
 
1796
1562
  // eslint-disable-next-line es/no-object-assign -- safe
1797
1563
  var $assign = Object.assign;
1798
1564
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1799
1565
  var defineProperty = Object.defineProperty;
1800
- var concat = uncurryThis$2([].concat);
1566
+ var concat = uncurryThis([].concat);
1801
1567
 
1802
1568
  // `Object.assign` method
1803
1569
  // https://tc39.es/ecma262/#sec-object.assign
1804
- var objectAssign = !$assign || fails$1(function () {
1570
+ var objectAssign = !$assign || fails(function () {
1805
1571
  // should have correct order of operations (Edge bug)
1806
1572
  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1807
1573
  enumerable: true,
@@ -1835,158 +1601,46 @@ var objectAssign = !$assign || fails$1(function () {
1835
1601
  var key;
1836
1602
  while (length > j) {
1837
1603
  key = keys[j++];
1838
- if (!DESCRIPTORS || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1604
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1839
1605
  }
1840
1606
  } return T;
1841
1607
  } : $assign;
1842
1608
 
1843
- var $$1 = _export;
1609
+ var $ = _export;
1844
1610
  var assign = objectAssign;
1845
1611
 
1846
1612
  // `Object.assign` method
1847
1613
  // https://tc39.es/ecma262/#sec-object.assign
1848
1614
  // eslint-disable-next-line es/no-object-assign -- required for testing
1849
- $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1615
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1850
1616
  assign: assign
1851
1617
  });
1852
1618
 
1853
- var anObject$1 = anObject$6;
1854
-
1855
- // `RegExp.prototype.flags` getter implementation
1856
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1857
- var regexpFlags = function () {
1858
- var that = anObject$1(this);
1859
- var result = '';
1860
- if (that.hasIndices) result += 'd';
1861
- if (that.global) result += 'g';
1862
- if (that.ignoreCase) result += 'i';
1863
- if (that.multiline) result += 'm';
1864
- if (that.dotAll) result += 's';
1865
- if (that.unicode) result += 'u';
1866
- if (that.unicodeSets) result += 'v';
1867
- if (that.sticky) result += 'y';
1868
- return result;
1869
- };
1870
-
1871
- var call = functionCall;
1872
- var hasOwn = hasOwnProperty_1;
1873
- var isPrototypeOf = objectIsPrototypeOf;
1874
- var regExpFlags = regexpFlags;
1875
-
1876
- var RegExpPrototype$1 = RegExp.prototype;
1877
-
1878
- var regexpGetFlags = function (R) {
1879
- var flags = R.flags;
1880
- return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
1881
- ? call(regExpFlags, R) : flags;
1882
- };
1883
-
1884
- var PROPER_FUNCTION_NAME = functionName.PROPER;
1885
- var defineBuiltIn = defineBuiltIn$4;
1886
- var anObject = anObject$6;
1887
- var $toString = toString$2;
1888
- var fails = fails$e;
1889
- var getRegExpFlags = regexpGetFlags;
1890
-
1891
- var TO_STRING = 'toString';
1892
- var RegExpPrototype = RegExp.prototype;
1893
- var nativeToString = RegExpPrototype[TO_STRING];
1894
-
1895
- var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1896
- // FF44- RegExp#toString has a wrong name
1897
- var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1898
-
1899
- // `RegExp.prototype.toString` method
1900
- // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
1901
- if (NOT_GENERIC || INCORRECT_NAME) {
1902
- defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
1903
- var R = anObject(this);
1904
- var pattern = $toString(R.source);
1905
- var flags = $toString(getRegExpFlags(R));
1906
- return '/' + pattern + '/' + flags;
1907
- }, { unsafe: true });
1908
- }
1909
-
1910
- var classofRaw = classofRaw$2;
1911
- var uncurryThis$1 = functionUncurryThis;
1912
-
1913
- var functionUncurryThisClause = function (fn) {
1914
- // Nashorn bug:
1915
- // https://github.com/zloirock/core-js/issues/1128
1916
- // https://github.com/zloirock/core-js/issues/1130
1917
- if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
1918
- };
1919
-
1920
- var isObject = isObject$9;
1921
- var classof = classofRaw$2;
1922
- var wellKnownSymbol$1 = wellKnownSymbol$a;
1923
-
1924
- var MATCH$1 = wellKnownSymbol$1('match');
1925
-
1926
- // `IsRegExp` abstract operation
1927
- // https://tc39.es/ecma262/#sec-isregexp
1928
- var isRegexp = function (it) {
1929
- var isRegExp;
1930
- return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
1931
- };
1932
-
1933
- var isRegExp = isRegexp;
1934
-
1935
- var $TypeError = TypeError;
1936
-
1937
- var notARegexp = function (it) {
1938
- if (isRegExp(it)) {
1939
- throw new $TypeError("The method doesn't accept regular expressions");
1940
- } return it;
1941
- };
1942
-
1943
- var wellKnownSymbol = wellKnownSymbol$a;
1944
-
1945
- var MATCH = wellKnownSymbol('match');
1946
-
1947
- var correctIsRegexpLogic = function (METHOD_NAME) {
1948
- var regexp = /./;
1949
- try {
1950
- '/./'[METHOD_NAME](regexp);
1951
- } catch (error1) {
1952
- try {
1953
- regexp[MATCH] = false;
1954
- return '/./'[METHOD_NAME](regexp);
1955
- } catch (error2) { /* empty */ }
1956
- } return false;
1619
+ const BuildSchemaAsFields = ({
1620
+ components,
1621
+ mappers,
1622
+ formIndex,
1623
+ mountedForm
1624
+ }) => {
1625
+ return components && components.map(component => {
1626
+ const mapper = mappers === null || mappers === void 0 ? void 0 : mappers.find(el => el.componentName === component.component);
1627
+ return mapper ? jsx(AsFormFieldBuilder, Object.assign({
1628
+ formIndex: formIndex,
1629
+ mapper: mapper,
1630
+ formMounted: mountedForm
1631
+ }, component, {
1632
+ children: component.children && component.children.length > 0 && jsx(BuildSchemaAsFields, {
1633
+ formIndex: formIndex,
1634
+ mappers: mappers,
1635
+ components: component.children,
1636
+ mountedForm: mountedForm
1637
+ })
1638
+ }), component.name) : jsx("div", {
1639
+ children: `component mapper not found for ${component.component} from field name ${component.name} on form ${formIndex}`
1640
+ }, component.name);
1641
+ });
1957
1642
  };
1958
1643
 
1959
- var $ = _export;
1960
- var uncurryThis = functionUncurryThisClause;
1961
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1962
- var toLength = toLength$2;
1963
- var toString = toString$2;
1964
- var notARegExp = notARegexp;
1965
- var requireObjectCoercible = requireObjectCoercible$4;
1966
- var correctIsRegExpLogic = correctIsRegexpLogic;
1967
-
1968
- var stringSlice = uncurryThis(''.slice);
1969
- var min = Math.min;
1970
-
1971
- var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
1972
- // https://github.com/zloirock/core-js/pull/702
1973
- var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
1974
- var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
1975
- return descriptor && !descriptor.writable;
1976
- }();
1977
-
1978
- // `String.prototype.startsWith` method
1979
- // https://tc39.es/ecma262/#sec-string.prototype.startswith
1980
- $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
1981
- startsWith: function startsWith(searchString /* , position = 0 */) {
1982
- var that = toString(requireObjectCoercible(this));
1983
- notARegExp(searchString);
1984
- var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
1985
- var search = toString(searchString);
1986
- return stringSlice(that, index, index + search.length) === search;
1987
- }
1988
- });
1989
-
1990
1644
  const FormGroupContext = /*#__PURE__*/createContext({});
1991
1645
  /**
1992
1646
  * context interface to be used isolated or with the context provider
@@ -2035,11 +1689,6 @@ const IsolatedContext = ({
2035
1689
  function submitMultipleFormsByIndex(indexes) {
2036
1690
  return formGroupInstance.current.submitMultipleFormsByIndex(indexes);
2037
1691
  }
2038
- // useEffect(() => {
2039
- // return () => {
2040
- // formGroupInstance.current.destroy();
2041
- // };
2042
- // }, []);
2043
1692
  return {
2044
1693
  addFormWithIndex,
2045
1694
  addForm,
@@ -2098,238 +1747,38 @@ const useFormGroupContext = props => {
2098
1747
  });
2099
1748
  }
2100
1749
  return context;
2101
- };
2102
-
2103
- /**
2104
- * Renders the React element defined on the mappers configuration
2105
- *
2106
- * @param param component props, field instance and children to render
2107
- * @returns
2108
- */
2109
- const FieldWrapperComponentRender = ({
2110
- props,
2111
- fieldInstance,
2112
- children,
2113
- mapper
2114
- }) => {
2115
- var _a, _b, _c;
2116
- const Component = (mapper === null || mapper === void 0 ? void 0 : mapper.component) || ((_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.component);
2117
- const Asynccomponent = (mapper === null || mapper === void 0 ? void 0 : mapper.asynccomponent) || ((_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _b === void 0 ? void 0 : _b.asynccomponent);
2118
- if (Component) return jsx(Component, Object.assign({}, props, {
2119
- children: children && children
2120
- }));
2121
- if (Asynccomponent) return jsx(Suspense, {
2122
- children: jsx(Asynccomponent, Object.assign({}, props, {
2123
- children: children && children
2124
- }))
2125
- });
2126
- return jsx("div", {
2127
- children: `failed to render field ${fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.name} with componentName:${(_c = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _c === void 0 ? void 0 : _c.componentName}, please check mappers`
2128
- });
2129
- };
2130
- /**
2131
- * Base field Wrapper to render the component with the necessary configurations from the schema
2132
- * and mapper configuration
2133
- *
2134
- * @param {TFieldWrapperProps} param FieldWrapper params
2135
- * @returns {ReactElement}
2136
- */
2137
- const FieldWrapper = ({
2138
- name,
2139
- formIndex,
2140
- children,
2141
- props,
2142
- context,
2143
- mounted,
2144
- mapper,
2145
- visibility
2146
- }) => {
2147
- var _a, _b, _c;
2148
- const localContext = useFormGroupContext({});
2149
- /**
2150
- * picks the right context prioritizing the context passed as prop
2151
- */
2152
- const {
2153
- formGroupInstance,
2154
- debugMode
2155
- } = useMemo(() => context ? context : localContext, [context, localContext]);
2156
- const fieldInstance = useMemo(() => {
2157
- var _a;
2158
- return (_a = formGroupInstance.getForm({
2159
- key: formIndex
2160
- })) === null || _a === void 0 ? void 0 : _a.getField({
2161
- key: name
2162
- });
2163
- }, [mounted]);
2164
- const filteredProps = useMemo(() => {
2165
- let returnProps = {};
2166
- if (props) {
2167
- returnProps = FormField.filterProps(props);
2168
- }
2169
- if (fieldInstance) fieldInstance.props = returnProps;
2170
- return returnProps;
2171
- }, [props]);
2172
- const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {
2173
- [((_a = mapper === null || mapper === void 0 ? void 0 : mapper.events) === null || _a === void 0 ? void 0 : _a.setValue) || 'value']: ''
2174
- });
2175
- const [state, setState] = useState({
2176
- visibility: typeof visibility === 'boolean' ? visibility : true,
2177
- props: filteredProps
2178
- });
2179
- const mountedRef = useRef(false);
2180
- /**
2181
- * handles the mounting and unmounting logic onto the field instance
2182
- */
2183
- useEffect(() => {
2184
- if (!fieldInstance || mountedRef.current) return;
2185
- fieldInstance.mountField({
2186
- valueSubscription: value => {
2187
- setValueState(value);
2188
- },
2189
- propsSubscription: ({
2190
- visibility,
2191
- props,
2192
- errors
2193
- }) => {
2194
- setState(prev => Object.assign(Object.assign({}, prev), {
2195
- visibility,
2196
- props,
2197
- errors
2198
- }));
2199
- }
2200
- });
2201
- mountedRef.current = true;
2202
- }, [fieldInstance]);
2203
- useEffect(() => {
2204
- return () => {
2205
- mountedRef.current && (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField());
2206
- };
2207
- }, []);
2208
- /**
2209
- * handles the value change onto the field instance
2210
- */
2211
- const handleChange = useCallback(event => {
2212
- if (!mounted) return;
2213
- fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitValue({
2214
- value: event,
2215
- event: 'ON_FIELD_CHANGE'
2216
- });
2217
- }, [mounted]);
2218
- /**
2219
- * handles the event emission onto the field instance
2220
- */
2221
- const handleEvent = useCallback(event => {
2222
- if (!mounted) return;
2223
- fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitEvents({
2224
- event
2225
- });
2226
- }, [mounted]);
2227
- /**
2228
- * handles the mappers configuration to bind the event submission callback
2229
- * to the corresponding prop defined on the mappers
2230
- */
2231
- const mapProps = useMemo(() => {
2232
- const events = mapper === null || mapper === void 0 ? void 0 : mapper.events;
2233
- const props = {};
2234
- if (events === null || events === void 0 ? void 0 : events.onBlur) props[events.onBlur] = () => handleEvent('ON_FIELD_BLUR');
2235
- if (events === null || events === void 0 ? void 0 : events.getValue) props[events.getValue] = handleChange;
2236
- if (events === null || events === void 0 ? void 0 : events.onFocus) props[events.onFocus] = () => handleEvent('ON_FIELD_FOCUS');
2237
- if (events === null || events === void 0 ? void 0 : events.onClick) props[events.onClick] = () => handleEvent('ON_FIELD_CLICK');
2238
- if (events === null || events === void 0 ? void 0 : events.onSubmit) props[events.onSubmit] = () => handleEvent('ON_FORM_SUBMIT');
2239
- if (events === null || events === void 0 ? void 0 : events.onKeyUp) props[events.onKeyUp] = () => handleEvent('ON_FIELD_KEYUP');
2240
- if (events === null || events === void 0 ? void 0 : events.onKeyDown) props[events.onKeyDown] = () => handleEvent('ON_FIELD_KEYDOWN');
2241
- return props;
2242
- }, [mounted]);
2243
- return state.visibility ? jsxs(Fragment, {
2244
- children: [debugMode && jsxs("div", {
2245
- style: {
2246
- width: '100%',
2247
- display: 'flex',
2248
- flexDirection: 'column'
2249
- },
2250
- children: [jsxs("b", {
2251
- style: {
2252
- padding: '0px',
2253
- margin: '0px'
2254
- },
2255
- children: ["name:", name]
2256
- }), jsxs("b", {
2257
- style: {
2258
- padding: '0px',
2259
- margin: '0px'
2260
- },
2261
- children: ["order:", (_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.originalSchema) === null || _b === void 0 ? void 0 : _b.order]
2262
- }), jsxs("b", {
2263
- style: {
2264
- padding: '0px',
2265
- margin: '0px'
2266
- },
2267
- children: ["path:", fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.path]
2268
- }), jsx("br", {}), jsx("hr", {})]
2269
- }), jsx(FieldWrapperComponentRender, {
2270
- props: Object.assign(Object.assign(Object.assign(Object.assign({}, mapProps), state.props), state.errors), valueState),
2271
- fieldInstance: fieldInstance,
2272
- mapper: mapper,
2273
- children: children ? children : ((_c = state === null || state === void 0 ? void 0 : state.props) === null || _c === void 0 ? void 0 : _c.children) ? state === null || state === void 0 ? void 0 : state.props.children : null
2274
- })]
2275
- }) : jsx(Fragment, {});
2276
- };
2277
-
2278
- const BuildSchemaAsFields = ({
2279
- components,
2280
- mappers,
2281
- formIndex,
2282
- mountedForm
2283
- }) => {
2284
- return components && components.map(component => {
2285
- const mapper = mappers === null || mappers === void 0 ? void 0 : mappers.find(el => el.componentName === component.component);
2286
- return mapper ? jsx(AsFormFieldBuilder, Object.assign({
2287
- formIndex: formIndex,
2288
- mapper: mapper,
2289
- formMounted: mountedForm
2290
- }, component, {
2291
- children: component.children && component.children.length > 0 && jsx(BuildSchemaAsFields, {
2292
- formIndex: formIndex,
2293
- mappers: mappers,
2294
- components: component.children,
2295
- mountedForm: mountedForm
2296
- })
2297
- }), component.name) : jsx("div", {
2298
- children: `component mapper not found for ${component.component} from field name ${component.name} on form ${formIndex}`
2299
- }, component.name);
2300
- });
2301
- };
2302
-
2303
- /******************************************************************************
2304
- Copyright (c) Microsoft Corporation.
2305
-
2306
- Permission to use, copy, modify, and/or distribute this software for any
2307
- purpose with or without fee is hereby granted.
2308
-
2309
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2310
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2311
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2312
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2313
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2314
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2315
- PERFORMANCE OF THIS SOFTWARE.
2316
- ***************************************************************************** */
2317
-
2318
- function __rest(s, e) {
2319
- var t = {};
2320
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2321
- t[p] = s[p];
2322
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
2323
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2324
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2325
- t[p[i]] = s[p[i]];
2326
- }
2327
- return t;
2328
- }
2329
-
2330
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2331
- var e = new Error(message);
2332
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1750
+ };
1751
+
1752
+ /******************************************************************************
1753
+ Copyright (c) Microsoft Corporation.
1754
+
1755
+ Permission to use, copy, modify, and/or distribute this software for any
1756
+ purpose with or without fee is hereby granted.
1757
+
1758
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1759
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1760
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1761
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1762
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1763
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1764
+ PERFORMANCE OF THIS SOFTWARE.
1765
+ ***************************************************************************** */
1766
+
1767
+ function __rest(s, e) {
1768
+ var t = {};
1769
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1770
+ t[p] = s[p];
1771
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1772
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1773
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1774
+ t[p[i]] = s[p[i]];
1775
+ }
1776
+ return t;
1777
+ }
1778
+
1779
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1780
+ var e = new Error(message);
1781
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2333
1782
  };
2334
1783
 
2335
1784
  /**
@@ -2483,18 +1932,9 @@ function Form({
2483
1932
  const schemaIndex = useRef(index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange').current;
2484
1933
  const [mounted, setMounted] = useState(false);
2485
1934
  const mountedRef = useRef(false);
2486
- // const formInstance = useRef(
2487
- // new FormCore({
2488
- // schema,
2489
- // initialValues: initialValues || schema?.initialValues,
2490
- // iVars: iVars || schema?.iVars,
2491
- // action: action || schema?.action,
2492
- // method: method || schema?.method,
2493
- // index: schemaIndex,
2494
- // mappers,
2495
- // config: config || formGroupInstance.config,
2496
- // })
2497
- // );
1935
+ /**
1936
+ * effect to create the form instance and notify the recursive generated fields of it's mounted status
1937
+ */
2498
1938
  useEffect(() => {
2499
1939
  if (mountedRef.current) return;
2500
1940
  formGroupInstance.addForm({
@@ -2514,11 +1954,6 @@ function Form({
2514
1954
  mountedRef.current = true;
2515
1955
  // }
2516
1956
  }, []);
2517
- // useEffect(() => {
2518
- // return () => {
2519
- // formGroupInstance.getForm({ key: schemaIndex })?.destroy();
2520
- // };
2521
- // }, []);
2522
1957
  /**
2523
1958
  * iVars change tracker to update iVars onto form instance
2524
1959
  */
@@ -2628,6 +2063,187 @@ const AsFormField = props => {
2628
2063
  return props.children;
2629
2064
  };
2630
2065
 
2066
+ /**
2067
+ * Renders the React element defined on the mappers configuration
2068
+ *
2069
+ * @param param component props, field instance and children to render
2070
+ * @returns
2071
+ */
2072
+ const FieldWrapperComponentRender = ({
2073
+ props,
2074
+ fieldInstance,
2075
+ children,
2076
+ mapper
2077
+ }) => {
2078
+ var _a, _b, _c;
2079
+ const Component = (mapper === null || mapper === void 0 ? void 0 : mapper.component) || ((_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.component);
2080
+ const Asynccomponent = (mapper === null || mapper === void 0 ? void 0 : mapper.asynccomponent) || ((_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _b === void 0 ? void 0 : _b.asynccomponent);
2081
+ if (Component) return jsx(Component, Object.assign({}, props, {
2082
+ children: children && children
2083
+ }));
2084
+ if (Asynccomponent) return jsx(Suspense, {
2085
+ children: jsx(Asynccomponent, Object.assign({}, props, {
2086
+ children: children && children
2087
+ }))
2088
+ });
2089
+ return jsx("div", {
2090
+ children: `failed to render field ${fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.name} with componentName:${(_c = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _c === void 0 ? void 0 : _c.componentName}, please check mappers`
2091
+ });
2092
+ };
2093
+ /**
2094
+ * Base field Wrapper to render the component with the necessary configurations from the schema
2095
+ * and mapper configuration
2096
+ *
2097
+ * @param {TFieldWrapperProps} param FieldWrapper params
2098
+ * @returns {ReactElement}
2099
+ */
2100
+ const FieldWrapper = ({
2101
+ name,
2102
+ formIndex,
2103
+ children,
2104
+ props,
2105
+ context,
2106
+ mounted,
2107
+ mapper,
2108
+ visibility
2109
+ }) => {
2110
+ var _a, _b, _c;
2111
+ const localContext = useFormGroupContext({});
2112
+ /**
2113
+ * picks the right context prioritizing the context passed as prop
2114
+ */
2115
+ const {
2116
+ formGroupInstance,
2117
+ debugMode
2118
+ } = useMemo(() => context ? context : localContext, [context, localContext]);
2119
+ const fieldInstance = useMemo(() => {
2120
+ var _a;
2121
+ return (_a = formGroupInstance.getForm({
2122
+ key: formIndex
2123
+ })) === null || _a === void 0 ? void 0 : _a.getField({
2124
+ key: name
2125
+ });
2126
+ }, [mounted]);
2127
+ /**
2128
+ * props with templates stripped until the field ins't ready on the instance
2129
+ */
2130
+ const filteredProps = useMemo(() => {
2131
+ let returnProps = {};
2132
+ if (props) {
2133
+ returnProps = FormField.filterProps(props);
2134
+ }
2135
+ if (fieldInstance) fieldInstance.props = returnProps;
2136
+ return returnProps;
2137
+ }, [props]);
2138
+ const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {
2139
+ [((_a = mapper === null || mapper === void 0 ? void 0 : mapper.events) === null || _a === void 0 ? void 0 : _a.setValue) || 'value']: ''
2140
+ });
2141
+ const [state, setState] = useState({
2142
+ visibility: typeof visibility === 'boolean' ? visibility : true,
2143
+ props: filteredProps
2144
+ });
2145
+ const mountedRef = useRef(false);
2146
+ /**
2147
+ * handles the mounting and unmounting logic onto the field instance
2148
+ */
2149
+ useEffect(() => {
2150
+ if (!fieldInstance || mountedRef.current) return;
2151
+ fieldInstance.mountField({
2152
+ valueSubscription: value => {
2153
+ setValueState(value);
2154
+ },
2155
+ propsSubscription: ({
2156
+ visibility,
2157
+ props,
2158
+ errors
2159
+ }) => {
2160
+ setState(prev => Object.assign(Object.assign({}, prev), {
2161
+ visibility,
2162
+ props,
2163
+ errors
2164
+ }));
2165
+ }
2166
+ });
2167
+ mountedRef.current = true;
2168
+ }, [fieldInstance]);
2169
+ /**
2170
+ * recycle effect to remove the field Subscriptions due to memory leaks
2171
+ */
2172
+ useEffect(() => {
2173
+ return () => {
2174
+ mountedRef.current && (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField());
2175
+ };
2176
+ }, []);
2177
+ /**
2178
+ * handles the value change onto the field instance
2179
+ */
2180
+ const handleChange = useCallback(event => {
2181
+ if (!mounted) return;
2182
+ fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitValue({
2183
+ value: event,
2184
+ event: 'ON_FIELD_CHANGE'
2185
+ });
2186
+ }, [mounted]);
2187
+ /**
2188
+ * handles the event emission onto the field instance
2189
+ */
2190
+ const handleEvent = useCallback(event => {
2191
+ if (!mounted) return;
2192
+ fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitEvents({
2193
+ event
2194
+ });
2195
+ }, [mounted]);
2196
+ /**
2197
+ * handles the mappers configuration to bind the event submission callback
2198
+ * to the corresponding prop defined on the mappers
2199
+ */
2200
+ const mapProps = useMemo(() => {
2201
+ const events = mapper === null || mapper === void 0 ? void 0 : mapper.events;
2202
+ const props = {};
2203
+ if (events === null || events === void 0 ? void 0 : events.onBlur) props[events.onBlur] = () => handleEvent('ON_FIELD_BLUR');
2204
+ if (events === null || events === void 0 ? void 0 : events.getValue) props[events.getValue] = handleChange;
2205
+ if (events === null || events === void 0 ? void 0 : events.onFocus) props[events.onFocus] = () => handleEvent('ON_FIELD_FOCUS');
2206
+ if (events === null || events === void 0 ? void 0 : events.onClick) props[events.onClick] = () => handleEvent('ON_FIELD_CLICK');
2207
+ if (events === null || events === void 0 ? void 0 : events.onSubmit) props[events.onSubmit] = () => handleEvent('ON_FORM_SUBMIT');
2208
+ if (events === null || events === void 0 ? void 0 : events.onKeyUp) props[events.onKeyUp] = () => handleEvent('ON_FIELD_KEYUP');
2209
+ if (events === null || events === void 0 ? void 0 : events.onKeyDown) props[events.onKeyDown] = () => handleEvent('ON_FIELD_KEYDOWN');
2210
+ return props;
2211
+ }, [mounted]);
2212
+ return state.visibility ? jsxs(Fragment, {
2213
+ children: [debugMode && jsxs("div", {
2214
+ style: {
2215
+ width: '100%',
2216
+ display: 'flex',
2217
+ flexDirection: 'column'
2218
+ },
2219
+ children: [jsxs("b", {
2220
+ style: {
2221
+ padding: '0px',
2222
+ margin: '0px'
2223
+ },
2224
+ children: ["name:", name]
2225
+ }), jsxs("b", {
2226
+ style: {
2227
+ padding: '0px',
2228
+ margin: '0px'
2229
+ },
2230
+ children: ["order:", (_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.originalSchema) === null || _b === void 0 ? void 0 : _b.order]
2231
+ }), jsxs("b", {
2232
+ style: {
2233
+ padding: '0px',
2234
+ margin: '0px'
2235
+ },
2236
+ children: ["path:", fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.path]
2237
+ }), jsx("br", {}), jsx("hr", {})]
2238
+ }), jsx(FieldWrapperComponentRender, {
2239
+ props: Object.assign(Object.assign(Object.assign(Object.assign({}, mapProps), state.props), state.errors), valueState),
2240
+ fieldInstance: fieldInstance,
2241
+ mapper: mapper,
2242
+ children: children ? children : ((_c = state === null || state === void 0 ? void 0 : state.props) === null || _c === void 0 ? void 0 : _c.children) ? state === null || state === void 0 ? void 0 : state.props.children : null
2243
+ })]
2244
+ }) : jsx(Fragment, {});
2245
+ };
2246
+
2631
2247
  /**
2632
2248
  * Component Wrapper to render form fields without the Form component, gets additional formId and mapper since
2633
2249
  * it won't rely on them and needs to be manually declared
@@ -2667,6 +2283,10 @@ const AsFormFieldBuilder = props => {
2667
2283
  mountedRef.current = true;
2668
2284
  }
2669
2285
  }, [props.formMounted]);
2286
+ /**
2287
+ * recycle effect to remove the field from the form instance when the field leaves the vDOM
2288
+ * and the subscriptions
2289
+ */
2670
2290
  useEffect(() => {
2671
2291
  return () => {
2672
2292
  var _a, _b;