@sebgroup/green-react 0.1.0

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.
Files changed (42) hide show
  1. package/README.md +61 -0
  2. package/index.d.ts +13 -0
  3. package/index.esm.js +3235 -0
  4. package/index.umd.js +3269 -0
  5. package/lib/accordion/accordion-item.d.ts +17 -0
  6. package/lib/accordion/accordion.d.ts +6 -0
  7. package/lib/alert-ribbon/alert-ribbon.d.ts +16 -0
  8. package/lib/badge/badge.d.ts +12 -0
  9. package/lib/card/card.d.ts +8 -0
  10. package/lib/datepicker/datepicker.d.ts +2 -0
  11. package/lib/datepicker/hook.d.ts +12 -0
  12. package/lib/dropdown/dropdown.d.ts +6 -0
  13. package/lib/dropdown/hooks.d.ts +29 -0
  14. package/lib/form/button/button.d.ts +13 -0
  15. package/lib/form/buttonGroup/buttonGroup.d.ts +10 -0
  16. package/lib/form/form.d.ts +10 -0
  17. package/lib/form/formContext.d.ts +13 -0
  18. package/lib/form/formItems.d.ts +9 -0
  19. package/lib/form/group/group.d.ts +9 -0
  20. package/lib/form/index.d.ts +8 -0
  21. package/lib/form/input/input.d.ts +11 -0
  22. package/lib/form/radioButton/radioGroup.d.ts +13 -0
  23. package/lib/form/text/text.d.ts +6 -0
  24. package/lib/form/types.d.ts +23 -0
  25. package/lib/form/useInput.d.ts +5 -0
  26. package/lib/form/validateInput.d.ts +9 -0
  27. package/lib/icons/check.d.ts +1 -0
  28. package/lib/icons/index.d.ts +3 -0
  29. package/lib/icons/square-exclamation.d.ts +1 -0
  30. package/lib/icons/square-info.d.ts +1 -0
  31. package/lib/layout/flexbox/flexbox.d.ts +13 -0
  32. package/lib/layout/flexbox/types.d.ts +5 -0
  33. package/lib/layout/index.d.ts +1 -0
  34. package/lib/link/link.d.ts +7 -0
  35. package/lib/list/list.d.ts +14 -0
  36. package/lib/list/listItem.d.ts +10 -0
  37. package/lib/modal/modal.d.ts +17 -0
  38. package/lib/navbar/navbar.d.ts +12 -0
  39. package/lib/stepper/hook.d.ts +3 -0
  40. package/lib/stepper/stepper.d.ts +9 -0
  41. package/lib/tabs/tabs.d.ts +13 -0
  42. package/package.json +31 -0
