@rabbitio/ui-kit 1.0.0-beta.1 → 1.0.0-beta.11

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 (52) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/README.md +23 -16
  3. package/dist/index.cjs +2754 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.css +8758 -0
  6. package/dist/index.css.map +1 -0
  7. package/dist/index.modern.js +2529 -0
  8. package/dist/index.modern.js.map +1 -0
  9. package/dist/index.module.js +2735 -0
  10. package/dist/index.module.js.map +1 -0
  11. package/dist/index.umd.js +2758 -0
  12. package/dist/index.umd.js.map +1 -0
  13. package/index.js +1 -1
  14. package/package.json +21 -25
  15. package/src/common/amountUtils.js +423 -0
  16. package/src/common/errorUtils.js +27 -0
  17. package/src/common/fiatCurrenciesService.js +161 -0
  18. package/src/common/models/blockchain.js +10 -0
  19. package/src/common/models/coin.js +157 -0
  20. package/src/common/models/protocol.js +5 -0
  21. package/src/common/utils/cache.js +268 -0
  22. package/src/common/utils/logging/logger.js +48 -0
  23. package/src/common/utils/logging/logsStorage.js +61 -0
  24. package/src/common/utils/safeStringify.js +50 -0
  25. package/src/components/atoms/AssetIcon/AssetIcon.jsx +55 -0
  26. package/src/components/atoms/AssetIcon/asset-icon.module.scss +42 -0
  27. package/{stories → src/components}/atoms/LoadingDots/LoadingDots.module.scss +1 -1
  28. package/src/components/atoms/SupportChat/SupportChat.jsx +40 -0
  29. package/{stories → src/components}/atoms/buttons/Button/Button.jsx +6 -6
  30. package/{stories → src/components}/atoms/buttons/Button/Button.module.scss +6 -1
  31. package/src/index.js +23 -0
  32. package/src/swaps-lib/external-apis/swapProvider.js +169 -0
  33. package/src/swaps-lib/models/existingSwap.js +58 -0
  34. package/styles/index.scss +10 -10
  35. package/dist/node/52a99d58a36f2b7a78b3.ttf +0 -0
  36. package/dist/node/662b866576cfea51dd64.ttf +0 -0
  37. package/dist/node/7f9eed4cca4d0ae6a772.ttf +0 -0
  38. package/dist/node/8268666c3b2ca2ec11c0.ttf +0 -0
  39. package/dist/node/87d9266583abd389ca1f.ttf +0 -0
  40. package/dist/node/index.js +0 -3
  41. package/dist/node/index.js.LICENSE.txt +0 -32
  42. package/dist/node/index.js.map +0 -1
  43. package/dist/web/52a99d58a36f2b7a78b3.ttf +0 -0
  44. package/dist/web/662b866576cfea51dd64.ttf +0 -0
  45. package/dist/web/7f9eed4cca4d0ae6a772.ttf +0 -0
  46. package/dist/web/8268666c3b2ca2ec11c0.ttf +0 -0
  47. package/dist/web/87d9266583abd389ca1f.ttf +0 -0
  48. package/dist/web/index.js +0 -3
  49. package/dist/web/index.js.LICENSE.txt +0 -32
  50. package/dist/web/index.js.map +0 -1
  51. package/stories/index.js +0 -2
  52. /package/{stories → src/components}/atoms/LoadingDots/LoadingDots.jsx +0 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,2754 @@
