@sebgroup/green-react 2.6.2 → 3.0.1

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,14 +1,14 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import React, { useState, useEffect, useRef, useMemo, useLayoutEffect, forwardRef, useCallback } from 'react';
3
- import { randomId, createDatepicker, months, years, validateClassName, debounce, delay, sliderColors, getSliderTrackBackground } from '@sebgroup/extract';
2
+ import React, { useState, useEffect, useMemo, useRef, useLayoutEffect, forwardRef, useCallback, useId } from 'react';
3
+ import { randomId, validateClassName, debounce, delay, sliderColors, getSliderTrackBackground } from '@sebgroup/extract';
4
4
  import { createComponent } from '@lit/react';
5
- import { getScopedTagName, GdsDropdown, GdsOption, GdsContextMenu, GdsMenuItem } from '@sebgroup/green-core';
5
+ import { getScopedTagName, GdsDatepicker, GdsDropdown, GdsOption, GdsContextMenu, GdsMenuItem } from '@sebgroup/green-core';
6
6
  import { registerTransitionalStyles } from '@sebgroup/green-core/transitional-styles';
7
7
  import classNames from 'classnames';
8
8
 
9
9
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
10
 
11
- var fails$g = function (exec) {
11
+ var fails$n = function (exec) {
12
12
  try {
13
13
  return !!exec();
14
14
  } catch (error) {
@@ -16,9 +16,9 @@ var fails$g = function (exec) {
16
16
  }
17
17
  };
18
18
 
19
- var fails$f = fails$g;
19
+ var fails$m = fails$n;
20
20
 
21
- var functionBindNative = !fails$f(function () {
21
+ var functionBindNative = !fails$m(function () {
22
22
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
23
23
  var test = (function () { /* empty */ }).bind();
24
24
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -28,63 +28,63 @@ var functionBindNative = !fails$f(function () {
28
28
  var NATIVE_BIND$3 = functionBindNative;
29
29
 
30
30
  var FunctionPrototype$2 = Function.prototype;
31
- var call$f = FunctionPrototype$2.call;
32
- var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$f, call$f);
31
+ var call$i = FunctionPrototype$2.call;
32
+ var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$i, call$i);
33
33
 
34
34
  var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
35
35
  return function () {
36
- return call$f.apply(fn, arguments);
36
+ return call$i.apply(fn, arguments);
37
37
  };
38
38
  };
39
39
 
40
- var uncurryThis$i = functionUncurryThis;
40
+ var uncurryThis$m = functionUncurryThis;
41
41
 
42
- var toString$6 = uncurryThis$i({}.toString);
43
- var stringSlice$2 = uncurryThis$i(''.slice);
42
+ var toString$a = uncurryThis$m({}.toString);
43
+ var stringSlice$4 = uncurryThis$m(''.slice);
44
44
 
45
45
  var classofRaw$2 = function (it) {
46
- return stringSlice$2(toString$6(it), 8, -1);
46
+ return stringSlice$4(toString$a(it), 8, -1);
47
47
  };
48
48
 
49
- var uncurryThis$h = functionUncurryThis;
50
- var fails$e = fails$g;
51
- var classof$6 = classofRaw$2;
49
+ var uncurryThis$l = functionUncurryThis;
50
+ var fails$l = fails$n;
51
+ var classof$7 = classofRaw$2;
52
52
 
53
53
  var $Object$4 = Object;
54
- var split = uncurryThis$h(''.split);
54
+ var split = uncurryThis$l(''.split);
55
55
 
56
56
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
57
- var indexedObject = fails$e(function () {
57
+ var indexedObject = fails$l(function () {
58
58
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
59
59
  // eslint-disable-next-line no-prototype-builtins -- safe
60
60
  return !$Object$4('z').propertyIsEnumerable(0);
61
61
  }) ? function (it) {
62
- return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
62
+ return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
63
63
  } : $Object$4;
64
64
 
65
65
  // we can't use just `it == null` since of `document.all` special case
66
66
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
67
- var isNullOrUndefined$4 = function (it) {
67
+ var isNullOrUndefined$5 = function (it) {
68
68
  return it === null || it === undefined;
69
69
  };
70
70
 
71
- var isNullOrUndefined$3 = isNullOrUndefined$4;
71
+ var isNullOrUndefined$4 = isNullOrUndefined$5;
72
72
 
73
- var $TypeError$d = TypeError;
73
+ var $TypeError$f = TypeError;
74
74
 
75
75
  // `RequireObjectCoercible` abstract operation
76
76
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
77
- var requireObjectCoercible$4 = function (it) {
78
- if (isNullOrUndefined$3(it)) throw new $TypeError$d("Can't call method on " + it);
77
+ var requireObjectCoercible$5 = function (it) {
78
+ if (isNullOrUndefined$4(it)) throw new $TypeError$f("Can't call method on " + it);
79
79
  return it;
80
80
  };
81
81
 
82
82
  // toObject with fallback for non-array-like ES3 strings
83
83
  var IndexedObject$1 = indexedObject;
84
- var requireObjectCoercible$3 = requireObjectCoercible$4;
84
+ var requireObjectCoercible$4 = requireObjectCoercible$5;
85
85
 
86
86
  var toIndexedObject$5 = function (it) {
87
- return IndexedObject$1(requireObjectCoercible$3(it));
87
+ return IndexedObject$1(requireObjectCoercible$4(it));
88
88
  };
89
89
 
90
90
  var check = function (it) {
@@ -92,7 +92,7 @@ var check = function (it) {
92
92
  };
93
93
 
94
94
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
95
- var global$k =
95
+ var global$o =
96
96
  // eslint-disable-next-line es/no-global-this -- safe
97
97
  check(typeof globalThis == 'object' && globalThis) ||
98
98
  check(typeof window == 'object' && window) ||
@@ -103,32 +103,32 @@ var global$k =
103
103
  // eslint-disable-next-line no-new-func -- fallback
104
104
  (function () { return this; })() || Function('return this')();
105
105
 
106
- var shared$3 = {exports: {}};
106
+ var shared$4 = {exports: {}};
107
107
 
108
- var global$j = global$k;
108
+ var global$n = global$o;
109
109
 
110
110
  // eslint-disable-next-line es/no-object-defineproperty -- safe
111
- var defineProperty$6 = Object.defineProperty;
111
+ var defineProperty$7 = Object.defineProperty;
112
112
 
113
113
  var defineGlobalProperty$3 = function (key, value) {
114
114
  try {
115
- defineProperty$6(global$j, key, { value: value, configurable: true, writable: true });
115
+ defineProperty$7(global$n, key, { value: value, configurable: true, writable: true });
116
116
  } catch (error) {
117
- global$j[key] = value;
117
+ global$n[key] = value;
118
118
  } return value;
119
119
  };
120
120
 
121
- var global$i = global$k;
121
+ var global$m = global$o;
122
122
  var defineGlobalProperty$2 = defineGlobalProperty$3;
123
123
 
124
124
  var SHARED = '__core-js_shared__';
125
- var store$3 = global$i[SHARED] || defineGlobalProperty$2(SHARED, {});
125
+ var store$3 = global$m[SHARED] || defineGlobalProperty$2(SHARED, {});
126
126
 
127
127
  var sharedStore = store$3;
128
128
 
129
129
  var store$2 = sharedStore;
130
130
 
131
- (shared$3.exports = function (key, value) {
131
+ (shared$4.exports = function (key, value) {
132
132
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
133
133
  })('versions', []).push({
134
134
  version: '3.33.3',
@@ -138,45 +138,45 @@ var store$2 = sharedStore;
138
138
  source: 'https://github.com/zloirock/core-js'
139
139
  });
140
140
 
141
- var requireObjectCoercible$2 = requireObjectCoercible$4;
141
+ var requireObjectCoercible$3 = requireObjectCoercible$5;
142
142
 
143
143
  var $Object$3 = Object;
144
144
 
145
145
  // `ToObject` abstract operation
146
146
  // https://tc39.es/ecma262/#sec-toobject
147
- var toObject$3 = function (argument) {
148
- return $Object$3(requireObjectCoercible$2(argument));
147
+ var toObject$4 = function (argument) {
148
+ return $Object$3(requireObjectCoercible$3(argument));
149
149
  };
150
150
 
151
- var uncurryThis$g = functionUncurryThis;
152
- var toObject$2 = toObject$3;
151
+ var uncurryThis$k = functionUncurryThis;
152
+ var toObject$3 = toObject$4;
153
153
 
154
- var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
154
+ var hasOwnProperty = uncurryThis$k({}.hasOwnProperty);
155
155
 
156
156
  // `HasOwnProperty` abstract operation
157
157
  // https://tc39.es/ecma262/#sec-hasownproperty
158
158
  // eslint-disable-next-line es/no-object-hasown -- safe
159
159
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
160
- return hasOwnProperty(toObject$2(it), key);
160
+ return hasOwnProperty(toObject$3(it), key);
161
161
  };
162
162
 
163
- var uncurryThis$f = functionUncurryThis;
163
+ var uncurryThis$j = functionUncurryThis;
164
164
 
165
165
  var id = 0;
166
166
  var postfix = Math.random();
167
- var toString$5 = uncurryThis$f(1.0.toString);
167
+ var toString$9 = uncurryThis$j(1.0.toString);
168
168
 
169
169
  var uid$2 = function (key) {
170
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
170
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$9(++id + postfix, 36);
171
171
  };
172
172
 
173
173
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
174
174
 
175
- var global$h = global$k;
176
- var userAgent$3 = engineUserAgent;
175
+ var global$l = global$o;
176
+ var userAgent$5 = engineUserAgent;
177
177
 
178
- var process$3 = global$h.process;
179
- var Deno$1 = global$h.Deno;
178
+ var process$3 = global$l.process;
179
+ var Deno$1 = global$l.Deno;
180
180
  var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
181
181
  var v8 = versions && versions.v8;
182
182
  var match, version;
@@ -190,10 +190,10 @@ if (v8) {
190
190
 
191
191
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
192
192
  // so check `userAgent` even if `.v8` exists, but 0
193
- if (!version && userAgent$3) {
194
- match = userAgent$3.match(/Edge\/(\d+)/);
193
+ if (!version && userAgent$5) {
194
+ match = userAgent$5.match(/Edge\/(\d+)/);
195
195
  if (!match || match[1] >= 74) {
196
- match = userAgent$3.match(/Chrome\/(\d+)/);
196
+ match = userAgent$5.match(/Chrome\/(\d+)/);
197
197
  if (match) version = +match[1];
198
198
  }
199
199
  }
@@ -202,13 +202,13 @@ var engineV8Version = version;
202
202
 
203
203
  /* eslint-disable es/no-symbol -- required for testing */
204
204
  var V8_VERSION$1 = engineV8Version;
205
- var fails$d = fails$g;
206
- var global$g = global$k;
205
+ var fails$k = fails$n;
206
+ var global$k = global$o;
207
207
 
208
- var $String$5 = global$g.String;
208
+ var $String$5 = global$k.String;
209
209
 
210
210
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
211
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
211
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
212
212
  var symbol = Symbol('symbol detection');
213
213
  // Chrome 38 Symbol has incorrect toString conversion
214
214
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -226,20 +226,20 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
226
226
  && !Symbol.sham
227
227
  && typeof Symbol.iterator == 'symbol';
228
228
 
229
- var global$f = global$k;
230
- var shared$2 = shared$3.exports;
231
- var hasOwn$b = hasOwnProperty_1;
229
+ var global$j = global$o;
230
+ var shared$3 = shared$4.exports;
231
+ var hasOwn$c = hasOwnProperty_1;
232
232
  var uid$1 = uid$2;
233
233
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
234
234
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
235
235
 
236
- var Symbol$2 = global$f.Symbol;
237
- var WellKnownSymbolsStore = shared$2('wks');
236
+ var Symbol$2 = global$j.Symbol;
237
+ var WellKnownSymbolsStore = shared$3('wks');
238
238
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
239
239
 
240
- var wellKnownSymbol$g = function (name) {
241
- if (!hasOwn$b(WellKnownSymbolsStore, name)) {
242
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$b(Symbol$2, name)
240
+ var wellKnownSymbol$i = function (name) {
241
+ if (!hasOwn$c(WellKnownSymbolsStore, name)) {
242
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$c(Symbol$2, name)
243
243
  ? Symbol$2[name]
244
244
  : createWellKnownSymbol('Symbol.' + name);
245
245
  } return WellKnownSymbolsStore[name];
@@ -262,50 +262,50 @@ var documentAll$1 = $documentAll$1.all;
262
262
 
263
263
  // `IsCallable` abstract operation
264
264
  // https://tc39.es/ecma262/#sec-iscallable
265
- var isCallable$l = $documentAll$1.IS_HTMLDDA ? function (argument) {
265
+ var isCallable$n = $documentAll$1.IS_HTMLDDA ? function (argument) {
266
266
  return typeof argument == 'function' || argument === documentAll$1;
267
267
  } : function (argument) {
268
268
  return typeof argument == 'function';
269
269
  };
270
270
 
271
- var isCallable$k = isCallable$l;
271
+ var isCallable$m = isCallable$n;
272
272
  var $documentAll = documentAll_1;
273
273
 
274
274
  var documentAll = $documentAll.all;
275
275
 
276
- var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
277
- return typeof it == 'object' ? it !== null : isCallable$k(it) || it === documentAll;
276
+ var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
277
+ return typeof it == 'object' ? it !== null : isCallable$m(it) || it === documentAll;
278
278
  } : function (it) {
279
- return typeof it == 'object' ? it !== null : isCallable$k(it);
279
+ return typeof it == 'object' ? it !== null : isCallable$m(it);
280
280
  };
281
281
 
282
- var isObject$8 = isObject$9;
282
+ var isObject$9 = isObject$a;
283
283
 
284
284
  var $String$4 = String;
285
- var $TypeError$c = TypeError;
285
+ var $TypeError$e = TypeError;
286
286
 
287
287
  // `Assert: Type(argument) is Object`
288
- var anObject$c = function (argument) {
289
- if (isObject$8(argument)) return argument;
290
- throw new $TypeError$c($String$4(argument) + ' is not an object');
288
+ var anObject$e = function (argument) {
289
+ if (isObject$9(argument)) return argument;
290
+ throw new $TypeError$e($String$4(argument) + ' is not an object');
291
291
  };
292
292
 
293
293
  var objectDefineProperties = {};
294
294
 
295
- var fails$c = fails$g;
295
+ var fails$j = fails$n;
296
296
 
297
297
  // Detect IE8's incomplete defineProperty implementation
298
- var descriptors = !fails$c(function () {
298
+ var descriptors = !fails$j(function () {
299
299
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
300
300
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
301
301
  });
302
302
 
303
- var DESCRIPTORS$b = descriptors;
304
- var fails$b = fails$g;
303
+ var DESCRIPTORS$c = descriptors;
304
+ var fails$i = fails$n;
305
305
 
306
306
  // V8 ~ Chrome 36-
307
307
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
308
- var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
308
+ var v8PrototypeDefineBug = DESCRIPTORS$c && fails$i(function () {
309
309
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
310
310
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
311
311
  value: 42,
@@ -315,23 +315,23 @@ var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
315
315
 
316
316
  var objectDefineProperty = {};
317
317
 
318
- var global$e = global$k;
319
- var isObject$7 = isObject$9;
318
+ var global$i = global$o;
319
+ var isObject$8 = isObject$a;
320
320
 
321
- var document$3 = global$e.document;
321
+ var document$3 = global$i.document;
322
322
  // typeof document.createElement is 'object' in old IE
323
- var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
323
+ var EXISTS$1 = isObject$8(document$3) && isObject$8(document$3.createElement);
324
324
 
325
325
  var documentCreateElement$2 = function (it) {
326
326
  return EXISTS$1 ? document$3.createElement(it) : {};
327
327
  };
328
328
 
329
- var DESCRIPTORS$a = descriptors;
330
- var fails$a = fails$g;
329
+ var DESCRIPTORS$b = descriptors;
330
+ var fails$h = fails$n;
331
331
  var createElement$1 = documentCreateElement$2;
332
332
 
333
333
  // Thanks to IE8 for its funny defineProperty
334
- var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
334
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
335
335
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
336
336
  return Object.defineProperty(createElement$1('div'), 'a', {
337
337
  get: function () { return 7; }
@@ -340,30 +340,30 @@ var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
340
340
 
341
341
  var NATIVE_BIND$2 = functionBindNative;
342
342
 
343
- var call$e = Function.prototype.call;
343
+ var call$h = Function.prototype.call;
344
344
 
345
- var functionCall = NATIVE_BIND$2 ? call$e.bind(call$e) : function () {
346
- return call$e.apply(call$e, arguments);
345
+ var functionCall = NATIVE_BIND$2 ? call$h.bind(call$h) : function () {
346
+ return call$h.apply(call$h, arguments);
347
347
  };
348
348
 
349
- var global$d = global$k;
350
- var isCallable$j = isCallable$l;
349
+ var global$h = global$o;
350
+ var isCallable$l = isCallable$n;
351
351
 
352
352
  var aFunction = function (argument) {
353
- return isCallable$j(argument) ? argument : undefined;
353
+ return isCallable$l(argument) ? argument : undefined;
354
354
  };
355
355
 
356
356
  var getBuiltIn$7 = function (namespace, method) {
357
- return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
357
+ return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
358
358
  };
359
359
 
360
- var uncurryThis$e = functionUncurryThis;
360
+ var uncurryThis$i = functionUncurryThis;
361
361
 
362
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
362
+ var objectIsPrototypeOf = uncurryThis$i({}.isPrototypeOf);
363
363
 
364
364
  var getBuiltIn$6 = getBuiltIn$7;
365
- var isCallable$i = isCallable$l;
366
- var isPrototypeOf$4 = objectIsPrototypeOf;
365
+ var isCallable$k = isCallable$n;
366
+ var isPrototypeOf$5 = objectIsPrototypeOf;
367
367
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
368
368
 
369
369
  var $Object$2 = Object;
@@ -372,12 +372,12 @@ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
372
372
  return typeof it == 'symbol';
373
373
  } : function (it) {
374
374
  var $Symbol = getBuiltIn$6('Symbol');
375
- return isCallable$i($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$2(it));
375
+ return isCallable$k($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$2(it));
376
376
  };
377
377
 
378
378
  var $String$3 = String;
379
379
 
380
- var tryToString$4 = function (argument) {
380
+ var tryToString$5 = function (argument) {
381
381
  try {
382
382
  return $String$3(argument);
383
383
  } catch (error) {
@@ -385,64 +385,64 @@ var tryToString$4 = function (argument) {
385
385
  }
386
386
  };
387
387
 
388
- var isCallable$h = isCallable$l;
389
- var tryToString$3 = tryToString$4;
388
+ var isCallable$j = isCallable$n;
389
+ var tryToString$4 = tryToString$5;
390
390
 
391
- var $TypeError$b = TypeError;
391
+ var $TypeError$d = TypeError;
392
392
 
393
393
  // `Assert: IsCallable(argument) is true`
394
- var aCallable$8 = function (argument) {
395
- if (isCallable$h(argument)) return argument;
396
- throw new $TypeError$b(tryToString$3(argument) + ' is not a function');
394
+ var aCallable$9 = function (argument) {
395
+ if (isCallable$j(argument)) return argument;
396
+ throw new $TypeError$d(tryToString$4(argument) + ' is not a function');
397
397
  };
398
398
 
399
- var aCallable$7 = aCallable$8;
400
- var isNullOrUndefined$2 = isNullOrUndefined$4;
399
+ var aCallable$8 = aCallable$9;
400
+ var isNullOrUndefined$3 = isNullOrUndefined$5;
401
401
 
402
402
  // `GetMethod` abstract operation
403
403
  // https://tc39.es/ecma262/#sec-getmethod
404
- var getMethod$3 = function (V, P) {
404
+ var getMethod$4 = function (V, P) {
405
405
  var func = V[P];
406
- return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
406
+ return isNullOrUndefined$3(func) ? undefined : aCallable$8(func);
407
407
  };
408
408
 
409
- var call$d = functionCall;
410
- var isCallable$g = isCallable$l;
411
- var isObject$6 = isObject$9;
409
+ var call$g = functionCall;
410
+ var isCallable$i = isCallable$n;
411
+ var isObject$7 = isObject$a;
412
412
 
413
- var $TypeError$a = TypeError;
413
+ var $TypeError$c = TypeError;
414
414
 
415
415
  // `OrdinaryToPrimitive` abstract operation
416
416
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
417
417
  var ordinaryToPrimitive$1 = function (input, pref) {
418
418
  var fn, val;
419
- if (pref === 'string' && isCallable$g(fn = input.toString) && !isObject$6(val = call$d(fn, input))) return val;
420
- if (isCallable$g(fn = input.valueOf) && !isObject$6(val = call$d(fn, input))) return val;
421
- if (pref !== 'string' && isCallable$g(fn = input.toString) && !isObject$6(val = call$d(fn, input))) return val;
422
- throw new $TypeError$a("Can't convert object to primitive value");
419
+ if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$7(val = call$g(fn, input))) return val;
420
+ if (isCallable$i(fn = input.valueOf) && !isObject$7(val = call$g(fn, input))) return val;
421
+ if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$7(val = call$g(fn, input))) return val;
422
+ throw new $TypeError$c("Can't convert object to primitive value");
423
423
  };
424
424
 
425
- var call$c = functionCall;
426
- var isObject$5 = isObject$9;
425
+ var call$f = functionCall;
426
+ var isObject$6 = isObject$a;
427
427
  var isSymbol$1 = isSymbol$2;
428
- var getMethod$2 = getMethod$3;
428
+ var getMethod$3 = getMethod$4;
429
429
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
430
- var wellKnownSymbol$f = wellKnownSymbol$g;
430
+ var wellKnownSymbol$h = wellKnownSymbol$i;
431
431
 
432
- var $TypeError$9 = TypeError;
433
- var TO_PRIMITIVE = wellKnownSymbol$f('toPrimitive');
432
+ var $TypeError$b = TypeError;
433
+ var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
434
434
 
435
435
  // `ToPrimitive` abstract operation
436
436
  // https://tc39.es/ecma262/#sec-toprimitive
437
437
  var toPrimitive$1 = function (input, pref) {
438
- if (!isObject$5(input) || isSymbol$1(input)) return input;
439
- var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
438
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
439
+ var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
440
440
  var result;
441
441
  if (exoticToPrim) {
442
442
  if (pref === undefined) pref = 'default';
443
- result = call$c(exoticToPrim, input, pref);
444
- if (!isObject$5(result) || isSymbol$1(result)) return result;
445
- throw new $TypeError$9("Can't convert object to primitive value");
443
+ result = call$f(exoticToPrim, input, pref);
444
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
445
+ throw new $TypeError$b("Can't convert object to primitive value");
446
446
  }
447
447
  if (pref === undefined) pref = 'number';
448
448
  return ordinaryToPrimitive(input, pref);
@@ -453,18 +453,18 @@ var isSymbol = isSymbol$2;
453
453
 
454
454
  // `ToPropertyKey` abstract operation
455
455
  // https://tc39.es/ecma262/#sec-topropertykey
456
- var toPropertyKey$2 = function (argument) {
456
+ var toPropertyKey$3 = function (argument) {
457
457
  var key = toPrimitive(argument, 'string');
458
458
  return isSymbol(key) ? key : key + '';
459
459
  };
460
460
 
461
- var DESCRIPTORS$9 = descriptors;
461
+ var DESCRIPTORS$a = descriptors;
462
462
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
463
463
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
464
- var anObject$b = anObject$c;
465
- var toPropertyKey$1 = toPropertyKey$2;
464
+ var anObject$d = anObject$e;
465
+ var toPropertyKey$2 = toPropertyKey$3;
466
466
 
467
- var $TypeError$8 = TypeError;
467
+ var $TypeError$a = TypeError;
468
468
  // eslint-disable-next-line es/no-object-defineproperty -- safe
469
469
  var $defineProperty = Object.defineProperty;
470
470
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -475,10 +475,10 @@ var WRITABLE = 'writable';
475
475
 
476
476
  // `Object.defineProperty` method
477
477
  // https://tc39.es/ecma262/#sec-object.defineproperty
478
- objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
479
- anObject$b(O);
480
- P = toPropertyKey$1(P);
481
- anObject$b(Attributes);
478
+ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
479
+ anObject$d(O);
480
+ P = toPropertyKey$2(P);
481
+ anObject$d(Attributes);
482
482
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
483
483
  var current = $getOwnPropertyDescriptor$1(O, P);
484
484
  if (current && current[WRITABLE]) {
@@ -491,26 +491,26 @@ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
491
491
  }
492
492
  } return $defineProperty(O, P, Attributes);
493
493
  } : $defineProperty : function defineProperty(O, P, Attributes) {
494
- anObject$b(O);
495
- P = toPropertyKey$1(P);
496
- anObject$b(Attributes);
494
+ anObject$d(O);
495
+ P = toPropertyKey$2(P);
496
+ anObject$d(Attributes);
497
497
  if (IE8_DOM_DEFINE$1) try {
498
498
  return $defineProperty(O, P, Attributes);
499
499
  } catch (error) { /* empty */ }
500
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$8('Accessors not supported');
500
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$a('Accessors not supported');
501
501
  if ('value' in Attributes) O[P] = Attributes.value;
502
502
  return O;
503
503
  };
504
504
 
505
505
  var ceil = Math.ceil;
506
- var floor = Math.floor;
506
+ var floor$1 = Math.floor;
507
507
 
508
508
  // `Math.trunc` method
509
509
  // https://tc39.es/ecma262/#sec-math.trunc
510
510
  // eslint-disable-next-line es/no-math-trunc -- safe
511
511
  var mathTrunc = Math.trunc || function trunc(x) {
512
512
  var n = +x;
513
- return (n > 0 ? floor : ceil)(n);
513
+ return (n > 0 ? floor$1 : ceil)(n);
514
514
  };
515
515
 
516
516
  var trunc = mathTrunc;
@@ -525,15 +525,15 @@ var toIntegerOrInfinity$2 = function (argument) {
525
525
 
526
526
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
527
527
 
528
- var max = Math.max;
528
+ var max$1 = Math.max;
529
529
  var min$1 = Math.min;
530
530
 
531
531
  // Helper for a popular repeating case of the spec:
532
532
  // Let integer be ? ToInteger(index).
533
533
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
534
- var toAbsoluteIndex$1 = function (index, length) {
534
+ var toAbsoluteIndex$2 = function (index, length) {
535
535
  var integer = toIntegerOrInfinity$1(index);
536
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
536
+ return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
537
537
  };
538
538
 
539
539
  var toIntegerOrInfinity = toIntegerOrInfinity$2;
@@ -550,20 +550,20 @@ var toLength = toLength$1;
550
550
 
551
551
  // `LengthOfArrayLike` abstract operation
552
552
  // https://tc39.es/ecma262/#sec-lengthofarraylike
553
- var lengthOfArrayLike$2 = function (obj) {
553
+ var lengthOfArrayLike$4 = function (obj) {
554
554
  return toLength(obj.length);
555
555
  };
556
556
 
557
557
  var toIndexedObject$4 = toIndexedObject$5;
558
- var toAbsoluteIndex = toAbsoluteIndex$1;
559
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
558
+ var toAbsoluteIndex$1 = toAbsoluteIndex$2;
559
+ var lengthOfArrayLike$3 = lengthOfArrayLike$4;
560
560
 
561
561
  // `Array.prototype.{ indexOf, includes }` methods implementation
562
562
  var createMethod$1 = function (IS_INCLUDES) {
563
563
  return function ($this, el, fromIndex) {
564
564
  var O = toIndexedObject$4($this);
565
- var length = lengthOfArrayLike$1(O);
566
- var index = toAbsoluteIndex(fromIndex, length);
565
+ var length = lengthOfArrayLike$3(O);
566
+ var index = toAbsoluteIndex$1(fromIndex, length);
567
567
  var value;
568
568
  // Array#includes uses SameValueZero equality algorithm
569
569
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -589,23 +589,23 @@ var arrayIncludes = {
589
589
 
590
590
  var hiddenKeys$4 = {};
591
591
 
592
- var uncurryThis$d = functionUncurryThis;
593
- var hasOwn$a = hasOwnProperty_1;
592
+ var uncurryThis$h = functionUncurryThis;
593
+ var hasOwn$b = hasOwnProperty_1;
594
594
  var toIndexedObject$3 = toIndexedObject$5;
595
- var indexOf = arrayIncludes.indexOf;
595
+ var indexOf$1 = arrayIncludes.indexOf;
596
596
  var hiddenKeys$3 = hiddenKeys$4;
597
597
 
598
- var push = uncurryThis$d([].push);
598
+ var push$1 = uncurryThis$h([].push);
599
599
 
600
600
  var objectKeysInternal = function (object, names) {
601
601
  var O = toIndexedObject$3(object);
602
602
  var i = 0;
603
603
  var result = [];
604
604
  var key;
605
- for (key in O) !hasOwn$a(hiddenKeys$3, key) && hasOwn$a(O, key) && push(result, key);
605
+ for (key in O) !hasOwn$b(hiddenKeys$3, key) && hasOwn$b(O, key) && push$1(result, key);
606
606
  // Don't enum bug & hidden keys
607
- while (names.length > i) if (hasOwn$a(O, key = names[i++])) {
608
- ~indexOf(result, key) || push(result, key);
607
+ while (names.length > i) if (hasOwn$b(O, key = names[i++])) {
608
+ ~indexOf$1(result, key) || push$1(result, key);
609
609
  }
610
610
  return result;
611
611
  };
@@ -631,24 +631,24 @@ var objectKeys$2 = Object.keys || function keys(O) {
631
631
  return internalObjectKeys$1(O, enumBugKeys$2);
632
632
  };
633
633
 
634
- var DESCRIPTORS$8 = descriptors;
634
+ var DESCRIPTORS$9 = descriptors;
635
635
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
636
- var definePropertyModule$3 = objectDefineProperty;
637
- var anObject$a = anObject$c;
636
+ var definePropertyModule$4 = objectDefineProperty;
637
+ var anObject$c = anObject$e;
638
638
  var toIndexedObject$2 = toIndexedObject$5;
639
639
  var objectKeys$1 = objectKeys$2;
640
640
 
641
641
  // `Object.defineProperties` method
642
642
  // https://tc39.es/ecma262/#sec-object.defineproperties
643
643
  // eslint-disable-next-line es/no-object-defineproperties -- safe
644
- objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
645
- anObject$a(O);
644
+ objectDefineProperties.f = DESCRIPTORS$9 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
645
+ anObject$c(O);
646
646
  var props = toIndexedObject$2(Properties);
647
647
  var keys = objectKeys$1(Properties);
648
648
  var length = keys.length;
649
649
  var index = 0;
650
650
  var key;
651
- while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
651
+ while (length > index) definePropertyModule$4.f(O, key = keys[index++], props[key]);
652
652
  return O;
653
653
  };
654
654
 
@@ -656,17 +656,17 @@ var getBuiltIn$5 = getBuiltIn$7;
656
656
 
657
657
  var html$2 = getBuiltIn$5('document', 'documentElement');
658
658
 
659
- var shared$1 = shared$3.exports;
659
+ var shared$2 = shared$4.exports;
660
660
  var uid = uid$2;
661
661
 
662
- var keys = shared$1('keys');
662
+ var keys$1 = shared$2('keys');
663
663
 
664
664
  var sharedKey$3 = function (key) {
665
- return keys[key] || (keys[key] = uid(key));
665
+ return keys$1[key] || (keys$1[key] = uid(key));
666
666
  };
667
667
 
668
668
  /* global ActiveXObject -- old IE, WSH */
669
- var anObject$9 = anObject$c;
669
+ var anObject$b = anObject$e;
670
670
  var definePropertiesModule = objectDefineProperties;
671
671
  var enumBugKeys$1 = enumBugKeys$3;
672
672
  var hiddenKeys$2 = hiddenKeys$4;
@@ -740,7 +740,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
740
740
  var objectCreate = Object.create || function create(O, Properties) {
741
741
  var result;
742
742
  if (O !== null) {
743
- EmptyConstructor[PROTOTYPE] = anObject$9(O);
743
+ EmptyConstructor[PROTOTYPE] = anObject$b(O);
744
744
  result = new EmptyConstructor();
745
745
  EmptyConstructor[PROTOTYPE] = null;
746
746
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -749,19 +749,19 @@ var objectCreate = Object.create || function create(O, Properties) {
749
749
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
750
750
  };
751
751
 
752
- var wellKnownSymbol$e = wellKnownSymbol$g;
753
- var create$1 = objectCreate;
754
- var defineProperty$5 = objectDefineProperty.f;
752
+ var wellKnownSymbol$g = wellKnownSymbol$i;
753
+ var create$2 = objectCreate;
754
+ var defineProperty$6 = objectDefineProperty.f;
755
755
 
756
- var UNSCOPABLES = wellKnownSymbol$e('unscopables');
756
+ var UNSCOPABLES = wellKnownSymbol$g('unscopables');
757
757
  var ArrayPrototype$1 = Array.prototype;
758
758
 
759
759
  // Array.prototype[@@unscopables]
760
760
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
761
761
  if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
762
- defineProperty$5(ArrayPrototype$1, UNSCOPABLES, {
762
+ defineProperty$6(ArrayPrototype$1, UNSCOPABLES, {
763
763
  configurable: true,
764
- value: create$1(null)
764
+ value: create$2(null)
765
765
  });
766
766
  }
767
767
 
@@ -772,14 +772,14 @@ var addToUnscopables$2 = function (key) {
772
772
 
773
773
  var iterators = {};
774
774
 
775
- var global$c = global$k;
776
- var isCallable$f = isCallable$l;
775
+ var global$g = global$o;
776
+ var isCallable$h = isCallable$n;
777
777
 
778
- var WeakMap$1 = global$c.WeakMap;
778
+ var WeakMap$1 = global$g.WeakMap;
779
779
 
780
- var weakMapBasicDetection = isCallable$f(WeakMap$1) && /native code/.test(String(WeakMap$1));
780
+ var weakMapBasicDetection = isCallable$h(WeakMap$1) && /native code/.test(String(WeakMap$1));
781
781
 
782
- var createPropertyDescriptor$3 = function (bitmap, value) {
782
+ var createPropertyDescriptor$4 = function (bitmap, value) {
783
783
  return {
784
784
  enumerable: !(bitmap & 1),
785
785
  configurable: !(bitmap & 2),
@@ -788,29 +788,29 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
788
788
  };
789
789
  };
790
790
 
791
- var DESCRIPTORS$7 = descriptors;
792
- var definePropertyModule$2 = objectDefineProperty;
793
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
791
+ var DESCRIPTORS$8 = descriptors;
792
+ var definePropertyModule$3 = objectDefineProperty;
793
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
794
794
 
795
- var createNonEnumerableProperty$4 = DESCRIPTORS$7 ? function (object, key, value) {
796
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
795
+ var createNonEnumerableProperty$6 = DESCRIPTORS$8 ? function (object, key, value) {
796
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$3(1, value));
797
797
  } : function (object, key, value) {
798
798
  object[key] = value;
799
799
  return object;
800
800
  };
801
801
 
802
802
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
803
- var global$b = global$k;
804
- var isObject$4 = isObject$9;
805
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
806
- var hasOwn$9 = hasOwnProperty_1;
807
- var shared = sharedStore;
803
+ var global$f = global$o;
804
+ var isObject$5 = isObject$a;
805
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
806
+ var hasOwn$a = hasOwnProperty_1;
807
+ var shared$1 = sharedStore;
808
808
  var sharedKey$1 = sharedKey$3;
809
809
  var hiddenKeys$1 = hiddenKeys$4;
810
810
 
811
811
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
812
- var TypeError$2 = global$b.TypeError;
813
- var WeakMap = global$b.WeakMap;
812
+ var TypeError$2 = global$f.TypeError;
813
+ var WeakMap = global$f.WeakMap;
814
814
  var set$1, get, has;
815
815
 
816
816
  var enforce = function (it) {
@@ -820,14 +820,14 @@ var enforce = function (it) {
820
820
  var getterFor = function (TYPE) {
821
821
  return function (it) {
822
822
  var state;
823
- if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
823
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
824
824
  throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
825
825
  } return state;
826
826
  };
827
827
  };
828
828
 
829
- if (NATIVE_WEAK_MAP || shared.state) {
830
- var store$1 = shared.state || (shared.state = new WeakMap());
829
+ if (NATIVE_WEAK_MAP || shared$1.state) {
830
+ var store$1 = shared$1.state || (shared$1.state = new WeakMap());
831
831
  /* eslint-disable no-self-assign -- prototype methods protection */
832
832
  store$1.get = store$1.get;
833
833
  store$1.has = store$1.has;
@@ -849,16 +849,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
849
849
  var STATE = sharedKey$1('state');
850
850
  hiddenKeys$1[STATE] = true;
851
851
  set$1 = function (it, metadata) {
852
- if (hasOwn$9(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
852
+ if (hasOwn$a(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
853
853
  metadata.facade = it;
854
- createNonEnumerableProperty$3(it, STATE, metadata);
854
+ createNonEnumerableProperty$5(it, STATE, metadata);
855
855
  return metadata;
856
856
  };
857
857
  get = function (it) {
858
- return hasOwn$9(it, STATE) ? it[STATE] : {};
858
+ return hasOwn$a(it, STATE) ? it[STATE] : {};
859
859
  };
860
860
  has = function (it) {
861
- return hasOwn$9(it, STATE);
861
+ return hasOwn$a(it, STATE);
862
862
  };
863
863
  }
864
864
 
@@ -888,13 +888,13 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
888
888
  return !!descriptor && descriptor.enumerable;
889
889
  } : $propertyIsEnumerable;
890
890
 
891
- var DESCRIPTORS$6 = descriptors;
892
- var call$b = functionCall;
891
+ var DESCRIPTORS$7 = descriptors;
892
+ var call$e = functionCall;
893
893
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
894
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
894
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
895
895
  var toIndexedObject$1 = toIndexedObject$5;
896
- var toPropertyKey = toPropertyKey$2;
897
- var hasOwn$8 = hasOwnProperty_1;
896
+ var toPropertyKey$1 = toPropertyKey$3;
897
+ var hasOwn$9 = hasOwnProperty_1;
898
898
  var IE8_DOM_DEFINE = ie8DomDefine;
899
899
 
900
900
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -902,28 +902,28 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
902
902
 
903
903
  // `Object.getOwnPropertyDescriptor` method
904
904
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
905
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
905
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
906
906
  O = toIndexedObject$1(O);
907
- P = toPropertyKey(P);
907
+ P = toPropertyKey$1(P);
908
908
  if (IE8_DOM_DEFINE) try {
909
909
  return $getOwnPropertyDescriptor(O, P);
910
910
  } catch (error) { /* empty */ }
911
- if (hasOwn$8(O, P)) return createPropertyDescriptor$1(!call$b(propertyIsEnumerableModule$1.f, O, P), O[P]);
911
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$e(propertyIsEnumerableModule$1.f, O, P), O[P]);
912
912
  };
913
913
 
914
914
  var makeBuiltIn$3 = {exports: {}};
915
915
 
916
- var DESCRIPTORS$5 = descriptors;
917
- var hasOwn$7 = hasOwnProperty_1;
916
+ var DESCRIPTORS$6 = descriptors;
917
+ var hasOwn$8 = hasOwnProperty_1;
918
918
 
919
919
  var FunctionPrototype$1 = Function.prototype;
920
920
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
921
- var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
921
+ var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
922
922
 
923
- var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
923
+ var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
924
924
  // additional protection from minified / mangled / dropped function names
925
925
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
926
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
926
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$6 || (DESCRIPTORS$6 && getDescriptor(FunctionPrototype$1, 'name').configurable));
927
927
 
928
928
  var functionName = {
929
929
  EXISTS: EXISTS,
@@ -931,14 +931,14 @@ var functionName = {
931
931
  CONFIGURABLE: CONFIGURABLE
932
932
  };
933
933
 
934
- var uncurryThis$c = functionUncurryThis;
935
- var isCallable$e = isCallable$l;
934
+ var uncurryThis$g = functionUncurryThis;
935
+ var isCallable$g = isCallable$n;
936
936
  var store = sharedStore;
937
937
 
938
- var functionToString = uncurryThis$c(Function.toString);
938
+ var functionToString = uncurryThis$g(Function.toString);
939
939
 
940
940
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
941
- if (!isCallable$e(store.inspectSource)) {
941
+ if (!isCallable$g(store.inspectSource)) {
942
942
  store.inspectSource = function (it) {
943
943
  return functionToString(it);
944
944
  };
@@ -946,51 +946,51 @@ if (!isCallable$e(store.inspectSource)) {
946
946
 
947
947
  var inspectSource$3 = store.inspectSource;
948
948
 
949
- var uncurryThis$b = functionUncurryThis;
950
- var fails$9 = fails$g;
951
- var isCallable$d = isCallable$l;
952
- var hasOwn$6 = hasOwnProperty_1;
953
- var DESCRIPTORS$4 = descriptors;
949
+ var uncurryThis$f = functionUncurryThis;
950
+ var fails$g = fails$n;
951
+ var isCallable$f = isCallable$n;
952
+ var hasOwn$7 = hasOwnProperty_1;
953
+ var DESCRIPTORS$5 = descriptors;
954
954
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
955
955
  var inspectSource$2 = inspectSource$3;
956
956
  var InternalStateModule$2 = internalState;
957
957
 
958
- var enforceInternalState = InternalStateModule$2.enforce;
959
- var getInternalState$1 = InternalStateModule$2.get;
958
+ var enforceInternalState$1 = InternalStateModule$2.enforce;
959
+ var getInternalState$2 = InternalStateModule$2.get;
960
960
  var $String$2 = String;
961
961
  // eslint-disable-next-line es/no-object-defineproperty -- safe
962
- var defineProperty$4 = Object.defineProperty;
963
- var stringSlice$1 = uncurryThis$b(''.slice);
964
- var replace$2 = uncurryThis$b(''.replace);
965
- var join = uncurryThis$b([].join);
962
+ var defineProperty$5 = Object.defineProperty;
963
+ var stringSlice$3 = uncurryThis$f(''.slice);
964
+ var replace$4 = uncurryThis$f(''.replace);
965
+ var join = uncurryThis$f([].join);
966
966
 
967
- var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$9(function () {
968
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
967
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$g(function () {
968
+ return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
969
969
  });
970
970
 
971
971
  var TEMPLATE = String(String).split('String');
972
972
 
973
973
  var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
974
- if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
975
- name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
974
+ if (stringSlice$3($String$2(name), 0, 7) === 'Symbol(') {
975
+ name = '[' + replace$4($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
976
976
  }
977
977
  if (options && options.getter) name = 'get ' + name;
978
978
  if (options && options.setter) name = 'set ' + name;
979
- if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
980
- if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
979
+ if (!hasOwn$7(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
980
+ if (DESCRIPTORS$5) defineProperty$5(value, 'name', { value: name, configurable: true });
981
981
  else value.name = name;
982
982
  }
983
- if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
984
- defineProperty$4(value, 'length', { value: options.arity });
983
+ if (CONFIGURABLE_LENGTH && options && hasOwn$7(options, 'arity') && value.length !== options.arity) {
984
+ defineProperty$5(value, 'length', { value: options.arity });
985
985
  }
986
986
  try {
987
- if (options && hasOwn$6(options, 'constructor') && options.constructor) {
988
- if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
987
+ if (options && hasOwn$7(options, 'constructor') && options.constructor) {
988
+ if (DESCRIPTORS$5) defineProperty$5(value, 'prototype', { writable: false });
989
989
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
990
990
  } else if (value.prototype) value.prototype = undefined;
991
991
  } catch (error) { /* empty */ }
992
- var state = enforceInternalState(value);
993
- if (!hasOwn$6(state, 'source')) {
992
+ var state = enforceInternalState$1(value);
993
+ if (!hasOwn$7(state, 'source')) {
994
994
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
995
995
  } return value;
996
996
  };
@@ -998,19 +998,19 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
998
998
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
999
999
  // eslint-disable-next-line no-extend-native -- required
1000
1000
  Function.prototype.toString = makeBuiltIn$2(function toString() {
1001
- return isCallable$d(this) && getInternalState$1(this).source || inspectSource$2(this);
1001
+ return isCallable$f(this) && getInternalState$2(this).source || inspectSource$2(this);
1002
1002
  }, 'toString');
1003
1003
 
1004
- var isCallable$c = isCallable$l;
1005
- var definePropertyModule$1 = objectDefineProperty;
1004
+ var isCallable$e = isCallable$n;
1005
+ var definePropertyModule$2 = objectDefineProperty;
1006
1006
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
1007
1007
  var defineGlobalProperty$1 = defineGlobalProperty$3;
1008
1008
 
1009
- var defineBuiltIn$6 = function (O, key, value, options) {
1009
+ var defineBuiltIn$8 = function (O, key, value, options) {
1010
1010
  if (!options) options = {};
1011
1011
  var simple = options.enumerable;
1012
1012
  var name = options.name !== undefined ? options.name : key;
1013
- if (isCallable$c(value)) makeBuiltIn$1(value, name, options);
1013
+ if (isCallable$e(value)) makeBuiltIn$1(value, name, options);
1014
1014
  if (options.global) {
1015
1015
  if (simple) O[key] = value;
1016
1016
  else defineGlobalProperty$1(key, value);
@@ -1020,7 +1020,7 @@ var defineBuiltIn$6 = function (O, key, value, options) {
1020
1020
  else if (O[key]) simple = true;
1021
1021
  } catch (error) { /* empty */ }
1022
1022
  if (simple) O[key] = value;
1023
- else definePropertyModule$1.f(O, key, {
1023
+ else definePropertyModule$2.f(O, key, {
1024
1024
  value: value,
1025
1025
  enumerable: false,
1026
1026
  configurable: !options.nonConfigurable,
@@ -1049,67 +1049,67 @@ var objectGetOwnPropertySymbols = {};
1049
1049
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1050
1050
 
1051
1051
  var getBuiltIn$4 = getBuiltIn$7;
1052
- var uncurryThis$a = functionUncurryThis;
1052
+ var uncurryThis$e = functionUncurryThis;
1053
1053
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1054
1054
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1055
- var anObject$8 = anObject$c;
1055
+ var anObject$a = anObject$e;
1056
1056
 
1057
- var concat$1 = uncurryThis$a([].concat);
1057
+ var concat$1 = uncurryThis$e([].concat);
1058
1058
 
1059
1059
  // all object keys, includes non-enumerable and symbols
1060
1060
  var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
1061
- var keys = getOwnPropertyNamesModule.f(anObject$8(it));
1061
+ var keys = getOwnPropertyNamesModule.f(anObject$a(it));
1062
1062
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1063
1063
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1064
1064
  };
1065
1065
 
1066
- var hasOwn$5 = hasOwnProperty_1;
1066
+ var hasOwn$6 = hasOwnProperty_1;
1067
1067
  var ownKeys = ownKeys$1;
1068
1068
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1069
- var definePropertyModule = objectDefineProperty;
1069
+ var definePropertyModule$1 = objectDefineProperty;
1070
1070
 
1071
1071
  var copyConstructorProperties$2 = function (target, source, exceptions) {
1072
1072
  var keys = ownKeys(source);
1073
- var defineProperty = definePropertyModule.f;
1073
+ var defineProperty = definePropertyModule$1.f;
1074
1074
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1075
1075
  for (var i = 0; i < keys.length; i++) {
1076
1076
  var key = keys[i];
1077
- if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
1077
+ if (!hasOwn$6(target, key) && !(exceptions && hasOwn$6(exceptions, key))) {
1078
1078
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1079
1079
  }
1080
1080
  }
1081
1081
  };
1082
1082
 
1083
- var fails$8 = fails$g;
1084
- var isCallable$b = isCallable$l;
1083
+ var fails$f = fails$n;
1084
+ var isCallable$d = isCallable$n;
1085
1085
 
1086
1086
  var replacement = /#|\.prototype\./;
1087
1087
 
1088
- var isForced$2 = function (feature, detection) {
1088
+ var isForced$3 = function (feature, detection) {
1089
1089
  var value = data[normalize(feature)];
1090
1090
  return value === POLYFILL ? true
1091
1091
  : value === NATIVE ? false
1092
- : isCallable$b(detection) ? fails$8(detection)
1092
+ : isCallable$d(detection) ? fails$f(detection)
1093
1093
  : !!detection;
1094
1094
  };
1095
1095
 
1096
- var normalize = isForced$2.normalize = function (string) {
1096
+ var normalize = isForced$3.normalize = function (string) {
1097
1097
  return String(string).replace(replacement, '.').toLowerCase();
1098
1098
  };
1099
1099
 
1100
- var data = isForced$2.data = {};
1101
- var NATIVE = isForced$2.NATIVE = 'N';
1102
- var POLYFILL = isForced$2.POLYFILL = 'P';
1100
+ var data = isForced$3.data = {};
1101
+ var NATIVE = isForced$3.NATIVE = 'N';
1102
+ var POLYFILL = isForced$3.POLYFILL = 'P';
1103
1103
 
1104
- var isForced_1 = isForced$2;
1104
+ var isForced_1 = isForced$3;
1105
1105
 
1106
- var global$a = global$k;
1106
+ var global$e = global$o;
1107
1107
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1108
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1109
- var defineBuiltIn$5 = defineBuiltIn$6;
1108
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
1109
+ var defineBuiltIn$7 = defineBuiltIn$8;
1110
1110
  var defineGlobalProperty = defineGlobalProperty$3;
1111
1111
  var copyConstructorProperties$1 = copyConstructorProperties$2;
1112
- var isForced$1 = isForced_1;
1112
+ var isForced$2 = isForced_1;
1113
1113
 
1114
1114
  /*
1115
1115
  options.target - name of the target object
@@ -1132,11 +1132,11 @@ var _export = function (options, source) {
1132
1132
  var STATIC = options.stat;
1133
1133
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1134
1134
  if (GLOBAL) {
1135
- target = global$a;
1135
+ target = global$e;
1136
1136
  } else if (STATIC) {
1137
- target = global$a[TARGET] || defineGlobalProperty(TARGET, {});
1137
+ target = global$e[TARGET] || defineGlobalProperty(TARGET, {});
1138
1138
  } else {
1139
- target = (global$a[TARGET] || {}).prototype;
1139
+ target = (global$e[TARGET] || {}).prototype;
1140
1140
  }
1141
1141
  if (target) for (key in source) {
1142
1142
  sourceProperty = source[key];
@@ -1144,7 +1144,7 @@ var _export = function (options, source) {
1144
1144
  descriptor = getOwnPropertyDescriptor$1(target, key);
1145
1145
  targetProperty = descriptor && descriptor.value;
1146
1146
  } else targetProperty = target[key];
1147
- FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1147
+ FORCED = isForced$2(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1148
1148
  // contained in target
1149
1149
  if (!FORCED && targetProperty !== undefined) {
1150
1150
  if (typeof sourceProperty == typeof targetProperty) continue;
@@ -1152,24 +1152,24 @@ var _export = function (options, source) {
1152
1152
  }
1153
1153
  // add a flag to not completely full polyfills
1154
1154
  if (options.sham || (targetProperty && targetProperty.sham)) {
1155
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1155
+ createNonEnumerableProperty$4(sourceProperty, 'sham', true);
1156
1156
  }
1157
- defineBuiltIn$5(target, key, sourceProperty, options);
1157
+ defineBuiltIn$7(target, key, sourceProperty, options);
1158
1158
  }
1159
1159
  };
1160
1160
 
1161
- var fails$7 = fails$g;
1161
+ var fails$e = fails$n;
1162
1162
 
1163
- var correctPrototypeGetter = !fails$7(function () {
1163
+ var correctPrototypeGetter = !fails$e(function () {
1164
1164
  function F() { /* empty */ }
1165
1165
  F.prototype.constructor = null;
1166
1166
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1167
1167
  return Object.getPrototypeOf(new F()) !== F.prototype;
1168
1168
  });
1169
1169
 
1170
- var hasOwn$4 = hasOwnProperty_1;
1171
- var isCallable$a = isCallable$l;
1172
- var toObject$1 = toObject$3;
1170
+ var hasOwn$5 = hasOwnProperty_1;
1171
+ var isCallable$c = isCallable$n;
1172
+ var toObject$2 = toObject$4;
1173
1173
  var sharedKey = sharedKey$3;
1174
1174
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1175
1175
 
@@ -1181,22 +1181,22 @@ var ObjectPrototype = $Object$1.prototype;
1181
1181
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1182
1182
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1183
1183
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1184
- var object = toObject$1(O);
1185
- if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
1184
+ var object = toObject$2(O);
1185
+ if (hasOwn$5(object, IE_PROTO)) return object[IE_PROTO];
1186
1186
  var constructor = object.constructor;
1187
- if (isCallable$a(constructor) && object instanceof constructor) {
1187
+ if (isCallable$c(constructor) && object instanceof constructor) {
1188
1188
  return constructor.prototype;
1189
1189
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1190
1190
  };
1191
1191
 
1192
- var fails$6 = fails$g;
1193
- var isCallable$9 = isCallable$l;
1194
- var isObject$3 = isObject$9;
1192
+ var fails$d = fails$n;
1193
+ var isCallable$b = isCallable$n;
1194
+ var isObject$4 = isObject$a;
1195
1195
  var getPrototypeOf$1 = objectGetPrototypeOf;
1196
- var defineBuiltIn$4 = defineBuiltIn$6;
1197
- var wellKnownSymbol$d = wellKnownSymbol$g;
1196
+ var defineBuiltIn$6 = defineBuiltIn$8;
1197
+ var wellKnownSymbol$f = wellKnownSymbol$i;
1198
1198
 
1199
- var ITERATOR$6 = wellKnownSymbol$d('iterator');
1199
+ var ITERATOR$6 = wellKnownSymbol$f('iterator');
1200
1200
  var BUGGY_SAFARI_ITERATORS$1 = false;
1201
1201
 
1202
1202
  // `%IteratorPrototype%` object
@@ -1214,7 +1214,7 @@ if ([].keys) {
1214
1214
  }
1215
1215
  }
1216
1216
 
1217
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$6(function () {
1217
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$d(function () {
1218
1218
  var test = {};
1219
1219
  // FF44- legacy iterators case
1220
1220
  return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
@@ -1224,8 +1224,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1224
1224
 
1225
1225
  // `%IteratorPrototype%[@@iterator]()` method
1226
1226
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1227
- if (!isCallable$9(IteratorPrototype$2[ITERATOR$6])) {
1228
- defineBuiltIn$4(IteratorPrototype$2, ITERATOR$6, function () {
1227
+ if (!isCallable$b(IteratorPrototype$2[ITERATOR$6])) {
1228
+ defineBuiltIn$6(IteratorPrototype$2, ITERATOR$6, function () {
1229
1229
  return this;
1230
1230
  });
1231
1231
  }
@@ -1235,22 +1235,22 @@ var iteratorsCore = {
1235
1235
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1236
1236
  };
1237
1237
 
1238
- var defineProperty$3 = objectDefineProperty.f;
1239
- var hasOwn$3 = hasOwnProperty_1;
1240
- var wellKnownSymbol$c = wellKnownSymbol$g;
1238
+ var defineProperty$4 = objectDefineProperty.f;
1239
+ var hasOwn$4 = hasOwnProperty_1;
1240
+ var wellKnownSymbol$e = wellKnownSymbol$i;
1241
1241
 
1242
- var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
1242
+ var TO_STRING_TAG$3 = wellKnownSymbol$e('toStringTag');
1243
1243
 
1244
1244
  var setToStringTag$3 = function (target, TAG, STATIC) {
1245
1245
  if (target && !STATIC) target = target.prototype;
1246
- if (target && !hasOwn$3(target, TO_STRING_TAG$3)) {
1247
- defineProperty$3(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1246
+ if (target && !hasOwn$4(target, TO_STRING_TAG$3)) {
1247
+ defineProperty$4(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1248
1248
  }
1249
1249
  };
1250
1250
 
1251
1251
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1252
- var create = objectCreate;
1253
- var createPropertyDescriptor = createPropertyDescriptor$3;
1252
+ var create$1 = objectCreate;
1253
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1254
1254
  var setToStringTag$2 = setToStringTag$3;
1255
1255
  var Iterators$4 = iterators;
1256
1256
 
@@ -1258,35 +1258,35 @@ var returnThis$1 = function () { return this; };
1258
1258
 
1259
1259
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1260
1260
  var TO_STRING_TAG = NAME + ' Iterator';
1261
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1261
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1262
1262
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1263
1263
  Iterators$4[TO_STRING_TAG] = returnThis$1;
1264
1264
  return IteratorConstructor;
1265
1265
  };
1266
1266
 
1267
- var uncurryThis$9 = functionUncurryThis;
1268
- var aCallable$6 = aCallable$8;
1267
+ var uncurryThis$d = functionUncurryThis;
1268
+ var aCallable$7 = aCallable$9;
1269
1269
 
1270
1270
  var functionUncurryThisAccessor = function (object, key, method) {
1271
1271
  try {
1272
1272
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1273
- return uncurryThis$9(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
1273
+ return uncurryThis$d(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
1274
1274
  } catch (error) { /* empty */ }
1275
1275
  };
1276
1276
 
1277
- var isCallable$8 = isCallable$l;
1277
+ var isCallable$a = isCallable$n;
1278
1278
 
1279
1279
  var $String$1 = String;
1280
- var $TypeError$7 = TypeError;
1280
+ var $TypeError$9 = TypeError;
1281
1281
 
1282
1282
  var aPossiblePrototype$1 = function (argument) {
1283
- if (typeof argument == 'object' || isCallable$8(argument)) return argument;
1284
- throw new $TypeError$7("Can't set " + $String$1(argument) + ' as a prototype');
1283
+ if (typeof argument == 'object' || isCallable$a(argument)) return argument;
1284
+ throw new $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
1285
1285
  };
1286
1286
 
1287
1287
  /* eslint-disable no-proto -- safe */
1288
1288
  var uncurryThisAccessor = functionUncurryThisAccessor;
1289
- var anObject$7 = anObject$c;
1289
+ var anObject$9 = anObject$e;
1290
1290
  var aPossiblePrototype = aPossiblePrototype$1;
1291
1291
 
1292
1292
  // `Object.setPrototypeOf` method
@@ -1303,7 +1303,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1303
1303
  CORRECT_SETTER = test instanceof Array;
1304
1304
  } catch (error) { /* empty */ }
1305
1305
  return function setPrototypeOf(O, proto) {
1306
- anObject$7(O);
1306
+ anObject$9(O);
1307
1307
  aPossiblePrototype(proto);
1308
1308
  if (CORRECT_SETTER) setter(O, proto);
1309
1309
  else O.__proto__ = proto;
@@ -1311,17 +1311,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1311
1311
  };
1312
1312
  }() : undefined);
1313
1313
 
1314
- var $$b = _export;
1315
- var call$a = functionCall;
1314
+ var $$d = _export;
1315
+ var call$d = functionCall;
1316
1316
  var FunctionName = functionName;
1317
- var isCallable$7 = isCallable$l;
1317
+ var isCallable$9 = isCallable$n;
1318
1318
  var createIteratorConstructor = iteratorCreateConstructor;
1319
1319
  var getPrototypeOf = objectGetPrototypeOf;
1320
- var setPrototypeOf$1 = objectSetPrototypeOf;
1320
+ var setPrototypeOf$2 = objectSetPrototypeOf;
1321
1321
  var setToStringTag$1 = setToStringTag$3;
1322
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1323
- var defineBuiltIn$3 = defineBuiltIn$6;
1324
- var wellKnownSymbol$b = wellKnownSymbol$g;
1322
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
1323
+ var defineBuiltIn$5 = defineBuiltIn$8;
1324
+ var wellKnownSymbol$d = wellKnownSymbol$i;
1325
1325
  var Iterators$3 = iterators;
1326
1326
  var IteratorsCore = iteratorsCore;
1327
1327
 
@@ -1329,7 +1329,7 @@ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1329
1329
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1330
1330
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1331
1331
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1332
- var ITERATOR$5 = wellKnownSymbol$b('iterator');
1332
+ var ITERATOR$5 = wellKnownSymbol$d('iterator');
1333
1333
  var KEYS = 'keys';
1334
1334
  var VALUES = 'values';
1335
1335
  var ENTRIES = 'entries';
@@ -1367,10 +1367,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1367
1367
  CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1368
1368
  if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1369
1369
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1370
- if (setPrototypeOf$1) {
1371
- setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1372
- } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$5])) {
1373
- defineBuiltIn$3(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1370
+ if (setPrototypeOf$2) {
1371
+ setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype);
1372
+ } else if (!isCallable$9(CurrentIteratorPrototype[ITERATOR$5])) {
1373
+ defineBuiltIn$5(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1374
1374
  }
1375
1375
  }
1376
1376
  // Set @@toStringTag to native iterators
@@ -1381,10 +1381,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1381
1381
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1382
1382
  if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1383
1383
  if (CONFIGURABLE_FUNCTION_NAME) {
1384
- createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1384
+ createNonEnumerableProperty$3(IterablePrototype, 'name', VALUES);
1385
1385
  } else {
1386
1386
  INCORRECT_VALUES_NAME = true;
1387
- defaultIterator = function values() { return call$a(nativeIterator, this); };
1387
+ defaultIterator = function values() { return call$d(nativeIterator, this); };
1388
1388
  }
1389
1389
  }
1390
1390
 
@@ -1397,14 +1397,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1397
1397
  };
1398
1398
  if (FORCED) for (KEY in methods) {
1399
1399
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1400
- defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
1400
+ defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
1401
1401
  }
1402
- } else $$b({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1402
+ } else $$d({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1403
1403
  }
1404
1404
 
1405
1405
  // define iterator
1406
1406
  if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
1407
- defineBuiltIn$3(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1407
+ defineBuiltIn$5(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1408
1408
  }
1409
1409
  Iterators$3[NAME] = defaultIterator;
1410
1410
 
@@ -1421,14 +1421,14 @@ var toIndexedObject = toIndexedObject$5;
1421
1421
  var addToUnscopables$1 = addToUnscopables$2;
1422
1422
  var Iterators$2 = iterators;
1423
1423
  var InternalStateModule$1 = internalState;
1424
- var defineProperty$2 = objectDefineProperty.f;
1424
+ var defineProperty$3 = objectDefineProperty.f;
1425
1425
  var defineIterator = iteratorDefine;
1426
1426
  var createIterResultObject = createIterResultObject$1;
1427
- var DESCRIPTORS$3 = descriptors;
1427
+ var DESCRIPTORS$4 = descriptors;
1428
1428
 
1429
1429
  var ARRAY_ITERATOR = 'Array Iterator';
1430
1430
  var setInternalState$1 = InternalStateModule$1.set;
1431
- var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1431
+ var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1432
1432
 
1433
1433
  // `Array.prototype.entries` method
1434
1434
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1450,7 +1450,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1450
1450
  // `%ArrayIteratorPrototype%.next` method
1451
1451
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1452
1452
  }, function () {
1453
- var state = getInternalState(this);
1453
+ var state = getInternalState$1(this);
1454
1454
  var target = state.target;
1455
1455
  var index = state.index++;
1456
1456
  if (!target || index >= target.length) {
@@ -1474,8 +1474,8 @@ addToUnscopables$1('values');
1474
1474
  addToUnscopables$1('entries');
1475
1475
 
1476
1476
  // V8 ~ Chrome 45- bug
1477
- if (DESCRIPTORS$3 && values.name !== 'values') try {
1478
- defineProperty$2(values, 'name', { value: 'values' });
1477
+ if (DESCRIPTORS$4 && values.name !== 'values') try {
1478
+ defineProperty$3(values, 'name', { value: 'values' });
1479
1479
  } catch (error) { /* empty */ }
1480
1480
 
1481
1481
  // iterable DOM collections
@@ -1522,32 +1522,32 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1522
1522
 
1523
1523
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1524
1524
 
1525
- var global$9 = global$k;
1525
+ var global$d = global$o;
1526
1526
  var DOMIterables = domIterables;
1527
1527
  var DOMTokenListPrototype = domTokenListPrototype;
1528
1528
  var ArrayIteratorMethods = es_array_iterator;
1529
- var createNonEnumerableProperty = createNonEnumerableProperty$4;
1530
- var wellKnownSymbol$a = wellKnownSymbol$g;
1529
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1530
+ var wellKnownSymbol$c = wellKnownSymbol$i;
1531
1531
 
1532
- var ITERATOR$4 = wellKnownSymbol$a('iterator');
1533
- var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
1532
+ var ITERATOR$4 = wellKnownSymbol$c('iterator');
1533
+ var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
1534
1534
  var ArrayValues = ArrayIteratorMethods.values;
1535
1535
 
1536
1536
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1537
1537
  if (CollectionPrototype) {
1538
1538
  // some Chrome versions have non-configurable methods on DOMTokenList
1539
1539
  if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
1540
- createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
1540
+ createNonEnumerableProperty$2(CollectionPrototype, ITERATOR$4, ArrayValues);
1541
1541
  } catch (error) {
1542
1542
  CollectionPrototype[ITERATOR$4] = ArrayValues;
1543
1543
  }
1544
1544
  if (!CollectionPrototype[TO_STRING_TAG$2]) {
1545
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1545
+ createNonEnumerableProperty$2(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1546
1546
  }
1547
1547
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1548
1548
  // some Chrome versions have non-configurable methods on DOMTokenList
1549
1549
  if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1550
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1550
+ createNonEnumerableProperty$2(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1551
1551
  } catch (error) {
1552
1552
  CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1553
1553
  }
@@ -1556,35 +1556,35 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1556
1556
  };
1557
1557
 
1558
1558
  for (var COLLECTION_NAME in DOMIterables) {
1559
- handlePrototype(global$9[COLLECTION_NAME] && global$9[COLLECTION_NAME].prototype, COLLECTION_NAME);
1559
+ handlePrototype(global$d[COLLECTION_NAME] && global$d[COLLECTION_NAME].prototype, COLLECTION_NAME);
1560
1560
  }
1561
1561
 
1562
1562
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1563
1563
 
1564
- var DESCRIPTORS$2 = descriptors;
1565
- var uncurryThis$8 = functionUncurryThis;
1566
- var call$9 = functionCall;
1567
- var fails$5 = fails$g;
1564
+ var DESCRIPTORS$3 = descriptors;
1565
+ var uncurryThis$c = functionUncurryThis;
1566
+ var call$c = functionCall;
1567
+ var fails$c = fails$n;
1568
1568
  var objectKeys = objectKeys$2;
1569
1569
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1570
1570
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1571
- var toObject = toObject$3;
1571
+ var toObject$1 = toObject$4;
1572
1572
  var IndexedObject = indexedObject;
1573
1573
 
1574
1574
  // eslint-disable-next-line es/no-object-assign -- safe
1575
1575
  var $assign = Object.assign;
1576
1576
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1577
- var defineProperty$1 = Object.defineProperty;
1578
- var concat = uncurryThis$8([].concat);
1577
+ var defineProperty$2 = Object.defineProperty;
1578
+ var concat = uncurryThis$c([].concat);
1579
1579
 
1580
1580
  // `Object.assign` method
1581
1581
  // https://tc39.es/ecma262/#sec-object.assign
1582
- var objectAssign = !$assign || fails$5(function () {
1582
+ var objectAssign = !$assign || fails$c(function () {
1583
1583
  // should have correct order of operations (Edge bug)
1584
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
1584
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1585
1585
  enumerable: true,
1586
1586
  get: function () {
1587
- defineProperty$1(this, 'b', {
1587
+ defineProperty$2(this, 'b', {
1588
1588
  value: 3,
1589
1589
  enumerable: false
1590
1590
  });
@@ -1600,7 +1600,7 @@ var objectAssign = !$assign || fails$5(function () {
1600
1600
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1601
1601
  return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1602
1602
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1603
- var T = toObject(target);
1603
+ var T = toObject$1(target);
1604
1604
  var argumentsLength = arguments.length;
1605
1605
  var index = 1;
1606
1606
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -1613,18 +1613,18 @@ var objectAssign = !$assign || fails$5(function () {
1613
1613
  var key;
1614
1614
  while (length > j) {
1615
1615
  key = keys[j++];
1616
- if (!DESCRIPTORS$2 || call$9(propertyIsEnumerable, S, key)) T[key] = S[key];
1616
+ if (!DESCRIPTORS$3 || call$c(propertyIsEnumerable, S, key)) T[key] = S[key];
1617
1617
  }
1618
1618
  } return T;
1619
1619
  } : $assign;
1620
1620
 
1621
- var $$a = _export;
1621
+ var $$c = _export;
1622
1622
  var assign = objectAssign;
1623
1623
 
1624
1624
  // `Object.assign` method
1625
1625
  // https://tc39.es/ecma262/#sec-object.assign
1626
1626
  // eslint-disable-next-line es/no-object-assign -- required for testing
1627
- $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1627
+ $$c({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1628
1628
  assign: assign
1629
1629
  });
1630
1630
 
@@ -2068,49 +2068,67 @@ function Card({
2068
2068
  }));
2069
2069
  }
2070
2070
 
2071
- const useDatepicker = (datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options = {}) => {
2072
- const dataStub = {
2073
- formattedSelectedDate: '',
2074
- calendar: {
2075
- headers: [],
2076
- calendarGrid: []
2077
- }
2078
- };
2079
- const [data, setData] = useState(dataStub);
2080
- const [state, setState] = useState({
2081
- isActive: false
2082
- });
2083
- const datepickerStub = {};
2084
- const [datepicker, setDatepicker] = useState(datepickerStub);
2085
- useEffect(() => {
2086
- if (!datepicker.open && datepickerRef.current && datepickerDialogRef.current && dateInputRef.current && datepickerTriggerRef.current) {
2087
- setDatepicker(createDatepicker((data, state) => {
2088
- if (data) setData(data);
2089
- if (state) setState(state);
2090
- }, options, datepickerRef.current, datepickerDialogRef.current, dateInputRef.current, datepickerTriggerRef.current));
2071
+ registerTransitionalStyles();
2072
+ const CoreDatepicker = createComponent({
2073
+ tagName: getScopedTagName('gds-datepicker'),
2074
+ elementClass: GdsDatepicker,
2075
+ events: {
2076
+ onchange: 'change'
2077
+ },
2078
+ react: React
2079
+ });
2080
+ const Datepicker = _a => {
2081
+ var {
2082
+ label = 'Date',
2083
+ onChange,
2084
+ minDate,
2085
+ maxDate,
2086
+ value,
2087
+ showWeeks,
2088
+ testId,
2089
+ selectedDate,
2090
+ currentDate
2091
+ } = _a,
2092
+ props = __rest(_a, ["label", "onChange", "minDate", "maxDate", "value", "showWeeks", "testId", "selectedDate", "currentDate"]);
2093
+ if (currentDate && !value) value = currentDate;
2094
+ if (selectedDate && !value) value = selectedDate;
2095
+ const min = minDate ? minDate : new Date(new Date().getFullYear() - 10, 0, 1);
2096
+ const max = maxDate ? maxDate : new Date(new Date().getFullYear() + 10, 0, 1);
2097
+ const onChangeHandler = e => {
2098
+ console.log('OnChange event handler');
2099
+ if (onChange) {
2100
+ onChange(e.detail.value);
2091
2101
  }
2092
- }, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options]);
2093
- return {
2094
- datepicker,
2095
- data,
2096
- state
2097
2102
  };
2103
+ return jsx("div", Object.assign({
2104
+ className: "form-group"
2105
+ }, {
2106
+ children: jsx(CoreDatepicker, Object.assign({
2107
+ "data-testid": testId,
2108
+ label: label,
2109
+ min: min,
2110
+ max: max,
2111
+ showWeekNumbers: showWeeks,
2112
+ onchange: onChangeHandler,
2113
+ value: value
2114
+ }, props))
2115
+ }));
2098
2116
  };
2099
2117
 
2100
- var $$9 = _export;
2118
+ var $$b = _export;
2101
2119
  var $includes = arrayIncludes.includes;
2102
- var fails$4 = fails$g;
2120
+ var fails$b = fails$n;
2103
2121
  var addToUnscopables = addToUnscopables$2;
2104
2122
 
2105
2123
  // FF99+ bug
2106
- var BROKEN_ON_SPARSE = fails$4(function () {
2124
+ var BROKEN_ON_SPARSE = fails$b(function () {
2107
2125
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
2108
2126
  return !Array(1).includes();
2109
2127
  });
2110
2128
 
2111
2129
  // `Array.prototype.includes` method
2112
2130
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2113
- $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2131
+ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2114
2132
  includes: function includes(el /* , fromIndex = 0 */) {
2115
2133
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2116
2134
  }
@@ -2119,44 +2137,44 @@ $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2119
2137
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2120
2138
  addToUnscopables('includes');
2121
2139
 
2122
- var isObject$2 = isObject$9;
2123
- var classof$5 = classofRaw$2;
2124
- var wellKnownSymbol$9 = wellKnownSymbol$g;
2140
+ var isObject$3 = isObject$a;
2141
+ var classof$6 = classofRaw$2;
2142
+ var wellKnownSymbol$b = wellKnownSymbol$i;
2125
2143
 
2126
- var MATCH$1 = wellKnownSymbol$9('match');
2144
+ var MATCH$2 = wellKnownSymbol$b('match');
2127
2145
 
2128
2146
  // `IsRegExp` abstract operation
2129
2147
  // https://tc39.es/ecma262/#sec-isregexp
2130
2148
  var isRegexp = function (it) {
2131
2149
  var isRegExp;
2132
- return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$5(it) === 'RegExp');
2150
+ return isObject$3(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classof$6(it) === 'RegExp');
2133
2151
  };
2134
2152
 
2135
- var isRegExp = isRegexp;
2153
+ var isRegExp$1 = isRegexp;
2136
2154
 
2137
- var $TypeError$6 = TypeError;
2155
+ var $TypeError$8 = TypeError;
2138
2156
 
2139
2157
  var notARegexp = function (it) {
2140
- if (isRegExp(it)) {
2141
- throw new $TypeError$6("The method doesn't accept regular expressions");
2158
+ if (isRegExp$1(it)) {
2159
+ throw new $TypeError$8("The method doesn't accept regular expressions");
2142
2160
  } return it;
2143
2161
  };
2144
2162
 
2145
- var wellKnownSymbol$8 = wellKnownSymbol$g;
2163
+ var wellKnownSymbol$a = wellKnownSymbol$i;
2146
2164
 
2147
- var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
2148
- var test = {};
2165
+ var TO_STRING_TAG$1 = wellKnownSymbol$a('toStringTag');
2166
+ var test$1 = {};
2149
2167
 
2150
- test[TO_STRING_TAG$1] = 'z';
2168
+ test$1[TO_STRING_TAG$1] = 'z';
2151
2169
 
2152
- var toStringTagSupport = String(test) === '[object z]';
2170
+ var toStringTagSupport = String(test$1) === '[object z]';
2153
2171
 
2154
2172
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2155
- var isCallable$6 = isCallable$l;
2173
+ var isCallable$8 = isCallable$n;
2156
2174
  var classofRaw$1 = classofRaw$2;
2157
- var wellKnownSymbol$7 = wellKnownSymbol$g;
2175
+ var wellKnownSymbol$9 = wellKnownSymbol$i;
2158
2176
 
2159
- var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
2177
+ var TO_STRING_TAG = wellKnownSymbol$9('toStringTag');
2160
2178
  var $Object = Object;
2161
2179
 
2162
2180
  // ES3 wrong here
@@ -2170,7 +2188,7 @@ var tryGet = function (it, key) {
2170
2188
  };
2171
2189
 
2172
2190
  // getting tag from ES6+ `Object.prototype.toString`
2173
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2191
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2174
2192
  var O, tag, result;
2175
2193
  return it === undefined ? 'Undefined' : it === null ? 'Null'
2176
2194
  // @@toStringTag case
@@ -2178,21 +2196,21 @@ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2178
2196
  // builtinTag case
2179
2197
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
2180
2198
  // ES3 arguments fallback
2181
- : (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
2199
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
2182
2200
  };
2183
2201
 
2184
- var classof$3 = classof$4;
2202
+ var classof$4 = classof$5;
2185
2203
 
2186
2204
  var $String = String;
2187
2205
 
2188
- var toString$4 = function (argument) {
2189
- if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2206
+ var toString$8 = function (argument) {
2207
+ if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2190
2208
  return $String(argument);
2191
2209
  };
2192
2210
 
2193
- var wellKnownSymbol$6 = wellKnownSymbol$g;
2211
+ var wellKnownSymbol$8 = wellKnownSymbol$i;
2194
2212
 
2195
- var MATCH = wellKnownSymbol$6('match');
2213
+ var MATCH$1 = wellKnownSymbol$8('match');
2196
2214
 
2197
2215
  var correctIsRegexpLogic = function (METHOD_NAME) {
2198
2216
  var regexp = /./;
@@ -2200,28 +2218,28 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
2200
2218
  '/./'[METHOD_NAME](regexp);
2201
2219
  } catch (error1) {
2202
2220
  try {
2203
- regexp[MATCH] = false;
2221
+ regexp[MATCH$1] = false;
2204
2222
  return '/./'[METHOD_NAME](regexp);
2205
2223
  } catch (error2) { /* empty */ }
2206
2224
  } return false;
2207
2225
  };
2208
2226
 
2209
- var $$8 = _export;
2210
- var uncurryThis$7 = functionUncurryThis;
2227
+ var $$a = _export;
2228
+ var uncurryThis$b = functionUncurryThis;
2211
2229
  var notARegExp = notARegexp;
2212
- var requireObjectCoercible$1 = requireObjectCoercible$4;
2213
- var toString$3 = toString$4;
2230
+ var requireObjectCoercible$2 = requireObjectCoercible$5;
2231
+ var toString$7 = toString$8;
2214
2232
  var correctIsRegExpLogic = correctIsRegexpLogic;
2215
2233
 
2216
- var stringIndexOf = uncurryThis$7(''.indexOf);
2234
+ var stringIndexOf$1 = uncurryThis$b(''.indexOf);
2217
2235
 
2218
2236
  // `String.prototype.includes` method
2219
2237
  // https://tc39.es/ecma262/#sec-string.prototype.includes
2220
- $$8({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2238
+ $$a({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2221
2239
  includes: function includes(searchString /* , position = 0 */) {
2222
- return !!~stringIndexOf(
2223
- toString$3(requireObjectCoercible$1(this)),
2224
- toString$3(notARegExp(searchString)),
2240
+ return !!~stringIndexOf$1(
2241
+ toString$7(requireObjectCoercible$2(this)),
2242
+ toString$7(notARegExp(searchString)),
2225
2243
  arguments.length > 1 ? arguments[1] : undefined
2226
2244
  );
2227
2245
  }
@@ -2255,7 +2273,8 @@ const Dropdown = ({
2255
2273
  texts,
2256
2274
  useValue: _useValue = 'value',
2257
2275
  validator,
2258
- value
2276
+ value,
2277
+ syncPopoverWidth
2259
2278
  }) => {
2260
2279
  const handleOnChange = e => {
2261
2280
  var _a;
@@ -2283,7 +2302,8 @@ const Dropdown = ({
2283
2302
  invalid: (validator === null || validator === void 0 ? void 0 : validator.indicator) === 'error',
2284
2303
  compareWith: compareWithAdapter,
2285
2304
  value: value,
2286
- searchFilter: searchFilterAdapter
2305
+ searchFilter: searchFilterAdapter,
2306
+ syncPopoverWidth: syncPopoverWidth
2287
2307
  }, {
2288
2308
  children: [informationLabel && jsx("span", Object.assign({
2289
2309
  slot: "sub-label"
@@ -2307,155 +2327,6 @@ const Dropdown = ({
2307
2327
  }));
2308
2328
  };
2309
2329
 
2310
- const Datepicker = (options = {}) => {
2311
- const [uuid] = useState(randomId());
2312
- const id = `sgr-datepicker-${uuid}`;
2313
- const datepickerRef = useRef(null);
2314
- const datepickerTriggerRef = useRef(null);
2315
- const datepickerDialogRef = useRef(null);
2316
- const dateInputRef = useRef(null);
2317
- options = Object.assign({
2318
- label: 'Date'
2319
- }, options);
2320
- const {
2321
- datepicker,
2322
- data,
2323
- state
2324
- } = useDatepicker(datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options);
2325
- useEffect(() => {
2326
- var _a;
2327
- const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
2328
- return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
2329
- }, [datepicker, options]);
2330
- const classNames = day => Object.entries({
2331
- disabled: !day.currentMonth,
2332
- 'sg-date-today': day.today
2333
- // 'sg-date-holiday': day.holiday,
2334
- }).map(([className, add]) => add ? className : '').join(' ');
2335
- return jsxs(Fragment, {
2336
- children: [jsxs("div", Object.assign({
2337
- className: "form-group"
2338
- }, {
2339
- children: [jsx("label", Object.assign({
2340
- htmlFor: id
2341
- }, {
2342
- children: options.label
2343
- })), jsxs("div", Object.assign({
2344
- className: "group",
2345
- ref: datepickerRef
2346
- }, {
2347
- children: [jsx("input", {
2348
- ref: dateInputRef,
2349
- id: id,
2350
- type: "text",
2351
- placeholder: "yyyy-mm-dd",
2352
- value: data.formattedSelectedDate,
2353
- onChange: e => datepicker.select(e.target.value)
2354
- }), jsx("button", Object.assign({
2355
- ref: datepickerTriggerRef,
2356
- type: "button",
2357
- className: "primary",
2358
- onClick: () => datepicker.toggle()
2359
- }, {
2360
- children: jsx("i", Object.assign({
2361
- className: "sg-icon sg-icon-calendar"
2362
- }, {
2363
- children: "Select date"
2364
- }))
2365
- }))]
2366
- })), jsx("span", Object.assign({
2367
- className: "form-info"
2368
- }, {
2369
- children: "Select a date"
2370
- }))]
2371
- })), jsx("div", Object.assign({
2372
- ref: datepickerDialogRef,
2373
- className: `popover popover-datepicker ${state.isActive ? 'active' : ''}`,
2374
- role: "dialog",
2375
- "aria-modal": "true",
2376
- "aria-label": "Choose Date"
2377
- }, {
2378
- children: state.isActive && jsxs("div", Object.assign({
2379
- className: "sg-date"
2380
- }, {
2381
- children: [jsxs("header", {
2382
- children: [jsx("button", Object.assign({
2383
- className: "link",
2384
- onClick: () => datepicker.sub(1, 'months')
2385
- }, {
2386
- children: jsx("i", Object.assign({
2387
- className: "sg-icon sg-icon-previous"
2388
- }, {
2389
- children: "Previous month"
2390
- }))
2391
- })), jsx(Dropdown, {
2392
- options: months({}),
2393
- display: "key",
2394
- texts: {
2395
- placeholder: data.monthName
2396
- },
2397
- onChange: datepicker.setMonth,
2398
- value: data.month
2399
- }), jsx(Dropdown, {
2400
- options: years({}),
2401
- display: "key",
2402
- texts: {
2403
- placeholder: data.year + ''
2404
- },
2405
- onChange: datepicker.setYear,
2406
- value: data.year
2407
- }), jsx("button", Object.assign({
2408
- className: "link",
2409
- onClick: () => datepicker.add(1, 'months')
2410
- }, {
2411
- children: jsx("i", Object.assign({
2412
- className: "sg-icon sg-icon-next"
2413
- }, {
2414
- children: "Next month"
2415
- }))
2416
- }))]
2417
- }), jsx("main", {
2418
- children: jsxs("table", Object.assign({
2419
- role: "grid"
2420
- }, {
2421
- children: [jsx("thead", {
2422
- children: jsx("tr", {
2423
- children: data.calendar.headers.map((header, ix) => jsx("th", Object.assign({
2424
- scope: "col",
2425
- abbr: header.abbr,
2426
- className: header.type === 'week' ? 'sg-week-header' : 'sg-day-header'
2427
- }, {
2428
- children: header.displayText
2429
- }), `week_${ix}`))
2430
- })
2431
- }), jsx("tbody", {
2432
- children: data.calendar.calendarGrid.map((week, ix) => jsxs("tr", {
2433
- children: [data.calendar.weekNumbers ? jsx("th", Object.assign({
2434
- className: "sg-week-number"
2435
- }, {
2436
- children: data.calendar.weekNumbers[ix]
2437
- })) : '', week.map(day => jsx("td", Object.assign({
2438
- "data-date": day.formattedDate,
2439
- className: classNames(day),
2440
- title: day.today ? 'Today' : '',
2441
- tabIndex: day.highlighted || day.selected && !(data === null || data === void 0 ? void 0 : data.highlightedDate) || day.today && !(data === null || data === void 0 ? void 0 : data.highlightedDate) && !(data === null || data === void 0 ? void 0 : data.selectedDate) ? 0 : -1,
2442
- role: day.selected ? 'gridcell' : undefined,
2443
- "aria-selected": day.selected && !(data === null || data === void 0 ? void 0 : data.highlightedDate) ? true : undefined,
2444
- onClick: () => {
2445
- day.currentMonth && datepicker.select(day.date);
2446
- }
2447
- }, {
2448
- children: day.day
2449
- }), day.day))]
2450
- }, `week_${ix}`))
2451
- })]
2452
- }))
2453
- })]
2454
- }))
2455
- }))]
2456
- });
2457
- };
2458
-
2459
2330
  function Button(_a) {
2460
2331
  var _b;
2461
2332
  var {
@@ -2801,51 +2672,51 @@ function Group({
2801
2672
  }));
2802
2673
  }
2803
2674
 
2804
- var global$8 = global$k;
2805
- var classof$2 = classofRaw$2;
2675
+ var global$c = global$o;
2676
+ var classof$3 = classofRaw$2;
2806
2677
 
2807
- var engineIsNode = classof$2(global$8.process) === 'process';
2678
+ var engineIsNode = classof$3(global$c.process) === 'process';
2808
2679
 
2809
2680
  var makeBuiltIn = makeBuiltIn$3.exports;
2810
- var defineProperty = objectDefineProperty;
2681
+ var defineProperty$1 = objectDefineProperty;
2811
2682
 
2812
2683
  var defineBuiltInAccessor$2 = function (target, name, descriptor) {
2813
2684
  if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2814
2685
  if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2815
- return defineProperty.f(target, name, descriptor);
2686
+ return defineProperty$1.f(target, name, descriptor);
2816
2687
  };
2817
2688
 
2818
2689
  var getBuiltIn$3 = getBuiltIn$7;
2819
2690
  var defineBuiltInAccessor$1 = defineBuiltInAccessor$2;
2820
- var wellKnownSymbol$5 = wellKnownSymbol$g;
2821
- var DESCRIPTORS$1 = descriptors;
2691
+ var wellKnownSymbol$7 = wellKnownSymbol$i;
2692
+ var DESCRIPTORS$2 = descriptors;
2822
2693
 
2823
- var SPECIES$2 = wellKnownSymbol$5('species');
2694
+ var SPECIES$3 = wellKnownSymbol$7('species');
2824
2695
 
2825
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
2696
+ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
2826
2697
  var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
2827
2698
 
2828
- if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$2]) {
2829
- defineBuiltInAccessor$1(Constructor, SPECIES$2, {
2699
+ if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
2700
+ defineBuiltInAccessor$1(Constructor, SPECIES$3, {
2830
2701
  configurable: true,
2831
2702
  get: function () { return this; }
2832
2703
  });
2833
2704
  }
2834
2705
  };
2835
2706
 
2836
- var isPrototypeOf$3 = objectIsPrototypeOf;
2707
+ var isPrototypeOf$4 = objectIsPrototypeOf;
2837
2708
 
2838
- var $TypeError$5 = TypeError;
2709
+ var $TypeError$7 = TypeError;
2839
2710
 
2840
2711
  var anInstance$1 = function (it, Prototype) {
2841
- if (isPrototypeOf$3(Prototype, it)) return it;
2842
- throw new $TypeError$5('Incorrect invocation');
2712
+ if (isPrototypeOf$4(Prototype, it)) return it;
2713
+ throw new $TypeError$7('Incorrect invocation');
2843
2714
  };
2844
2715
 
2845
- var uncurryThis$6 = functionUncurryThis;
2846
- var fails$3 = fails$g;
2847
- var isCallable$5 = isCallable$l;
2848
- var classof$1 = classof$4;
2716
+ var uncurryThis$a = functionUncurryThis;
2717
+ var fails$a = fails$n;
2718
+ var isCallable$7 = isCallable$n;
2719
+ var classof$2 = classof$5;
2849
2720
  var getBuiltIn$2 = getBuiltIn$7;
2850
2721
  var inspectSource$1 = inspectSource$3;
2851
2722
 
@@ -2853,11 +2724,11 @@ var noop = function () { /* empty */ };
2853
2724
  var empty = [];
2854
2725
  var construct = getBuiltIn$2('Reflect', 'construct');
2855
2726
  var constructorRegExp = /^\s*(?:class|function)\b/;
2856
- var exec$1 = uncurryThis$6(constructorRegExp.exec);
2727
+ var exec$3 = uncurryThis$a(constructorRegExp.exec);
2857
2728
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2858
2729
 
2859
2730
  var isConstructorModern = function isConstructor(argument) {
2860
- if (!isCallable$5(argument)) return false;
2731
+ if (!isCallable$7(argument)) return false;
2861
2732
  try {
2862
2733
  construct(noop, empty, argument);
2863
2734
  return true;
@@ -2867,8 +2738,8 @@ var isConstructorModern = function isConstructor(argument) {
2867
2738
  };
2868
2739
 
2869
2740
  var isConstructorLegacy = function isConstructor(argument) {
2870
- if (!isCallable$5(argument)) return false;
2871
- switch (classof$1(argument)) {
2741
+ if (!isCallable$7(argument)) return false;
2742
+ switch (classof$2(argument)) {
2872
2743
  case 'AsyncFunction':
2873
2744
  case 'GeneratorFunction':
2874
2745
  case 'AsyncGeneratorFunction': return false;
@@ -2877,7 +2748,7 @@ var isConstructorLegacy = function isConstructor(argument) {
2877
2748
  // we can't check .prototype since constructors produced by .bind haven't it
2878
2749
  // `Function#toString` throws on some built-it function in some legacy engines
2879
2750
  // (for example, `DOMQuad` and similar in FF41-)
2880
- return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
2751
+ return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
2881
2752
  } catch (error) {
2882
2753
  return true;
2883
2754
  }
@@ -2887,7 +2758,7 @@ isConstructorLegacy.sham = true;
2887
2758
 
2888
2759
  // `IsConstructor` abstract operation
2889
2760
  // https://tc39.es/ecma262/#sec-isconstructor
2890
- var isConstructor$1 = !construct || fails$3(function () {
2761
+ var isConstructor$1 = !construct || fails$a(function () {
2891
2762
  var called;
2892
2763
  return isConstructorModern(isConstructorModern.call)
2893
2764
  || !isConstructorModern(Object)
@@ -2896,114 +2767,114 @@ var isConstructor$1 = !construct || fails$3(function () {
2896
2767
  }) ? isConstructorLegacy : isConstructorModern;
2897
2768
 
2898
2769
  var isConstructor = isConstructor$1;
2899
- var tryToString$2 = tryToString$4;
2770
+ var tryToString$3 = tryToString$5;
2900
2771
 
2901
- var $TypeError$4 = TypeError;
2772
+ var $TypeError$6 = TypeError;
2902
2773
 
2903
2774
  // `Assert: IsConstructor(argument) is true`
2904
2775
  var aConstructor$1 = function (argument) {
2905
2776
  if (isConstructor(argument)) return argument;
2906
- throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
2777
+ throw new $TypeError$6(tryToString$3(argument) + ' is not a constructor');
2907
2778
  };
2908
2779
 
2909
- var anObject$6 = anObject$c;
2780
+ var anObject$8 = anObject$e;
2910
2781
  var aConstructor = aConstructor$1;
2911
- var isNullOrUndefined$1 = isNullOrUndefined$4;
2912
- var wellKnownSymbol$4 = wellKnownSymbol$g;
2782
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
2783
+ var wellKnownSymbol$6 = wellKnownSymbol$i;
2913
2784
 
2914
- var SPECIES$1 = wellKnownSymbol$4('species');
2785
+ var SPECIES$2 = wellKnownSymbol$6('species');
2915
2786
 
2916
2787
  // `SpeciesConstructor` abstract operation
2917
2788
  // https://tc39.es/ecma262/#sec-speciesconstructor
2918
2789
  var speciesConstructor$1 = function (O, defaultConstructor) {
2919
- var C = anObject$6(O).constructor;
2790
+ var C = anObject$8(O).constructor;
2920
2791
  var S;
2921
- return C === undefined || isNullOrUndefined$1(S = anObject$6(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
2792
+ return C === undefined || isNullOrUndefined$2(S = anObject$8(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
2922
2793
  };
2923
2794
 
2924
2795
  var NATIVE_BIND$1 = functionBindNative;
2925
2796
 
2926
2797
  var FunctionPrototype = Function.prototype;
2927
2798
  var apply$1 = FunctionPrototype.apply;
2928
- var call$8 = FunctionPrototype.call;
2799
+ var call$b = FunctionPrototype.call;
2929
2800
 
2930
2801
  // eslint-disable-next-line es/no-reflect -- safe
2931
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$8.bind(apply$1) : function () {
2932
- return call$8.apply(apply$1, arguments);
2802
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$b.bind(apply$1) : function () {
2803
+ return call$b.apply(apply$1, arguments);
2933
2804
  });
2934
2805
 
2935
2806
  var classofRaw = classofRaw$2;
2936
- var uncurryThis$5 = functionUncurryThis;
2807
+ var uncurryThis$9 = functionUncurryThis;
2937
2808
 
2938
2809
  var functionUncurryThisClause = function (fn) {
2939
2810
  // Nashorn bug:
2940
2811
  // https://github.com/zloirock/core-js/issues/1128
2941
2812
  // https://github.com/zloirock/core-js/issues/1130
2942
- if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
2813
+ if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
2943
2814
  };
2944
2815
 
2945
- var uncurryThis$4 = functionUncurryThisClause;
2946
- var aCallable$5 = aCallable$8;
2816
+ var uncurryThis$8 = functionUncurryThisClause;
2817
+ var aCallable$6 = aCallable$9;
2947
2818
  var NATIVE_BIND = functionBindNative;
2948
2819
 
2949
- var bind$4 = uncurryThis$4(uncurryThis$4.bind);
2820
+ var bind$4 = uncurryThis$8(uncurryThis$8.bind);
2950
2821
 
2951
2822
  // optional / simple context binding
2952
2823
  var functionBindContext = function (fn, that) {
2953
- aCallable$5(fn);
2824
+ aCallable$6(fn);
2954
2825
  return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
2955
2826
  return fn.apply(that, arguments);
2956
2827
  };
2957
2828
  };
2958
2829
 
2959
- var uncurryThis$3 = functionUncurryThis;
2830
+ var uncurryThis$7 = functionUncurryThis;
2960
2831
 
2961
- var arraySlice$1 = uncurryThis$3([].slice);
2832
+ var arraySlice$2 = uncurryThis$7([].slice);
2962
2833
 
2963
- var $TypeError$3 = TypeError;
2834
+ var $TypeError$5 = TypeError;
2964
2835
 
2965
2836
  var validateArgumentsLength$1 = function (passed, required) {
2966
- if (passed < required) throw new $TypeError$3('Not enough arguments');
2837
+ if (passed < required) throw new $TypeError$5('Not enough arguments');
2967
2838
  return passed;
2968
2839
  };
2969
2840
 
2970
- var userAgent$2 = engineUserAgent;
2841
+ var userAgent$4 = engineUserAgent;
2971
2842
 
2972
2843
  // eslint-disable-next-line redos/no-vulnerable -- safe
2973
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2844
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
2974
2845
 
2975
- var global$7 = global$k;
2846
+ var global$b = global$o;
2976
2847
  var apply = functionApply;
2977
2848
  var bind$3 = functionBindContext;
2978
- var isCallable$4 = isCallable$l;
2979
- var hasOwn$2 = hasOwnProperty_1;
2980
- var fails$2 = fails$g;
2849
+ var isCallable$6 = isCallable$n;
2850
+ var hasOwn$3 = hasOwnProperty_1;
2851
+ var fails$9 = fails$n;
2981
2852
  var html = html$2;
2982
- var arraySlice = arraySlice$1;
2853
+ var arraySlice$1 = arraySlice$2;
2983
2854
  var createElement = documentCreateElement$2;
2984
2855
  var validateArgumentsLength = validateArgumentsLength$1;
2985
2856
  var IS_IOS$1 = engineIsIos;
2986
2857
  var IS_NODE$3 = engineIsNode;
2987
2858
 
2988
- var set = global$7.setImmediate;
2989
- var clear = global$7.clearImmediate;
2990
- var process$2 = global$7.process;
2991
- var Dispatch = global$7.Dispatch;
2992
- var Function$1 = global$7.Function;
2993
- var MessageChannel = global$7.MessageChannel;
2994
- var String$1 = global$7.String;
2859
+ var set = global$b.setImmediate;
2860
+ var clear = global$b.clearImmediate;
2861
+ var process$2 = global$b.process;
2862
+ var Dispatch = global$b.Dispatch;
2863
+ var Function$1 = global$b.Function;
2864
+ var MessageChannel = global$b.MessageChannel;
2865
+ var String$1 = global$b.String;
2995
2866
  var counter = 0;
2996
2867
  var queue$2 = {};
2997
2868
  var ONREADYSTATECHANGE = 'onreadystatechange';
2998
2869
  var $location, defer, channel, port;
2999
2870
 
3000
- fails$2(function () {
2871
+ fails$9(function () {
3001
2872
  // Deno throws a ReferenceError on `location` access without `--location` flag
3002
- $location = global$7.location;
2873
+ $location = global$b.location;
3003
2874
  });
3004
2875
 
3005
2876
  var run = function (id) {
3006
- if (hasOwn$2(queue$2, id)) {
2877
+ if (hasOwn$3(queue$2, id)) {
3007
2878
  var fn = queue$2[id];
3008
2879
  delete queue$2[id];
3009
2880
  fn();
@@ -3022,15 +2893,15 @@ var eventListener = function (event) {
3022
2893
 
3023
2894
  var globalPostMessageDefer = function (id) {
3024
2895
  // old engines have not location.origin
3025
- global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
2896
+ global$b.postMessage(String$1(id), $location.protocol + '//' + $location.host);
3026
2897
  };
3027
2898
 
3028
2899
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
3029
2900
  if (!set || !clear) {
3030
2901
  set = function setImmediate(handler) {
3031
2902
  validateArgumentsLength(arguments.length, 1);
3032
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
3033
- var args = arraySlice(arguments, 1);
2903
+ var fn = isCallable$6(handler) ? handler : Function$1(handler);
2904
+ var args = arraySlice$1(arguments, 1);
3034
2905
  queue$2[++counter] = function () {
3035
2906
  apply(fn, undefined, args);
3036
2907
  };
@@ -3060,14 +2931,14 @@ if (!set || !clear) {
3060
2931
  // Browsers with postMessage, skip WebWorkers
3061
2932
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
3062
2933
  } else if (
3063
- global$7.addEventListener &&
3064
- isCallable$4(global$7.postMessage) &&
3065
- !global$7.importScripts &&
2934
+ global$b.addEventListener &&
2935
+ isCallable$6(global$b.postMessage) &&
2936
+ !global$b.importScripts &&
3066
2937
  $location && $location.protocol !== 'file:' &&
3067
- !fails$2(globalPostMessageDefer)
2938
+ !fails$9(globalPostMessageDefer)
3068
2939
  ) {
3069
2940
  defer = globalPostMessageDefer;
3070
- global$7.addEventListener('message', eventListener, false);
2941
+ global$b.addEventListener('message', eventListener, false);
3071
2942
  // IE8-
3072
2943
  } else if (ONREADYSTATECHANGE in createElement('script')) {
3073
2944
  defer = function (id) {
@@ -3114,15 +2985,15 @@ Queue$2.prototype = {
3114
2985
 
3115
2986
  var queue$1 = Queue$2;
3116
2987
 
3117
- var userAgent$1 = engineUserAgent;
2988
+ var userAgent$3 = engineUserAgent;
3118
2989
 
3119
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
2990
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && typeof Pebble != 'undefined';
3120
2991
 
3121
- var userAgent = engineUserAgent;
2992
+ var userAgent$2 = engineUserAgent;
3122
2993
 
3123
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2994
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
3124
2995
 
3125
- var global$6 = global$k;
2996
+ var global$a = global$o;
3126
2997
  var bind$2 = functionBindContext;
3127
2998
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
3128
2999
  var macrotask = task$1.set;
@@ -3132,12 +3003,12 @@ var IS_IOS_PEBBLE = engineIsIosPebble;
3132
3003
  var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
3133
3004
  var IS_NODE$2 = engineIsNode;
3134
3005
 
3135
- var MutationObserver = global$6.MutationObserver || global$6.WebKitMutationObserver;
3136
- var document$2 = global$6.document;
3137
- var process$1 = global$6.process;
3138
- var Promise$1 = global$6.Promise;
3006
+ var MutationObserver = global$a.MutationObserver || global$a.WebKitMutationObserver;
3007
+ var document$2 = global$a.document;
3008
+ var process$1 = global$a.process;
3009
+ var Promise$1 = global$a.Promise;
3139
3010
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
3140
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$6, 'queueMicrotask');
3011
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$a, 'queueMicrotask');
3141
3012
  var microtask$1 = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
3142
3013
  var notify$1, toggle, node, promise, then;
3143
3014
 
@@ -3189,7 +3060,7 @@ if (!microtask$1) {
3189
3060
  // - setTimeout
3190
3061
  } else {
3191
3062
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
3192
- macrotask = bind$2(macrotask, global$6);
3063
+ macrotask = bind$2(macrotask, global$a);
3193
3064
  notify$1 = function () {
3194
3065
  macrotask(flush);
3195
3066
  };
@@ -3218,9 +3089,9 @@ var perform$3 = function (exec) {
3218
3089
  }
3219
3090
  };
3220
3091
 
3221
- var global$5 = global$k;
3092
+ var global$9 = global$o;
3222
3093
 
3223
- var promiseNativeConstructor = global$5.Promise;
3094
+ var promiseNativeConstructor = global$9.Promise;
3224
3095
 
3225
3096
  /* global Deno -- Deno case */
3226
3097
  var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
@@ -3232,22 +3103,22 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
3232
3103
  && typeof window == 'object'
3233
3104
  && typeof document == 'object';
3234
3105
 
3235
- var global$4 = global$k;
3106
+ var global$8 = global$o;
3236
3107
  var NativePromiseConstructor$3 = promiseNativeConstructor;
3237
- var isCallable$3 = isCallable$l;
3238
- var isForced = isForced_1;
3108
+ var isCallable$5 = isCallable$n;
3109
+ var isForced$1 = isForced_1;
3239
3110
  var inspectSource = inspectSource$3;
3240
- var wellKnownSymbol$3 = wellKnownSymbol$g;
3111
+ var wellKnownSymbol$5 = wellKnownSymbol$i;
3241
3112
  var IS_BROWSER = engineIsBrowser;
3242
3113
  var IS_DENO = engineIsDeno;
3243
3114
  var V8_VERSION = engineV8Version;
3244
3115
 
3245
3116
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
3246
- var SPECIES = wellKnownSymbol$3('species');
3117
+ var SPECIES$1 = wellKnownSymbol$5('species');
3247
3118
  var SUBCLASSING = false;
3248
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$4.PromiseRejectionEvent);
3119
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$5(global$8.PromiseRejectionEvent);
3249
3120
 
3250
- var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
3121
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
3251
3122
  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
3252
3123
  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
3253
3124
  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
@@ -3264,7 +3135,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
3264
3135
  exec(function () { /* empty */ }, function () { /* empty */ });
3265
3136
  };
3266
3137
  var constructor = promise.constructor = {};
3267
- constructor[SPECIES] = FakePromise;
3138
+ constructor[SPECIES$1] = FakePromise;
3268
3139
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
3269
3140
  if (!SUBCLASSING) return true;
3270
3141
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -3279,19 +3150,19 @@ var promiseConstructorDetection = {
3279
3150
 
3280
3151
  var newPromiseCapability$2 = {};
3281
3152
 
3282
- var aCallable$4 = aCallable$8;
3153
+ var aCallable$5 = aCallable$9;
3283
3154
 
3284
- var $TypeError$2 = TypeError;
3155
+ var $TypeError$4 = TypeError;
3285
3156
 
3286
3157
  var PromiseCapability = function (C) {
3287
3158
  var resolve, reject;
3288
3159
  this.promise = new C(function ($$resolve, $$reject) {
3289
- if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
3160
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError$4('Bad Promise constructor');
3290
3161
  resolve = $$resolve;
3291
3162
  reject = $$reject;
3292
3163
  });
3293
- this.resolve = aCallable$4(resolve);
3294
- this.reject = aCallable$4(reject);
3164
+ this.resolve = aCallable$5(resolve);
3165
+ this.reject = aCallable$5(reject);
3295
3166
  };
3296
3167
 
3297
3168
  // `NewPromiseCapability` abstract operation
@@ -3300,17 +3171,17 @@ newPromiseCapability$2.f = function (C) {
3300
3171
  return new PromiseCapability(C);
3301
3172
  };
3302
3173
 
3303
- var $$7 = _export;
3174
+ var $$9 = _export;
3304
3175
  var IS_NODE = engineIsNode;
3305
- var global$3 = global$k;
3306
- var call$7 = functionCall;
3307
- var defineBuiltIn$2 = defineBuiltIn$6;
3308
- var setPrototypeOf = objectSetPrototypeOf;
3176
+ var global$7 = global$o;
3177
+ var call$a = functionCall;
3178
+ var defineBuiltIn$4 = defineBuiltIn$8;
3179
+ var setPrototypeOf$1 = objectSetPrototypeOf;
3309
3180
  var setToStringTag = setToStringTag$3;
3310
- var setSpecies = setSpecies$1;
3311
- var aCallable$3 = aCallable$8;
3312
- var isCallable$2 = isCallable$l;
3313
- var isObject$1 = isObject$9;
3181
+ var setSpecies$1 = setSpecies$2;
3182
+ var aCallable$4 = aCallable$9;
3183
+ var isCallable$4 = isCallable$n;
3184
+ var isObject$2 = isObject$a;
3314
3185
  var anInstance = anInstance$1;
3315
3186
  var speciesConstructor = speciesConstructor$1;
3316
3187
  var task = task$1.set;
@@ -3332,13 +3203,13 @@ var setInternalState = InternalStateModule.set;
3332
3203
  var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
3333
3204
  var PromiseConstructor = NativePromiseConstructor$2;
3334
3205
  var PromisePrototype = NativePromisePrototype$1;
3335
- var TypeError$1 = global$3.TypeError;
3336
- var document$1 = global$3.document;
3337
- var process = global$3.process;
3206
+ var TypeError$1 = global$7.TypeError;
3207
+ var document$1 = global$7.document;
3208
+ var process = global$7.process;
3338
3209
  var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
3339
3210
  var newGenericPromiseCapability = newPromiseCapability$1;
3340
3211
 
3341
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
3212
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$7.dispatchEvent);
3342
3213
  var UNHANDLED_REJECTION = 'unhandledrejection';
3343
3214
  var REJECTION_HANDLED = 'rejectionhandled';
3344
3215
  var PENDING = 0;
@@ -3352,7 +3223,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
3352
3223
  // helpers
3353
3224
  var isThenable = function (it) {
3354
3225
  var then;
3355
- return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
3226
+ return isObject$2(it) && isCallable$4(then = it.then) ? then : false;
3356
3227
  };
3357
3228
 
3358
3229
  var callReaction = function (reaction, state) {
@@ -3381,7 +3252,7 @@ var callReaction = function (reaction, state) {
3381
3252
  if (result === reaction.promise) {
3382
3253
  reject(new TypeError$1('Promise-chain cycle'));
3383
3254
  } else if (then = isThenable(result)) {
3384
- call$7(then, result, resolve, reject);
3255
+ call$a(then, result, resolve, reject);
3385
3256
  } else resolve(result);
3386
3257
  } else reject(value);
3387
3258
  } catch (error) {
@@ -3411,14 +3282,14 @@ var dispatchEvent = function (name, promise, reason) {
3411
3282
  event.promise = promise;
3412
3283
  event.reason = reason;
3413
3284
  event.initEvent(name, false, true);
3414
- global$3.dispatchEvent(event);
3285
+ global$7.dispatchEvent(event);
3415
3286
  } else event = { promise: promise, reason: reason };
3416
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$3['on' + name])) handler(event);
3287
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$7['on' + name])) handler(event);
3417
3288
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
3418
3289
  };
3419
3290
 
3420
3291
  var onUnhandled = function (state) {
3421
- call$7(task, global$3, function () {
3292
+ call$a(task, global$7, function () {
3422
3293
  var promise = state.facade;
3423
3294
  var value = state.value;
3424
3295
  var IS_UNHANDLED = isUnhandled(state);
@@ -3441,7 +3312,7 @@ var isUnhandled = function (state) {
3441
3312
  };
3442
3313
 
3443
3314
  var onHandleUnhandled = function (state) {
3444
- call$7(task, global$3, function () {
3315
+ call$a(task, global$7, function () {
3445
3316
  var promise = state.facade;
3446
3317
  if (IS_NODE) {
3447
3318
  process.emit('rejectionHandled', promise);
@@ -3475,7 +3346,7 @@ var internalResolve = function (state, value, unwrap) {
3475
3346
  microtask(function () {
3476
3347
  var wrapper = { done: false };
3477
3348
  try {
3478
- call$7(then, value,
3349
+ call$a(then, value,
3479
3350
  bind$1(internalResolve, wrapper, state),
3480
3351
  bind$1(internalReject, wrapper, state)
3481
3352
  );
@@ -3498,8 +3369,8 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3498
3369
  // 25.4.3.1 Promise(executor)
3499
3370
  PromiseConstructor = function Promise(executor) {
3500
3371
  anInstance(this, PromisePrototype);
3501
- aCallable$3(executor);
3502
- call$7(Internal, this);
3372
+ aCallable$4(executor);
3373
+ call$a(Internal, this);
3503
3374
  var state = getInternalPromiseState(this);
3504
3375
  try {
3505
3376
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
@@ -3526,12 +3397,12 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3526
3397
 
3527
3398
  // `Promise.prototype.then` method
3528
3399
  // https://tc39.es/ecma262/#sec-promise.prototype.then
3529
- Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3400
+ Internal.prototype = defineBuiltIn$4(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3530
3401
  var state = getInternalPromiseState(this);
3531
3402
  var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
3532
3403
  state.parent = true;
3533
- reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
3534
- reaction.fail = isCallable$2(onRejected) && onRejected;
3404
+ reaction.ok = isCallable$4(onFulfilled) ? onFulfilled : true;
3405
+ reaction.fail = isCallable$4(onRejected) && onRejected;
3535
3406
  reaction.domain = IS_NODE ? process.domain : undefined;
3536
3407
  if (state.state === PENDING) state.reactions.add(reaction);
3537
3408
  else microtask(function () {
@@ -3554,15 +3425,15 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3554
3425
  : newGenericPromiseCapability(C);
3555
3426
  };
3556
3427
 
3557
- if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
3428
+ if (isCallable$4(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
3558
3429
  nativeThen = NativePromisePrototype$1.then;
3559
3430
 
3560
3431
  if (!NATIVE_PROMISE_SUBCLASSING) {
3561
3432
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
3562
- defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3433
+ defineBuiltIn$4(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3563
3434
  var that = this;
3564
3435
  return new PromiseConstructor(function (resolve, reject) {
3565
- call$7(nativeThen, that, resolve, reject);
3436
+ call$a(nativeThen, that, resolve, reject);
3566
3437
  }).then(onFulfilled, onRejected);
3567
3438
  // https://github.com/zloirock/core-js/issues/640
3568
3439
  }, { unsafe: true });
@@ -3574,23 +3445,23 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3574
3445
  } catch (error) { /* empty */ }
3575
3446
 
3576
3447
  // make `instanceof Promise` work for native promise-based APIs
3577
- if (setPrototypeOf) {
3578
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
3448
+ if (setPrototypeOf$1) {
3449
+ setPrototypeOf$1(NativePromisePrototype$1, PromisePrototype);
3579
3450
  }
3580
3451
  }
3581
3452
  }
3582
3453
 
3583
- $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
3454
+ $$9({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
3584
3455
  Promise: PromiseConstructor
3585
3456
  });
3586
3457
 
3587
3458
  setToStringTag(PromiseConstructor, PROMISE, false);
3588
- setSpecies(PROMISE);
3459
+ setSpecies$1(PROMISE);
3589
3460
 
3590
- var wellKnownSymbol$2 = wellKnownSymbol$g;
3461
+ var wellKnownSymbol$4 = wellKnownSymbol$i;
3591
3462
  var Iterators$1 = iterators;
3592
3463
 
3593
- var ITERATOR$3 = wellKnownSymbol$2('iterator');
3464
+ var ITERATOR$3 = wellKnownSymbol$4('iterator');
3594
3465
  var ArrayPrototype = Array.prototype;
3595
3466
 
3596
3467
  // check on default Array iterator
@@ -3598,70 +3469,70 @@ var isArrayIteratorMethod$1 = function (it) {
3598
3469
  return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$3] === it);
3599
3470
  };
3600
3471
 
3601
- var classof = classof$4;
3602
- var getMethod$1 = getMethod$3;
3603
- var isNullOrUndefined = isNullOrUndefined$4;
3472
+ var classof$1 = classof$5;
3473
+ var getMethod$2 = getMethod$4;
3474
+ var isNullOrUndefined$1 = isNullOrUndefined$5;
3604
3475
  var Iterators = iterators;
3605
- var wellKnownSymbol$1 = wellKnownSymbol$g;
3476
+ var wellKnownSymbol$3 = wellKnownSymbol$i;
3606
3477
 
3607
- var ITERATOR$2 = wellKnownSymbol$1('iterator');
3478
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
3608
3479
 
3609
3480
  var getIteratorMethod$2 = function (it) {
3610
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
3611
- || getMethod$1(it, '@@iterator')
3612
- || Iterators[classof(it)];
3481
+ if (!isNullOrUndefined$1(it)) return getMethod$2(it, ITERATOR$2)
3482
+ || getMethod$2(it, '@@iterator')
3483
+ || Iterators[classof$1(it)];
3613
3484
  };
3614
3485
 
3615
- var call$6 = functionCall;
3616
- var aCallable$2 = aCallable$8;
3617
- var anObject$5 = anObject$c;
3618
- var tryToString$1 = tryToString$4;
3486
+ var call$9 = functionCall;
3487
+ var aCallable$3 = aCallable$9;
3488
+ var anObject$7 = anObject$e;
3489
+ var tryToString$2 = tryToString$5;
3619
3490
  var getIteratorMethod$1 = getIteratorMethod$2;
3620
3491
 
3621
- var $TypeError$1 = TypeError;
3492
+ var $TypeError$3 = TypeError;
3622
3493
 
3623
3494
  var getIterator$1 = function (argument, usingIterator) {
3624
3495
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
3625
- if (aCallable$2(iteratorMethod)) return anObject$5(call$6(iteratorMethod, argument));
3626
- throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
3496
+ if (aCallable$3(iteratorMethod)) return anObject$7(call$9(iteratorMethod, argument));
3497
+ throw new $TypeError$3(tryToString$2(argument) + ' is not iterable');
3627
3498
  };
3628
3499
 
3629
- var call$5 = functionCall;
3630
- var anObject$4 = anObject$c;
3631
- var getMethod = getMethod$3;
3500
+ var call$8 = functionCall;
3501
+ var anObject$6 = anObject$e;
3502
+ var getMethod$1 = getMethod$4;
3632
3503
 
3633
3504
  var iteratorClose$1 = function (iterator, kind, value) {
3634
3505
  var innerResult, innerError;
3635
- anObject$4(iterator);
3506
+ anObject$6(iterator);
3636
3507
  try {
3637
- innerResult = getMethod(iterator, 'return');
3508
+ innerResult = getMethod$1(iterator, 'return');
3638
3509
  if (!innerResult) {
3639
3510
  if (kind === 'throw') throw value;
3640
3511
  return value;
3641
3512
  }
3642
- innerResult = call$5(innerResult, iterator);
3513
+ innerResult = call$8(innerResult, iterator);
3643
3514
  } catch (error) {
3644
3515
  innerError = true;
3645
3516
  innerResult = error;
3646
3517
  }
3647
3518
  if (kind === 'throw') throw value;
3648
3519
  if (innerError) throw innerResult;
3649
- anObject$4(innerResult);
3520
+ anObject$6(innerResult);
3650
3521
  return value;
3651
3522
  };
3652
3523
 
3653
3524
  var bind = functionBindContext;
3654
- var call$4 = functionCall;
3655
- var anObject$3 = anObject$c;
3656
- var tryToString = tryToString$4;
3525
+ var call$7 = functionCall;
3526
+ var anObject$5 = anObject$e;
3527
+ var tryToString$1 = tryToString$5;
3657
3528
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
3658
- var lengthOfArrayLike = lengthOfArrayLike$2;
3659
- var isPrototypeOf$2 = objectIsPrototypeOf;
3529
+ var lengthOfArrayLike$2 = lengthOfArrayLike$4;
3530
+ var isPrototypeOf$3 = objectIsPrototypeOf;
3660
3531
  var getIterator = getIterator$1;
3661
3532
  var getIteratorMethod = getIteratorMethod$2;
3662
3533
  var iteratorClose = iteratorClose$1;
3663
3534
 
3664
- var $TypeError = TypeError;
3535
+ var $TypeError$2 = TypeError;
3665
3536
 
3666
3537
  var Result = function (stopped, result) {
3667
3538
  this.stopped = stopped;
@@ -3686,7 +3557,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3686
3557
 
3687
3558
  var callFn = function (value) {
3688
3559
  if (AS_ENTRIES) {
3689
- anObject$3(value);
3560
+ anObject$5(value);
3690
3561
  return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
3691
3562
  } return INTERRUPTED ? fn(value, stop) : fn(value);
3692
3563
  };
@@ -3697,31 +3568,31 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3697
3568
  iterator = iterable;
3698
3569
  } else {
3699
3570
  iterFn = getIteratorMethod(iterable);
3700
- if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
3571
+ if (!iterFn) throw new $TypeError$2(tryToString$1(iterable) + ' is not iterable');
3701
3572
  // optimisation for array iterators
3702
3573
  if (isArrayIteratorMethod(iterFn)) {
3703
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
3574
+ for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
3704
3575
  result = callFn(iterable[index]);
3705
- if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
3576
+ if (result && isPrototypeOf$3(ResultPrototype, result)) return result;
3706
3577
  } return new Result(false);
3707
3578
  }
3708
3579
  iterator = getIterator(iterable, iterFn);
3709
3580
  }
3710
3581
 
3711
3582
  next = IS_RECORD ? iterable.next : iterator.next;
3712
- while (!(step = call$4(next, iterator)).done) {
3583
+ while (!(step = call$7(next, iterator)).done) {
3713
3584
  try {
3714
3585
  result = callFn(step.value);
3715
3586
  } catch (error) {
3716
3587
  iteratorClose(iterator, 'throw', error);
3717
3588
  }
3718
- if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
3589
+ if (typeof result == 'object' && result && isPrototypeOf$3(ResultPrototype, result)) return result;
3719
3590
  } return new Result(false);
3720
3591
  };
3721
3592
 
3722
- var wellKnownSymbol = wellKnownSymbol$g;
3593
+ var wellKnownSymbol$2 = wellKnownSymbol$i;
3723
3594
 
3724
- var ITERATOR$1 = wellKnownSymbol('iterator');
3595
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
3725
3596
  var SAFE_CLOSING = false;
3726
3597
 
3727
3598
  try {
@@ -3768,9 +3639,9 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
3768
3639
  NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
3769
3640
  });
3770
3641
 
3771
- var $$6 = _export;
3772
- var call$3 = functionCall;
3773
- var aCallable$1 = aCallable$8;
3642
+ var $$8 = _export;
3643
+ var call$6 = functionCall;
3644
+ var aCallable$2 = aCallable$9;
3774
3645
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
3775
3646
  var perform$1 = perform$3;
3776
3647
  var iterate$1 = iterate$2;
@@ -3778,14 +3649,14 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
3778
3649
 
3779
3650
  // `Promise.all` method
3780
3651
  // https://tc39.es/ecma262/#sec-promise.all
3781
- $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3652
+ $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3782
3653
  all: function all(iterable) {
3783
3654
  var C = this;
3784
3655
  var capability = newPromiseCapabilityModule$2.f(C);
3785
3656
  var resolve = capability.resolve;
3786
3657
  var reject = capability.reject;
3787
3658
  var result = perform$1(function () {
3788
- var $promiseResolve = aCallable$1(C.resolve);
3659
+ var $promiseResolve = aCallable$2(C.resolve);
3789
3660
  var values = [];
3790
3661
  var counter = 0;
3791
3662
  var remaining = 1;
@@ -3793,7 +3664,7 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3793
3664
  var index = counter++;
3794
3665
  var alreadyCalled = false;
3795
3666
  remaining++;
3796
- call$3($promiseResolve, C, promise).then(function (value) {
3667
+ call$6($promiseResolve, C, promise).then(function (value) {
3797
3668
  if (alreadyCalled) return;
3798
3669
  alreadyCalled = true;
3799
3670
  values[index] = value;
@@ -3807,34 +3678,34 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3807
3678
  }
3808
3679
  });
3809
3680
 
3810
- var $$5 = _export;
3681
+ var $$7 = _export;
3811
3682
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
3812
3683
  var NativePromiseConstructor = promiseNativeConstructor;
3813
3684
  var getBuiltIn$1 = getBuiltIn$7;
3814
- var isCallable$1 = isCallable$l;
3815
- var defineBuiltIn$1 = defineBuiltIn$6;
3685
+ var isCallable$3 = isCallable$n;
3686
+ var defineBuiltIn$3 = defineBuiltIn$8;
3816
3687
 
3817
3688
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
3818
3689
 
3819
3690
  // `Promise.prototype.catch` method
3820
3691
  // https://tc39.es/ecma262/#sec-promise.prototype.catch
3821
- $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
3692
+ $$7({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
3822
3693
  'catch': function (onRejected) {
3823
3694
  return this.then(undefined, onRejected);
3824
3695
  }
3825
3696
  });
3826
3697
 
3827
3698
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3828
- if (isCallable$1(NativePromiseConstructor)) {
3699
+ if (isCallable$3(NativePromiseConstructor)) {
3829
3700
  var method = getBuiltIn$1('Promise').prototype['catch'];
3830
3701
  if (NativePromisePrototype['catch'] !== method) {
3831
- defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
3702
+ defineBuiltIn$3(NativePromisePrototype, 'catch', method, { unsafe: true });
3832
3703
  }
3833
3704
  }
3834
3705
 
3835
- var $$4 = _export;
3836
- var call$2 = functionCall;
3837
- var aCallable = aCallable$8;
3706
+ var $$6 = _export;
3707
+ var call$5 = functionCall;
3708
+ var aCallable$1 = aCallable$9;
3838
3709
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
3839
3710
  var perform = perform$3;
3840
3711
  var iterate = iterate$2;
@@ -3842,15 +3713,15 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
3842
3713
 
3843
3714
  // `Promise.race` method
3844
3715
  // https://tc39.es/ecma262/#sec-promise.race
3845
- $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3716
+ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3846
3717
  race: function race(iterable) {
3847
3718
  var C = this;
3848
3719
  var capability = newPromiseCapabilityModule$1.f(C);
3849
3720
  var reject = capability.reject;
3850
3721
  var result = perform(function () {
3851
- var $promiseResolve = aCallable(C.resolve);
3722
+ var $promiseResolve = aCallable$1(C.resolve);
3852
3723
  iterate(iterable, function (promise) {
3853
- call$2($promiseResolve, C, promise).then(capability.resolve, reject);
3724
+ call$5($promiseResolve, C, promise).then(capability.resolve, reject);
3854
3725
  });
3855
3726
  });
3856
3727
  if (result.error) reject(result.value);
@@ -3858,35 +3729,35 @@ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3858
3729
  }
3859
3730
  });
3860
3731
 
3861
- var $$3 = _export;
3862
- var call$1 = functionCall;
3732
+ var $$5 = _export;
3733
+ var call$4 = functionCall;
3863
3734
  var newPromiseCapabilityModule = newPromiseCapability$2;
3864
3735
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3865
3736
 
3866
3737
  // `Promise.reject` method
3867
3738
  // https://tc39.es/ecma262/#sec-promise.reject
3868
- $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3739
+ $$5({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3869
3740
  reject: function reject(r) {
3870
3741
  var capability = newPromiseCapabilityModule.f(this);
3871
- call$1(capability.reject, undefined, r);
3742
+ call$4(capability.reject, undefined, r);
3872
3743
  return capability.promise;
3873
3744
  }
3874
3745
  });
3875
3746
 
3876
- var anObject$2 = anObject$c;
3877
- var isObject = isObject$9;
3747
+ var anObject$4 = anObject$e;
3748
+ var isObject$1 = isObject$a;
3878
3749
  var newPromiseCapability = newPromiseCapability$2;
3879
3750
 
3880
3751
  var promiseResolve$1 = function (C, x) {
3881
- anObject$2(C);
3882
- if (isObject(x) && x.constructor === C) return x;
3752
+ anObject$4(C);
3753
+ if (isObject$1(x) && x.constructor === C) return x;
3883
3754
  var promiseCapability = newPromiseCapability.f(C);
3884
3755
  var resolve = promiseCapability.resolve;
3885
3756
  resolve(x);
3886
3757
  return promiseCapability.promise;
3887
3758
  };
3888
3759
 
3889
- var $$2 = _export;
3760
+ var $$4 = _export;
3890
3761
  var getBuiltIn = getBuiltIn$7;
3891
3762
  var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
3892
3763
  var promiseResolve = promiseResolve$1;
@@ -3895,7 +3766,7 @@ getBuiltIn('Promise');
3895
3766
 
3896
3767
  // `Promise.resolve` method
3897
3768
  // https://tc39.es/ecma262/#sec-promise.resolve
3898
- $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3769
+ $$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3899
3770
  resolve: function resolve(x) {
3900
3771
  return promiseResolve(this, x);
3901
3772
  }
@@ -4150,29 +4021,29 @@ const Text = ({
4150
4021
  children: children
4151
4022
  }));
4152
4023
 
4153
- var $$1 = _export;
4154
- var DESCRIPTORS = descriptors;
4155
- var global$2 = global$k;
4156
- var uncurryThis$2 = functionUncurryThis;
4157
- var hasOwn$1 = hasOwnProperty_1;
4158
- var isCallable = isCallable$l;
4159
- var isPrototypeOf$1 = objectIsPrototypeOf;
4160
- var toString$2 = toString$4;
4024
+ var $$3 = _export;
4025
+ var DESCRIPTORS$1 = descriptors;
4026
+ var global$6 = global$o;
4027
+ var uncurryThis$6 = functionUncurryThis;
4028
+ var hasOwn$2 = hasOwnProperty_1;
4029
+ var isCallable$2 = isCallable$n;
4030
+ var isPrototypeOf$2 = objectIsPrototypeOf;
4031
+ var toString$6 = toString$8;
4161
4032
  var defineBuiltInAccessor = defineBuiltInAccessor$2;
4162
4033
  var copyConstructorProperties = copyConstructorProperties$2;
4163
4034
 
4164
- var NativeSymbol = global$2.Symbol;
4035
+ var NativeSymbol = global$6.Symbol;
4165
4036
  var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
4166
4037
 
4167
- if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
4038
+ if (DESCRIPTORS$1 && isCallable$2(NativeSymbol) && (!('description' in SymbolPrototype) ||
4168
4039
  // Safari 12 bug
4169
4040
  NativeSymbol().description !== undefined
4170
4041
  )) {
4171
4042
  var EmptyStringDescriptionStore = {};
4172
4043
  // wrap Symbol constructor for correct work with undefined description
4173
4044
  var SymbolWrapper = function Symbol() {
4174
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$2(arguments[0]);
4175
- var result = isPrototypeOf$1(SymbolPrototype, this)
4045
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$6(arguments[0]);
4046
+ var result = isPrototypeOf$2(SymbolPrototype, this)
4176
4047
  ? new NativeSymbol(description)
4177
4048
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
4178
4049
  : description === undefined ? NativeSymbol() : NativeSymbol(description);
@@ -4185,24 +4056,24 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
4185
4056
  SymbolPrototype.constructor = SymbolWrapper;
4186
4057
 
4187
4058
  var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
4188
- var thisSymbolValue = uncurryThis$2(SymbolPrototype.valueOf);
4189
- var symbolDescriptiveString = uncurryThis$2(SymbolPrototype.toString);
4059
+ var thisSymbolValue = uncurryThis$6(SymbolPrototype.valueOf);
4060
+ var symbolDescriptiveString = uncurryThis$6(SymbolPrototype.toString);
4190
4061
  var regexp = /^Symbol\((.*)\)[^)]+$/;
4191
- var replace$1 = uncurryThis$2(''.replace);
4192
- var stringSlice = uncurryThis$2(''.slice);
4062
+ var replace$3 = uncurryThis$6(''.replace);
4063
+ var stringSlice$2 = uncurryThis$6(''.slice);
4193
4064
 
4194
4065
  defineBuiltInAccessor(SymbolPrototype, 'description', {
4195
4066
  configurable: true,
4196
4067
  get: function description() {
4197
4068
  var symbol = thisSymbolValue(this);
4198
- if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
4069
+ if (hasOwn$2(EmptyStringDescriptionStore, symbol)) return '';
4199
4070
  var string = symbolDescriptiveString(symbol);
4200
- var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace$1(string, regexp, '$1');
4071
+ var desc = NATIVE_SYMBOL ? stringSlice$2(string, 7, -1) : replace$3(string, regexp, '$1');
4201
4072
  return desc === '' ? undefined : desc;
4202
4073
  }
4203
4074
  });
4204
4075
 
4205
- $$1({ global: true, constructor: true, forced: true }, {
4076
+ $$3({ global: true, constructor: true, forced: true }, {
4206
4077
  Symbol: SymbolWrapper
4207
4078
  });
4208
4079
  }
@@ -4721,12 +4592,12 @@ const OptionGroup = ({
4721
4592
  }));
4722
4593
  };
4723
4594
 
4724
- var anObject$1 = anObject$c;
4595
+ var anObject$3 = anObject$e;
4725
4596
 
4726
4597
  // `RegExp.prototype.flags` getter implementation
4727
4598
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
4728
- var regexpFlags = function () {
4729
- var that = anObject$1(this);
4599
+ var regexpFlags$1 = function () {
4600
+ var that = anObject$3(this);
4730
4601
  var result = '';
4731
4602
  if (that.hasIndices) result += 'd';
4732
4603
  if (that.global) result += 'g';
@@ -4739,41 +4610,41 @@ var regexpFlags = function () {
4739
4610
  return result;
4740
4611
  };
4741
4612
 
4742
- var call = functionCall;
4743
- var hasOwn = hasOwnProperty_1;
4744
- var isPrototypeOf = objectIsPrototypeOf;
4745
- var regExpFlags = regexpFlags;
4613
+ var call$3 = functionCall;
4614
+ var hasOwn$1 = hasOwnProperty_1;
4615
+ var isPrototypeOf$1 = objectIsPrototypeOf;
4616
+ var regExpFlags = regexpFlags$1;
4746
4617
 
4747
- var RegExpPrototype$1 = RegExp.prototype;
4618
+ var RegExpPrototype$3 = RegExp.prototype;
4748
4619
 
4749
4620
  var regexpGetFlags = function (R) {
4750
4621
  var flags = R.flags;
4751
- return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
4752
- ? call(regExpFlags, R) : flags;
4622
+ return flags === undefined && !('flags' in RegExpPrototype$3) && !hasOwn$1(R, 'flags') && isPrototypeOf$1(RegExpPrototype$3, R)
4623
+ ? call$3(regExpFlags, R) : flags;
4753
4624
  };
4754
4625
 
4755
4626
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4756
- var defineBuiltIn = defineBuiltIn$6;
4757
- var anObject = anObject$c;
4758
- var $toString = toString$4;
4759
- var fails$1 = fails$g;
4760
- var getRegExpFlags = regexpGetFlags;
4627
+ var defineBuiltIn$2 = defineBuiltIn$8;
4628
+ var anObject$2 = anObject$e;
4629
+ var $toString = toString$8;
4630
+ var fails$8 = fails$n;
4631
+ var getRegExpFlags$1 = regexpGetFlags;
4761
4632
 
4762
4633
  var TO_STRING = 'toString';
4763
- var RegExpPrototype = RegExp.prototype;
4764
- var nativeToString = RegExpPrototype[TO_STRING];
4634
+ var RegExpPrototype$2 = RegExp.prototype;
4635
+ var nativeToString = RegExpPrototype$2[TO_STRING];
4765
4636
 
4766
- var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
4637
+ var NOT_GENERIC = fails$8(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
4767
4638
  // FF44- RegExp#toString has a wrong name
4768
4639
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
4769
4640
 
4770
4641
  // `RegExp.prototype.toString` method
4771
4642
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
4772
4643
  if (NOT_GENERIC || INCORRECT_NAME) {
4773
- defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
4774
- var R = anObject(this);
4644
+ defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
4645
+ var R = anObject$2(this);
4775
4646
  var pattern = $toString(R.source);
4776
- var flags = $toString(getRegExpFlags(R));
4647
+ var flags = $toString(getRegExpFlags$1(R));
4777
4648
  return '/' + pattern + '/' + flags;
4778
4649
  }, { unsafe: true });
4779
4650
  }
@@ -4924,73 +4795,53 @@ function Slider({
4924
4795
  }
4925
4796
 
4926
4797
  // TODO: Should be named "Numeric input" instead of stepper?
4927
- function Stepper({
4928
- id,
4929
- label,
4930
- description,
4931
- statusMessage,
4932
- validator,
4933
- value = 0,
4934
- onChange = () => undefined,
4935
- min = Number.MIN_SAFE_INTEGER,
4936
- max = Number.MAX_SAFE_INTEGER,
4937
- step = 1
4938
- }) {
4939
- const [localValue, setLocalValue] = useState(value);
4940
- const clamp = v => Math.max(min, Math.min(v, max));
4941
- const onChangeEvent = useCallback(e => {
4942
- if (isNaN(e.target.valueAsNumber)) return;
4943
- const value = clamp(e.target.valueAsNumber);
4944
- setLocalValue(value);
4945
- onChange(value);
4946
- }, [onChange]);
4947
- useEffect(() => {
4948
- setLocalValue(value);
4949
- }, [value]);
4950
- const down = () => {
4951
- if (localValue > min) {
4952
- const newValue = clamp(localValue - step);
4953
- setLocalValue(newValue);
4954
- onChange(newValue);
4955
- }
4956
- };
4957
- const up = () => {
4958
- if (localValue < max) {
4959
- const newValue = clamp(localValue + step);
4960
- setLocalValue(newValue);
4961
- onChange(newValue);
4962
- }
4963
- };
4964
- const handleKeyDown = e => {
4965
- if (e.key === 'ArrowUp') {
4966
- e.preventDefault();
4967
- up();
4968
- } else if (e.key === 'ArrowDown') {
4798
+ function Stepper(_a) {
4799
+ var {
4800
+ id,
4801
+ label,
4802
+ description,
4803
+ statusMessage,
4804
+ validator,
4805
+ value = 0,
4806
+ onChange = () => undefined,
4807
+ onIncrease = () => undefined,
4808
+ onDecrease = () => undefined,
4809
+ testId
4810
+ } = _a,
4811
+ props = __rest(_a, ["id", "label", "description", "statusMessage", "validator", "value", "onChange", "onIncrease", "onDecrease", "testId"]);
4812
+ const handleKeyDown = e => {
4813
+ if (e.key === 'ArrowUp') {
4814
+ e.preventDefault();
4815
+ onIncrease();
4816
+ } else if (e.key === 'ArrowDown') {
4969
4817
  e.preventDefault();
4970
- down();
4818
+ onDecrease();
4971
4819
  }
4972
4820
  };
4973
4821
  const PrimitiveStepper = jsxs("div", Object.assign({
4822
+ "data-testid": testId,
4974
4823
  className: `group group-border group-stepper ${validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)}`
4975
4824
  }, {
4976
4825
  children: [jsx("button", Object.assign({
4977
4826
  type: "button",
4978
- onClick: down
4827
+ onClick: onDecrease
4979
4828
  }, {
4980
4829
  children: "-"
4981
- })), jsx("input", {
4830
+ })), jsx("input", Object.assign({
4982
4831
  id: id,
4983
- type: "number",
4984
- onChange: onChangeEvent,
4832
+ type: "text",
4833
+ inputMode: "numeric",
4834
+ pattern: "[0-9]*",
4835
+ onChange: onChange,
4985
4836
  onFocus: ({
4986
4837
  target
4987
4838
  }) => target.select(),
4988
4839
  onKeyDown: handleKeyDown,
4989
4840
  placeholder: "0",
4990
- value: localValue
4991
- }), jsx("button", Object.assign({
4841
+ value: value
4842
+ }, props)), jsx("button", Object.assign({
4992
4843
  type: "button",
4993
- onClick: up
4844
+ onClick: onIncrease
4994
4845
  }, {
4995
4846
  children: "+"
4996
4847
  }))]
@@ -5023,21 +4874,21 @@ function Stepper({
5023
4874
  var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
5024
4875
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
5025
4876
 
5026
- var uncurryThis$1 = functionUncurryThis;
5027
- var requireObjectCoercible = requireObjectCoercible$4;
5028
- var toString$1 = toString$4;
4877
+ var uncurryThis$5 = functionUncurryThis;
4878
+ var requireObjectCoercible$1 = requireObjectCoercible$5;
4879
+ var toString$5 = toString$8;
5029
4880
  var whitespaces$1 = whitespaces$2;
5030
4881
 
5031
- var replace = uncurryThis$1(''.replace);
4882
+ var replace$2 = uncurryThis$5(''.replace);
5032
4883
  var ltrim = RegExp('^[' + whitespaces$1 + ']+');
5033
4884
  var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
5034
4885
 
5035
4886
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
5036
4887
  var createMethod = function (TYPE) {
5037
4888
  return function ($this) {
5038
- var string = toString$1(requireObjectCoercible($this));
5039
- if (TYPE & 1) string = replace(string, ltrim, '');
5040
- if (TYPE & 2) string = replace(string, rtrim, '$1');
4889
+ var string = toString$5(requireObjectCoercible$1($this));
4890
+ if (TYPE & 1) string = replace$2(string, ltrim, '');
4891
+ if (TYPE & 2) string = replace$2(string, rtrim, '$1');
5041
4892
  return string;
5042
4893
  };
5043
4894
  };
@@ -5054,35 +4905,35 @@ var stringTrim = {
5054
4905
  trim: createMethod(3)
5055
4906
  };
5056
4907
 
5057
- var global$1 = global$k;
5058
- var fails = fails$g;
5059
- var uncurryThis = functionUncurryThis;
5060
- var toString = toString$4;
4908
+ var global$5 = global$o;
4909
+ var fails$7 = fails$n;
4910
+ var uncurryThis$4 = functionUncurryThis;
4911
+ var toString$4 = toString$8;
5061
4912
  var trim = stringTrim.trim;
5062
4913
  var whitespaces = whitespaces$2;
5063
4914
 
5064
- var $parseInt$1 = global$1.parseInt;
5065
- var Symbol$1 = global$1.Symbol;
4915
+ var $parseInt$1 = global$5.parseInt;
4916
+ var Symbol$1 = global$5.Symbol;
5066
4917
  var ITERATOR = Symbol$1 && Symbol$1.iterator;
5067
4918
  var hex = /^[+-]?0x/i;
5068
- var exec = uncurryThis(hex.exec);
5069
- var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
4919
+ var exec$2 = uncurryThis$4(hex.exec);
4920
+ var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
5070
4921
  // MS Edge 18- broken with boxed symbols
5071
- || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
4922
+ || (ITERATOR && !fails$7(function () { $parseInt$1(Object(ITERATOR)); }));
5072
4923
 
5073
4924
  // `parseInt` method
5074
4925
  // https://tc39.es/ecma262/#sec-parseint-string-radix
5075
- var numberParseInt = FORCED ? function parseInt(string, radix) {
5076
- var S = trim(toString(string));
5077
- return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
4926
+ var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
4927
+ var S = trim(toString$4(string));
4928
+ return $parseInt$1(S, (radix >>> 0) || (exec$2(hex, S) ? 16 : 10));
5078
4929
  } : $parseInt$1;
5079
4930
 
5080
- var $ = _export;
4931
+ var $$2 = _export;
5081
4932
  var $parseInt = numberParseInt;
5082
4933
 
5083
4934
  // `parseInt` method
5084
4935
  // https://tc39.es/ecma262/#sec-parseint-string-radix
5085
- $({ global: true, forced: parseInt !== $parseInt }, {
4936
+ $$2({ global: true, forced: parseInt !== $parseInt }, {
5086
4937
  parseInt: $parseInt
5087
4938
  });
5088
4939
 
@@ -5308,4 +5159,1224 @@ const MenuItem = createComponent({
5308
5159
  react: React
5309
5160
  });
5310
5161
 
5311
- export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, ContextMenu, CoreDropdown, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, InPageWizardStepCard, Input, Link, List$1 as List, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, Stepper, Tab, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList };
5162
+ var SortDirection;
5163
+ (function (SortDirection) {
5164
+ SortDirection["ASC"] = "ASC";
5165
+ SortDirection["DESC"] = "DESC";
5166
+ })(SortDirection || (SortDirection = {}));
5167
+
5168
+ const defaultContext = {
5169
+ tableState: {
5170
+ sortedColumn: null,
5171
+ expandedRows: []
5172
+ },
5173
+ setTableState: null,
5174
+ onRowSelect: null,
5175
+ onRowExpand: null,
5176
+ onSort: null
5177
+ };
5178
+ const TableContext = /*#__PURE__*/React.createContext(defaultContext);
5179
+ const useTableContext = () => {
5180
+ return React.useContext(TableContext);
5181
+ };
5182
+
5183
+ var tryToString = tryToString$5;
5184
+
5185
+ var $TypeError$1 = TypeError;
5186
+
5187
+ var deletePropertyOrThrow$1 = function (O, P) {
5188
+ if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
5189
+ };
5190
+
5191
+ var toPropertyKey = toPropertyKey$3;
5192
+ var definePropertyModule = objectDefineProperty;
5193
+ var createPropertyDescriptor = createPropertyDescriptor$4;
5194
+
5195
+ var createProperty$1 = function (object, key, value) {
5196
+ var propertyKey = toPropertyKey(key);
5197
+ if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
5198
+ else object[propertyKey] = value;
5199
+ };
5200
+
5201
+ var toAbsoluteIndex = toAbsoluteIndex$2;
5202
+ var lengthOfArrayLike$1 = lengthOfArrayLike$4;
5203
+ var createProperty = createProperty$1;
5204
+
5205
+ var $Array = Array;
5206
+ var max = Math.max;
5207
+
5208
+ var arraySliceSimple = function (O, start, end) {
5209
+ var length = lengthOfArrayLike$1(O);
5210
+ var k = toAbsoluteIndex(start, length);
5211
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
5212
+ var result = $Array(max(fin - k, 0));
5213
+ var n = 0;
5214
+ for (; k < fin; k++, n++) createProperty(result, n, O[k]);
5215
+ result.length = n;
5216
+ return result;
5217
+ };
5218
+
5219
+ var arraySlice = arraySliceSimple;
5220
+
5221
+ var floor = Math.floor;
5222
+
5223
+ var mergeSort = function (array, comparefn) {
5224
+ var length = array.length;
5225
+ var middle = floor(length / 2);
5226
+ return length < 8 ? insertionSort(array, comparefn) : merge(
5227
+ array,
5228
+ mergeSort(arraySlice(array, 0, middle), comparefn),
5229
+ mergeSort(arraySlice(array, middle), comparefn),
5230
+ comparefn
5231
+ );
5232
+ };
5233
+
5234
+ var insertionSort = function (array, comparefn) {
5235
+ var length = array.length;
5236
+ var i = 1;
5237
+ var element, j;
5238
+
5239
+ while (i < length) {
5240
+ j = i;
5241
+ element = array[i];
5242
+ while (j && comparefn(array[j - 1], element) > 0) {
5243
+ array[j] = array[--j];
5244
+ }
5245
+ if (j !== i++) array[j] = element;
5246
+ } return array;
5247
+ };
5248
+
5249
+ var merge = function (array, left, right, comparefn) {
5250
+ var llength = left.length;
5251
+ var rlength = right.length;
5252
+ var lindex = 0;
5253
+ var rindex = 0;
5254
+
5255
+ while (lindex < llength || rindex < rlength) {
5256
+ array[lindex + rindex] = (lindex < llength && rindex < rlength)
5257
+ ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
5258
+ : lindex < llength ? left[lindex++] : right[rindex++];
5259
+ } return array;
5260
+ };
5261
+
5262
+ var arraySort = mergeSort;
5263
+
5264
+ var fails$6 = fails$n;
5265
+
5266
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
5267
+ var method = [][METHOD_NAME];
5268
+ return !!method && fails$6(function () {
5269
+ // eslint-disable-next-line no-useless-call -- required for testing
5270
+ method.call(null, argument || function () { return 1; }, 1);
5271
+ });
5272
+ };
5273
+
5274
+ var userAgent$1 = engineUserAgent;
5275
+
5276
+ var firefox = userAgent$1.match(/firefox\/(\d+)/i);
5277
+
5278
+ var engineFfVersion = !!firefox && +firefox[1];
5279
+
5280
+ var UA = engineUserAgent;
5281
+
5282
+ var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
5283
+
5284
+ var userAgent = engineUserAgent;
5285
+
5286
+ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
5287
+
5288
+ var engineWebkitVersion = !!webkit && +webkit[1];
5289
+
5290
+ var $$1 = _export;
5291
+ var uncurryThis$3 = functionUncurryThis;
5292
+ var aCallable = aCallable$9;
5293
+ var toObject = toObject$4;
5294
+ var lengthOfArrayLike = lengthOfArrayLike$4;
5295
+ var deletePropertyOrThrow = deletePropertyOrThrow$1;
5296
+ var toString$3 = toString$8;
5297
+ var fails$5 = fails$n;
5298
+ var internalSort = arraySort;
5299
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
5300
+ var FF = engineFfVersion;
5301
+ var IE_OR_EDGE = engineIsIeOrEdge;
5302
+ var V8 = engineV8Version;
5303
+ var WEBKIT = engineWebkitVersion;
5304
+
5305
+ var test = [];
5306
+ var nativeSort = uncurryThis$3(test.sort);
5307
+ var push = uncurryThis$3(test.push);
5308
+
5309
+ // IE8-
5310
+ var FAILS_ON_UNDEFINED = fails$5(function () {
5311
+ test.sort(undefined);
5312
+ });
5313
+ // V8 bug
5314
+ var FAILS_ON_NULL = fails$5(function () {
5315
+ test.sort(null);
5316
+ });
5317
+ // Old WebKit
5318
+ var STRICT_METHOD = arrayMethodIsStrict('sort');
5319
+
5320
+ var STABLE_SORT = !fails$5(function () {
5321
+ // feature detection can be too slow, so check engines versions
5322
+ if (V8) return V8 < 70;
5323
+ if (FF && FF > 3) return;
5324
+ if (IE_OR_EDGE) return true;
5325
+ if (WEBKIT) return WEBKIT < 603;
5326
+
5327
+ var result = '';
5328
+ var code, chr, value, index;
5329
+
5330
+ // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
5331
+ for (code = 65; code < 76; code++) {
5332
+ chr = String.fromCharCode(code);
5333
+
5334
+ switch (code) {
5335
+ case 66: case 69: case 70: case 72: value = 3; break;
5336
+ case 68: case 71: value = 4; break;
5337
+ default: value = 2;
5338
+ }
5339
+
5340
+ for (index = 0; index < 47; index++) {
5341
+ test.push({ k: chr + index, v: value });
5342
+ }
5343
+ }
5344
+
5345
+ test.sort(function (a, b) { return b.v - a.v; });
5346
+
5347
+ for (index = 0; index < test.length; index++) {
5348
+ chr = test[index].k.charAt(0);
5349
+ if (result.charAt(result.length - 1) !== chr) result += chr;
5350
+ }
5351
+
5352
+ return result !== 'DGBEFHACIJK';
5353
+ });
5354
+
5355
+ var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
5356
+
5357
+ var getSortCompare = function (comparefn) {
5358
+ return function (x, y) {
5359
+ if (y === undefined) return -1;
5360
+ if (x === undefined) return 1;
5361
+ if (comparefn !== undefined) return +comparefn(x, y) || 0;
5362
+ return toString$3(x) > toString$3(y) ? 1 : -1;
5363
+ };
5364
+ };
5365
+
5366
+ // `Array.prototype.sort` method
5367
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
5368
+ $$1({ target: 'Array', proto: true, forced: FORCED }, {
5369
+ sort: function sort(comparefn) {
5370
+ if (comparefn !== undefined) aCallable(comparefn);
5371
+
5372
+ var array = toObject(this);
5373
+
5374
+ if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
5375
+
5376
+ var items = [];
5377
+ var arrayLength = lengthOfArrayLike(array);
5378
+ var itemsLength, index;
5379
+
5380
+ for (index = 0; index < arrayLength; index++) {
5381
+ if (index in array) push(items, array[index]);
5382
+ }
5383
+
5384
+ internalSort(items, getSortCompare(comparefn));
5385
+
5386
+ itemsLength = lengthOfArrayLike(items);
5387
+ index = 0;
5388
+
5389
+ while (index < itemsLength) array[index] = items[index++];
5390
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
5391
+
5392
+ return array;
5393
+ }
5394
+ });
5395
+
5396
+ var isCallable$1 = isCallable$n;
5397
+ var isObject = isObject$a;
5398
+ var setPrototypeOf = objectSetPrototypeOf;
5399
+
5400
+ // makes subclassing work correct for wrapped built-ins
5401
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
5402
+ var NewTarget, NewTargetPrototype;
5403
+ if (
5404
+ // it can work only with native `setPrototypeOf`
5405
+ setPrototypeOf &&
5406
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
5407
+ isCallable$1(NewTarget = dummy.constructor) &&
5408
+ NewTarget !== Wrapper &&
5409
+ isObject(NewTargetPrototype = NewTarget.prototype) &&
5410
+ NewTargetPrototype !== Wrapper.prototype
5411
+ ) setPrototypeOf($this, NewTargetPrototype);
5412
+ return $this;
5413
+ };
5414
+
5415
+ var fails$4 = fails$n;
5416
+ var global$4 = global$o;
5417
+
5418
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
5419
+ var $RegExp$2 = global$4.RegExp;
5420
+
5421
+ var UNSUPPORTED_Y$2 = fails$4(function () {
5422
+ var re = $RegExp$2('a', 'y');
5423
+ re.lastIndex = 2;
5424
+ return re.exec('abcd') !== null;
5425
+ });
5426
+
5427
+ // UC Browser bug
5428
+ // https://github.com/zloirock/core-js/issues/1008
5429
+ var MISSED_STICKY$1 = UNSUPPORTED_Y$2 || fails$4(function () {
5430
+ return !$RegExp$2('a', 'y').sticky;
5431
+ });
5432
+
5433
+ var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$4(function () {
5434
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
5435
+ var re = $RegExp$2('^r', 'gy');
5436
+ re.lastIndex = 2;
5437
+ return re.exec('str') !== null;
5438
+ });
5439
+
5440
+ var regexpStickyHelpers = {
5441
+ BROKEN_CARET: BROKEN_CARET,
5442
+ MISSED_STICKY: MISSED_STICKY$1,
5443
+ UNSUPPORTED_Y: UNSUPPORTED_Y$2
5444
+ };
5445
+
5446
+ var defineProperty = objectDefineProperty.f;
5447
+
5448
+ var proxyAccessor$1 = function (Target, Source, key) {
5449
+ key in Target || defineProperty(Target, key, {
5450
+ configurable: true,
5451
+ get: function () { return Source[key]; },
5452
+ set: function (it) { Source[key] = it; }
5453
+ });
5454
+ };
5455
+
5456
+ var fails$3 = fails$n;
5457
+ var global$3 = global$o;
5458
+
5459
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
5460
+ var $RegExp$1 = global$3.RegExp;
5461
+
5462
+ var regexpUnsupportedDotAll = fails$3(function () {
5463
+ var re = $RegExp$1('.', 's');
5464
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
5465
+ });
5466
+
5467
+ var fails$2 = fails$n;
5468
+ var global$2 = global$o;
5469
+
5470
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
5471
+ var $RegExp = global$2.RegExp;
5472
+
5473
+ var regexpUnsupportedNcg = fails$2(function () {
5474
+ var re = $RegExp('(?<a>b)', 'g');
5475
+ return re.exec('b').groups.a !== 'b' ||
5476
+ 'b'.replace(re, '$<a>c') !== 'bc';
5477
+ });
5478
+
5479
+ var DESCRIPTORS = descriptors;
5480
+ var global$1 = global$o;
5481
+ var uncurryThis$2 = functionUncurryThis;
5482
+ var isForced = isForced_1;
5483
+ var inheritIfRequired = inheritIfRequired$1;
5484
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
5485
+ var getOwnPropertyNames = objectGetOwnPropertyNames.f;
5486
+ var isPrototypeOf = objectIsPrototypeOf;
5487
+ var isRegExp = isRegexp;
5488
+ var toString$2 = toString$8;
5489
+ var getRegExpFlags = regexpGetFlags;
5490
+ var stickyHelpers$1 = regexpStickyHelpers;
5491
+ var proxyAccessor = proxyAccessor$1;
5492
+ var defineBuiltIn$1 = defineBuiltIn$8;
5493
+ var fails$1 = fails$n;
5494
+ var hasOwn = hasOwnProperty_1;
5495
+ var enforceInternalState = internalState.enforce;
5496
+ var setSpecies = setSpecies$2;
5497
+ var wellKnownSymbol$1 = wellKnownSymbol$i;
5498
+ var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
5499
+ var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
5500
+
5501
+ var MATCH = wellKnownSymbol$1('match');
5502
+ var NativeRegExp = global$1.RegExp;
5503
+ var RegExpPrototype$1 = NativeRegExp.prototype;
5504
+ var SyntaxError = global$1.SyntaxError;
5505
+ var exec$1 = uncurryThis$2(RegExpPrototype$1.exec);
5506
+ var charAt$1 = uncurryThis$2(''.charAt);
5507
+ var replace$1 = uncurryThis$2(''.replace);
5508
+ var stringIndexOf = uncurryThis$2(''.indexOf);
5509
+ var stringSlice$1 = uncurryThis$2(''.slice);
5510
+ // TODO: Use only proper RegExpIdentifierName
5511
+ var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
5512
+ var re1 = /a/g;
5513
+ var re2 = /a/g;
5514
+
5515
+ // "new" should create a new object, old webkit bug
5516
+ var CORRECT_NEW = new NativeRegExp(re1) !== re1;
5517
+
5518
+ var MISSED_STICKY = stickyHelpers$1.MISSED_STICKY;
5519
+ var UNSUPPORTED_Y$1 = stickyHelpers$1.UNSUPPORTED_Y;
5520
+
5521
+ var BASE_FORCED = DESCRIPTORS &&
5522
+ (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG$1 || fails$1(function () {
5523
+ re2[MATCH] = false;
5524
+ // RegExp constructor can alter flags and IsRegExp works correct with @@match
5525
+ return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
5526
+ }));
5527
+
5528
+ var handleDotAll = function (string) {
5529
+ var length = string.length;
5530
+ var index = 0;
5531
+ var result = '';
5532
+ var brackets = false;
5533
+ var chr;
5534
+ for (; index <= length; index++) {
5535
+ chr = charAt$1(string, index);
5536
+ if (chr === '\\') {
5537
+ result += chr + charAt$1(string, ++index);
5538
+ continue;
5539
+ }
5540
+ if (!brackets && chr === '.') {
5541
+ result += '[\\s\\S]';
5542
+ } else {
5543
+ if (chr === '[') {
5544
+ brackets = true;
5545
+ } else if (chr === ']') {
5546
+ brackets = false;
5547
+ } result += chr;
5548
+ }
5549
+ } return result;
5550
+ };
5551
+
5552
+ var handleNCG = function (string) {
5553
+ var length = string.length;
5554
+ var index = 0;
5555
+ var result = '';
5556
+ var named = [];
5557
+ var names = {};
5558
+ var brackets = false;
5559
+ var ncg = false;
5560
+ var groupid = 0;
5561
+ var groupname = '';
5562
+ var chr;
5563
+ for (; index <= length; index++) {
5564
+ chr = charAt$1(string, index);
5565
+ if (chr === '\\') {
5566
+ chr += charAt$1(string, ++index);
5567
+ } else if (chr === ']') {
5568
+ brackets = false;
5569
+ } else if (!brackets) switch (true) {
5570
+ case chr === '[':
5571
+ brackets = true;
5572
+ break;
5573
+ case chr === '(':
5574
+ if (exec$1(IS_NCG, stringSlice$1(string, index + 1))) {
5575
+ index += 2;
5576
+ ncg = true;
5577
+ }
5578
+ result += chr;
5579
+ groupid++;
5580
+ continue;
5581
+ case chr === '>' && ncg:
5582
+ if (groupname === '' || hasOwn(names, groupname)) {
5583
+ throw new SyntaxError('Invalid capture group name');
5584
+ }
5585
+ names[groupname] = true;
5586
+ named[named.length] = [groupname, groupid];
5587
+ ncg = false;
5588
+ groupname = '';
5589
+ continue;
5590
+ }
5591
+ if (ncg) groupname += chr;
5592
+ else result += chr;
5593
+ } return [result, named];
5594
+ };
5595
+
5596
+ // `RegExp` constructor
5597
+ // https://tc39.es/ecma262/#sec-regexp-constructor
5598
+ if (isForced('RegExp', BASE_FORCED)) {
5599
+ var RegExpWrapper = function RegExp(pattern, flags) {
5600
+ var thisIsRegExp = isPrototypeOf(RegExpPrototype$1, this);
5601
+ var patternIsRegExp = isRegExp(pattern);
5602
+ var flagsAreUndefined = flags === undefined;
5603
+ var groups = [];
5604
+ var rawPattern = pattern;
5605
+ var rawFlags, dotAll, sticky, handled, result, state;
5606
+
5607
+ if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
5608
+ return pattern;
5609
+ }
5610
+
5611
+ if (patternIsRegExp || isPrototypeOf(RegExpPrototype$1, pattern)) {
5612
+ pattern = pattern.source;
5613
+ if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);
5614
+ }
5615
+
5616
+ pattern = pattern === undefined ? '' : toString$2(pattern);
5617
+ flags = flags === undefined ? '' : toString$2(flags);
5618
+ rawPattern = pattern;
5619
+
5620
+ if (UNSUPPORTED_DOT_ALL$1 && 'dotAll' in re1) {
5621
+ dotAll = !!flags && stringIndexOf(flags, 's') > -1;
5622
+ if (dotAll) flags = replace$1(flags, /s/g, '');
5623
+ }
5624
+
5625
+ rawFlags = flags;
5626
+
5627
+ if (MISSED_STICKY && 'sticky' in re1) {
5628
+ sticky = !!flags && stringIndexOf(flags, 'y') > -1;
5629
+ if (sticky && UNSUPPORTED_Y$1) flags = replace$1(flags, /y/g, '');
5630
+ }
5631
+
5632
+ if (UNSUPPORTED_NCG$1) {
5633
+ handled = handleNCG(pattern);
5634
+ pattern = handled[0];
5635
+ groups = handled[1];
5636
+ }
5637
+
5638
+ result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$1, RegExpWrapper);
5639
+
5640
+ if (dotAll || sticky || groups.length) {
5641
+ state = enforceInternalState(result);
5642
+ if (dotAll) {
5643
+ state.dotAll = true;
5644
+ state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
5645
+ }
5646
+ if (sticky) state.sticky = true;
5647
+ if (groups.length) state.groups = groups;
5648
+ }
5649
+
5650
+ if (pattern !== rawPattern) try {
5651
+ // fails in old engines, but we have no alternatives for unsupported regex syntax
5652
+ createNonEnumerableProperty$1(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
5653
+ } catch (error) { /* empty */ }
5654
+
5655
+ return result;
5656
+ };
5657
+
5658
+ for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
5659
+ proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
5660
+ }
5661
+
5662
+ RegExpPrototype$1.constructor = RegExpWrapper;
5663
+ RegExpWrapper.prototype = RegExpPrototype$1;
5664
+ defineBuiltIn$1(global$1, 'RegExp', RegExpWrapper, { constructor: true });
5665
+ }
5666
+
5667
+ // https://tc39.es/ecma262/#sec-get-regexp-@@species
5668
+ setSpecies('RegExp');
5669
+
5670
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
5671
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
5672
+ var call$2 = functionCall;
5673
+ var uncurryThis$1 = functionUncurryThis;
5674
+ var toString$1 = toString$8;
5675
+ var regexpFlags = regexpFlags$1;
5676
+ var stickyHelpers = regexpStickyHelpers;
5677
+ var shared = shared$4.exports;
5678
+ var create = objectCreate;
5679
+ var getInternalState = internalState.get;
5680
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
5681
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
5682
+
5683
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
5684
+ var nativeExec = RegExp.prototype.exec;
5685
+ var patchedExec = nativeExec;
5686
+ var charAt = uncurryThis$1(''.charAt);
5687
+ var indexOf = uncurryThis$1(''.indexOf);
5688
+ var replace = uncurryThis$1(''.replace);
5689
+ var stringSlice = uncurryThis$1(''.slice);
5690
+
5691
+ var UPDATES_LAST_INDEX_WRONG = (function () {
5692
+ var re1 = /a/;
5693
+ var re2 = /b*/g;
5694
+ call$2(nativeExec, re1, 'a');
5695
+ call$2(nativeExec, re2, 'a');
5696
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
5697
+ })();
5698
+
5699
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
5700
+
5701
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
5702
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
5703
+
5704
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
5705
+
5706
+ if (PATCH) {
5707
+ patchedExec = function exec(string) {
5708
+ var re = this;
5709
+ var state = getInternalState(re);
5710
+ var str = toString$1(string);
5711
+ var raw = state.raw;
5712
+ var result, reCopy, lastIndex, match, i, object, group;
5713
+
5714
+ if (raw) {
5715
+ raw.lastIndex = re.lastIndex;
5716
+ result = call$2(patchedExec, raw, str);
5717
+ re.lastIndex = raw.lastIndex;
5718
+ return result;
5719
+ }
5720
+
5721
+ var groups = state.groups;
5722
+ var sticky = UNSUPPORTED_Y && re.sticky;
5723
+ var flags = call$2(regexpFlags, re);
5724
+ var source = re.source;
5725
+ var charsAdded = 0;
5726
+ var strCopy = str;
5727
+
5728
+ if (sticky) {
5729
+ flags = replace(flags, 'y', '');
5730
+ if (indexOf(flags, 'g') === -1) {
5731
+ flags += 'g';
5732
+ }
5733
+
5734
+ strCopy = stringSlice(str, re.lastIndex);
5735
+ // Support anchored sticky behavior.
5736
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
5737
+ source = '(?: ' + source + ')';
5738
+ strCopy = ' ' + strCopy;
5739
+ charsAdded++;
5740
+ }
5741
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
5742
+ // simulate the 'y' flag.
5743
+ reCopy = new RegExp('^(?:' + source + ')', flags);
5744
+ }
5745
+
5746
+ if (NPCG_INCLUDED) {
5747
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
5748
+ }
5749
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
5750
+
5751
+ match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
5752
+
5753
+ if (sticky) {
5754
+ if (match) {
5755
+ match.input = stringSlice(match.input, charsAdded);
5756
+ match[0] = stringSlice(match[0], charsAdded);
5757
+ match.index = re.lastIndex;
5758
+ re.lastIndex += match[0].length;
5759
+ } else re.lastIndex = 0;
5760
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
5761
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
5762
+ }
5763
+ if (NPCG_INCLUDED && match && match.length > 1) {
5764
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
5765
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
5766
+ call$2(nativeReplace, match[0], reCopy, function () {
5767
+ for (i = 1; i < arguments.length - 2; i++) {
5768
+ if (arguments[i] === undefined) match[i] = undefined;
5769
+ }
5770
+ });
5771
+ }
5772
+
5773
+ if (match && groups) {
5774
+ match.groups = object = create(null);
5775
+ for (i = 0; i < groups.length; i++) {
5776
+ group = groups[i];
5777
+ object[group[0]] = match[group[1]];
5778
+ }
5779
+ }
5780
+
5781
+ return match;
5782
+ };
5783
+ }
5784
+
5785
+ var regexpExec$2 = patchedExec;
5786
+
5787
+ var $ = _export;
5788
+ var exec = regexpExec$2;
5789
+
5790
+ // `RegExp.prototype.exec` method
5791
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
5792
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
5793
+ exec: exec
5794
+ });
5795
+
5796
+ // TODO: Remove from `core-js@4` since it's moved to entry points
5797
+
5798
+ var uncurryThis = functionUncurryThisClause;
5799
+ var defineBuiltIn = defineBuiltIn$8;
5800
+ var regexpExec$1 = regexpExec$2;
5801
+ var fails = fails$n;
5802
+ var wellKnownSymbol = wellKnownSymbol$i;
5803
+ var createNonEnumerableProperty = createNonEnumerableProperty$6;
5804
+
5805
+ var SPECIES = wellKnownSymbol('species');
5806
+ var RegExpPrototype = RegExp.prototype;
5807
+
5808
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
5809
+ var SYMBOL = wellKnownSymbol(KEY);
5810
+
5811
+ var DELEGATES_TO_SYMBOL = !fails(function () {
5812
+ // String methods call symbol-named RegEp methods
5813
+ var O = {};
5814
+ O[SYMBOL] = function () { return 7; };
5815
+ return ''[KEY](O) !== 7;
5816
+ });
5817
+
5818
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
5819
+ // Symbol-named RegExp methods call .exec
5820
+ var execCalled = false;
5821
+ var re = /a/;
5822
+
5823
+ if (KEY === 'split') {
5824
+ // We can't use real regex here since it causes deoptimization
5825
+ // and serious performance degradation in V8
5826
+ // https://github.com/zloirock/core-js/issues/306
5827
+ re = {};
5828
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
5829
+ // a new one. We need to return the patched regex when creating the new one.
5830
+ re.constructor = {};
5831
+ re.constructor[SPECIES] = function () { return re; };
5832
+ re.flags = '';
5833
+ re[SYMBOL] = /./[SYMBOL];
5834
+ }
5835
+
5836
+ re.exec = function () {
5837
+ execCalled = true;
5838
+ return null;
5839
+ };
5840
+
5841
+ re[SYMBOL]('');
5842
+ return !execCalled;
5843
+ });
5844
+
5845
+ if (
5846
+ !DELEGATES_TO_SYMBOL ||
5847
+ !DELEGATES_TO_EXEC ||
5848
+ FORCED
5849
+ ) {
5850
+ var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
5851
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
5852
+ var uncurriedNativeMethod = uncurryThis(nativeMethod);
5853
+ var $exec = regexp.exec;
5854
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
5855
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
5856
+ // The native String method already delegates to @@method (this
5857
+ // polyfilled function), leasing to infinite recursion.
5858
+ // We avoid it by directly calling the native @@method method.
5859
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
5860
+ }
5861
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
5862
+ }
5863
+ return { done: false };
5864
+ });
5865
+
5866
+ defineBuiltIn(String.prototype, KEY, methods[0]);
5867
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
5868
+ }
5869
+
5870
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
5871
+ };
5872
+
5873
+ // `SameValue` abstract operation
5874
+ // https://tc39.es/ecma262/#sec-samevalue
5875
+ // eslint-disable-next-line es/no-object-is -- safe
5876
+ var sameValue$1 = Object.is || function is(x, y) {
5877
+ // eslint-disable-next-line no-self-compare -- NaN check
5878
+ return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
5879
+ };
5880
+
5881
+ var call$1 = functionCall;
5882
+ var anObject$1 = anObject$e;
5883
+ var isCallable = isCallable$n;
5884
+ var classof = classofRaw$2;
5885
+ var regexpExec = regexpExec$2;
5886
+
5887
+ var $TypeError = TypeError;
5888
+
5889
+ // `RegExpExec` abstract operation
5890
+ // https://tc39.es/ecma262/#sec-regexpexec
5891
+ var regexpExecAbstract = function (R, S) {
5892
+ var exec = R.exec;
5893
+ if (isCallable(exec)) {
5894
+ var result = call$1(exec, R, S);
5895
+ if (result !== null) anObject$1(result);
5896
+ return result;
5897
+ }
5898
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
5899
+ throw new $TypeError('RegExp#exec called on incompatible receiver');
5900
+ };
5901
+
5902
+ var call = functionCall;
5903
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
5904
+ var anObject = anObject$e;
5905
+ var isNullOrUndefined = isNullOrUndefined$5;
5906
+ var requireObjectCoercible = requireObjectCoercible$5;
5907
+ var sameValue = sameValue$1;
5908
+ var toString = toString$8;
5909
+ var getMethod = getMethod$4;
5910
+ var regExpExec = regexpExecAbstract;
5911
+
5912
+ // @@search logic
5913
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
5914
+ return [
5915
+ // `String.prototype.search` method
5916
+ // https://tc39.es/ecma262/#sec-string.prototype.search
5917
+ function search(regexp) {
5918
+ var O = requireObjectCoercible(this);
5919
+ var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
5920
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
5921
+ },
5922
+ // `RegExp.prototype[@@search]` method
5923
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
5924
+ function (string) {
5925
+ var rx = anObject(this);
5926
+ var S = toString(string);
5927
+ var res = maybeCallNative(nativeSearch, rx, S);
5928
+
5929
+ if (res.done) return res.value;
5930
+
5931
+ var previousLastIndex = rx.lastIndex;
5932
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
5933
+ var result = regExpExec(rx, S);
5934
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
5935
+ return result === null ? -1 : result.index;
5936
+ }
5937
+ ];
5938
+ });
5939
+
5940
+ /**
5941
+ * sum the total of columns or cols in a row
5942
+ * @param colsLength the length of the columns
5943
+ * @param useSelection add a column for selection checkboxes
5944
+ * @param useShowActionColumn add another column for action columns
5945
+ * @param useGroupBy add another columns for groupby
5946
+ */
5947
+ function sumCols(colsLength, useSelection, useShowActionColumn, useGroupBy) {
5948
+ let sum = colsLength;
5949
+ if (useSelection) {
5950
+ sum = sum + 1;
5951
+ }
5952
+ if (useGroupBy) {
5953
+ sum = sum + 1;
5954
+ }
5955
+ if (useShowActionColumn) {
5956
+ sum = sum + 1;
5957
+ }
5958
+ return sum;
5959
+ }
5960
+ /**
5961
+ * sort array of tabke rows
5962
+ * @param items table rows array
5963
+ * @param columnName the target column name
5964
+ * @param sortDirection the sort direction
5965
+ * @return Array of tableRow
5966
+ */
5967
+ function sortArray(items = [], columnName, sortDirection) {
5968
+ var _a;
5969
+ const languages = ((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.languages) || ['sw', 'en'];
5970
+ const sortedItems = [...items].sort((firstItem, secondItem) => {
5971
+ let result = 0;
5972
+ if (sortDirection === SortDirection.ASC) {
5973
+ if (isNaN(secondItem[columnName]) && isNaN(firstItem[columnName])) {
5974
+ result = String(firstItem[columnName]).localeCompare(String(secondItem[columnName]), languages, {
5975
+ sensitivity: 'base',
5976
+ ignorePunctuation: true
5977
+ });
5978
+ } else {
5979
+ result = firstItem[columnName] - secondItem[columnName];
5980
+ }
5981
+ } else {
5982
+ if (isNaN(secondItem[columnName]) && isNaN(firstItem[columnName])) {
5983
+ result = String(secondItem[columnName]).localeCompare(String(firstItem[columnName]), languages, {
5984
+ sensitivity: 'base',
5985
+ ignorePunctuation: true
5986
+ });
5987
+ } else {
5988
+ result = secondItem[columnName] - firstItem[columnName];
5989
+ }
5990
+ }
5991
+ return result;
5992
+ });
5993
+ return sortedItems;
5994
+ }
5995
+ /**
5996
+ *
5997
+ * @param data table data
5998
+ * @param filterColumns filter columns
5999
+ */
6000
+ function filterArrayByColumns(data, filterColumns) {
6001
+ return data.filter(row => {
6002
+ return filterColumns.length === 0 || filterColumns.every(column => {
6003
+ return Array.isArray(column.value) ? column.value.length === 0 || column.value.indexOf(row[column.accessor]) > -1 : row[column.accessor] === column.value;
6004
+ });
6005
+ });
6006
+ }
6007
+ /**
6008
+ * search text in array of table row
6009
+ * @param data the array of table rows
6010
+ * @param keyword The keyword to search in the array
6011
+ * @param searchFields the target field to search
6012
+ */
6013
+ function searchTextByColumns(data, keyword, searchFields) {
6014
+ return [...data].filter(row => {
6015
+ const searchText = String(keyword);
6016
+ return searchFields === null || searchFields === void 0 ? void 0 : searchFields.some(searchColumn => {
6017
+ let result = false;
6018
+ const regEx = new RegExp(searchText, 'gi');
6019
+ if (row[searchColumn] === null || row[searchColumn] === undefined) {
6020
+ result = false;
6021
+ } else if (typeof row[searchColumn] === 'string') {
6022
+ result = row[searchColumn].search(regEx) > -1;
6023
+ } else if (typeof row[searchColumn] === 'number') {
6024
+ result = String(row[searchColumn]).search(regEx) !== -1;
6025
+ }
6026
+ return result;
6027
+ });
6028
+ });
6029
+ }
6030
+ /**
6031
+ * paginate data
6032
+ * @param data table data
6033
+ * @param offset page size
6034
+ * @param currentPage current page index
6035
+ */
6036
+ function paginate(data, offset, currentPage) {
6037
+ if (offset && (data === null || data === void 0 ? void 0 : data.length) > 0) {
6038
+ const start = currentPage * offset;
6039
+ const end = offset + start;
6040
+ const currentPageData = data === null || data === void 0 ? void 0 : data.slice(start, end);
6041
+ return currentPageData;
6042
+ }
6043
+ return data;
6044
+ }
6045
+ /**
6046
+ * on row select
6047
+ * @param event input event
6048
+ * @param data rows of data
6049
+ * @param rowUniqueAccessor row unique accessor
6050
+ * @param rowId row id value
6051
+ */
6052
+ function onRowSelect(event, data, rowUniqueAccessor, rowId) {
6053
+ const target = event.target;
6054
+ let isAllSelected = true;
6055
+ let isIndeterminate = false;
6056
+ const newData = data === null || data === void 0 ? void 0 : data.map(row => {
6057
+ if (row[rowUniqueAccessor] === rowId || rowId === 'all') {
6058
+ row.checked = target.checked;
6059
+ }
6060
+ isAllSelected = isAllSelected && row.checked;
6061
+ isIndeterminate = isIndeterminate || row.checked;
6062
+ return row;
6063
+ });
6064
+ return {
6065
+ data: newData,
6066
+ isAllSelected: !!newData && isAllSelected,
6067
+ isIndeterminate: isIndeterminate && !isAllSelected
6068
+ };
6069
+ }
6070
+
6071
+ const TableCell = /*#__PURE__*/React.forwardRef((_a, ref) => {
6072
+ var props = __rest(_a, []);
6073
+ return jsx("td", Object.assign({}, props, {
6074
+ ref: ref
6075
+ }));
6076
+ });
6077
+ TableCell.displayName = 'TableCell';
6078
+
6079
+ const TableBody = /*#__PURE__*/React.forwardRef((_a, ref) => {
6080
+ var props = __rest(_a, []);
6081
+ let parentKey;
6082
+ /**
6083
+ * clone table row by appending parent key to sub row if necessary
6084
+ * @param Child react element
6085
+ * @param index index number
6086
+ */
6087
+ const cloneTableRow = React.useCallback((Child, index) => {
6088
+ var _a;
6089
+ const isTableRow = /*#__PURE__*/React.isValidElement(Child) && ((_a = Child === null || Child === void 0 ? void 0 : Child.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'TableRow';
6090
+ if (isTableRow && !Child.props.isSubRow) {
6091
+ parentKey = Child.props.uniqueKey;
6092
+ }
6093
+ return isTableRow ? /*#__PURE__*/React.cloneElement(Child, {
6094
+ index,
6095
+ parentKey
6096
+ }) : Child;
6097
+ }, []);
6098
+ return jsx("tbody", Object.assign({}, props, {
6099
+ ref: ref
6100
+ }, {
6101
+ children: React.Children.map(props.children, (Child, i) => {
6102
+ if ((Child === null || Child === void 0 ? void 0 : Child.type) === React.Fragment) {
6103
+ return /*#__PURE__*/React.cloneElement(Child, {
6104
+ children: React.Children.map(Child.props.children, (FragmentChild, fragmentIndex) => cloneTableRow(FragmentChild, fragmentIndex))
6105
+ });
6106
+ } else {
6107
+ return cloneTableRow(Child, i);
6108
+ }
6109
+ })
6110
+ }));
6111
+ });
6112
+ TableBody.displayName = 'TableBody';
6113
+
6114
+ const TableHeader = /*#__PURE__*/React.forwardRef((_a, ref) => {
6115
+ var props = __rest(_a, []);
6116
+ return jsx("thead", Object.assign({}, props, {
6117
+ ref: ref
6118
+ }, {
6119
+ children: React.Children.count(props.children) === 1 && /*#__PURE__*/React.isValidElement(props.children) ? /*#__PURE__*/React.cloneElement(props.children, {
6120
+ isHeaderRow: true,
6121
+ index: -1
6122
+ }) : React.Children.map(props.children, (Child, i) => {
6123
+ var _a;
6124
+ return /*#__PURE__*/React.isValidElement(Child) && ((_a = Child === null || Child === void 0 ? void 0 : Child.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'TableRow' ? /*#__PURE__*/React.cloneElement(Child, {
6125
+ index: i,
6126
+ hideSelect: !Child.props.isHeaderRow
6127
+ }) : Child;
6128
+ })
6129
+ }));
6130
+ });
6131
+ TableHeader.displayName = 'TableHeader';
6132
+
6133
+ const TableHeaderCell = /*#__PURE__*/React.forwardRef((_a, ref) => {
6134
+ var {
6135
+ accessor,
6136
+ disableSort,
6137
+ className,
6138
+ sortDirection,
6139
+ onClick,
6140
+ children
6141
+ } = _a,
6142
+ props = __rest(_a, ["accessor", "disableSort", "className", "sortDirection", "onClick", "children"]);
6143
+ const tableContext = useTableContext();
6144
+ const [sortedColumn, setSortedColumn] = React.useState(null);
6145
+ const [sortOrder, setSortOrder] = React.useState(SortDirection.ASC);
6146
+ const [sortable, setSortable] = React.useState(false);
6147
+ /**
6148
+ * get latest sort direction
6149
+ * @param oldSortDirection current sort direction
6150
+ */
6151
+ const getSortDirection = oldSortDirection => {
6152
+ return oldSortDirection === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC;
6153
+ };
6154
+ /** on column sort */
6155
+ const onSort = React.useCallback(() => {
6156
+ var _a;
6157
+ const newSortedColumn = sortedColumn && sortedColumn.accessor === accessor ? Object.assign(Object.assign({}, sortedColumn), {
6158
+ sortDirection: getSortDirection(sortedColumn.sortDirection)
6159
+ }) : {
6160
+ accessor,
6161
+ sortDirection: SortDirection.DESC
6162
+ };
6163
+ tableContext.setTableState(Object.assign(Object.assign({}, tableContext.tableState), {
6164
+ sortedColumn: newSortedColumn
6165
+ }));
6166
+ !!newSortedColumn && ((_a = tableContext === null || tableContext === void 0 ? void 0 : tableContext.onSort) === null || _a === void 0 ? void 0 : _a.call(tableContext, newSortedColumn));
6167
+ }, [sortedColumn, tableContext]);
6168
+ const getCurrentSortValue = React.useCallback(() => {
6169
+ if (!sortable || !sortOrder) {
6170
+ return 'none';
6171
+ }
6172
+ if (sortOrder === SortDirection.ASC) {
6173
+ return 'ascending';
6174
+ }
6175
+ return 'descending';
6176
+ }, [sortable, sortOrder]);
6177
+ React.useEffect(() => {
6178
+ setSortable(!disableSort && !!tableContext.onSort);
6179
+ }, [disableSort, tableContext.onSort]);
6180
+ React.useEffect(() => {
6181
+ setSortedColumn(tableContext.tableState.sortedColumn);
6182
+ }, [tableContext.tableState.sortedColumn]);
6183
+ React.useEffect(() => {
6184
+ if (sortDirection && tableContext.onSort) {
6185
+ tableContext.setTableState(Object.assign(Object.assign({}, tableContext.tableState), {
6186
+ sortedColumn: {
6187
+ accessor,
6188
+ sortDirection
6189
+ }
6190
+ }));
6191
+ }
6192
+ }, [sortDirection, tableContext.onSort]);
6193
+ React.useEffect(() => {
6194
+ setSortOrder(sortable && (sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.accessor) === accessor ? sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.sortDirection : null);
6195
+ }, [sortable, sortedColumn]);
6196
+ return jsx("th", Object.assign({
6197
+ className: classNames(className, {
6198
+ 'sg-sortable': sortable
6199
+ }),
6200
+ onClick: sortable ? onSort : onClick,
6201
+ ref: ref,
6202
+ "aria-sort": getCurrentSortValue()
6203
+ }, props, {
6204
+ children: sortable ? jsxs("button", Object.assign({
6205
+ className: "sg-table-sort"
6206
+ }, {
6207
+ children: [" ", children]
6208
+ })) : children
6209
+ }));
6210
+ });
6211
+ TableHeaderCell.displayName = 'TableHeaderCell';
6212
+
6213
+ const angleDown = jsx("svg", Object.assign({
6214
+ xmlns: "http://www.w3.org/2000/svg",
6215
+ viewBox: "0 0 256 512"
6216
+ }, {
6217
+ children: jsx("path", {
6218
+ d: "M119.5 326.9L3.5 209.1c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0L128 287.3l100.4-102.2c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L136.5 327c-4.7 4.6-12.3 4.6-17-.1z"
6219
+ })
6220
+ }));
6221
+ const angleRightIcon = jsx("svg", Object.assign({
6222
+ name: "angle-right",
6223
+ xmlns: "http://www.w3.org/2000/svg",
6224
+ viewBox: "0 0 192 512"
6225
+ }, {
6226
+ children: jsx("path", {
6227
+ d: "M166.9 264.5l-117.8 116c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17L127.3 256 25.1 155.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0l117.8 116c4.6 4.7 4.6 12.3-.1 17z"
6228
+ })
6229
+ }));
6230
+ const TableRow = /*#__PURE__*/React.forwardRef((_a, ref) => {
6231
+ var _b;
6232
+ var {
6233
+ className,
6234
+ isHeaderRow,
6235
+ hideSelect,
6236
+ uniqueKey,
6237
+ parentKey,
6238
+ checked = false,
6239
+ indeterminate = false,
6240
+ isSubRow = false,
6241
+ isExpanded = false,
6242
+ checkboxProps = {},
6243
+ collapseButtonProps = {}
6244
+ } = _a,
6245
+ props = __rest(_a, ["className", "isHeaderRow", "hideSelect", "uniqueKey", "parentKey", "checked", "indeterminate", "isSubRow", "isExpanded", "checkboxProps", "collapseButtonProps"]);
6246
+ const tableContext = useTableContext();
6247
+ const [uniqueId, setUniqueId] = React.useState(uniqueKey);
6248
+ const [isShown, setIsShown] = React.useState(false);
6249
+ const [expanded, setExpanded] = React.useState(isExpanded);
6250
+ const [isParentRow, setIsParentRow] = React.useState(isExpanded);
6251
+ const [columnProps, setColumnProps] = React.useState(null);
6252
+ const [expandedRows, setExpandedRows] = React.useState(((_b = tableContext.tableState) === null || _b === void 0 ? void 0 : _b.expandedRows) || []);
6253
+ const headerId = useId();
6254
+ /** initiate default expanded row */
6255
+ const initiateExpandedRows = React.useCallback(() => {
6256
+ const newExpandedRows = [...expandedRows];
6257
+ const expandedIndex = newExpandedRows.indexOf(uniqueId);
6258
+ if (isExpanded && expandedIndex === -1) {
6259
+ newExpandedRows.push(uniqueId);
6260
+ } else if (expandedIndex > -1) {
6261
+ const _expandedIndex = newExpandedRows.indexOf(uniqueId);
6262
+ newExpandedRows.splice(_expandedIndex, 1);
6263
+ }
6264
+ tableContext.setTableState(Object.assign(Object.assign({}, tableContext.tableState), {
6265
+ expandedRows: newExpandedRows
6266
+ }));
6267
+ setExpandedRows(newExpandedRows);
6268
+ }, [isExpanded, uniqueId]);
6269
+ React.useEffect(() => {
6270
+ setUniqueId(isHeaderRow ? 'all' : uniqueKey || headerId);
6271
+ }, [uniqueKey, isHeaderRow]);
6272
+ React.useEffect(() => {
6273
+ setExpandedRows(tableContext.tableState.expandedRows || []);
6274
+ }, [tableContext.tableState.expandedRows]);
6275
+ React.useEffect(() => {
6276
+ setExpanded(isExpanded);
6277
+ if (!isSubRow && !isHeaderRow && tableContext.onRowExpand) {
6278
+ initiateExpandedRows();
6279
+ }
6280
+ }, [isExpanded, initiateExpandedRows]);
6281
+ React.useEffect(() => {
6282
+ setColumnProps(isHeaderRow ? {
6283
+ disableSort: true
6284
+ } : null);
6285
+ }, [isHeaderRow]);
6286
+ React.useEffect(() => {
6287
+ setIsParentRow(!(isHeaderRow || isSubRow));
6288
+ }, [isHeaderRow, isSubRow]);
6289
+ React.useEffect(() => {
6290
+ if (tableContext.onRowExpand) {
6291
+ setIsShown(isSubRow && expandedRows.indexOf(parentKey) > -1);
6292
+ }
6293
+ }, [expandedRows]);
6294
+ const Cell = isHeaderRow ? TableHeaderCell : TableCell;
6295
+ return jsxs("tr", Object.assign({}, props, {
6296
+ ref: ref,
6297
+ className: classNames(className, {
6298
+ 'sub-row': isSubRow,
6299
+ expanded: isExpanded,
6300
+ collapsible: isParentRow && !!tableContext.onRowExpand,
6301
+ show: isShown
6302
+ })
6303
+ }, {
6304
+ children: [!!tableContext.onRowExpand && jsx(Cell, Object.assign({}, columnProps, {
6305
+ className: classNames({
6306
+ 'collapse-control': isParentRow
6307
+ })
6308
+ }, {
6309
+ children: isParentRow && jsx("button", Object.assign({}, collapseButtonProps, {
6310
+ className: classNames('collapse-btn', collapseButtonProps.className),
6311
+ onClick: () => {
6312
+ var _a;
6313
+ return (_a = tableContext === null || tableContext === void 0 ? void 0 : tableContext.onRowExpand) === null || _a === void 0 ? void 0 : _a.call(tableContext, !isExpanded, uniqueId);
6314
+ }
6315
+ }, {
6316
+ children: jsx("div", Object.assign({
6317
+ className: "icon-holder"
6318
+ }, {
6319
+ children: expanded ? angleDown : angleRightIcon
6320
+ }))
6321
+ }))
6322
+ })), !!tableContext.onRowSelect && jsx(Cell, Object.assign({}, columnProps, {
6323
+ className: classNames({
6324
+ 'select-control': !(hideSelect || isSubRow)
6325
+ })
6326
+ }, {
6327
+ children: !(hideSelect || isSubRow) && jsxs("label", Object.assign({
6328
+ className: "form-control p-0"
6329
+ }, {
6330
+ children: [jsx("input", {
6331
+ type: "checkbox",
6332
+ checked: checked,
6333
+ ref: input => {
6334
+ if (input) {
6335
+ input.indeterminate = indeterminate && !checked;
6336
+ }
6337
+ },
6338
+ name: `tb_checkbox_${uniqueId}`,
6339
+ id: `tb_checkbox_${uniqueId}`,
6340
+ onChange: event => {
6341
+ var _a;
6342
+ return (_a = tableContext === null || tableContext === void 0 ? void 0 : tableContext.onRowSelect) === null || _a === void 0 ? void 0 : _a.call(tableContext, event, uniqueId);
6343
+ }
6344
+ }), jsx("i", {
6345
+ className: "m-0"
6346
+ })]
6347
+ }))
6348
+ })), props.children]
6349
+ }));
6350
+ });
6351
+ TableRow.displayName = 'TableRow';
6352
+
6353
+ const Table = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef((_a, ref) => {
6354
+ var {
6355
+ onRowSelect,
6356
+ onRowExpand,
6357
+ onSort,
6358
+ sortedColumn = null,
6359
+ className
6360
+ } = _a,
6361
+ props = __rest(_a, ["onRowSelect", "onRowExpand", "onSort", "sortedColumn", "className"]);
6362
+ const [tableState, setTableState] = React.useState({
6363
+ expandedRows: [],
6364
+ sortedColumn
6365
+ });
6366
+ return jsx(TableContext.Provider, Object.assign({
6367
+ value: {
6368
+ tableState,
6369
+ onSort,
6370
+ onRowSelect,
6371
+ onRowExpand,
6372
+ setTableState
6373
+ }
6374
+ }, {
6375
+ children: jsx("table", Object.assign({}, props, {
6376
+ className: classNames('table', className),
6377
+ ref: ref
6378
+ }))
6379
+ }));
6380
+ }));
6381
+
6382
+ export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, ContextMenu, CoreDatepicker, CoreDropdown, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, InPageWizardStepCard, Input, Link, List$1 as List, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, SortDirection, Stepper, Tab, Table, TableBody, TableCell, TableContext, TableHeader, TableHeaderCell, TableRow, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList, filterArrayByColumns, onRowSelect, paginate, searchTextByColumns, sortArray, sumCols, useTableContext };