package/index.umd.js ADDED
@@ -0,0 +1,3269 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('react'), require('@sebgroup/extract')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'react', '@sebgroup/extract'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.jsxRuntime, global.React, global.extract));
5
+ })(this, (function (exports, jsxRuntime, React, extract) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
12
+
13
+ var check = function (it) {
14
+ return it && it.Math == Math && it;
15
+ };
16
+
17
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
18
+ var global$r =
19
+ // eslint-disable-next-line es-x/no-global-this -- safe
20
+ check(typeof globalThis == 'object' && globalThis) ||
21
+ check(typeof window == 'object' && window) ||
22
+ // eslint-disable-next-line no-restricted-globals -- safe
23
+ check(typeof self == 'object' && self) ||
24
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
25
+ // eslint-disable-next-line no-new-func -- fallback
26
+ (function () { return this; })() || Function('return this')();
27
+
28
+ var objectGetOwnPropertyDescriptor = {};
29
+
30
+ var fails$a = function (exec) {
31
+ try {
32
+ return !!exec();
33
+ } catch (error) {
34
+ return true;
35
+ }
36
+ };
37
+
38
+ var fails$9 = fails$a;
39
+
40
+ // Detect IE8's incomplete defineProperty implementation
41
+ var descriptors = !fails$9(function () {
42
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
43
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
44
+ });
45
+
46
+ var fails$8 = fails$a;
47
+
48
+ var functionBindNative = !fails$8(function () {
49
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
50
+ var test = (function () { /* empty */ }).bind();
51
+ // eslint-disable-next-line no-prototype-builtins -- safe
52
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
53
+ });
54
+
55
+ var NATIVE_BIND$1 = functionBindNative;
56
+
57
+ var call$6 = Function.prototype.call;
58
+
59
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
60
+ return call$6.apply(call$6, arguments);
61
+ };
62
+
63
+ var objectPropertyIsEnumerable = {};
64
+
65
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
66
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
67
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
68
+
69
+ // Nashorn ~ JDK8 bug
70
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
71
+
72
+ // `Object.prototype.propertyIsEnumerable` method implementation
73
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
74
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
75
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
76
+ return !!descriptor && descriptor.enumerable;
77
+ } : $propertyIsEnumerable;
78
+
79
+ var createPropertyDescriptor$3 = function (bitmap, value) {
80
+ return {
81
+ enumerable: !(bitmap & 1),
82
+ configurable: !(bitmap & 2),
83
+ writable: !(bitmap & 4),
84
+ value: value
85
+ };
86
+ };
87
+
88
+ var NATIVE_BIND = functionBindNative;
89
+
90
+ var FunctionPrototype$1 = Function.prototype;
91
+ var bind = FunctionPrototype$1.bind;
92
+ var call$5 = FunctionPrototype$1.call;
93
+ var uncurryThis$c = NATIVE_BIND && bind.bind(call$5, call$5);
94
+
95
+ var functionUncurryThis = NATIVE_BIND ? function (fn) {
96
+ return fn && uncurryThis$c(fn);
97
+ } : function (fn) {
98
+ return fn && function () {
99
+ return call$5.apply(fn, arguments);
100
+ };
101
+ };
102
+
103
+ var uncurryThis$b = functionUncurryThis;
104
+
105
+ var toString$3 = uncurryThis$b({}.toString);
106
+ var stringSlice$1 = uncurryThis$b(''.slice);
107
+
108
+ var classofRaw$1 = function (it) {
109
+ return stringSlice$1(toString$3(it), 8, -1);
110
+ };
111
+
112
+ var global$q = global$r;
113
+ var uncurryThis$a = functionUncurryThis;
114
+ var fails$7 = fails$a;
115
+ var classof$2 = classofRaw$1;
116
+
117
+ var Object$5 = global$q.Object;
118
+ var split = uncurryThis$a(''.split);
119
+
120
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
121
+ var indexedObject = fails$7(function () {
122
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
123
+ // eslint-disable-next-line no-prototype-builtins -- safe
124
+ return !Object$5('z').propertyIsEnumerable(0);
125
+ }) ? function (it) {
126
+ return classof$2(it) == 'String' ? split(it, '') : Object$5(it);
127
+ } : Object$5;
128
+
129
+ var global$p = global$r;
130
+
131
+ var TypeError$8 = global$p.TypeError;
132
+
133
+ // `RequireObjectCoercible` abstract operation
134
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
135
+ var requireObjectCoercible$2 = function (it) {
136
+ if (it == undefined) throw TypeError$8("Can't call method on " + it);
137
+ return it;
138
+ };
139
+
140
+ // toObject with fallback for non-array-like ES3 strings
141
+ var IndexedObject$1 = indexedObject;
142
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
143
+
144
+ var toIndexedObject$5 = function (it) {
145
+ return IndexedObject$1(requireObjectCoercible$1(it));
146
+ };
147
+
148
+ // `IsCallable` abstract operation
149
+ // https://tc39.es/ecma262/#sec-iscallable
150
+ var isCallable$f = function (argument) {
151
+ return typeof argument == 'function';
152
+ };
153
+
154
+ var isCallable$e = isCallable$f;
155
+
156
+ var isObject$5 = function (it) {
157
+ return typeof it == 'object' ? it !== null : isCallable$e(it);
158
+ };
159
+
160
+ var global$o = global$r;
161
+ var isCallable$d = isCallable$f;
162
+
163
+ var aFunction = function (argument) {
164
+ return isCallable$d(argument) ? argument : undefined;
165
+ };
166
+
167
+ var getBuiltIn$4 = function (namespace, method) {
168
+ return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
169
+ };
170
+
171
+ var uncurryThis$9 = functionUncurryThis;
172
+
173
+ var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
174
+
175
+ var getBuiltIn$3 = getBuiltIn$4;
176
+
177
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
178
+
179
+ var global$n = global$r;
180
+ var userAgent = engineUserAgent;
181
+
182
+ var process = global$n.process;
183
+ var Deno = global$n.Deno;
184
+ var versions = process && process.versions || Deno && Deno.version;
185
+ var v8 = versions && versions.v8;
186
+ var match, version;
187
+
188
+ if (v8) {
189
+ match = v8.split('.');
190
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
191
+ // but their correct versions are not interesting for us
192
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
193
+ }
194
+
195
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
196
+ // so check `userAgent` even if `.v8` exists, but 0
197
+ if (!version && userAgent) {
198
+ match = userAgent.match(/Edge\/(\d+)/);
199
+ if (!match || match[1] >= 74) {
200
+ match = userAgent.match(/Chrome\/(\d+)/);
201
+ if (match) version = +match[1];
202
+ }
203
+ }
204
+
205
+ var engineV8Version = version;
206
+
207
+ /* eslint-disable es-x/no-symbol -- required for testing */
208
+
209
+ var V8_VERSION = engineV8Version;
210
+ var fails$6 = fails$a;
211
+
212
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
213
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
214
+ var symbol = Symbol();
215
+ // Chrome 38 Symbol has incorrect toString conversion
216
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
217
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
218
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
219
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
220
+ });
221
+
222
+ /* eslint-disable es-x/no-symbol -- required for testing */
223
+
224
+ var NATIVE_SYMBOL$2 = nativeSymbol;
225
+
226
+ var useSymbolAsUid = NATIVE_SYMBOL$2
227
+ && !Symbol.sham
228
+ && typeof Symbol.iterator == 'symbol';
229
+
230
+ var global$m = global$r;
231
+ var getBuiltIn$2 = getBuiltIn$4;
232
+ var isCallable$c = isCallable$f;
233
+ var isPrototypeOf$1 = objectIsPrototypeOf;
234
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
235
+
236
+ var Object$4 = global$m.Object;
237
+
238
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
239
+ return typeof it == 'symbol';
240
+ } : function (it) {
241
+ var $Symbol = getBuiltIn$2('Symbol');
242
+ return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, Object$4(it));
243
+ };
244
+
245
+ var global$l = global$r;
246
+
247
+ var String$4 = global$l.String;
248
+
249
+ var tryToString$1 = function (argument) {
250
+ try {
251
+ return String$4(argument);
252
+ } catch (error) {
253
+ return 'Object';
254
+ }
255
+ };
256
+
257
+ var global$k = global$r;
258
+ var isCallable$b = isCallable$f;
259
+ var tryToString = tryToString$1;
260
+
261
+ var TypeError$7 = global$k.TypeError;
262
+
263
+ // `Assert: IsCallable(argument) is true`
264
+ var aCallable$1 = function (argument) {
265
+ if (isCallable$b(argument)) return argument;
266
+ throw TypeError$7(tryToString(argument) + ' is not a function');
267
+ };
268
+
269
+ var aCallable = aCallable$1;
270
+
271
+ // `GetMethod` abstract operation
272
+ // https://tc39.es/ecma262/#sec-getmethod
273
+ var getMethod$1 = function (V, P) {
274
+ var func = V[P];
275
+ return func == null ? undefined : aCallable(func);
276
+ };
277
+
278
+ var global$j = global$r;
279
+ var call$4 = functionCall;
280
+ var isCallable$a = isCallable$f;
281
+ var isObject$4 = isObject$5;
282
+
283
+ var TypeError$6 = global$j.TypeError;
284
+
285
+ // `OrdinaryToPrimitive` abstract operation
286
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
287
+ var ordinaryToPrimitive$1 = function (input, pref) {
288
+ var fn, val;
289
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$4(fn, input))) return val;
290
+ if (isCallable$a(fn = input.valueOf) && !isObject$4(val = call$4(fn, input))) return val;
291
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$4(fn, input))) return val;
292
+ throw TypeError$6("Can't convert object to primitive value");
293
+ };
294
+
295
+ var shared$3 = {exports: {}};
296
+
297
+ var global$i = global$r;
298
+
299
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
300
+ var defineProperty$4 = Object.defineProperty;
301
+
302
+ var setGlobal$3 = function (key, value) {
303
+ try {
304
+ defineProperty$4(global$i, key, { value: value, configurable: true, writable: true });
305
+ } catch (error) {
306
+ global$i[key] = value;
307
+ } return value;
308
+ };
309
+
310
+ var global$h = global$r;
311
+ var setGlobal$2 = setGlobal$3;
312
+
313
+ var SHARED = '__core-js_shared__';
314
+ var store$3 = global$h[SHARED] || setGlobal$2(SHARED, {});
315
+
316
+ var sharedStore = store$3;
317
+
318
+ var store$2 = sharedStore;
319
+
320
+ (shared$3.exports = function (key, value) {
321
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
322
+ })('versions', []).push({
323
+ version: '3.22.2',
324
+ mode: 'global',
325
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
326
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE',
327
+ source: 'https://github.com/zloirock/core-js'
328
+ });
329
+
330
+ var global$g = global$r;
331
+ var requireObjectCoercible = requireObjectCoercible$2;
332
+
333
+ var Object$3 = global$g.Object;
334
+
335
+ // `ToObject` abstract operation
336
+ // https://tc39.es/ecma262/#sec-toobject
337
+ var toObject$3 = function (argument) {
338
+ return Object$3(requireObjectCoercible(argument));
339
+ };
340
+
341
+ var uncurryThis$8 = functionUncurryThis;
342
+ var toObject$2 = toObject$3;
343
+
344
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
345
+
346
+ // `HasOwnProperty` abstract operation
347
+ // https://tc39.es/ecma262/#sec-hasownproperty
348
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
349
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
350
+ return hasOwnProperty(toObject$2(it), key);
351
+ };
352
+
353
+ var uncurryThis$7 = functionUncurryThis;
354
+
355
+ var id = 0;
356
+ var postfix = Math.random();
357
+ var toString$2 = uncurryThis$7(1.0.toString);
358
+
359
+ var uid$2 = function (key) {
360
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
361
+ };
362
+
363
+ var global$f = global$r;
364
+ var shared$2 = shared$3.exports;
365
+ var hasOwn$9 = hasOwnProperty_1;
366
+ var uid$1 = uid$2;
367
+ var NATIVE_SYMBOL$1 = nativeSymbol;
368
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
369
+
370
+ var WellKnownSymbolsStore = shared$2('wks');
371
+ var Symbol$1 = global$f.Symbol;
372
+ var symbolFor = Symbol$1 && Symbol$1['for'];
373
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
374
+
375
+ var wellKnownSymbol$8 = function (name) {
376
+ if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL$1 || typeof WellKnownSymbolsStore[name] == 'string')) {
377
+ var description = 'Symbol.' + name;
378
+ if (NATIVE_SYMBOL$1 && hasOwn$9(Symbol$1, name)) {
379
+ WellKnownSymbolsStore[name] = Symbol$1[name];
380
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
381
+ WellKnownSymbolsStore[name] = symbolFor(description);
382
+ } else {
383
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
384
+ }
385
+ } return WellKnownSymbolsStore[name];
386
+ };
387
+
388
+ var global$e = global$r;
389
+ var call$3 = functionCall;
390
+ var isObject$3 = isObject$5;
391
+ var isSymbol$1 = isSymbol$2;
392
+ var getMethod = getMethod$1;
393
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
394
+ var wellKnownSymbol$7 = wellKnownSymbol$8;
395
+
396
+ var TypeError$5 = global$e.TypeError;
397
+ var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
398
+
399
+ // `ToPrimitive` abstract operation
400
+ // https://tc39.es/ecma262/#sec-toprimitive
401
+ var toPrimitive$1 = function (input, pref) {
402
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
403
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
404
+ var result;
405
+ if (exoticToPrim) {
406
+ if (pref === undefined) pref = 'default';
407
+ result = call$3(exoticToPrim, input, pref);
408
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
409
+ throw TypeError$5("Can't convert object to primitive value");
410
+ }
411
+ if (pref === undefined) pref = 'number';
412
+ return ordinaryToPrimitive(input, pref);
413
+ };
414
+
415
+ var toPrimitive = toPrimitive$1;
416
+ var isSymbol = isSymbol$2;
417
+
418
+ // `ToPropertyKey` abstract operation
419
+ // https://tc39.es/ecma262/#sec-topropertykey
420
+ var toPropertyKey$2 = function (argument) {
421
+ var key = toPrimitive(argument, 'string');
422
+ return isSymbol(key) ? key : key + '';
423
+ };
424
+
425
+ var global$d = global$r;
426
+ var isObject$2 = isObject$5;
427
+
428
+ var document$1 = global$d.document;
429
+ // typeof document.createElement is 'object' in old IE
430
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
431
+
432
+ var documentCreateElement$2 = function (it) {
433
+ return EXISTS$1 ? document$1.createElement(it) : {};
434
+ };
435
+
436
+ var DESCRIPTORS$9 = descriptors;
437
+ var fails$5 = fails$a;
438
+ var createElement = documentCreateElement$2;
439
+
440
+ // Thanks to IE8 for its funny defineProperty
441
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$5(function () {
442
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
443
+ return Object.defineProperty(createElement('div'), 'a', {
444
+ get: function () { return 7; }
445
+ }).a != 7;
446
+ });
447
+
448
+ var DESCRIPTORS$8 = descriptors;
449
+ var call$2 = functionCall;
450
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
451
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
452
+ var toIndexedObject$4 = toIndexedObject$5;
453
+ var toPropertyKey$1 = toPropertyKey$2;
454
+ var hasOwn$8 = hasOwnProperty_1;
455
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
456
+
457
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
458
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
459
+
460
+ // `Object.getOwnPropertyDescriptor` method
461
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
462
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
463
+ O = toIndexedObject$4(O);
464
+ P = toPropertyKey$1(P);
465
+ if (IE8_DOM_DEFINE$1) try {
466
+ return $getOwnPropertyDescriptor$1(O, P);
467
+ } catch (error) { /* empty */ }
468
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
469
+ };
470
+
471
+ var objectDefineProperty = {};
472
+
473
+ var DESCRIPTORS$7 = descriptors;
474
+ var fails$4 = fails$a;
475
+
476
+ // V8 ~ Chrome 36-
477
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
478
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$4(function () {
479
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
480
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
481
+ value: 42,
482
+ writable: false
483
+ }).prototype != 42;
484
+ });
485
+
486
+ var global$c = global$r;
487
+ var isObject$1 = isObject$5;
488
+
489
+ var String$3 = global$c.String;
490
+ var TypeError$4 = global$c.TypeError;
491
+
492
+ // `Assert: Type(argument) is Object`
493
+ var anObject$5 = function (argument) {
494
+ if (isObject$1(argument)) return argument;
495
+ throw TypeError$4(String$3(argument) + ' is not an object');
496
+ };
497
+
498
+ var global$b = global$r;
499
+ var DESCRIPTORS$6 = descriptors;
500
+ var IE8_DOM_DEFINE = ie8DomDefine;
501
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
502
+ var anObject$4 = anObject$5;
503
+ var toPropertyKey = toPropertyKey$2;
504
+
505
+ var TypeError$3 = global$b.TypeError;
506
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
507
+ var $defineProperty = Object.defineProperty;
508
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
509
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
510
+ var ENUMERABLE = 'enumerable';
511
+ var CONFIGURABLE$1 = 'configurable';
512
+ var WRITABLE = 'writable';
513
+
514
+ // `Object.defineProperty` method
515
+ // https://tc39.es/ecma262/#sec-object.defineproperty
516
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
517
+ anObject$4(O);
518
+ P = toPropertyKey(P);
519
+ anObject$4(Attributes);
520
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
521
+ var current = $getOwnPropertyDescriptor(O, P);
522
+ if (current && current[WRITABLE]) {
523
+ O[P] = Attributes.value;
524
+ Attributes = {
525
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
526
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
527
+ writable: false
528
+ };
529
+ }
530
+ } return $defineProperty(O, P, Attributes);
531
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
532
+ anObject$4(O);
533
+ P = toPropertyKey(P);
534
+ anObject$4(Attributes);
535
+ if (IE8_DOM_DEFINE) try {
536
+ return $defineProperty(O, P, Attributes);
537
+ } catch (error) { /* empty */ }
538
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
539
+ if ('value' in Attributes) O[P] = Attributes.value;
540
+ return O;
541
+ };
542
+
543
+ var DESCRIPTORS$5 = descriptors;
544
+ var definePropertyModule$3 = objectDefineProperty;
545
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
546
+
547
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
548
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
549
+ } : function (object, key, value) {
550
+ object[key] = value;
551
+ return object;
552
+ };
553
+
554
+ var redefine$3 = {exports: {}};
555
+
556
+ var uncurryThis$6 = functionUncurryThis;
557
+ var isCallable$9 = isCallable$f;
558
+ var store$1 = sharedStore;
559
+
560
+ var functionToString = uncurryThis$6(Function.toString);
561
+
562
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
563
+ if (!isCallable$9(store$1.inspectSource)) {
564
+ store$1.inspectSource = function (it) {
565
+ return functionToString(it);
566
+ };
567
+ }
568
+
569
+ var inspectSource$2 = store$1.inspectSource;
570
+
571
+ var global$a = global$r;
572
+ var isCallable$8 = isCallable$f;
573
+ var inspectSource$1 = inspectSource$2;
574
+
575
+ var WeakMap$1 = global$a.WeakMap;
576
+
577
+ var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
578
+
579
+ var shared$1 = shared$3.exports;
580
+ var uid = uid$2;
581
+
582
+ var keys = shared$1('keys');
583
+
584
+ var sharedKey$3 = function (key) {
585
+ return keys[key] || (keys[key] = uid(key));
586
+ };
587
+
588
+ var hiddenKeys$4 = {};
589
+
590
+ var NATIVE_WEAK_MAP = nativeWeakMap;
591
+ var global$9 = global$r;
592
+ var uncurryThis$5 = functionUncurryThis;
593
+ var isObject = isObject$5;
594
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
595
+ var hasOwn$7 = hasOwnProperty_1;
596
+ var shared = sharedStore;
597
+ var sharedKey$2 = sharedKey$3;
598
+ var hiddenKeys$3 = hiddenKeys$4;
599
+
600
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
601
+ var TypeError$2 = global$9.TypeError;
602
+ var WeakMap = global$9.WeakMap;
603
+ var set, get, has;
604
+
605
+ var enforce = function (it) {
606
+ return has(it) ? get(it) : set(it, {});
607
+ };
608
+
609
+ var getterFor = function (TYPE) {
610
+ return function (it) {
611
+ var state;
612
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
613
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
614
+ } return state;
615
+ };
616
+ };
617
+
618
+ if (NATIVE_WEAK_MAP || shared.state) {
619
+ var store = shared.state || (shared.state = new WeakMap());
620
+ var wmget = uncurryThis$5(store.get);
621
+ var wmhas = uncurryThis$5(store.has);
622
+ var wmset = uncurryThis$5(store.set);
623
+ set = function (it, metadata) {
624
+ if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
625
+ metadata.facade = it;
626
+ wmset(store, it, metadata);
627
+ return metadata;
628
+ };
629
+ get = function (it) {
630
+ return wmget(store, it) || {};
631
+ };
632
+ has = function (it) {
633
+ return wmhas(store, it);
634
+ };
635
+ } else {
636
+ var STATE = sharedKey$2('state');
637
+ hiddenKeys$3[STATE] = true;
638
+ set = function (it, metadata) {
639
+ if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
640
+ metadata.facade = it;
641
+ createNonEnumerableProperty$4(it, STATE, metadata);
642
+ return metadata;
643
+ };
644
+ get = function (it) {
645
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
646
+ };
647
+ has = function (it) {
648
+ return hasOwn$7(it, STATE);
649
+ };
650
+ }
651
+
652
+ var internalState = {
653
+ set: set,
654
+ get: get,
655
+ has: has,
656
+ enforce: enforce,
657
+ getterFor: getterFor
658
+ };
659
+
660
+ var DESCRIPTORS$4 = descriptors;
661
+ var hasOwn$6 = hasOwnProperty_1;
662
+
663
+ var FunctionPrototype = Function.prototype;
664
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
665
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
666
+
667
+ var EXISTS = hasOwn$6(FunctionPrototype, 'name');
668
+ // additional protection from minified / mangled / dropped function names
669
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
670
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
671
+
672
+ var functionName = {
673
+ EXISTS: EXISTS,
674
+ PROPER: PROPER,
675
+ CONFIGURABLE: CONFIGURABLE
676
+ };
677
+
678
+ var global$8 = global$r;
679
+ var isCallable$7 = isCallable$f;
680
+ var hasOwn$5 = hasOwnProperty_1;
681
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
682
+ var setGlobal$1 = setGlobal$3;
683
+ var inspectSource = inspectSource$2;
684
+ var InternalStateModule$1 = internalState;
685
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
686
+
687
+ var getInternalState$1 = InternalStateModule$1.get;
688
+ var enforceInternalState = InternalStateModule$1.enforce;
689
+ var TEMPLATE = String(String).split('String');
690
+
691
+ (redefine$3.exports = function (O, key, value, options) {
692
+ var unsafe = options ? !!options.unsafe : false;
693
+ var simple = options ? !!options.enumerable : false;
694
+ var noTargetGet = options ? !!options.noTargetGet : false;
695
+ var name = options && options.name !== undefined ? options.name : key;
696
+ var state;
697
+ if (isCallable$7(value)) {
698
+ if (String(name).slice(0, 7) === 'Symbol(') {
699
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
700
+ }
701
+ if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
702
+ createNonEnumerableProperty$3(value, 'name', name);
703
+ }
704
+ state = enforceInternalState(value);
705
+ if (!state.source) {
706
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
707
+ }
708
+ }
709
+ if (O === global$8) {
710
+ if (simple) O[key] = value;
711
+ else setGlobal$1(key, value);
712
+ return;
713
+ } else if (!unsafe) {
714
+ delete O[key];
715
+ } else if (!noTargetGet && O[key]) {
716
+ simple = true;
717
+ }
718
+ if (simple) O[key] = value;
719
+ else createNonEnumerableProperty$3(O, key, value);
720
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
721
+ })(Function.prototype, 'toString', function toString() {
722
+ return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
723
+ });
724
+
725
+ var objectGetOwnPropertyNames = {};
726
+
727
+ var ceil = Math.ceil;
728
+ var floor = Math.floor;
729
+
730
+ // `ToIntegerOrInfinity` abstract operation
731
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
732
+ var toIntegerOrInfinity$2 = function (argument) {
733
+ var number = +argument;
734
+ // eslint-disable-next-line no-self-compare -- safe
735
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
736
+ };
737
+
738
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
739
+
740
+ var max = Math.max;
741
+ var min$1 = Math.min;
742
+
743
+ // Helper for a popular repeating case of the spec:
744
+ // Let integer be ? ToInteger(index).
745
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
746
+ var toAbsoluteIndex$1 = function (index, length) {
747
+ var integer = toIntegerOrInfinity$1(index);
748
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
749
+ };
750
+
751
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
752
+
753
+ var min = Math.min;
754
+
755
+ // `ToLength` abstract operation
756
+ // https://tc39.es/ecma262/#sec-tolength
757
+ var toLength$1 = function (argument) {
758
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
759
+ };
760
+
761
+ var toLength = toLength$1;
762
+
763
+ // `LengthOfArrayLike` abstract operation
764
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
765
+ var lengthOfArrayLike$1 = function (obj) {
766
+ return toLength(obj.length);
767
+ };
768
+
769
+ var toIndexedObject$3 = toIndexedObject$5;
770
+ var toAbsoluteIndex = toAbsoluteIndex$1;
771
+ var lengthOfArrayLike = lengthOfArrayLike$1;
772
+
773
+ // `Array.prototype.{ indexOf, includes }` methods implementation
774
+ var createMethod = function (IS_INCLUDES) {
775
+ return function ($this, el, fromIndex) {
776
+ var O = toIndexedObject$3($this);
777
+ var length = lengthOfArrayLike(O);
778
+ var index = toAbsoluteIndex(fromIndex, length);
779
+ var value;
780
+ // Array#includes uses SameValueZero equality algorithm
781
+ // eslint-disable-next-line no-self-compare -- NaN check
782
+ if (IS_INCLUDES && el != el) while (length > index) {
783
+ value = O[index++];
784
+ // eslint-disable-next-line no-self-compare -- NaN check
785
+ if (value != value) return true;
786
+ // Array#indexOf ignores holes, Array#includes - not
787
+ } else for (;length > index; index++) {
788
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
789
+ } return !IS_INCLUDES && -1;
790
+ };
791
+ };
792
+
793
+ var arrayIncludes = {
794
+ // `Array.prototype.includes` method
795
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
796
+ includes: createMethod(true),
797
+ // `Array.prototype.indexOf` method
798
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
799
+ indexOf: createMethod(false)
800
+ };
801
+
802
+ var uncurryThis$4 = functionUncurryThis;
803
+ var hasOwn$4 = hasOwnProperty_1;
804
+ var toIndexedObject$2 = toIndexedObject$5;
805
+ var indexOf = arrayIncludes.indexOf;
806
+ var hiddenKeys$2 = hiddenKeys$4;
807
+
808
+ var push = uncurryThis$4([].push);
809
+
810
+ var objectKeysInternal = function (object, names) {
811
+ var O = toIndexedObject$2(object);
812
+ var i = 0;
813
+ var result = [];
814
+ var key;
815
+ for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
816
+ // Don't enum bug & hidden keys
817
+ while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
818
+ ~indexOf(result, key) || push(result, key);
819
+ }
820
+ return result;
821
+ };
822
+
823
+ // IE8- don't enum bug keys
824
+ var enumBugKeys$3 = [
825
+ 'constructor',
826
+ 'hasOwnProperty',
827
+ 'isPrototypeOf',
828
+ 'propertyIsEnumerable',
829
+ 'toLocaleString',
830
+ 'toString',
831
+ 'valueOf'
832
+ ];
833
+
834
+ var internalObjectKeys$1 = objectKeysInternal;
835
+ var enumBugKeys$2 = enumBugKeys$3;
836
+
837
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
838
+
839
+ // `Object.getOwnPropertyNames` method
840
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
841
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
842
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
843
+ return internalObjectKeys$1(O, hiddenKeys$1);
844
+ };
845
+
846
+ var objectGetOwnPropertySymbols = {};
847
+
848
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
849
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
850
+
851
+ var getBuiltIn$1 = getBuiltIn$4;
852
+ var uncurryThis$3 = functionUncurryThis;
853
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
854
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
855
+ var anObject$3 = anObject$5;
856
+
857
+ var concat$1 = uncurryThis$3([].concat);
858
+
859
+ // all object keys, includes non-enumerable and symbols
860
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
861
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
862
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
863
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
864
+ };
865
+
866
+ var hasOwn$3 = hasOwnProperty_1;
867
+ var ownKeys = ownKeys$1;
868
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
869
+ var definePropertyModule$2 = objectDefineProperty;
870
+
871
+ var copyConstructorProperties$2 = function (target, source, exceptions) {
872
+ var keys = ownKeys(source);
873
+ var defineProperty = definePropertyModule$2.f;
874
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
875
+ for (var i = 0; i < keys.length; i++) {
876
+ var key = keys[i];
877
+ if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
878
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
879
+ }
880
+ }
881
+ };
882
+
883
+ var fails$3 = fails$a;
884
+ var isCallable$6 = isCallable$f;
885
+
886
+ var replacement = /#|\.prototype\./;
887
+
888
+ var isForced$1 = function (feature, detection) {
889
+ var value = data[normalize(feature)];
890
+ return value == POLYFILL ? true
891
+ : value == NATIVE ? false
892
+ : isCallable$6(detection) ? fails$3(detection)
893
+ : !!detection;
894
+ };
895
+
896
+ var normalize = isForced$1.normalize = function (string) {
897
+ return String(string).replace(replacement, '.').toLowerCase();
898
+ };
899
+
900
+ var data = isForced$1.data = {};
901
+ var NATIVE = isForced$1.NATIVE = 'N';
902
+ var POLYFILL = isForced$1.POLYFILL = 'P';
903
+
904
+ var isForced_1 = isForced$1;
905
+
906
+ var global$7 = global$r;
907
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
908
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
909
+ var redefine$2 = redefine$3.exports;
910
+ var setGlobal = setGlobal$3;
911
+ var copyConstructorProperties$1 = copyConstructorProperties$2;
912
+ var isForced = isForced_1;
913
+
914
+ /*
915
+ options.target - name of the target object
916
+ options.global - target is the global object
917
+ options.stat - export as static methods of target
918
+ options.proto - export as prototype methods of target
919
+ options.real - real prototype method for the `pure` version
920
+ options.forced - export even if the native feature is available
921
+ options.bind - bind methods to the target, required for the `pure` version
922
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
923
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
924
+ options.sham - add a flag to not completely full polyfills
925
+ options.enumerable - export as enumerable property
926
+ options.noTargetGet - prevent calling a getter on target
927
+ options.name - the .name of the function if it does not match the key
928
+ */
929
+ var _export = function (options, source) {
930
+ var TARGET = options.target;
931
+ var GLOBAL = options.global;
932
+ var STATIC = options.stat;
933
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
934
+ if (GLOBAL) {
935
+ target = global$7;
936
+ } else if (STATIC) {
937
+ target = global$7[TARGET] || setGlobal(TARGET, {});
938
+ } else {
939
+ target = (global$7[TARGET] || {}).prototype;
940
+ }
941
+ if (target) for (key in source) {
942
+ sourceProperty = source[key];
943
+ if (options.noTargetGet) {
944
+ descriptor = getOwnPropertyDescriptor(target, key);
945
+ targetProperty = descriptor && descriptor.value;
946
+ } else targetProperty = target[key];
947
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
948
+ // contained in target
949
+ if (!FORCED && targetProperty !== undefined) {
950
+ if (typeof sourceProperty == typeof targetProperty) continue;
951
+ copyConstructorProperties$1(sourceProperty, targetProperty);
952
+ }
953
+ // add a flag to not completely full polyfills
954
+ if (options.sham || (targetProperty && targetProperty.sham)) {
955
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
956
+ }
957
+ // extend global
958
+ redefine$2(target, key, sourceProperty, options);
959
+ }
960
+ };
961
+
962
+ var internalObjectKeys = objectKeysInternal;
963
+ var enumBugKeys$1 = enumBugKeys$3;
964
+
965
+ // `Object.keys` method
966
+ // https://tc39.es/ecma262/#sec-object.keys
967
+ // eslint-disable-next-line es-x/no-object-keys -- safe
968
+ var objectKeys$2 = Object.keys || function keys(O) {
969
+ return internalObjectKeys(O, enumBugKeys$1);
970
+ };
971
+
972
+ var DESCRIPTORS$3 = descriptors;
973
+ var uncurryThis$2 = functionUncurryThis;
974
+ var call$1 = functionCall;
975
+ var fails$2 = fails$a;
976
+ var objectKeys$1 = objectKeys$2;
977
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
978
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
979
+ var toObject$1 = toObject$3;
980
+ var IndexedObject = indexedObject;
981
+
982
+ // eslint-disable-next-line es-x/no-object-assign -- safe
983
+ var $assign = Object.assign;
984
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
985
+ var defineProperty$3 = Object.defineProperty;
986
+ var concat = uncurryThis$2([].concat);
987
+
988
+ // `Object.assign` method
989
+ // https://tc39.es/ecma262/#sec-object.assign
990
+ var objectAssign = !$assign || fails$2(function () {
991
+ // should have correct order of operations (Edge bug)
992
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
993
+ enumerable: true,
994
+ get: function () {
995
+ defineProperty$3(this, 'b', {
996
+ value: 3,
997
+ enumerable: false
998
+ });
999
+ }
1000
+ }), { b: 2 })).b !== 1) return true;
1001
+ // should work with symbols and should have deterministic property order (V8 bug)
1002
+ var A = {};
1003
+ var B = {};
1004
+ // eslint-disable-next-line es-x/no-symbol -- safe
1005
+ var symbol = Symbol();
1006
+ var alphabet = 'abcdefghijklmnopqrst';
1007
+ A[symbol] = 7;
1008
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1009
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1010
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1011
+ var T = toObject$1(target);
1012
+ var argumentsLength = arguments.length;
1013
+ var index = 1;
1014
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1015
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1016
+ while (argumentsLength > index) {
1017
+ var S = IndexedObject(arguments[index++]);
1018
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1019
+ var length = keys.length;
1020
+ var j = 0;
1021
+ var key;
1022
+ while (length > j) {
1023
+ key = keys[j++];
1024
+ if (!DESCRIPTORS$3 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1025
+ }
1026
+ } return T;
1027
+ } : $assign;
1028
+
1029
+ var $$2 = _export;
1030
+ var assign = objectAssign;
1031
+
1032
+ // `Object.assign` method
1033
+ // https://tc39.es/ecma262/#sec-object.assign
1034
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
1035
+ $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1036
+ assign: assign
1037
+ });
1038
+
1039
+ /******************************************************************************
1040
+ Copyright (c) Microsoft Corporation.
1041
+
1042
+ Permission to use, copy, modify, and/or distribute this software for any
1043
+ purpose with or without fee is hereby granted.
1044
+
1045
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1046
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1047
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1048
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1049
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1050
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1051
+ PERFORMANCE OF THIS SOFTWARE.
1052
+ ***************************************************************************** */
1053
+
1054
+ function __rest(s, e) {
1055
+ var t = {};
1056
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1057
+ t[p] = s[p];
1058
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1059
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1060
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1061
+ t[p[i]] = s[p[i]];
1062
+ }
1063
+ return t;
1064
+ }
1065
+
1066
+ function Button({
1067
+ children,
1068
+ variant,
1069
+ onClick,
1070
+ disabled,
1071
+ active = false,
1072
+ type = 'button',
1073
+ size
1074
+ }) {
1075
+ const props = {
1076
+ type,
1077
+ disabled
1078
+ };
1079
+ const classNames = [];
1080
+ if (variant) classNames.push(variant);
1081
+ if (active) classNames.push('active');
1082
+ if (size) classNames.push(size);
1083
+ if (classNames.length) props.className = classNames.join(' ');
1084
+ if (onClick) props.onClick = onClick;
1085
+ return jsxRuntime.jsx("button", Object.assign({}, props, {
1086
+ children: children
1087
+ }));
1088
+ }
1089
+
1090
+ const ModalHeader = ({
1091
+ header: _header = '',
1092
+ onClose
1093
+ }) => {
1094
+ const handleClose = event => {
1095
+ if (onClose) onClose(event);
1096
+ };
1097
+
1098
+ return jsxRuntime.jsxs("div", Object.assign({
1099
+ className: "header"
1100
+ }, {
1101
+ children: [jsxRuntime.jsx("h3", {
1102
+ children: _header
1103
+ }), jsxRuntime.jsxs("button", Object.assign({
1104
+ className: "close",
1105
+ onClick: handleClose
1106
+ }, {
1107
+ children: [jsxRuntime.jsx("span", Object.assign({
1108
+ className: "sr-only"
1109
+ }, {
1110
+ children: "Close"
1111
+ })), jsxRuntime.jsx("i", {})]
1112
+ }))]
1113
+ }));
1114
+ };
1115
+
1116
+ const ModalBody = ({
1117
+ children
1118
+ }) => {
1119
+ return jsxRuntime.jsx("div", Object.assign({
1120
+ className: "body"
1121
+ }, {
1122
+ children: children
1123
+ }));
1124
+ };
1125
+
1126
+ const ModalFooter = ({
1127
+ confirm,
1128
+ dismiss,
1129
+ onClose,
1130
+ onConfirm,
1131
+ onDismiss
1132
+ }) => {
1133
+ const handleConfirm = event => {
1134
+ if (onConfirm) onConfirm(event);
1135
+ if (onClose) onClose(event);
1136
+ };
1137
+
1138
+ const handleDismiss = event => {
1139
+ if (onDismiss) onDismiss(event);
1140
+ if (onClose) onClose(event);
1141
+ };
1142
+
1143
+ return jsxRuntime.jsxs("div", Object.assign({
1144
+ className: "footer"
1145
+ }, {
1146
+ children: [dismiss && jsxRuntime.jsx(Button, Object.assign({
1147
+ variant: "secondary",
1148
+ onClick: handleDismiss
1149
+ }, {
1150
+ children: dismiss
1151
+ })), confirm && jsxRuntime.jsx(Button, Object.assign({
1152
+ variant: "primary",
1153
+ onClick: handleConfirm
1154
+ }, {
1155
+ children: confirm
1156
+ }))]
1157
+ }));
1158
+ };
1159
+
1160
+ const Modal = _a => {
1161
+ var {
1162
+ type = 'default',
1163
+ isOpen
1164
+ } = _a,
1165
+ props = __rest(_a, ["type", "isOpen"]);
1166
+
1167
+ const modalContent = () => {
1168
+ switch (type) {
1169
+ case 'slideout':
1170
+ {
1171
+ return jsxRuntime.jsxs("aside", Object.assign({
1172
+ role: "dialog"
1173
+ }, {
1174
+ children: [jsxRuntime.jsx(ModalHeader, Object.assign({}, props)), jsxRuntime.jsx(ModalBody, Object.assign({}, props)), jsxRuntime.jsx(ModalFooter, Object.assign({}, props))]
1175
+ }));
1176
+ }
1177
+
1178
+ case 'takeover':
1179
+ {
1180
+ return jsxRuntime.jsxs("main", Object.assign({
1181
+ role: "dialog"
1182
+ }, {
1183
+ children: [jsxRuntime.jsx(ModalHeader, Object.assign({}, props)), jsxRuntime.jsx(ModalBody, Object.assign({}, props)), jsxRuntime.jsx(ModalFooter, Object.assign({}, props))]
1184
+ }));
1185
+ }
1186
+
1187
+ default:
1188
+ {
1189
+ return jsxRuntime.jsxs("section", Object.assign({
1190
+ role: "dialog"
1191
+ }, {
1192
+ children: [jsxRuntime.jsx(ModalHeader, Object.assign({}, props)), jsxRuntime.jsx(ModalBody, Object.assign({}, props)), jsxRuntime.jsx(ModalFooter, Object.assign({}, props))]
1193
+ }));
1194
+ }
1195
+ }
1196
+ };
1197
+
1198
+ return isOpen ? modalContent() : null;
1199
+ };
1200
+
1201
+ var objectDefineProperties = {};
1202
+
1203
+ var DESCRIPTORS$2 = descriptors;
1204
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1205
+ var definePropertyModule$1 = objectDefineProperty;
1206
+ var anObject$2 = anObject$5;
1207
+ var toIndexedObject$1 = toIndexedObject$5;
1208
+ var objectKeys = objectKeys$2;
1209
+
1210
+ // `Object.defineProperties` method
1211
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1212
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1213
+ objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1214
+ anObject$2(O);
1215
+ var props = toIndexedObject$1(Properties);
1216
+ var keys = objectKeys(Properties);
1217
+ var length = keys.length;
1218
+ var index = 0;
1219
+ var key;
1220
+ while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1221
+ return O;
1222
+ };
1223
+
1224
+ var getBuiltIn = getBuiltIn$4;
1225
+
1226
+ var html$1 = getBuiltIn('document', 'documentElement');
1227
+
1228
+ /* global ActiveXObject -- old IE, WSH */
1229
+
1230
+ var anObject$1 = anObject$5;
1231
+ var definePropertiesModule = objectDefineProperties;
1232
+ var enumBugKeys = enumBugKeys$3;
1233
+ var hiddenKeys = hiddenKeys$4;
1234
+ var html = html$1;
1235
+ var documentCreateElement$1 = documentCreateElement$2;
1236
+ var sharedKey$1 = sharedKey$3;
1237
+
1238
+ var GT = '>';
1239
+ var LT = '<';
1240
+ var PROTOTYPE = 'prototype';
1241
+ var SCRIPT = 'script';
1242
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1243
+
1244
+ var EmptyConstructor = function () { /* empty */ };
1245
+
1246
+ var scriptTag = function (content) {
1247
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1248
+ };
1249
+
1250
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1251
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1252
+ activeXDocument.write(scriptTag(''));
1253
+ activeXDocument.close();
1254
+ var temp = activeXDocument.parentWindow.Object;
1255
+ activeXDocument = null; // avoid memory leak
1256
+ return temp;
1257
+ };
1258
+
1259
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1260
+ var NullProtoObjectViaIFrame = function () {
1261
+ // Thrash, waste and sodomy: IE GC bug
1262
+ var iframe = documentCreateElement$1('iframe');
1263
+ var JS = 'java' + SCRIPT + ':';
1264
+ var iframeDocument;
1265
+ iframe.style.display = 'none';
1266
+ html.appendChild(iframe);
1267
+ // https://github.com/zloirock/core-js/issues/475
1268
+ iframe.src = String(JS);
1269
+ iframeDocument = iframe.contentWindow.document;
1270
+ iframeDocument.open();
1271
+ iframeDocument.write(scriptTag('document.F=Object'));
1272
+ iframeDocument.close();
1273
+ return iframeDocument.F;
1274
+ };
1275
+
1276
+ // Check for document.domain and active x support
1277
+ // No need to use active x approach when document.domain is not set
1278
+ // see https://github.com/es-shims/es5-shim/issues/150
1279
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1280
+ // avoid IE GC bug
1281
+ var activeXDocument;
1282
+ var NullProtoObject = function () {
1283
+ try {
1284
+ activeXDocument = new ActiveXObject('htmlfile');
1285
+ } catch (error) { /* ignore */ }
1286
+ NullProtoObject = typeof document != 'undefined'
1287
+ ? document.domain && activeXDocument
1288
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1289
+ : NullProtoObjectViaIFrame()
1290
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1291
+ var length = enumBugKeys.length;
1292
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1293
+ return NullProtoObject();
1294
+ };
1295
+
1296
+ hiddenKeys[IE_PROTO$1] = true;
1297
+
1298
+ // `Object.create` method
1299
+ // https://tc39.es/ecma262/#sec-object.create
1300
+ // eslint-disable-next-line es-x/no-object-create -- safe
1301
+ var objectCreate = Object.create || function create(O, Properties) {
1302
+ var result;
1303
+ if (O !== null) {
1304
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
1305
+ result = new EmptyConstructor();
1306
+ EmptyConstructor[PROTOTYPE] = null;
1307
+ // add "__proto__" for Object.getPrototypeOf polyfill
1308
+ result[IE_PROTO$1] = O;
1309
+ } else result = NullProtoObject();
1310
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1311
+ };
1312
+
1313
+ var wellKnownSymbol$6 = wellKnownSymbol$8;
1314
+ var create$1 = objectCreate;
1315
+ var definePropertyModule = objectDefineProperty;
1316
+
1317
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
1318
+ var ArrayPrototype = Array.prototype;
1319
+
1320
+ // Array.prototype[@@unscopables]
1321
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1322
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1323
+ definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
1324
+ configurable: true,
1325
+ value: create$1(null)
1326
+ });
1327
+ }
1328
+
1329
+ // add a key to Array.prototype[@@unscopables]
1330
+ var addToUnscopables$1 = function (key) {
1331
+ ArrayPrototype[UNSCOPABLES][key] = true;
1332
+ };
1333
+
1334
+ var iterators = {};
1335
+
1336
+ var fails$1 = fails$a;
1337
+
1338
+ var correctPrototypeGetter = !fails$1(function () {
1339
+ function F() { /* empty */ }
1340
+ F.prototype.constructor = null;
1341
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
1342
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1343
+ });
1344
+
1345
+ var global$6 = global$r;
1346
+ var hasOwn$2 = hasOwnProperty_1;
1347
+ var isCallable$5 = isCallable$f;
1348
+ var toObject = toObject$3;
1349
+ var sharedKey = sharedKey$3;
1350
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1351
+
1352
+ var IE_PROTO = sharedKey('IE_PROTO');
1353
+ var Object$2 = global$6.Object;
1354
+ var ObjectPrototype = Object$2.prototype;
1355
+
1356
+ // `Object.getPrototypeOf` method
1357
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1358
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
1359
+ var object = toObject(O);
1360
+ if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1361
+ var constructor = object.constructor;
1362
+ if (isCallable$5(constructor) && object instanceof constructor) {
1363
+ return constructor.prototype;
1364
+ } return object instanceof Object$2 ? ObjectPrototype : null;
1365
+ };
1366
+
1367
+ var fails = fails$a;
1368
+ var isCallable$4 = isCallable$f;
1369
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1370
+ var redefine$1 = redefine$3.exports;
1371
+ var wellKnownSymbol$5 = wellKnownSymbol$8;
1372
+
1373
+ var ITERATOR$2 = wellKnownSymbol$5('iterator');
1374
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1375
+
1376
+ // `%IteratorPrototype%` object
1377
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1378
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1379
+
1380
+ /* eslint-disable es-x/no-array-prototype-keys -- safe */
1381
+ if ([].keys) {
1382
+ arrayIterator = [].keys();
1383
+ // Safari 8 has buggy iterators w/o `next`
1384
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1385
+ else {
1386
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1387
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1388
+ }
1389
+ }
1390
+
1391
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
1392
+ var test = {};
1393
+ // FF44- legacy iterators case
1394
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1395
+ });
1396
+
1397
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1398
+
1399
+ // `%IteratorPrototype%[@@iterator]()` method
1400
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1401
+ if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
1402
+ redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
1403
+ return this;
1404
+ });
1405
+ }
1406
+
1407
+ var iteratorsCore = {
1408
+ IteratorPrototype: IteratorPrototype$2,
1409
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1410
+ };
1411
+
1412
+ var defineProperty$2 = objectDefineProperty.f;
1413
+ var hasOwn$1 = hasOwnProperty_1;
1414
+ var wellKnownSymbol$4 = wellKnownSymbol$8;
1415
+
1416
+ var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
1417
+
1418
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1419
+ if (target && !STATIC) target = target.prototype;
1420
+ if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
1421
+ defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1422
+ }
1423
+ };
1424
+
1425
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1426
+ var create = objectCreate;
1427
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1428
+ var setToStringTag$1 = setToStringTag$2;
1429
+ var Iterators$2 = iterators;
1430
+
1431
+ var returnThis$1 = function () { return this; };
1432
+
1433
+ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1434
+ var TO_STRING_TAG = NAME + ' Iterator';
1435
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1436
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1437
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1438
+ return IteratorConstructor;
1439
+ };
1440
+
1441
+ var global$5 = global$r;
1442
+ var isCallable$3 = isCallable$f;
1443
+
1444
+ var String$2 = global$5.String;
1445
+ var TypeError$1 = global$5.TypeError;
1446
+
1447
+ var aPossiblePrototype$1 = function (argument) {
1448
+ if (typeof argument == 'object' || isCallable$3(argument)) return argument;
1449
+ throw TypeError$1("Can't set " + String$2(argument) + ' as a prototype');
1450
+ };
1451
+
1452
+ /* eslint-disable no-proto -- safe */
1453
+
1454
+ var uncurryThis$1 = functionUncurryThis;
1455
+ var anObject = anObject$5;
1456
+ var aPossiblePrototype = aPossiblePrototype$1;
1457
+
1458
+ // `Object.setPrototypeOf` method
1459
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1460
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1461
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
1462
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1463
+ var CORRECT_SETTER = false;
1464
+ var test = {};
1465
+ var setter;
1466
+ try {
1467
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1468
+ setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1469
+ setter(test, []);
1470
+ CORRECT_SETTER = test instanceof Array;
1471
+ } catch (error) { /* empty */ }
1472
+ return function setPrototypeOf(O, proto) {
1473
+ anObject(O);
1474
+ aPossiblePrototype(proto);
1475
+ if (CORRECT_SETTER) setter(O, proto);
1476
+ else O.__proto__ = proto;
1477
+ return O;
1478
+ };
1479
+ }() : undefined);
1480
+
1481
+ var $$1 = _export;
1482
+ var call = functionCall;
1483
+ var FunctionName = functionName;
1484
+ var isCallable$2 = isCallable$f;
1485
+ var createIteratorConstructor = createIteratorConstructor$1;
1486
+ var getPrototypeOf = objectGetPrototypeOf;
1487
+ var setPrototypeOf = objectSetPrototypeOf;
1488
+ var setToStringTag = setToStringTag$2;
1489
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1490
+ var redefine = redefine$3.exports;
1491
+ var wellKnownSymbol$3 = wellKnownSymbol$8;
1492
+ var Iterators$1 = iterators;
1493
+ var IteratorsCore = iteratorsCore;
1494
+
1495
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1496
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1497
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1498
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1499
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
1500
+ var KEYS = 'keys';
1501
+ var VALUES = 'values';
1502
+ var ENTRIES = 'entries';
1503
+
1504
+ var returnThis = function () { return this; };
1505
+
1506
+ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1507
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1508
+
1509
+ var getIterationMethod = function (KIND) {
1510
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1511
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1512
+ switch (KIND) {
1513
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1514
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1515
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1516
+ } return function () { return new IteratorConstructor(this); };
1517
+ };
1518
+
1519
+ var TO_STRING_TAG = NAME + ' Iterator';
1520
+ var INCORRECT_VALUES_NAME = false;
1521
+ var IterablePrototype = Iterable.prototype;
1522
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1523
+ || IterablePrototype['@@iterator']
1524
+ || DEFAULT && IterablePrototype[DEFAULT];
1525
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1526
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1527
+ var CurrentIteratorPrototype, methods, KEY;
1528
+
1529
+ // fix native
1530
+ if (anyNativeIterator) {
1531
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1532
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1533
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1534
+ if (setPrototypeOf) {
1535
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1536
+ } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
1537
+ redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1538
+ }
1539
+ }
1540
+ // Set @@toStringTag to native iterators
1541
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1542
+ }
1543
+ }
1544
+
1545
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1546
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1547
+ if (CONFIGURABLE_FUNCTION_NAME) {
1548
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1549
+ } else {
1550
+ INCORRECT_VALUES_NAME = true;
1551
+ defaultIterator = function values() { return call(nativeIterator, this); };
1552
+ }
1553
+ }
1554
+
1555
+ // export additional methods
1556
+ if (DEFAULT) {
1557
+ methods = {
1558
+ values: getIterationMethod(VALUES),
1559
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1560
+ entries: getIterationMethod(ENTRIES)
1561
+ };
1562
+ if (FORCED) for (KEY in methods) {
1563
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1564
+ redefine(IterablePrototype, KEY, methods[KEY]);
1565
+ }
1566
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1567
+ }
1568
+
1569
+ // define iterator
1570
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1571
+ redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1572
+ }
1573
+ Iterators$1[NAME] = defaultIterator;
1574
+
1575
+ return methods;
1576
+ };
1577
+
1578
+ var toIndexedObject = toIndexedObject$5;
1579
+ var addToUnscopables = addToUnscopables$1;
1580
+ var Iterators = iterators;
1581
+ var InternalStateModule = internalState;
1582
+ var defineProperty$1 = objectDefineProperty.f;
1583
+ var defineIterator = defineIterator$1;
1584
+ var DESCRIPTORS$1 = descriptors;
1585
+
1586
+ var ARRAY_ITERATOR = 'Array Iterator';
1587
+ var setInternalState = InternalStateModule.set;
1588
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1589
+
1590
+ // `Array.prototype.entries` method
1591
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1592
+ // `Array.prototype.keys` method
1593
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1594
+ // `Array.prototype.values` method
1595
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1596
+ // `Array.prototype[@@iterator]` method
1597
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1598
+ // `CreateArrayIterator` internal method
1599
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1600
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1601
+ setInternalState(this, {
1602
+ type: ARRAY_ITERATOR,
1603
+ target: toIndexedObject(iterated), // target
1604
+ index: 0, // next index
1605
+ kind: kind // kind
1606
+ });
1607
+ // `%ArrayIteratorPrototype%.next` method
1608
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1609
+ }, function () {
1610
+ var state = getInternalState(this);
1611
+ var target = state.target;
1612
+ var kind = state.kind;
1613
+ var index = state.index++;
1614
+ if (!target || index >= target.length) {
1615
+ state.target = undefined;
1616
+ return { value: undefined, done: true };
1617
+ }
1618
+ if (kind == 'keys') return { value: index, done: false };
1619
+ if (kind == 'values') return { value: target[index], done: false };
1620
+ return { value: [index, target[index]], done: false };
1621
+ }, 'values');
1622
+
1623
+ // argumentsList[@@iterator] is %ArrayProto_values%
1624
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1625
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1626
+ var values = Iterators.Arguments = Iterators.Array;
1627
+
1628
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1629
+ addToUnscopables('keys');
1630
+ addToUnscopables('values');
1631
+ addToUnscopables('entries');
1632
+
1633
+ // V8 ~ Chrome 45- bug
1634
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1635
+ defineProperty$1(values, 'name', { value: 'values' });
1636
+ } catch (error) { /* empty */ }
1637
+
1638
+ // iterable DOM collections
1639
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1640
+ var domIterables = {
1641
+ CSSRuleList: 0,
1642
+ CSSStyleDeclaration: 0,
1643
+ CSSValueList: 0,
1644
+ ClientRectList: 0,
1645
+ DOMRectList: 0,
1646
+ DOMStringList: 0,
1647
+ DOMTokenList: 1,
1648
+ DataTransferItemList: 0,
1649
+ FileList: 0,
1650
+ HTMLAllCollection: 0,
1651
+ HTMLCollection: 0,
1652
+ HTMLFormElement: 0,
1653
+ HTMLSelectElement: 0,
1654
+ MediaList: 0,
1655
+ MimeTypeArray: 0,
1656
+ NamedNodeMap: 0,
1657
+ NodeList: 1,
1658
+ PaintRequestList: 0,
1659
+ Plugin: 0,
1660
+ PluginArray: 0,
1661
+ SVGLengthList: 0,
1662
+ SVGNumberList: 0,
1663
+ SVGPathSegList: 0,
1664
+ SVGPointList: 0,
1665
+ SVGStringList: 0,
1666
+ SVGTransformList: 0,
1667
+ SourceBufferList: 0,
1668
+ StyleSheetList: 0,
1669
+ TextTrackCueList: 0,
1670
+ TextTrackList: 0,
1671
+ TouchList: 0
1672
+ };
1673
+
1674
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1675
+ var documentCreateElement = documentCreateElement$2;
1676
+
1677
+ var classList = documentCreateElement('span').classList;
1678
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1679
+
1680
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1681
+
1682
+ var global$4 = global$r;
1683
+ var DOMIterables = domIterables;
1684
+ var DOMTokenListPrototype = domTokenListPrototype;
1685
+ var ArrayIteratorMethods = es_array_iterator;
1686
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
1687
+ var wellKnownSymbol$2 = wellKnownSymbol$8;
1688
+
1689
+ var ITERATOR = wellKnownSymbol$2('iterator');
1690
+ var TO_STRING_TAG$2 = wellKnownSymbol$2('toStringTag');
1691
+ var ArrayValues = ArrayIteratorMethods.values;
1692
+
1693
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1694
+ if (CollectionPrototype) {
1695
+ // some Chrome versions have non-configurable methods on DOMTokenList
1696
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1697
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1698
+ } catch (error) {
1699
+ CollectionPrototype[ITERATOR] = ArrayValues;
1700
+ }
1701
+ if (!CollectionPrototype[TO_STRING_TAG$2]) {
1702
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1703
+ }
1704
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1705
+ // some Chrome versions have non-configurable methods on DOMTokenList
1706
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1707
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1708
+ } catch (error) {
1709
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1710
+ }
1711
+ }
1712
+ }
1713
+ };
1714
+
1715
+ for (var COLLECTION_NAME in DOMIterables) {
1716
+ handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1717
+ }
1718
+
1719
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1720
+
1721
+ const Flexbox = _a => {
1722
+ var {
1723
+ alignContent,
1724
+ alignItems,
1725
+ alignSelf,
1726
+ children,
1727
+ justifyContent,
1728
+ flexDirection,
1729
+ flexWrap,
1730
+ className
1731
+ } = _a,
1732
+ props = __rest(_a, ["alignContent", "alignItems", "alignSelf", "children", "justifyContent", "flexDirection", "flexWrap", "className"]);
1733
+
1734
+ const [classes, setClasses] = React.useState(['d-flex']);
1735
+ const [flexClassName, setFlexClassName] = React.useState('d-flex'); // // update className when classes change
1736
+
1737
+ React.useLayoutEffect(() => {
1738
+ const newClassName = classes.join(' ');
1739
+ if (newClassName !== flexClassName) setFlexClassName(newClassName);
1740
+ }, [classes, flexClassName]); // // update classes when props change
1741
+
1742
+ React.useLayoutEffect(() => {
1743
+ const newClasses = ['d-flex'];
1744
+ alignItems && newClasses.push(`align-items-${alignItems}`);
1745
+ alignContent && newClasses.push(`align-content-${alignContent}`);
1746
+ alignSelf && newClasses.push(`align-self-${alignSelf}`);
1747
+ justifyContent && newClasses.push(`justify-content-${justifyContent}`);
1748
+ flexDirection && newClasses.push(`flex-${flexDirection}`);
1749
+ flexWrap && newClasses.push(`flex-${flexWrap}`);
1750
+ className && newClasses.push(className);
1751
+ setClasses(newClasses);
1752
+ }, [alignContent, alignItems, alignSelf, justifyContent, flexDirection, flexWrap, className]);
1753
+ return jsxRuntime.jsx("div", Object.assign({
1754
+ className: flexClassName
1755
+ }, props, {
1756
+ children: children
1757
+ }));
1758
+ };
1759
+
1760
+ function Card({
1761
+ children,
1762
+ header,
1763
+ footer
1764
+ }) {
1765
+ return jsxRuntime.jsxs("section", Object.assign({
1766
+ className: "card"
1767
+ }, {
1768
+ children: [jsxRuntime.jsx("header", {
1769
+ children: header
1770
+ }), children, jsxRuntime.jsx("footer", {
1771
+ children: footer
1772
+ })]
1773
+ }));
1774
+ }
1775
+
1776
+ const squareExclamationIcon = jsxRuntime.jsx("svg", Object.assign({
1777
+ viewBox: "0 0 24 24",
1778
+ fill: "none",
1779
+ xmlns: "http://www.w3.org/2000/svg",
1780
+ "aria-hidden": "true",
1781
+ focusable: "false"
1782
+ }, {
1783
+ children: jsxRuntime.jsx("path", {
1784
+ fillRule: "evenodd",
1785
+ clipRule: "evenodd",
1786
+ d: "M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM10.8682 7.42857H13.1318C13.3777 7.42857 13.5731 7.635 13.5597 7.8805L13.2948 12.7376C13.2824 12.9649 13.0945 13.1429 12.8669 13.1429H11.1331C10.9055 13.1429 10.7176 12.9649 10.7052 12.7376L10.4402 7.8805C10.4269 7.635 10.6223 7.42857 10.8682 7.42857ZM12 17.0714C11.0927 17.0714 10.3571 16.3359 10.3571 15.4286C10.3571 14.5213 11.0927 13.7857 12 13.7857C12.9073 13.7857 13.6429 14.5213 13.6429 15.4286C13.6429 16.3359 12.9073 17.0714 12 17.0714Z",
1787
+ fill: "#333333"
1788
+ })
1789
+ }));
1790
+
1791
+ const squareInfoIcon = jsxRuntime.jsx("svg", Object.assign({
1792
+ viewBox: "0 0 24 24",
1793
+ fill: "none",
1794
+ xmlns: "http://www.w3.org/2000/svg"
1795
+ }, {
1796
+ children: jsxRuntime.jsx("path", {
1797
+ d: "M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM12 7.07143C12.8284 7.07143 13.5 7.743 13.5 8.57143C13.5 9.39986 12.8284 10.0714 12 10.0714C11.1716 10.0714 10.5 9.39986 10.5 8.57143C10.5 7.743 11.1716 7.07143 12 7.07143ZM14 16.1429C14 16.3795 13.8081 16.5714 13.5714 16.5714H10.4286C10.1919 16.5714 10 16.3795 10 16.1429V15.2857C10 15.049 10.1919 14.8571 10.4286 14.8571H10.8571V12.5714H10.4286C10.1919 12.5714 10 12.3795 10 12.1429V11.2857C10 11.049 10.1919 10.8571 10.4286 10.8571H12.7143C12.951 10.8571 13.1429 11.049 13.1429 11.2857V14.8571H13.5714C13.8081 14.8571 14 15.049 14 15.2857V16.1429Z",
1798
+ fill: "#333333"
1799
+ })
1800
+ }));
1801
+
1802
+ const checkIcon = jsxRuntime.jsx("svg", Object.assign({
1803
+ width: "24",
1804
+ height: "24",
1805
+ viewBox: "0 0 24 24",
1806
+ fill: "none",
1807
+ xmlns: "http://www.w3.org/2000/svg"
1808
+ }, {
1809
+ children: jsxRuntime.jsx("path", {
1810
+ d: "M17.6203 6.60836L9.40014 14.8285L6.37976 11.8081C6.23332 11.6617 5.99588 11.6617 5.84942 11.8081L4.96554 12.692C4.8191 12.8384 4.8191 13.0759 4.96554 13.2223L9.13495 17.3917C9.28138 17.5382 9.51882 17.5382 9.66529 17.3917L19.0344 8.02258C19.1809 7.87614 19.1809 7.63871 19.0344 7.49224L18.1506 6.60836C18.0041 6.46193 17.7667 6.46193 17.6203 6.60836Z",
1811
+ fill: "white"
1812
+ })
1813
+ }));
1814
+
1815
+ function AlertRibbon({
1816
+ type,
1817
+ header,
1818
+ footer,
1819
+ children,
1820
+ closeText,
1821
+ isCloseable = true,
1822
+ onClose,
1823
+ role,
1824
+ "aria-live": ariaLive,
1825
+ closeAriaLabel
1826
+ }) {
1827
+ const [closeButton, setCloseButton] = React.useState();
1828
+ React.useEffect(() => {
1829
+ if (!isCloseable) {
1830
+ setCloseButton(null);
1831
+ } else {
1832
+ if (closeText) setCloseButton(jsxRuntime.jsxs("button", Object.assign({
1833
+ className: "close"
1834
+ }, {
1835
+ children: [jsxRuntime.jsx("span", Object.assign({
1836
+ className: "sr-only"
1837
+ }, {
1838
+ children: closeText
1839
+ })), jsxRuntime.jsx("i", {})]
1840
+ })));else setCloseButton(jsxRuntime.jsxs("button", Object.assign({
1841
+ className: "close"
1842
+ }, {
1843
+ children: [jsxRuntime.jsx("span", Object.assign({
1844
+ className: "sr-only"
1845
+ }, {
1846
+ children: "Close"
1847
+ })), jsxRuntime.jsx("i", {})]
1848
+ })));
1849
+ }
1850
+ }, [isCloseable, closeText]);
1851
+
1852
+ const renderIcon = () => {
1853
+ switch (type) {
1854
+ case "danger":
1855
+ case "warning":
1856
+ return squareExclamationIcon;
1857
+
1858
+ case "success":
1859
+ return checkIcon;
1860
+
1861
+ default:
1862
+ return squareInfoIcon;
1863
+ }
1864
+ };
1865
+
1866
+ return jsxRuntime.jsxs("div", Object.assign({
1867
+ className: `alert-ribbon ${type}`,
1868
+ role: role,
1869
+ "aria-live": ariaLive
1870
+ }, {
1871
+ children: [jsxRuntime.jsx("i", Object.assign({
1872
+ "aria-hidden": "true"
1873
+ }, {
1874
+ children: renderIcon()
1875
+ })), jsxRuntime.jsxs("div", Object.assign({
1876
+ className: "alert-ribbon__content"
1877
+ }, {
1878
+ children: [header && /*#__PURE__*/React__default["default"].isValidElement(header) ? header : jsxRuntime.jsx("span", Object.assign({
1879
+ className: "header"
1880
+ }, {
1881
+ children: header
1882
+ })), jsxRuntime.jsx("p", {
1883
+ children: children
1884
+ })]
1885
+ })), closeButton && jsxRuntime.jsx("button", Object.assign({
1886
+ className: "close",
1887
+ type: "button",
1888
+ "aria-label": closeAriaLabel !== null && closeAriaLabel !== void 0 ? closeAriaLabel : "Close alert",
1889
+ onClick: event => {
1890
+ onClose && onClose(event);
1891
+ }
1892
+ }, {
1893
+ children: jsxRuntime.jsx("i", {})
1894
+ })), footer && jsxRuntime.jsxs("div", Object.assign({
1895
+ className: "alert-ribbon__footer"
1896
+ }, {
1897
+ children: [" ", footer, " "]
1898
+ }))]
1899
+ }));
1900
+ }
1901
+
1902
+ const ButtonGroup = ({
1903
+ children,
1904
+ selectedIndex,
1905
+ variant
1906
+ }) => {
1907
+ const [selected, setSelected] = React.useState(selectedIndex);
1908
+ const [buttons, setButtons] = React.useState([]);
1909
+ React.useEffect(() => {
1910
+ const buttonProps = (children instanceof Array ? children : [children]).filter(b => b && b.props).map((b, ix) => {
1911
+ const bp = b.props;
1912
+ const props = Object.assign(Object.assign({}, bp), {
1913
+ variant,
1914
+ key: bp.key || `btn_${ix}`,
1915
+ active: ix === selected,
1916
+ onClick: e => {
1917
+ setSelected(ix);
1918
+ if (bp.onClick) bp.onClick(e);
1919
+ }
1920
+ });
1921
+ return props;
1922
+ });
1923
+ setButtons(buttonProps);
1924
+ }, [children, selected, variant]);
1925
+ return jsxRuntime.jsx(Group, {
1926
+ children: buttons.map(props => jsxRuntime.jsx(Button, Object.assign({}, props), props.key))
1927
+ });
1928
+ };
1929
+
1930
+ /* eslint-disable-next-line */
1931
+ const validateInputValue = (target, rules, setError) => {
1932
+ const errorMessage = validateInputValueErrors(rules, target);
1933
+ errorMessage ? setErrorInsert(setError, target.name) : setErrorRemove(setError, target.name);
1934
+ return errorMessage;
1935
+ };
1936
+
1937
+ const validateInputValueErrors = (rules, target) => {
1938
+ const {
1939
+ value
1940
+ } = target;
1941
+
1942
+ if ((rules === null || rules === void 0 ? void 0 : rules.custom) instanceof Function) {
1943
+ return rules === null || rules === void 0 ? void 0 : rules.custom();
1944
+ }
1945
+
1946
+ return validateTextInputValues(value, rules);
1947
+ };
1948
+ /* eslint-disable-next-line */
1949
+
1950
+
1951
+ const setErrorInsert = (setError, name) => {
1952
+ /* eslint-disable-next-line */
1953
+ setError(errors => {
1954
+ return Object.assign(Object.assign({}, errors), {
1955
+ [name]: true
1956
+ });
1957
+ });
1958
+ };
1959
+ /* eslint-disable-next-line */
1960
+
1961
+
1962
+ const setErrorRemove = (setError, name) => {
1963
+ /* eslint-disable-next-line */
1964
+ setError(errors => {
1965
+ /* eslint-disable-next-line */
1966
+ const newError = Object.assign({}, errors);
1967
+ delete newError[name];
1968
+ return newError;
1969
+ });
1970
+ };
1971
+
1972
+ const validateTextInputValues = (value, rules) => {
1973
+ switch (rules === null || rules === void 0 ? void 0 : rules.type) {
1974
+ case 'Required':
1975
+ {
1976
+ return value === '' || value === undefined || value === null ? 'error' : null;
1977
+ }
1978
+
1979
+ default:
1980
+ {
1981
+ return;
1982
+ }
1983
+ }
1984
+ };
1985
+
1986
+ const FormContext = /*#__PURE__*/React__default["default"].createContext({});
1987
+ const useFormContext = () => {
1988
+ return React__default["default"].useContext(FormContext);
1989
+ };
1990
+ const FormProvider = _a => {
1991
+ var {
1992
+ children,
1993
+ direction = 'vertical',
1994
+ formSize = 'md',
1995
+ onSubmit,
1996
+ onFormSubmit
1997
+ } = _a,
1998
+ props = __rest(_a, ["children", "direction", "formSize", "onSubmit", "onFormSubmit"]);
1999
+ /* eslint-disable-next-line */
2000
+
2001
+
2002
+ const [values, setValues] = React__default["default"].useState();
2003
+ /* eslint-disable-next-line */
2004
+
2005
+ const [errors, setErrors] = React__default["default"].useState();
2006
+ /* eslint-disable-next-line */
2007
+
2008
+ const [fields, setFields] = React__default["default"].useState({});
2009
+
2010
+ const formSubmit = event => {
2011
+ let hasError = false;
2012
+ event.preventDefault();
2013
+ Object.keys(fields).forEach(key => {
2014
+ const errorMessage = validateInputValue({
2015
+ name: key,
2016
+ value: values === null || values === void 0 ? void 0 : values[key]
2017
+ }, fields[key], setErrors);
2018
+ hasError = hasError || !!errorMessage;
2019
+ });
2020
+
2021
+ if (!hasError) {
2022
+ onFormSubmit && onFormSubmit(values);
2023
+ }
2024
+ };
2025
+
2026
+ const resetForm = () => {
2027
+ setValues({});
2028
+ setErrors({});
2029
+ };
2030
+
2031
+ return jsxRuntime.jsx(FormContext.Provider, Object.assign({
2032
+ value: {
2033
+ setValues,
2034
+ setErrors,
2035
+ setFields,
2036
+ errors,
2037
+ values
2038
+ }
2039
+ }, {
2040
+ children: jsxRuntime.jsx("form", Object.assign({
2041
+ className: [direction, `size-${formSize}`].join(' '),
2042
+ onSubmit: formSubmit
2043
+ }, props, {
2044
+ onReset: resetForm
2045
+ }, {
2046
+ children: children
2047
+ }))
2048
+ }));
2049
+ };
2050
+
2051
+ const Form = props => {
2052
+ return jsxRuntime.jsx(FormProvider, Object.assign({}, props));
2053
+ };
2054
+
2055
+ const FormItems = ({
2056
+ children,
2057
+ validate,
2058
+ name
2059
+ }) => {
2060
+ const {
2061
+ setValues,
2062
+ setErrors,
2063
+ setFields,
2064
+ errors
2065
+ } = useFormContext();
2066
+ React__default["default"].useEffect(() => {
2067
+ /* eslint-disable-next-line */
2068
+ setFields(fields => Object.assign(Object.assign({}, fields), {
2069
+ [name]: validate === null || validate === void 0 ? void 0 : validate.rules
2070
+ }));
2071
+ /* eslint-disable-next-line */
2072
+
2073
+ const removeValues = values => {
2074
+ /* eslint-disable-next-line */
2075
+ const newValues = Object.assign({}, values);
2076
+ delete newValues[name];
2077
+ return newValues;
2078
+ };
2079
+
2080
+ return () => {
2081
+ /* eslint-disable-next-line */
2082
+ setFields(fields => removeValues(fields));
2083
+ /* eslint-disable-next-line */
2084
+
2085
+ setValues(values => removeValues(values));
2086
+ /* eslint-disable-next-line */
2087
+
2088
+ setErrors(errors => removeValues(errors));
2089
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
2090
+ }, []);
2091
+
2092
+ const onChange = event => {
2093
+ if (!event.target) return;
2094
+ const {
2095
+ value,
2096
+ name,
2097
+ type,
2098
+ checked
2099
+ } = event.target;
2100
+ let inputValue;
2101
+
2102
+ if (type === 'checkbox') {
2103
+ inputValue = checked ? value : null;
2104
+ /* eslint-disable-next-line */
2105
+
2106
+ checked ? setValues(values => Object.assign(Object.assign({}, values), {
2107
+ [name]: value
2108
+ })) : setValues(values => Object.assign(Object.assign({}, values), {
2109
+ [name]: null
2110
+ }));
2111
+ } else {
2112
+ inputValue = value;
2113
+ /* eslint-disable-next-line */
2114
+
2115
+ setValues(values => Object.assign(Object.assign({}, values), {
2116
+ [name]: value
2117
+ }));
2118
+ }
2119
+
2120
+ validateInputValue({
2121
+ value: inputValue,
2122
+ name,
2123
+ type,
2124
+ checked
2125
+ }, validate === null || validate === void 0 ? void 0 : validate.rules, setErrors);
2126
+ };
2127
+ /* eslint-disable-next-line */
2128
+
2129
+
2130
+ return /*#__PURE__*/React__default["default"].cloneElement(children, {
2131
+ validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
2132
+ name,
2133
+ onChange
2134
+ });
2135
+ };
2136
+
2137
+ function Group({
2138
+ children,
2139
+ error,
2140
+ groupBorder = false
2141
+ }) {
2142
+ const groupClassName = `group ${groupBorder ? 'group-border' : ''} ${error ? 'is-invalid' : ''}`;
2143
+ const errorMessage = error ? error.message || error : '';
2144
+ return jsxRuntime.jsxs("div", Object.assign({
2145
+ className: "form-group"
2146
+ }, {
2147
+ children: [jsxRuntime.jsx("div", Object.assign({
2148
+ className: groupClassName
2149
+ }, {
2150
+ children: children
2151
+ })), error && jsxRuntime.jsx("span", Object.assign({
2152
+ className: "form-info"
2153
+ }, {
2154
+ children: errorMessage
2155
+ }))]
2156
+ }));
2157
+ }
2158
+
2159
+ const useInput = (props, onChanges, onChangeInput) => {
2160
+ const id = React.useMemo(() => props.id || extract.randomId(), [props.id]);
2161
+ const ref = React.useRef(null);
2162
+ const [value, setValue] = React.useState(props.value ? props.value : '');
2163
+ const [checked, setChecked] = React.useState(props.checked ? props.checked : false);
2164
+ React.useEffect(() => {
2165
+ if (ref.current && ref.current.form) {
2166
+ const resetListener = () => {
2167
+ setValue(props.value ? props.value : '');
2168
+ setChecked(props.checked ? props.checked : false);
2169
+ };
2170
+
2171
+ const form = ref.current.form;
2172
+ form.addEventListener('reset', resetListener);
2173
+ return () => form.removeEventListener('reset', resetListener);
2174
+ } else {
2175
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2176
+ return () => {};
2177
+ }
2178
+ }, [props]);
2179
+
2180
+ const onChange = event => {
2181
+ setValue(event.target.value);
2182
+ setChecked(event.currentTarget.checked);
2183
+ onChanges && onChanges(event);
2184
+ onChangeInput && onChangeInput(event.target.value);
2185
+ };
2186
+
2187
+ return Object.assign(Object.assign({}, props), {
2188
+ id,
2189
+ ref,
2190
+ value,
2191
+ checked,
2192
+ onChange
2193
+ });
2194
+ };
2195
+
2196
+ const RenderInput = (type, props, onChange, onChangeInput, label, info, validator) => {
2197
+ const _a = useInput(props, onChange, onChangeInput),
2198
+ {
2199
+ value
2200
+ } = _a,
2201
+ inputProps = __rest(_a, ["value"]);
2202
+
2203
+ const propsWithDescription = info ? Object.assign(Object.assign({}, inputProps), {
2204
+ 'aria-describedby': `${inputProps.id}_info`
2205
+ }) : inputProps; // Render naked
2206
+
2207
+ if (!label && !info) return jsxRuntime.jsx("input", Object.assign({
2208
+ type: type,
2209
+ value: value
2210
+ }, propsWithDescription));
2211
+ return jsxRuntime.jsxs("div", Object.assign({
2212
+ className: "form-group"
2213
+ }, {
2214
+ children: [label && jsxRuntime.jsx("label", Object.assign({
2215
+ htmlFor: inputProps.id
2216
+ }, {
2217
+ children: label
2218
+ })), info && jsxRuntime.jsx("span", Object.assign({
2219
+ className: "form-info",
2220
+ id: `${inputProps.id}_info`
2221
+ }, {
2222
+ children: info
2223
+ })), jsxRuntime.jsx("input", Object.assign({
2224
+ type: type,
2225
+ value: value
2226
+ }, propsWithDescription, {
2227
+ className: validator && extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)
2228
+ })), validator && jsxRuntime.jsx("span", Object.assign({
2229
+ className: "form-info"
2230
+ }, {
2231
+ children: validator.message
2232
+ }))]
2233
+ }));
2234
+ };
2235
+ const TextInput = _a => {
2236
+ var {
2237
+ label,
2238
+ info,
2239
+ onChange,
2240
+ onChangeInput,
2241
+ validator
2242
+ } = _a,
2243
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2244
+
2245
+ return RenderInput('text', props, onChange, onChangeInput, label, info, validator);
2246
+ };
2247
+ const EmailInput = _a => {
2248
+ var {
2249
+ label,
2250
+ info,
2251
+ onChange,
2252
+ onChangeInput,
2253
+ validator
2254
+ } = _a,
2255
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2256
+
2257
+ return RenderInput('email', props, onChange, onChangeInput, label, info, validator);
2258
+ };
2259
+ const NumberInput = _a => {
2260
+ var {
2261
+ label,
2262
+ info,
2263
+ onChange,
2264
+ onChangeInput,
2265
+ validator
2266
+ } = _a,
2267
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2268
+
2269
+ return RenderInput('number', props, onChange, onChangeInput, label, info, validator);
2270
+ };
2271
+ const Checkbox = _a => {
2272
+ var {
2273
+ label,
2274
+ onChange,
2275
+ validator
2276
+ } = _a,
2277
+ props = __rest(_a, ["label", "onChange", "validator"]);
2278
+
2279
+ const inputProps = useInput(props, onChange);
2280
+ const validatorClassName = extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
2281
+ return jsxRuntime.jsxs("div", Object.assign({
2282
+ className: "form-group"
2283
+ }, {
2284
+ children: [jsxRuntime.jsxs("label", Object.assign({
2285
+ htmlFor: inputProps.id,
2286
+ className: `form-control ${validatorClassName}`
2287
+ }, {
2288
+ children: [label, jsxRuntime.jsx("input", Object.assign({
2289
+ type: "checkbox"
2290
+ }, inputProps, {
2291
+ className: validatorClassName
2292
+ })), jsxRuntime.jsx("i", {})]
2293
+ })), validator && jsxRuntime.jsx("span", Object.assign({
2294
+ className: "form-info"
2295
+ }, {
2296
+ children: validator.message
2297
+ }))]
2298
+ }));
2299
+ };
2300
+ const RadioButton = /*#__PURE__*/React__default["default"].forwardRef((_a, ref) => {
2301
+ var {
2302
+ label,
2303
+ validator
2304
+ } = _a,
2305
+ props = __rest(_a, ["label", "validator"]);
2306
+
2307
+ const {
2308
+ id
2309
+ } = useInput(props);
2310
+ return jsxRuntime.jsxs("label", Object.assign({
2311
+ htmlFor: id,
2312
+ className: "form-control"
2313
+ }, {
2314
+ children: [jsxRuntime.jsx("input", Object.assign({
2315
+ id: id,
2316
+ type: "radio"
2317
+ }, props, {
2318
+ className: validator,
2319
+ ref: ref
2320
+ })), jsxRuntime.jsx("span", {
2321
+ children: label
2322
+ }), jsxRuntime.jsx("i", {})]
2323
+ }));
2324
+ });
2325
+
2326
+ const Text = ({
2327
+ children
2328
+ }) => jsxRuntime.jsx("span", Object.assign({
2329
+ className: "form-text"
2330
+ }, {
2331
+ children: children
2332
+ }));
2333
+
2334
+ var wellKnownSymbol$1 = wellKnownSymbol$8;
2335
+
2336
+ var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
2337
+ var test = {};
2338
+
2339
+ test[TO_STRING_TAG$1] = 'z';
2340
+
2341
+ var toStringTagSupport = String(test) === '[object z]';
2342
+
2343
+ var global$3 = global$r;
2344
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2345
+ var isCallable$1 = isCallable$f;
2346
+ var classofRaw = classofRaw$1;
2347
+ var wellKnownSymbol = wellKnownSymbol$8;
2348
+
2349
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2350
+ var Object$1 = global$3.Object;
2351
+
2352
+ // ES3 wrong here
2353
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
2354
+
2355
+ // fallback for IE11 Script Access Denied error
2356
+ var tryGet = function (it, key) {
2357
+ try {
2358
+ return it[key];
2359
+ } catch (error) { /* empty */ }
2360
+ };
2361
+
2362
+ // getting tag from ES6+ `Object.prototype.toString`
2363
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
2364
+ var O, tag, result;
2365
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
2366
+ // @@toStringTag case
2367
+ : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
2368
+ // builtinTag case
2369
+ : CORRECT_ARGUMENTS ? classofRaw(O)
2370
+ // ES3 arguments fallback
2371
+ : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
2372
+ };
2373
+
2374
+ var global$2 = global$r;
2375
+ var classof = classof$1;
2376
+
2377
+ var String$1 = global$2.String;
2378
+
2379
+ var toString$1 = function (argument) {
2380
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2381
+ return String$1(argument);
2382
+ };
2383
+
2384
+ var $ = _export;
2385
+ var DESCRIPTORS = descriptors;
2386
+ var global$1 = global$r;
2387
+ var uncurryThis = functionUncurryThis;
2388
+ var hasOwn = hasOwnProperty_1;
2389
+ var isCallable = isCallable$f;
2390
+ var isPrototypeOf = objectIsPrototypeOf;
2391
+ var toString = toString$1;
2392
+ var defineProperty = objectDefineProperty.f;
2393
+ var copyConstructorProperties = copyConstructorProperties$2;
2394
+
2395
+ var NativeSymbol = global$1.Symbol;
2396
+ var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
2397
+
2398
+ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
2399
+ // Safari 12 bug
2400
+ NativeSymbol().description !== undefined
2401
+ )) {
2402
+ var EmptyStringDescriptionStore = {};
2403
+ // wrap Symbol constructor for correct work with undefined description
2404
+ var SymbolWrapper = function Symbol() {
2405
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
2406
+ var result = isPrototypeOf(SymbolPrototype, this)
2407
+ ? new NativeSymbol(description)
2408
+ // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2409
+ : description === undefined ? NativeSymbol() : NativeSymbol(description);
2410
+ if (description === '') EmptyStringDescriptionStore[result] = true;
2411
+ return result;
2412
+ };
2413
+
2414
+ copyConstructorProperties(SymbolWrapper, NativeSymbol);
2415
+ SymbolWrapper.prototype = SymbolPrototype;
2416
+ SymbolPrototype.constructor = SymbolWrapper;
2417
+
2418
+ var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
2419
+ var symbolToString = uncurryThis(SymbolPrototype.toString);
2420
+ var symbolValueOf = uncurryThis(SymbolPrototype.valueOf);
2421
+ var regexp = /^Symbol\((.*)\)[^)]+$/;
2422
+ var replace = uncurryThis(''.replace);
2423
+ var stringSlice = uncurryThis(''.slice);
2424
+
2425
+ defineProperty(SymbolPrototype, 'description', {
2426
+ configurable: true,
2427
+ get: function description() {
2428
+ var symbol = symbolValueOf(this);
2429
+ var string = symbolToString(symbol);
2430
+ if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
2431
+ var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
2432
+ return desc === '' ? undefined : desc;
2433
+ }
2434
+ });
2435
+
2436
+ $({ global: true, forced: true }, {
2437
+ Symbol: SymbolWrapper
2438
+ });
2439
+ }
2440
+
2441
+ const RadioGroup = ({
2442
+ defaultSelected,
2443
+ description,
2444
+ title,
2445
+ validator,
2446
+ onChangeRadio,
2447
+ onChange,
2448
+ name,
2449
+ children
2450
+ }) => {
2451
+ const [checked, setChecked] = React__default["default"].useState();
2452
+ const validatorClassName = extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
2453
+
2454
+ const onChanges = event => {
2455
+ setChecked(event.target.value);
2456
+ onChangeRadio && onChangeRadio(event.target.value);
2457
+ onChange && onChange(event);
2458
+ };
2459
+
2460
+ const radioBtnRef = React__default["default"].useRef(null);
2461
+ React__default["default"].useEffect(() => {
2462
+ var _a;
2463
+
2464
+ if (radioBtnRef && radioBtnRef.current) {
2465
+ if (defaultSelected) setChecked(defaultSelected);
2466
+ const form = (_a = radioBtnRef === null || radioBtnRef === void 0 ? void 0 : radioBtnRef.current) === null || _a === void 0 ? void 0 : _a.form;
2467
+
2468
+ const resetListner = () => {
2469
+ setChecked(undefined);
2470
+ };
2471
+
2472
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', resetListner);
2473
+ return () => form === null || form === void 0 ? void 0 : form.removeEventListener('reset', resetListner);
2474
+ } else {
2475
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2476
+ return () => {};
2477
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
2478
+
2479
+ }, []);
2480
+ return jsxRuntime.jsxs("div", Object.assign({
2481
+ className: "form-group"
2482
+ }, {
2483
+ children: [jsxRuntime.jsxs("fieldset", Object.assign({
2484
+ className: validatorClassName
2485
+ }, {
2486
+ children: [title && jsxRuntime.jsx("legend", {
2487
+ children: title
2488
+ }), description && jsxRuntime.jsx("span", Object.assign({
2489
+ className: "form-info"
2490
+ }, {
2491
+ children: description
2492
+ })), jsxRuntime.jsx("div", {
2493
+ children: React__default["default"].Children.map(children, Child => {
2494
+ return /*#__PURE__*/React__default["default"].isValidElement(Child) ? /*#__PURE__*/React__default["default"].cloneElement(Child, {
2495
+ validator: validatorClassName,
2496
+ onChange: onChanges,
2497
+ checked: checked === Child.props.value,
2498
+ name,
2499
+ ref: radioBtnRef
2500
+ }) : Child;
2501
+ })
2502
+ })]
2503
+ })), (validator === null || validator === void 0 ? void 0 : validator.message) && jsxRuntime.jsx("span", Object.assign({
2504
+ className: "form-info"
2505
+ }, {
2506
+ children: validator === null || validator === void 0 ? void 0 : validator.message
2507
+ }))]
2508
+ }));
2509
+ };
2510
+
2511
+ const ListItem = _a => {
2512
+ var {
2513
+ listType,
2514
+ tableRowData,
2515
+ children
2516
+ } = _a,
2517
+ props = __rest(_a, ["listType", "tableRowData", "children"]);
2518
+
2519
+ if (listType === 'table') {
2520
+ return jsxRuntime.jsx("dl", {
2521
+ children: jsxRuntime.jsxs("div", {
2522
+ children: [jsxRuntime.jsx("dt", {
2523
+ children: tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.title
2524
+ }), tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.definition.map((item, index) => jsxRuntime.jsx("dd", {
2525
+ children: item
2526
+ }, index))]
2527
+ })
2528
+ });
2529
+ } else {
2530
+ return jsxRuntime.jsx("li", Object.assign({}, props, {
2531
+ children: children
2532
+ }));
2533
+ }
2534
+ };
2535
+
2536
+ const List = _a => {
2537
+ var {
2538
+ listType,
2539
+ tableCaption,
2540
+ tableData,
2541
+ children
2542
+ } = _a,
2543
+ props = __rest(_a, ["listType", "tableCaption", "tableData", "children"]);
2544
+
2545
+ if (listType === 'ordered') {
2546
+ return jsxRuntime.jsx("ol", Object.assign({}, props, {
2547
+ children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsxRuntime.jsx(ListItem, {
2548
+ children: child
2549
+ }, index))
2550
+ }));
2551
+ } else if (listType !== 'table') {
2552
+ return jsxRuntime.jsx("ul", Object.assign({}, props, {
2553
+ className: listType
2554
+ }, {
2555
+ children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsxRuntime.jsx(ListItem, {
2556
+ children: child
2557
+ }, index))
2558
+ }));
2559
+ } else {
2560
+ return jsxRuntime.jsxs("figure", {
2561
+ children: [jsxRuntime.jsx("figcaption", Object.assign({
2562
+ className: "table-list-caption"
2563
+ }, {
2564
+ children: tableCaption
2565
+ })), jsxRuntime.jsx("dl", {
2566
+ children: tableData === null || tableData === void 0 ? void 0 : tableData.map((data, index) => jsxRuntime.jsx(ListItem, {
2567
+ listType: listType,
2568
+ tableRowData: data
2569
+ }, index))
2570
+ })]
2571
+ });
2572
+ }
2573
+ };
2574
+
2575
+ const Link = _a => {
2576
+ var {
2577
+ button,
2578
+ children
2579
+ } = _a,
2580
+ props = __rest(_a, ["button", "children"]);
2581
+
2582
+ const [anchorProps, setAnchorProps] = React.useState({});
2583
+ React.useEffect(() => {
2584
+ const className = button ? typeof button === 'string' ? `button ${button}` : 'button' : undefined;
2585
+ const newProps = Object.assign({
2586
+ role: button ? 'button' : undefined,
2587
+ className: className
2588
+ }, props);
2589
+ setAnchorProps(newProps); // eslint-disable-next-line react-hooks/exhaustive-deps
2590
+ }, [button]);
2591
+ return jsxRuntime.jsx("a", Object.assign({}, anchorProps, {
2592
+ children: children
2593
+ }));
2594
+ };
2595
+
2596
+ const Navbar = ({
2597
+ children,
2598
+ variant,
2599
+ title,
2600
+ titleLink,
2601
+ brandLink: _brandLink = 'https://www.seb.se',
2602
+ brandAriaLabel: _brandAriaLabel = 'Open seb.se in new tab'
2603
+ }) => {
2604
+ const [props, setProps] = React.useState({});
2605
+ React.useEffect(() => {
2606
+ const classNames = [];
2607
+ if (variant) classNames.push(variant);
2608
+ setProps(Object.assign(Object.assign({}, props), {
2609
+ className: classNames.join(' ')
2610
+ })); // eslint-disable-next-line react-hooks/exhaustive-deps
2611
+ }, [variant]);
2612
+ return jsxRuntime.jsxs("nav", Object.assign({
2613
+ role: "navigation"
2614
+ }, props, {
2615
+ children: [jsxRuntime.jsx(Link, {
2616
+ "aria-label": _brandAriaLabel,
2617
+ href: _brandLink,
2618
+ target: "_blank",
2619
+ className: "brand"
2620
+ }), jsxRuntime.jsx("div", Object.assign({
2621
+ className: "container-fluid"
2622
+ }, {
2623
+ children: jsxRuntime.jsxs("div", Object.assign({
2624
+ className: "row justify-content-between align-items-center"
2625
+ }, {
2626
+ children: [jsxRuntime.jsx("div", Object.assign({
2627
+ className: "col-auto"
2628
+ }, {
2629
+ children: titleLink ? jsxRuntime.jsx(Link, Object.assign({
2630
+ className: "mx-4",
2631
+ href: titleLink
2632
+ }, {
2633
+ children: jsxRuntime.jsx("h1", {
2634
+ children: title
2635
+ })
2636
+ })) : jsxRuntime.jsx("h1", {
2637
+ children: title
2638
+ })
2639
+ })), jsxRuntime.jsx("div", Object.assign({
2640
+ className: "col-auto"
2641
+ }, {
2642
+ children: jsxRuntime.jsx("div", Object.assign({
2643
+ className: "group size-sm"
2644
+ }, {
2645
+ children: children
2646
+ }))
2647
+ }))]
2648
+ }))
2649
+ }))]
2650
+ }));
2651
+ };
2652
+
2653
+ function Badge(_a) {
2654
+ var {
2655
+ children,
2656
+ badgeType,
2657
+ isCloseable,
2658
+ closeText,
2659
+ customColor,
2660
+ customBackgroundColor
2661
+ } = _a,
2662
+ props = __rest(_a, ["children", "badgeType", "isCloseable", "closeText", "customColor", "customBackgroundColor"]);
2663
+
2664
+ const [isClosed, setIsClosed] = React__default["default"].useState(false);
2665
+ const [type, setType] = React__default["default"].useState('');
2666
+ React__default["default"].useEffect(() => {
2667
+ if (badgeType) {
2668
+ setType(badgeType);
2669
+ }
2670
+
2671
+ if (!!customColor || !!customBackgroundColor) {
2672
+ setType('');
2673
+ }
2674
+ }, [badgeType, customColor, customBackgroundColor]);
2675
+ return !isClosed ? jsxRuntime.jsxs("span", Object.assign({}, props, {
2676
+ className: `badge ${type}`,
2677
+ style: {
2678
+ color: customColor,
2679
+ backgroundColor: customBackgroundColor
2680
+ }
2681
+ }, {
2682
+ children: [jsxRuntime.jsx("strong", {
2683
+ children: children
2684
+ }), isCloseable && jsxRuntime.jsxs("button", Object.assign({
2685
+ type: "button",
2686
+ className: "close",
2687
+ onClick: () => setIsClosed(true)
2688
+ }, {
2689
+ children: [closeText, jsxRuntime.jsx("i", {})]
2690
+ }))]
2691
+ })) : null;
2692
+ }
2693
+
2694
+ const noop = () => {};
2695
+
2696
+ const useStepper = ({
2697
+ min,
2698
+ max,
2699
+ value: _value = 0,
2700
+ step: _step = 1,
2701
+ id: _id = extract.randomId(),
2702
+ onChange
2703
+ }) => {
2704
+ const pStepper = {
2705
+ down: noop,
2706
+ setMax: noop,
2707
+ setMin: noop,
2708
+ setStep: noop,
2709
+ setValue: noop,
2710
+ up: noop
2711
+ };
2712
+ const [stepper, setStepper] = React.useState(pStepper);
2713
+ const [data, setData] = React.useState({
2714
+ id: _id,
2715
+ value: _value,
2716
+ min,
2717
+ max,
2718
+ step: _step
2719
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
2720
+
2721
+ React.useEffect(() => {
2722
+ if (max !== data.max) stepper.setMax(max);
2723
+ }, [stepper, max]); // eslint-disable-next-line react-hooks/exhaustive-deps
2724
+
2725
+ React.useEffect(() => {
2726
+ if (min !== data.min) stepper.setMin(min);
2727
+ }, [stepper, min]); // eslint-disable-next-line react-hooks/exhaustive-deps
2728
+
2729
+ React.useEffect(() => {
2730
+ if (_step !== data.step) stepper.setStep(_step || 1);
2731
+ }, [stepper, _step]); // eslint-disable-next-line react-hooks/exhaustive-deps
2732
+
2733
+ React.useEffect(() => {
2734
+ if (_value !== data.value) stepper.setValue(_value || 0, false);
2735
+ }, [stepper, _value]);
2736
+ React.useEffect(() => {
2737
+ setStepper(extract.createStepper({
2738
+ id: _id,
2739
+ value: _value,
2740
+ min,
2741
+ max,
2742
+ step: _step,
2743
+ onChange
2744
+ }, setData)); // eslint-disable-next-line react-hooks/exhaustive-deps
2745
+ }, []);
2746
+ return [stepper, data];
2747
+ };
2748
+
2749
+ function Stepper(_a) {
2750
+ var {
2751
+ label,
2752
+ description,
2753
+ statusMessage,
2754
+ validator
2755
+ } = _a,
2756
+ stepperArgs = __rest(_a, ["label", "description", "statusMessage", "validator"]);
2757
+
2758
+ const [stepper, data] = useStepper(stepperArgs);
2759
+
2760
+ const onChangeEvent = e => {
2761
+ stepper.setValue(e.target.valueAsNumber);
2762
+ };
2763
+
2764
+ const PrimitiveStepper = jsxRuntime.jsxs("div", Object.assign({
2765
+ className: `group group-border group-stepper ${validator && extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)}`
2766
+ }, {
2767
+ children: [jsxRuntime.jsx("button", Object.assign({
2768
+ onClick: () => stepper.down()
2769
+ }, {
2770
+ children: "-"
2771
+ })), jsxRuntime.jsx("input", {
2772
+ id: data.id,
2773
+ type: "number",
2774
+ onChange: onChangeEvent,
2775
+ onFocus: ({
2776
+ target
2777
+ }) => target.select(),
2778
+ placeholder: "0",
2779
+ value: data.value
2780
+ }), jsxRuntime.jsx("button", Object.assign({
2781
+ onClick: () => stepper.up()
2782
+ }, {
2783
+ children: "+"
2784
+ }))]
2785
+ }));
2786
+
2787
+ if (!label && !description && !statusMessage && !validator) return PrimitiveStepper;
2788
+ return jsxRuntime.jsxs("div", Object.assign({
2789
+ className: "form-group"
2790
+ }, {
2791
+ children: [label && jsxRuntime.jsx("label", Object.assign({
2792
+ htmlFor: data.id
2793
+ }, {
2794
+ children: label
2795
+ })), description && jsxRuntime.jsx("span", Object.assign({
2796
+ className: "form-info"
2797
+ }, {
2798
+ children: description
2799
+ })), jsxRuntime.jsxs("div", Object.assign({
2800
+ className: "stepper-wrapper"
2801
+ }, {
2802
+ children: [PrimitiveStepper, validator && jsxRuntime.jsx("span", Object.assign({
2803
+ className: "form-info"
2804
+ }, {
2805
+ children: validator.message
2806
+ }))]
2807
+ }))]
2808
+ }));
2809
+ }
2810
+
2811
+ const useDropdown = ({
2812
+ id,
2813
+ value,
2814
+ texts,
2815
+ options,
2816
+ loop,
2817
+ multiSelect,
2818
+ searchable,
2819
+ searchFilter,
2820
+ compareWith,
2821
+ useValue,
2822
+ display,
2823
+ togglerRef,
2824
+ listboxRef,
2825
+ onChange,
2826
+ validator
2827
+ }) => {
2828
+ const [handler, setHandler] = React.useState();
2829
+ const [dropdown, setDropdown] = React.useState();
2830
+ const [togglerProps, setTogglerProps] = React.useState({});
2831
+ const [listboxProps, setListboxProps] = React.useState({});
2832
+ const [listItems, setListItems] = React.useState([]);
2833
+ const [multiSelectProps, setMultiSelectProps] = React.useState({}); // When dropdown data changes
2834
+
2835
+ React.useEffect(() => {
2836
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2837
+
2838
+ if (!dropdown) return;
2839
+ const {
2840
+ elements: {
2841
+ toggler,
2842
+ listbox
2843
+ }
2844
+ } = dropdown;
2845
+ const newToggleProps = Object.assign(Object.assign({}, toggler === null || toggler === void 0 ? void 0 : toggler.attributes), {
2846
+ className: (_a = toggler === null || toggler === void 0 ? void 0 : toggler.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
2847
+ children: (_b = dropdown === null || dropdown === void 0 ? void 0 : dropdown.texts) === null || _b === void 0 ? void 0 : _b.select,
2848
+ onClick: () => handler === null || handler === void 0 ? void 0 : handler.toggle()
2849
+ });
2850
+ setTogglerProps(newToggleProps);
2851
+ const newListboxProps = Object.assign(Object.assign({}, listbox === null || listbox === void 0 ? void 0 : listbox.attributes), {
2852
+ className: (_c = listbox === null || listbox === void 0 ? void 0 : listbox.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
2853
+ });
2854
+ setListboxProps(newListboxProps);
2855
+
2856
+ if (!dropdown.isMultiSelect) {
2857
+ const newListItems = dropdown.options.map(o => {
2858
+ var _a;
2859
+
2860
+ return Object.assign(Object.assign({}, o.attributes), {
2861
+ className: (_a = o.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
2862
+ children: o[dropdown.display],
2863
+ selected: o.selected,
2864
+ onClick: () => handler === null || handler === void 0 ? void 0 : handler.select(o)
2865
+ });
2866
+ });
2867
+ setListItems(newListItems);
2868
+ } else {
2869
+ const checkboxes = dropdown.options.map(o => ({
2870
+ labelProps: Object.assign(Object.assign({}, o.attributes), {
2871
+ className: ['form-control', ...o.classes].join(' ')
2872
+ }),
2873
+ inputProps: {
2874
+ defaultChecked: o.selected,
2875
+ type: 'checkbox',
2876
+ onClick: () => handler === null || handler === void 0 ? void 0 : handler.select(o, false)
2877
+ },
2878
+ spanProps: {
2879
+ children: o[dropdown.display]
2880
+ }
2881
+ }));
2882
+ const newMultiselect = {
2883
+ fieldsetProps: {
2884
+ 'aria-describedby': (_f = (_e = (_d = dropdown === null || dropdown === void 0 ? void 0 : dropdown.elements) === null || _d === void 0 ? void 0 : _d.fieldset) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.id,
2885
+ 'aria-multiselectable': true,
2886
+ role: 'listbox',
2887
+ tabIndex: -1
2888
+ },
2889
+ legendProps: {
2890
+ className: 'sr-only',
2891
+ id: (_j = (_h = (_g = dropdown === null || dropdown === void 0 ? void 0 : dropdown.elements) === null || _g === void 0 ? void 0 : _g.fieldset) === null || _h === void 0 ? void 0 : _h.attributes) === null || _j === void 0 ? void 0 : _j.id,
2892
+ children: dropdown.texts.optionsDescription
2893
+ },
2894
+ checkboxes
2895
+ };
2896
+ setMultiSelectProps(newMultiselect);
2897
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
2898
+
2899
+ }, [dropdown]); // When dropdown properties change
2900
+
2901
+ React.useEffect(() => {
2902
+ if (!dropdown) return;
2903
+ handler === null || handler === void 0 ? void 0 : handler.update({
2904
+ id,
2905
+ value,
2906
+ texts,
2907
+ options,
2908
+ loop,
2909
+ multiSelect,
2910
+ searchable,
2911
+ searchFilter,
2912
+ compareWith,
2913
+ useValue,
2914
+ display,
2915
+ validator
2916
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
2917
+ }, [id, texts, options, loop, multiSelect, searchable, searchFilter, compareWith, useValue, display]);
2918
+ React.useEffect(() => {
2919
+ if (!dropdown) return;
2920
+ handler === null || handler === void 0 ? void 0 : handler.selectByValue(value);
2921
+ console.log('new value'); // eslint-disable-next-line react-hooks/exhaustive-deps
2922
+ }, [value]); // When validator changes
2923
+
2924
+ React.useEffect(() => {
2925
+ if (!dropdown) return;
2926
+ if (validator) handler === null || handler === void 0 ? void 0 : handler.validate(validator); // eslint-disable-next-line react-hooks/exhaustive-deps
2927
+ }, [validator]); // Create dropdown handler
2928
+
2929
+ React.useEffect(() => {
2930
+ if (!handler && togglerRef.current && listboxRef.current) {
2931
+ setHandler(extract.createDropdown({
2932
+ id,
2933
+ value,
2934
+ texts,
2935
+ options,
2936
+ loop,
2937
+ multiSelect,
2938
+ searchable,
2939
+ searchFilter,
2940
+ compareWith,
2941
+ useValue,
2942
+ display,
2943
+ validator
2944
+ }, togglerRef.current, listboxRef.current, listboxRef.current, dd => setDropdown(dd), value => onChange === null || onChange === void 0 ? void 0 : onChange(value)));
2945
+ }
2946
+
2947
+ return () => handler === null || handler === void 0 ? void 0 : handler.destroy(); // eslint-disable-next-line react-hooks/exhaustive-deps
2948
+ }, [togglerRef, listboxRef]);
2949
+ return {
2950
+ dropdown: handler,
2951
+ togglerProps,
2952
+ listboxProps,
2953
+ listItems,
2954
+ multiSelectProps
2955
+ };
2956
+ };
2957
+
2958
+ const Dropdown = ({
2959
+ compareWith,
2960
+ display,
2961
+ id,
2962
+ informationLabel,
2963
+ label,
2964
+ loop,
2965
+ multiSelect,
2966
+ onChange,
2967
+ options,
2968
+ searchFilter,
2969
+ searchable,
2970
+ texts,
2971
+ useValue,
2972
+ validator,
2973
+ value
2974
+ }) => {
2975
+ var _a;
2976
+
2977
+ const togglerRef = React.useRef(null);
2978
+ const listboxRef = React.useRef(null);
2979
+ const {
2980
+ dropdown,
2981
+ listboxProps,
2982
+ togglerProps,
2983
+ listItems,
2984
+ multiSelectProps
2985
+ } = useDropdown({
2986
+ id,
2987
+ value,
2988
+ options,
2989
+ loop,
2990
+ multiSelect,
2991
+ searchable,
2992
+ searchFilter,
2993
+ compareWith,
2994
+ useValue,
2995
+ display,
2996
+ togglerRef,
2997
+ listboxRef,
2998
+ texts,
2999
+ onChange,
3000
+ validator
3001
+ });
3002
+
3003
+ const getListBoxProps = props => {
3004
+ var _a, _b, _c;
3005
+
3006
+ if (Object.keys(props).length === 0) return {
3007
+ role: 'listbox',
3008
+ tabIndex: -1,
3009
+ className: (_c = (_b = (_a = extract.dropdownValues().elements) === null || _a === void 0 ? void 0 : _a.listbox) === null || _b === void 0 ? void 0 : _b.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
3010
+ };
3011
+ return props;
3012
+ };
3013
+
3014
+ return jsxRuntime.jsxs("div", Object.assign({
3015
+ className: "form-group"
3016
+ }, {
3017
+ children: [label && jsxRuntime.jsx("label", Object.assign({
3018
+ htmlFor: togglerProps.id
3019
+ }, {
3020
+ children: label
3021
+ })), informationLabel && jsxRuntime.jsx("div", Object.assign({
3022
+ className: "form-info"
3023
+ }, {
3024
+ children: informationLabel
3025
+ })), jsxRuntime.jsx("button", Object.assign({
3026
+ type: "button"
3027
+ }, togglerProps, {
3028
+ ref: togglerRef
3029
+ }, {
3030
+ children: jsxRuntime.jsx("span", {
3031
+ children: togglerProps.children
3032
+ })
3033
+ })), jsxRuntime.jsxs("div", Object.assign({}, getListBoxProps(listboxProps), {
3034
+ ref: listboxRef
3035
+ }, {
3036
+ children: [jsxRuntime.jsxs("button", Object.assign({
3037
+ type: "button",
3038
+ className: "close m-4 m-sm-2 d-block d-sm-none",
3039
+ onClick: dropdown === null || dropdown === void 0 ? void 0 : dropdown.close
3040
+ }, {
3041
+ children: [jsxRuntime.jsx("span", Object.assign({
3042
+ className: "sr-only"
3043
+ }, {
3044
+ children: dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.texts.close
3045
+ })), jsxRuntime.jsx("i", {})]
3046
+ })), (dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.isMultiSelect) ? jsxRuntime.jsx("div", Object.assign({
3047
+ className: "sg-fieldset-container"
3048
+ }, {
3049
+ children: jsxRuntime.jsxs("fieldset", Object.assign({}, multiSelectProps.fieldsetProps, {
3050
+ children: [jsxRuntime.jsx("legend", Object.assign({}, multiSelectProps.legendProps)), jsxRuntime.jsx("div", {
3051
+ children: (_a = multiSelectProps.checkboxes) === null || _a === void 0 ? void 0 : _a.map(checkboxItem => jsxRuntime.jsxs("label", Object.assign({}, checkboxItem.labelProps, {
3052
+ children: [jsxRuntime.jsx("input", Object.assign({}, checkboxItem.inputProps)), jsxRuntime.jsx("span", Object.assign({}, checkboxItem.spanProps)), jsxRuntime.jsx("i", {})]
3053
+ }), checkboxItem.labelProps.id))
3054
+ })]
3055
+ }))
3056
+ })) : jsxRuntime.jsx("ul", Object.assign({
3057
+ role: "listbox"
3058
+ }, {
3059
+ children: listItems.map(liProps => jsxRuntime.jsx("li", Object.assign({}, liProps), liProps.id))
3060
+ }))]
3061
+ })), validator && jsxRuntime.jsx("span", Object.assign({
3062
+ className: "form-info"
3063
+ }, {
3064
+ children: validator === null || validator === void 0 ? void 0 : validator.message
3065
+ }))]
3066
+ }));
3067
+ };
3068
+
3069
+ const useDatepicker = (datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options = {}) => {
3070
+ const dataStub = {
3071
+ formattedSelectedDate: '',
3072
+ calendar: {
3073
+ headers: [],
3074
+ calendarGrid: []
3075
+ }
3076
+ };
3077
+ const [data, setData] = React.useState(dataStub);
3078
+ const [state, setState] = React.useState({
3079
+ isActive: false
3080
+ });
3081
+ const datepickerStub = {};
3082
+ const [datepicker, setDatepicker] = React.useState(datepickerStub);
3083
+ React.useEffect(() => {
3084
+ if (!datepicker.open && datepickerRef.current && datepickerDialogRef.current && dateInputRef.current && datepickerTriggerRef.current) {
3085
+ setDatepicker(extract.createDatepicker((data, state) => {
3086
+ if (data) setData(data);
3087
+ if (state) setState(state);
3088
+ }, options, datepickerRef.current, datepickerDialogRef.current, dateInputRef.current, datepickerTriggerRef.current));
3089
+ }
3090
+ }, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options]);
3091
+ return {
3092
+ datepicker,
3093
+ data,
3094
+ state
3095
+ };
3096
+ };
3097
+
3098
+ const Datepicker = (options = {}) => {
3099
+ const [uuid] = React.useState(extract.randomId());
3100
+ const id = `sgr-datepicker-${uuid}`;
3101
+ const datepickerRef = React.useRef(null);
3102
+ const datepickerTriggerRef = React.useRef(null);
3103
+ const datepickerDialogRef = React.useRef(null);
3104
+ const dateInputRef = React.useRef(null);
3105
+ const {
3106
+ datepicker,
3107
+ data,
3108
+ state
3109
+ } = useDatepicker(datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options);
3110
+ React.useEffect(() => {
3111
+ var _a;
3112
+
3113
+ const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
3114
+ return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
3115
+ }, [datepicker, options]);
3116
+
3117
+ const classNames = day => Object.entries({
3118
+ disabled: !day.currentMonth,
3119
+ 'sg-date-today': day.today // 'sg-date-holiday': day.holiday,
3120
+
3121
+ }).map(([className, add]) => add ? className : '').join(' ');
3122
+
3123
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
3124
+ children: [jsxRuntime.jsxs("div", Object.assign({
3125
+ className: "form-group"
3126
+ }, {
3127
+ children: [jsxRuntime.jsx("label", Object.assign({
3128
+ htmlFor: id
3129
+ }, {
3130
+ children: "Date"
3131
+ })), jsxRuntime.jsxs("div", Object.assign({
3132
+ className: "group",
3133
+ ref: datepickerRef
3134
+ }, {
3135
+ children: [jsxRuntime.jsx("input", {
3136
+ ref: dateInputRef,
3137
+ id: id,
3138
+ type: "text",
3139
+ placeholder: "yyyy-mm-dd",
3140
+ value: data.formattedSelectedDate,
3141
+ onChange: e => datepicker.select(e.target.value)
3142
+ }), jsxRuntime.jsx("button", Object.assign({
3143
+ ref: datepickerTriggerRef,
3144
+ type: "button",
3145
+ className: "primary",
3146
+ onClick: () => datepicker.toggle()
3147
+ }, {
3148
+ children: jsxRuntime.jsx("i", Object.assign({
3149
+ className: "sg-icon sg-icon-calendar"
3150
+ }, {
3151
+ children: "Select date"
3152
+ }))
3153
+ }))]
3154
+ })), jsxRuntime.jsx("span", Object.assign({
3155
+ className: "form-info"
3156
+ }, {
3157
+ children: "Select a date"
3158
+ }))]
3159
+ })), jsxRuntime.jsx("div", Object.assign({
3160
+ ref: datepickerDialogRef,
3161
+ className: `popover popover-datepicker ${state.isActive ? 'active' : ''}`,
3162
+ role: "dialog",
3163
+ "aria-modal": "true",
3164
+ "aria-label": "Choose Date"
3165
+ }, {
3166
+ children: state.isActive && jsxRuntime.jsxs("div", Object.assign({
3167
+ className: "sg-date"
3168
+ }, {
3169
+ children: [jsxRuntime.jsxs("header", {
3170
+ children: [jsxRuntime.jsx("button", Object.assign({
3171
+ className: "link",
3172
+ onClick: () => datepicker.sub(1, 'months')
3173
+ }, {
3174
+ children: jsxRuntime.jsx("i", Object.assign({
3175
+ className: "sg-icon sg-icon-previous"
3176
+ }, {
3177
+ children: "Previous month"
3178
+ }))
3179
+ })), jsxRuntime.jsx(Dropdown, {
3180
+ options: extract.months({}),
3181
+ texts: {
3182
+ placeholder: data.monthName
3183
+ }
3184
+ }), jsxRuntime.jsx(Dropdown, {
3185
+ options: extract.years({}),
3186
+ texts: {
3187
+ placeholder: data.year + ''
3188
+ }
3189
+ }), jsxRuntime.jsx("button", Object.assign({
3190
+ className: "link",
3191
+ onClick: () => datepicker.add(1, 'months')
3192
+ }, {
3193
+ children: jsxRuntime.jsx("i", Object.assign({
3194
+ className: "sg-icon sg-icon-next"
3195
+ }, {
3196
+ children: "Next month"
3197
+ }))
3198
+ }))]
3199
+ }), jsxRuntime.jsx("main", {
3200
+ children: jsxRuntime.jsxs("table", Object.assign({
3201
+ role: "grid"
3202
+ }, {
3203
+ children: [jsxRuntime.jsx("thead", {
3204
+ children: jsxRuntime.jsx("tr", {
3205
+ children: data.calendar.headers.map((header, ix) => jsxRuntime.jsx("th", Object.assign({
3206
+ scope: "col",
3207
+ abbr: header.abbr,
3208
+ className: header.type === 'week' ? 'sg-week-header' : 'sg-day-header'
3209
+ }, {
3210
+ children: header.displayText
3211
+ }), `week_${ix}`))
3212
+ })
3213
+ }), jsxRuntime.jsx("tbody", {
3214
+ children: data.calendar.calendarGrid.map((week, ix) => jsxRuntime.jsxs("tr", {
3215
+ children: [data.calendar.weekNumbers ? jsxRuntime.jsx("th", Object.assign({
3216
+ className: "sg-week-number"
3217
+ }, {
3218
+ children: data.calendar.weekNumbers[ix]
3219
+ })) : '', week.map(day => jsxRuntime.jsx("td", Object.assign({
3220
+ "data-date": day.formattedDate,
3221
+ className: classNames(day),
3222
+ title: day.today ? 'Today' : '',
3223
+ 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,
3224
+ role: day.selected ? 'gridcell' : undefined,
3225
+ "aria-selected": day.selected && !(data === null || data === void 0 ? void 0 : data.highlightedDate) ? true : undefined,
3226
+ onClick: () => {
3227
+ day.currentMonth && datepicker.select(day.date);
3228
+ }
3229
+ }, {
3230
+ children: day.day
3231
+ }), day.day))]
3232
+ }, `week_${ix}`))
3233
+ })]
3234
+ }))
3235
+ })]
3236
+ }))
3237
+ }))]
3238
+ });
3239
+ };
3240
+
3241
+ exports.Alert = AlertRibbon;
3242
+ exports.AlertRibbon = AlertRibbon;
3243
+ exports.Badge = Badge;
3244
+ exports.Button = Button;
3245
+ exports.ButtonGroup = ButtonGroup;
3246
+ exports.Card = Card;
3247
+ exports.Checkbox = Checkbox;
3248
+ exports.Datepicker = Datepicker;
3249
+ exports.Dropdown = Dropdown;
3250
+ exports.EmailInput = EmailInput;
3251
+ exports.Flexbox = Flexbox;
3252
+ exports.Form = Form;
3253
+ exports.FormItems = FormItems;
3254
+ exports.Group = Group;
3255
+ exports.Link = Link;
3256
+ exports.List = List;
3257
+ exports.Modal = Modal;
3258
+ exports.Navbar = Navbar;
3259
+ exports.NumberInput = NumberInput;
3260
+ exports.RadioButton = RadioButton;
3261
+ exports.RadioGroup = RadioGroup;
3262
+ exports.RenderInput = RenderInput;
3263
+ exports.Stepper = Stepper;
3264
+ exports.Text = Text;
3265
+ exports.TextInput = TextInput;
3266
+
3267
+ Object.defineProperty(exports, '__esModule', { value: true });
3268
+
3269
+ }));