@dynamic-labs/wagmi-connector 0.14.10 → 0.14.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,1093 @@
1
- import React, { useRef, useEffect } from 'react';
2
- import { Connector as Connector$1, useConnect, useDisconnect, configureChains, defaultChains, createClient, WagmiConfig } from 'wagmi';
1
+ import React, { useState, useEffect } from 'react';
2
+ import { Connector as Connector$1, useClient, useConnect, useDisconnect, mainnet as mainnet$1, configureChains, createClient, WagmiConfig } from 'wagmi';
3
3
  import { publicProvider } from 'wagmi/providers/public';
4
4
  import { useDynamicContext } from '@dynamic-labs/sdk-react';
5
5
  import { getAddress, hexValue } from 'ethers/lib/utils.js';
6
+ import { mainnet, optimism, gnosis, polygon, arbitrum, bsc } from 'wagmi/chains';
7
+ import { providers } from 'ethers';
8
+
9
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
+
11
+ var check = function (it) {
12
+ return it && it.Math == Math && it;
13
+ };
14
+
15
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
16
+ var global$b =
17
+ // eslint-disable-next-line es/no-global-this -- safe
18
+ check(typeof globalThis == 'object' && globalThis) ||
19
+ check(typeof window == 'object' && window) ||
20
+ // eslint-disable-next-line no-restricted-globals -- safe
21
+ check(typeof self == 'object' && self) ||
22
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
23
+ // eslint-disable-next-line no-new-func -- fallback
24
+ (function () { return this; })() || Function('return this')();
25
+
26
+ var objectGetOwnPropertyDescriptor = {};
27
+
28
+ var fails$c = function (exec) {
29
+ try {
30
+ return !!exec();
31
+ } catch (error) {
32
+ return true;
33
+ }
34
+ };
35
+
36
+ var fails$b = fails$c;
37
+
38
+ // Detect IE8's incomplete defineProperty implementation
39
+ var descriptors = !fails$b(function () {
40
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
41
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
42
+ });
43
+
44
+ var fails$a = fails$c;
45
+
46
+ var functionBindNative = !fails$a(function () {
47
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
48
+ var test = (function () { /* empty */ }).bind();
49
+ // eslint-disable-next-line no-prototype-builtins -- safe
50
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
51
+ });
52
+
53
+ var NATIVE_BIND$1 = functionBindNative;
54
+
55
+ var call$6 = Function.prototype.call;
56
+
57
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
58
+ return call$6.apply(call$6, arguments);
59
+ };
60
+
61
+ var objectPropertyIsEnumerable = {};
62
+
63
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
64
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
65
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
66
+
67
+ // Nashorn ~ JDK8 bug
68
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
69
+
70
+ // `Object.prototype.propertyIsEnumerable` method implementation
71
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
72
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
73
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
74
+ return !!descriptor && descriptor.enumerable;
75
+ } : $propertyIsEnumerable;
76
+
77
+ var createPropertyDescriptor$3 = function (bitmap, value) {
78
+ return {
79
+ enumerable: !(bitmap & 1),
80
+ configurable: !(bitmap & 2),
81
+ writable: !(bitmap & 4),
82
+ value: value
83
+ };
84
+ };
85
+
86
+ var NATIVE_BIND = functionBindNative;
87
+
88
+ var FunctionPrototype$1 = Function.prototype;
89
+ var call$5 = FunctionPrototype$1.call;
90
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
91
+
92
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
93
+ return function () {
94
+ return call$5.apply(fn, arguments);
95
+ };
96
+ };
97
+
98
+ var uncurryThis$a = functionUncurryThis;
99
+
100
+ var toString$3 = uncurryThis$a({}.toString);
101
+ var stringSlice = uncurryThis$a(''.slice);
102
+
103
+ var classofRaw$1 = function (it) {
104
+ return stringSlice(toString$3(it), 8, -1);
105
+ };
106
+
107
+ var uncurryThis$9 = functionUncurryThis;
108
+ var fails$9 = fails$c;
109
+ var classof$3 = classofRaw$1;
110
+
111
+ var $Object$4 = Object;
112
+ var split = uncurryThis$9(''.split);
113
+
114
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
115
+ var indexedObject = fails$9(function () {
116
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
117
+ // eslint-disable-next-line no-prototype-builtins -- safe
118
+ return !$Object$4('z').propertyIsEnumerable(0);
119
+ }) ? function (it) {
120
+ return classof$3(it) == 'String' ? split(it, '') : $Object$4(it);
121
+ } : $Object$4;
122
+
123
+ // we can't use just `it == null` since of `document.all` special case
124
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
125
+ var isNullOrUndefined$2 = function (it) {
126
+ return it === null || it === undefined;
127
+ };
128
+
129
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
130
+
131
+ var $TypeError$7 = TypeError;
132
+
133
+ // `RequireObjectCoercible` abstract operation
134
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
135
+ var requireObjectCoercible$3 = function (it) {
136
+ if (isNullOrUndefined$1(it)) throw $TypeError$7("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$2 = requireObjectCoercible$3;
143
+
144
+ var toIndexedObject$5 = function (it) {
145
+ return IndexedObject$1(requireObjectCoercible$2(it));
146
+ };
147
+
148
+ var documentAll$2 = typeof document == 'object' && document.all;
149
+
150
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
151
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
152
+
153
+ var documentAll_1 = {
154
+ all: documentAll$2,
155
+ IS_HTMLDDA: IS_HTMLDDA
156
+ };
157
+
158
+ var $documentAll$1 = documentAll_1;
159
+
160
+ var documentAll$1 = $documentAll$1.all;
161
+
162
+ // `IsCallable` abstract operation
163
+ // https://tc39.es/ecma262/#sec-iscallable
164
+ var isCallable$f = $documentAll$1.IS_HTMLDDA ? function (argument) {
165
+ return typeof argument == 'function' || argument === documentAll$1;
166
+ } : function (argument) {
167
+ return typeof argument == 'function';
168
+ };
169
+
170
+ var isCallable$e = isCallable$f;
171
+ var $documentAll = documentAll_1;
172
+
173
+ var documentAll = $documentAll.all;
174
+
175
+ var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) {
176
+ return typeof it == 'object' ? it !== null : isCallable$e(it) || it === documentAll;
177
+ } : function (it) {
178
+ return typeof it == 'object' ? it !== null : isCallable$e(it);
179
+ };
180
+
181
+ var global$a = global$b;
182
+ var isCallable$d = isCallable$f;
183
+
184
+ var aFunction = function (argument) {
185
+ return isCallable$d(argument) ? argument : undefined;
186
+ };
187
+
188
+ var getBuiltIn$4 = function (namespace, method) {
189
+ return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
190
+ };
191
+
192
+ var uncurryThis$8 = functionUncurryThis;
193
+
194
+ var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
195
+
196
+ var getBuiltIn$3 = getBuiltIn$4;
197
+
198
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
199
+
200
+ var global$9 = global$b;
201
+ var userAgent = engineUserAgent;
202
+
203
+ var process = global$9.process;
204
+ var Deno = global$9.Deno;
205
+ var versions = process && process.versions || Deno && Deno.version;
206
+ var v8 = versions && versions.v8;
207
+ var match, version;
208
+
209
+ if (v8) {
210
+ match = v8.split('.');
211
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
212
+ // but their correct versions are not interesting for us
213
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
214
+ }
215
+
216
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
217
+ // so check `userAgent` even if `.v8` exists, but 0
218
+ if (!version && userAgent) {
219
+ match = userAgent.match(/Edge\/(\d+)/);
220
+ if (!match || match[1] >= 74) {
221
+ match = userAgent.match(/Chrome\/(\d+)/);
222
+ if (match) version = +match[1];
223
+ }
224
+ }
225
+
226
+ var engineV8Version = version;
227
+
228
+ /* eslint-disable es/no-symbol -- required for testing */
229
+
230
+ var V8_VERSION = engineV8Version;
231
+ var fails$8 = fails$c;
232
+
233
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
234
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
235
+ var symbol = Symbol();
236
+ // Chrome 38 Symbol has incorrect toString conversion
237
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
238
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
239
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
240
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
241
+ });
242
+
243
+ /* eslint-disable es/no-symbol -- required for testing */
244
+
245
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
246
+
247
+ var useSymbolAsUid = NATIVE_SYMBOL$1
248
+ && !Symbol.sham
249
+ && typeof Symbol.iterator == 'symbol';
250
+
251
+ var getBuiltIn$2 = getBuiltIn$4;
252
+ var isCallable$c = isCallable$f;
253
+ var isPrototypeOf = objectIsPrototypeOf;
254
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
255
+
256
+ var $Object$3 = Object;
257
+
258
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
259
+ return typeof it == 'symbol';
260
+ } : function (it) {
261
+ var $Symbol = getBuiltIn$2('Symbol');
262
+ return isCallable$c($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
263
+ };
264
+
265
+ var $String$3 = String;
266
+
267
+ var tryToString$1 = function (argument) {
268
+ try {
269
+ return $String$3(argument);
270
+ } catch (error) {
271
+ return 'Object';
272
+ }
273
+ };
274
+
275
+ var isCallable$b = isCallable$f;
276
+ var tryToString = tryToString$1;
277
+
278
+ var $TypeError$6 = TypeError;
279
+
280
+ // `Assert: IsCallable(argument) is true`
281
+ var aCallable$1 = function (argument) {
282
+ if (isCallable$b(argument)) return argument;
283
+ throw $TypeError$6(tryToString(argument) + ' is not a function');
284
+ };
285
+
286
+ var aCallable = aCallable$1;
287
+ var isNullOrUndefined = isNullOrUndefined$2;
288
+
289
+ // `GetMethod` abstract operation
290
+ // https://tc39.es/ecma262/#sec-getmethod
291
+ var getMethod$1 = function (V, P) {
292
+ var func = V[P];
293
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
294
+ };
295
+
296
+ var call$4 = functionCall;
297
+ var isCallable$a = isCallable$f;
298
+ var isObject$6 = isObject$7;
299
+
300
+ var $TypeError$5 = TypeError;
301
+
302
+ // `OrdinaryToPrimitive` abstract operation
303
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
304
+ var ordinaryToPrimitive$1 = function (input, pref) {
305
+ var fn, val;
306
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
307
+ if (isCallable$a(fn = input.valueOf) && !isObject$6(val = call$4(fn, input))) return val;
308
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
309
+ throw $TypeError$5("Can't convert object to primitive value");
310
+ };
311
+
312
+ var shared$3 = {exports: {}};
313
+
314
+ var global$8 = global$b;
315
+
316
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
317
+ var defineProperty$5 = Object.defineProperty;
318
+
319
+ var defineGlobalProperty$3 = function (key, value) {
320
+ try {
321
+ defineProperty$5(global$8, key, { value: value, configurable: true, writable: true });
322
+ } catch (error) {
323
+ global$8[key] = value;
324
+ } return value;
325
+ };
326
+
327
+ var global$7 = global$b;
328
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
329
+
330
+ var SHARED = '__core-js_shared__';
331
+ var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
332
+
333
+ var sharedStore = store$3;
334
+
335
+ var store$2 = sharedStore;
336
+
337
+ (shared$3.exports = function (key, value) {
338
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
339
+ })('versions', []).push({
340
+ version: '3.26.1',
341
+ mode: 'global',
342
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
343
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
344
+ source: 'https://github.com/zloirock/core-js'
345
+ });
346
+
347
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
348
+
349
+ var $Object$2 = Object;
350
+
351
+ // `ToObject` abstract operation
352
+ // https://tc39.es/ecma262/#sec-toobject
353
+ var toObject$3 = function (argument) {
354
+ return $Object$2(requireObjectCoercible$1(argument));
355
+ };
356
+
357
+ var uncurryThis$7 = functionUncurryThis;
358
+ var toObject$2 = toObject$3;
359
+
360
+ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
361
+
362
+ // `HasOwnProperty` abstract operation
363
+ // https://tc39.es/ecma262/#sec-hasownproperty
364
+ // eslint-disable-next-line es/no-object-hasown -- safe
365
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
366
+ return hasOwnProperty(toObject$2(it), key);
367
+ };
368
+
369
+ var uncurryThis$6 = functionUncurryThis;
370
+
371
+ var id = 0;
372
+ var postfix = Math.random();
373
+ var toString$2 = uncurryThis$6(1.0.toString);
374
+
375
+ var uid$2 = function (key) {
376
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
377
+ };
378
+
379
+ var global$6 = global$b;
380
+ var shared$2 = shared$3.exports;
381
+ var hasOwn$8 = hasOwnProperty_1;
382
+ var uid$1 = uid$2;
383
+ var NATIVE_SYMBOL = symbolConstructorDetection;
384
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
385
+
386
+ var WellKnownSymbolsStore = shared$2('wks');
387
+ var Symbol$1 = global$6.Symbol;
388
+ var symbolFor = Symbol$1 && Symbol$1['for'];
389
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
390
+
391
+ var wellKnownSymbol$a = function (name) {
392
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
393
+ var description = 'Symbol.' + name;
394
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
395
+ WellKnownSymbolsStore[name] = Symbol$1[name];
396
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
397
+ WellKnownSymbolsStore[name] = symbolFor(description);
398
+ } else {
399
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
400
+ }
401
+ } return WellKnownSymbolsStore[name];
402
+ };
403
+
404
+ var call$3 = functionCall;
405
+ var isObject$5 = isObject$7;
406
+ var isSymbol$1 = isSymbol$2;
407
+ var getMethod = getMethod$1;
408
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
409
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
410
+
411
+ var $TypeError$4 = TypeError;
412
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
413
+
414
+ // `ToPrimitive` abstract operation
415
+ // https://tc39.es/ecma262/#sec-toprimitive
416
+ var toPrimitive$1 = function (input, pref) {
417
+ if (!isObject$5(input) || isSymbol$1(input)) return input;
418
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
419
+ var result;
420
+ if (exoticToPrim) {
421
+ if (pref === undefined) pref = 'default';
422
+ result = call$3(exoticToPrim, input, pref);
423
+ if (!isObject$5(result) || isSymbol$1(result)) return result;
424
+ throw $TypeError$4("Can't convert object to primitive value");
425
+ }
426
+ if (pref === undefined) pref = 'number';
427
+ return ordinaryToPrimitive(input, pref);
428
+ };
429
+
430
+ var toPrimitive = toPrimitive$1;
431
+ var isSymbol = isSymbol$2;
432
+
433
+ // `ToPropertyKey` abstract operation
434
+ // https://tc39.es/ecma262/#sec-topropertykey
435
+ var toPropertyKey$2 = function (argument) {
436
+ var key = toPrimitive(argument, 'string');
437
+ return isSymbol(key) ? key : key + '';
438
+ };
439
+
440
+ var global$5 = global$b;
441
+ var isObject$4 = isObject$7;
442
+
443
+ var document$1 = global$5.document;
444
+ // typeof document.createElement is 'object' in old IE
445
+ var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
446
+
447
+ var documentCreateElement$2 = function (it) {
448
+ return EXISTS$1 ? document$1.createElement(it) : {};
449
+ };
450
+
451
+ var DESCRIPTORS$9 = descriptors;
452
+ var fails$7 = fails$c;
453
+ var createElement = documentCreateElement$2;
454
+
455
+ // Thanks to IE8 for its funny defineProperty
456
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
457
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
458
+ return Object.defineProperty(createElement('div'), 'a', {
459
+ get: function () { return 7; }
460
+ }).a != 7;
461
+ });
462
+
463
+ var DESCRIPTORS$8 = descriptors;
464
+ var call$2 = functionCall;
465
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
466
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
467
+ var toIndexedObject$4 = toIndexedObject$5;
468
+ var toPropertyKey$1 = toPropertyKey$2;
469
+ var hasOwn$7 = hasOwnProperty_1;
470
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
471
+
472
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
473
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
474
+
475
+ // `Object.getOwnPropertyDescriptor` method
476
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
477
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
478
+ O = toIndexedObject$4(O);
479
+ P = toPropertyKey$1(P);
480
+ if (IE8_DOM_DEFINE$1) try {
481
+ return $getOwnPropertyDescriptor$1(O, P);
482
+ } catch (error) { /* empty */ }
483
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
484
+ };
485
+
486
+ var objectDefineProperty = {};
487
+
488
+ var DESCRIPTORS$7 = descriptors;
489
+ var fails$6 = fails$c;
490
+
491
+ // V8 ~ Chrome 36-
492
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
493
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
494
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
495
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
496
+ value: 42,
497
+ writable: false
498
+ }).prototype != 42;
499
+ });
500
+
501
+ var isObject$3 = isObject$7;
502
+
503
+ var $String$2 = String;
504
+ var $TypeError$3 = TypeError;
505
+
506
+ // `Assert: Type(argument) is Object`
507
+ var anObject$5 = function (argument) {
508
+ if (isObject$3(argument)) return argument;
509
+ throw $TypeError$3($String$2(argument) + ' is not an object');
510
+ };
511
+
512
+ var DESCRIPTORS$6 = descriptors;
513
+ var IE8_DOM_DEFINE = ie8DomDefine;
514
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
515
+ var anObject$4 = anObject$5;
516
+ var toPropertyKey = toPropertyKey$2;
517
+
518
+ var $TypeError$2 = TypeError;
519
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
520
+ var $defineProperty = Object.defineProperty;
521
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
522
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
523
+ var ENUMERABLE = 'enumerable';
524
+ var CONFIGURABLE$1 = 'configurable';
525
+ var WRITABLE = 'writable';
526
+
527
+ // `Object.defineProperty` method
528
+ // https://tc39.es/ecma262/#sec-object.defineproperty
529
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
530
+ anObject$4(O);
531
+ P = toPropertyKey(P);
532
+ anObject$4(Attributes);
533
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
534
+ var current = $getOwnPropertyDescriptor(O, P);
535
+ if (current && current[WRITABLE]) {
536
+ O[P] = Attributes.value;
537
+ Attributes = {
538
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
539
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
540
+ writable: false
541
+ };
542
+ }
543
+ } return $defineProperty(O, P, Attributes);
544
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
545
+ anObject$4(O);
546
+ P = toPropertyKey(P);
547
+ anObject$4(Attributes);
548
+ if (IE8_DOM_DEFINE) try {
549
+ return $defineProperty(O, P, Attributes);
550
+ } catch (error) { /* empty */ }
551
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
552
+ if ('value' in Attributes) O[P] = Attributes.value;
553
+ return O;
554
+ };
555
+
556
+ var DESCRIPTORS$5 = descriptors;
557
+ var definePropertyModule$3 = objectDefineProperty;
558
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
559
+
560
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
561
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
562
+ } : function (object, key, value) {
563
+ object[key] = value;
564
+ return object;
565
+ };
566
+
567
+ var makeBuiltIn$2 = {exports: {}};
568
+
569
+ var DESCRIPTORS$4 = descriptors;
570
+ var hasOwn$6 = hasOwnProperty_1;
571
+
572
+ var FunctionPrototype = Function.prototype;
573
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
574
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
575
+
576
+ var EXISTS = hasOwn$6(FunctionPrototype, 'name');
577
+ // additional protection from minified / mangled / dropped function names
578
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
579
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
580
+
581
+ var functionName = {
582
+ EXISTS: EXISTS,
583
+ PROPER: PROPER,
584
+ CONFIGURABLE: CONFIGURABLE
585
+ };
586
+
587
+ var uncurryThis$5 = functionUncurryThis;
588
+ var isCallable$9 = isCallable$f;
589
+ var store$1 = sharedStore;
590
+
591
+ var functionToString = uncurryThis$5(Function.toString);
592
+
593
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
594
+ if (!isCallable$9(store$1.inspectSource)) {
595
+ store$1.inspectSource = function (it) {
596
+ return functionToString(it);
597
+ };
598
+ }
599
+
600
+ var inspectSource$1 = store$1.inspectSource;
601
+
602
+ var global$4 = global$b;
603
+ var isCallable$8 = isCallable$f;
604
+
605
+ var WeakMap$1 = global$4.WeakMap;
606
+
607
+ var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
608
+
609
+ var shared$1 = shared$3.exports;
610
+ var uid = uid$2;
611
+
612
+ var keys = shared$1('keys');
613
+
614
+ var sharedKey$3 = function (key) {
615
+ return keys[key] || (keys[key] = uid(key));
616
+ };
617
+
618
+ var hiddenKeys$4 = {};
619
+
620
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
621
+ var global$3 = global$b;
622
+ var isObject$2 = isObject$7;
623
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
624
+ var hasOwn$5 = hasOwnProperty_1;
625
+ var shared = sharedStore;
626
+ var sharedKey$2 = sharedKey$3;
627
+ var hiddenKeys$3 = hiddenKeys$4;
628
+
629
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
630
+ var TypeError$1 = global$3.TypeError;
631
+ var WeakMap = global$3.WeakMap;
632
+ var set, get, has;
633
+
634
+ var enforce = function (it) {
635
+ return has(it) ? get(it) : set(it, {});
636
+ };
637
+
638
+ var getterFor = function (TYPE) {
639
+ return function (it) {
640
+ var state;
641
+ if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
642
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
643
+ } return state;
644
+ };
645
+ };
646
+
647
+ if (NATIVE_WEAK_MAP || shared.state) {
648
+ var store = shared.state || (shared.state = new WeakMap());
649
+ /* eslint-disable no-self-assign -- prototype methods protection */
650
+ store.get = store.get;
651
+ store.has = store.has;
652
+ store.set = store.set;
653
+ /* eslint-enable no-self-assign -- prototype methods protection */
654
+ set = function (it, metadata) {
655
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
656
+ metadata.facade = it;
657
+ store.set(it, metadata);
658
+ return metadata;
659
+ };
660
+ get = function (it) {
661
+ return store.get(it) || {};
662
+ };
663
+ has = function (it) {
664
+ return store.has(it);
665
+ };
666
+ } else {
667
+ var STATE = sharedKey$2('state');
668
+ hiddenKeys$3[STATE] = true;
669
+ set = function (it, metadata) {
670
+ if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
671
+ metadata.facade = it;
672
+ createNonEnumerableProperty$3(it, STATE, metadata);
673
+ return metadata;
674
+ };
675
+ get = function (it) {
676
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
677
+ };
678
+ has = function (it) {
679
+ return hasOwn$5(it, STATE);
680
+ };
681
+ }
682
+
683
+ var internalState = {
684
+ set: set,
685
+ get: get,
686
+ has: has,
687
+ enforce: enforce,
688
+ getterFor: getterFor
689
+ };
690
+
691
+ var fails$5 = fails$c;
692
+ var isCallable$7 = isCallable$f;
693
+ var hasOwn$4 = hasOwnProperty_1;
694
+ var DESCRIPTORS$3 = descriptors;
695
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
696
+ var inspectSource = inspectSource$1;
697
+ var InternalStateModule$1 = internalState;
698
+
699
+ var enforceInternalState = InternalStateModule$1.enforce;
700
+ var getInternalState$1 = InternalStateModule$1.get;
701
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
702
+ var defineProperty$4 = Object.defineProperty;
703
+
704
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
705
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
706
+ });
707
+
708
+ var TEMPLATE = String(String).split('String');
709
+
710
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
711
+ if (String(name).slice(0, 7) === 'Symbol(') {
712
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
713
+ }
714
+ if (options && options.getter) name = 'get ' + name;
715
+ if (options && options.setter) name = 'set ' + name;
716
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
717
+ if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
718
+ else value.name = name;
719
+ }
720
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
721
+ defineProperty$4(value, 'length', { value: options.arity });
722
+ }
723
+ try {
724
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
725
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
726
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
727
+ } else if (value.prototype) value.prototype = undefined;
728
+ } catch (error) { /* empty */ }
729
+ var state = enforceInternalState(value);
730
+ if (!hasOwn$4(state, 'source')) {
731
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
732
+ } return value;
733
+ };
734
+
735
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
736
+ // eslint-disable-next-line no-extend-native -- required
737
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
738
+ return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
739
+ }, 'toString');
740
+
741
+ var isCallable$6 = isCallable$f;
742
+ var definePropertyModule$2 = objectDefineProperty;
743
+ var makeBuiltIn = makeBuiltIn$2.exports;
744
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
745
+
746
+ var defineBuiltIn$3 = function (O, key, value, options) {
747
+ if (!options) options = {};
748
+ var simple = options.enumerable;
749
+ var name = options.name !== undefined ? options.name : key;
750
+ if (isCallable$6(value)) makeBuiltIn(value, name, options);
751
+ if (options.global) {
752
+ if (simple) O[key] = value;
753
+ else defineGlobalProperty$1(key, value);
754
+ } else {
755
+ try {
756
+ if (!options.unsafe) delete O[key];
757
+ else if (O[key]) simple = true;
758
+ } catch (error) { /* empty */ }
759
+ if (simple) O[key] = value;
760
+ else definePropertyModule$2.f(O, key, {
761
+ value: value,
762
+ enumerable: false,
763
+ configurable: !options.nonConfigurable,
764
+ writable: !options.nonWritable
765
+ });
766
+ } return O;
767
+ };
768
+
769
+ var objectGetOwnPropertyNames = {};
770
+
771
+ var ceil = Math.ceil;
772
+ var floor = Math.floor;
773
+
774
+ // `Math.trunc` method
775
+ // https://tc39.es/ecma262/#sec-math.trunc
776
+ // eslint-disable-next-line es/no-math-trunc -- safe
777
+ var mathTrunc = Math.trunc || function trunc(x) {
778
+ var n = +x;
779
+ return (n > 0 ? floor : ceil)(n);
780
+ };
781
+
782
+ var trunc = mathTrunc;
783
+
784
+ // `ToIntegerOrInfinity` abstract operation
785
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
786
+ var toIntegerOrInfinity$2 = function (argument) {
787
+ var number = +argument;
788
+ // eslint-disable-next-line no-self-compare -- NaN check
789
+ return number !== number || number === 0 ? 0 : trunc(number);
790
+ };
791
+
792
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
793
+
794
+ var max = Math.max;
795
+ var min$1 = Math.min;
796
+
797
+ // Helper for a popular repeating case of the spec:
798
+ // Let integer be ? ToInteger(index).
799
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
800
+ var toAbsoluteIndex$1 = function (index, length) {
801
+ var integer = toIntegerOrInfinity$1(index);
802
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
803
+ };
804
+
805
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
806
+
807
+ var min = Math.min;
808
+
809
+ // `ToLength` abstract operation
810
+ // https://tc39.es/ecma262/#sec-tolength
811
+ var toLength$1 = function (argument) {
812
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
813
+ };
814
+
815
+ var toLength = toLength$1;
816
+
817
+ // `LengthOfArrayLike` abstract operation
818
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
819
+ var lengthOfArrayLike$1 = function (obj) {
820
+ return toLength(obj.length);
821
+ };
822
+
823
+ var toIndexedObject$3 = toIndexedObject$5;
824
+ var toAbsoluteIndex = toAbsoluteIndex$1;
825
+ var lengthOfArrayLike = lengthOfArrayLike$1;
826
+
827
+ // `Array.prototype.{ indexOf, includes }` methods implementation
828
+ var createMethod = function (IS_INCLUDES) {
829
+ return function ($this, el, fromIndex) {
830
+ var O = toIndexedObject$3($this);
831
+ var length = lengthOfArrayLike(O);
832
+ var index = toAbsoluteIndex(fromIndex, length);
833
+ var value;
834
+ // Array#includes uses SameValueZero equality algorithm
835
+ // eslint-disable-next-line no-self-compare -- NaN check
836
+ if (IS_INCLUDES && el != el) while (length > index) {
837
+ value = O[index++];
838
+ // eslint-disable-next-line no-self-compare -- NaN check
839
+ if (value != value) return true;
840
+ // Array#indexOf ignores holes, Array#includes - not
841
+ } else for (;length > index; index++) {
842
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
843
+ } return !IS_INCLUDES && -1;
844
+ };
845
+ };
846
+
847
+ var arrayIncludes = {
848
+ // `Array.prototype.includes` method
849
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
850
+ includes: createMethod(true),
851
+ // `Array.prototype.indexOf` method
852
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
853
+ indexOf: createMethod(false)
854
+ };
855
+
856
+ var uncurryThis$4 = functionUncurryThis;
857
+ var hasOwn$3 = hasOwnProperty_1;
858
+ var toIndexedObject$2 = toIndexedObject$5;
859
+ var indexOf = arrayIncludes.indexOf;
860
+ var hiddenKeys$2 = hiddenKeys$4;
861
+
862
+ var push = uncurryThis$4([].push);
863
+
864
+ var objectKeysInternal = function (object, names) {
865
+ var O = toIndexedObject$2(object);
866
+ var i = 0;
867
+ var result = [];
868
+ var key;
869
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
870
+ // Don't enum bug & hidden keys
871
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
872
+ ~indexOf(result, key) || push(result, key);
873
+ }
874
+ return result;
875
+ };
876
+
877
+ // IE8- don't enum bug keys
878
+ var enumBugKeys$3 = [
879
+ 'constructor',
880
+ 'hasOwnProperty',
881
+ 'isPrototypeOf',
882
+ 'propertyIsEnumerable',
883
+ 'toLocaleString',
884
+ 'toString',
885
+ 'valueOf'
886
+ ];
887
+
888
+ var internalObjectKeys$1 = objectKeysInternal;
889
+ var enumBugKeys$2 = enumBugKeys$3;
890
+
891
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
892
+
893
+ // `Object.getOwnPropertyNames` method
894
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
895
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
896
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
897
+ return internalObjectKeys$1(O, hiddenKeys$1);
898
+ };
899
+
900
+ var objectGetOwnPropertySymbols = {};
901
+
902
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
903
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
904
+
905
+ var getBuiltIn$1 = getBuiltIn$4;
906
+ var uncurryThis$3 = functionUncurryThis;
907
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
908
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
909
+ var anObject$3 = anObject$5;
910
+
911
+ var concat$1 = uncurryThis$3([].concat);
912
+
913
+ // all object keys, includes non-enumerable and symbols
914
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
915
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
916
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
917
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
918
+ };
919
+
920
+ var hasOwn$2 = hasOwnProperty_1;
921
+ var ownKeys = ownKeys$1;
922
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
923
+ var definePropertyModule$1 = objectDefineProperty;
924
+
925
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
926
+ var keys = ownKeys(source);
927
+ var defineProperty = definePropertyModule$1.f;
928
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
929
+ for (var i = 0; i < keys.length; i++) {
930
+ var key = keys[i];
931
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
932
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
933
+ }
934
+ }
935
+ };
936
+
937
+ var fails$4 = fails$c;
938
+ var isCallable$5 = isCallable$f;
939
+
940
+ var replacement = /#|\.prototype\./;
941
+
942
+ var isForced$1 = function (feature, detection) {
943
+ var value = data[normalize(feature)];
944
+ return value == POLYFILL ? true
945
+ : value == NATIVE ? false
946
+ : isCallable$5(detection) ? fails$4(detection)
947
+ : !!detection;
948
+ };
949
+
950
+ var normalize = isForced$1.normalize = function (string) {
951
+ return String(string).replace(replacement, '.').toLowerCase();
952
+ };
953
+
954
+ var data = isForced$1.data = {};
955
+ var NATIVE = isForced$1.NATIVE = 'N';
956
+ var POLYFILL = isForced$1.POLYFILL = 'P';
957
+
958
+ var isForced_1 = isForced$1;
959
+
960
+ var global$2 = global$b;
961
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
962
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
963
+ var defineBuiltIn$2 = defineBuiltIn$3;
964
+ var defineGlobalProperty = defineGlobalProperty$3;
965
+ var copyConstructorProperties = copyConstructorProperties$1;
966
+ var isForced = isForced_1;
967
+
968
+ /*
969
+ options.target - name of the target object
970
+ options.global - target is the global object
971
+ options.stat - export as static methods of target
972
+ options.proto - export as prototype methods of target
973
+ options.real - real prototype method for the `pure` version
974
+ options.forced - export even if the native feature is available
975
+ options.bind - bind methods to the target, required for the `pure` version
976
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
977
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
978
+ options.sham - add a flag to not completely full polyfills
979
+ options.enumerable - export as enumerable property
980
+ options.dontCallGetSet - prevent calling a getter on target
981
+ options.name - the .name of the function if it does not match the key
982
+ */
983
+ var _export = function (options, source) {
984
+ var TARGET = options.target;
985
+ var GLOBAL = options.global;
986
+ var STATIC = options.stat;
987
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
988
+ if (GLOBAL) {
989
+ target = global$2;
990
+ } else if (STATIC) {
991
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
992
+ } else {
993
+ target = (global$2[TARGET] || {}).prototype;
994
+ }
995
+ if (target) for (key in source) {
996
+ sourceProperty = source[key];
997
+ if (options.dontCallGetSet) {
998
+ descriptor = getOwnPropertyDescriptor(target, key);
999
+ targetProperty = descriptor && descriptor.value;
1000
+ } else targetProperty = target[key];
1001
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1002
+ // contained in target
1003
+ if (!FORCED && targetProperty !== undefined) {
1004
+ if (typeof sourceProperty == typeof targetProperty) continue;
1005
+ copyConstructorProperties(sourceProperty, targetProperty);
1006
+ }
1007
+ // add a flag to not completely full polyfills
1008
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1009
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1010
+ }
1011
+ defineBuiltIn$2(target, key, sourceProperty, options);
1012
+ }
1013
+ };
1014
+
1015
+ var internalObjectKeys = objectKeysInternal;
1016
+ var enumBugKeys$1 = enumBugKeys$3;
1017
+
1018
+ // `Object.keys` method
1019
+ // https://tc39.es/ecma262/#sec-object.keys
1020
+ // eslint-disable-next-line es/no-object-keys -- safe
1021
+ var objectKeys$2 = Object.keys || function keys(O) {
1022
+ return internalObjectKeys(O, enumBugKeys$1);
1023
+ };
1024
+
1025
+ var DESCRIPTORS$2 = descriptors;
1026
+ var uncurryThis$2 = functionUncurryThis;
1027
+ var call$1 = functionCall;
1028
+ var fails$3 = fails$c;
1029
+ var objectKeys$1 = objectKeys$2;
1030
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1031
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1032
+ var toObject$1 = toObject$3;
1033
+ var IndexedObject = indexedObject;
1034
+
1035
+ // eslint-disable-next-line es/no-object-assign -- safe
1036
+ var $assign = Object.assign;
1037
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1038
+ var defineProperty$3 = Object.defineProperty;
1039
+ var concat = uncurryThis$2([].concat);
1040
+
1041
+ // `Object.assign` method
1042
+ // https://tc39.es/ecma262/#sec-object.assign
1043
+ var objectAssign = !$assign || fails$3(function () {
1044
+ // should have correct order of operations (Edge bug)
1045
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1046
+ enumerable: true,
1047
+ get: function () {
1048
+ defineProperty$3(this, 'b', {
1049
+ value: 3,
1050
+ enumerable: false
1051
+ });
1052
+ }
1053
+ }), { b: 2 })).b !== 1) return true;
1054
+ // should work with symbols and should have deterministic property order (V8 bug)
1055
+ var A = {};
1056
+ var B = {};
1057
+ // eslint-disable-next-line es/no-symbol -- safe
1058
+ var symbol = Symbol();
1059
+ var alphabet = 'abcdefghijklmnopqrst';
1060
+ A[symbol] = 7;
1061
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1062
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1063
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1064
+ var T = toObject$1(target);
1065
+ var argumentsLength = arguments.length;
1066
+ var index = 1;
1067
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1068
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1069
+ while (argumentsLength > index) {
1070
+ var S = IndexedObject(arguments[index++]);
1071
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1072
+ var length = keys.length;
1073
+ var j = 0;
1074
+ var key;
1075
+ while (length > j) {
1076
+ key = keys[j++];
1077
+ if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1078
+ }
1079
+ } return T;
1080
+ } : $assign;
1081
+
1082
+ var $$3 = _export;
1083
+ var assign = objectAssign;
1084
+
1085
+ // `Object.assign` method
1086
+ // https://tc39.es/ecma262/#sec-object.assign
1087
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1088
+ $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1089
+ assign: assign
1090
+ });
6
1091
 
