@vention/machine-logic-ui-sdk 0.23.0 → 0.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -24,7 +24,7 @@ var globalThis_1 =
24
24
 
25
25
  var objectGetOwnPropertyDescriptor = {};
26
26
 
27
- var fails$i = function (exec) {
27
+ var fails$j = function (exec) {
28
28
  try {
29
29
  return !!exec();
30
30
  } catch (error) {
@@ -32,17 +32,17 @@ var fails$i = function (exec) {
32
32
  }
33
33
  };
34
34
 
35
- var fails$h = fails$i;
35
+ var fails$i = fails$j;
36
36
 
37
37
  // Detect IE8's incomplete defineProperty implementation
38
- var descriptors = !fails$h(function () {
38
+ var descriptors = !fails$i(function () {
39
39
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
40
40
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
41
41
  });
42
42
 
43
- var fails$g = fails$i;
43
+ var fails$h = fails$j;
44
44
 
45
- var functionBindNative = !fails$g(function () {
45
+ var functionBindNative = !fails$h(function () {
46
46
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
47
47
  var test = (function () { /* empty */ }).bind();
48
48
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -51,10 +51,10 @@ var functionBindNative = !fails$g(function () {
51
51
 
52
52
  var NATIVE_BIND$2 = functionBindNative;
53
53
 
54
- var call$c = Function.prototype.call;
54
+ var call$f = Function.prototype.call;
55
55
 
56
- var functionCall = NATIVE_BIND$2 ? call$c.bind(call$c) : function () {
57
- return call$c.apply(call$c, arguments);
56
+ var functionCall = NATIVE_BIND$2 ? call$f.bind(call$f) : function () {
57
+ return call$f.apply(call$f, arguments);
58
58
  };
59
59
 
60
60
  var objectPropertyIsEnumerable = {};
@@ -85,33 +85,33 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
85
85
  var NATIVE_BIND$1 = functionBindNative;
86
86
 
87
87
  var FunctionPrototype$2 = Function.prototype;
88
- var call$b = FunctionPrototype$2.call;
89
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$b, call$b);
88
+ var call$e = FunctionPrototype$2.call;
89
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$e, call$e);
90
90
 
91
91
  var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
92
92
  return function () {
93
- return call$b.apply(fn, arguments);
93
+ return call$e.apply(fn, arguments);
94
94
  };
95
95
  };
96
96
 
97
- var uncurryThis$g = functionUncurryThis;
97
+ var uncurryThis$i = functionUncurryThis;
98
98
 
99
- var toString$8 = uncurryThis$g({}.toString);
100
- var stringSlice$6 = uncurryThis$g(''.slice);
99
+ var toString$8 = uncurryThis$i({}.toString);
100
+ var stringSlice$6 = uncurryThis$i(''.slice);
101
101
 
102
102
  var classofRaw$2 = function (it) {
103
103
  return stringSlice$6(toString$8(it), 8, -1);
104
104
  };
105
105
 
106
- var uncurryThis$f = functionUncurryThis;
107
- var fails$f = fails$i;
106
+ var uncurryThis$h = functionUncurryThis;
107
+ var fails$g = fails$j;
108
108
  var classof$5 = classofRaw$2;
109
109
 
110
110
  var $Object$4 = Object;
111
- var split = uncurryThis$f(''.split);
111
+ var split = uncurryThis$h(''.split);
112
112
 
113
113
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
- var indexedObject = fails$f(function () {
114
+ var indexedObject = fails$g(function () {
115
115
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
116
  // eslint-disable-next-line no-prototype-builtins -- safe
117
117
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -127,12 +127,12 @@ var isNullOrUndefined$3 = function (it) {
127
127
 
128
128
  var isNullOrUndefined$2 = isNullOrUndefined$3;
129
129
 
130
- var $TypeError$a = TypeError;
130
+ var $TypeError$b = TypeError;
131
131
 
132
132
  // `RequireObjectCoercible` abstract operation
133
133
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
134
134
  var requireObjectCoercible$7 = function (it) {
135
- if (isNullOrUndefined$2(it)) throw new $TypeError$a("Can't call method on " + it);
135
+ if (isNullOrUndefined$2(it)) throw new $TypeError$b("Can't call method on " + it);
136
136
  return it;
137
137
  };
138
138
 
@@ -169,13 +169,13 @@ var aFunction = function (argument) {
169
169
  return isCallable$f(argument) ? argument : undefined;
170
170
  };
171
171
 
172
- var getBuiltIn$3 = function (namespace, method) {
172
+ var getBuiltIn$4 = function (namespace, method) {
173
173
  return arguments.length < 2 ? aFunction(globalThis$f[namespace]) : globalThis$f[namespace] && globalThis$f[namespace][method];
174
174
  };
175
175
 
176
- var uncurryThis$e = functionUncurryThis;
176
+ var uncurryThis$g = functionUncurryThis;
177
177
 
178
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
178
+ var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
179
179
 
180
180
  var globalThis$e = globalThis_1;
181
181
 
@@ -214,13 +214,13 @@ var environmentV8Version = version;
214
214
 
215
215
  /* eslint-disable es/no-symbol -- required for testing */
216
216
  var V8_VERSION = environmentV8Version;
217
- var fails$e = fails$i;
217
+ var fails$f = fails$j;
218
218
  var globalThis$c = globalThis_1;
219
219
 
220
220
  var $String$5 = globalThis$c.String;
221
221
 
222
222
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
223
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
223
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$f(function () {
224
224
  var symbol = Symbol('symbol detection');
225
225
  // Chrome 38 Symbol has incorrect toString conversion
226
226
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -238,7 +238,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
238
238
  && !Symbol.sham
239
239
  && typeof Symbol.iterator == 'symbol';
240
240
 
241
- var getBuiltIn$2 = getBuiltIn$3;
241
+ var getBuiltIn$3 = getBuiltIn$4;
242
242
  var isCallable$e = isCallable$h;
243
243
  var isPrototypeOf$1 = objectIsPrototypeOf;
244
244
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
@@ -248,7 +248,7 @@ var $Object$3 = Object;
248
248
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
249
249
  return typeof it == 'symbol';
250
250
  } : function (it) {
251
- var $Symbol = getBuiltIn$2('Symbol');
251
+ var $Symbol = getBuiltIn$3('Symbol');
252
252
  return isCallable$e($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
253
253
  };
254
254
 
@@ -265,38 +265,38 @@ var tryToString$1 = function (argument) {
265
265
  var isCallable$d = isCallable$h;
266
266
  var tryToString = tryToString$1;
267
267
 
268
- var $TypeError$9 = TypeError;
268
+ var $TypeError$a = TypeError;
269
269
 
270
270
  // `Assert: IsCallable(argument) is true`
271
- var aCallable$2 = function (argument) {
271
+ var aCallable$3 = function (argument) {
272
272
  if (isCallable$d(argument)) return argument;
273
- throw new $TypeError$9(tryToString(argument) + ' is not a function');
273
+ throw new $TypeError$a(tryToString(argument) + ' is not a function');
274
274
  };
275
275
 
276
- var aCallable$1 = aCallable$2;
276
+ var aCallable$2 = aCallable$3;
277
277
  var isNullOrUndefined$1 = isNullOrUndefined$3;
278
278
 
279
279
  // `GetMethod` abstract operation
280
280
  // https://tc39.es/ecma262/#sec-getmethod
281
- var getMethod$2 = function (V, P) {
281
+ var getMethod$3 = function (V, P) {
282
282
  var func = V[P];
283
- return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
283
+ return isNullOrUndefined$1(func) ? undefined : aCallable$2(func);
284
284
  };
285
285
 
286
- var call$a = functionCall;
286
+ var call$d = functionCall;
287
287
  var isCallable$c = isCallable$h;
288
288
  var isObject$8 = isObject$9;
289
289
 
290
- var $TypeError$8 = TypeError;
290
+ var $TypeError$9 = TypeError;
291
291
 
292
292
  // `OrdinaryToPrimitive` abstract operation
293
293
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
294
294
  var ordinaryToPrimitive$1 = function (input, pref) {
295
295
  var fn, val;
296
- if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$a(fn, input))) return val;
297
- if (isCallable$c(fn = input.valueOf) && !isObject$8(val = call$a(fn, input))) return val;
298
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$a(fn, input))) return val;
299
- throw new $TypeError$8("Can't convert object to primitive value");
296
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$d(fn, input))) return val;
297
+ if (isCallable$c(fn = input.valueOf) && !isObject$8(val = call$d(fn, input))) return val;
298
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$d(fn, input))) return val;
299
+ throw new $TypeError$9("Can't convert object to primitive value");
300
300
  };
301
301
 
302
302
  var sharedStore = {exports: {}};
@@ -346,10 +346,10 @@ var toObject$4 = function (argument) {
346
346
  return $Object$2(requireObjectCoercible$5(argument));
347
347
  };
348
348
 
349
- var uncurryThis$d = functionUncurryThis;
349
+ var uncurryThis$f = functionUncurryThis;
350
350
  var toObject$3 = toObject$4;
351
351
 
352
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
352
+ var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
353
353
 
354
354
  // `HasOwnProperty` abstract operation
355
355
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -358,11 +358,11 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
358
358
  return hasOwnProperty(toObject$3(it), key);
359
359
  };
360
360
 
361
- var uncurryThis$c = functionUncurryThis;
361
+ var uncurryThis$e = functionUncurryThis;
362
362
 
363
363
  var id = 0;
364
364
  var postfix = Math.random();
365
- var toString$7 = uncurryThis$c(1.0.toString);
365
+ var toString$7 = uncurryThis$e(1.0.toString);
366
366
 
367
367
  var uid$2 = function (key) {
368
368
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36);
@@ -387,27 +387,27 @@ var wellKnownSymbol$c = function (name) {
387
387
  } return WellKnownSymbolsStore[name];
388
388
  };
389
389
 
390
- var call$9 = functionCall;
390
+ var call$c = functionCall;
391
391
  var isObject$7 = isObject$9;
392
392
  var isSymbol$1 = isSymbol$2;
393
- var getMethod$1 = getMethod$2;
393
+ var getMethod$2 = getMethod$3;
394
394
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
395
395
  var wellKnownSymbol$b = wellKnownSymbol$c;
396
396
 
397
- var $TypeError$7 = TypeError;
397
+ var $TypeError$8 = TypeError;
398
398
  var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
399
399
 
400
400
  // `ToPrimitive` abstract operation
401
401
  // https://tc39.es/ecma262/#sec-toprimitive
402
402
  var toPrimitive$1 = function (input, pref) {
403
403
  if (!isObject$7(input) || isSymbol$1(input)) return input;
404
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
404
+ var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
405
405
  var result;
406
406
  if (exoticToPrim) {
407
407
  if (pref === undefined) pref = 'default';
408
- result = call$9(exoticToPrim, input, pref);
408
+ result = call$c(exoticToPrim, input, pref);
409
409
  if (!isObject$7(result) || isSymbol$1(result)) return result;
410
- throw new $TypeError$7("Can't convert object to primitive value");
410
+ throw new $TypeError$8("Can't convert object to primitive value");
411
411
  }
412
412
  if (pref === undefined) pref = 'number';
413
413
  return ordinaryToPrimitive(input, pref);
@@ -435,11 +435,11 @@ var documentCreateElement$2 = function (it) {
435
435
  };
436
436
 
437
437
  var DESCRIPTORS$9 = descriptors;
438
- var fails$d = fails$i;
438
+ var fails$e = fails$j;
439
439
  var createElement = documentCreateElement$2;
440
440
 
441
441
  // Thanks to IE8 for its funny defineProperty
442
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$d(function () {
442
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$e(function () {
443
443
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
444
444
  return Object.defineProperty(createElement('div'), 'a', {
445
445
  get: function () { return 7; }
@@ -447,7 +447,7 @@ var ie8DomDefine = !DESCRIPTORS$9 && !fails$d(function () {
447
447
  });
448
448
 
449
449
  var DESCRIPTORS$8 = descriptors;
450
- var call$8 = functionCall;
450
+ var call$b = functionCall;
451
451
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
452
452
  var createPropertyDescriptor$2 = createPropertyDescriptor$3;
453
453
  var toIndexedObject$4 = toIndexedObject$5;
@@ -466,17 +466,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 :
466
466
  if (IE8_DOM_DEFINE$1) try {
467
467
  return $getOwnPropertyDescriptor$1(O, P);
468
468
  } catch (error) { /* empty */ }
469
- if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$8(propertyIsEnumerableModule.f, O, P), O[P]);
469
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$b(propertyIsEnumerableModule.f, O, P), O[P]);
470
470
  };
471
471
 
472
472
  var objectDefineProperty = {};
473
473
 
474
474
  var DESCRIPTORS$7 = descriptors;
475
- var fails$c = fails$i;
475
+ var fails$d = fails$j;
476
476
 
477
477
  // V8 ~ Chrome 36-
478
478
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
479
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$c(function () {
479
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$d(function () {
480
480
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
481
481
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
482
482
  value: 42,
@@ -487,21 +487,21 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$c(function () {
487
487
  var isObject$5 = isObject$9;
488
488
 
489
489
  var $String$3 = String;
490
- var $TypeError$6 = TypeError;
490
+ var $TypeError$7 = TypeError;
491
491
 
492
492
  // `Assert: Type(argument) is Object`
493
- var anObject$9 = function (argument) {
493
+ var anObject$b = function (argument) {
494
494
  if (isObject$5(argument)) return argument;
495
- throw new $TypeError$6($String$3(argument) + ' is not an object');
495
+ throw new $TypeError$7($String$3(argument) + ' is not an object');
496
496
  };
497
497
 
498
498
  var DESCRIPTORS$6 = descriptors;
499
499
  var IE8_DOM_DEFINE = ie8DomDefine;
500
500
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
501
- var anObject$8 = anObject$9;
501
+ var anObject$a = anObject$b;
502
502
  var toPropertyKey = toPropertyKey$2;
503
503
 
504
- var $TypeError$5 = TypeError;
504
+ var $TypeError$6 = TypeError;
505
505
  // eslint-disable-next-line es/no-object-defineproperty -- safe
506
506
  var $defineProperty = Object.defineProperty;
507
507
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -513,9 +513,9 @@ var WRITABLE = 'writable';
513
513
  // `Object.defineProperty` method
514
514
  // https://tc39.es/ecma262/#sec-object.defineproperty
515
515
  objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
516
- anObject$8(O);
516
+ anObject$a(O);
517
517
  P = toPropertyKey(P);
518
- anObject$8(Attributes);
518
+ anObject$a(Attributes);
519
519
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
520
520
  var current = $getOwnPropertyDescriptor(O, P);
521
521
  if (current && current[WRITABLE]) {
@@ -528,13 +528,13 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
528
528
  }
529
529
  } return $defineProperty(O, P, Attributes);
530
530
  } : $defineProperty : function defineProperty(O, P, Attributes) {
531
- anObject$8(O);
531
+ anObject$a(O);
532
532
  P = toPropertyKey(P);
533
- anObject$8(Attributes);
533
+ anObject$a(Attributes);
534
534
  if (IE8_DOM_DEFINE) try {
535
535
  return $defineProperty(O, P, Attributes);
536
536
  } catch (error) { /* empty */ }
537
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
537
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$6('Accessors not supported');
538
538
  if ('value' in Attributes) O[P] = Attributes.value;
539
539
  return O;
540
540
  };
@@ -570,11 +570,11 @@ var functionName = {
570
570
  CONFIGURABLE: CONFIGURABLE
571
571
  };
572
572
 
573
- var uncurryThis$b = functionUncurryThis;
573
+ var uncurryThis$d = functionUncurryThis;
574
574
  var isCallable$b = isCallable$h;
575
575
  var store$1 = sharedStoreExports;
576
576
 
577
- var functionToString = uncurryThis$b(Function.toString);
577
+ var functionToString = uncurryThis$d(Function.toString);
578
578
 
579
579
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
580
580
  if (!isCallable$b(store$1.inspectSource)) {
@@ -595,10 +595,10 @@ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String
595
595
  var shared$2 = shared$4;
596
596
  var uid = uid$2;
597
597
 
598
- var keys = shared$2('keys');
598
+ var keys$1 = shared$2('keys');
599
599
 
600
600
  var sharedKey$3 = function (key) {
601
- return keys[key] || (keys[key] = uid(key));
601
+ return keys$1[key] || (keys$1[key] = uid(key));
602
602
  };
603
603
 
604
604
  var hiddenKeys$4 = {};
@@ -615,10 +615,10 @@ var hiddenKeys$3 = hiddenKeys$4;
615
615
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
616
616
  var TypeError$1 = globalThis$6.TypeError;
617
617
  var WeakMap = globalThis$6.WeakMap;
618
- var set, get, has;
618
+ var set, get, has$6;
619
619
 
620
620
  var enforce = function (it) {
621
- return has(it) ? get(it) : set(it, {});
621
+ return has$6(it) ? get(it) : set(it, {});
622
622
  };
623
623
 
624
624
  var getterFor = function (TYPE) {
@@ -646,7 +646,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
646
646
  get = function (it) {
647
647
  return store.get(it) || {};
648
648
  };
649
- has = function (it) {
649
+ has$6 = function (it) {
650
650
  return store.has(it);
651
651
  };
652
652
  } else {
@@ -661,7 +661,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
661
661
  get = function (it) {
662
662
  return hasOwn$6(it, STATE) ? it[STATE] : {};
663
663
  };
664
- has = function (it) {
664
+ has$6 = function (it) {
665
665
  return hasOwn$6(it, STATE);
666
666
  };
667
667
  }
@@ -669,13 +669,13 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
669
669
  var internalState = {
670
670
  set: set,
671
671
  get: get,
672
- has: has,
672
+ has: has$6,
673
673
  enforce: enforce,
674
674
  getterFor: getterFor
675
675
  };
676
676
 
677
- var uncurryThis$a = functionUncurryThis;
678
- var fails$b = fails$i;
677
+ var uncurryThis$c = functionUncurryThis;
678
+ var fails$c = fails$j;
679
679
  var isCallable$9 = isCallable$h;
680
680
  var hasOwn$5 = hasOwnProperty_1;
681
681
  var DESCRIPTORS$3 = descriptors;
@@ -688,11 +688,11 @@ var getInternalState$2 = InternalStateModule$1.get;
688
688
  var $String$2 = String;
689
689
  // eslint-disable-next-line es/no-object-defineproperty -- safe
690
690
  var defineProperty$3 = Object.defineProperty;
691
- var stringSlice$5 = uncurryThis$a(''.slice);
692
- var replace$2 = uncurryThis$a(''.replace);
693
- var join = uncurryThis$a([].join);
691
+ var stringSlice$5 = uncurryThis$c(''.slice);
692
+ var replace$2 = uncurryThis$c(''.replace);
693
+ var join = uncurryThis$c([].join);
694
694
 
695
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$b(function () {
695
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$c(function () {
696
696
  return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
697
697
  });
698
698
 
@@ -776,33 +776,33 @@ var trunc = mathTrunc;
776
776
 
777
777
  // `ToIntegerOrInfinity` abstract operation
778
778
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
779
- var toIntegerOrInfinity$4 = function (argument) {
779
+ var toIntegerOrInfinity$5 = function (argument) {
780
780
  var number = +argument;
781
781
  // eslint-disable-next-line no-self-compare -- NaN check
782
782
  return number !== number || number === 0 ? 0 : trunc(number);
783
783
  };
784
784
 
785
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
785
+ var toIntegerOrInfinity$4 = toIntegerOrInfinity$5;
786
786
 
787
- var max$1 = Math.max;
787
+ var max$2 = Math.max;
788
788
  var min$3 = Math.min;
789
789
 
790
790
  // Helper for a popular repeating case of the spec:
791
791
  // Let integer be ? ToInteger(index).
792
792
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
793
793
  var toAbsoluteIndex$1 = function (index, length) {
794
- var integer = toIntegerOrInfinity$3(index);
795
- return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
794
+ var integer = toIntegerOrInfinity$4(index);
795
+ return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
796
796
  };
797
797
 
798
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
798
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$5;
799
799
 
800
800
  var min$2 = Math.min;
801
801
 
802
802
  // `ToLength` abstract operation
803
803
  // https://tc39.es/ecma262/#sec-tolength
804
804
  var toLength$3 = function (argument) {
805
- var len = toIntegerOrInfinity$2(argument);
805
+ var len = toIntegerOrInfinity$3(argument);
806
806
  return len > 0 ? min$2(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
807
807
  };
808
808
 
@@ -848,13 +848,13 @@ var arrayIncludes = {
848
848
  indexOf: createMethod$1(false)
849
849
  };
850
850
 
851
- var uncurryThis$9 = functionUncurryThis;
851
+ var uncurryThis$b = functionUncurryThis;
852
852
  var hasOwn$4 = hasOwnProperty_1;
853
853
  var toIndexedObject$2 = toIndexedObject$5;
854
854
  var indexOf$1 = arrayIncludes.indexOf;
855
855
  var hiddenKeys$2 = hiddenKeys$4;
856
856
 
857
- var push$1 = uncurryThis$9([].push);
857
+ var push$1 = uncurryThis$b([].push);
858
858
 
859
859
  var objectKeysInternal = function (object, names) {
860
860
  var O = toIndexedObject$2(object);
@@ -897,17 +897,17 @@ var objectGetOwnPropertySymbols = {};
897
897
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
898
898
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
899
899
 
900
- var getBuiltIn$1 = getBuiltIn$3;
901
- var uncurryThis$8 = functionUncurryThis;
900
+ var getBuiltIn$2 = getBuiltIn$4;
901
+ var uncurryThis$a = functionUncurryThis;
902
902
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
903
903
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
904
- var anObject$7 = anObject$9;
904
+ var anObject$9 = anObject$b;
905
905
 
906
- var concat$1 = uncurryThis$8([].concat);
906
+ var concat$1 = uncurryThis$a([].concat);
907
907
 
908
908
  // all object keys, includes non-enumerable and symbols
909
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
910
- var keys = getOwnPropertyNamesModule.f(anObject$7(it));
909
+ var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
910
+ var keys = getOwnPropertyNamesModule.f(anObject$9(it));
911
911
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
912
912
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
913
913
  };
@@ -929,7 +929,7 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
929
929
  }
930
930
  };
931
931
 
932
- var fails$a = fails$i;
932
+ var fails$b = fails$j;
933
933
  var isCallable$7 = isCallable$h;
934
934
 
935
935
  var replacement = /#|\.prototype\./;
@@ -938,7 +938,7 @@ var isForced$1 = function (feature, detection) {
938
938
  var value = data[normalize(feature)];
939
939
  return value === POLYFILL ? true
940
940
  : value === NATIVE ? false
941
- : isCallable$7(detection) ? fails$a(detection)
941
+ : isCallable$7(detection) ? fails$b(detection)
942
942
  : !!detection;
943
943
  };
944
944
 
@@ -1022,7 +1022,7 @@ var objectKeys$1 = Object.keys || function keys(O) {
1022
1022
  var DESCRIPTORS$2 = descriptors;
1023
1023
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1024
1024
  var definePropertyModule = objectDefineProperty;
1025
- var anObject$6 = anObject$9;
1025
+ var anObject$8 = anObject$b;
1026
1026
  var toIndexedObject$1 = toIndexedObject$5;
1027
1027
  var objectKeys = objectKeys$1;
1028
1028
 
@@ -1030,7 +1030,7 @@ var objectKeys = objectKeys$1;
1030
1030
  // https://tc39.es/ecma262/#sec-object.defineproperties
1031
1031
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1032
1032
  objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1033
- anObject$6(O);
1033
+ anObject$8(O);
1034
1034
  var props = toIndexedObject$1(Properties);
1035
1035
  var keys = objectKeys(Properties);
1036
1036
  var length = keys.length;
@@ -1040,12 +1040,12 @@ objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1040
1040
  return O;
1041
1041
  };
1042
1042
 
1043
- var getBuiltIn = getBuiltIn$3;
1043
+ var getBuiltIn$1 = getBuiltIn$4;
1044
1044
 
1045
- var html$1 = getBuiltIn('document', 'documentElement');
1045
+ var html$1 = getBuiltIn$1('document', 'documentElement');
1046
1046
 
1047
1047
  /* global ActiveXObject -- old IE, WSH */
1048
- var anObject$5 = anObject$9;
1048
+ var anObject$7 = anObject$b;
1049
1049
  var definePropertiesModule = objectDefineProperties;
1050
1050
  var enumBugKeys = enumBugKeys$3;
1051
1051
  var hiddenKeys = hiddenKeys$4;
@@ -1120,7 +1120,7 @@ hiddenKeys[IE_PROTO$1] = true;
1120
1120
  var objectCreate = Object.create || function create(O, Properties) {
1121
1121
  var result;
1122
1122
  if (O !== null) {
1123
- EmptyConstructor[PROTOTYPE] = anObject$5(O);
1123
+ EmptyConstructor[PROTOTYPE] = anObject$7(O);
1124
1124
  result = new EmptyConstructor();
1125
1125
  EmptyConstructor[PROTOTYPE] = null;
1126
1126
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1150,20 +1150,20 @@ var addToUnscopables$2 = function (key) {
1150
1150
  ArrayPrototype[UNSCOPABLES][key] = true;
1151
1151
  };
1152
1152
 
1153
- var $$6 = _export;
1153
+ var $$d = _export;
1154
1154
  var $includes = arrayIncludes.includes;
1155
- var fails$9 = fails$i;
1155
+ var fails$a = fails$j;
1156
1156
  var addToUnscopables$1 = addToUnscopables$2;
1157
1157
 
1158
1158
  // FF99+ bug
1159
- var BROKEN_ON_SPARSE = fails$9(function () {
1159
+ var BROKEN_ON_SPARSE = fails$a(function () {
1160
1160
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
1161
1161
  return !Array(1).includes();
1162
1162
  });
1163
1163
 
1164
1164
  // `Array.prototype.includes` method
1165
1165
  // https://tc39.es/ecma262/#sec-array.prototype.includes
1166
- $$6({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1166
+ $$d({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1167
1167
  includes: function includes(el /* , fromIndex = 0 */) {
1168
1168
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1169
1169
  }
@@ -1174,9 +1174,9 @@ addToUnscopables$1('includes');
1174
1174
 
1175
1175
  var iterators = {};
1176
1176
 
1177
- var fails$8 = fails$i;
1177
+ var fails$9 = fails$j;
1178
1178
 
1179
- var correctPrototypeGetter = !fails$8(function () {
1179
+ var correctPrototypeGetter = !fails$9(function () {
1180
1180
  function F() { /* empty */ }
1181
1181
  F.prototype.constructor = null;
1182
1182
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1205,7 +1205,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1205
1205
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1206
1206
  };
1207
1207
 
1208
- var fails$7 = fails$i;
1208
+ var fails$8 = fails$j;
1209
1209
  var isCallable$5 = isCallable$h;
1210
1210
  var isObject$3 = isObject$9;
1211
1211
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -1230,7 +1230,7 @@ if ([].keys) {
1230
1230
  }
1231
1231
  }
1232
1232
 
1233
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$7(function () {
1233
+ var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$8(function () {
1234
1234
  var test = {};
1235
1235
  // FF44- legacy iterators case
1236
1236
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1280,13 +1280,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1280
1280
  return IteratorConstructor;
1281
1281
  };
1282
1282
 
1283
- var uncurryThis$7 = functionUncurryThis;
1284
- var aCallable = aCallable$2;
1283
+ var uncurryThis$9 = functionUncurryThis;
1284
+ var aCallable$1 = aCallable$3;
1285
1285
 
1286
1286
  var functionUncurryThisAccessor = function (object, key, method) {
1287
1287
  try {
1288
1288
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1289
- return uncurryThis$7(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1289
+ return uncurryThis$9(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1290
1290
  } catch (error) { /* empty */ }
1291
1291
  };
1292
1292
 
@@ -1299,15 +1299,15 @@ var isPossiblePrototype$1 = function (argument) {
1299
1299
  var isPossiblePrototype = isPossiblePrototype$1;
1300
1300
 
1301
1301
  var $String$1 = String;
1302
- var $TypeError$4 = TypeError;
1302
+ var $TypeError$5 = TypeError;
1303
1303
 
1304
1304
  var aPossiblePrototype$1 = function (argument) {
1305
1305
  if (isPossiblePrototype(argument)) return argument;
1306
- throw new $TypeError$4("Can't set " + $String$1(argument) + ' as a prototype');
1306
+ throw new $TypeError$5("Can't set " + $String$1(argument) + ' as a prototype');
1307
1307
  };
1308
1308
 
1309
1309
  /* eslint-disable no-proto -- safe */
1310
- var uncurryThisAccessor = functionUncurryThisAccessor;
1310
+ var uncurryThisAccessor$1 = functionUncurryThisAccessor;
1311
1311
  var isObject$1 = isObject$9;
1312
1312
  var requireObjectCoercible$4 = requireObjectCoercible$7;
1313
1313
  var aPossiblePrototype = aPossiblePrototype$1;
@@ -1321,7 +1321,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1321
1321
  var test = {};
1322
1322
  var setter;
1323
1323
  try {
1324
- setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1324
+ setter = uncurryThisAccessor$1(Object.prototype, '__proto__', 'set');
1325
1325
  setter(test, []);
1326
1326
  CORRECT_SETTER = test instanceof Array;
1327
1327
  } catch (error) { /* empty */ }
@@ -1335,8 +1335,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1335
1335
  };
1336
1336
  }() : undefined);
1337
1337
 
1338
- var $$5 = _export;
1339
- var call$7 = functionCall;
1338
+ var $$c = _export;
1339
+ var call$a = functionCall;
1340
1340
  var FunctionName = functionName;
1341
1341
  var isCallable$4 = isCallable$h;
1342
1342
  var createIteratorConstructor = iteratorCreateConstructor;
@@ -1408,7 +1408,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1408
1408
  createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1409
1409
  } else {
1410
1410
  INCORRECT_VALUES_NAME = true;
1411
- defaultIterator = function values() { return call$7(nativeIterator, this); };
1411
+ defaultIterator = function values() { return call$a(nativeIterator, this); };
1412
1412
  }
1413
1413
  }
1414
1414
 
@@ -1423,7 +1423,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1423
1423
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1424
1424
  defineBuiltIn$2(IterablePrototype, KEY, methods[KEY]);
1425
1425
  }
1426
- } else $$5({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1426
+ } else $$c({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1427
1427
  }
1428
1428
 
1429
1429
  // define iterator
@@ -1550,12 +1550,12 @@ var toString$6 = function (argument) {
1550
1550
  return $String(argument);
1551
1551
  };
1552
1552
 
1553
- var anObject$4 = anObject$9;
1553
+ var anObject$6 = anObject$b;
1554
1554
 
1555
1555
  // `RegExp.prototype.flags` getter implementation
1556
1556
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1557
1557
  var regexpFlags$1 = function () {
1558
- var that = anObject$4(this);
1558
+ var that = anObject$6(this);
1559
1559
  var result = '';
1560
1560
  if (that.hasIndices) result += 'd';
1561
1561
  if (that.global) result += 'g';
@@ -1568,7 +1568,7 @@ var regexpFlags$1 = function () {
1568
1568
  return result;
1569
1569
  };
1570
1570
 
1571
- var call$6 = functionCall;
1571
+ var call$9 = functionCall;
1572
1572
  var hasOwn = hasOwnProperty_1;
1573
1573
  var isPrototypeOf = objectIsPrototypeOf;
1574
1574
  var regExpFlags = regexpFlags$1;
@@ -1578,21 +1578,21 @@ var RegExpPrototype$2 = RegExp.prototype;
1578
1578
  var regexpGetFlags = function (R) {
1579
1579
  var flags = R.flags;
1580
1580
  return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
1581
- ? call$6(regExpFlags, R) : flags;
1581
+ ? call$9(regExpFlags, R) : flags;
1582
1582
  };
1583
1583
 
1584
1584
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1585
1585
  var defineBuiltIn$1 = defineBuiltIn$5;
1586
- var anObject$3 = anObject$9;
1586
+ var anObject$5 = anObject$b;
1587
1587
  var $toString = toString$6;
1588
- var fails$6 = fails$i;
1588
+ var fails$7 = fails$j;
1589
1589
  var getRegExpFlags = regexpGetFlags;
1590
1590
 
1591
1591
  var TO_STRING = 'toString';
1592
1592
  var RegExpPrototype$1 = RegExp.prototype;
1593
1593
  var nativeToString = RegExpPrototype$1[TO_STRING];
1594
1594
 
1595
- var NOT_GENERIC = fails$6(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1595
+ var NOT_GENERIC = fails$7(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1596
1596
  // FF44- RegExp#toString has a wrong name
1597
1597
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1598
1598
 
@@ -1600,7 +1600,7 @@ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1600
1600
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
1601
1601
  if (NOT_GENERIC || INCORRECT_NAME) {
1602
1602
  defineBuiltIn$1(RegExpPrototype$1, TO_STRING, function toString() {
1603
- var R = anObject$3(this);
1603
+ var R = anObject$5(this);
1604
1604
  var pattern = $toString(R.source);
1605
1605
  var flags = $toString(getRegExpFlags(R));
1606
1606
  return '/' + pattern + '/' + flags;
@@ -1622,11 +1622,11 @@ var isRegexp = function (it) {
1622
1622
 
1623
1623
  var isRegExp = isRegexp;
1624
1624
 
1625
- var $TypeError$3 = TypeError;
1625
+ var $TypeError$4 = TypeError;
1626
1626
 
1627
1627
  var notARegexp = function (it) {
1628
1628
  if (isRegExp(it)) {
1629
- throw new $TypeError$3("The method doesn't accept regular expressions");
1629
+ throw new $TypeError$4("The method doesn't accept regular expressions");
1630
1630
  } return it;
1631
1631
  };
1632
1632
 
@@ -1646,18 +1646,18 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1646
1646
  } return false;
1647
1647
  };
1648
1648
 
1649
- var $$4 = _export;
1650
- var uncurryThis$6 = functionUncurryThis;
1649
+ var $$b = _export;
1650
+ var uncurryThis$8 = functionUncurryThis;
1651
1651
  var notARegExp$1 = notARegexp;
1652
1652
  var requireObjectCoercible$3 = requireObjectCoercible$7;
1653
1653
  var toString$5 = toString$6;
1654
1654
  var correctIsRegExpLogic$1 = correctIsRegexpLogic;
1655
1655
 
1656
- var stringIndexOf$1 = uncurryThis$6(''.indexOf);
1656
+ var stringIndexOf$1 = uncurryThis$8(''.indexOf);
1657
1657
 
1658
1658
  // `String.prototype.includes` method
1659
1659
  // https://tc39.es/ecma262/#sec-string.prototype.includes
1660
- $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
1660
+ $$b({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
1661
1661
  includes: function includes(searchString /* , position = 0 */) {
1662
1662
  return !!~stringIndexOf$1(
1663
1663
  toString$5(requireObjectCoercible$3(this)),
@@ -1814,21 +1814,33 @@ const VirtualKeyboard = () => {
1814
1814
  const [keyboardLayout, setKeyboardLayout] = useState(KeyboardLayout.TEXT);
1815
1815
  const [keyboardLayoutName, setKeyboardLayoutName] = useState(KeyboardLayoutName.DEFAULT);
1816
1816
  const [focusedTextInput, setFocusedTextInput] = useState();
1817
+ const [isSubmitPressed, setIsSubmitPressed] = useState(false);
1817
1818
  const virtualKeyboardRef = useRef(null);
1818
1819
  const keyboardContainerRef = useRef(null);
1819
- useEffect(function handleClickOutsideListeners() {
1820
+ useEffect(function handleClickListeners() {
1820
1821
  function handleClickOutside(event) {
1821
1822
  if (keyboardContainerRef.current && !keyboardContainerRef.current.contains(event.target)) {
1822
1823
  setIsKeyboardVisible(false);
1823
1824
  }
1824
1825
  }
1826
+ function handleMouseOrTouchUp(event) {
1827
+ if (isSubmitPressed) {
1828
+ event.preventDefault();
1829
+ setIsKeyboardVisible(false);
1830
+ setIsSubmitPressed(false);
1831
+ }
1832
+ }
1825
1833
  document.addEventListener("mousedown", handleClickOutside);
1826
1834
  document.addEventListener("touchstart", handleClickOutside);
1835
+ document.addEventListener("mouseup", handleMouseOrTouchUp);
1836
+ document.addEventListener("touchend", handleMouseOrTouchUp);
1827
1837
  return () => {
1828
1838
  document.removeEventListener("mousedown", handleClickOutside);
1829
1839
  document.removeEventListener("touchstart", handleClickOutside);
1840
+ document.removeEventListener("mouseup", handleMouseOrTouchUp);
1841
+ document.removeEventListener("touchend", handleMouseOrTouchUp);
1830
1842
  };
1831
- }, []);
1843
+ }, [isSubmitPressed]);
1832
1844
  useEffect(function showOrHideKeyboard() {
1833
1845
  // The keyboard will appear/disappear on mouse down
1834
1846
  // However, if the user is clicking something, like a submit button or the input itself, the mouse up will happen a few milliseconds after the keyboard is shown/hidden
@@ -1969,7 +1981,7 @@ const VirtualKeyboard = () => {
1969
1981
  break;
1970
1982
  case KeyboardKey.SUBMIT:
1971
1983
  focusedTextInput.blur();
1972
- setIsKeyboardVisible(false);
1984
+ setIsSubmitPressed(true);
1973
1985
  break;
1974
1986
  }
1975
1987
  };
@@ -2061,13 +2073,13 @@ function isTextSelected(inputElement) {
2061
2073
  }
2062
2074
  }
2063
2075
 
2064
- var fails$5 = fails$i;
2076
+ var fails$6 = fails$j;
2065
2077
  var globalThis$3 = globalThis_1;
2066
2078
 
2067
2079
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2068
2080
  var $RegExp$2 = globalThis$3.RegExp;
2069
2081
 
2070
- var UNSUPPORTED_Y$1 = fails$5(function () {
2082
+ var UNSUPPORTED_Y$1 = fails$6(function () {
2071
2083
  var re = $RegExp$2('a', 'y');
2072
2084
  re.lastIndex = 2;
2073
2085
  return re.exec('abcd') !== null;
@@ -2075,11 +2087,11 @@ var UNSUPPORTED_Y$1 = fails$5(function () {
2075
2087
 
2076
2088
  // UC Browser bug
2077
2089
  // https://github.com/zloirock/core-js/issues/1008
2078
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
2090
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
2079
2091
  return !$RegExp$2('a', 'y').sticky;
2080
2092
  });
2081
2093
 
2082
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
2094
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$6(function () {
2083
2095
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2084
2096
  var re = $RegExp$2('^r', 'gy');
2085
2097
  re.lastIndex = 2;
@@ -2092,24 +2104,24 @@ var regexpStickyHelpers = {
2092
2104
  UNSUPPORTED_Y: UNSUPPORTED_Y$1
2093
2105
  };
2094
2106
 
2095
- var fails$4 = fails$i;
2107
+ var fails$5 = fails$j;
2096
2108
  var globalThis$2 = globalThis_1;
2097
2109
 
2098
2110
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2099
2111
  var $RegExp$1 = globalThis$2.RegExp;
2100
2112
 
2101
- var regexpUnsupportedDotAll = fails$4(function () {
2113
+ var regexpUnsupportedDotAll = fails$5(function () {
2102
2114
  var re = $RegExp$1('.', 's');
2103
2115
  return !(re.dotAll && re.test('\n') && re.flags === 's');
2104
2116
  });
2105
2117
 
2106
- var fails$3 = fails$i;
2118
+ var fails$4 = fails$j;
2107
2119
  var globalThis$1 = globalThis_1;
2108
2120
 
2109
2121
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2110
2122
  var $RegExp = globalThis$1.RegExp;
2111
2123
 
2112
- var regexpUnsupportedNcg = fails$3(function () {
2124
+ var regexpUnsupportedNcg = fails$4(function () {
2113
2125
  var re = $RegExp('(?<a>b)', 'g');
2114
2126
  return re.exec('b').groups.a !== 'b' ||
2115
2127
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -2117,8 +2129,8 @@ var regexpUnsupportedNcg = fails$3(function () {
2117
2129
 
2118
2130
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2119
2131
  /* eslint-disable regexp/no-useless-quantifier -- testing */
2120
- var call$5 = functionCall;
2121
- var uncurryThis$5 = functionUncurryThis;
2132
+ var call$8 = functionCall;
2133
+ var uncurryThis$7 = functionUncurryThis;
2122
2134
  var toString$4 = toString$6;
2123
2135
  var regexpFlags = regexpFlags$1;
2124
2136
  var stickyHelpers = regexpStickyHelpers;
@@ -2131,16 +2143,16 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2131
2143
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
2132
2144
  var nativeExec = RegExp.prototype.exec;
2133
2145
  var patchedExec = nativeExec;
2134
- var charAt$3 = uncurryThis$5(''.charAt);
2135
- var indexOf = uncurryThis$5(''.indexOf);
2136
- var replace$1 = uncurryThis$5(''.replace);
2137
- var stringSlice$4 = uncurryThis$5(''.slice);
2146
+ var charAt$3 = uncurryThis$7(''.charAt);
2147
+ var indexOf = uncurryThis$7(''.indexOf);
2148
+ var replace$1 = uncurryThis$7(''.replace);
2149
+ var stringSlice$4 = uncurryThis$7(''.slice);
2138
2150
 
2139
2151
  var UPDATES_LAST_INDEX_WRONG = (function () {
2140
2152
  var re1 = /a/;
2141
2153
  var re2 = /b*/g;
2142
- call$5(nativeExec, re1, 'a');
2143
- call$5(nativeExec, re2, 'a');
2154
+ call$8(nativeExec, re1, 'a');
2155
+ call$8(nativeExec, re2, 'a');
2144
2156
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2145
2157
  })();
2146
2158
 
@@ -2161,14 +2173,14 @@ if (PATCH) {
2161
2173
 
2162
2174
  if (raw) {
2163
2175
  raw.lastIndex = re.lastIndex;
2164
- result = call$5(patchedExec, raw, str);
2176
+ result = call$8(patchedExec, raw, str);
2165
2177
  re.lastIndex = raw.lastIndex;
2166
2178
  return result;
2167
2179
  }
2168
2180
 
2169
2181
  var groups = state.groups;
2170
2182
  var sticky = UNSUPPORTED_Y && re.sticky;
2171
- var flags = call$5(regexpFlags, re);
2183
+ var flags = call$8(regexpFlags, re);
2172
2184
  var source = re.source;
2173
2185
  var charsAdded = 0;
2174
2186
  var strCopy = str;
@@ -2196,7 +2208,7 @@ if (PATCH) {
2196
2208
  }
2197
2209
  if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2198
2210
 
2199
- match = call$5(nativeExec, sticky ? reCopy : re, strCopy);
2211
+ match = call$8(nativeExec, sticky ? reCopy : re, strCopy);
2200
2212
 
2201
2213
  if (sticky) {
2202
2214
  if (match) {
@@ -2211,7 +2223,7 @@ if (PATCH) {
2211
2223
  if (NPCG_INCLUDED && match && match.length > 1) {
2212
2224
  // Fix browsers whose `exec` methods don't consistently return `undefined`
2213
2225
  // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2214
- call$5(nativeReplace, match[0], reCopy, function () {
2226
+ call$8(nativeReplace, match[0], reCopy, function () {
2215
2227
  for (i = 1; i < arguments.length - 2; i++) {
2216
2228
  if (arguments[i] === undefined) match[i] = undefined;
2217
2229
  }
@@ -2232,12 +2244,12 @@ if (PATCH) {
2232
2244
 
2233
2245
  var regexpExec$2 = patchedExec;
2234
2246
 
2235
- var $$3 = _export;
2247
+ var $$a = _export;
2236
2248
  var exec = regexpExec$2;
2237
2249
 
2238
2250
  // `RegExp.prototype.exec` method
2239
2251
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2240
- $$3({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2252
+ $$a({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2241
2253
  exec: exec
2242
2254
  });
2243
2255
 
@@ -2245,19 +2257,19 @@ var NATIVE_BIND = functionBindNative;
2245
2257
 
2246
2258
  var FunctionPrototype = Function.prototype;
2247
2259
  var apply$1 = FunctionPrototype.apply;
2248
- var call$4 = FunctionPrototype.call;
2260
+ var call$7 = FunctionPrototype.call;
2249
2261
 
2250
2262
  // eslint-disable-next-line es/no-reflect -- safe
2251
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$4.bind(apply$1) : function () {
2252
- return call$4.apply(apply$1, arguments);
2263
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$7.bind(apply$1) : function () {
2264
+ return call$7.apply(apply$1, arguments);
2253
2265
  });
2254
2266
 
2255
2267
  // TODO: Remove from `core-js@4` since it's moved to entry points
2256
2268
 
2257
- var call$3 = functionCall;
2269
+ var call$6 = functionCall;
2258
2270
  var defineBuiltIn = defineBuiltIn$5;
2259
2271
  var regexpExec$1 = regexpExec$2;
2260
- var fails$2 = fails$i;
2272
+ var fails$3 = fails$j;
2261
2273
  var wellKnownSymbol$1 = wellKnownSymbol$c;
2262
2274
  var createNonEnumerableProperty = createNonEnumerableProperty$5;
2263
2275
 
@@ -2267,14 +2279,14 @@ var RegExpPrototype = RegExp.prototype;
2267
2279
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2268
2280
  var SYMBOL = wellKnownSymbol$1(KEY);
2269
2281
 
2270
- var DELEGATES_TO_SYMBOL = !fails$2(function () {
2282
+ var DELEGATES_TO_SYMBOL = !fails$3(function () {
2271
2283
  // String methods call symbol-named RegExp methods
2272
2284
  var O = {};
2273
2285
  O[SYMBOL] = function () { return 7; };
2274
2286
  return ''[KEY](O) !== 7;
2275
2287
  });
2276
2288
 
2277
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$2(function () {
2289
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
2278
2290
  // Symbol-named RegExp methods call .exec
2279
2291
  var execCalled = false;
2280
2292
  var re = /a/;
@@ -2314,9 +2326,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2314
2326
  // The native String method already delegates to @@method (this
2315
2327
  // polyfilled function), leasing to infinite recursion.
2316
2328
  // We avoid it by directly calling the native @@method method.
2317
- return { done: true, value: call$3(nativeRegExpMethod, regexp, str, arg2) };
2329
+ return { done: true, value: call$6(nativeRegExpMethod, regexp, str, arg2) };
2318
2330
  }
2319
- return { done: true, value: call$3(nativeMethod, str, regexp, arg2) };
2331
+ return { done: true, value: call$6(nativeMethod, str, regexp, arg2) };
2320
2332
  }
2321
2333
  return { done: false };
2322
2334
  });
@@ -2328,19 +2340,19 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2328
2340
  if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
2329
2341
  };
2330
2342
 
2331
- var uncurryThis$4 = functionUncurryThis;
2332
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
2343
+ var uncurryThis$6 = functionUncurryThis;
2344
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$5;
2333
2345
  var toString$3 = toString$6;
2334
2346
  var requireObjectCoercible$2 = requireObjectCoercible$7;
2335
2347
 
2336
- var charAt$2 = uncurryThis$4(''.charAt);
2337
- var charCodeAt = uncurryThis$4(''.charCodeAt);
2338
- var stringSlice$3 = uncurryThis$4(''.slice);
2348
+ var charAt$2 = uncurryThis$6(''.charAt);
2349
+ var charCodeAt = uncurryThis$6(''.charCodeAt);
2350
+ var stringSlice$3 = uncurryThis$6(''.slice);
2339
2351
 
2340
2352
  var createMethod = function (CONVERT_TO_STRING) {
2341
2353
  return function ($this, pos) {
2342
2354
  var S = toString$3(requireObjectCoercible$2($this));
2343
- var position = toIntegerOrInfinity$1(pos);
2355
+ var position = toIntegerOrInfinity$2(pos);
2344
2356
  var size = S.length;
2345
2357
  var first, second;
2346
2358
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
@@ -2373,13 +2385,13 @@ var advanceStringIndex$1 = function (S, index, unicode) {
2373
2385
  return index + (unicode ? charAt$1(S, index).length : 1);
2374
2386
  };
2375
2387
 
2376
- var uncurryThis$3 = functionUncurryThis;
2388
+ var uncurryThis$5 = functionUncurryThis;
2377
2389
  var toObject$1 = toObject$4;
2378
2390
 
2379
2391
  var floor = Math.floor;
2380
- var charAt = uncurryThis$3(''.charAt);
2381
- var replace = uncurryThis$3(''.replace);
2382
- var stringSlice$2 = uncurryThis$3(''.slice);
2392
+ var charAt = uncurryThis$5(''.charAt);
2393
+ var replace = uncurryThis$5(''.replace);
2394
+ var stringSlice$2 = uncurryThis$5(''.slice);
2383
2395
  // eslint-disable-next-line redos/no-vulnerable -- safe
2384
2396
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2385
2397
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
@@ -2419,52 +2431,52 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2419
2431
  });
2420
2432
  };
2421
2433
 
2422
- var call$2 = functionCall;
2423
- var anObject$2 = anObject$9;
2434
+ var call$5 = functionCall;
2435
+ var anObject$4 = anObject$b;
2424
2436
  var isCallable$2 = isCallable$h;
2425
2437
  var classof$1 = classofRaw$2;
2426
2438
  var regexpExec = regexpExec$2;
2427
2439
 
2428
- var $TypeError$2 = TypeError;
2440
+ var $TypeError$3 = TypeError;
2429
2441
 
2430
2442
  // `RegExpExec` abstract operation
2431
2443
  // https://tc39.es/ecma262/#sec-regexpexec
2432
2444
  var regexpExecAbstract = function (R, S) {
2433
2445
  var exec = R.exec;
2434
2446
  if (isCallable$2(exec)) {
2435
- var result = call$2(exec, R, S);
2436
- if (result !== null) anObject$2(result);
2447
+ var result = call$5(exec, R, S);
2448
+ if (result !== null) anObject$4(result);
2437
2449
  return result;
2438
2450
  }
2439
- if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
2440
- throw new $TypeError$2('RegExp#exec called on incompatible receiver');
2451
+ if (classof$1(R) === 'RegExp') return call$5(regexpExec, R, S);
2452
+ throw new $TypeError$3('RegExp#exec called on incompatible receiver');
2441
2453
  };
2442
2454
 
2443
2455
  var apply = functionApply;
2444
- var call$1 = functionCall;
2445
- var uncurryThis$2 = functionUncurryThis;
2456
+ var call$4 = functionCall;
2457
+ var uncurryThis$4 = functionUncurryThis;
2446
2458
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2447
- var fails$1 = fails$i;
2448
- var anObject$1 = anObject$9;
2459
+ var fails$2 = fails$j;
2460
+ var anObject$3 = anObject$b;
2449
2461
  var isCallable$1 = isCallable$h;
2450
2462
  var isNullOrUndefined = isNullOrUndefined$3;
2451
- var toIntegerOrInfinity = toIntegerOrInfinity$4;
2463
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$5;
2452
2464
  var toLength$1 = toLength$3;
2453
2465
  var toString$2 = toString$6;
2454
2466
  var requireObjectCoercible$1 = requireObjectCoercible$7;
2455
2467
  var advanceStringIndex = advanceStringIndex$1;
2456
- var getMethod = getMethod$2;
2468
+ var getMethod$1 = getMethod$3;
2457
2469
  var getSubstitution = getSubstitution$1;
2458
2470
  var regExpExec = regexpExecAbstract;
2459
2471
  var wellKnownSymbol = wellKnownSymbol$c;
2460
2472
 
2461
2473
  var REPLACE = wellKnownSymbol('replace');
2462
- var max = Math.max;
2474
+ var max$1 = Math.max;
2463
2475
  var min$1 = Math.min;
2464
- var concat = uncurryThis$2([].concat);
2465
- var push = uncurryThis$2([].push);
2466
- var stringIndexOf = uncurryThis$2(''.indexOf);
2467
- var stringSlice$1 = uncurryThis$2(''.slice);
2476
+ var concat = uncurryThis$4([].concat);
2477
+ var push = uncurryThis$4([].push);
2478
+ var stringIndexOf = uncurryThis$4(''.indexOf);
2479
+ var stringSlice$1 = uncurryThis$4(''.slice);
2468
2480
 
2469
2481
  var maybeToString = function (it) {
2470
2482
  return it === undefined ? it : String(it);
@@ -2485,7 +2497,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2485
2497
  return false;
2486
2498
  })();
2487
2499
 
2488
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$1(function () {
2500
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
2489
2501
  var re = /./;
2490
2502
  re.exec = function () {
2491
2503
  var result = [];
@@ -2505,15 +2517,15 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2505
2517
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2506
2518
  function replace(searchValue, replaceValue) {
2507
2519
  var O = requireObjectCoercible$1(this);
2508
- var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
2520
+ var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod$1(searchValue, REPLACE);
2509
2521
  return replacer
2510
- ? call$1(replacer, searchValue, O, replaceValue)
2511
- : call$1(nativeReplace, toString$2(O), searchValue, replaceValue);
2522
+ ? call$4(replacer, searchValue, O, replaceValue)
2523
+ : call$4(nativeReplace, toString$2(O), searchValue, replaceValue);
2512
2524
  },
2513
2525
  // `RegExp.prototype[@@replace]` method
2514
2526
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2515
2527
  function (string, replaceValue) {
2516
- var rx = anObject$1(this);
2528
+ var rx = anObject$3(this);
2517
2529
  var S = toString$2(string);
2518
2530
 
2519
2531
  if (
@@ -2554,7 +2566,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2554
2566
  result = results[i];
2555
2567
 
2556
2568
  var matched = toString$2(result[0]);
2557
- var position = max(min$1(toIntegerOrInfinity(result.index), S.length), 0);
2569
+ var position = max$1(min$1(toIntegerOrInfinity$1(result.index), S.length), 0);
2558
2570
  var captures = [];
2559
2571
  var replacement;
2560
2572
  // NOTE: This is equivalent to
@@ -2583,17 +2595,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2583
2595
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2584
2596
 
2585
2597
  var classofRaw = classofRaw$2;
2586
- var uncurryThis$1 = functionUncurryThis;
2598
+ var uncurryThis$3 = functionUncurryThis;
2587
2599
 
2588
2600
  var functionUncurryThisClause = function (fn) {
2589
2601
  // Nashorn bug:
2590
2602
  // https://github.com/zloirock/core-js/issues/1128
2591
2603
  // https://github.com/zloirock/core-js/issues/1130
2592
- if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
2604
+ if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
2593
2605
  };
2594
2606
 
2595
- var $$2 = _export;
2596
- var uncurryThis = functionUncurryThisClause;
2607
+ var $$9 = _export;
2608
+ var uncurryThis$2 = functionUncurryThisClause;
2597
2609
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
2598
2610
  var toLength = toLength$3;
2599
2611
  var toString$1 = toString$6;
@@ -2601,7 +2613,7 @@ var notARegExp = notARegexp;
2601
2613
  var requireObjectCoercible = requireObjectCoercible$7;
2602
2614
  var correctIsRegExpLogic = correctIsRegexpLogic;
2603
2615
 
2604
- var stringSlice = uncurryThis(''.slice);
2616
+ var stringSlice = uncurryThis$2(''.slice);
2605
2617
  var min = Math.min;
2606
2618
 
2607
2619
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
@@ -2613,7 +2625,7 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
2613
2625
 
2614
2626
  // `String.prototype.startsWith` method
2615
2627
  // https://tc39.es/ecma262/#sec-string.prototype.startswith
2616
- $$2({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
2628
+ $$9({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
2617
2629
  startsWith: function startsWith(searchString /* , position = 0 */) {
2618
2630
  var that = toString$1(requireObjectCoercible(this));
2619
2631
  notARegExp(searchString);
@@ -2667,7 +2679,7 @@ var isArray$1 = Array.isArray || function isArray(argument) {
2667
2679
  var DESCRIPTORS = descriptors;
2668
2680
  var isArray = isArray$1;
2669
2681
 
2670
- var $TypeError$1 = TypeError;
2682
+ var $TypeError$2 = TypeError;
2671
2683
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2672
2684
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2673
2685
 
@@ -2685,28 +2697,28 @@ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
2685
2697
 
2686
2698
  var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
2687
2699
  if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
2688
- throw new $TypeError$1('Cannot set read only .length');
2700
+ throw new $TypeError$2('Cannot set read only .length');
2689
2701
  } return O.length = length;
2690
2702
  } : function (O, length) {
2691
2703
  return O.length = length;
2692
2704
  };
2693
2705
 
2694
- var $TypeError = TypeError;
2706
+ var $TypeError$1 = TypeError;
2695
2707
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2696
2708
 
2697
2709
  var doesNotExceedSafeInteger$1 = function (it) {
2698
- if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
2710
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
2699
2711
  return it;
2700
2712
  };
2701
2713
 
2702
- var $$1 = _export;
2714
+ var $$8 = _export;
2703
2715
  var toObject = toObject$4;
2704
2716
  var lengthOfArrayLike = lengthOfArrayLike$2;
2705
2717
  var setArrayLength = arraySetLength;
2706
2718
  var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
2707
- var fails = fails$i;
2719
+ var fails$1 = fails$j;
2708
2720
 
2709
- var INCORRECT_TO_LENGTH = fails(function () {
2721
+ var INCORRECT_TO_LENGTH = fails$1(function () {
2710
2722
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
2711
2723
  });
2712
2724
 
@@ -2725,7 +2737,7 @@ var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2725
2737
 
2726
2738
  // `Array.prototype.push` method
2727
2739
  // https://tc39.es/ecma262/#sec-array.prototype.push
2728
- $$1({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2740
+ $$8({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2729
2741
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2730
2742
  push: function push(item) {
2731
2743
  var O = toObject(this);
@@ -2743,10 +2755,10 @@ $$1({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2743
2755
 
2744
2756
  // TODO: Remove from `core-js@4` since it's moved to entry points
2745
2757
 
2746
- var $ = _export;
2747
- var call = functionCall;
2758
+ var $$7 = _export;
2759
+ var call$3 = functionCall;
2748
2760
  var isCallable = isCallable$h;
2749
- var anObject = anObject$9;
2761
+ var anObject$2 = anObject$b;
2750
2762
  var toString = toString$6;
2751
2763
 
2752
2764
  var DELEGATES_TO_EXEC = function () {
@@ -2763,15 +2775,15 @@ var nativeTest = /./.test;
2763
2775
 
2764
2776
  // `RegExp.prototype.test` method
2765
2777
  // https://tc39.es/ecma262/#sec-regexp.prototype.test
2766
- $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
2778
+ $$7({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
2767
2779
  test: function (S) {
2768
- var R = anObject(this);
2780
+ var R = anObject$2(this);
2769
2781
  var string = toString(S);
2770
2782
  var exec = R.exec;
2771
- if (!isCallable(exec)) return call(nativeTest, R, string);
2772
- var result = call(exec, R, string);
2783
+ if (!isCallable(exec)) return call$3(nativeTest, R, string);
2784
+ var result = call$3(exec, R, string);
2773
2785
  if (result === null) return false;
2774
- anObject(result);
2786
+ anObject$2(result);
2775
2787
  return true;
2776
2788
  }
2777
2789
  });
@@ -2890,9 +2902,423 @@ const navigateControlCenter = route => {
2890
2902
  window.parent.postMessage(`navigateTo${capitalizedRoute}`, "*");
2891
2903
  };
2892
2904
 
2905
+ var uncurryThis$1 = functionUncurryThis;
2906
+
2907
+ // eslint-disable-next-line es/no-set -- safe
2908
+ var SetPrototype$1 = Set.prototype;
2909
+
2910
+ var setHelpers = {
2911
+ // eslint-disable-next-line es/no-set -- safe
2912
+ Set: Set,
2913
+ add: uncurryThis$1(SetPrototype$1.add),
2914
+ has: uncurryThis$1(SetPrototype$1.has),
2915
+ remove: uncurryThis$1(SetPrototype$1['delete']),
2916
+ proto: SetPrototype$1
2917
+ };
2918
+
2919
+ var has$5 = setHelpers.has;
2920
+
2921
+ // Perform ? RequireInternalSlot(M, [[SetData]])
2922
+ var aSet$7 = function (it) {
2923
+ has$5(it);
2924
+ return it;
2925
+ };
2926
+
2927
+ var call$2 = functionCall;
2928
+
2929
+ var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
2930
+ var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
2931
+ var next = record.next;
2932
+ var step, result;
2933
+ while (!(step = call$2(next, iterator)).done) {
2934
+ result = fn(step.value);
2935
+ if (result !== undefined) return result;
2936
+ }
2937
+ };
2938
+
2939
+ var uncurryThis = functionUncurryThis;
2940
+ var iterateSimple$6 = iterateSimple$7;
2941
+ var SetHelpers$5 = setHelpers;
2942
+
2943
+ var Set$3 = SetHelpers$5.Set;
2944
+ var SetPrototype = SetHelpers$5.proto;
2945
+ var forEach = uncurryThis(SetPrototype.forEach);
2946
+ var keys = uncurryThis(SetPrototype.keys);
2947
+ var next = keys(new Set$3()).next;
2948
+
2949
+ var setIterate = function (set, fn, interruptible) {
2950
+ return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
2951
+ };
2952
+
2953
+ var SetHelpers$4 = setHelpers;
2954
+ var iterate$1 = setIterate;
2955
+
2956
+ var Set$2 = SetHelpers$4.Set;
2957
+ var add$3 = SetHelpers$4.add;
2958
+
2959
+ var setClone = function (set) {
2960
+ var result = new Set$2();
2961
+ iterate$1(set, function (it) {
2962
+ add$3(result, it);
2963
+ });
2964
+ return result;
2965
+ };
2966
+
2967
+ var uncurryThisAccessor = functionUncurryThisAccessor;
2968
+ var SetHelpers$3 = setHelpers;
2969
+
2970
+ var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
2971
+ return set.size;
2972
+ };
2973
+
2974
+ // `GetIteratorDirect(obj)` abstract operation
2975
+ // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
2976
+ var getIteratorDirect$1 = function (obj) {
2977
+ return {
2978
+ iterator: obj,
2979
+ next: obj.next,
2980
+ done: false
2981
+ };
2982
+ };
2983
+
2984
+ var aCallable = aCallable$3;
2985
+ var anObject$1 = anObject$b;
2986
+ var call$1 = functionCall;
2987
+ var toIntegerOrInfinity = toIntegerOrInfinity$5;
2988
+ var getIteratorDirect = getIteratorDirect$1;
2989
+
2990
+ var INVALID_SIZE = 'Invalid size';
2991
+ var $RangeError = RangeError;
2992
+ var $TypeError = TypeError;
2993
+ var max = Math.max;
2994
+
2995
+ var SetRecord = function (set, intSize) {
2996
+ this.set = set;
2997
+ this.size = max(intSize, 0);
2998
+ this.has = aCallable(set.has);
2999
+ this.keys = aCallable(set.keys);
3000
+ };
3001
+
3002
+ SetRecord.prototype = {
3003
+ getIterator: function () {
3004
+ return getIteratorDirect(anObject$1(call$1(this.keys, this.set)));
3005
+ },
3006
+ includes: function (it) {
3007
+ return call$1(this.has, this.set, it);
3008
+ }
3009
+ };
3010
+
3011
+ // `GetSetRecord` abstract operation
3012
+ // https://tc39.es/proposal-set-methods/#sec-getsetrecord
3013
+ var getSetRecord$7 = function (obj) {
3014
+ anObject$1(obj);
3015
+ var numSize = +obj.size;
3016
+ // NOTE: If size is undefined, then numSize will be NaN
3017
+ // eslint-disable-next-line no-self-compare -- NaN check
3018
+ if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
3019
+ var intSize = toIntegerOrInfinity(numSize);
3020
+ if (intSize < 0) throw new $RangeError(INVALID_SIZE);
3021
+ return new SetRecord(obj, intSize);
3022
+ };
3023
+
3024
+ var aSet$6 = aSet$7;
3025
+ var SetHelpers$2 = setHelpers;
3026
+ var clone$2 = setClone;
3027
+ var size$4 = setSize;
3028
+ var getSetRecord$6 = getSetRecord$7;
3029
+ var iterateSet$2 = setIterate;
3030
+ var iterateSimple$5 = iterateSimple$7;
3031
+
3032
+ var has$4 = SetHelpers$2.has;
3033
+ var remove$1 = SetHelpers$2.remove;
3034
+
3035
+ // `Set.prototype.difference` method
3036
+ // https://github.com/tc39/proposal-set-methods
3037
+ var setDifference = function difference(other) {
3038
+ var O = aSet$6(this);
3039
+ var otherRec = getSetRecord$6(other);
3040
+ var result = clone$2(O);
3041
+ if (size$4(O) <= otherRec.size) iterateSet$2(O, function (e) {
3042
+ if (otherRec.includes(e)) remove$1(result, e);
3043
+ });
3044
+ else iterateSimple$5(otherRec.getIterator(), function (e) {
3045
+ if (has$4(O, e)) remove$1(result, e);
3046
+ });
3047
+ return result;
3048
+ };
3049
+
3050
+ var getBuiltIn = getBuiltIn$4;
3051
+
3052
+ var createSetLike = function (size) {
3053
+ return {
3054
+ size: size,
3055
+ has: function () {
3056
+ return false;
3057
+ },
3058
+ keys: function () {
3059
+ return {
3060
+ next: function () {
3061
+ return { done: true };
3062
+ }
3063
+ };
3064
+ }
3065
+ };
3066
+ };
3067
+
3068
+ var setMethodAcceptSetLike$7 = function (name) {
3069
+ var Set = getBuiltIn('Set');
3070
+ try {
3071
+ new Set()[name](createSetLike(0));
3072
+ try {
3073
+ // late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
3074
+ // https://github.com/tc39/proposal-set-methods/pull/88
3075
+ new Set()[name](createSetLike(-1));
3076
+ return false;
3077
+ } catch (error2) {
3078
+ return true;
3079
+ }
3080
+ } catch (error) {
3081
+ return false;
3082
+ }
3083
+ };
3084
+
3085
+ var $$6 = _export;
3086
+ var difference = setDifference;
3087
+ var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
3088
+
3089
+ // `Set.prototype.difference` method
3090
+ // https://github.com/tc39/proposal-set-methods
3091
+ $$6({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
3092
+ difference: difference
3093
+ });
3094
+
3095
+ var aSet$5 = aSet$7;
3096
+ var SetHelpers$1 = setHelpers;
3097
+ var size$3 = setSize;
3098
+ var getSetRecord$5 = getSetRecord$7;
3099
+ var iterateSet$1 = setIterate;
3100
+ var iterateSimple$4 = iterateSimple$7;
3101
+
3102
+ var Set$1 = SetHelpers$1.Set;
3103
+ var add$2 = SetHelpers$1.add;
3104
+ var has$3 = SetHelpers$1.has;
3105
+
3106
+ // `Set.prototype.intersection` method
3107
+ // https://github.com/tc39/proposal-set-methods
3108
+ var setIntersection = function intersection(other) {
3109
+ var O = aSet$5(this);
3110
+ var otherRec = getSetRecord$5(other);
3111
+ var result = new Set$1();
3112
+
3113
+ if (size$3(O) > otherRec.size) {
3114
+ iterateSimple$4(otherRec.getIterator(), function (e) {
3115
+ if (has$3(O, e)) add$2(result, e);
3116
+ });
3117
+ } else {
3118
+ iterateSet$1(O, function (e) {
3119
+ if (otherRec.includes(e)) add$2(result, e);
3120
+ });
3121
+ }
3122
+
3123
+ return result;
3124
+ };
3125
+
3126
+ var $$5 = _export;
3127
+ var fails = fails$j;
3128
+ var intersection = setIntersection;
3129
+ var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
3130
+
3131
+ var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails(function () {
3132
+ // eslint-disable-next-line es/no-array-from, es/no-set -- testing
3133
+ return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
3134
+ });
3135
+
3136
+ // `Set.prototype.intersection` method
3137
+ // https://github.com/tc39/proposal-set-methods
3138
+ $$5({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
3139
+ intersection: intersection
3140
+ });
3141
+
3142
+ var call = functionCall;
3143
+ var anObject = anObject$b;
3144
+ var getMethod = getMethod$3;
3145
+
3146
+ var iteratorClose$2 = function (iterator, kind, value) {
3147
+ var innerResult, innerError;
3148
+ anObject(iterator);
3149
+ try {
3150
+ innerResult = getMethod(iterator, 'return');
3151
+ if (!innerResult) {
3152
+ if (kind === 'throw') throw value;
3153
+ return value;
3154
+ }
3155
+ innerResult = call(innerResult, iterator);
3156
+ } catch (error) {
3157
+ innerError = true;
3158
+ innerResult = error;
3159
+ }
3160
+ if (kind === 'throw') throw value;
3161
+ if (innerError) throw innerResult;
3162
+ anObject(innerResult);
3163
+ return value;
3164
+ };
3165
+
3166
+ var aSet$4 = aSet$7;
3167
+ var has$2 = setHelpers.has;
3168
+ var size$2 = setSize;
3169
+ var getSetRecord$4 = getSetRecord$7;
3170
+ var iterateSet = setIterate;
3171
+ var iterateSimple$3 = iterateSimple$7;
3172
+ var iteratorClose$1 = iteratorClose$2;
3173
+
3174
+ // `Set.prototype.isDisjointFrom` method
3175
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
3176
+ var setIsDisjointFrom = function isDisjointFrom(other) {
3177
+ var O = aSet$4(this);
3178
+ var otherRec = getSetRecord$4(other);
3179
+ if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
3180
+ if (otherRec.includes(e)) return false;
3181
+ }, true) !== false;
3182
+ var iterator = otherRec.getIterator();
3183
+ return iterateSimple$3(iterator, function (e) {
3184
+ if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
3185
+ }) !== false;
3186
+ };
3187
+
3188
+ var $$4 = _export;
3189
+ var isDisjointFrom = setIsDisjointFrom;
3190
+ var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
3191
+
3192
+ // `Set.prototype.isDisjointFrom` method
3193
+ // https://github.com/tc39/proposal-set-methods
3194
+ $$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
3195
+ isDisjointFrom: isDisjointFrom
3196
+ });
3197
+
3198
+ var aSet$3 = aSet$7;
3199
+ var size$1 = setSize;
3200
+ var iterate = setIterate;
3201
+ var getSetRecord$3 = getSetRecord$7;
3202
+
3203
+ // `Set.prototype.isSubsetOf` method
3204
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
3205
+ var setIsSubsetOf = function isSubsetOf(other) {
3206
+ var O = aSet$3(this);
3207
+ var otherRec = getSetRecord$3(other);
3208
+ if (size$1(O) > otherRec.size) return false;
3209
+ return iterate(O, function (e) {
3210
+ if (!otherRec.includes(e)) return false;
3211
+ }, true) !== false;
3212
+ };
3213
+
3214
+ var $$3 = _export;
3215
+ var isSubsetOf = setIsSubsetOf;
3216
+ var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
3217
+
3218
+ // `Set.prototype.isSubsetOf` method
3219
+ // https://github.com/tc39/proposal-set-methods
3220
+ $$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
3221
+ isSubsetOf: isSubsetOf
3222
+ });
3223
+
3224
+ var aSet$2 = aSet$7;
3225
+ var has$1 = setHelpers.has;
3226
+ var size = setSize;
3227
+ var getSetRecord$2 = getSetRecord$7;
3228
+ var iterateSimple$2 = iterateSimple$7;
3229
+ var iteratorClose = iteratorClose$2;
3230
+
3231
+ // `Set.prototype.isSupersetOf` method
3232
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
3233
+ var setIsSupersetOf = function isSupersetOf(other) {
3234
+ var O = aSet$2(this);
3235
+ var otherRec = getSetRecord$2(other);
3236
+ if (size(O) < otherRec.size) return false;
3237
+ var iterator = otherRec.getIterator();
3238
+ return iterateSimple$2(iterator, function (e) {
3239
+ if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
3240
+ }) !== false;
3241
+ };
3242
+
3243
+ var $$2 = _export;
3244
+ var isSupersetOf = setIsSupersetOf;
3245
+ var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
3246
+
3247
+ // `Set.prototype.isSupersetOf` method
3248
+ // https://github.com/tc39/proposal-set-methods
3249
+ $$2({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
3250
+ isSupersetOf: isSupersetOf
3251
+ });
3252
+
3253
+ var aSet$1 = aSet$7;
3254
+ var SetHelpers = setHelpers;
3255
+ var clone$1 = setClone;
3256
+ var getSetRecord$1 = getSetRecord$7;
3257
+ var iterateSimple$1 = iterateSimple$7;
3258
+
3259
+ var add$1 = SetHelpers.add;
3260
+ var has = SetHelpers.has;
3261
+ var remove = SetHelpers.remove;
3262
+
3263
+ // `Set.prototype.symmetricDifference` method
3264
+ // https://github.com/tc39/proposal-set-methods
3265
+ var setSymmetricDifference = function symmetricDifference(other) {
3266
+ var O = aSet$1(this);
3267
+ var keysIter = getSetRecord$1(other).getIterator();
3268
+ var result = clone$1(O);
3269
+ iterateSimple$1(keysIter, function (e) {
3270
+ if (has(O, e)) remove(result, e);
3271
+ else add$1(result, e);
3272
+ });
3273
+ return result;
3274
+ };
3275
+
3276
+ var $$1 = _export;
3277
+ var symmetricDifference = setSymmetricDifference;
3278
+ var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
3279
+
3280
+ // `Set.prototype.symmetricDifference` method
3281
+ // https://github.com/tc39/proposal-set-methods
3282
+ $$1({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
3283
+ symmetricDifference: symmetricDifference
3284
+ });
3285
+
3286
+ var aSet = aSet$7;
3287
+ var add = setHelpers.add;
3288
+ var clone = setClone;
3289
+ var getSetRecord = getSetRecord$7;
3290
+ var iterateSimple = iterateSimple$7;
3291
+
3292
+ // `Set.prototype.union` method
3293
+ // https://github.com/tc39/proposal-set-methods
3294
+ var setUnion = function union(other) {
3295
+ var O = aSet(this);
3296
+ var keysIter = getSetRecord(other).getIterator();
3297
+ var result = clone(O);
3298
+ iterateSimple(keysIter, function (it) {
3299
+ add(result, it);
3300
+ });
3301
+ return result;
3302
+ };
3303
+
3304
+ var $ = _export;
3305
+ var union = setUnion;
3306
+ var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
3307
+
3308
+ // `Set.prototype.union` method
3309
+ // https://github.com/tc39/proposal-set-methods
3310
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
3311
+ union: union
3312
+ });
3313
+
2893
3314
  const defaultContext = {
2894
3315
  client: null,
2895
- connectionStatus: "disconnected"
3316
+ connectionStatus: "disconnected",
3317
+ subscribedTopics: null,
3318
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3319
+ addSubscribedTopic: () => {},
3320
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3321
+ removeSubscribedTopic: () => {}
2896
3322
  };
2897
3323
  const mqttContext = /*#__PURE__*/createContext(defaultContext);
2898
3324
  const defaultProps = {
@@ -2901,10 +3327,16 @@ const defaultProps = {
2901
3327
  const MqttProvider = props => {
2902
3328
  const [connectionStatus, setConnectionStatus] = useState("disconnected");
2903
3329
  const [mqttClient, setMqttClient] = useState(null);
3330
+ const subscribedTopics = useRef(new Set());
3331
+ const addSubscribedTopic = topic => subscribedTopics.current.add(topic);
3332
+ const removeSubscribedTopic = topic => subscribedTopics.current.delete(topic);
2904
3333
  const contextValue = useMemo(() => ({
2905
3334
  client: mqttClient,
2906
- connectionStatus
2907
- }), [mqttClient, connectionStatus]);
3335
+ connectionStatus,
3336
+ subscribedTopics,
3337
+ addSubscribedTopic,
3338
+ removeSubscribedTopic
3339
+ }), [mqttClient, connectionStatus, subscribedTopics]);
2908
3340
  useEffect(function mqttConnection() {
2909
3341
  function connectToMqtt() {
2910
3342
  return __awaiter(this, void 0, void 0, function* () {
@@ -2915,6 +3347,7 @@ const MqttProvider = props => {
2915
3347
  setConnectionStatus("connected");
2916
3348
  console.log("Connected to MQTT");
2917
3349
  setMqttClient(client);
3350
+ subscribedTopics.current = new Set();
2918
3351
  });
2919
3352
  client.on("error", error => {
2920
3353
  setConnectionStatus("error");
@@ -2927,6 +3360,8 @@ const MqttProvider = props => {
2927
3360
  setConnectionStatus("disconnected");
2928
3361
  });
2929
3362
  return function cleanup() {
3363
+ client.unsubscribe(Array.from(subscribedTopics.current));
3364
+ client.removeAllListeners();
2930
3365
  setMqttClient(null);
2931
3366
  setConnectionStatus("disconnected");
2932
3367
  client.end();
@@ -2934,7 +3369,7 @@ const MqttProvider = props => {
2934
3369
  });
2935
3370
  }
2936
3371
  connectToMqtt();
2937
- }, []);
3372
+ }, [props.version, subscribedTopics]);
2938
3373
  return jsx(mqttContext.Provider, {
2939
3374
  value: contextValue,
2940
3375
  children: props.children
@@ -2944,20 +3379,26 @@ const MqttProvider = props => {
2944
3379
  const useMqttSubscription = props => {
2945
3380
  const mqtt = useContext(mqttContext);
2946
3381
  const [message, setMessage] = useState();
2947
- useEffect(function test() {
2948
- var _a, _b;
3382
+ useEffect(function subscribeToTopics() {
3383
+ var _a, _b, _c;
2949
3384
  if (mqtt.connectionStatus !== "connected" || !mqtt.client) return;
2950
- (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.subscribe(props.topic);
2951
- // Using the on message is not optimal as for every subscription we will add a new listener
2952
- // For the sake of simplicity we will keep it like this
2953
- (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.on("message", (topic, message) => {
3385
+ const handleMessage = (topic, message) => {
2954
3386
  if (topic === props.topic) setMessage(JSON.parse(message.toString()));
2955
- });
3387
+ };
3388
+ if (!((_a = mqtt.subscribedTopics) === null || _a === void 0 ? void 0 : _a.current.has(props.topic))) {
3389
+ mqtt.addSubscribedTopic(props.topic);
3390
+ (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.subscribe(props.topic);
3391
+ }
3392
+ (_c = mqtt.client) === null || _c === void 0 ? void 0 : _c.on("message", handleMessage);
2956
3393
  return function cleanup() {
2957
- var _a;
2958
- (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.unsubscribe(props.topic);
3394
+ var _a, _b;
3395
+ (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.off("message", handleMessage);
3396
+ if (props.unsubscribeOnUnmount) {
3397
+ mqtt.removeSubscribedTopic(props.topic);
3398
+ (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.unsubscribe(props.topic);
3399
+ }
2959
3400
  };
2960
- }, [mqtt, props.topic]);
3401
+ }, [mqtt, props.topic, props.unsubscribeOnUnmount]);
2961
3402
  return message;
2962
3403
  };
2963
3404