1
+ var React = require('react');
2
+ var bignumber_js = require('bignumber.js');
3
+
4
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+
6
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+
8
+ function createCommonjsModule(fn) {
9
+ var module = { exports: {} };
10
+ return fn(module, module.exports), module.exports;
11
+ }
12
+
13
+ /** @license React v16.13.1
14
+ * react-is.production.min.js
15
+ *
16
+ * Copyright (c) Facebook, Inc. and its affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
22
+ Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
23
+ function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
24
+ var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
25
+ var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
26
+ var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
27
+
28
+ var reactIs_production_min = {
29
+ AsyncMode: AsyncMode,
30
+ ConcurrentMode: ConcurrentMode,
31
+ ContextConsumer: ContextConsumer,
32
+ ContextProvider: ContextProvider,
33
+ Element: Element,
34
+ ForwardRef: ForwardRef,
35
+ Fragment: Fragment,
36
+ Lazy: Lazy,
37
+ Memo: Memo,
38
+ Portal: Portal,
39
+ Profiler: Profiler,
40
+ StrictMode: StrictMode,
41
+ Suspense: Suspense,
42
+ isAsyncMode: isAsyncMode,
43
+ isConcurrentMode: isConcurrentMode,
44
+ isContextConsumer: isContextConsumer,
45
+ isContextProvider: isContextProvider,
46
+ isElement: isElement,
47
+ isForwardRef: isForwardRef,
48
+ isFragment: isFragment,
49
+ isLazy: isLazy,
50
+ isMemo: isMemo,
51
+ isPortal: isPortal,
52
+ isProfiler: isProfiler,
53
+ isStrictMode: isStrictMode,
54
+ isSuspense: isSuspense,
55
+ isValidElementType: isValidElementType,
56
+ typeOf: typeOf
57
+ };
58
+
59
+ /** @license React v16.13.1
60
+ * react-is.development.js
61
+ *
62
+ * Copyright (c) Facebook, Inc. and its affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */
67
+
68
+ var reactIs_development = createCommonjsModule(function (module, exports) {
69
+
70
+
71
+
72
+ if (process.env.NODE_ENV !== "production") {
73
+ (function() {
74
+
75
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
76
+ // nor polyfill, then a plain number is used for performance.
77
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
78
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
79
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
80
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
81
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
82
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
83
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
84
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
85
+ // (unstable) APIs that have been removed. Can we remove the symbols?
86
+
87
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
88
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
89
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
90
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
91
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
92
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
93
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
94
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
95
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
96
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
97
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
98
+
99
+ function isValidElementType(type) {
100
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
101
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
102
+ }
103
+
104
+ function typeOf(object) {
105
+ if (typeof object === 'object' && object !== null) {
106
+ var $$typeof = object.$$typeof;
107
+
108
+ switch ($$typeof) {
109
+ case REACT_ELEMENT_TYPE:
110
+ var type = object.type;
111
+
112
+ switch (type) {
113
+ case REACT_ASYNC_MODE_TYPE:
114
+ case REACT_CONCURRENT_MODE_TYPE:
115
+ case REACT_FRAGMENT_TYPE:
116
+ case REACT_PROFILER_TYPE:
117
+ case REACT_STRICT_MODE_TYPE:
118
+ case REACT_SUSPENSE_TYPE:
119
+ return type;
120
+
121
+ default:
122
+ var $$typeofType = type && type.$$typeof;
123
+
124
+ switch ($$typeofType) {
125
+ case REACT_CONTEXT_TYPE:
126
+ case REACT_FORWARD_REF_TYPE:
127
+ case REACT_LAZY_TYPE:
128
+ case REACT_MEMO_TYPE:
129
+ case REACT_PROVIDER_TYPE:
130
+ return $$typeofType;
131
+
132
+ default:
133
+ return $$typeof;
134
+ }
135
+
136
+ }
137
+
138
+ case REACT_PORTAL_TYPE:
139
+ return $$typeof;
140
+ }
141
+ }
142
+
143
+ return undefined;
144
+ } // AsyncMode is deprecated along with isAsyncMode
145
+
146
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
147
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
148
+ var ContextConsumer = REACT_CONTEXT_TYPE;
149
+ var ContextProvider = REACT_PROVIDER_TYPE;
150
+ var Element = REACT_ELEMENT_TYPE;
151
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
152
+ var Fragment = REACT_FRAGMENT_TYPE;
153
+ var Lazy = REACT_LAZY_TYPE;
154
+ var Memo = REACT_MEMO_TYPE;
155
+ var Portal = REACT_PORTAL_TYPE;
156
+ var Profiler = REACT_PROFILER_TYPE;
157
+ var StrictMode = REACT_STRICT_MODE_TYPE;
158
+ var Suspense = REACT_SUSPENSE_TYPE;
159
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
160
+
161
+ function isAsyncMode(object) {
162
+ {
163
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
164
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
165
+
166
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
167
+ }
168
+ }
169
+
170
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
171
+ }
172
+ function isConcurrentMode(object) {
173
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
174
+ }
175
+ function isContextConsumer(object) {
176
+ return typeOf(object) === REACT_CONTEXT_TYPE;
177
+ }
178
+ function isContextProvider(object) {
179
+ return typeOf(object) === REACT_PROVIDER_TYPE;
180
+ }
181
+ function isElement(object) {
182
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
183
+ }
184
+ function isForwardRef(object) {
185
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
186
+ }
187
+ function isFragment(object) {
188
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
189
+ }
190
+ function isLazy(object) {
191
+ return typeOf(object) === REACT_LAZY_TYPE;
192
+ }
193
+ function isMemo(object) {
194
+ return typeOf(object) === REACT_MEMO_TYPE;
195
+ }
196
+ function isPortal(object) {
197
+ return typeOf(object) === REACT_PORTAL_TYPE;
198
+ }
199
+ function isProfiler(object) {
200
+ return typeOf(object) === REACT_PROFILER_TYPE;
201
+ }
202
+ function isStrictMode(object) {
203
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
204
+ }
205
+ function isSuspense(object) {
206
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
207
+ }
208
+
209
+ exports.AsyncMode = AsyncMode;
210
+ exports.ConcurrentMode = ConcurrentMode;
211
+ exports.ContextConsumer = ContextConsumer;
212
+ exports.ContextProvider = ContextProvider;
213
+ exports.Element = Element;
214
+ exports.ForwardRef = ForwardRef;
215
+ exports.Fragment = Fragment;
216
+ exports.Lazy = Lazy;
217
+ exports.Memo = Memo;
218
+ exports.Portal = Portal;
219
+ exports.Profiler = Profiler;
220
+ exports.StrictMode = StrictMode;
221
+ exports.Suspense = Suspense;
222
+ exports.isAsyncMode = isAsyncMode;
223
+ exports.isConcurrentMode = isConcurrentMode;
224
+ exports.isContextConsumer = isContextConsumer;
225
+ exports.isContextProvider = isContextProvider;
226
+ exports.isElement = isElement;
227
+ exports.isForwardRef = isForwardRef;
228
+ exports.isFragment = isFragment;
229
+ exports.isLazy = isLazy;
230
+ exports.isMemo = isMemo;
231
+ exports.isPortal = isPortal;
232
+ exports.isProfiler = isProfiler;
233
+ exports.isStrictMode = isStrictMode;
234
+ exports.isSuspense = isSuspense;
235
+ exports.isValidElementType = isValidElementType;
236
+ exports.typeOf = typeOf;
237
+ })();
238
+ }
239
+ });
240
+
241
+ var reactIs = createCommonjsModule(function (module) {
242
+
243
+ if (process.env.NODE_ENV === 'production') {
244
+ module.exports = reactIs_production_min;
245
+ } else {
246
+ module.exports = reactIs_development;
247
+ }
248
+ });
249
+
250
+ /*
251
+ object-assign
252
+ (c) Sindre Sorhus
253
+ @license MIT
254
+ */
255
+ /* eslint-disable no-unused-vars */
256
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
257
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
258
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
259
+
260
+ function toObject(val) {
261
+ if (val === null || val === undefined) {
262
+ throw new TypeError('Object.assign cannot be called with null or undefined');
263
+ }
264
+
265
+ return Object(val);
266
+ }
267
+
268
+ function shouldUseNative() {
269
+ try {
270
+ if (!Object.assign) {
271
+ return false;
272
+ }
273
+
274
+ // Detect buggy property enumeration order in older V8 versions.
275
+
276
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
277
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
278
+ test1[5] = 'de';
279
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
280
+ return false;
281
+ }
282
+
283
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
284
+ var test2 = {};
285
+ for (var i = 0; i < 10; i++) {
286
+ test2['_' + String.fromCharCode(i)] = i;
287
+ }
288
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
289
+ return test2[n];
290
+ });
291
+ if (order2.join('') !== '0123456789') {
292
+ return false;
293
+ }
294
+
295
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
296
+ var test3 = {};
297
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
298
+ test3[letter] = letter;
299
+ });
300
+ if (Object.keys(Object.assign({}, test3)).join('') !==
301
+ 'abcdefghijklmnopqrst') {
302
+ return false;
303
+ }
304
+
305
+ return true;
306
+ } catch (err) {
307
+ // We don't expect any of the above to throw, but better to be safe.
308
+ return false;
309
+ }
310
+ }
311
+
312
+ var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
313
+ var from;
314
+ var to = toObject(target);
315
+ var symbols;
316
+
317
+ for (var s = 1; s < arguments.length; s++) {
318
+ from = Object(arguments[s]);
319
+
320
+ for (var key in from) {
321
+ if (hasOwnProperty.call(from, key)) {
322
+ to[key] = from[key];
323
+ }
324
+ }
325
+
326
+ if (getOwnPropertySymbols) {
327
+ symbols = getOwnPropertySymbols(from);
328
+ for (var i = 0; i < symbols.length; i++) {
329
+ if (propIsEnumerable.call(from, symbols[i])) {
330
+ to[symbols[i]] = from[symbols[i]];
331
+ }
332
+ }
333
+ }
334
+ }
335
+
336
+ return to;
337
+ };
338
+
339
+ /**
340
+ * Copyright (c) 2013-present, Facebook, Inc.
341
+ *
342
+ * This source code is licensed under the MIT license found in the
343
+ * LICENSE file in the root directory of this source tree.
344
+ */
345
+
346
+ var ReactPropTypesSecret$2 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
347
+
348
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret$2;
349
+
350
+ var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
351
+
352
+ var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
353
+
354
+ var has$1 = has$2;
355
+
356
+ /**
357
+ * Copyright (c) 2013-present, Facebook, Inc.
358
+ *
359
+ * This source code is licensed under the MIT license found in the
360
+ * LICENSE file in the root directory of this source tree.
361
+ */
362
+
363
+ var printWarning$1 = function() {};
364
+
365
+ if (process.env.NODE_ENV !== 'production') {
366
+ var ReactPropTypesSecret = ReactPropTypesSecret$1;
367
+ var loggedTypeFailures = {};
368
+ var has = has$1;
369
+
370
+ printWarning$1 = function(text) {
371
+ var message = 'Warning: ' + text;
372
+ if (typeof console !== 'undefined') {
373
+ console.error(message);
374
+ }
375
+ try {
376
+ // --- Welcome to debugging React ---
377
+ // This error was thrown as a convenience so that you can use this stack
378
+ // to find the callsite that caused this warning to fire.
379
+ throw new Error(message);
380
+ } catch (x) { /**/ }
381
+ };
382
+ }
383
+
384
+ /**
385
+ * Assert that the values match with the type specs.
386
+ * Error messages are memorized and will only be shown once.
387
+ *
388
+ * @param {object} typeSpecs Map of name to a ReactPropType
389
+ * @param {object} values Runtime values that need to be type-checked
390
+ * @param {string} location e.g. "prop", "context", "child context"
391
+ * @param {string} componentName Name of the component for error messages.
392
+ * @param {?Function} getStack Returns the component stack.
393
+ * @private
394
+ */
395
+ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
396
+ if (process.env.NODE_ENV !== 'production') {
397
+ for (var typeSpecName in typeSpecs) {
398
+ if (has(typeSpecs, typeSpecName)) {
399
+ var error;
400
+ // Prop type validation may throw. In case they do, we don't want to
401
+ // fail the render phase where it didn't fail before. So we log it.
402
+ // After these have been cleaned up, we'll let them throw.
403
+ try {
404
+ // This is intentionally an invariant that gets caught. It's the same
405
+ // behavior as without this statement except with a better message.
406
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
407
+ var err = Error(
408
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
409
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
410
+ 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
411
+ );
412
+ err.name = 'Invariant Violation';
413
+ throw err;
414
+ }
415
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
416
+ } catch (ex) {
417
+ error = ex;
418
+ }
419
+ if (error && !(error instanceof Error)) {
420
+ printWarning$1(
421
+ (componentName || 'React class') + ': type specification of ' +
422
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
423
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
424
+ 'You may have forgotten to pass an argument to the type checker ' +
425
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
426
+ 'shape all require an argument).'
427
+ );
428
+ }
429
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
430
+ // Only monitor this failure once because there tends to be a lot of the
431
+ // same error.
432
+ loggedTypeFailures[error.message] = true;
433
+
434
+ var stack = getStack ? getStack() : '';
435
+
436
+ printWarning$1(
437
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
438
+ );
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }
444
+
445
+ /**
446
+ * Resets warning cache when testing.
447
+ *
448
+ * @private
449
+ */
450
+ checkPropTypes$1.resetWarningCache = function() {
451
+ if (process.env.NODE_ENV !== 'production') {
452
+ loggedTypeFailures = {};
453
+ }
454
+ };
455
+
456
+ var checkPropTypes_1 = checkPropTypes$1;
457
+
458
+ var checkPropTypes = checkPropTypes_1;
459
+
460
+ /**
461
+ * Copyright (c) 2013-present, Facebook, Inc.
462
+ *
463
+ * This source code is licensed under the MIT license found in the
464
+ * LICENSE file in the root directory of this source tree.
465
+ */
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+ var printWarning = function() {};
475
+
476
+ if (process.env.NODE_ENV !== 'production') {
477
+ printWarning = function(text) {
478
+ var message = 'Warning: ' + text;
479
+ if (typeof console !== 'undefined') {
480
+ console.error(message);
481
+ }
482
+ try {
483
+ // --- Welcome to debugging React ---
484
+ // This error was thrown as a convenience so that you can use this stack
485
+ // to find the callsite that caused this warning to fire.
486
+ throw new Error(message);
487
+ } catch (x) {}
488
+ };
489
+ }
490
+
491
+ function emptyFunctionThatReturnsNull() {
492
+ return null;
493
+ }
494
+
495
+ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
496
+ /* global Symbol */
497
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
498
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
499
+
500
+ /**
501
+ * Returns the iterator method function contained on the iterable object.
502
+ *
503
+ * Be sure to invoke the function with the iterable as context:
504
+ *
505
+ * var iteratorFn = getIteratorFn(myIterable);
506
+ * if (iteratorFn) {
507
+ * var iterator = iteratorFn.call(myIterable);
508
+ * ...
509
+ * }
510
+ *
511
+ * @param {?object} maybeIterable
512
+ * @return {?function}
513
+ */
514
+ function getIteratorFn(maybeIterable) {
515
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
516
+ if (typeof iteratorFn === 'function') {
517
+ return iteratorFn;
518
+ }
519
+ }
520
+
521
+ /**
522
+ * Collection of methods that allow declaration and validation of props that are
523
+ * supplied to React components. Example usage:
524
+ *
525
+ * var Props = require('ReactPropTypes');
526
+ * var MyArticle = React.createClass({
527
+ * propTypes: {
528
+ * // An optional string prop named "description".
529
+ * description: Props.string,
530
+ *
531
+ * // A required enum prop named "category".
532
+ * category: Props.oneOf(['News','Photos']).isRequired,
533
+ *
534
+ * // A prop named "dialog" that requires an instance of Dialog.
535
+ * dialog: Props.instanceOf(Dialog).isRequired
536
+ * },
537
+ * render: function() { ... }
538
+ * });
539
+ *
540
+ * A more formal specification of how these methods are used:
541
+ *
542
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
543
+ * decl := ReactPropTypes.{type}(.isRequired)?
544
+ *
545
+ * Each and every declaration produces a function with the same signature. This
546
+ * allows the creation of custom validation functions. For example:
547
+ *
548
+ * var MyLink = React.createClass({
549
+ * propTypes: {
550
+ * // An optional string or URI prop named "href".
551
+ * href: function(props, propName, componentName) {
552
+ * var propValue = props[propName];
553
+ * if (propValue != null && typeof propValue !== 'string' &&
554
+ * !(propValue instanceof URI)) {
555
+ * return new Error(
556
+ * 'Expected a string or an URI for ' + propName + ' in ' +
557
+ * componentName
558
+ * );
559
+ * }
560
+ * }
561
+ * },
562
+ * render: function() {...}
563
+ * });
564
+ *
565
+ * @internal
566
+ */
567
+
568
+ var ANONYMOUS = '<<anonymous>>';
569
+
570
+ // Important!
571
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
572
+ var ReactPropTypes = {
573
+ array: createPrimitiveTypeChecker('array'),
574
+ bigint: createPrimitiveTypeChecker('bigint'),
575
+ bool: createPrimitiveTypeChecker('boolean'),
576
+ func: createPrimitiveTypeChecker('function'),
577
+ number: createPrimitiveTypeChecker('number'),
578
+ object: createPrimitiveTypeChecker('object'),
579
+ string: createPrimitiveTypeChecker('string'),
580
+ symbol: createPrimitiveTypeChecker('symbol'),
581
+
582
+ any: createAnyTypeChecker(),
583
+ arrayOf: createArrayOfTypeChecker,
584
+ element: createElementTypeChecker(),
585
+ elementType: createElementTypeTypeChecker(),
586
+ instanceOf: createInstanceTypeChecker,
587
+ node: createNodeChecker(),
588
+ objectOf: createObjectOfTypeChecker,
589
+ oneOf: createEnumTypeChecker,
590
+ oneOfType: createUnionTypeChecker,
591
+ shape: createShapeTypeChecker,
592
+ exact: createStrictShapeTypeChecker,
593
+ };
594
+
595
+ /**
596
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
597
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
598
+ */
599
+ /*eslint-disable no-self-compare*/
600
+ function is(x, y) {
601
+ // SameValue algorithm
602
+ if (x === y) {
603
+ // Steps 1-5, 7-10
604
+ // Steps 6.b-6.e: +0 != -0
605
+ return x !== 0 || 1 / x === 1 / y;
606
+ } else {
607
+ // Step 6.a: NaN == NaN
608
+ return x !== x && y !== y;
609
+ }
610
+ }
611
+ /*eslint-enable no-self-compare*/
612
+
613
+ /**
614
+ * We use an Error-like object for backward compatibility as people may call
615
+ * PropTypes directly and inspect their output. However, we don't use real
616
+ * Errors anymore. We don't inspect their stack anyway, and creating them
617
+ * is prohibitively expensive if they are created too often, such as what
618
+ * happens in oneOfType() for any type before the one that matched.
619
+ */
620
+ function PropTypeError(message, data) {
621
+ this.message = message;
622
+ this.data = data && typeof data === 'object' ? data: {};
623
+ this.stack = '';
624
+ }
625
+ // Make `instanceof Error` still work for returned errors.
626
+ PropTypeError.prototype = Error.prototype;
627
+
628
+ function createChainableTypeChecker(validate) {
629
+ if (process.env.NODE_ENV !== 'production') {
630
+ var manualPropTypeCallCache = {};
631
+ var manualPropTypeWarningCount = 0;
632
+ }
633
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
634
+ componentName = componentName || ANONYMOUS;
635
+ propFullName = propFullName || propName;
636
+
637
+ if (secret !== ReactPropTypesSecret$1) {
638
+ if (throwOnDirectAccess) {
639
+ // New behavior only for users of `prop-types` package
640
+ var err = new Error(
641
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
642
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
643
+ 'Read more at http://fb.me/use-check-prop-types'
644
+ );
645
+ err.name = 'Invariant Violation';
646
+ throw err;
647
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
648
+ // Old behavior for people using React.PropTypes
649
+ var cacheKey = componentName + ':' + propName;
650
+ if (
651
+ !manualPropTypeCallCache[cacheKey] &&
652
+ // Avoid spamming the console because they are often not actionable except for lib authors
653
+ manualPropTypeWarningCount < 3
654
+ ) {
655
+ printWarning(
656
+ 'You are manually calling a React.PropTypes validation ' +
657
+ 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
658
+ 'and will throw in the standalone `prop-types` package. ' +
659
+ 'You may be seeing this warning due to a third-party PropTypes ' +
660
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
661
+ );
662
+ manualPropTypeCallCache[cacheKey] = true;
663
+ manualPropTypeWarningCount++;
664
+ }
665
+ }
666
+ }
667
+ if (props[propName] == null) {
668
+ if (isRequired) {
669
+ if (props[propName] === null) {
670
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
671
+ }
672
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
673
+ }
674
+ return null;
675
+ } else {
676
+ return validate(props, propName, componentName, location, propFullName);
677
+ }
678
+ }
679
+
680
+ var chainedCheckType = checkType.bind(null, false);
681
+ chainedCheckType.isRequired = checkType.bind(null, true);
682
+
683
+ return chainedCheckType;
684
+ }
685
+
686
+ function createPrimitiveTypeChecker(expectedType) {
687
+ function validate(props, propName, componentName, location, propFullName, secret) {
688
+ var propValue = props[propName];
689
+ var propType = getPropType(propValue);
690
+ if (propType !== expectedType) {
691
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
692
+ // check, but we can offer a more precise error message here rather than
693
+ // 'of type `object`'.
694
+ var preciseType = getPreciseType(propValue);
695
+
696
+ return new PropTypeError(
697
+ 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
698
+ {expectedType: expectedType}
699
+ );
700
+ }
701
+ return null;
702
+ }
703
+ return createChainableTypeChecker(validate);
704
+ }
705
+
706
+ function createAnyTypeChecker() {
707
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
708
+ }
709
+
710
+ function createArrayOfTypeChecker(typeChecker) {
711
+ function validate(props, propName, componentName, location, propFullName) {
712
+ if (typeof typeChecker !== 'function') {
713
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
714
+ }
715
+ var propValue = props[propName];
716
+ if (!Array.isArray(propValue)) {
717
+ var propType = getPropType(propValue);
718
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
719
+ }
720
+ for (var i = 0; i < propValue.length; i++) {
721
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
722
+ if (error instanceof Error) {
723
+ return error;
724
+ }
725
+ }
726
+ return null;
727
+ }
728
+ return createChainableTypeChecker(validate);
729
+ }
730
+
731
+ function createElementTypeChecker() {
732
+ function validate(props, propName, componentName, location, propFullName) {
733
+ var propValue = props[propName];
734
+ if (!isValidElement(propValue)) {
735
+ var propType = getPropType(propValue);
736
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
737
+ }
738
+ return null;
739
+ }
740
+ return createChainableTypeChecker(validate);
741
+ }
742
+
743
+ function createElementTypeTypeChecker() {
744
+ function validate(props, propName, componentName, location, propFullName) {
745
+ var propValue = props[propName];
746
+ if (!reactIs.isValidElementType(propValue)) {
747
+ var propType = getPropType(propValue);
748
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
749
+ }
750
+ return null;
751
+ }
752
+ return createChainableTypeChecker(validate);
753
+ }
754
+
755
+ function createInstanceTypeChecker(expectedClass) {
756
+ function validate(props, propName, componentName, location, propFullName) {
757
+ if (!(props[propName] instanceof expectedClass)) {
758
+ var expectedClassName = expectedClass.name || ANONYMOUS;
759
+ var actualClassName = getClassName(props[propName]);
760
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
761
+ }
762
+ return null;
763
+ }
764
+ return createChainableTypeChecker(validate);
765
+ }
766
+
767
+ function createEnumTypeChecker(expectedValues) {
768
+ if (!Array.isArray(expectedValues)) {
769
+ if (process.env.NODE_ENV !== 'production') {
770
+ if (arguments.length > 1) {
771
+ printWarning(
772
+ 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
773
+ 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
774
+ );
775
+ } else {
776
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
777
+ }
778
+ }
779
+ return emptyFunctionThatReturnsNull;
780
+ }
781
+
782
+ function validate(props, propName, componentName, location, propFullName) {
783
+ var propValue = props[propName];
784
+ for (var i = 0; i < expectedValues.length; i++) {
785
+ if (is(propValue, expectedValues[i])) {
786
+ return null;
787
+ }
788
+ }
789
+
790
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
791
+ var type = getPreciseType(value);
792
+ if (type === 'symbol') {
793
+ return String(value);
794
+ }
795
+ return value;
796
+ });
797
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
798
+ }
799
+ return createChainableTypeChecker(validate);
800
+ }
801
+
802
+ function createObjectOfTypeChecker(typeChecker) {
803
+ function validate(props, propName, componentName, location, propFullName) {
804
+ if (typeof typeChecker !== 'function') {
805
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
806
+ }
807
+ var propValue = props[propName];
808
+ var propType = getPropType(propValue);
809
+ if (propType !== 'object') {
810
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
811
+ }
812
+ for (var key in propValue) {
813
+ if (has$1(propValue, key)) {
814
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
815
+ if (error instanceof Error) {
816
+ return error;
817
+ }
818
+ }
819
+ }
820
+ return null;
821
+ }
822
+ return createChainableTypeChecker(validate);
823
+ }
824
+
825
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
826
+ if (!Array.isArray(arrayOfTypeCheckers)) {
827
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
828
+ return emptyFunctionThatReturnsNull;
829
+ }
830
+
831
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
832
+ var checker = arrayOfTypeCheckers[i];
833
+ if (typeof checker !== 'function') {
834
+ printWarning(
835
+ 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
836
+ 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
837
+ );
838
+ return emptyFunctionThatReturnsNull;
839
+ }
840
+ }
841
+
842
+ function validate(props, propName, componentName, location, propFullName) {
843
+ var expectedTypes = [];
844
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
845
+ var checker = arrayOfTypeCheckers[i];
846
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
847
+ if (checkerResult == null) {
848
+ return null;
849
+ }
850
+ if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) {
851
+ expectedTypes.push(checkerResult.data.expectedType);
852
+ }
853
+ }
854
+ var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
855
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
856
+ }
857
+ return createChainableTypeChecker(validate);
858
+ }
859
+
860
+ function createNodeChecker() {
861
+ function validate(props, propName, componentName, location, propFullName) {
862
+ if (!isNode(props[propName])) {
863
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
864
+ }
865
+ return null;
866
+ }
867
+ return createChainableTypeChecker(validate);
868
+ }
869
+
870
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
871
+ return new PropTypeError(
872
+ (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
873
+ 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
874
+ );
875
+ }
876
+
877
+ function createShapeTypeChecker(shapeTypes) {
878
+ function validate(props, propName, componentName, location, propFullName) {
879
+ var propValue = props[propName];
880
+ var propType = getPropType(propValue);
881
+ if (propType !== 'object') {
882
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
883
+ }
884
+ for (var key in shapeTypes) {
885
+ var checker = shapeTypes[key];
886
+ if (typeof checker !== 'function') {
887
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
888
+ }
889
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
890
+ if (error) {
891
+ return error;
892
+ }
893
+ }
894
+ return null;
895
+ }
896
+ return createChainableTypeChecker(validate);
897
+ }
898
+
899
+ function createStrictShapeTypeChecker(shapeTypes) {
900
+ function validate(props, propName, componentName, location, propFullName) {
901
+ var propValue = props[propName];
902
+ var propType = getPropType(propValue);
903
+ if (propType !== 'object') {
904
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
905
+ }
906
+ // We need to check all keys in case some are required but missing from props.
907
+ var allKeys = objectAssign({}, props[propName], shapeTypes);
908
+ for (var key in allKeys) {
909
+ var checker = shapeTypes[key];
910
+ if (has$1(shapeTypes, key) && typeof checker !== 'function') {
911
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
912
+ }
913
+ if (!checker) {
914
+ return new PropTypeError(
915
+ 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
916
+ '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
917
+ '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
918
+ );
919
+ }
920
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
921
+ if (error) {
922
+ return error;
923
+ }
924
+ }
925
+ return null;
926
+ }
927
+
928
+ return createChainableTypeChecker(validate);
929
+ }
930
+
931
+ function isNode(propValue) {
932
+ switch (typeof propValue) {
933
+ case 'number':
934
+ case 'string':
935
+ case 'undefined':
936
+ return true;
937
+ case 'boolean':
938
+ return !propValue;
939
+ case 'object':
940
+ if (Array.isArray(propValue)) {
941
+ return propValue.every(isNode);
942
+ }
943
+ if (propValue === null || isValidElement(propValue)) {
944
+ return true;
945
+ }
946
+
947
+ var iteratorFn = getIteratorFn(propValue);
948
+ if (iteratorFn) {
949
+ var iterator = iteratorFn.call(propValue);
950
+ var step;
951
+ if (iteratorFn !== propValue.entries) {
952
+ while (!(step = iterator.next()).done) {
953
+ if (!isNode(step.value)) {
954
+ return false;
955
+ }
956
+ }
957
+ } else {
958
+ // Iterator will provide entry [k,v] tuples rather than values.
959
+ while (!(step = iterator.next()).done) {
960
+ var entry = step.value;
961
+ if (entry) {
962
+ if (!isNode(entry[1])) {
963
+ return false;
964
+ }
965
+ }
966
+ }
967
+ }
968
+ } else {
969
+ return false;
970
+ }
971
+
972
+ return true;
973
+ default:
974
+ return false;
975
+ }
976
+ }
977
+
978
+ function isSymbol(propType, propValue) {
979
+ // Native Symbol.
980
+ if (propType === 'symbol') {
981
+ return true;
982
+ }
983
+
984
+ // falsy value can't be a Symbol
985
+ if (!propValue) {
986
+ return false;
987
+ }
988
+
989
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
990
+ if (propValue['@@toStringTag'] === 'Symbol') {
991
+ return true;
992
+ }
993
+
994
+ // Fallback for non-spec compliant Symbols which are polyfilled.
995
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
996
+ return true;
997
+ }
998
+
999
+ return false;
1000
+ }
1001
+
1002
+ // Equivalent of `typeof` but with special handling for array and regexp.
1003
+ function getPropType(propValue) {
1004
+ var propType = typeof propValue;
1005
+ if (Array.isArray(propValue)) {
1006
+ return 'array';
1007
+ }
1008
+ if (propValue instanceof RegExp) {
1009
+ // Old webkits (at least until Android 4.0) return 'function' rather than
1010
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1011
+ // passes PropTypes.object.
1012
+ return 'object';
1013
+ }
1014
+ if (isSymbol(propType, propValue)) {
1015
+ return 'symbol';
1016
+ }
1017
+ return propType;
1018
+ }
1019
+
1020
+ // This handles more types than `getPropType`. Only used for error messages.
1021
+ // See `createPrimitiveTypeChecker`.
1022
+ function getPreciseType(propValue) {
1023
+ if (typeof propValue === 'undefined' || propValue === null) {
1024
+ return '' + propValue;
1025
+ }
1026
+ var propType = getPropType(propValue);
1027
+ if (propType === 'object') {
1028
+ if (propValue instanceof Date) {
1029
+ return 'date';
1030
+ } else if (propValue instanceof RegExp) {
1031
+ return 'regexp';
1032
+ }
1033
+ }
1034
+ return propType;
1035
+ }
1036
+
1037
+ // Returns a string that is postfixed to a warning about an invalid type.
1038
+ // For example, "undefined" or "of type array"
1039
+ function getPostfixForTypeWarning(value) {
1040
+ var type = getPreciseType(value);
1041
+ switch (type) {
1042
+ case 'array':
1043
+ case 'object':
1044
+ return 'an ' + type;
1045
+ case 'boolean':
1046
+ case 'date':
1047
+ case 'regexp':
1048
+ return 'a ' + type;
1049
+ default:
1050
+ return type;
1051
+ }
1052
+ }
1053
+
1054
+ // Returns class name of the object, if any.
1055
+ function getClassName(propValue) {
1056
+ if (!propValue.constructor || !propValue.constructor.name) {
1057
+ return ANONYMOUS;
1058
+ }
1059
+ return propValue.constructor.name;
1060
+ }
1061
+
1062
+ ReactPropTypes.checkPropTypes = checkPropTypes;
1063
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1064
+ ReactPropTypes.PropTypes = ReactPropTypes;
1065
+
1066
+ return ReactPropTypes;
1067
+ };
1068
+
1069
+ /**
1070
+ * Copyright (c) 2013-present, Facebook, Inc.
1071
+ *
1072
+ * This source code is licensed under the MIT license found in the
1073
+ * LICENSE file in the root directory of this source tree.
1074
+ */
1075
+
1076
+
1077
+
1078
+ function emptyFunction() {}
1079
+ function emptyFunctionWithReset() {}
1080
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
1081
+
1082
+ var factoryWithThrowingShims = function() {
1083
+ function shim(props, propName, componentName, location, propFullName, secret) {
1084
+ if (secret === ReactPropTypesSecret$1) {
1085
+ // It is still safe when called from React.
1086
+ return;
1087
+ }
1088
+ var err = new Error(
1089
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1090
+ 'Use PropTypes.checkPropTypes() to call them. ' +
1091
+ 'Read more at http://fb.me/use-check-prop-types'
1092
+ );
1093
+ err.name = 'Invariant Violation';
1094
+ throw err;
1095
+ } shim.isRequired = shim;
1096
+ function getShim() {
1097
+ return shim;
1098
+ } // Important!
1099
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1100
+ var ReactPropTypes = {
1101
+ array: shim,
1102
+ bigint: shim,
1103
+ bool: shim,
1104
+ func: shim,
1105
+ number: shim,
1106
+ object: shim,
1107
+ string: shim,
1108
+ symbol: shim,
1109
+
1110
+ any: shim,
1111
+ arrayOf: getShim,
1112
+ element: shim,
1113
+ elementType: shim,
1114
+ instanceOf: getShim,
1115
+ node: shim,
1116
+ objectOf: getShim,
1117
+ oneOf: getShim,
1118
+ oneOfType: getShim,
1119
+ shape: getShim,
1120
+ exact: getShim,
1121
+
1122
+ checkPropTypes: emptyFunctionWithReset,
1123
+ resetWarningCache: emptyFunction
1124
+ };
1125
+
1126
+ ReactPropTypes.PropTypes = ReactPropTypes;
1127
+
1128
+ return ReactPropTypes;
1129
+ };
1130
+
1131
+ var require$$1 = factoryWithTypeCheckers;
1132
+
1133
+ var require$$2 = factoryWithThrowingShims;
1134
+
1135
+ /**
1136
+ * Copyright (c) 2013-present, Facebook, Inc.
1137
+ *
1138
+ * This source code is licensed under the MIT license found in the
1139
+ * LICENSE file in the root directory of this source tree.
1140
+ */
1141
+
1142
+ var propTypes = createCommonjsModule(function (module) {
1143
+ if (process.env.NODE_ENV !== 'production') {
1144
+ var ReactIs = reactIs;
1145
+
1146
+ // By explicitly using `prop-types` you are opting into new development behavior.
1147
+ // http://fb.me/prop-types-in-prod
1148
+ var throwOnDirectAccess = true;
1149
+ module.exports = require$$1(ReactIs.isElement, throwOnDirectAccess);
1150
+ } else {
1151
+ // By explicitly using `prop-types` you are opting into new production behavior.
1152
+ // http://fb.me/prop-types-in-prod
1153
+ module.exports = require$$2();
1154
+ }
1155
+ });
1156
+
1157
+ var PropTypes = propTypes;
1158
+
1159
+ var styles$1 = {"container":"_lIpAT","button":"_sS-Yj","m-0":"_hBGrg","p-0":"_fOezx","m-1":"_R79vC","p-1":"_BGhZS","m-2":"_4WQa1","p-2":"_-hkj1","m-3":"_ePtXr","p-3":"_ihe2B","m-4":"_KplPo","p-4":"_2vDkp","m-5":"_4AqfI","p-5":"_FfAMs","m-6":"_53MvX","p-6":"_e-x4J","m-7":"_EtdrG","p-7":"_FLCe5","m-8":"_1IHYX","p-8":"_fZzmM","m-9":"_QsD9D","p-9":"_6Sr2Q","m-10":"_LvJdU","p-10":"_ah-tz","ml-0":"_De6uE","pl-0":"_aQ1ph","ml-1":"_5Bwy4","pl-1":"_j4wAR","ml-2":"_qeK50","pl-2":"_VC868","ml-3":"_LuNZb","pl-3":"_3fxbv","ml-4":"_XiU0I","pl-4":"_hPWPx","ml-5":"_xkmy7","pl-5":"_vZWUx","ml-6":"_HJ-Oe","pl-6":"_nx5bN","ml-7":"_L-cTm","pl-7":"_XyNJZ","ml-8":"_GUJTt","pl-8":"_O-OPx","ml-9":"_4DBUs","pl-9":"_W5E4J","ml-10":"_TsFNa","pl-10":"_a07G-","mr-0":"_KuY5-","pr-0":"_Zv2gF","mr-1":"_IylJL","pr-1":"_DIaMC","mr-2":"_wodzN","pr-2":"_x7vGR","mr-3":"_cg-WA","pr-3":"_-GR0e","mr-4":"_zip09","pr-4":"_mrzBz","mr-5":"_Z3SdR","pr-5":"_FOt7u","mr-6":"_DX3gj","pr-6":"_caE8K","mr-7":"_SRVDr","pr-7":"_7h7Xw","mr-8":"_bvjcP","pr-8":"_WxJl8","mr-9":"_CDXo1","pr-9":"_uftSg","mr-10":"_WqvBW","pr-10":"_75aX1","mt-0":"_lfLEb","pt-0":"_FszNW","mt-1":"_xtok6","pt-1":"_cDFtN","mt-2":"_j96uZ","pt-2":"_BX40s","mt-3":"_3--yt","pt-3":"_qkmXr","mt-4":"_DhLUo","pt-4":"_AG7V9","mt-5":"_Gn5bX","pt-5":"_5-rlk","mt-6":"_c6g6t","pt-6":"_iWQbs","mt-7":"_6X-oB","pt-7":"_i82Td","mt-8":"_uK93t","pt-8":"_ESUrY","mt-9":"_LmSrq","pt-9":"_BgZxc","mt-10":"_mPy8r","pt-10":"_ddKoS","mb-0":"_gs1hc","pb-0":"_k94Xn","mb-1":"_8XN6g","pb-1":"_lJSHs","mb-2":"_y04oG","pb-2":"_cNkcX","mb-3":"_3-Ex4","pb-3":"_UlTDL","mb-4":"_ZchCM","pb-4":"_PrDJ0","mb-5":"_Al-qI","pb-5":"_9ExxH","mb-6":"_38fJH","pb-6":"_YPJnw","mb-7":"_ViLUm","pb-7":"_YtQHK","mb-8":"_Jm2m3","pb-8":"_hQSln","mb-9":"_73cuP","pb-9":"_Hm-oe","mb-10":"_90atw","pb-10":"_GxdOW","mx-0":"_786dB","px-0":"_b-KUL","mx-1":"_1sw2D","px-1":"_pfikG","mx-2":"_ZCsfc","px-2":"_-E-rP","mx-3":"_Vzqfk","px-3":"_Evygh","mx-4":"_g6XKX","px-4":"_hzPZK","mx-5":"_6Yusw","px-5":"_43D2o","mx-6":"_l7jig","px-6":"_X4DAB","mx-7":"_xCEJ4","px-7":"_kFsKL","mx-8":"_bcZ3x","px-8":"_qKJ-o","mx-9":"_pmzk-","px-9":"_5kFZh","mx-10":"_ZtyHL","px-10":"_RzSP4","my-0":"_iGkHt","py-0":"_tFXK8","my-1":"_9p151","py-1":"_1ExYH","my-2":"_hDX-y","py-2":"_j2Iqz","my-3":"_ZoP-i","py-3":"_JiyfX","my-4":"_6dHeQ","py-4":"_Val1l","my-5":"_yF8w9","py-5":"_3Do00","my-6":"_5ATW7","py-6":"_EqQi0","my-7":"_6Kng-","py-7":"_kFB05","my-8":"_fqkrf","py-8":"_wkYlc","my-9":"_yC6ha","py-9":"_nR4hK","my-10":"_46v2E","py-10":"_yjbuZ","m-sm-0":"_mXg7O","p-sm-0":"_sRkzF","m-sm-1":"_uh76t","p-sm-1":"_mnvOq","m-sm-2":"_-Lxwk","p-sm-2":"_9AoV6","m-sm-3":"_k6uGI","p-sm-3":"_FPlck","m-sm-4":"_XWNGm","p-sm-4":"_UhY4z","m-sm-5":"_nqmEm","p-sm-5":"_O3yzT","m-sm-6":"_1C7QT","p-sm-6":"_yR3CC","m-sm-7":"_vlqMl","p-sm-7":"_otIfI","m-sm-8":"_f-GUL","p-sm-8":"_oMnLQ","m-sm-9":"_Klhy3","p-sm-9":"_xYdqe","m-sm-10":"_jg7tY","p-sm-10":"_-28KU","ml-sm-0":"_6hhVb","pl-sm-0":"_WV4uZ","ml-sm-1":"_u--dD","pl-sm-1":"_k2dSZ","ml-sm-2":"_ng1Wx","pl-sm-2":"_A6pLt","ml-sm-3":"_OKwcI","pl-sm-3":"_uxcE6","ml-sm-4":"_dHy5x","pl-sm-4":"_loKKN","ml-sm-5":"_pWXnn","pl-sm-5":"_6KcZ0","ml-sm-6":"_8DdT4","pl-sm-6":"_atdfH","ml-sm-7":"_-BksR","pl-sm-7":"_B6uGl","ml-sm-8":"_rL6Yi","pl-sm-8":"_L0Gt6","ml-sm-9":"_sDCuc","pl-sm-9":"_5ndTT","ml-sm-10":"_d0sOv","pl-sm-10":"_MzCci","mr-sm-0":"_TxpxL","pr-sm-0":"_ReTjB","mr-sm-1":"_ZDd-C","pr-sm-1":"_6ux6P","mr-sm-2":"_SbIys","pr-sm-2":"_0dAjY","mr-sm-3":"_WT-FE","pr-sm-3":"_hgzpB","mr-sm-4":"_ovLOk","pr-sm-4":"_YVXRD","mr-sm-5":"_3gKfj","pr-sm-5":"_GKqKE","mr-sm-6":"_EJ3Ig","pr-sm-6":"_pKU7W","mr-sm-7":"_MfWyc","pr-sm-7":"_439vk","mr-sm-8":"_HsLqa","pr-sm-8":"_Afu8-","mr-sm-9":"_k-uXQ","pr-sm-9":"_GSZg6","mr-sm-10":"_buR-E","pr-sm-10":"_GoGHq","mt-sm-0":"_3eC5V","pt-sm-0":"_w0Row","mt-sm-1":"_lFsar","pt-sm-1":"_rhMZX","mt-sm-2":"_HchNc","pt-sm-2":"_Xyn5a","mt-sm-3":"_INU0e","pt-sm-3":"_i9zkC","mt-sm-4":"_d1xqQ","pt-sm-4":"_eMU-M","mt-sm-5":"_gYMLN","pt-sm-5":"_sG2g-","mt-sm-6":"_U4BDm","pt-sm-6":"_nagya","mt-sm-7":"_f4nLP","pt-sm-7":"_3jMHw","mt-sm-8":"_hZW3J","pt-sm-8":"_woC7I","mt-sm-9":"_SFf2s","pt-sm-9":"_nuLoR","mt-sm-10":"_k1lF9","pt-sm-10":"_WG3-N","mb-sm-0":"_fQPR-","pb-sm-0":"_eL6LV","mb-sm-1":"_Z7gTR","pb-sm-1":"_OdGhD","mb-sm-2":"_dkjwo","pb-sm-2":"_kKhvE","mb-sm-3":"_meX0E","pb-sm-3":"_kh7Ku","mb-sm-4":"_rrb92","pb-sm-4":"_aytJc","mb-sm-5":"_wPkH4","pb-sm-5":"_1nZ-9","mb-sm-6":"_MkdDA","pb-sm-6":"_BxNLc","mb-sm-7":"_Nfm1A","pb-sm-7":"_-r452","mb-sm-8":"_K1omF","pb-sm-8":"_4-6gt","mb-sm-9":"_OUWsR","pb-sm-9":"_7DXr5","mb-sm-10":"_wZv7f","pb-sm-10":"_21WIP","mx-sm-0":"_hCRDg","px-sm-0":"_Bdj31","mx-sm-1":"_sx6bH","px-sm-1":"_jQXbZ","mx-sm-2":"_aCjIb","px-sm-2":"_-DBsZ","mx-sm-3":"_p2bFN","px-sm-3":"_d6ice","mx-sm-4":"_GZmNE","px-sm-4":"_7D10W","mx-sm-5":"_tKkEN","px-sm-5":"_J2iH5","mx-sm-6":"_iJju-","px-sm-6":"_m2ygK","mx-sm-7":"_chPCu","px-sm-7":"_C0aVt","mx-sm-8":"_twRB-","px-sm-8":"_6DezI","mx-sm-9":"_z1iZL","px-sm-9":"_HLE-F","mx-sm-10":"_F58U0","px-sm-10":"_Mat2S","my-sm-0":"_nADuT","py-sm-0":"_yu79u","my-sm-1":"_TEHyf","py-sm-1":"_MkRV5","my-sm-2":"_wfxJN","py-sm-2":"_qjIa5","my-sm-3":"_ch7TX","py-sm-3":"_0ZM5Q","my-sm-4":"_KQyj3","py-sm-4":"_npV56","my-sm-5":"_antvz","py-sm-5":"_qK29t","my-sm-6":"_PIZw6","py-sm-6":"_kwzra","my-sm-7":"_IPjVc","py-sm-7":"_NPJ-2","my-sm-8":"_Sxu2p","py-sm-8":"_VUG-4","my-sm-9":"_mLy-T","py-sm-9":"_U-1Tz","my-sm-10":"_6LGF-","py-sm-10":"_1I7Qo","m-lg-0":"_7JHxT","p-lg-0":"_dZxSG","m-lg-1":"_ap69K","p-lg-1":"_yAiEU","m-lg-2":"_cu0Gq","p-lg-2":"_p2Nvp","m-lg-3":"_ipTnO","p-lg-3":"_uekmi","m-lg-4":"_Ocj1U","p-lg-4":"_T5xZ0","m-lg-5":"_9QwAr","p-lg-5":"_S73RR","m-lg-6":"_TQDUS","p-lg-6":"_SVpzt","m-lg-7":"_u7-7x","p-lg-7":"_tVwwR","m-lg-8":"_VMheR","p-lg-8":"_dnoel","m-lg-9":"_bs68b","p-lg-9":"_-fPka","m-lg-10":"_JaRq8","p-lg-10":"_222SK","ml-lg-0":"_snW5C","pl-lg-0":"_cbC4p","ml-lg-1":"_ZcZqo","pl-lg-1":"_Ox1R-","ml-lg-2":"_GYhhL","pl-lg-2":"_RQnGa","ml-lg-3":"_PUix3","pl-lg-3":"_TXjNe","ml-lg-4":"_ctO4e","pl-lg-4":"_HGdnK","ml-lg-5":"_0kAql","pl-lg-5":"_j374-","ml-lg-6":"_DTSzU","pl-lg-6":"_f8fRt","ml-lg-7":"_SOGpN","pl-lg-7":"_ftCov","ml-lg-8":"_yyg3O","pl-lg-8":"_es-pp","ml-lg-9":"_ujiYm","pl-lg-9":"_hEH2f","ml-lg-10":"_sOymp","pl-lg-10":"_zABMD","mr-lg-0":"_bZvOK","pr-lg-0":"_1MjdX","mr-lg-1":"_lVGe-","pr-lg-1":"_hJzV5","mr-lg-2":"_9az71","pr-lg-2":"_vBVKt","mr-lg-3":"_SK-xp","pr-lg-3":"_BymTx","mr-lg-4":"_C-P-K","pr-lg-4":"_oDktY","mr-lg-5":"_e8X2c","pr-lg-5":"_XugCG","mr-lg-6":"_CycFS","pr-lg-6":"_aXn7x","mr-lg-7":"_woi9n","pr-lg-7":"_Xz9XT","mr-lg-8":"_p4H3g","pr-lg-8":"_2GHoq","mr-lg-9":"_OZukC","pr-lg-9":"_ckY7k","mr-lg-10":"_tu3W5","pr-lg-10":"_9v3FG","mt-lg-0":"_I-1g6","pt-lg-0":"_cUyFD","mt-lg-1":"_c94QP","pt-lg-1":"_g75ry","mt-lg-2":"_XiT9Y","pt-lg-2":"_OzwIr","mt-lg-3":"_TZnYh","pt-lg-3":"_qC-3V","mt-lg-4":"_ClD8h","pt-lg-4":"_n1T93","mt-lg-5":"_yfqL8","pt-lg-5":"_oRkf6","mt-lg-6":"_6sndc","pt-lg-6":"_zKuFI","mt-lg-7":"_61kz3","pt-lg-7":"_5Q2hr","mt-lg-8":"_s2ReT","pt-lg-8":"_Ap8SS","mt-lg-9":"_bV6Hp","pt-lg-9":"_G5Dl9","mt-lg-10":"_hSJ91","pt-lg-10":"_amgjj","mb-lg-0":"_p-7me","pb-lg-0":"_ys8Fm","mb-lg-1":"_ZFPzR","pb-lg-1":"_Low3Q","mb-lg-2":"_UKfD5","pb-lg-2":"_Z4xYz","mb-lg-3":"_WYCZq","pb-lg-3":"_lOmpq","mb-lg-4":"_3f13Q","pb-lg-4":"_tfvEW","mb-lg-5":"_DxAtv","pb-lg-5":"_lN1KV","mb-lg-6":"_pEAAo","pb-lg-6":"_9pLfP","mb-lg-7":"_lZzWZ","pb-lg-7":"_E76Lg","mb-lg-8":"_Biywb","pb-lg-8":"_PKNGt","mb-lg-9":"_af7LP","pb-lg-9":"_769vF","mb-lg-10":"_p6W2n","pb-lg-10":"_44r6t","mx-lg-0":"_noonL","px-lg-0":"_g6n-m","mx-lg-1":"_V3fJC","px-lg-1":"_h-048","mx-lg-2":"_VBXFM","px-lg-2":"_yXjeI","mx-lg-3":"_anxPB","px-lg-3":"_umXxh","mx-lg-4":"_arYWt","px-lg-4":"_v21qY","mx-lg-5":"_VJrBv","px-lg-5":"_Wg7-s","mx-lg-6":"_qiDC7","px-lg-6":"_1VXpg","mx-lg-7":"_d0c15","px-lg-7":"_sfSeF","mx-lg-8":"_2gYLA","px-lg-8":"_DEL7d","mx-lg-9":"_KmU1j","px-lg-9":"_Qs2ud","mx-lg-10":"_cEBsK","px-lg-10":"_mQH7b","my-lg-0":"_ag2WO","py-lg-0":"_lnVBo","my-lg-1":"_xEHQX","py-lg-1":"_9Tj2M","my-lg-2":"_Iqbzp","py-lg-2":"_8tcVx","my-lg-3":"_caNHW","py-lg-3":"_XJ-2h","my-lg-4":"_6q91a","py-lg-4":"_EwkV-","my-lg-5":"_vAyw8","py-lg-5":"_5fbq2","my-lg-6":"_15LIk","py-lg-6":"_HIyvD","my-lg-7":"_kBk-L","py-lg-7":"_t5Eqq","my-lg-8":"_7QdOv","py-lg-8":"_mWXQT","my-lg-9":"_AgF1j","py-lg-9":"_Hw03a","my-lg-10":"_lgtEt","py-lg-10":"_VLUO-","m-md-0":"_bZzK1","p-md-0":"_hf1u1","m-md-1":"_D90hf","p-md-1":"_T8Wci","m-md-2":"_OV2C9","p-md-2":"_GFg-F","m-md-3":"_tOGww","p-md-3":"_p0NdJ","m-md-4":"_gUtm-","p-md-4":"_92JAP","m-md-5":"_V4DwP","p-md-5":"_KzYIR","m-md-6":"_RYzMI","p-md-6":"_bV-UI","m-md-7":"_bZ8rT","p-md-7":"_sz5lw","m-md-8":"_Tt85A","p-md-8":"_o9XsL","m-md-9":"_5Z2zG","p-md-9":"_QFUvw","m-md-10":"_o-CSv","p-md-10":"_I0UW7","ml-md-0":"_Ec-jt","pl-md-0":"_AsNUW","ml-md-1":"_FkvyK","pl-md-1":"_eWpHd","ml-md-2":"_C-N9j","pl-md-2":"_f4IXC","ml-md-3":"_i4rpE","pl-md-3":"_u1wxV","ml-md-4":"_bfpFB","pl-md-4":"_LFkDV","ml-md-5":"_ChenT","pl-md-5":"_Tseed","ml-md-6":"_5OVzE","pl-md-6":"_kKZuw","ml-md-7":"_HkEvd","pl-md-7":"_-UCQ1","ml-md-8":"_Mil4J","pl-md-8":"_ibj8N","ml-md-9":"_hZgvD","pl-md-9":"_x58o7","ml-md-10":"_aNTRb","pl-md-10":"_B9Ytk","mr-md-0":"_5fzNR","pr-md-0":"_UcmnK","mr-md-1":"_7GSVQ","pr-md-1":"_lKZ6y","mr-md-2":"_Vuc2l","pr-md-2":"_OWoeF","mr-md-3":"_GfGNW","pr-md-3":"_039xq","mr-md-4":"_XUUw7","pr-md-4":"_hNdK8","mr-md-5":"_PchvO","pr-md-5":"_YBTBv","mr-md-6":"_irZPz","pr-md-6":"_xez9v","mr-md-7":"_IWCJD","pr-md-7":"_Nymwz","mr-md-8":"_1ypEg","pr-md-8":"_hJvwk","mr-md-9":"_AisV-","pr-md-9":"_6jqua","mr-md-10":"_LdBUv","pr-md-10":"_Rhahl","mt-md-0":"_iI75A","pt-md-0":"_GCK2h","mt-md-1":"_QoRcE","pt-md-1":"_Q3gZh","mt-md-2":"_rzNrf","pt-md-2":"_mrtOR","mt-md-3":"_-Xx-x","pt-md-3":"_vhZY4","mt-md-4":"_Ie5M9","pt-md-4":"_Bv-Vz","mt-md-5":"_sC4OE","pt-md-5":"_sZzfz","mt-md-6":"_b8qW3","pt-md-6":"_sca5l","mt-md-7":"_Pn6m9","pt-md-7":"_9klOR","mt-md-8":"_oY4i-","pt-md-8":"_QpcKU","mt-md-9":"_-PssV","pt-md-9":"_IBITO","mt-md-10":"_hmDGa","pt-md-10":"_rPOnf","mb-md-0":"_KsSuI","pb-md-0":"_E01ZW","mb-md-1":"_mu8n4","pb-md-1":"_obt8N","mb-md-2":"_4uUmS","pb-md-2":"_eCQut","mb-md-3":"_gckFx","pb-md-3":"_v76WA","mb-md-4":"_HNG1G","pb-md-4":"_WF2cS","mb-md-5":"_y0d7f","pb-md-5":"_Ulg5o","mb-md-6":"_gGNca","pb-md-6":"_L6tTJ","mb-md-7":"_JFKoe","pb-md-7":"_cotbI","mb-md-8":"_zWuLC","pb-md-8":"_PZ98d","mb-md-9":"_0OLPw","pb-md-9":"_diSZ0","mb-md-10":"_tZv9r","pb-md-10":"_8DINx","mx-md-0":"_TlILw","px-md-0":"_nYb1A","mx-md-1":"_8F9Eu","px-md-1":"_zdtgY","mx-md-2":"_Hf2VU","px-md-2":"_R7ntT","mx-md-3":"_7koGZ","px-md-3":"_SjYZ0","mx-md-4":"_mfX1U","px-md-4":"_wpmO4","mx-md-5":"_yWbVN","px-md-5":"_c-PDJ","mx-md-6":"_F98A-","px-md-6":"_k2aB-","mx-md-7":"_PyjZi","px-md-7":"_1p7LO","mx-md-8":"_at5B-","px-md-8":"_Wlop7","mx-md-9":"_MP-IT","px-md-9":"_ZEJLn","mx-md-10":"_t-qxH","px-md-10":"_m2jcH","my-md-0":"_mamXD","py-md-0":"_XfnLL","my-md-1":"_wltQA","py-md-1":"_kMSov","my-md-2":"_PB9Lu","py-md-2":"_ZHQxJ","my-md-3":"_ROfrO","py-md-3":"_5pjW-","my-md-4":"_asOWk","py-md-4":"_521lJ","my-md-5":"_sfKXT","py-md-5":"_0hhLg","my-md-6":"_vBIkT","py-md-6":"_mh-mU","my-md-7":"_SbaIW","py-md-7":"_4U--m","my-md-8":"_8Ml4g","py-md-8":"_8CAbC","my-md-9":"_2W5Vi","py-md-9":"_ifVgs","my-md-10":"_jOwwL","py-md-10":"_xGEHg","m-xl-0":"_Cmi8h","p-xl-0":"_YOJnv","m-xl-1":"_IlYRc","p-xl-1":"_qg39r","m-xl-2":"_NZu1F","p-xl-2":"_ChCeZ","m-xl-3":"_wCJFO","p-xl-3":"_s5DXB","m-xl-4":"_-ooyS","p-xl-4":"_1rcFF","m-xl-5":"_2--cB","p-xl-5":"_0s8cD","m-xl-6":"_zMbs-","p-xl-6":"_qAR79","m-xl-7":"_sRWyz","p-xl-7":"_ykFCJ","m-xl-8":"_dj226","p-xl-8":"_XLB7-","m-xl-9":"_eM-R4","p-xl-9":"_QuQVl","m-xl-10":"_UUuwy","p-xl-10":"_nDqX9","ml-xl-0":"_LL8WU","pl-xl-0":"_AIPph","ml-xl-1":"_pKFo-","pl-xl-1":"_tQEXN","ml-xl-2":"_F-wn7","pl-xl-2":"_wcxv3","ml-xl-3":"_M94zg","pl-xl-3":"_I3KoK","ml-xl-4":"_0PzeG","pl-xl-4":"_lzci3","ml-xl-5":"_XRI4C","pl-xl-5":"_XlhyA","ml-xl-6":"_GjzL0","pl-xl-6":"_ASrOm","ml-xl-7":"_-0WjA","pl-xl-7":"_hx5P8","ml-xl-8":"_XlbUH","pl-xl-8":"_Vonli","ml-xl-9":"_LwuSL","pl-xl-9":"_MxuFJ","ml-xl-10":"_v7xZI","pl-xl-10":"_Tvo-Z","mr-xl-0":"_SzVWx","pr-xl-0":"_K1dhq","mr-xl-1":"_JOZtq","pr-xl-1":"_c1i37","mr-xl-2":"_R3B8Q","pr-xl-2":"_63cME","mr-xl-3":"_91LCJ","pr-xl-3":"_WxNaS","mr-xl-4":"_BauAg","pr-xl-4":"_V6rST","mr-xl-5":"_H0Uy4","pr-xl-5":"_idyBA","mr-xl-6":"_lIBS-","pr-xl-6":"_hm7f2","mr-xl-7":"_DcV1a","pr-xl-7":"_L9DAM","mr-xl-8":"_M62Cx","pr-xl-8":"_nso5O","mr-xl-9":"_M-vkg","pr-xl-9":"_Jm-de","mr-xl-10":"_V5v9Y","pr-xl-10":"_jt-a5","mt-xl-0":"_YPHmA","pt-xl-0":"_XVXEh","mt-xl-1":"_pJbYc","pt-xl-1":"_i-ZXc","mt-xl-2":"_SHsME","pt-xl-2":"_ak-Hh","mt-xl-3":"_wzbs7","pt-xl-3":"_py3lR","mt-xl-4":"_HBXKA","pt-xl-4":"_GQBlv","mt-xl-5":"_5d6Ee","pt-xl-5":"_KFPkO","mt-xl-6":"_Yf-yF","pt-xl-6":"_1e6oC","mt-xl-7":"_kg9lU","pt-xl-7":"_SHs7f","mt-xl-8":"_KXugL","pt-xl-8":"_VyRfA","mt-xl-9":"_EOyB7","pt-xl-9":"_5KMcS","mt-xl-10":"_8W-Zj","pt-xl-10":"_cz8iz","mb-xl-0":"_rWALs","pb-xl-0":"_LpkfT","mb-xl-1":"_RzmHQ","pb-xl-1":"_6ad54","mb-xl-2":"_Ajc4e","pb-xl-2":"_SbX8t","mb-xl-3":"_vSzzB","pb-xl-3":"_yidEJ","mb-xl-4":"_mrCP3","pb-xl-4":"_3TrW-","mb-xl-5":"_6j8-6","pb-xl-5":"_D1WrN","mb-xl-6":"_XDRU9","pb-xl-6":"_dcA8T","mb-xl-7":"_-i7kC","pb-xl-7":"_81QE4","mb-xl-8":"_X9-zp","pb-xl-8":"_HTClM","mb-xl-9":"_klb-D","pb-xl-9":"_RReN9","mb-xl-10":"_vPsb7","pb-xl-10":"_OVfeI","mx-xl-0":"_YNCB1","px-xl-0":"_hiVA4","mx-xl-1":"_k6kz-","px-xl-1":"_rONSC","mx-xl-2":"_pBneY","px-xl-2":"_po-3F","mx-xl-3":"_Bpbr7","px-xl-3":"_KdGyy","mx-xl-4":"_brh6E","px-xl-4":"_qqxT0","mx-xl-5":"_BfzzU","px-xl-5":"_R-Rw5","mx-xl-6":"_sSR5n","px-xl-6":"_thByS","mx-xl-7":"_r5nPW","px-xl-7":"_Qn6um","mx-xl-8":"_J9EDO","px-xl-8":"_9rkVI","mx-xl-9":"_Mltks","px-xl-9":"_g-Ham","mx-xl-10":"_sbya6","px-xl-10":"_8-jLj","my-xl-0":"_5yWBG","py-xl-0":"_xbHHG","my-xl-1":"_PlYBL","py-xl-1":"_F3Fon","my-xl-2":"_tsmUe","py-xl-2":"_a-0sQ","my-xl-3":"_sY3wJ","py-xl-3":"_iMcG-","my-xl-4":"_oHAzn","py-xl-4":"_SVfuw","my-xl-5":"_PvaIf","py-xl-5":"_J1xNt","my-xl-6":"_opQCd","py-xl-6":"_BykWn","my-xl-7":"_wYtgV","py-xl-7":"_rWN6g","my-xl-8":"_QHTpr","py-xl-8":"_6lwHD","my-xl-9":"_sKUSa","py-xl-9":"_HEg44","my-xl-10":"_mR1Ig","py-xl-10":"_-KK9e","background-shine":"_GS93D","path":"_Yio2J","line":"_hUBrW","skeleton":"_jhzCK","skeleton-animate":"_E3Vdv","skeleton-dark":"_wQ36Y","skeleton-dark-animate":"_j-rmG","skeleton-transparent":"_trTiX","skeleton-transparent-animate":"_4QQUW","semi-transparent":"_jW9cZ","disable":"_07-2N","full-width-on-tablets":"_at3Is","full-width-on-mobiles":"_7mVhH","xl":"_YBEjy","lg":"_4T1JY","md":"_y81Q7","sm":"_HlFvs","small-padding-on-small-mobiles":"_pC5i6","primary":"_rf33o","primary-bordered":"_bpdoC","primary-transparent":"_FNwOe","transparent":"_9LspZ","transparent-bordered":"_HgM7r","transparent-without-shadow":"_tkp-m","white":"_bv597","white-flat":"_IhewT","button-primary-dots-wrapper":"_OEKG8","show":"_MQYPo","button-success-icon":"_Y24W2","button-text":"_o-rLq","hide":"_4GC9-","button-with-icon":"_m1W6m","button-with-icon-text":"_75-fw","big-icon":"_gHcQi"};
1160
+
1161
+ var styles = {"container":"_a5RSj","m-0":"_wcoyj","p-0":"_Rd5sE","m-1":"_vAsxv","p-1":"_KZ14Z","m-2":"_Bvk20","p-2":"_Z7fhL","m-3":"_ZqDCi","p-3":"_CiGc9","m-4":"_8JK-L","p-4":"_FadoA","m-5":"_baCle","p-5":"_cvJqX","m-6":"_P3lUT","p-6":"_ZmGGH","m-7":"_5Tnff","p-7":"_-t7z9","m-8":"_1JxUQ","p-8":"_EATOh","m-9":"_pJGV0","p-9":"_B762d","m-10":"_Z3rGU","p-10":"_0ULM0","ml-0":"_ZSfG7","pl-0":"_hjKq0","ml-1":"_srwbU","pl-1":"_oz-sG","ml-2":"_RnILi","pl-2":"_-nAjZ","ml-3":"_lges5","pl-3":"_AwVsn","ml-4":"_p4arL","pl-4":"_upAfC","ml-5":"_-iEnG","pl-5":"_bqApa","ml-6":"_uF0xd","pl-6":"_WUUFo","ml-7":"_eXFZs","pl-7":"_ZforM","ml-8":"_2AA5o","pl-8":"_u6bF0","ml-9":"_19IxL","pl-9":"_vmLg6","ml-10":"_eyqFK","pl-10":"_mr36J","mr-0":"_6RpFz","pr-0":"_fgnzi","mr-1":"_fBjrA","pr-1":"_QrC2Y","mr-2":"_0Y6RC","pr-2":"_5kZkr","mr-3":"_iaZj-","pr-3":"_A-IQ7","mr-4":"_zBHHn","pr-4":"_pHQ4t","mr-5":"_1JTCi","pr-5":"_ODvHf","mr-6":"_n6Enr","pr-6":"_XNdBl","mr-7":"_YfaVy","pr-7":"_ZfZDh","mr-8":"_le3sp","pr-8":"_K1rvN","mr-9":"_mL6UV","pr-9":"_76mZn","mr-10":"_fo-sf","pr-10":"_xvsK1","mt-0":"_1uBdK","pt-0":"_30qg7","mt-1":"_NKlWd","pt-1":"_3yj99","mt-2":"_lLyiG","pt-2":"_GsXqc","mt-3":"_zC55o","pt-3":"_3OZTc","mt-4":"_v1VXO","pt-4":"_sFrdR","mt-5":"_qbBFx","pt-5":"_DQrF8","mt-6":"_dJG8P","pt-6":"_Zxte7","mt-7":"_sUtkp","pt-7":"_9B1r5","mt-8":"_Qrnld","pt-8":"_7xBV7","mt-9":"_OPKw2","pt-9":"_cXhnD","mt-10":"_m5k36","pt-10":"_b9nMR","mb-0":"_7AyaR","pb-0":"_u0vFs","mb-1":"_ivpnr","pb-1":"_1dkPf","mb-2":"_D8KfL","pb-2":"_wzuIB","mb-3":"_zwh5E","pb-3":"_rT8wS","mb-4":"_wpLh9","pb-4":"_AGvn8","mb-5":"_-phDB","pb-5":"_r4HWg","mb-6":"_RZI7I","pb-6":"_-t4Gs","mb-7":"_Vw-z1","pb-7":"_qwD1B","mb-8":"_f3nKh","pb-8":"_Sk1Fn","mb-9":"_2MDAw","pb-9":"_jZbwv","mb-10":"_gRDI3","pb-10":"_W7OVZ","mx-0":"_I6mmv","px-0":"_BVRG5","mx-1":"_b7fTJ","px-1":"_bZf6u","mx-2":"_FoGd8","px-2":"_-vX3t","mx-3":"_0H3Cj","loading-dots":"_pnWN9","big":"_k0j0g","dot":"_9LXS6","px-3":"_ggifM","mx-4":"_leP-v","px-4":"_7Kcun","mx-5":"_sBxud","px-5":"_oJO7X","mx-6":"_F-Una","px-6":"_Bl-A8","mx-7":"_NVWrT","px-7":"_Bn6vR","mx-8":"_OK9GD","px-8":"_iv1v2","mx-9":"_WVtLI","px-9":"_ntW3v","mx-10":"_21M1-","px-10":"_BjXo-","my-0":"_3v8p4","py-0":"_EBmV-","my-1":"_DcOh5","py-1":"_udCfN","my-2":"_Lk0RK","py-2":"_wIENK","my-3":"_nsOf5","py-3":"_No-oK","my-4":"_L1ycy","py-4":"_42DgQ","my-5":"_3bZSh","py-5":"_XjTMT","my-6":"_Ty-GG","py-6":"_7Dr5E","my-7":"_PILBF","py-7":"_vyvsk","my-8":"_AkmkO","py-8":"_X0xg-","my-9":"_VSxcf","py-9":"_Hq-yp","my-10":"_FxwFR","py-10":"_BnN2G","m-sm-0":"_EZHgz","p-sm-0":"_oKPqX","m-sm-1":"_gdysh","p-sm-1":"_-7KK8","m-sm-2":"_BLBqZ","p-sm-2":"_IgrmD","m-sm-3":"_zbrA7","p-sm-3":"_eimPJ","m-sm-4":"_7RaaP","p-sm-4":"_0-Cvi","m-sm-5":"_PhCOs","p-sm-5":"_CIKFA","m-sm-6":"_8WC3P","p-sm-6":"_2FqT5","m-sm-7":"_D7sDK","p-sm-7":"_L3EpN","m-sm-8":"_mG6-A","p-sm-8":"_D2Gx9","m-sm-9":"_2tGFi","p-sm-9":"_8n6VA","m-sm-10":"_G-MMA","p-sm-10":"_pgJzb","ml-sm-0":"_BF125","pl-sm-0":"_81k6q","ml-sm-1":"_JSywC","pl-sm-1":"_1eoeN","ml-sm-2":"_q5cSf","pl-sm-2":"_A6Li5","ml-sm-3":"_-7C1-","pl-sm-3":"_lBIcx","ml-sm-4":"_bvj1N","pl-sm-4":"_SQmLb","ml-sm-5":"_pwy33","pl-sm-5":"_iuqDu","ml-sm-6":"_CNiYb","pl-sm-6":"_tQ2J-","ml-sm-7":"_Zuec-","pl-sm-7":"_iJF5q","ml-sm-8":"_lP-ls","pl-sm-8":"_1xIwn","ml-sm-9":"_Jld-6","pl-sm-9":"_pfOVT","ml-sm-10":"_TGfAU","pl-sm-10":"_MYgNP","mr-sm-0":"_CEiPO","pr-sm-0":"_rZ5kD","mr-sm-1":"_-bdjz","pr-sm-1":"_nRBRL","mr-sm-2":"_17O3E","pr-sm-2":"_uBaUj","mr-sm-3":"_5oO1d","pr-sm-3":"_jQWXm","mr-sm-4":"_peO4Y","pr-sm-4":"_P2f3n","mr-sm-5":"_AUc3q","pr-sm-5":"_7TR99","mr-sm-6":"_e3d5h","pr-sm-6":"_QqPl1","mr-sm-7":"_Yc1cR","pr-sm-7":"_5fd5H","mr-sm-8":"_z4g3-","pr-sm-8":"_gY3T9","mr-sm-9":"_P9chP","pr-sm-9":"_G4k6A","mr-sm-10":"_QWMD2","pr-sm-10":"_2POWv","mt-sm-0":"_xYS0m","pt-sm-0":"_gYD3b","mt-sm-1":"_08rCY","pt-sm-1":"_UsP-z","mt-sm-2":"_HWQec","pt-sm-2":"_cjIgZ","mt-sm-3":"_gZV20","pt-sm-3":"_zJZJm","mt-sm-4":"_4FE5W","pt-sm-4":"_VpJhv","mt-sm-5":"_eu88H","pt-sm-5":"_V7qwC","mt-sm-6":"_09LyL","pt-sm-6":"_n8bba","mt-sm-7":"_q-ASs","pt-sm-7":"_3b9S8","mt-sm-8":"_iTxDv","pt-sm-8":"_--Hdk","mt-sm-9":"_OaVE-","pt-sm-9":"_cd-UP","mt-sm-10":"_ZIr-H","pt-sm-10":"_6jYkb","mb-sm-0":"_YgN23","pb-sm-0":"_F8F6A","mb-sm-1":"_4QH8u","pb-sm-1":"_A2I8v","mb-sm-2":"_jrZxh","pb-sm-2":"_2VL1m","mb-sm-3":"_IB8uX","pb-sm-3":"_meger","mb-sm-4":"_-gCVy","pb-sm-4":"_R-qMm","mb-sm-5":"_YwvXh","pb-sm-5":"_pyu5v","mb-sm-6":"_qwhTX","pb-sm-6":"_l61nc","mb-sm-7":"_0KfeR","pb-sm-7":"_YXuNM","mb-sm-8":"_75fJr","pb-sm-8":"_jp-Qe","mb-sm-9":"_V0wM-","pb-sm-9":"_vMKpc","mb-sm-10":"_sxEY8","pb-sm-10":"_k2mOD","mx-sm-0":"_qPF9i","px-sm-0":"_cl18e","mx-sm-1":"_LvMUO","px-sm-1":"_RcIbD","mx-sm-2":"_xLMK5","px-sm-2":"_GCL1S","mx-sm-3":"_t0q4o","px-sm-3":"_cuiW8","mx-sm-4":"_pHjdd","px-sm-4":"_LDu1N","mx-sm-5":"_cYpLd","px-sm-5":"_24Yji","mx-sm-6":"_pXCM6","px-sm-6":"_uoSDI","mx-sm-7":"_qbXoQ","px-sm-7":"_0RlFx","mx-sm-8":"_3f-s3","px-sm-8":"_xAS-y","mx-sm-9":"_vx3dZ","px-sm-9":"_ndXm6","mx-sm-10":"_6lFsZ","px-sm-10":"_EZ6Qr","my-sm-0":"_0t-Cg","py-sm-0":"_N3sbI","my-sm-1":"_jdmVi","py-sm-1":"_GlMKb","my-sm-2":"_yFRs8","py-sm-2":"_LNRZQ","my-sm-3":"_qSuwF","py-sm-3":"_ON3vd","my-sm-4":"_1h6pX","py-sm-4":"_TZg0h","my-sm-5":"_vT295","py-sm-5":"_J1zu8","my-sm-6":"_7LuwF","py-sm-6":"_qbbdP","my-sm-7":"_9vKuY","py-sm-7":"_C9gzg","my-sm-8":"_Nx1-S","py-sm-8":"_8lmEZ","my-sm-9":"_LxGxx","py-sm-9":"_3y4jy","my-sm-10":"_61y0C","py-sm-10":"_fxmBa","m-lg-0":"_PJydR","p-lg-0":"_3o1cd","m-lg-1":"_MAdi8","p-lg-1":"_JDc1V","m-lg-2":"_pEH2Q","p-lg-2":"_Ic9tL","m-lg-3":"_P6cGt","p-lg-3":"_nzx-g","m-lg-4":"_9bH-j","p-lg-4":"_KdZTF","m-lg-5":"_hxjaE","p-lg-5":"_LDamm","m-lg-6":"_xXtVI","p-lg-6":"_ZWhTL","m-lg-7":"_mPnVe","p-lg-7":"_lJnBT","m-lg-8":"_J-MQA","p-lg-8":"_MGs60","m-lg-9":"_ixlkP","p-lg-9":"_Lru1O","m-lg-10":"_eH6ht","p-lg-10":"_ugZzQ","ml-lg-0":"_6z3OE","pl-lg-0":"_PDwaH","ml-lg-1":"_GMcN9","pl-lg-1":"_NoDTB","ml-lg-2":"_PQ5AQ","pl-lg-2":"_8-Pu6","ml-lg-3":"_PktVo","pl-lg-3":"_JTpEZ","ml-lg-4":"_zIcyb","pl-lg-4":"_e4YYS","ml-lg-5":"_HrlcA","pl-lg-5":"_cwG3s","ml-lg-6":"_Xf7Wv","pl-lg-6":"_XYe-E","ml-lg-7":"_vnGAT","pl-lg-7":"_NnScU","ml-lg-8":"_9z7Tj","pl-lg-8":"_DDEn1","ml-lg-9":"_sxSQp","pl-lg-9":"_-r39c","ml-lg-10":"_kppNg","pl-lg-10":"_1mgTz","mr-lg-0":"_WtS6h","pr-lg-0":"_NKNU9","mr-lg-1":"_kxaOQ","pr-lg-1":"_8OvSK","mr-lg-2":"_bTQt8","pr-lg-2":"_yQerd","mr-lg-3":"_f7H9P","pr-lg-3":"_Kwfoa","mr-lg-4":"_lkF5d","pr-lg-4":"_b7tIe","mr-lg-5":"_H4e5a","pr-lg-5":"_pxwBt","mr-lg-6":"_I81Hq","pr-lg-6":"_1Xwlf","mr-lg-7":"_gtO-Y","pr-lg-7":"_vjm3Z","mr-lg-8":"_ZfEr1","pr-lg-8":"_je0MD","mr-lg-9":"_h43Co","pr-lg-9":"_Lnbh5","mr-lg-10":"_HoaFo","pr-lg-10":"_3puFA","mt-lg-0":"_a7pDC","pt-lg-0":"_-URo7","mt-lg-1":"_Ot-U1","pt-lg-1":"_rMvMf","mt-lg-2":"_95ooz","pt-lg-2":"_vkEgW","mt-lg-3":"_9XqX5","pt-lg-3":"_b-oGK","mt-lg-4":"_eYL6E","pt-lg-4":"_zgUGu","mt-lg-5":"_BqCaM","pt-lg-5":"_Y9PL4","mt-lg-6":"_0aOPb","pt-lg-6":"_nvMum","mt-lg-7":"_-pNQS","pt-lg-7":"_funa7","mt-lg-8":"_sDweY","pt-lg-8":"_S1hmu","mt-lg-9":"_Y4BpR","pt-lg-9":"_J3203","mt-lg-10":"_Jm-dV","pt-lg-10":"_0WSnk","mb-lg-0":"_4uWrE","pb-lg-0":"_qy0mb","mb-lg-1":"_jUNMm","pb-lg-1":"_pUTOt","mb-lg-2":"_aGqhb","pb-lg-2":"_xAKUw","mb-lg-3":"_kado5","pb-lg-3":"_htLgL","mb-lg-4":"_mWWU1","pb-lg-4":"_gqGWe","mb-lg-5":"_ceycQ","pb-lg-5":"_RzNIh","mb-lg-6":"_VLMG4","pb-lg-6":"_-8-Aj","mb-lg-7":"_HBnRW","pb-lg-7":"_ZsIEk","mb-lg-8":"_bj2r5","pb-lg-8":"_cBnkL","mb-lg-9":"_w3001","pb-lg-9":"_Kua-7","mb-lg-10":"_wZKsF","pb-lg-10":"_GX-Wb","mx-lg-0":"_-G50w","px-lg-0":"_OTPQl","mx-lg-1":"_JJ9DD","px-lg-1":"_jedSl","mx-lg-2":"_n9zl3","px-lg-2":"_Cg-Eq","mx-lg-3":"_6ZhL3","px-lg-3":"_0oPYT","mx-lg-4":"_H9sE1","px-lg-4":"_aV3U2","mx-lg-5":"_Y2BNn","px-lg-5":"_EzRHI","mx-lg-6":"_fp9jU","px-lg-6":"_wghWL","mx-lg-7":"_zB5Qv","px-lg-7":"_gclTH","mx-lg-8":"_Qxq2x","px-lg-8":"_M7akr","mx-lg-9":"_Vfhs-","px-lg-9":"_Rv7m-","mx-lg-10":"_lni3U","px-lg-10":"_gdVVu","my-lg-0":"_rMuza","py-lg-0":"_MZopi","my-lg-1":"_Thq10","py-lg-1":"_BXQnr","my-lg-2":"_lHRe-","py-lg-2":"_6MiWj","my-lg-3":"_-vobr","py-lg-3":"_xtsGY","my-lg-4":"_m2hen","py-lg-4":"_-069Y","my-lg-5":"_nTHzp","py-lg-5":"_r4pes","my-lg-6":"_LTkTV","py-lg-6":"_13TOF","my-lg-7":"_Em859","py-lg-7":"_mJzVF","my-lg-8":"_T8EVh","py-lg-8":"_h2ol5","my-lg-9":"_T-LZJ","py-lg-9":"_QIrnZ","my-lg-10":"_EY0q7","py-lg-10":"_hvU2E","m-md-0":"_u8Not","p-md-0":"_PVgyV","m-md-1":"_y-q4l","p-md-1":"_7X2x6","m-md-2":"_r3IGF","p-md-2":"_abaFH","m-md-3":"_rH0Ca","p-md-3":"_m-V0R","m-md-4":"_NQj-k","p-md-4":"_xjGzA","m-md-5":"_41oza","p-md-5":"_cgf0Z","m-md-6":"_lelHI","p-md-6":"_2C8Oa","m-md-7":"_w1Eil","p-md-7":"_EtEzw","m-md-8":"_Q8a3D","p-md-8":"_5nsxA","m-md-9":"_LzOqJ","p-md-9":"_7LEzr","m-md-10":"_CRNVR","p-md-10":"_ClNNV","ml-md-0":"_3abXz","pl-md-0":"_7BRiC","ml-md-1":"_Jbe0V","pl-md-1":"_Ok-KV","ml-md-2":"_5SO4-","pl-md-2":"_IvJ88","ml-md-3":"_NWLcP","pl-md-3":"_XASwl","ml-md-4":"_La-jA","pl-md-4":"_M8vz7","ml-md-5":"_4UZJ3","pl-md-5":"_ikRMN","ml-md-6":"_GpxKA","pl-md-6":"_-vp4I","ml-md-7":"_qZisY","pl-md-7":"_UspU5","ml-md-8":"_xTqIg","pl-md-8":"_8LLNG","ml-md-9":"_u3Wi6","pl-md-9":"_yukVA","ml-md-10":"_BJ3Kb","pl-md-10":"_Ncx33","mr-md-0":"_-dCKD","pr-md-0":"_p4Xdb","mr-md-1":"_DZXj3","pr-md-1":"_YZLPN","mr-md-2":"_IEATr","pr-md-2":"_OGWz-","mr-md-3":"_UxMFq","pr-md-3":"_qMmI8","mr-md-4":"_KEt4t","pr-md-4":"_nLevO","mr-md-5":"_AMVPM","pr-md-5":"_3m10o","mr-md-6":"_fzrrj","pr-md-6":"_Wbjjj","mr-md-7":"_mZWrU","pr-md-7":"_mqIEB","mr-md-8":"_5p3E5","pr-md-8":"_NyrXd","mr-md-9":"_gez8y","pr-md-9":"_qLaJ8","mr-md-10":"_TR-zd","pr-md-10":"_SqjX-","mt-md-0":"_Okpug","pt-md-0":"_xIGF1","mt-md-1":"_kkttT","pt-md-1":"_6Fntk","mt-md-2":"_jjt3V","pt-md-2":"_MBCLj","mt-md-3":"_AcRpn","pt-md-3":"_9e4N3","mt-md-4":"_TEYLB","pt-md-4":"_G-b2b","mt-md-5":"_ADYmJ","pt-md-5":"_-PW2W","mt-md-6":"_IiBSh","pt-md-6":"_oOMKv","mt-md-7":"_LzMKR","pt-md-7":"_P93Fk","mt-md-8":"_ZPChR","pt-md-8":"_IjZLd","mt-md-9":"_OYWyj","pt-md-9":"_6VDq-","mt-md-10":"_NFUMl","pt-md-10":"_9N5Rs","mb-md-0":"_KNEZM","pb-md-0":"_dlRtG","mb-md-1":"_2TJCJ","pb-md-1":"_FYJz-","mb-md-2":"_p5q4o","pb-md-2":"_W20R5","mb-md-3":"_QMtNI","pb-md-3":"_X4ghG","mb-md-4":"_ROsHu","pb-md-4":"_LLz3c","mb-md-5":"_FKlov","pb-md-5":"_qQje5","mb-md-6":"_zHdHt","pb-md-6":"_7vH68","mb-md-7":"_5-25V","pb-md-7":"_a5Jzs","mb-md-8":"_9NPzr","pb-md-8":"_NpZZI","mb-md-9":"_F5182","pb-md-9":"_2SM3y","mb-md-10":"_R3bvz","pb-md-10":"_Sop9H","mx-md-0":"_OUA4d","px-md-0":"_s-0Qy","mx-md-1":"_cBeVb","px-md-1":"_34ZBT","mx-md-2":"_-dnuU","px-md-2":"_0-UrT","mx-md-3":"_CewFh","px-md-3":"_ZrFGb","mx-md-4":"_5Cvub","px-md-4":"_9CpfN","mx-md-5":"_O1iRv","px-md-5":"_dnUx0","mx-md-6":"_QmgAB","px-md-6":"_vP8Uq","mx-md-7":"_PcZ9w","px-md-7":"_5l4s3","mx-md-8":"_isOXv","px-md-8":"_cvHBA","mx-md-9":"_LIRJ0","px-md-9":"_09Gju","mx-md-10":"_b-TCB","px-md-10":"_5UoX8","my-md-0":"_wrYvU","py-md-0":"_Fwd2A","my-md-1":"_vBwvs","py-md-1":"_vl1f-","my-md-2":"_7g5va","py-md-2":"_D0JS-","my-md-3":"_8DN0N","py-md-3":"_qvNWl","my-md-4":"_o5Mnp","py-md-4":"_rFfbU","my-md-5":"_7XZDH","py-md-5":"_1B0Rr","my-md-6":"_s09ut","py-md-6":"_jnQRw","my-md-7":"_PgL1b","py-md-7":"_T4779","my-md-8":"_R0d0D","py-md-8":"_Fkri-","my-md-9":"_FM-XK","py-md-9":"_H-snR","my-md-10":"_Z49JP","py-md-10":"_01G-F","m-xl-0":"_H4Jyh","p-xl-0":"_WMtq9","m-xl-1":"_FeJPz","p-xl-1":"_00t3r","m-xl-2":"_svLno","p-xl-2":"_2C22I","m-xl-3":"_T5qYA","p-xl-3":"_dcbn0","m-xl-4":"_Xl89-","p-xl-4":"_Ctf-y","m-xl-5":"_ZWihS","p-xl-5":"_Lzig2","m-xl-6":"_jljvY","p-xl-6":"_X1owU","m-xl-7":"_l1myf","p-xl-7":"_T1fTP","m-xl-8":"_FWU16","p-xl-8":"_R2T50","m-xl-9":"_2TtzQ","p-xl-9":"_-142y","m-xl-10":"_975wG","p-xl-10":"_DPori","ml-xl-0":"_9Zc9q","pl-xl-0":"_On2x0","ml-xl-1":"_IryvS","pl-xl-1":"_J2DXA","ml-xl-2":"_S7cyp","pl-xl-2":"_YxNk9","ml-xl-3":"_6eyqg","pl-xl-3":"_cwyGU","ml-xl-4":"_TbIDB","pl-xl-4":"_JKpl8","ml-xl-5":"_P17BD","pl-xl-5":"_w8ccI","ml-xl-6":"_fUJPM","pl-xl-6":"_mgqKZ","ml-xl-7":"_p-Fn9","pl-xl-7":"_eMF8n","ml-xl-8":"_VO2-y","pl-xl-8":"_O9n-E","ml-xl-9":"_wqX4W","pl-xl-9":"_wDG35","ml-xl-10":"_-TNE-","pl-xl-10":"_jyfgf","mr-xl-0":"_9aQeC","pr-xl-0":"_zWCV0","mr-xl-1":"_vL8LJ","pr-xl-1":"_yA6nk","mr-xl-2":"_ZkYxH","pr-xl-2":"_-LN7c","mr-xl-3":"_WtPxc","pr-xl-3":"_Yn0F0","mr-xl-4":"_M1pzN","pr-xl-4":"_zX1qM","mr-xl-5":"_HWX7s","pr-xl-5":"_0jJWY","mr-xl-6":"_cG-JL","pr-xl-6":"_o2-cg","mr-xl-7":"_g0V5o","pr-xl-7":"_seBWS","mr-xl-8":"_1Rg0L","pr-xl-8":"_uZxYI","mr-xl-9":"_DJD2r","pr-xl-9":"_WXY42","mr-xl-10":"_-EWpt","pr-xl-10":"_W-0Oq","mt-xl-0":"_A3mxM","pt-xl-0":"_mG8-q","mt-xl-1":"_eSV7Q","pt-xl-1":"_9SJkd","mt-xl-2":"_mdspA","pt-xl-2":"_GloWk","mt-xl-3":"_Fn9WR","pt-xl-3":"_l5z5Q","mt-xl-4":"_J5EuO","pt-xl-4":"_z4jGH","mt-xl-5":"_SjIc3","pt-xl-5":"_inlrN","mt-xl-6":"_9iy8O","pt-xl-6":"_FGdNq","mt-xl-7":"_DNLb-","pt-xl-7":"_FDvwW","mt-xl-8":"_cB8Ua","pt-xl-8":"_sFRzN","mt-xl-9":"_iFCES","pt-xl-9":"_M8U3T","mt-xl-10":"_zrBn9","pt-xl-10":"_kYhdD","mb-xl-0":"_AVjLW","pb-xl-0":"_S2OiP","mb-xl-1":"_vnN5p","pb-xl-1":"_ukgJ7","mb-xl-2":"_wZjwy","pb-xl-2":"_rINJ4","mb-xl-3":"_MFAs1","pb-xl-3":"_BjtEQ","mb-xl-4":"_72dvy","pb-xl-4":"_bCnbX","mb-xl-5":"_Uyt6r","pb-xl-5":"_F3Ibd","mb-xl-6":"_iBLUD","pb-xl-6":"_yjY5Y","mb-xl-7":"_6TfYx","pb-xl-7":"_QdVWm","mb-xl-8":"_p-cIL","pb-xl-8":"_saIeH","mb-xl-9":"_Z3PUh","pb-xl-9":"_f8cy7","mb-xl-10":"_ndw2F","pb-xl-10":"_Yxkus","mx-xl-0":"_Bb6PX","px-xl-0":"_M5EOJ","mx-xl-1":"_iWwKY","px-xl-1":"_nWXZF","mx-xl-2":"_OCB5d","px-xl-2":"_GIqDO","mx-xl-3":"_mskG2","px-xl-3":"_-TVSP","mx-xl-4":"_rp-dc","px-xl-4":"_rfQsy","mx-xl-5":"_FgYNJ","px-xl-5":"_yA-K0","mx-xl-6":"_KJ12G","px-xl-6":"_gmhRk","mx-xl-7":"_XF8NS","px-xl-7":"_C0zhm","mx-xl-8":"_rOBd5","px-xl-8":"_FZf4w","mx-xl-9":"_GosX1","px-xl-9":"_zvpad","mx-xl-10":"_uU6kY","px-xl-10":"_XfRJ5","my-xl-0":"_zhez-","py-xl-0":"_-Dum7","my-xl-1":"_QvfIQ","py-xl-1":"_66V5-","my-xl-2":"_e84Sk","py-xl-2":"_pOej1","my-xl-3":"_uv8an","py-xl-3":"_6iY-g","my-xl-4":"_Ur6W4","py-xl-4":"_JPq7T","my-xl-5":"_3GKlh","py-xl-5":"_Gcnsl","my-xl-6":"_JrBH1","py-xl-6":"_IP0ND","my-xl-7":"_7BzpU","py-xl-7":"_BIUqI","my-xl-8":"_mZ-p0","py-xl-8":"_Sdn5j","my-xl-9":"_P3V1N","py-xl-9":"_Z9lbF","my-xl-10":"_VAfcF","py-xl-10":"_X4Bq6","background-shine":"_361tW","path":"_qtb88","line":"_XQ9Yw","skeleton":"_BQ0X7","skeleton-animate":"_vEv3B","skeleton-dark":"_l5qsf","skeleton-dark-animate":"_yk159","skeleton-transparent":"_857E4","skeleton-transparent-animate":"_RzhIE","semi-transparent":"_LacS6","no-margins":"_bmB3S","dots":"_5kMd-","colored":"_-lTGD","small":"_GTU1q","extra-small":"_BEmi7","align-left":"_HuG6N","align-right":"_U3h5U"};
1162
+
1163
+ /**
1164
+ * LoadingDots Component - Displays a loading animation with dots.
1165
+ * This component allows customization of size, color, margins, and alignment.
1166
+ *
1167
+ * @component
1168
+ * @param {Object} props - The props of the component.
1169
+ * @param {('big'|'small'|'extra-small')} [props.size='small'] - Sets the size of the loading dots.
1170
+ * @param {boolean} [props.isColored=false] - If true, the dots will be colored, otherwise they will be monochrome.
1171
+ * @param {boolean} [props.noMargins=false] - If true, removes the margins around the loading dots.
1172
+ * @param {(boolean|'left'|'right')} [props.align=false] - Aligns the loading dots to the left or right if specified, otherwise centered.
1173
+ * @returns {React.ReactElement} A React component that renders the loading dots animation.
1174
+ */
1175
+ var LoadingDots = function LoadingDots(_ref) {
1176
+ var _ref$size = _ref.size,
1177
+ size = _ref$size === void 0 ? "small" : _ref$size,
1178
+ _ref$isColored = _ref.isColored,
1179
+ isColored = _ref$isColored === void 0 ? false : _ref$isColored,
1180
+ _ref$noMargins = _ref.noMargins,
1181
+ noMargins = _ref$noMargins === void 0 ? false : _ref$noMargins,
1182
+ _ref$align = _ref.align,
1183
+ align = _ref$align === void 0 ? false : _ref$align;
1184
+ return /*#__PURE__*/React__default["default"].createElement("div", {
1185
+ className: styles["loading-dots"] + " " + styles[size] + " " + (noMargins ? " " + styles["no-margins"] : "") + " " + (align ? styles["align-" + align] : "")
1186
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
1187
+ className: styles.dot + " " + (isColored ? " " + styles.colored : "")
1188
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
1189
+ className: styles.dot + " " + (isColored ? " " + styles.colored : "")
1190
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
1191
+ className: styles.dot + " " + (isColored ? " " + styles.colored : "")
1192
+ }));
1193
+ };
1194
+ LoadingDots.propTypes = {
1195
+ size: PropTypes.oneOf(["big", "small", "extra-small"]),
1196
+ isColored: PropTypes.bool,
1197
+ noMargins: PropTypes.bool,
1198
+ align: PropTypes.oneOfType([PropTypes.oneOf(["left", "right"]), PropTypes.bool])
1199
+ };
1200
+
1201
+ /**
1202
+ * Button component - A versatile and customizable button for React applications.
1203
+ * It supports various sizes, styles, and functionalities, including loaders, icons, and handling of click events.
1204
+ * This component can also be used as a link if "to" is provided.
1205
+ *
1206
+ * @component
1207
+ * @param {Object} props
1208
+ * @param {('xl'|'lg'|'md'|'sm')} [props.size='xl'] - Sets the size of the button.
1209
+ * @param {string} [props.className=''] - An optional custom CSS class name for additional styling.
1210
+ * @param {string} [props.mode='transparent'] - Determines the button's visual style.
1211
+ * @param {Function} [props.onClick=(resetButtonLoader, event) => {}] - Callback function that triggers on button click.
1212
+ * @param {boolean} [props.loader=true] - If true, displays a loader animation on the button when clicked.
1213
+ * @param {boolean} [props.loading=false] - Controls the actual display of the loader if `loader` is true.
1214
+ * @param {string} [props.to=''] - The path for the button to act as a link.
1215
+ * @param {boolean} [props.fullWidthOnMobiles=false] - Expands the button to full width on mobiles.
1216
+ * @param {boolean} [props.fullWidthOnTablets=false] - Expands the button to full width on tablets.
1217
+ * @param {string} [props.icon=''] - The path to the button's icon.
1218
+ * @param {React.ReactNode} [props.content=''] - The text or content displayed inside the button.
1219
+ * @param {boolean} [props.isDisabled=false] - Disables the button if true.
1220
+ * @param {Function} [props.setClickTrigger=(p) => {}] - Function to programmatically trigger a button click.
1221
+ * @param {boolean} [props.isFormSubmittingButton=false] - If true, adds a hidden `<input type="submit">`.
1222
+ * @param {boolean} [props.bigIcon=false] - If true, displays a larger icon on the button.
1223
+ * @param {boolean} [props.checkmarkOnClick=false] - Shows a checkmark instead of content for a few seconds after click.
1224
+ * @param {boolean} [props.propagatePrimaryButtonClick=true] - Propagates the primary button click event if true.
1225
+ * @param {boolean} [props.smallPaddingOnSmallMobiles=false] - Enables smaller paddings for extra-small screen sizes.
1226
+ * @param {Function} [props.handleError=(func) => func()] - Function to handle errors during button click events.
1227
+ * @returns {React.ReactElement}
1228
+ */
1229
+ var Button = function Button(_ref) {
1230
+ var _ref$size = _ref.size,
1231
+ size = _ref$size === void 0 ? "xl" : _ref$size,
1232
+ _ref$className = _ref.className,
1233
+ className = _ref$className === void 0 ? "" : _ref$className,
1234
+ _ref$mode = _ref.mode,
1235
+ mode = _ref$mode === void 0 ? "transparent" : _ref$mode,
1236
+ _ref$onClick = _ref.onClick,
1237
+ onClick = _ref$onClick === void 0 ? function (resetButtonLoader, event) {} : _ref$onClick,
1238
+ _ref$loader = _ref.loader,
1239
+ loader = _ref$loader === void 0 ? true : _ref$loader,
1240
+ _ref$loading = _ref.loading,
1241
+ loading = _ref$loading === void 0 ? false : _ref$loading,
1242
+ _ref$to = _ref.to,
1243
+ to = _ref$to === void 0 ? "" : _ref$to,
1244
+ _ref$fullWidthOnMobil = _ref.fullWidthOnMobiles,
1245
+ fullWidthOnMobiles = _ref$fullWidthOnMobil === void 0 ? false : _ref$fullWidthOnMobil,
1246
+ _ref$fullWidthOnTable = _ref.fullWidthOnTablets,
1247
+ fullWidthOnTablets = _ref$fullWidthOnTable === void 0 ? false : _ref$fullWidthOnTable,
1248
+ _ref$icon = _ref.icon,
1249
+ icon = _ref$icon === void 0 ? "" : _ref$icon,
1250
+ _ref$content = _ref.content,
1251
+ content = _ref$content === void 0 ? "" : _ref$content,
1252
+ _ref$isDisabled = _ref.isDisabled,
1253
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
1254
+ _ref$setClickTrigger = _ref.setClickTrigger,
1255
+ setClickTrigger = _ref$setClickTrigger === void 0 ? function (p) {} : _ref$setClickTrigger,
1256
+ _ref$isFormSubmitting = _ref.isFormSubmittingButton,
1257
+ isFormSubmittingButton = _ref$isFormSubmitting === void 0 ? false : _ref$isFormSubmitting,
1258
+ _ref$bigIcon = _ref.bigIcon,
1259
+ bigIcon = _ref$bigIcon === void 0 ? false : _ref$bigIcon,
1260
+ _ref$checkmarkOnClick = _ref.checkmarkOnClick,
1261
+ checkmarkOnClick = _ref$checkmarkOnClick === void 0 ? false : _ref$checkmarkOnClick,
1262
+ _ref$propagatePrimary = _ref.propagatePrimaryButtonClick,
1263
+ propagatePrimaryButtonClick = _ref$propagatePrimary === void 0 ? true : _ref$propagatePrimary,
1264
+ _ref$smallPaddingOnSm = _ref.smallPaddingOnSmallMobiles,
1265
+ smallPaddingOnSmallMobiles = _ref$smallPaddingOnSm === void 0 ? false : _ref$smallPaddingOnSm,
1266
+ _ref$handleError = _ref.handleError,
1267
+ handleError = _ref$handleError === void 0 ? function (func, event) {
1268
+ return func(event);
1269
+ } : _ref$handleError;
1270
+ var _useState = React.useState(loading),
1271
+ isLoading = _useState[0],
1272
+ setIsLoading = _useState[1];
1273
+ var _useState2 = React.useState(false),
1274
+ isCheckShown = _useState2[0],
1275
+ setIsCheckShown = _useState2[1];
1276
+ var _useState3 = React.useState(null),
1277
+ event = _useState3[0],
1278
+ setEvent = _useState3[1];
1279
+ var buttonRef = React.useRef();
1280
+ React.useEffect(function () {
1281
+ setClickTrigger(function () {
1282
+ return buttonRef.current.click();
1283
+ });
1284
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1285
+ }, [buttonRef]);
1286
+ React.useEffect(function () {
1287
+ if (isLoading) {
1288
+ onClick(function () {
1289
+ return setIsLoading(false);
1290
+ }, event);
1291
+ }
1292
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1293
+ }, [isLoading]);
1294
+ var buttonClick = function buttonClick(e) {
1295
+ if (isLoading || isDisabled) {
1296
+ return false;
1297
+ }
1298
+ if (checkmarkOnClick && !isCheckShown && !loader && !loading) {
1299
+ setIsCheckShown(true);
1300
+ setTimeout(function () {
1301
+ setIsCheckShown(false);
1302
+ }, 2000);
1303
+ }
1304
+ e.persist(); // Persisting React's SyntheticEvent to be able to use it in any async context
1305
+ !propagatePrimaryButtonClick && e.stopPropagation();
1306
+ if (loader) {
1307
+ setIsLoading(true);
1308
+ setEvent(e);
1309
+ } else {
1310
+ onClick(function () {
1311
+ return setIsLoading(false);
1312
+ }, e);
1313
+ }
1314
+ };
1315
+ var classNames = styles$1.button + " " + styles$1[size] + " " + styles$1[className] + " " + styles$1[mode] + (fullWidthOnMobiles ? " " + styles$1["full-width-on-mobiles"] : "") + (fullWidthOnTablets ? " " + styles$1["full-width-on-tablets"] : "") + (isDisabled ? " " + styles$1.disable : "") + (smallPaddingOnSmallMobiles ? " " + styles$1["small-padding-on-small-mobiles"] : "");
1316
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isFormSubmittingButton ? /*#__PURE__*/React__default["default"].createElement("input", {
1317
+ type: "submit",
1318
+ hidden: true
1319
+ }) : null, to ? /*#__PURE__*/React__default["default"].createElement("a", {
1320
+ className: classNames,
1321
+ onClick: function onClick(e) {
1322
+ return handleError(buttonClick, e);
1323
+ },
1324
+ href: to,
1325
+ ref: buttonRef
1326
+ }, icon ? /*#__PURE__*/React__default["default"].createElement("div", {
1327
+ className: styles$1["button-with-icon"] + (bigIcon ? " " + styles$1["big-icon"] : "")
1328
+ }, /*#__PURE__*/React__default["default"].createElement("img", {
1329
+ src: icon,
1330
+ alt: "button icon"
1331
+ }), /*#__PURE__*/React__default["default"].createElement("span", {
1332
+ className: styles$1["button-with-icon-text"]
1333
+ }, content)) : content) : /*#__PURE__*/React__default["default"].createElement("div", {
1334
+ className: classNames,
1335
+ onClick: function onClick(e) {
1336
+ return handleError(buttonClick, e);
1337
+ },
1338
+ ref: buttonRef
1339
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
1340
+ className: styles$1["button-primary-dots-wrapper"] + " " + (isLoading && loader ? styles$1.show : "")
1341
+ }, loader && isLoading ? /*#__PURE__*/React__default["default"].createElement(LoadingDots, {
1342
+ isColored: mode === "white"
1343
+ }) : null), /*#__PURE__*/React__default["default"].createElement("div", {
1344
+ className: styles$1["button-success-icon"] + " " + styles$1[mode] + " " + (isCheckShown ? styles$1["show"] : "")
1345
+ }), icon ? /*#__PURE__*/React__default["default"].createElement("div", {
1346
+ className: styles$1["button-with-icon"] + " " + (isLoading && loader || checkmarkOnClick && isCheckShown ? styles$1["hide"] : "") + " " + (bigIcon ? styles$1["big-icon"] : "")
1347
+ }, /*#__PURE__*/React__default["default"].createElement("img", {
1348
+ src: icon,
1349
+ alt: "button icon"
1350
+ }), /*#__PURE__*/React__default["default"].createElement("span", {
1351
+ className: styles$1["button-with-icon-text"]
1352
+ }, content)) : /*#__PURE__*/React__default["default"].createElement("span", {
1353
+ className: styles$1["button-text"] + " " + (isLoading && loader || checkmarkOnClick && isCheckShown ? styles$1["hide"] : "")
1354
+ }, content)));
1355
+ };
1356
+ Button.propTypes = {
1357
+ size: PropTypes.oneOf(["xl", "lg", "md", "sm"]),
1358
+ className: PropTypes.string,
1359
+ mode: PropTypes.oneOf(["transparent", "white", "white-flat", "primary", "primary-bordered", "primary-transparent", "transparent-bordered", "transparent-without-shadow"]),
1360
+ onClick: PropTypes.func,
1361
+ loader: PropTypes.bool,
1362
+ loading: PropTypes.bool,
1363
+ to: PropTypes.string,
1364
+ fullWidthOnMobiles: PropTypes.bool,
1365
+ fullWidthOnTablets: PropTypes.bool,
1366
+ icon: PropTypes.string,
1367
+ content: PropTypes.node,
1368
+ isDisabled: PropTypes.bool,
1369
+ setClickTrigger: PropTypes.func,
1370
+ isFormSubmittingButton: PropTypes.bool,
1371
+ bigIcon: PropTypes.bool,
1372
+ checkmarkOnClick: PropTypes.bool,
1373
+ propagatePrimaryButtonClick: PropTypes.bool,
1374
+ smallPaddingOnSmallMobiles: PropTypes.bool,
1375
+ handleError: PropTypes.func
1376
+ };
1377
+ Button.defaultProps = {
1378
+ size: "xl",
1379
+ className: "",
1380
+ mode: "transparent",
1381
+ onClick: function onClick(resetButtonLoader, event) {},
1382
+ loader: true,
1383
+ loading: false,
1384
+ to: "",
1385
+ fullWidthOnMobiles: false,
1386
+ fullWidthOnTablets: false,
1387
+ icon: "",
1388
+ content: "",
1389
+ isDisabled: false,
1390
+ setClickTrigger: function setClickTrigger(p) {},
1391
+ isFormSubmittingButton: false,
1392
+ bigIcon: false,
1393
+ checkmarkOnClick: false,
1394
+ propagatePrimaryButtonClick: true,
1395
+ smallPaddingOnSmallMobiles: false,
1396
+ handleError: function handleError(func) {
1397
+ return func();
1398
+ }
1399
+ };
1400
+
1401
+ var SupportChat = function SupportChat(_ref) {
1402
+ var url = _ref.url,
1403
+ websiteToken = _ref.websiteToken,
1404
+ _ref$welcomeMessage = _ref.welcomeMessage,
1405
+ welcomeMessage = _ref$welcomeMessage === void 0 ? "" : _ref$welcomeMessage;
1406
+ React.useEffect(function () {
1407
+ window.chatwootSettings = {
1408
+ position: "right",
1409
+ type: "standard",
1410
+ launcherTitle: welcomeMessage
1411
+ };
1412
+ (function (d, t) {
1413
+ var BASE_URL = url;
1414
+ var g = d.createElement(t),
1415
+ s = d.getElementsByTagName(t)[0];
1416
+ g.src = BASE_URL + "/packs/js/sdk.js";
1417
+ g.defer = true;
1418
+ g.async = true;
1419
+ s.parentNode.insertBefore(g, s);
1420
+ g.onload = function () {
1421
+ window.chatwootSDK.run({
1422
+ websiteToken: websiteToken,
1423
+ baseUrl: BASE_URL
1424
+ });
1425
+ };
1426
+ })(document, "script");
1427
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1428
+ }, []);
1429
+ return null;
1430
+ };
1431
+ SupportChat.propTypes = {
1432
+ url: PropTypes.string.isRequired,
1433
+ websiteToken: PropTypes.string.isRequired,
1434
+ welcomeMessage: PropTypes.string
1435
+ };
1436
+ SupportChat.defaultProps = {
1437
+ welcomeMessage: ""
1438
+ };
1439
+
1440
+ var s = {"container":"_DYS-g","m-0":"_85R9d","p-0":"_wi0-U","m-1":"_YoewO","p-1":"_vuJBW","m-2":"_ruaYI","p-2":"_dO-cg","m-3":"_3Oh59","p-3":"_x4uSr","m-4":"_zN8us","p-4":"_rjv4I","m-5":"_5T1F-","p-5":"_-nWHT","m-6":"_Skgdf","p-6":"_Oux4z","m-7":"_yKPSq","p-7":"_sOsqF","m-8":"_8EoDT","p-8":"_G4M7b","m-9":"_ZZJBC","p-9":"_2PU3N","m-10":"_XRmXO","p-10":"_lhLN8","ml-0":"_SIynD","pl-0":"_VCLgc","ml-1":"_9vhMT","pl-1":"_4O5ig","ml-2":"_f1saV","pl-2":"_sHxk9","ml-3":"_kiltH","pl-3":"_jUw5Z","ml-4":"_CF1wj","pl-4":"_eXCZ1","ml-5":"_HZlH9","pl-5":"_6xbwv","ml-6":"_jNpyz","pl-6":"_k5lHk","ml-7":"_LgB9F","pl-7":"_ol9Tb","ml-8":"_I25tR","pl-8":"_TN4dc","ml-9":"_ywWxC","pl-9":"_4UsSQ","ml-10":"_9rfct","pl-10":"_LoViP","mr-0":"_-1PzO","pr-0":"_Ekco3","mr-1":"_EfRd0","pr-1":"_GspC-","mr-2":"_91QSK","pr-2":"_dU7Vb","mr-3":"_tW92i","pr-3":"_qNnnG","mr-4":"_XC1FW","pr-4":"_09RVw","mr-5":"_I4KRh","pr-5":"_eag2b","mr-6":"_E-KDc","pr-6":"_0d7JN","mr-7":"_9GUd-","pr-7":"_5Jseh","mr-8":"_Z-z3u","pr-8":"_rjPRa","mr-9":"_R2d68","pr-9":"_YI-lc","mr-10":"_ORX-B","pr-10":"_F5ib8","mt-0":"_OAl4b","pt-0":"_iJ5QU","mt-1":"_x72-c","pt-1":"_DGuKS","mt-2":"_ZYCC4","pt-2":"_6oj3E","mt-3":"_ADXHX","pt-3":"_asJoO","mt-4":"_Bz8Hu","pt-4":"_N7CCb","mt-5":"_OyQQ8","pt-5":"_C46Cf","mt-6":"_Bfrcj","pt-6":"_NN4sF","mt-7":"_RWFV0","pt-7":"_zUauA","mt-8":"_v7txm","pt-8":"_qgvMl","mt-9":"_9s32w","pt-9":"_aJZt7","mt-10":"_feBhr","pt-10":"_EfI4E","mb-0":"_RUzt9","pb-0":"_0Zjn8","mb-1":"_EmcPj","pb-1":"_zuqTv","mb-2":"_jYcdG","pb-2":"_fjMa6","mb-3":"_Lcgzu","pb-3":"_MHHa3","mb-4":"_Aoo0-","pb-4":"_B1ap3","mb-5":"_xdjCc","pb-5":"_lnrC3","mb-6":"_TFmkS","pb-6":"_YNj2R","mb-7":"_i0-JZ","pb-7":"_qSvSL","mb-8":"_7ziqB","pb-8":"_W-Cdi","mb-9":"_lUUVq","pb-9":"_LrgoL","mb-10":"_xX8mu","pb-10":"_DU6C6","mx-0":"_71D1Q","px-0":"_U8dyv","mx-1":"_2VhDN","px-1":"_d8Tlo","mx-2":"_uDkn4","px-2":"_a6Z6h","mx-3":"_W9yqm","px-3":"_MCbca","mx-4":"_sIDVk","px-4":"_wZ8Qz","mx-5":"_-6tEi","px-5":"_8vfpL","mx-6":"_mbXa9","px-6":"_LcSh5","mx-7":"_mF9-c","px-7":"_TfjhQ","mx-8":"_RG7wu","px-8":"_19Sdb","mx-9":"_JkKgx","px-9":"_Ir3LH","mx-10":"_70tWA","px-10":"_d1BrW","my-0":"_0PauS","py-0":"_FP0FE","my-1":"_znn6s","py-1":"_-FHoU","my-2":"_EqZco","py-2":"_fuTfe","my-3":"_D2LQ5","py-3":"_YWhnK","my-4":"_kCXTL","py-4":"_j1vj6","my-5":"_naEoR","py-5":"_QK3Z-","my-6":"_L1TOy","py-6":"_dQH-e","my-7":"_sVZ3Y","py-7":"_Fi779","my-8":"_1mAkX","py-8":"_yTTVv","my-9":"_jCeMV","py-9":"_qfn2C","my-10":"_eqneu","py-10":"_Atu-j","m-sm-0":"_hsKWE","p-sm-0":"_j3m-2","m-sm-1":"_NQOee","p-sm-1":"_sB5mJ","m-sm-2":"_KivoH","p-sm-2":"_YjE2j","m-sm-3":"_kObhZ","p-sm-3":"_TDlKW","m-sm-4":"_aJWH3","p-sm-4":"_Vntgp","m-sm-5":"_k-Hjs","p-sm-5":"_mJt7k","m-sm-6":"_Yxxob","p-sm-6":"_E5a-A","m-sm-7":"_M1OJO","p-sm-7":"_-5OJr","m-sm-8":"_UYrWD","p-sm-8":"_FJeV6","m-sm-9":"_DosWW","p-sm-9":"_T9yES","m-sm-10":"_tLYqH","p-sm-10":"_5dbE7","ml-sm-0":"_PM9wP","pl-sm-0":"_0Eoi7","ml-sm-1":"_Mb-hF","pl-sm-1":"_n4rCF","ml-sm-2":"_JJgiX","pl-sm-2":"_WOdAR","ml-sm-3":"_umhPB","pl-sm-3":"_tETqx","ml-sm-4":"_PQ088","pl-sm-4":"_ON2pV","ml-sm-5":"_IrMTT","pl-sm-5":"_12IZU","ml-sm-6":"_s8vHJ","pl-sm-6":"_9Od-S","ml-sm-7":"_4uuhE","pl-sm-7":"_TTrnJ","ml-sm-8":"_6TEO5","pl-sm-8":"_ZEPSH","ml-sm-9":"_I05iS","pl-sm-9":"_F5rHi","ml-sm-10":"_AJZ2R","pl-sm-10":"_zgudu","mr-sm-0":"_AD7v0","pr-sm-0":"_katlS","mr-sm-1":"_RMNwS","pr-sm-1":"_SC0VS","mr-sm-2":"_YFbee","pr-sm-2":"_I2cqm","mr-sm-3":"_KJzfk","pr-sm-3":"_aDNge","mr-sm-4":"_ERg9u","pr-sm-4":"_wlgHy","mr-sm-5":"_spxY0","pr-sm-5":"_pAEEu","mr-sm-6":"_HM7Z6","pr-sm-6":"_rf9My","mr-sm-7":"_b-V6W","pr-sm-7":"_YFXWV","mr-sm-8":"_96NiE","pr-sm-8":"_0ynKz","mr-sm-9":"_9NqL0","pr-sm-9":"_ZEN2v","mr-sm-10":"_oxmC7","pr-sm-10":"_AsAlz","mt-sm-0":"_Yl8e7","pt-sm-0":"_fkSmd","mt-sm-1":"_l4X69","pt-sm-1":"_i7WdP","mt-sm-2":"_ggYWK","pt-sm-2":"_3-z2g","mt-sm-3":"_IzZ-y","pt-sm-3":"_c3PEq","mt-sm-4":"_BbTvo","pt-sm-4":"_iAXVy","mt-sm-5":"_RNscW","pt-sm-5":"_7dHkj","mt-sm-6":"_iKCRS","pt-sm-6":"_an673","mt-sm-7":"_1Atcr","pt-sm-7":"_KA-HC","mt-sm-8":"_45ifh","pt-sm-8":"_26wBi","mt-sm-9":"_VaqUk","pt-sm-9":"_cx10Q","mt-sm-10":"_83RI-","pt-sm-10":"_vTZq7","mb-sm-0":"_IDhal","pb-sm-0":"_3IjzN","mb-sm-1":"_sjxoK","pb-sm-1":"_fmWwG","mb-sm-2":"_GNlxw","pb-sm-2":"_r3zJV","mb-sm-3":"_FFWRt","pb-sm-3":"_arvvr","mb-sm-4":"_qaIKp","pb-sm-4":"_wSca9","mb-sm-5":"_-cXAZ","pb-sm-5":"_grIUD","mb-sm-6":"_PUPyR","pb-sm-6":"_nA8VL","mb-sm-7":"_t7JYD","pb-sm-7":"_OpbJn","mb-sm-8":"_x1wdN","pb-sm-8":"_3Z-mA","mb-sm-9":"_BPrSY","pb-sm-9":"_b-NQ7","mb-sm-10":"_lSN9Q","pb-sm-10":"_E7xwy","mx-sm-0":"_-cSXk","px-sm-0":"_VlISI","mx-sm-1":"_6derN","px-sm-1":"_in01f","mx-sm-2":"_nskhZ","px-sm-2":"_Thnqg","mx-sm-3":"_xR8rV","px-sm-3":"_zUOaf","mx-sm-4":"_0c-bw","px-sm-4":"_X-g0R","mx-sm-5":"_p3iVv","px-sm-5":"_RdgSR","mx-sm-6":"_vK8xL","px-sm-6":"_xGpLP","mx-sm-7":"_uvb2q","px-sm-7":"_YvDjG","mx-sm-8":"_8nvEy","px-sm-8":"_L3gRg","mx-sm-9":"_pRh4Y","px-sm-9":"_5yig0","mx-sm-10":"_syXdz","px-sm-10":"_TfV9e","my-sm-0":"_WXfoP","py-sm-0":"_SBx-N","my-sm-1":"_dPEq6","py-sm-1":"_UrxQl","my-sm-2":"_ULvTZ","py-sm-2":"_I4Sll","my-sm-3":"_YVvfW","py-sm-3":"_9qflx","my-sm-4":"_j4ltv","py-sm-4":"_u-NN2","my-sm-5":"_mC1LQ","py-sm-5":"_6Wcc2","my-sm-6":"_eE8rw","py-sm-6":"_AeFpW","my-sm-7":"_CAnzA","py-sm-7":"_7h-Vs","my-sm-8":"_Z9Aft","py-sm-8":"_Ww8LU","my-sm-9":"_3sbBd","py-sm-9":"_ZcdCh","my-sm-10":"_PGBDh","py-sm-10":"_i6Fc2","m-lg-0":"_PkOb8","p-lg-0":"_3UpkE","m-lg-1":"_nCbz9","p-lg-1":"_1lThO","m-lg-2":"_ARtYq","p-lg-2":"_vHeBX","m-lg-3":"_cpKBp","p-lg-3":"_n-7p1","m-lg-4":"_1bWgj","p-lg-4":"_niPSW","m-lg-5":"_T9s09","p-lg-5":"_OS1Yy","m-lg-6":"_GvZeA","p-lg-6":"_8cgsA","m-lg-7":"_d0oC7","p-lg-7":"_TuBYJ","m-lg-8":"_slAc2","p-lg-8":"_ay3FH","m-lg-9":"_r3-kR","p-lg-9":"_IuC-U","m-lg-10":"_9P6I9","p-lg-10":"_RUR7-","ml-lg-0":"_xf3wx","pl-lg-0":"_Q-8ZY","ml-lg-1":"_4tg9Q","pl-lg-1":"_2rsuI","ml-lg-2":"_-YU8G","pl-lg-2":"_Eds1N","ml-lg-3":"_tD4RQ","pl-lg-3":"_R0Rk2","ml-lg-4":"_pZcNJ","pl-lg-4":"_5jvIR","ml-lg-5":"_sjk-4","pl-lg-5":"_RwLHv","ml-lg-6":"_dyXyT","pl-lg-6":"_nVLAC","ml-lg-7":"_FPuf8","pl-lg-7":"_M5bYC","ml-lg-8":"_Uet9k","pl-lg-8":"_UrAQv","ml-lg-9":"_VPraG","pl-lg-9":"_8HJkV","ml-lg-10":"_ILHbQ","pl-lg-10":"_QaxaT","mr-lg-0":"_2QrJI","pr-lg-0":"_0XJPD","mr-lg-1":"_qSATY","pr-lg-1":"_fzyzB","mr-lg-2":"_pY4IE","pr-lg-2":"_lc7Gu","mr-lg-3":"_KeRuW","pr-lg-3":"_zc2cu","mr-lg-4":"_RvxVY","pr-lg-4":"_v5XDn","mr-lg-5":"_Kipoo","pr-lg-5":"_K-vHR","mr-lg-6":"_1nl-K","pr-lg-6":"_nVUH-","mr-lg-7":"_M1Ue1","pr-lg-7":"_B75ua","mr-lg-8":"_CmlKz","pr-lg-8":"_FnY12","mr-lg-9":"_8-uRA","pr-lg-9":"_1DG22","mr-lg-10":"_vzMQh","pr-lg-10":"_2iqul","mt-lg-0":"_1eCp-","pt-lg-0":"_ucRUw","mt-lg-1":"_9YQ4e","pt-lg-1":"_pzmV0","mt-lg-2":"_1Z7OF","pt-lg-2":"_FUFhX","mt-lg-3":"_HPI-W","pt-lg-3":"_NwVgV","mt-lg-4":"_duZYq","pt-lg-4":"_h0NfP","mt-lg-5":"_sszGU","pt-lg-5":"_nNi-i","mt-lg-6":"_YYWl4","pt-lg-6":"_rqDrl","mt-lg-7":"_MmkeY","pt-lg-7":"_TZx0T","mt-lg-8":"_mdoth","pt-lg-8":"_2pGPR","mt-lg-9":"_csumg","pt-lg-9":"_BIWSR","mt-lg-10":"_TN07y","pt-lg-10":"_ojQGh","mb-lg-0":"_eXETo","pb-lg-0":"_FeL5F","mb-lg-1":"_Zc1bw","pb-lg-1":"_34sNS","mb-lg-2":"_2XgD-","pb-lg-2":"_OTB4o","mb-lg-3":"_xJ4EC","pb-lg-3":"_-Uc7P","mb-lg-4":"_thqbO","pb-lg-4":"_lqHuw","mb-lg-5":"_gDmAe","pb-lg-5":"_zAiLu","mb-lg-6":"_96HP2","pb-lg-6":"_TCehU","mb-lg-7":"_1Guas","pb-lg-7":"_vn7-Z","mb-lg-8":"_Cc-m8","pb-lg-8":"_dbCuX","mb-lg-9":"_U5Qon","pb-lg-9":"_b54cM","mb-lg-10":"_cGYyA","pb-lg-10":"_U5qus","mx-lg-0":"_TDPp0","px-lg-0":"_hUlWn","mx-lg-1":"_uh5DO","px-lg-1":"_N8r0e","mx-lg-2":"_vsfWJ","px-lg-2":"_LaBP6","mx-lg-3":"_JxquV","px-lg-3":"_Tb8mk","mx-lg-4":"_wDKd1","px-lg-4":"_lIguL","mx-lg-5":"_RSd-x","px-lg-5":"_Mdf1f","mx-lg-6":"_uvK2D","px-lg-6":"_4k20p","mx-lg-7":"_iXTh7","px-lg-7":"_W2faz","mx-lg-8":"_HHM9t","px-lg-8":"_n54Rq","mx-lg-9":"_douwI","px-lg-9":"_KWSHJ","mx-lg-10":"_L-r4v","px-lg-10":"_qeSLU","my-lg-0":"_U9qcF","py-lg-0":"_sSD4U","my-lg-1":"_vNl2c","py-lg-1":"_Cfkag","my-lg-2":"_gVDuB","py-lg-2":"_FwQsB","my-lg-3":"_oiJaa","py-lg-3":"_FASGS","my-lg-4":"_va2Tm","py-lg-4":"_EPTkJ","my-lg-5":"_jvYOP","py-lg-5":"_NTxiG","my-lg-6":"_8Y7Xj","py-lg-6":"_Nrsd7","my-lg-7":"_-e9e5","py-lg-7":"_NOh2l","my-lg-8":"_nyCDl","py-lg-8":"_fpL5p","my-lg-9":"_BbcqH","py-lg-9":"_VlI3L","my-lg-10":"_OGNmd","py-lg-10":"_Q-3bw","m-md-0":"_P6WIc","p-md-0":"_3YuAI","m-md-1":"_VwK3z","p-md-1":"_ArFsR","m-md-2":"_5Hp7o","p-md-2":"_-R4rJ","m-md-3":"_J55VC","p-md-3":"_TxlAj","m-md-4":"_FHPQG","p-md-4":"_iZW10","m-md-5":"_Kiuiv","p-md-5":"_0Qiry","m-md-6":"_Ja9dp","p-md-6":"_GBAS-","m-md-7":"_uuE4u","p-md-7":"_kAuu-","m-md-8":"_CaU4W","p-md-8":"_GbyMJ","m-md-9":"_brWmN","p-md-9":"_-1z0O","m-md-10":"_dIML4","p-md-10":"_eJliD","ml-md-0":"_nuVMQ","pl-md-0":"_PCyiw","ml-md-1":"_NX2qp","pl-md-1":"_yJ39l","ml-md-2":"_BV1WB","pl-md-2":"_x24YX","ml-md-3":"_kvTBw","pl-md-3":"_7G7wo","ml-md-4":"_s1oaO","pl-md-4":"_nTHBq","ml-md-5":"_2AyzN","pl-md-5":"_VmocP","ml-md-6":"_QEhdf","pl-md-6":"_Ywy9t","ml-md-7":"_Mybnc","pl-md-7":"_zHudI","ml-md-8":"_AT4F-","pl-md-8":"_1-CLq","ml-md-9":"_cZ0UL","pl-md-9":"_AKT8q","ml-md-10":"_uo54H","pl-md-10":"_2Edrz","mr-md-0":"_8NtcB","pr-md-0":"_BN5kR","mr-md-1":"_hIIXR","pr-md-1":"_KWi0C","mr-md-2":"_kP9GD","pr-md-2":"_fo1s0","mr-md-3":"_ptgO9","pr-md-3":"_AIGLm","mr-md-4":"_GJNi6","pr-md-4":"_-ZfQA","mr-md-5":"_hW-OG","pr-md-5":"_ePqmc","mr-md-6":"_ghuDl","pr-md-6":"_C9rlZ","mr-md-7":"_bIHB6","pr-md-7":"_xPHzJ","mr-md-8":"_6ZssD","pr-md-8":"_-N-QR","mr-md-9":"_T-XzG","pr-md-9":"_k8hdA","mr-md-10":"_26xvU","pr-md-10":"_U6Fpn","mt-md-0":"_ZIFgT","pt-md-0":"_6JBhp","mt-md-1":"_lIu84","pt-md-1":"_yPyiK","mt-md-2":"_sWcbm","pt-md-2":"_-7S2K","mt-md-3":"_-Zt6X","pt-md-3":"_pmFds","mt-md-4":"_dlz9t","pt-md-4":"_HQv-M","mt-md-5":"_9tUBj","pt-md-5":"_Jdc38","mt-md-6":"_BEZDD","pt-md-6":"_c3r6r","mt-md-7":"_KSCEr","pt-md-7":"_-Tpjo","mt-md-8":"_O-cOs","pt-md-8":"_DPwEz","mt-md-9":"_eBVAf","pt-md-9":"_Fnftl","mt-md-10":"_tlAu5","pt-md-10":"_ufMho","mb-md-0":"_NKFtN","pb-md-0":"_QEyOV","mb-md-1":"_t8EVs","pb-md-1":"_hVqy6","mb-md-2":"_Dwa5p","pb-md-2":"_A6iqX","mb-md-3":"_DAzrF","pb-md-3":"_o9L2-","mb-md-4":"_zMG5y","pb-md-4":"_wC2az","mb-md-5":"_LYF0o","pb-md-5":"_rrbij","mb-md-6":"_tUQcN","pb-md-6":"_MgAD-","mb-md-7":"_9lVsl","pb-md-7":"_Z7z8R","mb-md-8":"_CMrj4","pb-md-8":"_X4Qb0","mb-md-9":"_dQuWg","pb-md-9":"_98aa5","mb-md-10":"_tjfzH","pb-md-10":"_n5Id2","mx-md-0":"_kbQ3E","px-md-0":"_LWqO4","mx-md-1":"_8dqNC","px-md-1":"_QBFBY","mx-md-2":"_QXy6I","px-md-2":"_vBqGQ","mx-md-3":"_asgRe","px-md-3":"_i67O7","mx-md-4":"_-9eXp","px-md-4":"_ZQIEY","mx-md-5":"_l4FN1","px-md-5":"_vYBmq","mx-md-6":"_j4Fiy","px-md-6":"_BLvHs","mx-md-7":"_hg5ZA","px-md-7":"_OclOz","mx-md-8":"_NNMXz","px-md-8":"_KUBjL","mx-md-9":"_x5vxD","px-md-9":"_x1Hj-","mx-md-10":"_RnJFW","px-md-10":"_laoTv","my-md-0":"_gAG5i","py-md-0":"_KQkB8","my-md-1":"_90Emt","py-md-1":"_a93vq","my-md-2":"_wzerE","py-md-2":"_vpawj","my-md-3":"_ijUtT","py-md-3":"_9G-7C","my-md-4":"_GfQTx","py-md-4":"_vGRDM","my-md-5":"_MVaN3","py-md-5":"_5Ju4e","my-md-6":"_StvD2","py-md-6":"_03iO9","my-md-7":"_nlUi8","py-md-7":"_e58lN","my-md-8":"_VKoKR","py-md-8":"_Xa5lD","my-md-9":"_nLjef","py-md-9":"_88ryZ","my-md-10":"_-f4Oc","py-md-10":"_60CJ8","m-xl-0":"_YdUVc","p-xl-0":"_ceNl-","m-xl-1":"_cn-PK","p-xl-1":"_8pBVr","m-xl-2":"_UNu8h","p-xl-2":"_6mIBX","m-xl-3":"_LXA70","p-xl-3":"_nkNjg","m-xl-4":"_DH3uC","p-xl-4":"_b631X","m-xl-5":"_PU5TK","p-xl-5":"_Y9Pj5","m-xl-6":"_DQUfX","p-xl-6":"_cmXs1","m-xl-7":"_Hr4dN","p-xl-7":"_pwyLG","m-xl-8":"_XkBIo","p-xl-8":"_oSfQ1","m-xl-9":"_TXGD8","p-xl-9":"_r8XiA","m-xl-10":"_cbucW","p-xl-10":"_FnUT2","ml-xl-0":"_Lc2b0","pl-xl-0":"_8ofmI","ml-xl-1":"_yOkOl","pl-xl-1":"_5cZix","ml-xl-2":"_F0JQw","pl-xl-2":"_pWIp6","ml-xl-3":"_9CDHy","pl-xl-3":"_M9MOq","ml-xl-4":"_L6LLW","pl-xl-4":"_NZlEo","ml-xl-5":"_Milvj","pl-xl-5":"_N-hPa","ml-xl-6":"_HEU-c","pl-xl-6":"_x-uz3","ml-xl-7":"_xVYoD","pl-xl-7":"_TV3yu","ml-xl-8":"_WVmm8","pl-xl-8":"_Wsfh3","ml-xl-9":"_Rse0C","pl-xl-9":"_p-0My","ml-xl-10":"_LN1Pv","pl-xl-10":"_WtXyv","mr-xl-0":"_aQ8fC","pr-xl-0":"_x7HY1","mr-xl-1":"_rzUKT","pr-xl-1":"_ggRzA","mr-xl-2":"_j88Jb","pr-xl-2":"_6Ztzi","mr-xl-3":"_RNldP","pr-xl-3":"_uC4PP","mr-xl-4":"_14KPU","pr-xl-4":"_RoGxi","mr-xl-5":"_MYSFB","pr-xl-5":"_0fjNm","mr-xl-6":"_aK553","pr-xl-6":"_B-5Vf","mr-xl-7":"_nLta-","pr-xl-7":"_AhsZ-","mr-xl-8":"_emyPo","pr-xl-8":"_Dc6lK","mr-xl-9":"_MqsWc","pr-xl-9":"_j4A-H","mr-xl-10":"_v7rIi","pr-xl-10":"_aIhOc","mt-xl-0":"_1KMHA","pt-xl-0":"_SmBQC","mt-xl-1":"_FpHTe","pt-xl-1":"_tRIkV","mt-xl-2":"_ISAHh","pt-xl-2":"_KcOk8","mt-xl-3":"_cklRo","pt-xl-3":"_MqQSr","mt-xl-4":"_iaWfp","pt-xl-4":"_mcXBl","mt-xl-5":"_qNaL5","pt-xl-5":"_3tRQZ","mt-xl-6":"_MjyPP","pt-xl-6":"_wGTYM","mt-xl-7":"_WkpWd","pt-xl-7":"_-fXMT","mt-xl-8":"_xgRm6","pt-xl-8":"_mNE0F","mt-xl-9":"_tHRgU","pt-xl-9":"_pUanr","mt-xl-10":"_75l23","pt-xl-10":"_VjjB-","mb-xl-0":"_wNZHn","pb-xl-0":"_6weX6","mb-xl-1":"_xbDsG","pb-xl-1":"_WLHB6","mb-xl-2":"_JCck5","pb-xl-2":"_Ef822","mb-xl-3":"_-Izvj","pb-xl-3":"_kizTx","mb-xl-4":"_wDLLt","pb-xl-4":"_6vfXW","mb-xl-5":"_qa8hX","pb-xl-5":"_2cdIL","mb-xl-6":"_PPuX7","pb-xl-6":"_SYsiu","mb-xl-7":"_au29R","pb-xl-7":"_Wo-v3","mb-xl-8":"_7DCh1","pb-xl-8":"_8Qtxz","mb-xl-9":"_U5ePL","pb-xl-9":"_QdSRg","mb-xl-10":"_xwDK-","pb-xl-10":"_5HXQF","mx-xl-0":"_U-5An","px-xl-0":"_t0GQI","mx-xl-1":"_l2Q9y","px-xl-1":"_-6SLy","mx-xl-2":"_OO5ra","px-xl-2":"_DpWnU","mx-xl-3":"_umWwt","px-xl-3":"_gLeFm","mx-xl-4":"_O6nxp","px-xl-4":"_RXch7","mx-xl-5":"_GLCbl","px-xl-5":"_wOP1U","mx-xl-6":"_n1gJF","px-xl-6":"_jHA8-","mx-xl-7":"_ZG5zQ","px-xl-7":"_33-Bi","mx-xl-8":"_wGBwu","px-xl-8":"_jnqCE","mx-xl-9":"_-q541","px-xl-9":"_hQqb-","mx-xl-10":"_oOjVu","px-xl-10":"_8iBI4","my-xl-0":"_5V5-G","py-xl-0":"_ZIETe","my-xl-1":"_VhBbg","py-xl-1":"_qkd1g","my-xl-2":"_MONRd","py-xl-2":"_wBVYq","my-xl-3":"_oUD7x","py-xl-3":"_9C1YA","my-xl-4":"_akz7W","py-xl-4":"_sczsh","my-xl-5":"_CEcRg","py-xl-5":"_xFnw3","my-xl-6":"_RReJQ","py-xl-6":"_gx-E-","my-xl-7":"_NTw09","py-xl-7":"_VniPR","my-xl-8":"_zhVnN","py-xl-8":"_e-lj8","my-xl-9":"_p5Z-c","py-xl-9":"_L1zCc","my-xl-10":"_NqJ-Z","py-xl-10":"_LGmu1","background-shine":"_HkIXJ","path":"_VW1Ys","line":"_x1Ry-","skeleton":"_rh5J1","skeleton-animate":"_ukRhW","skeleton-dark":"_SuY0j","skeleton-dark-animate":"_wHz7j","skeleton-transparent":"_DehL2","skeleton-transparent-animate":"_nwZzB","semi-transparent":"_KJuSy","asset-icon":"_V0pcT","small":"_AXy-6","asset-icon-primary":"_wDjNx","asset-icon-secondary":"_uTjfo"};
1441
+
1442
+ var AssetIcon = function AssetIcon(_ref) {
1443
+ var assetIconSrc = _ref.assetIconSrc,
1444
+ _ref$assetIconProtoco = _ref.assetIconProtocolSrc,
1445
+ assetIconProtocolSrc = _ref$assetIconProtoco === void 0 ? null : _ref$assetIconProtoco,
1446
+ _ref$fallbackSrc = _ref.fallbackSrc,
1447
+ fallbackSrc = _ref$fallbackSrc === void 0 ? null : _ref$fallbackSrc,
1448
+ _ref$small = _ref.small,
1449
+ small = _ref$small === void 0 ? false : _ref$small;
1450
+ var handleFailedLoad = function handleFailedLoad(e) {
1451
+ e.target.onerror = null;
1452
+ e.target.src = fallbackSrc;
1453
+ };
1454
+ return /*#__PURE__*/React__default["default"].createElement("div", {
1455
+ className: s["asset-icon"] + (small ? " " + s["small"] : "")
1456
+ }, /*#__PURE__*/React__default["default"].createElement("img", {
1457
+ src: assetIconSrc,
1458
+ className: s["asset-icon-primary"] + (small ? " " + s["small"] : ""),
1459
+ alt: " ",
1460
+ onError: handleFailedLoad
1461
+ }), assetIconProtocolSrc ? /*#__PURE__*/React__default["default"].createElement("img", {
1462
+ src: assetIconProtocolSrc,
1463
+ className: s["asset-icon-secondary"] + (small ? " " + s["small"] : ""),
1464
+ alt: " ",
1465
+ onError: handleFailedLoad
1466
+ }) : "");
1467
+ };
1468
+ AssetIcon.propTypes = {
1469
+ assetIconSrc: PropTypes.string.isRequired,
1470
+ assetIconProtocolSrc: PropTypes.string,
1471
+ fallbackSrc: PropTypes.string,
1472
+ small: PropTypes.bool
1473
+ };
1474
+ AssetIcon.defaultProps = {
1475
+ assetIconProtocolSrc: null,
1476
+ fallbackSrc: null,
1477
+ small: false
1478
+ };
1479
+
1480
+ /**
1481
+ * This function improves the passed error object (its message) by adding the passed function name
1482
+ * and additional message to it.
1483
+ * This is useful as Javascript doesn't guarantee the stack-traces, so we should manually add these details to errors
1484
+ * to be able to troubleshoot.
1485
+ *
1486
+ * @param e {Error}
1487
+ * @param settingFunction {string}
1488
+ * @param [additionalMessage=""] {string|undefined}
1489
+ * @throws {Error} always rethrows the original passed error but with an improved message
1490
+ */
1491
+ function improveAndRethrow(e, settingFunction, additionalMessage) {
1492
+ if (additionalMessage === void 0) {
1493
+ additionalMessage = "";
1494
+ }
1495
+ var message = improvedErrorMessage(e, settingFunction, additionalMessage);
1496
+ if (e) {
1497
+ e.message = message;
1498
+ throw e; // to preserve existing stacktrace if present
1499
+ }
1500
+ throw new Error(message);
1501
+ }
1502
+ function improvedErrorMessage(e, settingFunction, additionalMessage) {
1503
+ var message = "\nFunction call " + (settingFunction != null ? settingFunction : "") + " failed. ";
1504
+ e && e.message && (message += "Error message: " + e.message + ". ");
1505
+ additionalMessage && (message += additionalMessage + " ");
1506
+ return message;
1507
+ }
1508
+
1509
+ var FiatCurrenciesService = /*#__PURE__*/function () {
1510
+ function FiatCurrenciesService() {}
1511
+ FiatCurrenciesService.getFullCurrencyNameByCode = function getFullCurrencyNameByCode(code) {
1512
+ if (code === void 0) {
1513
+ code = "";
1514
+ }
1515
+ var data = fiatCurrenciesList.find(function (currencyData) {
1516
+ return currencyData[0] === code.toUpperCase();
1517
+ });
1518
+ return data && data[2] || null;
1519
+ };
1520
+ FiatCurrenciesService.isCodeValid = function isCodeValid(code) {
1521
+ return !!fiatCurrenciesList.find(function (currenciesData) {
1522
+ return currenciesData[0] === code;
1523
+ });
1524
+ }
1525
+
1526
+ /**
1527
+ * Returns currency symbol by code if present
1528
+ *
1529
+ * @param code {string} currency code
1530
+ * @return {string|null} code or null if there is no symbol for the currency
1531
+ */;
1532
+ FiatCurrenciesService.getCurrencySymbolByCode = function getCurrencySymbolByCode(code) {
1533
+ var _data$;
1534
+ if (code === void 0) {
1535
+ code = "";
1536
+ }
1537
+ var data = fiatCurrenciesList.find(function (currencyData) {
1538
+ return currencyData[0] === code.toUpperCase();
1539
+ });
1540
+ return (_data$ = data == null ? void 0 : data[1]) != null ? _data$ : null;
1541
+ }
1542
+
1543
+ /**
1544
+ * @param code {string}
1545
+ * @return {number|null}
1546
+ */;
1547
+ FiatCurrenciesService.getCurrencyDecimalCountByCode = function getCurrencyDecimalCountByCode(code) {
1548
+ var _data$2;
1549
+ if (code === void 0) {
1550
+ code = "";
1551
+ }
1552
+ var data = fiatCurrenciesList.find(function (currencyData) {
1553
+ return currencyData[0] === code.toUpperCase();
1554
+ });
1555
+ return (_data$2 = data == null ? void 0 : data[3]) != null ? _data$2 : null;
1556
+ };
1557
+ return FiatCurrenciesService;
1558
+ }();
1559
+ var fiatCurrenciesList = [["USD", "$", "US Dollar", 2], ["CAD", "CA$", "Canadian Dollar", 2], ["EUR", "€", "Euro", 2], ["AED", "AED", "UAE Dirham", 2], ["AFN", "؋", "Afghan Afghani", 0], ["ALL", "ALL", "Albanian Lek", 0], ["AMD", "֏", "Armenian Dram", 0], ["ARS", "AR$", "Argentine Peso", 2], ["AUD", "AU$", "Australian Dollar", 2], ["AZN", "₼", "Azerbaijani Manat", 2], ["BAM", "KM", "Bosnia-Herzegovina Convertible Mark", 2], ["BDT", "Tk", "Bangladeshi Taka", 2], ["BGN", "BGN", "Bulgarian Lev", 2], ["BHD", "BD", "Bahraini Dinar", 3], ["BIF", "FBu", "Burundian Franc", 0], ["BND", "BN$", "Brunei Dollar", 2], ["BOB", "Bs", "Bolivian Boliviano", 2], ["BRL", "R$", "Brazilian Real", 2], ["BWP", "BWP", "Botswanan Pula", 2], ["BYN", "Br", "Belarusian Ruble", 2], ["BZD", "BZ$", "Belize Dollar", 2], ["CDF", "CDF", "Congolese Franc", 2], ["CHF", "CHF", "Swiss Franc", 2], ["CLP", "CL$", "Chilean Peso", 0], ["CNY", "CN¥", "Chinese Yuan", 2], ["COP", "CO$", "Colombian Peso", 0], ["CRC", "₡", "Costa Rican Colón", 0], ["CVE", "CV$", "Cape Verdean Escudo", 2], ["CZK", "Kč", "Czech Republic Koruna", 2], ["DJF", "Fdj", "Djiboutian Franc", 0], ["DKK", "Dkr", "Danish Krone", 2], ["DOP", "RD$", "Dominican Peso", 2], ["DZD", "DA", "Algerian Dinar", 2], ["EEK", "Ekr", "Estonian Kroon", 2], ["EGP", "EGP", "Egyptian Pound", 2], ["ERN", "Nfk", "Eritrean Nakfa", 2], ["ETB", "Br", "Ethiopian Birr", 2], ["GBP", "£", "British Pound Sterling", 2], ["GEL", "₾", "Georgian Lari", 2], ["GHS", "₵", "Ghanaian Cedi", 2], ["GNF", "FG", "Guinean Franc", 0], ["GTQ", "GTQ", "Guatemalan Quetzal", 2], ["HKD", "HK$", "Hong Kong Dollar", 2], ["HNL", "HNL", "Honduran Lempira", 2], ["HRK", "kn", "Croatian Kuna", 2], ["HUF", "Ft", "Hungarian Forint", 0], ["IDR", "Rp", "Indonesian Rupiah", 0], ["ILS", "₪", "Israeli New Sheqel", 2], ["INR", "₹", "Indian Rupee", 2], ["IQD", "IQD", "Iraqi Dinar", 0], ["IRR", "﷼", "Iranian Rial", 0], ["ISK", "Ikr", "Icelandic Króna", 0], ["JMD", "J$", "Jamaican Dollar", 2], ["JOD", "JD", "Jordanian Dinar", 3], ["JPY", "¥", "Japanese Yen", 0], ["KES", "Ksh", "Kenyan Shilling", 2], ["KHR", "KHR", "Cambodian Riel", 2], ["KMF", "CF", "Comorian Franc", 0], ["KRW", "₩", "South Korean Won", 0], ["KWD", "KD", "Kuwaiti Dinar", 3], ["KZT", "₸", "Kazakhstani Tenge", 2], ["LBP", "LB£", "Lebanese Pound", 0], ["LKR", "SLRs", "Sri Lankan Rupee", 2], ["LTL", "Lt", "Lithuanian Litas", 2], ["LVL", "Ls", "Latvian Lats", 2], ["LYD", "LD", "Libyan Dinar", 3], ["MAD", "MAD", "Moroccan Dirham", 2], ["MDL", "MDL", "Moldovan Leu", 2], ["MGA", "MGA", "Malagasy Ariary", 0], ["MKD", "MKD", "Macedonian Denar", 2], ["MMK", "MMK", "Myanma Kyat", 0], ["MNT", "₮", "Mongolian Tugrik", 0], ["MOP", "MOP$", "Macanese Pataca", 2], ["MUR", "MURs", "Mauritian Rupee", 0], ["MXN", "MX$", "Mexican Peso", 2], ["MYR", "RM", "Malaysian Ringgit", 2], ["MZN", "MTn", "Mozambican Metical", 2], ["NAD", "N$", "Namibian Dollar", 2], ["NGN", "₦", "Nigerian Naira", 2], ["NIO", "C$", "Nicaraguan Córdoba", 2], ["NOK", "Nkr", "Norwegian Krone", 2], ["NPR", "NPRs", "Nepalese Rupee", 2], ["NZD", "NZ$", "New Zealand Dollar", 2], ["OMR", "OMR", "Omani Rial", 3], ["PAB", "B/.", "Panamanian Balboa", 2], ["PEN", "S/.", "Peruvian Nuevo Sol", 2], ["PHP", "₱", "Philippine Peso", 2], ["PKR", "PKRs", "Pakistani Rupee", 0], ["PLN", "zł", "Polish Zloty", 2], ["PYG", "₲", "Paraguayan Guarani", 0], ["QAR", "QR", "Qatari Rial", 2], ["RON", "RON", "Romanian Leu", 2], ["RSD", "din.", "Serbian Dinar", 0], ["RUB", "₽", "Russian Ruble", 2], ["RWF", "RWF", "Rwandan Franc", 0], ["SAR", "SR", "Saudi Riyal", 2], ["SDG", "SDG", "Sudanese Pound", 2], ["SEK", "Skr", "Swedish Krona", 2], ["SGD", "S$", "Singapore Dollar", 2], ["SOS", "Ssh", "Somali Shilling", 0], ["SYP", "SY£", "Syrian Pound", 0], ["THB", "฿", "Thai Baht", 2], ["TND", "DT", "Tunisian Dinar", 3], ["TOP", "T$", "Tongan Paʻanga", 2], ["TRY", "₺", "Turkish Lira", 2], ["TTD", "TT$", "Trinidad and Tobago Dollar", 2], ["TWD", "NT$", "New Taiwan Dollar", 2], ["TZS", "TSh", "Tanzanian Shilling", 0], ["UAH", "₴", "Ukrainian Hryvnia", 2], ["UGX", "USh", "Ugandan Shilling", 0], ["UYU", "$U", "Uruguayan Peso", 2], ["UZS", "UZS", "Uzbekistan Som", 0], ["VEF", "Bs.F.", "Venezuelan Bolívar", 2], ["VND", "₫", "Vietnamese Dong", 0], ["XAF", "FCFA", "CFA Franc BEAC", 0], ["XOF", "CFA", "CFA Franc BCEAO", 0], ["YER", "﷼", "Yemeni Rial", 0], ["ZAR", "R", "South African Rand", 2], ["ZMK", "ZK", "Zambian Kwacha", 0], ["ZWL", "ZWL$", "Zimbabwean Dollar", 0]];
1560
+
1561
+ function _extends() {
1562
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
1563
+ for (var i = 1; i < arguments.length; i++) {
1564
+ var source = arguments[i];
1565
+ for (var key in source) {
1566
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
1567
+ target[key] = source[key];
1568
+ }
1569
+ }
1570
+ }
1571
+ return target;
1572
+ };
1573
+ return _extends.apply(this, arguments);
1574
+ }
1575
+ function _unsupportedIterableToArray(o, minLen) {
1576
+ if (!o) return;
1577
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1578
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1579
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1580
+ if (n === "Map" || n === "Set") return Array.from(o);
1581
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1582
+ }
1583
+ function _arrayLikeToArray(arr, len) {
1584
+ if (len == null || len > arr.length) len = arr.length;
1585
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1586
+ return arr2;
1587
+ }
1588
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
1589
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
1590
+ if (it) return (it = it.call(o)).next.bind(it);
1591
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
1592
+ if (it) o = it;
1593
+ var i = 0;
1594
+ return function () {
1595
+ if (i >= o.length) return {
1596
+ done: true
1597
+ };
1598
+ return {
1599
+ done: false,
1600
+ value: o[i++]
1601
+ };
1602
+ };
1603
+ }
1604
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1605
+ }
1606
+
1607
+ // TODO: [dev] return addCommasToAmountString internal method to encapsulate commas adding
1608
+
1609
+ var AmountUtils = /*#__PURE__*/function () {
1610
+ function AmountUtils() {}
1611
+ AmountUtils.fiatXs = function fiatXs(amount, code) {
1612
+ return this.fiat(amount, code, {
1613
+ extraSmallLength: true
1614
+ });
1615
+ }
1616
+
1617
+ /**
1618
+ * Universal method for rendering of fiat amounts, taking into account the rules of
1619
+ * the passed fiat currency code.
1620
+ *
1621
+ * TODO: [feature, high] remove 'number' from accepted types list task_id=1e692bcfabbe487a9d1638fc8ff17448
1622
+ * @param amount {BigNumber|number|string|null|undefined} The number value to be trimmed
1623
+ * @param currencyCode {string|null} The currency code. Can be omitted if { ticker: false } in the config
1624
+ * @param [passedParams={}] {object} Formatting parameters
1625
+ * @return {string} Formatted fiat amount string
1626
+ */;
1627
+ AmountUtils.fiat = function fiat(amount, currencyCode, passedParams) {
1628
+ if (passedParams === void 0) {
1629
+ passedParams = {};
1630
+ }
1631
+ try {
1632
+ var params = _extends({}, this.defaultFiatParams, passedParams);
1633
+ if (this._checkIfAmountInvalid(amount, true) || typeof currencyCode !== "string") return "NULL";
1634
+ var currencySymbol = FiatCurrenciesService.getCurrencySymbolByCode(currencyCode);
1635
+ var currencyDecimalCount = FiatCurrenciesService.getCurrencyDecimalCountByCode(currencyCode);
1636
+ var trimmedByMaxDigits = bignumber_js.BigNumber(amount).toFixed(currencyDecimalCount, bignumber_js.BigNumber.ROUND_FLOOR);
1637
+ var processedAmount = bignumber_js.BigNumber(trimmedByMaxDigits);
1638
+ if (params.collapsible && processedAmount.gte(bignumber_js.BigNumber("1000000"))) {
1639
+ processedAmount = this._collapseToMillionsAndFormat(processedAmount, this.collapsedDecimalCount, params);
1640
+ } else {
1641
+ var limitResult = this._limitTotalAmountLengthIfNeeded(trimmedByMaxDigits, params);
1642
+ processedAmount = bignumber_js.BigNumber(limitResult.processedAmount).toFormat(); // Adds commas to integer part
1643
+ }
1644
+
1645
+ // Add the currency code or currency symbol, if symbol is enabled and available
1646
+ if (params.ticker) {
1647
+ if (typeof currencySymbol === "string" && params.enableCurrencySymbols) {
1648
+ processedAmount = currencySymbol + (currencySymbol.length > 1 ? " " : "") + processedAmount;
1649
+ } else {
1650
+ processedAmount = processedAmount + " " + currencyCode;
1651
+ }
1652
+ }
1653
+ return processedAmount;
1654
+ } catch (e) {
1655
+ improveAndRethrow(e, "fiat", "Passed: " + amount);
1656
+ }
1657
+ };
1658
+ AmountUtils.cryptoWoTicker = function cryptoWoTicker(amount, digits) {
1659
+ return this.crypto(amount, null, digits, {
1660
+ ticker: false
1661
+ });
1662
+ };
1663
+ AmountUtils.cryptoWoTickerXs = function cryptoWoTickerXs(amount, digits) {
1664
+ return this.crypto(amount, null, digits, {
1665
+ ticker: false,
1666
+ extraSmallLength: true
1667
+ });
1668
+ };
1669
+ AmountUtils.cryptoXs = function cryptoXs(amount, ticker, digits) {
1670
+ return this.crypto(amount, ticker, digits, {
1671
+ extraSmallLength: true,
1672
+ periods: false
1673
+ });
1674
+ };
1675
+ AmountUtils.cryptoFull = function cryptoFull(amount, ticker, digits) {
1676
+ return this.crypto(amount, ticker, digits, {
1677
+ collapsible: false,
1678
+ trim: false,
1679
+ limitTotalLength: false
1680
+ });
1681
+ }
1682
+
1683
+ /**
1684
+ * Universal method for rendering of crypto amounts, taking into account the rules of
1685
+ * the passed ticker. Requires the number of digits after period to be less of equal to
1686
+ * the number of digits, supported by the passed ticker.
1687
+ *
1688
+ * @param amount {BigNumber|string|null|undefined} The number value to be formatted
1689
+ * @param ticker {string|null} Coin ticker
1690
+ * @param [digits=8] {number} max digits after the dot
1691
+ * @param passedParams {object} Formatting parameters
1692
+ * @return {string} Formatted crypto amount string
1693
+ */;
1694
+ AmountUtils.crypto = function crypto(amount, ticker, digits, passedParams) {
1695
+ if (digits === void 0) {
1696
+ digits = this.significantDecimalCount;
1697
+ }
1698
+ try {
1699
+ var params = _extends({}, this.defaultCryptoParams, passedParams);
1700
+ if (this._checkIfAmountInvalid(amount) || typeof ticker !== "string" && params.ticker) return "NULL";
1701
+ var addPeriods = false;
1702
+ var amountBigNumber = bignumber_js.BigNumber(amount);
1703
+ var processedAmount = amountBigNumber.toFixed(digits, bignumber_js.BigNumber.ROUND_FLOOR);
1704
+ processedAmount = this.removeRedundantRightZerosFromNumberString(processedAmount);
1705
+ var originalAmountDecimalPlaces = bignumber_js.BigNumber(processedAmount).decimalPlaces();
1706
+ // Check decimal count and throw an error, if the amount has more decimal digits than supported by the asset
1707
+ if (originalAmountDecimalPlaces > digits) {
1708
+ var errorMessage = "An attempt to render a crypto value with too many digits after period was made: " + amount + ", allowed digits: " + digits + ". This is a no-op, since the logical and visually rendered values would differ, which is not acceptable for crypto amounts. Please trim the amount before rendering, using the trimCryptoAmountByCoin(amount, coin) method.";
1709
+ // throw new Error(errorMessage);
1710
+ // eslint-disable-next-line no-console
1711
+ console.log(errorMessage, "crypto");
1712
+ }
1713
+
1714
+ // Shortening the value to general significant number of digits after period
1715
+ if (params.trim) {
1716
+ processedAmount = this.removeRedundantRightZerosFromNumberString(amountBigNumber.toFixed(this.significantDecimalCount, bignumber_js.BigNumber.ROUND_FLOOR));
1717
+ addPeriods = originalAmountDecimalPlaces > this.significantDecimalCount;
1718
+ }
1719
+ var limitResult = this._limitTotalAmountLengthIfNeeded(processedAmount, params);
1720
+ processedAmount = limitResult.processedAmount;
1721
+ addPeriods || (addPeriods = limitResult.addPeriods);
1722
+ var wereMillionsCollapsed = false;
1723
+ if (params.collapsible && amountBigNumber.gte("1000000")) {
1724
+ // Collapse the 1M+ amounts if applicable
1725
+ processedAmount = this._collapseToMillionsAndFormat(bignumber_js.BigNumber(processedAmount), this.collapsedDecimalCount, params);
1726
+ wereMillionsCollapsed = true;
1727
+ } else {
1728
+ // Add separators to integer part of the amount
1729
+ processedAmount = bignumber_js.BigNumber(processedAmount).toFormat();
1730
+ }
1731
+
1732
+ // Adding periods, if the amount was shortened
1733
+ if (params.periods && addPeriods && !wereMillionsCollapsed) {
1734
+ processedAmount = processedAmount + this.periods;
1735
+ }
1736
+
1737
+ // Adding an adaptive (printable/full) ticker
1738
+ if (params.ticker && ticker) {
1739
+ processedAmount = processedAmount + " " + ticker;
1740
+ }
1741
+ return processedAmount;
1742
+ } catch (e) {
1743
+ improveAndRethrow(e, "crypto", "Passed: " + amount + ", " + ticker + ", " + digits);
1744
+ }
1745
+ };
1746
+ AmountUtils._checkIfAmountInvalid = function _checkIfAmountInvalid(amount, allowNumbers) {
1747
+ if (allowNumbers === void 0) {
1748
+ allowNumbers = false;
1749
+ }
1750
+ return amount == null || amount === "" || !bignumber_js.BigNumber.isBigNumber(amount) && typeof amount !== "string" && (!allowNumbers || typeof amount !== "number");
1751
+ }
1752
+
1753
+ /**
1754
+ * Trims all digits after period that exceed the number of digits provided.
1755
+ * Use this everywhere when calculating some amount value to ensure the result is correct in terms
1756
+ * of max digits allowed by specific currency.
1757
+ *
1758
+ * @param amount {BigNumber|number|string|null|undefined} The number value to be trimmed.
1759
+ * HEX strings also allowed "0x..." and JS hex numbers
1760
+ * @param digits {number} allowed digits
1761
+ * @return {string|null} String with trimmed number or null for invalid amount
1762
+ */;
1763
+ AmountUtils.trim = function trim(amount, digits) {
1764
+ try {
1765
+ if (this._checkIfAmountInvalid(amount, true)) return null;
1766
+ return bignumber_js.BigNumber(amount).toFixed(digits, bignumber_js.BigNumber.ROUND_FLOOR);
1767
+ } catch (e) {
1768
+ improveAndRethrow(e, "trim", "Passed: " + amount + ", " + digits);
1769
+ }
1770
+ }
1771
+
1772
+ /**
1773
+ * @param amount {BigNumber|number|string|null|undefined} The number value to be trimmed.
1774
+ * HEX strings also allowed "0x..." and JS hex numbers
1775
+ * @return {string|null}
1776
+ */;
1777
+ AmountUtils.intStr = function intStr(amount) {
1778
+ return this.trim(amount, 0);
1779
+ }
1780
+
1781
+ /**
1782
+ * Shortens the line length by using a "1.52M" representation of big amounts.
1783
+ *
1784
+ * @param amountBigNumber {BigNumber} The number value to be trimmed
1785
+ * @param decimalCount {number} The number of digits after period to keep in millions representation
1786
+ * @param params {object} params object
1787
+ * @return {string} A shortened string, converted into "millions" format, if the amount exceeds 1 million
1788
+ */;
1789
+ AmountUtils._collapseToMillionsAndFormat = function _collapseToMillionsAndFormat(amountBigNumber, decimalCount, params) {
1790
+ if (params === void 0) {
1791
+ params = {};
1792
+ }
1793
+ try {
1794
+ // TODO: [feature, moderate] use local format here - take from JS locales (comma/dot etc.)
1795
+ var millionBigNumber = bignumber_js.BigNumber("1000000");
1796
+ var millions = amountBigNumber.div(millionBigNumber).toFixed(decimalCount, bignumber_js.BigNumber.ROUND_FLOOR);
1797
+ var limitedResult = this._limitTotalAmountLengthIfNeeded(millions, params);
1798
+ var formatted = bignumber_js.BigNumber(limitedResult.processedAmount).toFormat();
1799
+ return formatted + "M";
1800
+ } catch (e) {
1801
+ improveAndRethrow(e, "_collapseAmountAndFormat", "Passed: " + amountBigNumber.toFixed() + ", " + decimalCount);
1802
+ }
1803
+ }
1804
+
1805
+ /**
1806
+ * @param amountString {string} The amount to be restricted by length
1807
+ * @param params {object} Params object used for formatting
1808
+ * @return {{processedAmount:string, addPeriods: boolean}} A shortened string
1809
+ */;
1810
+ AmountUtils._limitTotalAmountLengthIfNeeded = function _limitTotalAmountLengthIfNeeded(amountString, params) {
1811
+ try {
1812
+ var addPeriods = false;
1813
+ if (params.limitTotalLength || params.extraSmallLength) {
1814
+ var maxLength = params.extraSmallLength ? this.extraSmallMaxTotalLength : this.maxTotalLength;
1815
+ if (amountString.length > maxLength) {
1816
+ var delta = amountString.length - maxLength;
1817
+ var currentDecimalsCount = bignumber_js.BigNumber(amountString).decimalPlaces();
1818
+ var newDecimalCount = currentDecimalsCount - delta;
1819
+ amountString = bignumber_js.BigNumber(amountString).toFixed(newDecimalCount > 2 ? newDecimalCount : 2, bignumber_js.BigNumber.ROUND_FLOOR);
1820
+ addPeriods = currentDecimalsCount > newDecimalCount;
1821
+ }
1822
+ }
1823
+ return {
1824
+ addPeriods: addPeriods,
1825
+ processedAmount: amountString
1826
+ };
1827
+ } catch (e) {
1828
+ improveAndRethrow(e, "_limitTotalAmountLengthIfNeeded", "Passed: " + amountString + ", " + params);
1829
+ }
1830
+ }
1831
+
1832
+ /**
1833
+ * Safely composes rate string (handles small/big rates)
1834
+ *
1835
+ * @param leftTicker {string}
1836
+ * @param rightTicker {string}
1837
+ * @param rate {number|string|BigNumber}
1838
+ * @param [rightCurrencyDigitsAfterDots=8] {number}
1839
+ * @return {string}
1840
+ */;
1841
+ AmountUtils.composeRateText = function composeRateText(leftTicker, rightTicker, rate, rightCurrencyDigitsAfterDots) {
1842
+ if (rightCurrencyDigitsAfterDots === void 0) {
1843
+ rightCurrencyDigitsAfterDots = this.significantDecimalCount;
1844
+ }
1845
+ try {
1846
+ /* Here we try to calculate a clear rate for the user. The difficulty is that the rate value can be pretty
1847
+ * small as some coins have significantly higher price than the other. For such cases we calculate
1848
+ * not the "1 <coin_A> is X <coin B>" but "Y <coin_A> is X <coin B>" where Y is one of the powers of 100.
1849
+ */
1850
+ var leftNumber = bignumber_js.BigNumber("1");
1851
+ var multiplier = bignumber_js.BigNumber("100");
1852
+ var maxAttemptsToGetRate = 10;
1853
+ var right = null;
1854
+ var rateBigNumber = bignumber_js.BigNumber(rate);
1855
+ for (var i = 0; i < maxAttemptsToGetRate; ++i) {
1856
+ var rightNumberAttempt = rateBigNumber.times(leftNumber).toFixed(rightCurrencyDigitsAfterDots, bignumber_js.BigNumber.ROUND_FLOOR);
1857
+ if (!bignumber_js.BigNumber(rightNumberAttempt).eq(bignumber_js.BigNumber("0"))) {
1858
+ right = bignumber_js.BigNumber(rightNumberAttempt);
1859
+ break;
1860
+ } else {
1861
+ leftNumber = leftNumber.times(multiplier);
1862
+ }
1863
+ }
1864
+ var leftAmountString = AmountUtils.intStr(leftNumber);
1865
+ var rightAmountString = right != null ? right.toFixed(rightCurrencyDigitsAfterDots, bignumber_js.BigNumber.ROUND_FLOOR) : null;
1866
+ return leftAmountString + " " + leftTicker + " ~ " + (rightAmountString != null ? rightAmountString : "?") + " " + rightTicker;
1867
+ } catch (e) {
1868
+ // eslint-disable-next-line no-console
1869
+ console.log("composeRateText", e);
1870
+ }
1871
+ return "-";
1872
+ }
1873
+
1874
+ /**
1875
+ * @param numberAsAString {string}
1876
+ * @return {string}
1877
+ */;
1878
+ AmountUtils.removeRedundantRightZerosFromNumberString = function removeRedundantRightZerosFromNumberString(numberAsAString) {
1879
+ try {
1880
+ var _right2;
1881
+ var parts = ("" + numberAsAString).split(".");
1882
+ var right = parts[1];
1883
+ while ((_right = right) != null && _right.length && right[right.length - 1] === "0") {
1884
+ var _right;
1885
+ right = right.slice(0, right.length - 1);
1886
+ }
1887
+ return "" + parts[0] + ((_right2 = right) != null && _right2.length ? "." + right : "");
1888
+ } catch (e) {
1889
+ improveAndRethrow(e, "removeRedundantRightZerosFromNumberString", "Passed: " + numberAsAString);
1890
+ }
1891
+ };
1892
+ return AmountUtils;
1893
+ }();
1894
+ AmountUtils.significantDecimalCount = 8;
1895
+ AmountUtils.collapsedDecimalCount = 2;
1896
+ AmountUtils.maxTotalLength = 12;
1897
+ AmountUtils.extraSmallMaxTotalLength = 9;
1898
+ // >=10 breaks transactions list (mobile) and it is hard to avoid this
1899
+ AmountUtils.periods = "..";
1900
+ AmountUtils.defaultFiatParams = {
1901
+ ticker: true,
1902
+ // If true, currency code will be shown
1903
+ enableCurrencySymbols: true,
1904
+ // Enables currency symbols where available. Requires "ticker: true"
1905
+ collapsible: true,
1906
+ // Enables minimization of amounts over 1 million (example: 1.52M)
1907
+ limitTotalLength: true,
1908
+ // Limits the total amount length to maxTotalLength
1909
+ extraSmallLength: false // Limits the total amount length to extraSmallMaxTotalLength
1910
+ };
1911
+ AmountUtils.defaultCryptoParams = {
1912
+ ticker: true,
1913
+ // If true, asset ticker will be shown
1914
+ collapsible: true,
1915
+ // Enables minimization of amounts over 1 million (example: 1.52M)
1916
+ trim: true,
1917
+ // Cuts the right part of the amount if necessary, and adds ".." in the end
1918
+ limitTotalLength: true,
1919
+ // Limits the total amount length to maxTotalLength
1920
+ extraSmallLength: false,
1921
+ // Limits the total amount length to extraSmallMaxTotalLength
1922
+ periods: true // Whether we add periods ("..") as suffix for trimmed numbers
1923
+ };
1924
+
1925
+ var Blockchain =
1926
+ /**
1927
+ * @param name {string} latin printable name of blockchain
1928
+ * @param supportedProtocols {Protocol[]}
1929
+ */
1930
+ function Blockchain(name, supportedProtocols) {
1931
+ if (supportedProtocols === void 0) {
1932
+ supportedProtocols = [];
1933
+ }
1934
+ this.name = name;
1935
+ this.supportedProtocols = supportedProtocols;
1936
+ };
1937
+
1938
+ var Protocol = function Protocol(protocolName) {
1939
+ this.protocol = protocolName;
1940
+ };
1941
+
1942
+ /**
1943
+ * The model for cryptocurrency coins.
1944
+ *
1945
+ * WARNING: this class should not be instantiated directly. Use only predefined singleton Coin (or descendants) instances.
1946
+ */
1947
+ var Coin = /*#__PURE__*/function () {
1948
+ /**
1949
+ * Creates new coin
1950
+ *
1951
+ * @param latinName {string} the coin name in latin symbols like "Bitcoin"
1952
+ * @param ticker {string} the coin symbol/ticker/code like 'BTC'. Always upper case. A unique coin identifier
1953
+ * @param tickerPrintable {string} ticker but in printable format. Useful for tokens based on external blockchains
1954
+ * like ERC20 or TRC20. It is not friendly to display USDTERC20 or BUSDTRC20 - more neat options are just
1955
+ * USDT and BUSD. Note that you should always care about user's understanding of what coin he/she is working
1956
+ * with as printable ticker for USDTERC20 and USDTTRC20 are the same.
1957
+ * @param digitsCountAfterComma {number} count of digits after the comma. E.g. 8 for bitcoin
1958
+ * @param maxValue {number|null} max possible value for cryptocurrency. Null means that the currency has no max possible value
1959
+ * @param atomName {string} name of the coin's atomic value. Like 'satoshi' for bitcoin
1960
+ * @param mainnet {Network} main network for this coin
1961
+ * @param testnet {Network} test network for this coin
1962
+ * @param minConfirmations {number} min confirmations count to treat the coin's transaction confirmed
1963
+ * @param payableEntityStringForFeeRate {string|null} the payable fee entity like byte for bitcoin or gas for ether if present
1964
+ * @param feeOptionsTimeStringsSortedDesc {string[]} array of 4 strings for fee options when sending coins. Should be sorted from the highest time to the smallest
1965
+ * @param feeRatesExpirationTimeMs {number} number of milliseconds to treat the fee rates as expired
1966
+ * @param blockchain {Blockchain} blockchain object
1967
+ * @param [protocol] {Protocol|null} token/coin protocol if relevant
1968
+ * @param [tokenAddress] {string|null} address of contract of this token (if the coin is token)
1969
+ * @param [doesUseLowerCaseAddresses] {boolean} flag to clarify whether we can use lower case addresses to ensure more robust comparisons
1970
+ * @param [doesUseOutputs=false] {boolean} true if this coin uses inputs/outputs concept and false if it uses just balances
1971
+ */
1972
+ function Coin(latinName, ticker, tickerPrintable, digitsCountAfterComma, maxValue, atomName, mainnet, testnet, minConfirmations, payableEntityStringForFeeRate, feeOptionsTimeStringsSortedDesc, feeRatesExpirationTimeMs, blockchain, protocol, tokenAddress, doesUseLowerCaseAddresses, doesUseOutputs) {
1973
+ if (protocol === void 0) {
1974
+ protocol = null;
1975
+ }
1976
+ if (tokenAddress === void 0) {
1977
+ tokenAddress = null;
1978
+ }
1979
+ if (doesUseLowerCaseAddresses === void 0) {
1980
+ doesUseLowerCaseAddresses = true;
1981
+ }
1982
+ if (doesUseOutputs === void 0) {
1983
+ doesUseOutputs = false;
1984
+ }
1985
+ this.latinName = latinName;
1986
+ this.ticker = ticker;
1987
+ this.tickerPrintable = tickerPrintable;
1988
+ this.digits = digitsCountAfterComma;
1989
+ this.maxValue = maxValue;
1990
+ this.atomName = atomName;
1991
+ this.mainnet = mainnet;
1992
+ this.testnet = testnet;
1993
+ this.minConfirmations = minConfirmations;
1994
+ this.payableEntityStringForFeeRate = payableEntityStringForFeeRate;
1995
+ this.feeOptionsTimeStringsSortedDesc = feeOptionsTimeStringsSortedDesc;
1996
+ this.feeRatesExpirationTimeMs = feeRatesExpirationTimeMs;
1997
+ this.protocol = protocol;
1998
+ this.blockchain = blockchain;
1999
+ // TODO: [bug, critical] use testnet property for testnet contract address as it blocks the app work in testnets
2000
+ this.tokenAddress = tokenAddress;
2001
+ this.feeCoin = this;
2002
+ this._significantDigits = 8;
2003
+ this.doesUseLowerCaseAddresses = doesUseLowerCaseAddresses;
2004
+ this.doesUseOutputs = doesUseOutputs;
2005
+ }
2006
+
2007
+ /**
2008
+ * Sets fee coin
2009
+ *
2010
+ * @param feeCoin {Coin} some tokens use another coin to charge transaction fee as they work on top of some external
2011
+ * blockchain. So pass here the coin the token uses for fee charging. Like for ERC20 token the fee coin is ETH.
2012
+ * By default, the creating coin will be set as a value for this field.
2013
+ */
2014
+ var _proto = Coin.prototype;
2015
+ _proto.setFeeCoin = function setFeeCoin(feeCoin) {
2016
+ this.feeCoin = feeCoin;
2017
+ }
2018
+
2019
+ /**
2020
+ * Checks whether this coin uses another coin (blockchain) to charge fee for transactions (means works on base of
2021
+ * some external blockchain).
2022
+ *
2023
+ * @return {boolean} true if this coin uses external blockchain to perform transactions and charge fee
2024
+ */;
2025
+ _proto.doesUseDifferentCoinFee = function doesUseDifferentCoinFee() {
2026
+ return this.feeCoin !== this;
2027
+ }
2028
+
2029
+ /**
2030
+ * Converts the given atoms string/number to string representing the same amount in coin itself - floating point number
2031
+ *
2032
+ * @param atoms {string} atoms positive integer amount
2033
+ * @return {string} coin amount floating point number as a string
2034
+ */;
2035
+ _proto.atomsToCoinAmount = function atomsToCoinAmount(atoms) {
2036
+ throw new Error("Not implemented in base Coin");
2037
+ }
2038
+
2039
+ /**
2040
+ * Converts the given coins amount string/number to string representing the same amount in coin atoms - integer number
2041
+ *
2042
+ * @param coinsAmount {string} coins positive floating point amount
2043
+ * @return {string} coin atoms amount integer number as a string
2044
+ */;
2045
+ _proto.coinAmountToAtoms = function coinAmountToAtoms(coinsAmount) {
2046
+ throw new Error("Not implemented in base Coin");
2047
+ }
2048
+
2049
+ /**
2050
+ * Composes URL to view the tx with given id in the external blockchain explorer
2051
+ *
2052
+ * @param txId {string} id of transaction
2053
+ * @return {string} URL string
2054
+ */;
2055
+ _proto.composeUrlToTransactionExplorer = function composeUrlToTransactionExplorer(txId) {
2056
+ throw new Error("Not implemented in base Coin");
2057
+ }
2058
+
2059
+ /**
2060
+ * Most of the cryptocurrencies has specific fee rate or fee price metric. This value usually has specific measure
2061
+ * like satoshi/byte or gWei/gas. This function adds the described denomination string to the given amount
2062
+ * as a suffix and returns the result string ready to be show to a user.
2063
+ *
2064
+ * @param coinAtomsString {string} coin atoms positive integer amount
2065
+ * @return {string} string of coin amount and fee rate units
2066
+ */;
2067
+ _proto.coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString = function coinAtomsFeeRateToCommonlyUsedAmountFormatWithDenominationString(coinAtomsString) {
2068
+ throw new Error("Not implemented in base Coin");
2069
+ }
2070
+
2071
+ /**
2072
+ * Check whether this coin support transaction prioritisation during the sending process.
2073
+ *
2074
+ * @return {boolean} true if support transaction prioritisation and false otherwise
2075
+ */;
2076
+ _proto.doesSupportTransactionPrioritisation = function doesSupportTransactionPrioritisation() {
2077
+ return Array.isArray(this.feeOptionsTimeStringsSortedDesc);
2078
+ };
2079
+ _proto.tickerAndProtocol = function tickerAndProtocol() {
2080
+ try {
2081
+ var _ref;
2082
+ return "" + this.tickerPrintable + (this.protocol ? (_ref = " " + this.protocol.protocol) != null ? _ref : "" : "");
2083
+ } catch (e) {
2084
+ improveAndRethrow(e, "tickerAndProtocol");
2085
+ }
2086
+ };
2087
+ return Coin;
2088
+ }();
2089
+
2090
+ var LogsStorage = /*#__PURE__*/function () {
2091
+ function LogsStorage() {}
2092
+ LogsStorage.saveLog = function saveLog(log) {
2093
+ this._inMemoryStorage.push(log);
2094
+ };
2095
+ LogsStorage.getInMemoryLogs = function getInMemoryLogs() {
2096
+ return this._inMemoryStorage;
2097
+ };
2098
+ LogsStorage.getAllLogs = function getAllLogs() {
2099
+ var storedLogs = "";
2100
+ if (typeof window !== "undefined") {
2101
+ storedLogs = localStorage.getItem(this._logsStorageId);
2102
+ }
2103
+ return storedLogs + "\n" + this._inMemoryStorage.join("\n");
2104
+ }
2105
+
2106
+ /**
2107
+ * @param logger {Logger}
2108
+ */;
2109
+ LogsStorage.saveToTheDisk = function saveToTheDisk(logger) {
2110
+ try {
2111
+ var MAX_LOCAL_STORAGE_VOLUME_BYTES = 5 * 1024 * 1024;
2112
+ var MAX_LOGS_STORAGE_BYTES = MAX_LOCAL_STORAGE_VOLUME_BYTES * 0.65;
2113
+ if (typeof window !== "undefined") {
2114
+ var existingLogs = localStorage.getItem(this._logsStorageId);
2115
+ var logsString = existingLogs + "\n" + this._inMemoryStorage.join("\n");
2116
+ var lettersCountToRemove = logsString.length - Math.round(MAX_LOGS_STORAGE_BYTES / 2);
2117
+ if (lettersCountToRemove > 0) {
2118
+ localStorage.setItem(this._logsStorageId, logsString.slice(lettersCountToRemove, logsString.length));
2119
+ } else {
2120
+ localStorage.setItem(this._logsStorageId, logsString);
2121
+ }
2122
+ this._inMemoryStorage = [];
2123
+ }
2124
+ } catch (e) {
2125
+ logger == null || logger.logError(e, "saveToTheDisk", "Failed to save logs to disk");
2126
+ }
2127
+ };
2128
+ LogsStorage.removeAllClientLogs = function removeAllClientLogs() {
2129
+ if (typeof window !== "undefined") {
2130
+ if (localStorage.getItem("doNotRemoveClientLogsWhenSignedOut") !== "true") {
2131
+ localStorage.removeItem(this._logsStorageId);
2132
+ }
2133
+ }
2134
+ this._inMemoryStorage = [];
2135
+ };
2136
+ LogsStorage.setDoNotRemoveClientLogsWhenSignedOut = function setDoNotRemoveClientLogsWhenSignedOut(value) {
2137
+ if (typeof window !== "undefined") {
2138
+ localStorage.setItem("doNotRemoveClientLogsWhenSignedOut", value);
2139
+ }
2140
+ };
2141
+ return LogsStorage;
2142
+ }();
2143
+ LogsStorage._inMemoryStorage = [];
2144
+ LogsStorage._logsStorageId = "clietnLogs_j203fj2D0n-d1";
2145
+
2146
+ /**
2147
+ * Stringify given object by use of JSON.stringify but handles circular structures and "response", "request" properties
2148
+ * to avoid stringing redundant data when printing errors containing request/response objects.
2149
+ *
2150
+ * @param object - object to be stringed
2151
+ * @param indent - custom indentation
2152
+ * @return {string} - stringed object
2153
+ */
2154
+ function safeStringify(object, indent) {
2155
+ if (indent === void 0) {
2156
+ indent = 2;
2157
+ }
2158
+ var cache = [];
2159
+ if (typeof object === "string" || typeof object === "function" || typeof object === "number" || typeof object === "undefined" || typeof object === "boolean") {
2160
+ return String(object);
2161
+ }
2162
+ var retVal = JSON.stringify(object, function (key, value) {
2163
+ if (key.toLowerCase().includes("request")) {
2164
+ return JSON.stringify({
2165
+ body: value == null ? void 0 : value.body,
2166
+ query: value == null ? void 0 : value.query,
2167
+ headers: value == null ? void 0 : value.headers
2168
+ });
2169
+ }
2170
+ if (key.toLowerCase().includes("response")) {
2171
+ return JSON.stringify({
2172
+ statusText: value == null ? void 0 : value.statusText,
2173
+ status: value == null ? void 0 : value.status,
2174
+ data: value == null ? void 0 : value.data,
2175
+ headers: value == null ? void 0 : value.headers
2176
+ });
2177
+ }
2178
+ return typeof value === "object" && value !== null ? cache.includes(value) ? "duplicated reference" // Duplicated references were found, discarding this key
2179
+ : cache.push(value) && value // Store value in our collection
2180
+ : value;
2181
+ }, indent);
2182
+ cache = null;
2183
+ return retVal;
2184
+ }
2185
+
2186
+ var Logger = /*#__PURE__*/function () {
2187
+ function Logger() {}
2188
+ /**
2189
+ * Logs to client logs storage.
2190
+ *
2191
+ * WARNING! this method should ce used carefully for critical logging as we have the restriction for storing logs
2192
+ * on client side as we store them inside the local storage. Please see details inside storage.js
2193
+ * @param logString {string} log string
2194
+ * @param source {string} source of the log entry
2195
+ */
2196
+ Logger.log = function log(logString, source) {
2197
+ var timestamp = new Date().toISOString();
2198
+ LogsStorage.saveLog(timestamp + "|" + source + ":" + logString);
2199
+ };
2200
+ Logger.logError = function logError(e, settingFunction, additionalMessage, onlyToConsole) {
2201
+ var _e$errorDescription, _e$howToFix;
2202
+ if (additionalMessage === void 0) {
2203
+ additionalMessage = "";
2204
+ }
2205
+ if (onlyToConsole === void 0) {
2206
+ onlyToConsole = false;
2207
+ }
2208
+ var message = "\nFunction call " + (settingFunction != null ? settingFunction : "") + " failed. Error message: " + (e == null ? void 0 : e.message) + ". " + additionalMessage + " ";
2209
+ message += "" + ((_e$errorDescription = e == null ? void 0 : e.errorDescription) != null ? _e$errorDescription : "") + ((_e$howToFix = e == null ? void 0 : e.howToFix) != null ? _e$howToFix : "") + ((e == null ? void 0 : e.httpStatus) === 403 ? "Authentication has expired or was lost. " : "");
2210
+ if (e != null && e.response) {
2211
+ try {
2212
+ var responseData = safeStringify({
2213
+ response: e.response
2214
+ });
2215
+ responseData && (message += "\n" + responseData + ". ");
2216
+ } catch (e) {}
2217
+ }
2218
+ var finalErrorText = message + ". " + safeStringify(e);
2219
+ // eslint-disable-next-line no-console
2220
+ console.error(finalErrorText);
2221
+ if (!onlyToConsole) {
2222
+ this.log(finalErrorText, "logError");
2223
+ }
2224
+ };
2225
+ return Logger;
2226
+ }();
2227
+
2228
+ /**
2229
+ * TODO: [tests, critical] Ued by payments logic
2230
+ *
2231
+ * Simple cache based on Map.
2232
+ * Provides ability to store event-dependent data.
2233
+ */
2234
+ var Cache = /*#__PURE__*/function () {
2235
+ /**
2236
+ * @param eventBus {EventBus} EventBus.js lib instance
2237
+ * @param [noSessionEvents=[]] {string[]} array of events that will be treated as "no session"
2238
+ */
2239
+ function Cache(eventBus, noSessionEvents) {
2240
+ if (noSessionEvents === void 0) {
2241
+ noSessionEvents = [];
2242
+ }
2243
+ this._cache = new Map();
2244
+ this._eventDependentDataKeys = [];
2245
+ this._noSessionEvents = noSessionEvents;
2246
+ this._eventBus = eventBus;
2247
+ }
2248
+ var _proto = Cache.prototype;
2249
+ _proto._setupIntervalClearingExpired = function _setupIntervalClearingExpired() {
2250
+ var cleaner = function cleaner() {
2251
+ try {
2252
+ for (var _iterator = _createForOfIteratorHelperLoose(this._cache.keys()), _step; !(_step = _iterator()).done;) {
2253
+ var key = _step.value;
2254
+ var item = this._cache.get(key);
2255
+ if (item && item.ttlMs && item.addedMsTimestamp + item.ttlMs < Date.now()) {
2256
+ this._cache["delete"](key);
2257
+ }
2258
+ }
2259
+ } catch (e) {
2260
+ improveAndRethrow(e, "_intervalClearingExpiredCache");
2261
+ }
2262
+ };
2263
+ cleaner = cleaner.bind(this);
2264
+ setInterval(cleaner, 1000);
2265
+ }
2266
+
2267
+ /**
2268
+ * Puts data to cache
2269
+ *
2270
+ * @param key {string} string key for this data
2271
+ * @param data {any} any data
2272
+ * @param ttlMs {number|null} optional milliseconds number for cache lifetime
2273
+ * @throws {Error} when the data is null/undefined because these values for data are reserved for internal logic
2274
+ */;
2275
+ _proto.put = function put(key, data, ttlMs) {
2276
+ if (ttlMs === void 0) {
2277
+ ttlMs = null;
2278
+ }
2279
+ try {
2280
+ if (typeof key !== "string" || data == null) {
2281
+ throw new Error("Trying to cache corrupted data: " + key + ", " + data);
2282
+ }
2283
+ this._cache.set(key, {
2284
+ data: data,
2285
+ addedMsTimestamp: Date.now(),
2286
+ ttlMs: ttlMs
2287
+ });
2288
+ } catch (e) {
2289
+ improveAndRethrow(e, "cache.put");
2290
+ }
2291
+ };
2292
+ _proto.putSessionDependentData = function putSessionDependentData(key, data, ttlMs) {
2293
+ if (ttlMs === void 0) {
2294
+ ttlMs = null;
2295
+ }
2296
+ this._putEventDependentData(key, data, this._noSessionEvents, ttlMs);
2297
+ }
2298
+
2299
+ /**
2300
+ * Puts data to cache and adds its key to list of keys that should be related by each of given events.
2301
+ *
2302
+ * @param key {string} key for cache
2303
+ * @param data {any} any caching data
2304
+ * @param events {string[]} list of events forcing putting data to be removed when triggered
2305
+ * @param ttlMs {|null} optional time to live for this cache item
2306
+ * @throws {Error} when the data is null/undefined because these values for data are reserved for internal logic
2307
+ */;
2308
+ _proto.putEventDependentData = function putEventDependentData(key, data, events, ttlMs) {
2309
+ if (ttlMs === void 0) {
2310
+ ttlMs = null;
2311
+ }
2312
+ this._putEventDependentData(key, data, events, ttlMs);
2313
+ };
2314
+ _proto._putEventDependentData = function _putEventDependentData(key, data, events, ttlMs) {
2315
+ var _this = this;
2316
+ if (ttlMs === void 0) {
2317
+ ttlMs = null;
2318
+ }
2319
+ try {
2320
+ if (typeof key !== "string" || data == null) {
2321
+ throw new Error("Trying to cache corrupted data: " + key + ", " + data);
2322
+ }
2323
+ this._cache.set(key, {
2324
+ data: data,
2325
+ addedMsTimestamp: Date.now(),
2326
+ ttlMs: ttlMs
2327
+ });
2328
+ var _loop = function _loop() {
2329
+ var event = _step2.value;
2330
+ var eventAndKeys = _this._eventDependentDataKeys.find(function (item) {
2331
+ return item[0] === event;
2332
+ });
2333
+ if (eventAndKeys) {
2334
+ eventAndKeys.push(key);
2335
+ } else {
2336
+ _this._eventDependentDataKeys.push([event, key]);
2337
+ _this._eventBus.addEventListener(event, function () {
2338
+ try {
2339
+ var keys = _this._eventDependentDataKeys.find(function (item) {
2340
+ return item[0] === event;
2341
+ });
2342
+ (keys != null ? keys : [event]).slice(1).forEach(function (key) {
2343
+ return _this._cache["delete"](key);
2344
+ });
2345
+ } catch (e) {
2346
+ Logger.logError(e, "cache.removing-for-event", "Event: " + event);
2347
+ }
2348
+ });
2349
+ }
2350
+ };
2351
+ for (var _iterator2 = _createForOfIteratorHelperLoose(events), _step2; !(_step2 = _iterator2()).done;) {
2352
+ _loop();
2353
+ }
2354
+ } catch (e) {
2355
+ improveAndRethrow(e, "cache.putEventDependentData");
2356
+ }
2357
+ }
2358
+
2359
+ // TODO: [feature, low] add clearing of expired data by schedule
2360
+ ;
2361
+ _proto.get = function get(key) {
2362
+ try {
2363
+ var item = this._cache.get(key);
2364
+ if (item) {
2365
+ if (item.addedMsTimestamp && item.ttlMs !== null && item.addedMsTimestamp + item.ttlMs < Date.now()) {
2366
+ this._cache["delete"](key);
2367
+ return null;
2368
+ } else {
2369
+ return item.data;
2370
+ }
2371
+ }
2372
+ return null;
2373
+ } catch (e) {
2374
+ improveAndRethrow(e, "cache.get");
2375
+ }
2376
+ };
2377
+ _proto.getLastUpdateTimestamp = function getLastUpdateTimestamp(key) {
2378
+ var _this$_cache$get$adde, _this$_cache$get;
2379
+ return (_this$_cache$get$adde = (_this$_cache$get = this._cache.get(key)) == null ? void 0 : _this$_cache$get.addedMsTimestamp) != null ? _this$_cache$get$adde : null;
2380
+ }
2381
+
2382
+ /**
2383
+ * Updates the timestamp of the last update for specified key to the provided value.
2384
+ * Can be useful when TTL is controlled outside this class.
2385
+ *
2386
+ * @param key {string}
2387
+ * @param timestamp {number}
2388
+ * @return {boolean}
2389
+ */;
2390
+ _proto.setLastUpdateTimestamp = function setLastUpdateTimestamp(key, timestamp) {
2391
+ try {
2392
+ var item = this._cache.get(key);
2393
+ if (item != null && typeof timestamp === "number") {
2394
+ this._cache.set(key, _extends({}, item, {
2395
+ addedTimestampMs: timestamp
2396
+ }));
2397
+ return true;
2398
+ }
2399
+ return false;
2400
+ } catch (e) {
2401
+ improveAndRethrow("cache.setLastUpdateTimestamp");
2402
+ }
2403
+ };
2404
+ _proto.invalidate = function invalidate(key) {
2405
+ try {
2406
+ this._cache["delete"](key);
2407
+ } catch (e) {
2408
+ improveAndRethrow(e, "cache.invalidate");
2409
+ }
2410
+ };
2411
+ _proto.invalidateContaining = function invalidateContaining(keyPart) {
2412
+ if (typeof keyPart !== "string" || keyPart === "") {
2413
+ throw new Error("Trying to invalidate containing wrong key or empty key: " + keyPart);
2414
+ }
2415
+ try {
2416
+ var matchedKeys = Array.from(this._cache.keys()).filter(function (key) {
2417
+ return typeof key === "string" && new RegExp(keyPart).test(key);
2418
+ });
2419
+ for (var i = 0; i < matchedKeys.length; ++i) {
2420
+ this._cache["delete"](matchedKeys[i]);
2421
+ }
2422
+ } catch (e) {
2423
+ improveAndRethrow(e, "invalidateContaining");
2424
+ }
2425
+ };
2426
+ _proto.clear = function clear() {
2427
+ this._cache.clear();
2428
+ this._sessionDependentDataKeys = [];
2429
+ }
2430
+
2431
+ /**
2432
+ * Saves given data string to persistent cache.
2433
+ * NOTE: we have no TTL here, implement if needed.
2434
+ *
2435
+ * WARNING: use only when really needed and don't store big data as we use localStorage
2436
+ * under the hood and its capacity is restricted.
2437
+ *
2438
+ * @param uniqueKey {string} the key should be unique
2439
+ * @param data {string} only string data allowed
2440
+ */;
2441
+ _proto.putClientPersistentData = function putClientPersistentData(uniqueKey, data) {
2442
+ try {
2443
+ if (typeof window !== "undefined") {
2444
+ localStorage.setItem(uniqueKey, data);
2445
+ }
2446
+ } catch (e) {
2447
+ improveAndRethrow(e, "cache.putClientPersistentData");
2448
+ }
2449
+ }
2450
+
2451
+ /**
2452
+ * @param uniqueKey {string}
2453
+ * @return {string|null}
2454
+ */;
2455
+ _proto.getClientPersistentData = function getClientPersistentData(uniqueKey) {
2456
+ try {
2457
+ if (typeof window !== "undefined") {
2458
+ return localStorage.getItem(uniqueKey);
2459
+ }
2460
+ return null;
2461
+ } catch (e) {
2462
+ improveAndRethrow(e, "cache.getClientPersistentData");
2463
+ }
2464
+ }
2465
+
2466
+ /**
2467
+ * Only makes effect if the TTL is not null.
2468
+ *
2469
+ * @param key {string}
2470
+ * @param ttlMs {number|null}
2471
+ */;
2472
+ _proto.markCacheItemAsExpiredButDontRemove = function markCacheItemAsExpiredButDontRemove(key, ttlMs) {
2473
+ if (ttlMs === void 0) {
2474
+ ttlMs = null;
2475
+ }
2476
+ try {
2477
+ var _ttlMs;
2478
+ var item = this._cache.get(key);
2479
+ var ttlFinalMs = (_ttlMs = ttlMs) != null ? _ttlMs : item == null ? void 0 : item.ttlMs;
2480
+ if (item != null && ttlFinalMs) {
2481
+ this._cache.set(key, {
2482
+ data: item.data,
2483
+ addedMsTimestamp: Date.now() - ttlFinalMs - 1,
2484
+ ttlMs: ttlFinalMs
2485
+ });
2486
+ }
2487
+ } catch (e) {
2488
+ improveAndRethrow(e, "cache.markCacheItemAsExpiredButDontRemove");
2489
+ }
2490
+ };
2491
+ return Cache;
2492
+ }();
2493
+
2494
+ var ExistingSwap =
2495
+ /**
2496
+ * @param swapId {string}
2497
+ * @param status {SwapProvider.SWAP_STATUSES}
2498
+ * @param createdAt {number}
2499
+ * @param expiresAt {number}
2500
+ * @param confirmations {number}
2501
+ * @param rate {string}
2502
+ * @param refundAddress {string}
2503
+ * @param fromCoin {Coin}
2504
+ * @param fromAmount {string}
2505
+ * @param fromTransactionId {string}
2506
+ * @param toCoin {Coin}
2507
+ * @param toAmount {string}
2508
+ * @param toTransactionId {string|null}
2509
+ * @param toAddress {string}
2510
+ * @param partner {string}
2511
+ */
2512
+ function ExistingSwap(swapId, status, createdAt, expiresAt, confirmations, rate, refundAddress, payToAddress, fromCoin, fromAmount, fromTransactionId, fromTransactionLink, toCoin, toAmount, toTransactionId, toTransactionLink, toAddress,
2513
+ // TODO: [refactoring, moderate] toAddress is not quite clear. How about recipientAddress? task_id=0815a111c99543b78d374217eadbde4f
2514
+ partner) {
2515
+ this.swapId = swapId;
2516
+ this.status = status;
2517
+ this.createdAt = createdAt;
2518
+ this.expiresAt = expiresAt;
2519
+ this.confirmations = confirmations;
2520
+ this.rate = rate;
2521
+ this.refundAddress = refundAddress;
2522
+ this.payToAddress = payToAddress;
2523
+ this.fromCoin = fromCoin;
2524
+ this.fromTransactionId = fromTransactionId;
2525
+ this.fromAmount = fromAmount;
2526
+ this.fromTransactionLink = fromTransactionLink;
2527
+ this.toCoin = toCoin;
2528
+ this.toTransactionId = toTransactionId;
2529
+ this.toTransactionLink = toTransactionLink;
2530
+ this.toAmount = toAmount;
2531
+ this.toAddress = toAddress;
2532
+ this.partner = partner;
2533
+ };
2534
+
2535
+ var SwapProvider = /*#__PURE__*/function () {
2536
+ function SwapProvider() {}
2537
+ var _proto = SwapProvider.prototype;
2538
+ /**
2539
+ * @return {Promise<void>}
2540
+ */
2541
+ _proto.initialize = function initialize() {
2542
+ try {
2543
+ throw new Error("Not implemented in base");
2544
+ } catch (e) {
2545
+ return Promise.reject(e);
2546
+ }
2547
+ }
2548
+ /**
2549
+ * @return {number} milliseconds TTL
2550
+ */
2551
+ ;
2552
+ _proto.getSwapCreationInfoTtlMs = function getSwapCreationInfoTtlMs() {
2553
+ throw new Error("Not implemented in base");
2554
+ }
2555
+
2556
+ /**
2557
+ * Retrieves all deposit currencies supported by this swap provider.
2558
+ * Returns one of SwapProvider.COMMON_ERRORS in case of processable fail.
2559
+ *
2560
+ * @return {Promise<({ result: true, coins: Coin[] }|{ result: false, reason: string })>}
2561
+ */;
2562
+ _proto.getDepositCurrencies = function getDepositCurrencies() {
2563
+ try {
2564
+ throw new Error("Not implemented in base");
2565
+ } catch (e) {
2566
+ return Promise.reject(e);
2567
+ }
2568
+ }
2569
+ /**
2570
+ * Retrieves all withdrawable currencies supported by this swap provider.
2571
+ * Returns one of SwapProvider.COMMON_ERRORS in case of processable fail.
2572
+ *
2573
+ * @param [exceptCurrency=null] {Coin|null}
2574
+ * @return {Promise<({ result: true, coins: Coin[] }|{ result: false, reason: string })>}
2575
+ */
2576
+ ;
2577
+ _proto.getWithdrawalCurrencies = function getWithdrawalCurrencies(exceptCurrency) {
2578
+ try {
2579
+ throw new Error("Not implemented in base");
2580
+ } catch (e) {
2581
+ return Promise.reject(e);
2582
+ }
2583
+ }
2584
+ /**
2585
+ * Retrieves URL for coin icon or fallback if not found.
2586
+ *
2587
+ * @param coin {Coin|string} coin or rabbit-format of coin ticker
2588
+ * @return {string}
2589
+ */
2590
+ ;
2591
+ _proto.getIconUrl = function getIconUrl(coin) {
2592
+ throw new Error("Not implemented in base");
2593
+ }
2594
+
2595
+ /**
2596
+ * Retrieves coin to USDT rate.
2597
+ *
2598
+ * @param coin {Coin}
2599
+ * @return {{result: true, rate: string}|{result: false}}
2600
+ */;
2601
+ _proto.getCoinToUSDTRate = function getCoinToUSDTRate(coin) {
2602
+ try {
2603
+ throw new Error("Not implemented in base");
2604
+ } catch (e) {
2605
+ return Promise.reject(e);
2606
+ }
2607
+ }
2608
+ /**
2609
+ * Retrieves estimation for swapping giving coins amount.
2610
+ * null min or max signals there is no corresponding limitation. undefined means that the limits were not retrieved.
2611
+ * For fail result on of SwapProvider.NO_SWAPS_REASONS or SwapProvider.COMMON_ERRORS reasons will be returned.
2612
+ *
2613
+ * @param fromCoin {Coin}
2614
+ * @param toCoin {Coin}
2615
+ * @param amountCoins {string}
2616
+ * @param [fromCoinToUsdRate=null] pass if you want to increase the min amount returned
2617
+ * by provider with some fixed "insurance" amount to cover min amount fluctuations.
2618
+ * @return {Promise<({
2619
+ * result: false,
2620
+ * reason: string,
2621
+ * smallestMin: (string|null|undefined),
2622
+ * greatestMax: (string|null|undefined),
2623
+ * }|{
2624
+ * result: true,
2625
+ * min: (string|null),
2626
+ * max: (string|null),
2627
+ * smallestMin: (string|null),
2628
+ * greatestMax: (string|null),
2629
+ * rate: (string|null),
2630
+ * durationMinutesRange: string,
2631
+ * [rawSwapData]: Object
2632
+ * })>}
2633
+ */
2634
+ ;
2635
+ _proto.getSwapInfo = function getSwapInfo(fromCoin, toCoin, amountCoins, fromCoinToUsdRate) {
2636
+ try {
2637
+ throw new Error("Not implemented in base");
2638
+ } catch (e) {
2639
+ return Promise.reject(e);
2640
+ }
2641
+ }
2642
+ /**
2643
+ * For fail result we return one of SwapProvider.CREATION_FAIL_REASONS or SwapProvider.COMMON_ERRORS.
2644
+ *
2645
+ * @param fromCoin {Coin}
2646
+ * @param toCoin {Coin}
2647
+ * @param amount {string}
2648
+ * @param toAddress {string}
2649
+ * @param refundAddress {string}
2650
+ * @param rawSwapData {Object|null}
2651
+ * @param clientIpAddress {string}
2652
+ * @return {Promise<({
2653
+ * result: true,
2654
+ * swapId: string,
2655
+ * fromCoin: Coin,
2656
+ * fromAmount: string,
2657
+ * fromAddress: string,
2658
+ * toCoin: Coin,
2659
+ * toAmount: string,
2660
+ * toAddress: string,
2661
+ * rate: string
2662
+ * }|{
2663
+ * result: false,
2664
+ * reason: string,
2665
+ * partner: string
2666
+ * })>}
2667
+ */
2668
+ ;
2669
+ _proto.createSwap = function createSwap(fromCoin, toCoin, amount, toAddress, refundAddress, rawSwapData, clientIpAddress) {
2670
+ try {
2671
+ throw new Error("Not implemented in base");
2672
+ } catch (e) {
2673
+ return Promise.reject(e);
2674
+ }
2675
+ }
2676
+ /**
2677
+ * Retrieves details and status for swaps by given ids.
2678
+ * If some swap is not found by id then there is no item in return list.
2679
+ *
2680
+ * @param swapIds {string[]}
2681
+ * @return {Promise<{result: false, reason: string}|{result:true, swaps: ExistingSwap[]}>}
2682
+ */
2683
+ ;
2684
+ _proto.getExistingSwapsDetailsAndStatus = function getExistingSwapsDetailsAndStatus(swapIds) {
2685
+ try {
2686
+ throw new Error("Not implemented in base");
2687
+ } catch (e) {
2688
+ return Promise.reject(e);
2689
+ }
2690
+ }
2691
+ /**
2692
+ * @param ticker {string}
2693
+ * @return {Coin|null}
2694
+ */
2695
+ ;
2696
+ _proto.getCoinByTickerIfPresent = function getCoinByTickerIfPresent(ticker) {
2697
+ throw new Error("Not implemented in base");
2698
+ }
2699
+
2700
+ /**
2701
+ * @param asset {Coin}
2702
+ * @param address {string}
2703
+ * @return {boolean}
2704
+ */;
2705
+ _proto.isAddressValidForAsset = function isAddressValidForAsset(asset, address) {
2706
+ throw new Error("Not implemented in base");
2707
+ };
2708
+ return SwapProvider;
2709
+ }();
2710
+ SwapProvider.COMMON_ERRORS = {
2711
+ REQUESTS_LIMIT_EXCEEDED: "requestsLimitExceeded"
2712
+ };
2713
+ SwapProvider.NO_SWAPS_REASONS = {
2714
+ TOO_LOW: "tooLow",
2715
+ TOO_HIGH: "tooHigh",
2716
+ NOT_SUPPORTED: "notSupported"
2717
+ };
2718
+ SwapProvider.CREATION_FAIL_REASONS = {
2719
+ RETRIABLE_FAIL: "retriableFail"
2720
+ };
2721
+ SwapProvider.SWAP_STATUSES = {
2722
+ WAITING_FOR_PAYMENT: "waiting_for_payment",
2723
+ // public +
2724
+ CONFIRMING: "confirming",
2725
+ PAYMENT_RECEIVED: "payment_received",
2726
+ // public +
2727
+ EXCHANGING: "exchanging",
2728
+ // session full // public +
2729
+ COMPLETED: "completed",
2730
+ // session full // public +
2731
+ REFUNDED: "refunded",
2732
+ // session full // public +
2733
+ EXPIRED: "expired",
2734
+ // public +
2735
+ FAILED: "failed" // public +
2736
+ };
2737
+
2738
+ exports.AmountUtils = AmountUtils;
2739
+ exports.AssetIcon = AssetIcon;
2740
+ exports.Blockchain = Blockchain;
2741
+ exports.Button = Button;
2742
+ exports.Cache = Cache;
2743
+ exports.Coin = Coin;
2744
+ exports.ExistingSwap = ExistingSwap;
2745
+ exports.FiatCurrenciesService = FiatCurrenciesService;
2746
+ exports.LoadingDots = LoadingDots;
2747
+ exports.Logger = Logger;
2748
+ exports.LogsStorage = LogsStorage;
2749
+ exports.Protocol = Protocol;
2750
+ exports.SupportChat = SupportChat;
2751
+ exports.SwapProvider = SwapProvider;
2752
+ exports.improveAndRethrow = improveAndRethrow;
2753
+ exports.safeStringify = safeStringify;
2754
+ //# sourceMappingURL=index.cjs.map