7
1092
  /******************************************************************************
8
1093
  Copyright (c) Microsoft Corporation.
@@ -31,10 +1116,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
31
1116
 
32
1117
  class Connector extends Connector$1 {
33
1118
  constructor({
1119
+ chains,
34
1120
  handleLogOut,
35
1121
  walletConnector
36
1122
  }) {
37
1123
  super({
1124
+ chains,
38
1125
  options: undefined
39
1126
  });
40
1127
  // wagmi properties
@@ -158,9 +1245,16 @@ class Connector extends Connector$1 {
158
1245
  return (_b = this.chains.find(x => x.id === chainId)) !== null && _b !== void 0 ? _b : {
159
1246
  id: chainId,
160
1247
  name: `Chain ${id}`,
1248
+ nativeCurrency: {
1249
+ decimals: 18,
1250
+ name: 'Ether',
1251
+ symbol: 'ETH'
1252
+ },
161
1253
  network: `${id}`,
162
1254
  rpcUrls: {
163
- default: ''
1255
+ default: {
1256
+ http: ['']
1257
+ }
164
1258
  }
165
1259
  };
166
1260
  });
@@ -170,12 +1264,558 @@ class Connector extends Connector$1 {
170
1264
  }
171
1265
  }
172
1266
 
173
- const SyncDynamicWagmi = ({
1267
+ var objectDefineProperties = {};
1268
+
1269
+ var DESCRIPTORS$1 = descriptors;
1270
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1271
+ var definePropertyModule = objectDefineProperty;
1272
+ var anObject$2 = anObject$5;
1273
+ var toIndexedObject$1 = toIndexedObject$5;
1274
+ var objectKeys = objectKeys$2;
1275
+
1276
+ // `Object.defineProperties` method
1277
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1278
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1279
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1280
+ anObject$2(O);
1281
+ var props = toIndexedObject$1(Properties);
1282
+ var keys = objectKeys(Properties);
1283
+ var length = keys.length;
1284
+ var index = 0;
1285
+ var key;
1286
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1287
+ return O;
1288
+ };
1289
+
1290
+ var getBuiltIn = getBuiltIn$4;
1291
+
1292
+ var html$1 = getBuiltIn('document', 'documentElement');
1293
+
1294
+ /* global ActiveXObject -- old IE, WSH */
1295
+
1296
+ var anObject$1 = anObject$5;
1297
+ var definePropertiesModule = objectDefineProperties;
1298
+ var enumBugKeys = enumBugKeys$3;
1299
+ var hiddenKeys = hiddenKeys$4;
1300
+ var html = html$1;
1301
+ var documentCreateElement$1 = documentCreateElement$2;
1302
+ var sharedKey$1 = sharedKey$3;
1303
+
1304
+ var GT = '>';
1305
+ var LT = '<';
1306
+ var PROTOTYPE = 'prototype';
1307
+ var SCRIPT = 'script';
1308
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1309
+
1310
+ var EmptyConstructor = function () { /* empty */ };
1311
+
1312
+ var scriptTag = function (content) {
1313
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1314
+ };
1315
+
1316
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1317
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1318
+ activeXDocument.write(scriptTag(''));
1319
+ activeXDocument.close();
1320
+ var temp = activeXDocument.parentWindow.Object;
1321
+ activeXDocument = null; // avoid memory leak
1322
+ return temp;
1323
+ };
1324
+
1325
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1326
+ var NullProtoObjectViaIFrame = function () {
1327
+ // Thrash, waste and sodomy: IE GC bug
1328
+ var iframe = documentCreateElement$1('iframe');
1329
+ var JS = 'java' + SCRIPT + ':';
1330
+ var iframeDocument;
1331
+ iframe.style.display = 'none';
1332
+ html.appendChild(iframe);
1333
+ // https://github.com/zloirock/core-js/issues/475
1334
+ iframe.src = String(JS);
1335
+ iframeDocument = iframe.contentWindow.document;
1336
+ iframeDocument.open();
1337
+ iframeDocument.write(scriptTag('document.F=Object'));
1338
+ iframeDocument.close();
1339
+ return iframeDocument.F;
1340
+ };
1341
+
1342
+ // Check for document.domain and active x support
1343
+ // No need to use active x approach when document.domain is not set
1344
+ // see https://github.com/es-shims/es5-shim/issues/150
1345
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1346
+ // avoid IE GC bug
1347
+ var activeXDocument;
1348
+ var NullProtoObject = function () {
1349
+ try {
1350
+ activeXDocument = new ActiveXObject('htmlfile');
1351
+ } catch (error) { /* ignore */ }
1352
+ NullProtoObject = typeof document != 'undefined'
1353
+ ? document.domain && activeXDocument
1354
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1355
+ : NullProtoObjectViaIFrame()
1356
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1357
+ var length = enumBugKeys.length;
1358
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1359
+ return NullProtoObject();
1360
+ };
1361
+
1362
+ hiddenKeys[IE_PROTO$1] = true;
1363
+
1364
+ // `Object.create` method
1365
+ // https://tc39.es/ecma262/#sec-object.create
1366
+ // eslint-disable-next-line es/no-object-create -- safe
1367
+ var objectCreate = Object.create || function create(O, Properties) {
1368
+ var result;
1369
+ if (O !== null) {
1370
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
1371
+ result = new EmptyConstructor();
1372
+ EmptyConstructor[PROTOTYPE] = null;
1373
+ // add "__proto__" for Object.getPrototypeOf polyfill
1374
+ result[IE_PROTO$1] = O;
1375
+ } else result = NullProtoObject();
1376
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1377
+ };
1378
+
1379
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
1380
+ var create$1 = objectCreate;
1381
+ var defineProperty$2 = objectDefineProperty.f;
1382
+
1383
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1384
+ var ArrayPrototype = Array.prototype;
1385
+
1386
+ // Array.prototype[@@unscopables]
1387
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1388
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1389
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1390
+ configurable: true,
1391
+ value: create$1(null)
1392
+ });
1393
+ }
1394
+
1395
+ // add a key to Array.prototype[@@unscopables]
1396
+ var addToUnscopables$2 = function (key) {
1397
+ ArrayPrototype[UNSCOPABLES][key] = true;
1398
+ };
1399
+
1400
+ var iterators = {};
1401
+
1402
+ var fails$2 = fails$c;
1403
+
1404
+ var correctPrototypeGetter = !fails$2(function () {
1405
+ function F() { /* empty */ }
1406
+ F.prototype.constructor = null;
1407
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1408
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1409
+ });
1410
+
1411
+ var hasOwn$1 = hasOwnProperty_1;
1412
+ var isCallable$4 = isCallable$f;
1413
+ var toObject = toObject$3;
1414
+ var sharedKey = sharedKey$3;
1415
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1416
+
1417
+ var IE_PROTO = sharedKey('IE_PROTO');
1418
+ var $Object$1 = Object;
1419
+ var ObjectPrototype = $Object$1.prototype;
1420
+
1421
+ // `Object.getPrototypeOf` method
1422
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1423
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1424
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1425
+ var object = toObject(O);
1426
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1427
+ var constructor = object.constructor;
1428
+ if (isCallable$4(constructor) && object instanceof constructor) {
1429
+ return constructor.prototype;
1430
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1431
+ };
1432
+
1433
+ var fails$1 = fails$c;
1434
+ var isCallable$3 = isCallable$f;
1435
+ var isObject$1 = isObject$7;
1436
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1437
+ var defineBuiltIn$1 = defineBuiltIn$3;
1438
+ var wellKnownSymbol$7 = wellKnownSymbol$a;
1439
+
1440
+ var ITERATOR$2 = wellKnownSymbol$7('iterator');
1441
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1442
+
1443
+ // `%IteratorPrototype%` object
1444
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1445
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1446
+
1447
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1448
+ if ([].keys) {
1449
+ arrayIterator = [].keys();
1450
+ // Safari 8 has buggy iterators w/o `next`
1451
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1452
+ else {
1453
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1454
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1455
+ }
1456
+ }
1457
+
1458
+ var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails$1(function () {
1459
+ var test = {};
1460
+ // FF44- legacy iterators case
1461
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1462
+ });
1463
+
1464
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1465
+
1466
+ // `%IteratorPrototype%[@@iterator]()` method
1467
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1468
+ if (!isCallable$3(IteratorPrototype$2[ITERATOR$2])) {
1469
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1470
+ return this;
1471
+ });
1472
+ }
1473
+
1474
+ var iteratorsCore = {
1475
+ IteratorPrototype: IteratorPrototype$2,
1476
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1477
+ };
1478
+
1479
+ var defineProperty$1 = objectDefineProperty.f;
1480
+ var hasOwn = hasOwnProperty_1;
1481
+ var wellKnownSymbol$6 = wellKnownSymbol$a;
1482
+
1483
+ var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
1484
+
1485
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1486
+ if (target && !STATIC) target = target.prototype;
1487
+ if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1488
+ defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1489
+ }
1490
+ };
1491
+
1492
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1493
+ var create = objectCreate;
1494
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1495
+ var setToStringTag$1 = setToStringTag$2;
1496
+ var Iterators$2 = iterators;
1497
+
1498
+ var returnThis$1 = function () { return this; };
1499
+
1500
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1501
+ var TO_STRING_TAG = NAME + ' Iterator';
1502
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1503
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1504
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1505
+ return IteratorConstructor;
1506
+ };
1507
+
1508
+ var isCallable$2 = isCallable$f;
1509
+
1510
+ var $String$1 = String;
1511
+ var $TypeError$1 = TypeError;
1512
+
1513
+ var aPossiblePrototype$1 = function (argument) {
1514
+ if (typeof argument == 'object' || isCallable$2(argument)) return argument;
1515
+ throw $TypeError$1("Can't set " + $String$1(argument) + ' as a prototype');
1516
+ };
1517
+
1518
+ /* eslint-disable no-proto -- safe */
1519
+
1520
+ var uncurryThis$1 = functionUncurryThis;
1521
+ var anObject = anObject$5;
1522
+ var aPossiblePrototype = aPossiblePrototype$1;
1523
+
1524
+ // `Object.setPrototypeOf` method
1525
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1526
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1527
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1528
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1529
+ var CORRECT_SETTER = false;
1530
+ var test = {};
1531
+ var setter;
1532
+ try {
1533
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1534
+ setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1535
+ setter(test, []);
1536
+ CORRECT_SETTER = test instanceof Array;
1537
+ } catch (error) { /* empty */ }
1538
+ return function setPrototypeOf(O, proto) {
1539
+ anObject(O);
1540
+ aPossiblePrototype(proto);
1541
+ if (CORRECT_SETTER) setter(O, proto);
1542
+ else O.__proto__ = proto;
1543
+ return O;
1544
+ };
1545
+ }() : undefined);
1546
+
1547
+ var $$2 = _export;
1548
+ var call = functionCall;
1549
+ var FunctionName = functionName;
1550
+ var isCallable$1 = isCallable$f;
1551
+ var createIteratorConstructor = iteratorCreateConstructor;
1552
+ var getPrototypeOf = objectGetPrototypeOf;
1553
+ var setPrototypeOf = objectSetPrototypeOf;
1554
+ var setToStringTag = setToStringTag$2;
1555
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1556
+ var defineBuiltIn = defineBuiltIn$3;
1557
+ var wellKnownSymbol$5 = wellKnownSymbol$a;
1558
+ var Iterators$1 = iterators;
1559
+ var IteratorsCore = iteratorsCore;
1560
+
1561
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1562
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1563
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1564
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1565
+ var ITERATOR$1 = wellKnownSymbol$5('iterator');
1566
+ var KEYS = 'keys';
1567
+ var VALUES = 'values';
1568
+ var ENTRIES = 'entries';
1569
+
1570
+ var returnThis = function () { return this; };
1571
+
1572
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1573
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1574
+
1575
+ var getIterationMethod = function (KIND) {
1576
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1577
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1578
+ switch (KIND) {
1579
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1580
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1581
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1582
+ } return function () { return new IteratorConstructor(this); };
1583
+ };
1584
+
1585
+ var TO_STRING_TAG = NAME + ' Iterator';
1586
+ var INCORRECT_VALUES_NAME = false;
1587
+ var IterablePrototype = Iterable.prototype;
1588
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1589
+ || IterablePrototype['@@iterator']
1590
+ || DEFAULT && IterablePrototype[DEFAULT];
1591
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1592
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1593
+ var CurrentIteratorPrototype, methods, KEY;
1594
+
1595
+ // fix native
1596
+ if (anyNativeIterator) {
1597
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1598
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1599
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1600
+ if (setPrototypeOf) {
1601
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1602
+ } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$1])) {
1603
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1604
+ }
1605
+ }
1606
+ // Set @@toStringTag to native iterators
1607
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1608
+ }
1609
+ }
1610
+
1611
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1612
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1613
+ if (CONFIGURABLE_FUNCTION_NAME) {
1614
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1615
+ } else {
1616
+ INCORRECT_VALUES_NAME = true;
1617
+ defaultIterator = function values() { return call(nativeIterator, this); };
1618
+ }
1619
+ }
1620
+
1621
+ // export additional methods
1622
+ if (DEFAULT) {
1623
+ methods = {
1624
+ values: getIterationMethod(VALUES),
1625
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1626
+ entries: getIterationMethod(ENTRIES)
1627
+ };
1628
+ if (FORCED) for (KEY in methods) {
1629
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1630
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1631
+ }
1632
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1633
+ }
1634
+
1635
+ // define iterator
1636
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1637
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1638
+ }
1639
+ Iterators$1[NAME] = defaultIterator;
1640
+
1641
+ return methods;
1642
+ };
1643
+
1644
+ // `CreateIterResultObject` abstract operation
1645
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1646
+ var createIterResultObject$1 = function (value, done) {
1647
+ return { value: value, done: done };
1648
+ };
1649
+
1650
+ var toIndexedObject = toIndexedObject$5;
1651
+ var addToUnscopables$1 = addToUnscopables$2;
1652
+ var Iterators = iterators;
1653
+ var InternalStateModule = internalState;
1654
+ var defineProperty = objectDefineProperty.f;
1655
+ var defineIterator = iteratorDefine;
1656
+ var createIterResultObject = createIterResultObject$1;
1657
+ var DESCRIPTORS = descriptors;
1658
+
1659
+ var ARRAY_ITERATOR = 'Array Iterator';
1660
+ var setInternalState = InternalStateModule.set;
1661
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1662
+
1663
+ // `Array.prototype.entries` method
1664
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1665
+ // `Array.prototype.keys` method
1666
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1667
+ // `Array.prototype.values` method
1668
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1669
+ // `Array.prototype[@@iterator]` method
1670
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1671
+ // `CreateArrayIterator` internal method
1672
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1673
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1674
+ setInternalState(this, {
1675
+ type: ARRAY_ITERATOR,
1676
+ target: toIndexedObject(iterated), // target
1677
+ index: 0, // next index
1678
+ kind: kind // kind
1679
+ });
1680
+ // `%ArrayIteratorPrototype%.next` method
1681
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1682
+ }, function () {
1683
+ var state = getInternalState(this);
1684
+ var target = state.target;
1685
+ var kind = state.kind;
1686
+ var index = state.index++;
1687
+ if (!target || index >= target.length) {
1688
+ state.target = undefined;
1689
+ return createIterResultObject(undefined, true);
1690
+ }
1691
+ if (kind == 'keys') return createIterResultObject(index, false);
1692
+ if (kind == 'values') return createIterResultObject(target[index], false);
1693
+ return createIterResultObject([index, target[index]], false);
1694
+ }, 'values');
1695
+
1696
+ // argumentsList[@@iterator] is %ArrayProto_values%
1697
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1698
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1699
+ var values = Iterators.Arguments = Iterators.Array;
1700
+
1701
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1702
+ addToUnscopables$1('keys');
1703
+ addToUnscopables$1('values');
1704
+ addToUnscopables$1('entries');
1705
+
1706
+ // V8 ~ Chrome 45- bug
1707
+ if (DESCRIPTORS && values.name !== 'values') try {
1708
+ defineProperty(values, 'name', { value: 'values' });
1709
+ } catch (error) { /* empty */ }
1710
+
1711
+ // iterable DOM collections
1712
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1713
+ var domIterables = {
1714
+ CSSRuleList: 0,
1715
+ CSSStyleDeclaration: 0,
1716
+ CSSValueList: 0,
1717
+ ClientRectList: 0,
1718
+ DOMRectList: 0,
1719
+ DOMStringList: 0,
1720
+ DOMTokenList: 1,
1721
+ DataTransferItemList: 0,
1722
+ FileList: 0,
1723
+ HTMLAllCollection: 0,
1724
+ HTMLCollection: 0,
1725
+ HTMLFormElement: 0,
1726
+ HTMLSelectElement: 0,
1727
+ MediaList: 0,
1728
+ MimeTypeArray: 0,
1729
+ NamedNodeMap: 0,
1730
+ NodeList: 1,
1731
+ PaintRequestList: 0,
1732
+ Plugin: 0,
1733
+ PluginArray: 0,
1734
+ SVGLengthList: 0,
1735
+ SVGNumberList: 0,
1736
+ SVGPathSegList: 0,
1737
+ SVGPointList: 0,
1738
+ SVGStringList: 0,
1739
+ SVGTransformList: 0,
1740
+ SourceBufferList: 0,
1741
+ StyleSheetList: 0,
1742
+ TextTrackCueList: 0,
1743
+ TextTrackList: 0,
1744
+ TouchList: 0
1745
+ };
1746
+
1747
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1748
+ var documentCreateElement = documentCreateElement$2;
1749
+
1750
+ var classList = documentCreateElement('span').classList;
1751
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1752
+
1753
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1754
+
1755
+ var global$1 = global$b;
1756
+ var DOMIterables = domIterables;
1757
+ var DOMTokenListPrototype = domTokenListPrototype;
1758
+ var ArrayIteratorMethods = es_array_iterator;
1759
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1760
+ var wellKnownSymbol$4 = wellKnownSymbol$a;
1761
+
1762
+ var ITERATOR = wellKnownSymbol$4('iterator');
1763
+ var TO_STRING_TAG$2 = wellKnownSymbol$4('toStringTag');
1764
+ var ArrayValues = ArrayIteratorMethods.values;
1765
+
1766
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1767
+ if (CollectionPrototype) {
1768
+ // some Chrome versions have non-configurable methods on DOMTokenList
1769
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1770
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1771
+ } catch (error) {
1772
+ CollectionPrototype[ITERATOR] = ArrayValues;
1773
+ }
1774
+ if (!CollectionPrototype[TO_STRING_TAG$2]) {
1775
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1776
+ }
1777
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1778
+ // some Chrome versions have non-configurable methods on DOMTokenList
1779
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1780
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1781
+ } catch (error) {
1782
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1783
+ }
1784
+ }
1785
+ }
1786
+ };
1787
+
1788
+ for (var COLLECTION_NAME in DOMIterables) {
1789
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1790
+ }
1791
+
1792
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1793
+
1794
+ const IsBrowser = ({
174
1795
  children
1796
+ }) => {
1797
+ const [isBrowser, setIsBrowser] = useState(false);
1798
+ // this useEffect does not run during SSR
1799
+ useEffect(() => {
1800
+ setIsBrowser(true);
1801
+ }, []);
1802
+ if (!isBrowser) {
1803
+ // Justification: We specifically need to return an element instead of null
1804
+ // in order to have stable content during SSR
1805
+ return /*#__PURE__*/React.createElement(React.Fragment);
1806
+ }
1807
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
1808
+ };
1809
+
1810
+ const SyncDynamicWagmi = ({
1811
+ children,
1812
+ connector
175
1813
  }) => {
176
1814
  const {
177
- walletConnector,
178
- handleLogOut
1815
+ status: clientStatus
1816
+ } = useClient();
1817
+ const {
1818
+ walletConnector
179
1819
  } = useDynamicContext();
180
1820
  const {
181
1821
  connect,
@@ -184,51 +1824,278 @@ const SyncDynamicWagmi = ({
184
1824
  const {
185
1825
  disconnect
186
1826
  } = useDisconnect();
187
- // storing as a singleton so we can re-setup event listeners on the same instance
188
- const dynamicWagmiConnector = useRef();
189
1827
  if (walletConnector) {
190
1828
  // after connection is successful, re-setup event listeners after a short delay
191
1829
  // so that they are not cleared by the teardown in useWalletEventListeners
192
1830
  if (status === 'success') {
193
1831
  setTimeout(() => {
194
- var _a;
195
- (_a = dynamicWagmiConnector.current) === null || _a === void 0 ? void 0 : _a.setupEventListeners();
1832
+ connector === null || connector === void 0 ? void 0 : connector.setupEventListeners();
196
1833
  }, 100);
197
1834
  }
198
1835
  }
199
1836
  useEffect(() => {
200
1837
  if (!walletConnector) {
201
- dynamicWagmiConnector.current = undefined;
202
1838
  disconnect();
203
- } else if (!dynamicWagmiConnector.current) {
204
- dynamicWagmiConnector.current = new Connector({
205
- handleLogOut,
206
- walletConnector
207
- });
1839
+ } else if (connector && clientStatus !== 'connected') {
208
1840
  connect({
209
- connector: dynamicWagmiConnector.current
1841
+ connector
210
1842
  });
211
1843
  }
212
- }, [connect, disconnect, handleLogOut, status, walletConnector]);
1844
+ }, [clientStatus, connect, connector, disconnect, walletConnector]);
213
1845
  // use React.createElement to prevent bunding react/jsx-runtime,
214
1846
  // which is not compatible when bundling apps using React 17
215
- return /*#__PURE__*/React.createElement(React.Fragment, null, children);
1847
+ return /*#__PURE__*/React.createElement(IsBrowser, null, children);
1848
+ };
1849
+
1850
+ var $$1 = _export;
1851
+ var $includes = arrayIncludes.includes;
1852
+ var fails = fails$c;
1853
+ var addToUnscopables = addToUnscopables$2;
1854
+
1855
+ // FF99+ bug
1856
+ var BROKEN_ON_SPARSE = fails(function () {
1857
+ return !Array(1).includes();
1858
+ });
1859
+
1860
+ // `Array.prototype.includes` method
1861
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
1862
+ $$1({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1863
+ includes: function includes(el /* , fromIndex = 0 */) {
1864
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1865
+ }
1866
+ });
1867
+
1868
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1869
+ addToUnscopables('includes');
1870
+
1871
+ var isObject = isObject$7;
1872
+ var classof$2 = classofRaw$1;
1873
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
1874
+
1875
+ var MATCH$1 = wellKnownSymbol$3('match');
1876
+
1877
+ // `IsRegExp` abstract operation
1878
+ // https://tc39.es/ecma262/#sec-isregexp
1879
+ var isRegexp = function (it) {
1880
+ var isRegExp;
1881
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
1882
+ };
1883
+
1884
+ var isRegExp = isRegexp;
1885
+
1886
+ var $TypeError = TypeError;
1887
+
1888
+ var notARegexp = function (it) {
1889
+ if (isRegExp(it)) {
1890
+ throw $TypeError("The method doesn't accept regular expressions");
1891
+ } return it;
1892
+ };
1893
+
1894
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
1895
+
1896
+ var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1897
+ var test = {};
1898
+
1899
+ test[TO_STRING_TAG$1] = 'z';
1900
+
1901
+ var toStringTagSupport = String(test) === '[object z]';
1902
+
1903
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1904
+ var isCallable = isCallable$f;
1905
+ var classofRaw = classofRaw$1;
1906
+ var wellKnownSymbol$1 = wellKnownSymbol$a;
1907
+
1908
+ var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
1909
+ var $Object = Object;
1910
+
1911
+ // ES3 wrong here
1912
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1913
+
1914
+ // fallback for IE11 Script Access Denied error
1915
+ var tryGet = function (it, key) {
1916
+ try {
1917
+ return it[key];
1918
+ } catch (error) { /* empty */ }
1919
+ };
1920
+
1921
+ // getting tag from ES6+ `Object.prototype.toString`
1922
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1923
+ var O, tag, result;
1924
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1925
+ // @@toStringTag case
1926
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1927
+ // builtinTag case
1928
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1929
+ // ES3 arguments fallback
1930
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1931
+ };
1932
+
1933
+ var classof = classof$1;
1934
+
1935
+ var $String = String;
1936
+
1937
+ var toString$1 = function (argument) {
1938
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1939
+ return $String(argument);
1940
+ };
1941
+
1942
+ var wellKnownSymbol = wellKnownSymbol$a;
1943
+
1944
+ var MATCH = wellKnownSymbol('match');
1945
+
1946
+ var correctIsRegexpLogic = function (METHOD_NAME) {
1947
+ var regexp = /./;
1948
+ try {
1949
+ '/./'[METHOD_NAME](regexp);
1950
+ } catch (error1) {
1951
+ try {
1952
+ regexp[MATCH] = false;
1953
+ return '/./'[METHOD_NAME](regexp);
1954
+ } catch (error2) { /* empty */ }
1955
+ } return false;
1956
+ };
1957
+
1958
+ var $ = _export;
1959
+ var uncurryThis = functionUncurryThis;
1960
+ var notARegExp = notARegexp;
1961
+ var requireObjectCoercible = requireObjectCoercible$3;
1962
+ var toString = toString$1;
1963
+ var correctIsRegExpLogic = correctIsRegexpLogic;
1964
+
1965
+ var stringIndexOf = uncurryThis(''.indexOf);
1966
+
1967
+ // `String.prototype.includes` method
1968
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
1969
+ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1970
+ includes: function includes(searchString /* , position = 0 */) {
1971
+ return !!~stringIndexOf(
1972
+ toString(requireObjectCoercible(this)),
1973
+ toString(notARegExp(searchString)),
1974
+ arguments.length > 1 ? arguments[1] : undefined
1975
+ );
1976
+ }
1977
+ });
1978
+
1979
+ /**
1980
+ * this is to map chains from Dynamic to the corresponding chain in Wagmi, if it exists.
1981
+ * this is so that the exact same chain object is used across renders, which is important for
1982
+ * the underlying ethers library to work correctly.
1983
+ */
1984
+ const mapping = {
1985
+ 1: mainnet,
1986
+ 10: optimism,
1987
+ 100: gnosis,
1988
+ 137: polygon,
1989
+ 42161: arbitrum,
1990
+ 56: bsc
1991
+ };
1992
+ const mapDynamicChainToWagmi = dynamicChain => {
1993
+ var _a, _b, _c, _d, _e;
1994
+ const wagmiChain = mapping[dynamicChain.chainId];
1995
+ if (wagmiChain) {
1996
+ return wagmiChain;
1997
+ }
1998
+ const rpcUrls = {
1999
+ default: {
2000
+ http: dynamicChain.rpcUrls
2001
+ }
2002
+ };
2003
+ const alchemyUrl = (_a = dynamicChain.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a.find(url => url.includes('alchemy'));
2004
+ if (alchemyUrl) {
2005
+ rpcUrls.alchemy = {
2006
+ http: [alchemyUrl]
2007
+ };
2008
+ }
2009
+ const infuraUrl = (_b = dynamicChain.privateCustomerRpcUrls) === null || _b === void 0 ? void 0 : _b.find(url => url.includes('infura'));
2010
+ if (infuraUrl) {
2011
+ rpcUrls.infura = {
2012
+ http: [infuraUrl]
2013
+ };
2014
+ }
2015
+ return {
2016
+ blockExplorers: {
2017
+ default: {
2018
+ name: '',
2019
+ url: (_d = (_c = dynamicChain.blockExplorerUrls) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : ''
2020
+ }
2021
+ },
2022
+ id: dynamicChain.chainId,
2023
+ name: (_e = dynamicChain.vanityName) !== null && _e !== void 0 ? _e : dynamicChain.chainName,
2024
+ nativeCurrency: dynamicChain.nativeCurrency,
2025
+ network: dynamicChain.chainName,
2026
+ rpcUrls
2027
+ };
2028
+ };
2029
+
2030
+ const getWagmiChainsFromDynamicChains = dynamicChains => {
2031
+ const mappedChains = dynamicChains.map(mapDynamicChainToWagmi);
2032
+ return mappedChains.length > 0 ? mappedChains : [mainnet$1];
2033
+ };
2034
+
2035
+ const getWagmiProvidersFromDynamicChains = dynamicChains => {
2036
+ var _a;
2037
+ const wagmiProviders = [];
2038
+ for (const dynamicChain of dynamicChains) {
2039
+ for (const url of (_a = dynamicChain.privateCustomerRpcUrls) !== null && _a !== void 0 ? _a : []) {
2040
+ wagmiProviders.push(chain => {
2041
+ if (chain.id !== dynamicChain.chainId) return null;
2042
+ return {
2043
+ chain,
2044
+ provider: () => new providers.JsonRpcProvider(url, chain.id)
2045
+ };
2046
+ });
2047
+ }
2048
+ }
2049
+ return [...wagmiProviders, publicProvider()];
216
2050
  };
217
2051
 
218
2052
  const {
219
2053
  provider
220
- } = configureChains(defaultChains, [publicProvider()]);
2054
+ } = configureChains([mainnet$1], [publicProvider()]);
221
2055
  const client = createClient({
222
2056
  provider
223
2057
  });
2058
+ /**
2059
+ * we create a "default" (static chain and provider) client to use in the WagmiConfig
2060
+ * until we've loaded the dynamic chains and providers, at which point we update the client
2061
+ */
2062
+ let connector = undefined;
224
2063
  const DynamicWagmiConnector = ({
225
2064
  children
226
- }) =>
227
- /*#__PURE__*/
228
- // use React.createElement to prevent bunding react/jsx-runtime,
229
- // which is not compatible when bundling apps using React 17
230
- React.createElement(WagmiConfig, {
231
- client: client
232
- }, /*#__PURE__*/React.createElement(SyncDynamicWagmi, null, children));
2065
+ }) => {
2066
+ var _a;
2067
+ const {
2068
+ networkConfigurations,
2069
+ walletConnector,
2070
+ handleLogOut
2071
+ } = useDynamicContext();
2072
+ const evmNetworks = (_a = networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) !== null && _a !== void 0 ? _a : [];
2073
+ const mappedChains = getWagmiChainsFromDynamicChains(evmNetworks);
2074
+ const mappedProviders = getWagmiProvidersFromDynamicChains(evmNetworks);
2075
+ const {
2076
+ chains,
2077
+ provider
2078
+ } = configureChains(mappedChains, mappedProviders);
2079
+ if (!connector && walletConnector) {
2080
+ connector = new Connector({
2081
+ chains,
2082
+ handleLogOut,
2083
+ walletConnector
2084
+ });
2085
+ } else if (connector && !walletConnector) {
2086
+ connector = undefined;
2087
+ }
2088
+ client.config = Object.assign(Object.assign({}, client.config), {
2089
+ connectors: connector ? [connector] : [],
2090
+ provider
2091
+ });
2092
+ // use React.createElement to prevent bunding react/jsx-runtime,
2093
+ // which is not compatible when bundling apps using React 17
2094
+ return /*#__PURE__*/React.createElement(WagmiConfig, {
2095
+ client: client
2096
+ }, /*#__PURE__*/React.createElement(SyncDynamicWagmi, {
2097
+ connector
2098
+ }, children));
2099
+ };
233
2100
 
234
2101
  export { DynamicWagmiConnector };