@shipengine/elements 0.21.2 → 0.21.4

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 (133) hide show
  1. package/index.cjs +787 -1056
  2. package/index.js +694 -954
  3. package/package.json +2 -6
  4. package/src/components/error-fallback/error-fallback.d.ts +9 -0
  5. package/src/components/error-fallback/index.d.ts +1 -0
  6. package/src/components/field/money-input/hooks/use-utils.d.ts +1 -1
  7. package/src/components/field/money-input/money-input.d.ts +1 -1
  8. package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  9. package/src/components/field/rate-card/rate-card.d.ts +1 -2
  10. package/src/components/history/history-card/history-card.d.ts +1 -1
  11. package/src/components/index.d.ts +1 -1
  12. package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
  13. package/src/components/label-layout/label-layout-purchase.d.ts +1 -1
  14. package/src/components/label-layout/label-layout-settings.d.ts +1 -1
  15. package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +1 -1
  16. package/src/components/templates/address-display/address-display.d.ts +1 -1
  17. package/src/components/templates/address-form/address-form.d.ts +1 -1
  18. package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  19. package/src/components/templates/address-preference-select/address-preference-select.d.ts +1 -1
  20. package/src/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
  21. package/src/components/templates/carrier-terms-form/carrier-terms-form.d.ts +1 -1
  22. package/src/components/templates/customs-item-form/customs-item-form.d.ts +1 -1
  23. package/src/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
  24. package/src/components/templates/label/label.d.ts +1 -1
  25. package/src/components/templates/list-carriers/list-carriers.d.ts +2 -2
  26. package/src/components/templates/list-carriers-row/list-carriers-row.d.ts +2 -2
  27. package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +1 -1
  28. package/src/components/templates/onboarding/onboarding.d.ts +1 -1
  29. package/src/components/templates/rate-form/rate-form.d.ts +1 -1
  30. package/src/components/templates/shipment/shipment.d.ts +1 -1
  31. package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
  32. package/src/components/templates/shipment-form/shipment-schema.d.ts +1 -1
  33. package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
  34. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
  35. package/src/components/templates/void-label/void-label.d.ts +1 -1
  36. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  37. package/src/components/templates/wallet-form/wallet-form.d.ts +1 -1
  38. package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
  39. package/src/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
  40. package/src/components/templates/warehouse-form/warehouse-form.d.ts +1 -1
  41. package/src/elements/{components/configure-shipment → configure-shipment}/configure-shipment.d.ts +3 -3
  42. package/src/elements/{components/configure-shipment → configure-shipment}/hooks/use-address.d.ts +3 -3
  43. package/src/elements/{components/configure-shipment → configure-shipment}/hooks/use-customs.d.ts +1 -1
  44. package/src/elements/{components/configure-shipment → configure-shipment}/hooks/use-presets.d.ts +2 -2
  45. package/src/elements/{components/configure-shipment → configure-shipment}/hooks/use-rates-form.d.ts +1 -1
  46. package/src/elements/{components/configure-shipment → configure-shipment}/hooks/use-request-rates.d.ts +1 -1
  47. package/src/elements/{components/configure-shipment → configure-shipment}/hooks/use-shipment-form.d.ts +5 -5
  48. package/src/elements/index.d.ts +6 -6
  49. package/src/elements/{components/list-carriers → list-carriers}/hooks/use-list-connected-carriers.d.ts +3 -3
  50. package/src/elements/list-carriers/index.d.ts +1 -0
  51. package/src/elements/list-carriers/list-carriers.d.ts +578 -0
  52. package/src/elements/manage-warehouses/index.d.ts +1 -0
  53. package/src/elements/manage-warehouses/manage-warehouses.d.ts +582 -0
  54. package/src/elements/onboarding/index.d.ts +1 -0
  55. package/src/elements/onboarding/onboarding.d.ts +581 -0
  56. package/src/elements/{components/purchase-label → purchase-label}/hooks/use-configure-shipment.d.ts +1 -1
  57. package/src/elements/{components/purchase-label → purchase-label}/hooks/use-import-sales-order.d.ts +2 -2
  58. package/src/elements/{components/purchase-label → purchase-label}/hooks/use-load-shipment.d.ts +3 -3
  59. package/src/elements/{components/purchase-label → purchase-label}/hooks/use-pending-shipment.d.ts +1 -1
  60. package/src/elements/purchase-label/index.d.ts +1 -0
  61. package/src/elements/{components/purchase-label → purchase-label}/purchase-label-by-sales-order.d.ts +1 -1
  62. package/src/elements/purchase-label/purchase-label.d.ts +584 -0
  63. package/src/elements/view-shipment/index.d.ts +1 -0
  64. package/src/elements/view-shipment/view-shipment.d.ts +590 -0
  65. package/src/elements/void-label/index.d.ts +1 -0
  66. package/src/elements/void-label/void-label.d.ts +585 -0
  67. package/src/factories/shipengine/address.d.ts +1 -1
  68. package/src/factories/shipengine/carrier.d.ts +1 -1
  69. package/src/factories/shipengine/label.d.ts +1 -1
  70. package/src/factories/shipengine/money.d.ts +1 -1
  71. package/src/factories/shipengine/order-source.d.ts +1 -1
  72. package/src/factories/shipengine/package.d.ts +1 -1
  73. package/src/factories/shipengine/resource.d.ts +1 -1
  74. package/src/factories/shipengine/sales-order.d.ts +1 -1
  75. package/src/factories/shipengine/service.d.ts +1 -1
  76. package/src/factories/shipengine/shipment.d.ts +1 -1
  77. package/src/factories/shipengine/wallet-history.d.ts +1 -1
  78. package/src/factories/shipengine/warehouse.d.ts +1 -1
  79. package/src/factories/shipengine/weight.d.ts +1 -1
  80. package/src/hooks/index.d.ts +0 -1
  81. package/src/hooks/options/use-confirmation-options.d.ts +1 -1
  82. package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
  83. package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  84. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  85. package/src/hooks/options/use-package-options.d.ts +1 -1
  86. package/src/hooks/options/use-rate-options.d.ts +1 -1
  87. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  88. package/src/hooks/options/use-warehouse-options.d.ts +1 -1
  89. package/src/hooks/use-address-validation.d.ts +1 -1
  90. package/src/hooks/use-carrier-metadata.d.ts +1 -1
  91. package/src/hooks/use-elements.d.ts +1 -1
  92. package/src/hooks/use-scrub-errors.d.ts +1 -1
  93. package/src/index.d.ts +0 -2
  94. package/src/mocks/carriers/handlers.d.ts +1 -1
  95. package/src/mocks/warehouses/handlers.d.ts +1 -1
  96. package/src/schemas/shipengine/money.d.ts +1 -1
  97. package/src/types/carrier-metadata.d.ts +1 -1
  98. package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
  99. package/src/utilities/money.d.ts +1 -1
  100. package/src/utilities/rates.d.ts +1 -1
  101. package/src/utilities/shipengine/address.d.ts +1 -1
  102. package/src/utilities/shipengine/dimensions.d.ts +1 -1
  103. package/src/utilities/shipengine/sales-order.d.ts +1 -1
  104. package/src/utilities/shipengine/shipment.d.ts +1 -1
  105. package/src/utilities/shipengine/weight.d.ts +1 -1
  106. package/src/components/error-boundary/error-boundary.d.ts +0 -31
  107. package/src/components/error-boundary/index.d.ts +0 -1
  108. package/src/elements/components/index.d.ts +0 -7
  109. package/src/elements/components/list-carriers/index.d.ts +0 -1
  110. package/src/elements/components/list-carriers/list-carriers.d.ts +0 -1
  111. package/src/elements/components/manage-warehouses/index.d.ts +0 -1
  112. package/src/elements/components/manage-warehouses/manage-warehouses.d.ts +0 -5
  113. package/src/elements/components/onboarding/index.d.ts +0 -1
  114. package/src/elements/components/onboarding/onboarding.d.ts +0 -4
  115. package/src/elements/components/purchase-label/index.d.ts +0 -3
  116. package/src/elements/components/purchase-label/purchase-label.d.ts +0 -6
  117. package/src/elements/components/shipment/index.d.ts +0 -1
  118. package/src/elements/components/shipment/shipment.d.ts +0 -13
  119. package/src/elements/components/void-label/index.d.ts +0 -1
  120. package/src/elements/components/void-label/void-label.d.ts +0 -8
  121. package/src/elements/list-carriers.d.ts +0 -1
  122. package/src/elements/manage-warehouses.d.ts +0 -1
  123. package/src/elements/onboarding.d.ts +0 -1
  124. package/src/elements/purchase-label.d.ts +0 -3
  125. package/src/elements/view-shipment.d.ts +0 -1
  126. package/src/elements/void-label.d.ts +0 -1
  127. package/src/providers/giger-provider.d.ts +0 -8
  128. package/src/providers/index.d.ts +0 -1
  129. package/src/register.d.ts +0 -16
  130. /package/src/elements/{components/configure-shipment → configure-shipment}/hooks/index.d.ts +0 -0
  131. /package/src/elements/{components/configure-shipment → configure-shipment}/index.d.ts +0 -0
  132. /package/src/elements/{components/purchase-label → purchase-label}/hooks/index.d.ts +0 -0
  133. /package/src/elements/{components/purchase-label → purchase-label}/purchase-label-by-shipment.d.ts +0 -0
package/index.cjs CHANGED
@@ -7,7 +7,7 @@ var reactHookForm = require('react-hook-form');
7
7
  var reactI18next = require('react-i18next');
8
8
  var giger = require('@packlink/giger');
9
9
  var axios = require('axios');
10
- var reactApi = require('@shipengine/react-api');
10
+ var alchemy = require('@shipengine/alchemy');
11
11
  var zod$1 = require('@hookform/resolvers/zod');
12
12
  var zod = require('zod');
13
13
  var React = require('react');
@@ -16,19 +16,13 @@ var humps = require('humps');
16
16
  var ReactDatePicker = require('react-datepicker');
17
17
  var gigerTheme = require('@packlink/giger-theme');
18
18
  var css = require('@emotion/css');
19
- var jsApi = require('@shipengine/js-api');
20
19
  var _$2 = require('lodash');
21
20
  var reactDom = require('react-dom');
22
- var min$4 = require('libphonenumber-js/min');
21
+ var min$3 = require('libphonenumber-js/min');
23
22
  var jsBase64 = require('js-base64');
24
23
  var cardValidator = require('card-validator');
25
24
  var reactQuery = require('react-query');
26
25
  var brands = require('@packlink/brands');
27
- var createCache = require('@emotion/cache');
28
- var memoize = require('@emotion/memoize');
29
- var i18n = require('i18next');
30
- var languageDetector = require('i18next-browser-languagedetector');
31
- var stylis = require('stylis');
32
26
 
33
27
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
34
28
 
@@ -51,14 +45,11 @@ function _interopNamespace(e) {
51
45
  }
52
46
 
53
47
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
48
+ var alchemy__default = /*#__PURE__*/_interopDefaultLegacy(alchemy);
54
49
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
55
50
  var ReactDatePicker__default = /*#__PURE__*/_interopDefaultLegacy(ReactDatePicker);
56
51
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_$2);
57
52
  var cardValidator__default = /*#__PURE__*/_interopDefaultLegacy(cardValidator);
58
- var createCache__default = /*#__PURE__*/_interopDefaultLegacy(createCache);
59
- var memoize__default = /*#__PURE__*/_interopDefaultLegacy(memoize);
60
- var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
61
- var languageDetector__default = /*#__PURE__*/_interopDefaultLegacy(languageDetector);
62
53
 
63
54
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
64
55
 
@@ -79,7 +70,7 @@ var global$p =
79
70
 
80
71
  var objectGetOwnPropertyDescriptor = {};
81
72
 
82
- var fails$r = function (exec) {
73
+ var fails$q = function (exec) {
83
74
  try {
84
75
  return !!exec();
85
76
  } catch (error) {
@@ -87,17 +78,17 @@ var fails$r = function (exec) {
87
78
  }
88
79
  };
89
80
 
90
- var fails$q = fails$r;
81
+ var fails$p = fails$q;
91
82
 
92
83
  // Detect IE8's incomplete defineProperty implementation
93
- var descriptors = !fails$q(function () {
84
+ var descriptors = !fails$p(function () {
94
85
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
95
86
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
96
87
  });
97
88
 
98
- var fails$p = fails$r;
89
+ var fails$o = fails$q;
99
90
 
100
- var functionBindNative = !fails$p(function () {
91
+ var functionBindNative = !fails$o(function () {
101
92
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
102
93
  var test = (function () { /* empty */ }).bind();
103
94
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -116,15 +107,15 @@ var objectPropertyIsEnumerable = {};
116
107
 
117
108
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
118
109
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
119
- var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
110
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
120
111
 
121
112
  // Nashorn ~ JDK8 bug
122
- var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
113
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
123
114
 
124
115
  // `Object.prototype.propertyIsEnumerable` method implementation
125
116
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
126
117
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
127
- var descriptor = getOwnPropertyDescriptor$3(this, V);
118
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
128
119
  return !!descriptor && descriptor.enumerable;
129
120
  } : $propertyIsEnumerable;
130
121
 
@@ -149,24 +140,24 @@ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
149
140
  };
150
141
  };
151
142
 
152
- var uncurryThis$r = functionUncurryThis;
143
+ var uncurryThis$q = functionUncurryThis;
153
144
 
154
- var toString$e = uncurryThis$r({}.toString);
155
- var stringSlice$7 = uncurryThis$r(''.slice);
145
+ var toString$d = uncurryThis$q({}.toString);
146
+ var stringSlice$6 = uncurryThis$q(''.slice);
156
147
 
157
148
  var classofRaw$2 = function (it) {
158
- return stringSlice$7(toString$e(it), 8, -1);
149
+ return stringSlice$6(toString$d(it), 8, -1);
159
150
  };
160
151
 
161
- var uncurryThis$q = functionUncurryThis;
162
- var fails$o = fails$r;
152
+ var uncurryThis$p = functionUncurryThis;
153
+ var fails$n = fails$q;
163
154
  var classof$8 = classofRaw$2;
164
155
 
165
156
  var $Object$4 = Object;
166
- var split = uncurryThis$q(''.split);
157
+ var split = uncurryThis$p(''.split);
167
158
 
168
159
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
169
- var indexedObject = fails$o(function () {
160
+ var indexedObject = fails$n(function () {
170
161
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
171
162
  // eslint-disable-next-line no-prototype-builtins -- safe
172
163
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -186,17 +177,17 @@ var $TypeError$h = TypeError;
186
177
 
187
178
  // `RequireObjectCoercible` abstract operation
188
179
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
189
- var requireObjectCoercible$9 = function (it) {
180
+ var requireObjectCoercible$8 = function (it) {
190
181
  if (isNullOrUndefined$5(it)) throw $TypeError$h("Can't call method on " + it);
191
182
  return it;
192
183
  };
193
184
 
194
185
  // toObject with fallback for non-array-like ES3 strings
195
186
  var IndexedObject$2 = indexedObject;
196
- var requireObjectCoercible$8 = requireObjectCoercible$9;
187
+ var requireObjectCoercible$7 = requireObjectCoercible$8;
197
188
 
198
189
  var toIndexedObject$5 = function (it) {
199
- return IndexedObject$2(requireObjectCoercible$8(it));
190
+ return IndexedObject$2(requireObjectCoercible$7(it));
200
191
  };
201
192
 
202
193
  var documentAll$2 = typeof document == 'object' && document.all;
@@ -215,41 +206,41 @@ var documentAll$1 = $documentAll$1.all;
215
206
 
216
207
  // `IsCallable` abstract operation
217
208
  // https://tc39.es/ecma262/#sec-iscallable
218
- var isCallable$o = $documentAll$1.IS_HTMLDDA ? function (argument) {
209
+ var isCallable$n = $documentAll$1.IS_HTMLDDA ? function (argument) {
219
210
  return typeof argument == 'function' || argument === documentAll$1;
220
211
  } : function (argument) {
221
212
  return typeof argument == 'function';
222
213
  };
223
214
 
224
- var isCallable$n = isCallable$o;
215
+ var isCallable$m = isCallable$n;
225
216
  var $documentAll = documentAll_1;
226
217
 
227
218
  var documentAll = $documentAll.all;
228
219
 
229
220
  var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
230
- return typeof it == 'object' ? it !== null : isCallable$n(it) || it === documentAll;
221
+ return typeof it == 'object' ? it !== null : isCallable$m(it) || it === documentAll;
231
222
  } : function (it) {
232
- return typeof it == 'object' ? it !== null : isCallable$n(it);
223
+ return typeof it == 'object' ? it !== null : isCallable$m(it);
233
224
  };
234
225
 
235
226
  var global$o = global$p;
236
- var isCallable$m = isCallable$o;
227
+ var isCallable$l = isCallable$n;
237
228
 
238
229
  var aFunction = function (argument) {
239
- return isCallable$m(argument) ? argument : undefined;
230
+ return isCallable$l(argument) ? argument : undefined;
240
231
  };
241
232
 
242
- var getBuiltIn$9 = function (namespace, method) {
233
+ var getBuiltIn$8 = function (namespace, method) {
243
234
  return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
244
235
  };
245
236
 
246
- var uncurryThis$p = functionUncurryThis;
237
+ var uncurryThis$o = functionUncurryThis;
247
238
 
248
- var objectIsPrototypeOf = uncurryThis$p({}.isPrototypeOf);
239
+ var objectIsPrototypeOf = uncurryThis$o({}.isPrototypeOf);
249
240
 
250
- var getBuiltIn$8 = getBuiltIn$9;
241
+ var getBuiltIn$7 = getBuiltIn$8;
251
242
 
252
- var engineUserAgent = getBuiltIn$8('navigator', 'userAgent') || '';
243
+ var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
253
244
 
254
245
  var global$n = global$p;
255
246
  var userAgent$5 = engineUserAgent;
@@ -282,10 +273,10 @@ var engineV8Version = version;
282
273
  /* eslint-disable es/no-symbol -- required for testing */
283
274
 
284
275
  var V8_VERSION$1 = engineV8Version;
285
- var fails$n = fails$r;
276
+ var fails$m = fails$q;
286
277
 
287
278
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
288
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$n(function () {
279
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$m(function () {
289
280
  var symbol = Symbol();
290
281
  // Chrome 38 Symbol has incorrect toString conversion
291
282
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -302,8 +293,8 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
302
293
  && !Symbol.sham
303
294
  && typeof Symbol.iterator == 'symbol';
304
295
 
305
- var getBuiltIn$7 = getBuiltIn$9;
306
- var isCallable$l = isCallable$o;
296
+ var getBuiltIn$6 = getBuiltIn$8;
297
+ var isCallable$k = isCallable$n;
307
298
  var isPrototypeOf$4 = objectIsPrototypeOf;
308
299
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
309
300
 
@@ -312,8 +303,8 @@ var $Object$3 = Object;
312
303
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
313
304
  return typeof it == 'symbol';
314
305
  } : function (it) {
315
- var $Symbol = getBuiltIn$7('Symbol');
316
- return isCallable$l($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$3(it));
306
+ var $Symbol = getBuiltIn$6('Symbol');
307
+ return isCallable$k($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$3(it));
317
308
  };
318
309
 
319
310
  var $String$4 = String;
@@ -326,14 +317,14 @@ var tryToString$5 = function (argument) {
326
317
  }
327
318
  };
328
319
 
329
- var isCallable$k = isCallable$o;
320
+ var isCallable$j = isCallable$n;
330
321
  var tryToString$4 = tryToString$5;
331
322
 
332
323
  var $TypeError$g = TypeError;
333
324
 
334
325
  // `Assert: IsCallable(argument) is true`
335
326
  var aCallable$a = function (argument) {
336
- if (isCallable$k(argument)) return argument;
327
+ if (isCallable$j(argument)) return argument;
337
328
  throw $TypeError$g(tryToString$4(argument) + ' is not a function');
338
329
  };
339
330
 
@@ -348,7 +339,7 @@ var getMethod$5 = function (V, P) {
348
339
  };
349
340
 
350
341
  var call$h = functionCall;
351
- var isCallable$j = isCallable$o;
342
+ var isCallable$i = isCallable$n;
352
343
  var isObject$9 = isObject$a;
353
344
 
354
345
  var $TypeError$f = TypeError;
@@ -357,9 +348,9 @@ var $TypeError$f = TypeError;
357
348
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
358
349
  var ordinaryToPrimitive$1 = function (input, pref) {
359
350
  var fn, val;
360
- if (pref === 'string' && isCallable$j(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
361
- if (isCallable$j(fn = input.valueOf) && !isObject$9(val = call$h(fn, input))) return val;
362
- if (pref !== 'string' && isCallable$j(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
351
+ if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
352
+ if (isCallable$i(fn = input.valueOf) && !isObject$9(val = call$h(fn, input))) return val;
353
+ if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
363
354
  throw $TypeError$f("Can't convert object to primitive value");
364
355
  };
365
356
 
@@ -398,36 +389,36 @@ var store$2 = sharedStore;
398
389
  source: 'https://github.com/zloirock/core-js'
399
390
  });
400
391
 
401
- var requireObjectCoercible$7 = requireObjectCoercible$9;
392
+ var requireObjectCoercible$6 = requireObjectCoercible$8;
402
393
 
403
394
  var $Object$2 = Object;
404
395
 
405
396
  // `ToObject` abstract operation
406
397
  // https://tc39.es/ecma262/#sec-toobject
407
- var toObject$8 = function (argument) {
408
- return $Object$2(requireObjectCoercible$7(argument));
398
+ var toObject$7 = function (argument) {
399
+ return $Object$2(requireObjectCoercible$6(argument));
409
400
  };
410
401
 
411
- var uncurryThis$o = functionUncurryThis;
412
- var toObject$7 = toObject$8;
402
+ var uncurryThis$n = functionUncurryThis;
403
+ var toObject$6 = toObject$7;
413
404
 
414
- var hasOwnProperty = uncurryThis$o({}.hasOwnProperty);
405
+ var hasOwnProperty = uncurryThis$n({}.hasOwnProperty);
415
406
 
416
407
  // `HasOwnProperty` abstract operation
417
408
  // https://tc39.es/ecma262/#sec-hasownproperty
418
409
  // eslint-disable-next-line es/no-object-hasown -- safe
419
410
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
420
- return hasOwnProperty(toObject$7(it), key);
411
+ return hasOwnProperty(toObject$6(it), key);
421
412
  };
422
413
 
423
- var uncurryThis$n = functionUncurryThis;
414
+ var uncurryThis$m = functionUncurryThis;
424
415
 
425
416
  var id = 0;
426
417
  var postfix = Math.random();
427
- var toString$d = uncurryThis$n(1.0.toString);
418
+ var toString$c = uncurryThis$m(1.0.toString);
428
419
 
429
420
  var uid$2 = function (key) {
430
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$d(++id + postfix, 36);
421
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$c(++id + postfix, 36);
431
422
  };
432
423
 
433
424
  var global$k = global$p;
@@ -503,11 +494,11 @@ var documentCreateElement$2 = function (it) {
503
494
  };
504
495
 
505
496
  var DESCRIPTORS$b = descriptors;
506
- var fails$m = fails$r;
497
+ var fails$l = fails$q;
507
498
  var createElement$1 = documentCreateElement$2;
508
499
 
509
500
  // Thanks to IE8 for its funny defineProperty
510
- var ie8DomDefine = !DESCRIPTORS$b && !fails$m(function () {
501
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$l(function () {
511
502
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
512
503
  return Object.defineProperty(createElement$1('div'), 'a', {
513
504
  get: function () { return 7; }
@@ -540,11 +531,11 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$a ? $getOwnPropertyDescriptor$1 :
540
531
  var objectDefineProperty = {};
541
532
 
542
533
  var DESCRIPTORS$9 = descriptors;
543
- var fails$l = fails$r;
534
+ var fails$k = fails$q;
544
535
 
545
536
  // V8 ~ Chrome 36-
546
537
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
547
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$l(function () {
538
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$k(function () {
548
539
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
549
540
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
550
541
  value: 42,
@@ -638,14 +629,14 @@ var functionName = {
638
629
  CONFIGURABLE: CONFIGURABLE
639
630
  };
640
631
 
641
- var uncurryThis$m = functionUncurryThis;
642
- var isCallable$i = isCallable$o;
632
+ var uncurryThis$l = functionUncurryThis;
633
+ var isCallable$h = isCallable$n;
643
634
  var store$1 = sharedStore;
644
635
 
645
- var functionToString = uncurryThis$m(Function.toString);
636
+ var functionToString = uncurryThis$l(Function.toString);
646
637
 
647
638
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
648
- if (!isCallable$i(store$1.inspectSource)) {
639
+ if (!isCallable$h(store$1.inspectSource)) {
649
640
  store$1.inspectSource = function (it) {
650
641
  return functionToString(it);
651
642
  };
@@ -654,11 +645,11 @@ if (!isCallable$i(store$1.inspectSource)) {
654
645
  var inspectSource$3 = store$1.inspectSource;
655
646
 
656
647
  var global$i = global$p;
657
- var isCallable$h = isCallable$o;
648
+ var isCallable$g = isCallable$n;
658
649
 
659
650
  var WeakMap$1 = global$i.WeakMap;
660
651
 
661
- var weakMapBasicDetection = isCallable$h(WeakMap$1) && /native code/.test(String(WeakMap$1));
652
+ var weakMapBasicDetection = isCallable$g(WeakMap$1) && /native code/.test(String(WeakMap$1));
662
653
 
663
654
  var shared$2 = shared$4.exports;
664
655
  var uid = uid$2;
@@ -742,8 +733,8 @@ var internalState = {
742
733
  getterFor: getterFor
743
734
  };
744
735
 
745
- var fails$k = fails$r;
746
- var isCallable$g = isCallable$o;
736
+ var fails$j = fails$q;
737
+ var isCallable$f = isCallable$n;
747
738
  var hasOwn$7 = hasOwnProperty_1;
748
739
  var DESCRIPTORS$5 = descriptors;
749
740
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
@@ -755,7 +746,7 @@ var getInternalState$2 = InternalStateModule$2.get;
755
746
  // eslint-disable-next-line es/no-object-defineproperty -- safe
756
747
  var defineProperty$5 = Object.defineProperty;
757
748
 
758
- var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$k(function () {
749
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$j(function () {
759
750
  return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
760
751
  });
761
752
 
@@ -789,19 +780,19 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
789
780
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
790
781
  // eslint-disable-next-line no-extend-native -- required
791
782
  Function.prototype.toString = makeBuiltIn$1(function toString() {
792
- return isCallable$g(this) && getInternalState$2(this).source || inspectSource$2(this);
783
+ return isCallable$f(this) && getInternalState$2(this).source || inspectSource$2(this);
793
784
  }, 'toString');
794
785
 
795
- var isCallable$f = isCallable$o;
786
+ var isCallable$e = isCallable$n;
796
787
  var definePropertyModule$4 = objectDefineProperty;
797
788
  var makeBuiltIn = makeBuiltIn$2.exports;
798
789
  var defineGlobalProperty$1 = defineGlobalProperty$3;
799
790
 
800
- var defineBuiltIn$8 = function (O, key, value, options) {
791
+ var defineBuiltIn$7 = function (O, key, value, options) {
801
792
  if (!options) options = {};
802
793
  var simple = options.enumerable;
803
794
  var name = options.name !== undefined ? options.name : key;
804
- if (isCallable$f(value)) makeBuiltIn(value, name, options);
795
+ if (isCallable$e(value)) makeBuiltIn(value, name, options);
805
796
  if (options.global) {
806
797
  if (simple) O[key] = value;
807
798
  else defineGlobalProperty$1(key, value);
@@ -837,52 +828,52 @@ var trunc = mathTrunc;
837
828
 
838
829
  // `ToIntegerOrInfinity` abstract operation
839
830
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
840
- var toIntegerOrInfinity$7 = function (argument) {
831
+ var toIntegerOrInfinity$6 = function (argument) {
841
832
  var number = +argument;
842
833
  // eslint-disable-next-line no-self-compare -- NaN check
843
834
  return number !== number || number === 0 ? 0 : trunc(number);
844
835
  };
845
836
 
846
- var toIntegerOrInfinity$6 = toIntegerOrInfinity$7;
837
+ var toIntegerOrInfinity$5 = toIntegerOrInfinity$6;
847
838
 
848
839
  var max$2 = Math.max;
849
- var min$3 = Math.min;
840
+ var min$2 = Math.min;
850
841
 
851
842
  // Helper for a popular repeating case of the spec:
852
843
  // Let integer be ? ToInteger(index).
853
844
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
854
845
  var toAbsoluteIndex$2 = function (index, length) {
855
- var integer = toIntegerOrInfinity$6(index);
856
- return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
846
+ var integer = toIntegerOrInfinity$5(index);
847
+ return integer < 0 ? max$2(integer + length, 0) : min$2(integer, length);
857
848
  };
858
849
 
859
- var toIntegerOrInfinity$5 = toIntegerOrInfinity$7;
850
+ var toIntegerOrInfinity$4 = toIntegerOrInfinity$6;
860
851
 
861
- var min$2 = Math.min;
852
+ var min$1 = Math.min;
862
853
 
863
854
  // `ToLength` abstract operation
864
855
  // https://tc39.es/ecma262/#sec-tolength
865
- var toLength$4 = function (argument) {
866
- return argument > 0 ? min$2(toIntegerOrInfinity$5(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
856
+ var toLength$3 = function (argument) {
857
+ return argument > 0 ? min$1(toIntegerOrInfinity$4(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
867
858
  };
868
859
 
869
- var toLength$3 = toLength$4;
860
+ var toLength$2 = toLength$3;
870
861
 
871
862
  // `LengthOfArrayLike` abstract operation
872
863
  // https://tc39.es/ecma262/#sec-lengthofarraylike
873
- var lengthOfArrayLike$8 = function (obj) {
874
- return toLength$3(obj.length);
864
+ var lengthOfArrayLike$7 = function (obj) {
865
+ return toLength$2(obj.length);
875
866
  };
876
867
 
877
868
  var toIndexedObject$3 = toIndexedObject$5;
878
869
  var toAbsoluteIndex$1 = toAbsoluteIndex$2;
879
- var lengthOfArrayLike$7 = lengthOfArrayLike$8;
870
+ var lengthOfArrayLike$6 = lengthOfArrayLike$7;
880
871
 
881
872
  // `Array.prototype.{ indexOf, includes }` methods implementation
882
873
  var createMethod$3 = function (IS_INCLUDES) {
883
874
  return function ($this, el, fromIndex) {
884
875
  var O = toIndexedObject$3($this);
885
- var length = lengthOfArrayLike$7(O);
876
+ var length = lengthOfArrayLike$6(O);
886
877
  var index = toAbsoluteIndex$1(fromIndex, length);
887
878
  var value;
888
879
  // Array#includes uses SameValueZero equality algorithm
@@ -907,13 +898,13 @@ var arrayIncludes = {
907
898
  indexOf: createMethod$3(false)
908
899
  };
909
900
 
910
- var uncurryThis$l = functionUncurryThis;
901
+ var uncurryThis$k = functionUncurryThis;
911
902
  var hasOwn$6 = hasOwnProperty_1;
912
903
  var toIndexedObject$2 = toIndexedObject$5;
913
904
  var indexOf$1 = arrayIncludes.indexOf;
914
905
  var hiddenKeys$2 = hiddenKeys$4;
915
906
 
916
- var push$2 = uncurryThis$l([].push);
907
+ var push$2 = uncurryThis$k([].push);
917
908
 
918
909
  var objectKeysInternal = function (object, names) {
919
910
  var O = toIndexedObject$2(object);
@@ -956,16 +947,16 @@ var objectGetOwnPropertySymbols = {};
956
947
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
957
948
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
958
949
 
959
- var getBuiltIn$6 = getBuiltIn$9;
960
- var uncurryThis$k = functionUncurryThis;
950
+ var getBuiltIn$5 = getBuiltIn$8;
951
+ var uncurryThis$j = functionUncurryThis;
961
952
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
962
953
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
963
954
  var anObject$d = anObject$f;
964
955
 
965
- var concat$2 = uncurryThis$k([].concat);
956
+ var concat$2 = uncurryThis$j([].concat);
966
957
 
967
958
  // all object keys, includes non-enumerable and symbols
968
- var ownKeys$1 = getBuiltIn$6('Reflect', 'ownKeys') || function ownKeys(it) {
959
+ var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
969
960
  var keys = getOwnPropertyNamesModule.f(anObject$d(it));
970
961
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
971
962
  return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
@@ -988,8 +979,8 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
988
979
  }
989
980
  };
990
981
 
991
- var fails$j = fails$r;
992
- var isCallable$e = isCallable$o;
982
+ var fails$i = fails$q;
983
+ var isCallable$d = isCallable$n;
993
984
 
994
985
  var replacement = /#|\.prototype\./;
995
986
 
@@ -997,7 +988,7 @@ var isForced$2 = function (feature, detection) {
997
988
  var value = data[normalize(feature)];
998
989
  return value == POLYFILL ? true
999
990
  : value == NATIVE ? false
1000
- : isCallable$e(detection) ? fails$j(detection)
991
+ : isCallable$d(detection) ? fails$i(detection)
1001
992
  : !!detection;
1002
993
  };
1003
994
 
@@ -1012,9 +1003,9 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
1012
1003
  var isForced_1 = isForced$2;
1013
1004
 
1014
1005
  var global$g = global$p;
1015
- var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
1006
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1016
1007
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
1017
- var defineBuiltIn$7 = defineBuiltIn$8;
1008
+ var defineBuiltIn$6 = defineBuiltIn$7;
1018
1009
  var defineGlobalProperty = defineGlobalProperty$3;
1019
1010
  var copyConstructorProperties$1 = copyConstructorProperties$2;
1020
1011
  var isForced$1 = isForced_1;
@@ -1049,7 +1040,7 @@ var _export = function (options, source) {
1049
1040
  if (target) for (key in source) {
1050
1041
  sourceProperty = source[key];
1051
1042
  if (options.dontCallGetSet) {
1052
- descriptor = getOwnPropertyDescriptor$2(target, key);
1043
+ descriptor = getOwnPropertyDescriptor$1(target, key);
1053
1044
  targetProperty = descriptor && descriptor.value;
1054
1045
  } else targetProperty = target[key];
1055
1046
  FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
@@ -1062,7 +1053,7 @@ var _export = function (options, source) {
1062
1053
  if (options.sham || (targetProperty && targetProperty.sham)) {
1063
1054
  createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1064
1055
  }
1065
- defineBuiltIn$7(target, key, sourceProperty, options);
1056
+ defineBuiltIn$6(target, key, sourceProperty, options);
1066
1057
  }
1067
1058
  };
1068
1059
 
@@ -1077,24 +1068,24 @@ var objectKeys$2 = Object.keys || function keys(O) {
1077
1068
  };
1078
1069
 
1079
1070
  var DESCRIPTORS$4 = descriptors;
1080
- var uncurryThis$j = functionUncurryThis;
1071
+ var uncurryThis$i = functionUncurryThis;
1081
1072
  var call$e = functionCall;
1082
- var fails$i = fails$r;
1073
+ var fails$h = fails$q;
1083
1074
  var objectKeys$1 = objectKeys$2;
1084
1075
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1085
1076
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1086
- var toObject$6 = toObject$8;
1077
+ var toObject$5 = toObject$7;
1087
1078
  var IndexedObject$1 = indexedObject;
1088
1079
 
1089
1080
  // eslint-disable-next-line es/no-object-assign -- safe
1090
1081
  var $assign = Object.assign;
1091
1082
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1092
1083
  var defineProperty$4 = Object.defineProperty;
1093
- var concat$1 = uncurryThis$j([].concat);
1084
+ var concat$1 = uncurryThis$i([].concat);
1094
1085
 
1095
1086
  // `Object.assign` method
1096
1087
  // https://tc39.es/ecma262/#sec-object.assign
1097
- var objectAssign = !$assign || fails$i(function () {
1088
+ var objectAssign = !$assign || fails$h(function () {
1098
1089
  // should have correct order of operations (Edge bug)
1099
1090
  if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
1100
1091
  enumerable: true,
@@ -1115,7 +1106,7 @@ var objectAssign = !$assign || fails$i(function () {
1115
1106
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1116
1107
  return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1117
1108
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1118
- var T = toObject$6(target);
1109
+ var T = toObject$5(target);
1119
1110
  var argumentsLength = arguments.length;
1120
1111
  var index = 1;
1121
1112
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -1133,13 +1124,13 @@ var objectAssign = !$assign || fails$i(function () {
1133
1124
  } return T;
1134
1125
  } : $assign;
1135
1126
 
1136
- var $$m = _export;
1127
+ var $$j = _export;
1137
1128
  var assign = objectAssign;
1138
1129
 
1139
1130
  // `Object.assign` method
1140
1131
  // https://tc39.es/ecma262/#sec-object.assign
1141
1132
  // eslint-disable-next-line es/no-object-assign -- required for testing
1142
- $$m({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1133
+ $$j({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1143
1134
  assign: assign
1144
1135
  });
1145
1136
 
@@ -1181,9 +1172,9 @@ function __awaiter(thisArg, _arguments, P, generator) {
1181
1172
  }
1182
1173
 
1183
1174
  var aCallable$8 = aCallable$a;
1184
- var toObject$5 = toObject$8;
1175
+ var toObject$4 = toObject$7;
1185
1176
  var IndexedObject = indexedObject;
1186
- var lengthOfArrayLike$6 = lengthOfArrayLike$8;
1177
+ var lengthOfArrayLike$5 = lengthOfArrayLike$7;
1187
1178
 
1188
1179
  var $TypeError$b = TypeError;
1189
1180
 
@@ -1191,9 +1182,9 @@ var $TypeError$b = TypeError;
1191
1182
  var createMethod$2 = function (IS_RIGHT) {
1192
1183
  return function (that, callbackfn, argumentsLength, memo) {
1193
1184
  aCallable$8(callbackfn);
1194
- var O = toObject$5(that);
1185
+ var O = toObject$4(that);
1195
1186
  var self = IndexedObject(O);
1196
- var length = lengthOfArrayLike$6(O);
1187
+ var length = lengthOfArrayLike$5(O);
1197
1188
  var index = IS_RIGHT ? length - 1 : 0;
1198
1189
  var i = IS_RIGHT ? -1 : 1;
1199
1190
  if (argumentsLength < 2) while (true) {
@@ -1223,11 +1214,11 @@ var arrayReduce = {
1223
1214
  right: createMethod$2(true)
1224
1215
  };
1225
1216
 
1226
- var fails$h = fails$r;
1217
+ var fails$g = fails$q;
1227
1218
 
1228
1219
  var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
1229
1220
  var method = [][METHOD_NAME];
1230
- return !!method && fails$h(function () {
1221
+ return !!method && fails$g(function () {
1231
1222
  // eslint-disable-next-line no-useless-call -- required for testing
1232
1223
  method.call(null, argument || function () { return 1; }, 1);
1233
1224
  });
@@ -1238,7 +1229,7 @@ var global$f = global$p;
1238
1229
 
1239
1230
  var engineIsNode = classof$7(global$f.process) == 'process';
1240
1231
 
1241
- var $$l = _export;
1232
+ var $$i = _export;
1242
1233
  var $reduce = arrayReduce.left;
1243
1234
  var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
1244
1235
  var CHROME_VERSION = engineV8Version;
@@ -1251,7 +1242,7 @@ var CHROME_BUG = !IS_NODE$4 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1251
1242
 
1252
1243
  // `Array.prototype.reduce` method
1253
1244
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1254
- $$l({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || CHROME_BUG }, {
1245
+ $$i({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || CHROME_BUG }, {
1255
1246
  reduce: function reduce(callbackfn /* , initialValue */) {
1256
1247
  var length = arguments.length;
1257
1248
  return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
@@ -1289,9 +1280,9 @@ objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1289
1280
  return O;
1290
1281
  };
1291
1282
 
1292
- var getBuiltIn$5 = getBuiltIn$9;
1283
+ var getBuiltIn$4 = getBuiltIn$8;
1293
1284
 
1294
- var html$2 = getBuiltIn$5('document', 'documentElement');
1285
+ var html$2 = getBuiltIn$4('document', 'documentElement');
1295
1286
 
1296
1287
  /* global ActiveXObject -- old IE, WSH */
1297
1288
 
@@ -1395,15 +1386,15 @@ if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
1395
1386
  }
1396
1387
 
1397
1388
  // add a key to Array.prototype[@@unscopables]
1398
- var addToUnscopables$4 = function (key) {
1389
+ var addToUnscopables$3 = function (key) {
1399
1390
  ArrayPrototype$1[UNSCOPABLES][key] = true;
1400
1391
  };
1401
1392
 
1402
1393
  var iterators = {};
1403
1394
 
1404
- var fails$g = fails$r;
1395
+ var fails$f = fails$q;
1405
1396
 
1406
- var correctPrototypeGetter = !fails$g(function () {
1397
+ var correctPrototypeGetter = !fails$f(function () {
1407
1398
  function F() { /* empty */ }
1408
1399
  F.prototype.constructor = null;
1409
1400
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1411,8 +1402,8 @@ var correctPrototypeGetter = !fails$g(function () {
1411
1402
  });
1412
1403
 
1413
1404
  var hasOwn$4 = hasOwnProperty_1;
1414
- var isCallable$d = isCallable$o;
1415
- var toObject$4 = toObject$8;
1405
+ var isCallable$c = isCallable$n;
1406
+ var toObject$3 = toObject$7;
1416
1407
  var sharedKey = sharedKey$3;
1417
1408
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1418
1409
 
@@ -1424,19 +1415,19 @@ var ObjectPrototype = $Object$1.prototype;
1424
1415
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1425
1416
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1426
1417
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1427
- var object = toObject$4(O);
1418
+ var object = toObject$3(O);
1428
1419
  if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
1429
1420
  var constructor = object.constructor;
1430
- if (isCallable$d(constructor) && object instanceof constructor) {
1421
+ if (isCallable$c(constructor) && object instanceof constructor) {
1431
1422
  return constructor.prototype;
1432
1423
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1433
1424
  };
1434
1425
 
1435
- var fails$f = fails$r;
1436
- var isCallable$c = isCallable$o;
1426
+ var fails$e = fails$q;
1427
+ var isCallable$b = isCallable$n;
1437
1428
  var isObject$4 = isObject$a;
1438
1429
  var getPrototypeOf$1 = objectGetPrototypeOf;
1439
- var defineBuiltIn$6 = defineBuiltIn$8;
1430
+ var defineBuiltIn$5 = defineBuiltIn$7;
1440
1431
  var wellKnownSymbol$g = wellKnownSymbol$j;
1441
1432
 
1442
1433
  var ITERATOR$7 = wellKnownSymbol$g('iterator');
@@ -1457,7 +1448,7 @@ if ([].keys) {
1457
1448
  }
1458
1449
  }
1459
1450
 
1460
- var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$f(function () {
1451
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$e(function () {
1461
1452
  var test = {};
1462
1453
  // FF44- legacy iterators case
1463
1454
  return IteratorPrototype$2[ITERATOR$7].call(test) !== test;
@@ -1467,8 +1458,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1467
1458
 
1468
1459
  // `%IteratorPrototype%[@@iterator]()` method
1469
1460
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1470
- if (!isCallable$c(IteratorPrototype$2[ITERATOR$7])) {
1471
- defineBuiltIn$6(IteratorPrototype$2, ITERATOR$7, function () {
1461
+ if (!isCallable$b(IteratorPrototype$2[ITERATOR$7])) {
1462
+ defineBuiltIn$5(IteratorPrototype$2, ITERATOR$7, function () {
1472
1463
  return this;
1473
1464
  });
1474
1465
  }
@@ -1507,19 +1498,19 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1507
1498
  return IteratorConstructor;
1508
1499
  };
1509
1500
 
1510
- var isCallable$b = isCallable$o;
1501
+ var isCallable$a = isCallable$n;
1511
1502
 
1512
1503
  var $String$2 = String;
1513
1504
  var $TypeError$a = TypeError;
1514
1505
 
1515
1506
  var aPossiblePrototype$1 = function (argument) {
1516
- if (typeof argument == 'object' || isCallable$b(argument)) return argument;
1507
+ if (typeof argument == 'object' || isCallable$a(argument)) return argument;
1517
1508
  throw $TypeError$a("Can't set " + $String$2(argument) + ' as a prototype');
1518
1509
  };
1519
1510
 
1520
1511
  /* eslint-disable no-proto -- safe */
1521
1512
 
1522
- var uncurryThis$i = functionUncurryThis;
1513
+ var uncurryThis$h = functionUncurryThis;
1523
1514
  var anObject$a = anObject$f;
1524
1515
  var aPossiblePrototype = aPossiblePrototype$1;
1525
1516
 
@@ -1533,7 +1524,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1533
1524
  var setter;
1534
1525
  try {
1535
1526
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1536
- setter = uncurryThis$i(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1527
+ setter = uncurryThis$h(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1537
1528
  setter(test, []);
1538
1529
  CORRECT_SETTER = test instanceof Array;
1539
1530
  } catch (error) { /* empty */ }
@@ -1546,16 +1537,16 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1546
1537
  };
1547
1538
  }() : undefined);
1548
1539
 
1549
- var $$k = _export;
1540
+ var $$h = _export;
1550
1541
  var call$d = functionCall;
1551
1542
  var FunctionName = functionName;
1552
- var isCallable$a = isCallable$o;
1543
+ var isCallable$9 = isCallable$n;
1553
1544
  var createIteratorConstructor = iteratorCreateConstructor;
1554
1545
  var getPrototypeOf = objectGetPrototypeOf;
1555
1546
  var setPrototypeOf$1 = objectSetPrototypeOf;
1556
1547
  var setToStringTag$1 = setToStringTag$3;
1557
1548
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1558
- var defineBuiltIn$5 = defineBuiltIn$8;
1549
+ var defineBuiltIn$4 = defineBuiltIn$7;
1559
1550
  var wellKnownSymbol$e = wellKnownSymbol$j;
1560
1551
  var Iterators$3 = iterators;
1561
1552
  var IteratorsCore = iteratorsCore;
@@ -1601,8 +1592,8 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1601
1592
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1602
1593
  if (setPrototypeOf$1) {
1603
1594
  setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1604
- } else if (!isCallable$a(CurrentIteratorPrototype[ITERATOR$6])) {
1605
- defineBuiltIn$5(CurrentIteratorPrototype, ITERATOR$6, returnThis);
1595
+ } else if (!isCallable$9(CurrentIteratorPrototype[ITERATOR$6])) {
1596
+ defineBuiltIn$4(CurrentIteratorPrototype, ITERATOR$6, returnThis);
1606
1597
  }
1607
1598
  }
1608
1599
  // Set @@toStringTag to native iterators
@@ -1629,14 +1620,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1629
1620
  };
1630
1621
  if (FORCED) for (KEY in methods) {
1631
1622
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1632
- defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
1623
+ defineBuiltIn$4(IterablePrototype, KEY, methods[KEY]);
1633
1624
  }
1634
- } else $$k({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1625
+ } else $$h({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1635
1626
  }
1636
1627
 
1637
1628
  // define iterator
1638
1629
  if (IterablePrototype[ITERATOR$6] !== defaultIterator) {
1639
- defineBuiltIn$5(IterablePrototype, ITERATOR$6, defaultIterator, { name: DEFAULT });
1630
+ defineBuiltIn$4(IterablePrototype, ITERATOR$6, defaultIterator, { name: DEFAULT });
1640
1631
  }
1641
1632
  Iterators$3[NAME] = defaultIterator;
1642
1633
 
@@ -1650,7 +1641,7 @@ var createIterResultObject$1 = function (value, done) {
1650
1641
  };
1651
1642
 
1652
1643
  var toIndexedObject = toIndexedObject$5;
1653
- var addToUnscopables$3 = addToUnscopables$4;
1644
+ var addToUnscopables$2 = addToUnscopables$3;
1654
1645
  var Iterators$2 = iterators;
1655
1646
  var InternalStateModule$1 = internalState;
1656
1647
  var defineProperty$1 = objectDefineProperty.f;
@@ -1701,9 +1692,9 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1701
1692
  var values = Iterators$2.Arguments = Iterators$2.Array;
1702
1693
 
1703
1694
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1704
- addToUnscopables$3('keys');
1705
- addToUnscopables$3('values');
1706
- addToUnscopables$3('entries');
1695
+ addToUnscopables$2('keys');
1696
+ addToUnscopables$2('values');
1697
+ addToUnscopables$2('entries');
1707
1698
 
1708
1699
  // V8 ~ Chrome 45- bug
1709
1700
  if (DESCRIPTORS$2 && values.name !== 'values') try {
@@ -1897,13 +1888,13 @@ const formLogger = {
1897
1888
  },
1898
1889
  isSubmitting: false,
1899
1890
  log: (values, getValidationResult) => __awaiter(void 0, void 0, void 0, function* () {
1900
- reactApi.logger.info({
1891
+ alchemy.logger.info({
1901
1892
  obj: values
1902
1893
  }, "Validating registered form fields:");
1903
1894
  const validationResult = yield getValidationResult();
1904
- if (Object.keys(validationResult.errors).length) reactApi.logger.error({
1895
+ if (Object.keys(validationResult.errors).length) alchemy.logger.error({
1905
1896
  obj: validationResult.errors
1906
- }, "Validation failed. Errors object:");else reactApi.logger.info({
1897
+ }, "Validation failed. Errors object:");else alchemy.logger.info({
1907
1898
  obj: validationResult.values
1908
1899
  }, "Validation passed. Final payload after defaults & transforms:");
1909
1900
  return validationResult;
@@ -1920,7 +1911,7 @@ test$1[TO_STRING_TAG$1] = 'z';
1920
1911
  var toStringTagSupport = String(test$1) === '[object z]';
1921
1912
 
1922
1913
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1923
- var isCallable$9 = isCallable$o;
1914
+ var isCallable$8 = isCallable$n;
1924
1915
  var classofRaw$1 = classofRaw$2;
1925
1916
  var wellKnownSymbol$b = wellKnownSymbol$j;
1926
1917
 
@@ -1946,14 +1937,14 @@ var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1946
1937
  // builtinTag case
1947
1938
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
1948
1939
  // ES3 arguments fallback
1949
- : (result = classofRaw$1(O)) == 'Object' && isCallable$9(O.callee) ? 'Arguments' : result;
1940
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
1950
1941
  };
1951
1942
 
1952
1943
  var classof$5 = classof$6;
1953
1944
 
1954
1945
  var $String$1 = String;
1955
1946
 
1956
- var toString$c = function (argument) {
1947
+ var toString$b = function (argument) {
1957
1948
  if (classof$5(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1958
1949
  return $String$1(argument);
1959
1950
  };
@@ -1962,12 +1953,12 @@ var toString$c = function (argument) {
1962
1953
  var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1963
1954
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1964
1955
 
1965
- var uncurryThis$h = functionUncurryThis;
1966
- var requireObjectCoercible$6 = requireObjectCoercible$9;
1967
- var toString$b = toString$c;
1956
+ var uncurryThis$g = functionUncurryThis;
1957
+ var requireObjectCoercible$5 = requireObjectCoercible$8;
1958
+ var toString$a = toString$b;
1968
1959
  var whitespaces$3 = whitespaces$4;
1969
1960
 
1970
- var replace$3 = uncurryThis$h(''.replace);
1961
+ var replace$3 = uncurryThis$g(''.replace);
1971
1962
  var whitespace = '[' + whitespaces$3 + ']';
1972
1963
  var ltrim = RegExp('^' + whitespace + whitespace + '*');
1973
1964
  var rtrim = RegExp(whitespace + whitespace + '*$');
@@ -1975,7 +1966,7 @@ var rtrim = RegExp(whitespace + whitespace + '*$');
1975
1966
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1976
1967
  var createMethod$1 = function (TYPE) {
1977
1968
  return function ($this) {
1978
- var string = toString$b(requireObjectCoercible$6($this));
1969
+ var string = toString$a(requireObjectCoercible$5($this));
1979
1970
  if (TYPE & 1) string = replace$3(string, ltrim, '');
1980
1971
  if (TYPE & 2) string = replace$3(string, rtrim, '');
1981
1972
  return string;
@@ -1995,7 +1986,7 @@ var stringTrim = {
1995
1986
  };
1996
1987
 
1997
1988
  var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
1998
- var fails$e = fails$r;
1989
+ var fails$d = fails$q;
1999
1990
  var whitespaces$2 = whitespaces$4;
2000
1991
 
2001
1992
  var non = '\u200B\u0085\u180E';
@@ -2003,20 +1994,20 @@ var non = '\u200B\u0085\u180E';
2003
1994
  // check that a method works with the correct list
2004
1995
  // of whitespaces and has a correct name
2005
1996
  var stringTrimForced = function (METHOD_NAME) {
2006
- return fails$e(function () {
1997
+ return fails$d(function () {
2007
1998
  return !!whitespaces$2[METHOD_NAME]()
2008
1999
  || non[METHOD_NAME]() !== non
2009
2000
  || (PROPER_FUNCTION_NAME$1 && whitespaces$2[METHOD_NAME].name !== METHOD_NAME);
2010
2001
  });
2011
2002
  };
2012
2003
 
2013
- var $$j = _export;
2004
+ var $$g = _export;
2014
2005
  var $trim = stringTrim.trim;
2015
2006
  var forcedStringTrimMethod = stringTrimForced;
2016
2007
 
2017
2008
  // `String.prototype.trim` method
2018
2009
  // https://tc39.es/ecma262/#sec-string.prototype.trim
2019
- $$j({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2010
+ $$g({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2020
2011
  trim: function trim() {
2021
2012
  return $trim(this);
2022
2013
  }
@@ -2040,13 +2031,13 @@ var regexpFlags$1 = function () {
2040
2031
  return result;
2041
2032
  };
2042
2033
 
2043
- var fails$d = fails$r;
2034
+ var fails$c = fails$q;
2044
2035
  var global$d = global$p;
2045
2036
 
2046
2037
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2047
2038
  var $RegExp$2 = global$d.RegExp;
2048
2039
 
2049
- var UNSUPPORTED_Y$1 = fails$d(function () {
2040
+ var UNSUPPORTED_Y$1 = fails$c(function () {
2050
2041
  var re = $RegExp$2('a', 'y');
2051
2042
  re.lastIndex = 2;
2052
2043
  return re.exec('abcd') != null;
@@ -2054,11 +2045,11 @@ var UNSUPPORTED_Y$1 = fails$d(function () {
2054
2045
 
2055
2046
  // UC Browser bug
2056
2047
  // https://github.com/zloirock/core-js/issues/1008
2057
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$d(function () {
2048
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$c(function () {
2058
2049
  return !$RegExp$2('a', 'y').sticky;
2059
2050
  });
2060
2051
 
2061
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$d(function () {
2052
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$c(function () {
2062
2053
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2063
2054
  var re = $RegExp$2('^r', 'gy');
2064
2055
  re.lastIndex = 2;
@@ -2071,24 +2062,24 @@ var regexpStickyHelpers = {
2071
2062
  UNSUPPORTED_Y: UNSUPPORTED_Y$1
2072
2063
  };
2073
2064
 
2074
- var fails$c = fails$r;
2065
+ var fails$b = fails$q;
2075
2066
  var global$c = global$p;
2076
2067
 
2077
2068
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2078
2069
  var $RegExp$1 = global$c.RegExp;
2079
2070
 
2080
- var regexpUnsupportedDotAll = fails$c(function () {
2071
+ var regexpUnsupportedDotAll = fails$b(function () {
2081
2072
  var re = $RegExp$1('.', 's');
2082
2073
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
2083
2074
  });
2084
2075
 
2085
- var fails$b = fails$r;
2076
+ var fails$a = fails$q;
2086
2077
  var global$b = global$p;
2087
2078
 
2088
2079
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2089
2080
  var $RegExp = global$b.RegExp;
2090
2081
 
2091
- var regexpUnsupportedNcg = fails$b(function () {
2082
+ var regexpUnsupportedNcg = fails$a(function () {
2092
2083
  var re = $RegExp('(?<a>b)', 'g');
2093
2084
  return re.exec('b').groups.a !== 'b' ||
2094
2085
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -2097,8 +2088,8 @@ var regexpUnsupportedNcg = fails$b(function () {
2097
2088
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2098
2089
  /* eslint-disable regexp/no-useless-quantifier -- testing */
2099
2090
  var call$c = functionCall;
2100
- var uncurryThis$g = functionUncurryThis;
2101
- var toString$a = toString$c;
2091
+ var uncurryThis$f = functionUncurryThis;
2092
+ var toString$9 = toString$b;
2102
2093
  var regexpFlags = regexpFlags$1;
2103
2094
  var stickyHelpers = regexpStickyHelpers;
2104
2095
  var shared = shared$4.exports;
@@ -2110,10 +2101,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2110
2101
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
2111
2102
  var nativeExec = RegExp.prototype.exec;
2112
2103
  var patchedExec = nativeExec;
2113
- var charAt$4 = uncurryThis$g(''.charAt);
2114
- var indexOf = uncurryThis$g(''.indexOf);
2115
- var replace$2 = uncurryThis$g(''.replace);
2116
- var stringSlice$6 = uncurryThis$g(''.slice);
2104
+ var charAt$4 = uncurryThis$f(''.charAt);
2105
+ var indexOf = uncurryThis$f(''.indexOf);
2106
+ var replace$2 = uncurryThis$f(''.replace);
2107
+ var stringSlice$5 = uncurryThis$f(''.slice);
2117
2108
 
2118
2109
  var UPDATES_LAST_INDEX_WRONG = (function () {
2119
2110
  var re1 = /a/;
@@ -2134,7 +2125,7 @@ if (PATCH) {
2134
2125
  patchedExec = function exec(string) {
2135
2126
  var re = this;
2136
2127
  var state = getInternalState(re);
2137
- var str = toString$a(string);
2128
+ var str = toString$9(string);
2138
2129
  var raw = state.raw;
2139
2130
  var result, reCopy, lastIndex, match, i, object, group;
2140
2131
 
@@ -2158,7 +2149,7 @@ if (PATCH) {
2158
2149
  flags += 'g';
2159
2150
  }
2160
2151
 
2161
- strCopy = stringSlice$6(str, re.lastIndex);
2152
+ strCopy = stringSlice$5(str, re.lastIndex);
2162
2153
  // Support anchored sticky behavior.
2163
2154
  if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) {
2164
2155
  source = '(?: ' + source + ')';
@@ -2179,8 +2170,8 @@ if (PATCH) {
2179
2170
 
2180
2171
  if (sticky) {
2181
2172
  if (match) {
2182
- match.input = stringSlice$6(match.input, charsAdded);
2183
- match[0] = stringSlice$6(match[0], charsAdded);
2173
+ match.input = stringSlice$5(match.input, charsAdded);
2174
+ match[0] = stringSlice$5(match[0], charsAdded);
2184
2175
  match.index = re.lastIndex;
2185
2176
  re.lastIndex += match[0].length;
2186
2177
  } else re.lastIndex = 0;
@@ -2211,12 +2202,12 @@ if (PATCH) {
2211
2202
 
2212
2203
  var regexpExec$2 = patchedExec;
2213
2204
 
2214
- var $$i = _export;
2205
+ var $$f = _export;
2215
2206
  var exec$2 = regexpExec$2;
2216
2207
 
2217
2208
  // `RegExp.prototype.exec` method
2218
2209
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2219
- $$i({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2210
+ $$f({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2220
2211
  exec: exec$2
2221
2212
  });
2222
2213
 
@@ -2232,21 +2223,21 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$
2232
2223
  });
2233
2224
 
2234
2225
  var classofRaw = classofRaw$2;
2235
- var uncurryThis$f = functionUncurryThis;
2226
+ var uncurryThis$e = functionUncurryThis;
2236
2227
 
2237
2228
  var functionUncurryThisClause = function (fn) {
2238
2229
  // Nashorn bug:
2239
2230
  // https://github.com/zloirock/core-js/issues/1128
2240
2231
  // https://github.com/zloirock/core-js/issues/1130
2241
- if (classofRaw(fn) === 'Function') return uncurryThis$f(fn);
2232
+ if (classofRaw(fn) === 'Function') return uncurryThis$e(fn);
2242
2233
  };
2243
2234
 
2244
2235
  // TODO: Remove from `core-js@4` since it's moved to entry points
2245
2236
 
2246
- var uncurryThis$e = functionUncurryThisClause;
2247
- var defineBuiltIn$4 = defineBuiltIn$8;
2237
+ var uncurryThis$d = functionUncurryThisClause;
2238
+ var defineBuiltIn$3 = defineBuiltIn$7;
2248
2239
  var regexpExec$1 = regexpExec$2;
2249
- var fails$a = fails$r;
2240
+ var fails$9 = fails$q;
2250
2241
  var wellKnownSymbol$a = wellKnownSymbol$j;
2251
2242
  var createNonEnumerableProperty = createNonEnumerableProperty$5;
2252
2243
 
@@ -2256,14 +2247,14 @@ var RegExpPrototype$2 = RegExp.prototype;
2256
2247
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2257
2248
  var SYMBOL = wellKnownSymbol$a(KEY);
2258
2249
 
2259
- var DELEGATES_TO_SYMBOL = !fails$a(function () {
2250
+ var DELEGATES_TO_SYMBOL = !fails$9(function () {
2260
2251
  // String methods call symbol-named RegEp methods
2261
2252
  var O = {};
2262
2253
  O[SYMBOL] = function () { return 7; };
2263
2254
  return ''[KEY](O) != 7;
2264
2255
  });
2265
2256
 
2266
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$a(function () {
2257
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$9(function () {
2267
2258
  // Symbol-named RegExp methods call .exec
2268
2259
  var execCalled = false;
2269
2260
  var re = /a/;
@@ -2292,9 +2283,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2292
2283
  !DELEGATES_TO_EXEC ||
2293
2284
  FORCED
2294
2285
  ) {
2295
- var uncurriedNativeRegExpMethod = uncurryThis$e(/./[SYMBOL]);
2286
+ var uncurriedNativeRegExpMethod = uncurryThis$d(/./[SYMBOL]);
2296
2287
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2297
- var uncurriedNativeMethod = uncurryThis$e(nativeMethod);
2288
+ var uncurriedNativeMethod = uncurryThis$d(nativeMethod);
2298
2289
  var $exec = regexp.exec;
2299
2290
  if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
2300
2291
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
@@ -2308,26 +2299,26 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2308
2299
  return { done: false };
2309
2300
  });
2310
2301
 
2311
- defineBuiltIn$4(String.prototype, KEY, methods[0]);
2312
- defineBuiltIn$4(RegExpPrototype$2, SYMBOL, methods[1]);
2302
+ defineBuiltIn$3(String.prototype, KEY, methods[0]);
2303
+ defineBuiltIn$3(RegExpPrototype$2, SYMBOL, methods[1]);
2313
2304
  }
2314
2305
 
2315
2306
  if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
2316
2307
  };
2317
2308
 
2318
- var uncurryThis$d = functionUncurryThis;
2319
- var toIntegerOrInfinity$4 = toIntegerOrInfinity$7;
2320
- var toString$9 = toString$c;
2321
- var requireObjectCoercible$5 = requireObjectCoercible$9;
2309
+ var uncurryThis$c = functionUncurryThis;
2310
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$6;
2311
+ var toString$8 = toString$b;
2312
+ var requireObjectCoercible$4 = requireObjectCoercible$8;
2322
2313
 
2323
- var charAt$3 = uncurryThis$d(''.charAt);
2324
- var charCodeAt = uncurryThis$d(''.charCodeAt);
2325
- var stringSlice$5 = uncurryThis$d(''.slice);
2314
+ var charAt$3 = uncurryThis$c(''.charAt);
2315
+ var charCodeAt = uncurryThis$c(''.charCodeAt);
2316
+ var stringSlice$4 = uncurryThis$c(''.slice);
2326
2317
 
2327
2318
  var createMethod = function (CONVERT_TO_STRING) {
2328
2319
  return function ($this, pos) {
2329
- var S = toString$9(requireObjectCoercible$5($this));
2330
- var position = toIntegerOrInfinity$4(pos);
2320
+ var S = toString$8(requireObjectCoercible$4($this));
2321
+ var position = toIntegerOrInfinity$3(pos);
2331
2322
  var size = S.length;
2332
2323
  var first, second;
2333
2324
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
@@ -2338,7 +2329,7 @@ var createMethod = function (CONVERT_TO_STRING) {
2338
2329
  ? charAt$3(S, position)
2339
2330
  : first
2340
2331
  : CONVERT_TO_STRING
2341
- ? stringSlice$5(S, position, position + 2)
2332
+ ? stringSlice$4(S, position, position + 2)
2342
2333
  : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2343
2334
  };
2344
2335
  };
@@ -2360,13 +2351,13 @@ var advanceStringIndex$2 = function (S, index, unicode) {
2360
2351
  return index + (unicode ? charAt$2(S, index).length : 1);
2361
2352
  };
2362
2353
 
2363
- var uncurryThis$c = functionUncurryThis;
2364
- var toObject$3 = toObject$8;
2354
+ var uncurryThis$b = functionUncurryThis;
2355
+ var toObject$2 = toObject$7;
2365
2356
 
2366
2357
  var floor$2 = Math.floor;
2367
- var charAt$1 = uncurryThis$c(''.charAt);
2368
- var replace$1 = uncurryThis$c(''.replace);
2369
- var stringSlice$4 = uncurryThis$c(''.slice);
2358
+ var charAt$1 = uncurryThis$b(''.charAt);
2359
+ var replace$1 = uncurryThis$b(''.replace);
2360
+ var stringSlice$3 = uncurryThis$b(''.slice);
2370
2361
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2371
2362
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2372
2363
 
@@ -2377,7 +2368,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2377
2368
  var m = captures.length;
2378
2369
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2379
2370
  if (namedCaptures !== undefined) {
2380
- namedCaptures = toObject$3(namedCaptures);
2371
+ namedCaptures = toObject$2(namedCaptures);
2381
2372
  symbols = SUBSTITUTION_SYMBOLS;
2382
2373
  }
2383
2374
  return replace$1(replacement, symbols, function (match, ch) {
@@ -2385,10 +2376,10 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2385
2376
  switch (charAt$1(ch, 0)) {
2386
2377
  case '$': return '$';
2387
2378
  case '&': return matched;
2388
- case '`': return stringSlice$4(str, 0, position);
2389
- case "'": return stringSlice$4(str, tailPos);
2379
+ case '`': return stringSlice$3(str, 0, position);
2380
+ case "'": return stringSlice$3(str, tailPos);
2390
2381
  case '<':
2391
- capture = namedCaptures[stringSlice$4(ch, 1, -1)];
2382
+ capture = namedCaptures[stringSlice$3(ch, 1, -1)];
2392
2383
  break;
2393
2384
  default: // \d\d?
2394
2385
  var n = +ch;
@@ -2407,7 +2398,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2407
2398
 
2408
2399
  var call$a = functionCall;
2409
2400
  var anObject$8 = anObject$f;
2410
- var isCallable$8 = isCallable$o;
2401
+ var isCallable$7 = isCallable$n;
2411
2402
  var classof$4 = classofRaw$2;
2412
2403
  var regexpExec = regexpExec$2;
2413
2404
 
@@ -2417,7 +2408,7 @@ var $TypeError$9 = TypeError;
2417
2408
  // https://tc39.es/ecma262/#sec-regexpexec
2418
2409
  var regexpExecAbstract = function (R, S) {
2419
2410
  var exec = R.exec;
2420
- if (isCallable$8(exec)) {
2411
+ if (isCallable$7(exec)) {
2421
2412
  var result = call$a(exec, R, S);
2422
2413
  if (result !== null) anObject$8(result);
2423
2414
  return result;
@@ -2428,16 +2419,16 @@ var regexpExecAbstract = function (R, S) {
2428
2419
 
2429
2420
  var apply$1 = functionApply;
2430
2421
  var call$9 = functionCall;
2431
- var uncurryThis$b = functionUncurryThis;
2422
+ var uncurryThis$a = functionUncurryThis;
2432
2423
  var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
2433
- var fails$9 = fails$r;
2424
+ var fails$8 = fails$q;
2434
2425
  var anObject$7 = anObject$f;
2435
- var isCallable$7 = isCallable$o;
2426
+ var isCallable$6 = isCallable$n;
2436
2427
  var isNullOrUndefined$3 = isNullOrUndefined$6;
2437
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$7;
2438
- var toLength$2 = toLength$4;
2439
- var toString$8 = toString$c;
2440
- var requireObjectCoercible$4 = requireObjectCoercible$9;
2428
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$6;
2429
+ var toLength$1 = toLength$3;
2430
+ var toString$7 = toString$b;
2431
+ var requireObjectCoercible$3 = requireObjectCoercible$8;
2441
2432
  var advanceStringIndex$1 = advanceStringIndex$2;
2442
2433
  var getMethod$3 = getMethod$5;
2443
2434
  var getSubstitution = getSubstitution$1;
@@ -2446,11 +2437,11 @@ var wellKnownSymbol$9 = wellKnownSymbol$j;
2446
2437
 
2447
2438
  var REPLACE = wellKnownSymbol$9('replace');
2448
2439
  var max$1 = Math.max;
2449
- var min$1 = Math.min;
2450
- var concat = uncurryThis$b([].concat);
2451
- var push$1 = uncurryThis$b([].push);
2452
- var stringIndexOf$1 = uncurryThis$b(''.indexOf);
2453
- var stringSlice$3 = uncurryThis$b(''.slice);
2440
+ var min = Math.min;
2441
+ var concat = uncurryThis$a([].concat);
2442
+ var push$1 = uncurryThis$a([].push);
2443
+ var stringIndexOf$1 = uncurryThis$a(''.indexOf);
2444
+ var stringSlice$2 = uncurryThis$a(''.slice);
2454
2445
 
2455
2446
  var maybeToString = function (it) {
2456
2447
  return it === undefined ? it : String(it);
@@ -2471,7 +2462,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2471
2462
  return false;
2472
2463
  })();
2473
2464
 
2474
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$9(function () {
2465
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$8(function () {
2475
2466
  var re = /./;
2476
2467
  re.exec = function () {
2477
2468
  var result = [];
@@ -2490,17 +2481,17 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2490
2481
  // `String.prototype.replace` method
2491
2482
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2492
2483
  function replace(searchValue, replaceValue) {
2493
- var O = requireObjectCoercible$4(this);
2484
+ var O = requireObjectCoercible$3(this);
2494
2485
  var replacer = isNullOrUndefined$3(searchValue) ? undefined : getMethod$3(searchValue, REPLACE);
2495
2486
  return replacer
2496
2487
  ? call$9(replacer, searchValue, O, replaceValue)
2497
- : call$9(nativeReplace, toString$8(O), searchValue, replaceValue);
2488
+ : call$9(nativeReplace, toString$7(O), searchValue, replaceValue);
2498
2489
  },
2499
2490
  // `RegExp.prototype[@@replace]` method
2500
2491
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2501
2492
  function (string, replaceValue) {
2502
2493
  var rx = anObject$7(this);
2503
- var S = toString$8(string);
2494
+ var S = toString$7(string);
2504
2495
 
2505
2496
  if (
2506
2497
  typeof replaceValue == 'string' &&
@@ -2511,8 +2502,8 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2511
2502
  if (res.done) return res.value;
2512
2503
  }
2513
2504
 
2514
- var functionalReplace = isCallable$7(replaceValue);
2515
- if (!functionalReplace) replaceValue = toString$8(replaceValue);
2505
+ var functionalReplace = isCallable$6(replaceValue);
2506
+ if (!functionalReplace) replaceValue = toString$7(replaceValue);
2516
2507
 
2517
2508
  var global = rx.global;
2518
2509
  if (global) {
@@ -2527,8 +2518,8 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2527
2518
  push$1(results, result);
2528
2519
  if (!global) break;
2529
2520
 
2530
- var matchStr = toString$8(result[0]);
2531
- if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$2(rx.lastIndex), fullUnicode);
2521
+ var matchStr = toString$7(result[0]);
2522
+ if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
2532
2523
  }
2533
2524
 
2534
2525
  var accumulatedResult = '';
@@ -2536,8 +2527,8 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2536
2527
  for (var i = 0; i < results.length; i++) {
2537
2528
  result = results[i];
2538
2529
 
2539
- var matched = toString$8(result[0]);
2540
- var position = max$1(min$1(toIntegerOrInfinity$3(result.index), S.length), 0);
2530
+ var matched = toString$7(result[0]);
2531
+ var position = max$1(min(toIntegerOrInfinity$2(result.index), S.length), 0);
2541
2532
  var captures = [];
2542
2533
  // NOTE: This is equivalent to
2543
2534
  // captures = result.slice(1).map(maybeToString)
@@ -2549,16 +2540,16 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2549
2540
  if (functionalReplace) {
2550
2541
  var replacerArgs = concat([matched], captures, position, S);
2551
2542
  if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
2552
- var replacement = toString$8(apply$1(replaceValue, undefined, replacerArgs));
2543
+ var replacement = toString$7(apply$1(replaceValue, undefined, replacerArgs));
2553
2544
  } else {
2554
2545
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2555
2546
  }
2556
2547
  if (position >= nextSourcePosition) {
2557
- accumulatedResult += stringSlice$3(S, nextSourcePosition, position) + replacement;
2548
+ accumulatedResult += stringSlice$2(S, nextSourcePosition, position) + replacement;
2558
2549
  nextSourcePosition = position + matched.length;
2559
2550
  }
2560
2551
  }
2561
- return accumulatedResult + stringSlice$3(S, nextSourcePosition);
2552
+ return accumulatedResult + stringSlice$2(S, nextSourcePosition);
2562
2553
  }
2563
2554
  ];
2564
2555
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
@@ -2833,26 +2824,26 @@ const isPoBox = addressLine => PO_BOX_REGEX.test(addressLine);
2833
2824
  */
2834
2825
  const isPoBoxAddress = address => !!(isPoBox(address.addressLine1) || address.addressLine2 && isPoBox(address.addressLine2));
2835
2826
 
2836
- var $$h = _export;
2827
+ var $$e = _export;
2837
2828
  var $includes = arrayIncludes.includes;
2838
- var fails$8 = fails$r;
2839
- var addToUnscopables$2 = addToUnscopables$4;
2829
+ var fails$7 = fails$q;
2830
+ var addToUnscopables$1 = addToUnscopables$3;
2840
2831
 
2841
2832
  // FF99+ bug
2842
- var BROKEN_ON_SPARSE = fails$8(function () {
2833
+ var BROKEN_ON_SPARSE = fails$7(function () {
2843
2834
  return !Array(1).includes();
2844
2835
  });
2845
2836
 
2846
2837
  // `Array.prototype.includes` method
2847
2838
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2848
- $$h({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2839
+ $$e({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2849
2840
  includes: function includes(el /* , fromIndex = 0 */) {
2850
2841
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2851
2842
  }
2852
2843
  });
2853
2844
 
2854
2845
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2855
- addToUnscopables$2('includes');
2846
+ addToUnscopables$1('includes');
2856
2847
 
2857
2848
  const USPS_CARRIER_CODES = ["usps", "stamps_com"];
2858
2849
  const isUspsCarrier = carrierCode => USPS_CARRIER_CODES.includes(carrierCode);
@@ -2937,14 +2928,14 @@ var createProperty$2 = function (object, key, value) {
2937
2928
  };
2938
2929
 
2939
2930
  var toAbsoluteIndex = toAbsoluteIndex$2;
2940
- var lengthOfArrayLike$5 = lengthOfArrayLike$8;
2931
+ var lengthOfArrayLike$4 = lengthOfArrayLike$7;
2941
2932
  var createProperty$1 = createProperty$2;
2942
2933
 
2943
2934
  var $Array$1 = Array;
2944
2935
  var max = Math.max;
2945
2936
 
2946
2937
  var arraySliceSimple = function (O, start, end) {
2947
- var length = lengthOfArrayLike$5(O);
2938
+ var length = lengthOfArrayLike$4(O);
2948
2939
  var k = toAbsoluteIndex(start, length);
2949
2940
  var fin = toAbsoluteIndex(end === undefined ? length : end, length);
2950
2941
  var result = $Array$1(max(fin - k, 0));
@@ -3014,14 +3005,14 @@ var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./);
3014
3005
 
3015
3006
  var engineWebkitVersion = !!webkit && +webkit[1];
3016
3007
 
3017
- var $$g = _export;
3018
- var uncurryThis$a = functionUncurryThis;
3008
+ var $$d = _export;
3009
+ var uncurryThis$9 = functionUncurryThis;
3019
3010
  var aCallable$7 = aCallable$a;
3020
- var toObject$2 = toObject$8;
3021
- var lengthOfArrayLike$4 = lengthOfArrayLike$8;
3011
+ var toObject$1 = toObject$7;
3012
+ var lengthOfArrayLike$3 = lengthOfArrayLike$7;
3022
3013
  var deletePropertyOrThrow = deletePropertyOrThrow$1;
3023
- var toString$7 = toString$c;
3024
- var fails$7 = fails$r;
3014
+ var toString$6 = toString$b;
3015
+ var fails$6 = fails$q;
3025
3016
  var internalSort = arraySort;
3026
3017
  var arrayMethodIsStrict = arrayMethodIsStrict$2;
3027
3018
  var FF = engineFfVersion;
@@ -3030,21 +3021,21 @@ var V8 = engineV8Version;
3030
3021
  var WEBKIT = engineWebkitVersion;
3031
3022
 
3032
3023
  var test = [];
3033
- var nativeSort = uncurryThis$a(test.sort);
3034
- var push = uncurryThis$a(test.push);
3024
+ var nativeSort = uncurryThis$9(test.sort);
3025
+ var push = uncurryThis$9(test.push);
3035
3026
 
3036
3027
  // IE8-
3037
- var FAILS_ON_UNDEFINED = fails$7(function () {
3028
+ var FAILS_ON_UNDEFINED = fails$6(function () {
3038
3029
  test.sort(undefined);
3039
3030
  });
3040
3031
  // V8 bug
3041
- var FAILS_ON_NULL = fails$7(function () {
3032
+ var FAILS_ON_NULL = fails$6(function () {
3042
3033
  test.sort(null);
3043
3034
  });
3044
3035
  // Old WebKit
3045
3036
  var STRICT_METHOD = arrayMethodIsStrict('sort');
3046
3037
 
3047
- var STABLE_SORT = !fails$7(function () {
3038
+ var STABLE_SORT = !fails$6(function () {
3048
3039
  // feature detection can be too slow, so check engines versions
3049
3040
  if (V8) return V8 < 70;
3050
3041
  if (FF && FF > 3) return;
@@ -3086,22 +3077,22 @@ var getSortCompare = function (comparefn) {
3086
3077
  if (y === undefined) return -1;
3087
3078
  if (x === undefined) return 1;
3088
3079
  if (comparefn !== undefined) return +comparefn(x, y) || 0;
3089
- return toString$7(x) > toString$7(y) ? 1 : -1;
3080
+ return toString$6(x) > toString$6(y) ? 1 : -1;
3090
3081
  };
3091
3082
  };
3092
3083
 
3093
3084
  // `Array.prototype.sort` method
3094
3085
  // https://tc39.es/ecma262/#sec-array.prototype.sort
3095
- $$g({ target: 'Array', proto: true, forced: FORCED$3 }, {
3086
+ $$d({ target: 'Array', proto: true, forced: FORCED$3 }, {
3096
3087
  sort: function sort(comparefn) {
3097
3088
  if (comparefn !== undefined) aCallable$7(comparefn);
3098
3089
 
3099
- var array = toObject$2(this);
3090
+ var array = toObject$1(this);
3100
3091
 
3101
3092
  if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
3102
3093
 
3103
3094
  var items = [];
3104
- var arrayLength = lengthOfArrayLike$4(array);
3095
+ var arrayLength = lengthOfArrayLike$3(array);
3105
3096
  var itemsLength, index;
3106
3097
 
3107
3098
  for (index = 0; index < arrayLength; index++) {
@@ -3110,7 +3101,7 @@ $$g({ target: 'Array', proto: true, forced: FORCED$3 }, {
3110
3101
 
3111
3102
  internalSort(items, getSortCompare(comparefn));
3112
3103
 
3113
- itemsLength = lengthOfArrayLike$4(items);
3104
+ itemsLength = lengthOfArrayLike$3(items);
3114
3105
  index = 0;
3115
3106
 
3116
3107
  while (index < itemsLength) array[index] = items[index++];
@@ -3207,22 +3198,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
3207
3198
  } return false;
3208
3199
  };
3209
3200
 
3210
- var $$f = _export;
3211
- var uncurryThis$9 = functionUncurryThis;
3212
- var notARegExp$1 = notARegexp;
3213
- var requireObjectCoercible$3 = requireObjectCoercible$9;
3214
- var toString$6 = toString$c;
3215
- var correctIsRegExpLogic$1 = correctIsRegexpLogic;
3201
+ var $$c = _export;
3202
+ var uncurryThis$8 = functionUncurryThis;
3203
+ var notARegExp = notARegexp;
3204
+ var requireObjectCoercible$2 = requireObjectCoercible$8;
3205
+ var toString$5 = toString$b;
3206
+ var correctIsRegExpLogic = correctIsRegexpLogic;
3216
3207
 
3217
- var stringIndexOf = uncurryThis$9(''.indexOf);
3208
+ var stringIndexOf = uncurryThis$8(''.indexOf);
3218
3209
 
3219
3210
  // `String.prototype.includes` method
3220
3211
  // https://tc39.es/ecma262/#sec-string.prototype.includes
3221
- $$f({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
3212
+ $$c({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
3222
3213
  includes: function includes(searchString /* , position = 0 */) {
3223
3214
  return !!~stringIndexOf(
3224
- toString$6(requireObjectCoercible$3(this)),
3225
- toString$6(notARegExp$1(searchString)),
3215
+ toString$5(requireObjectCoercible$2(this)),
3216
+ toString$5(notARegExp(searchString)),
3226
3217
  arguments.length > 1 ? arguments[1] : undefined
3227
3218
  );
3228
3219
  }
@@ -3693,11 +3684,11 @@ var doesNotExceedSafeInteger$1 = function (it) {
3693
3684
  return it;
3694
3685
  };
3695
3686
 
3696
- var uncurryThis$8 = functionUncurryThisClause;
3687
+ var uncurryThis$7 = functionUncurryThisClause;
3697
3688
  var aCallable$6 = aCallable$a;
3698
3689
  var NATIVE_BIND = functionBindNative;
3699
3690
 
3700
- var bind$5 = uncurryThis$8(uncurryThis$8.bind);
3691
+ var bind$5 = uncurryThis$7(uncurryThis$7.bind);
3701
3692
 
3702
3693
  // optional / simple context binding
3703
3694
  var functionBindContext = function (fn, that) {
@@ -3708,13 +3699,13 @@ var functionBindContext = function (fn, that) {
3708
3699
  };
3709
3700
 
3710
3701
  var isArray$1 = isArray$2;
3711
- var lengthOfArrayLike$3 = lengthOfArrayLike$8;
3702
+ var lengthOfArrayLike$2 = lengthOfArrayLike$7;
3712
3703
  var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
3713
3704
  var bind$4 = functionBindContext;
3714
3705
 
3715
3706
  // `FlattenIntoArray` abstract operation
3716
3707
  // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
3717
- var flattenIntoArray$2 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
3708
+ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
3718
3709
  var targetIndex = start;
3719
3710
  var sourceIndex = 0;
3720
3711
  var mapFn = mapper ? bind$4(mapper, thisArg) : false;
@@ -3725,8 +3716,8 @@ var flattenIntoArray$2 = function (target, original, source, sourceLen, start, d
3725
3716
  element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
3726
3717
 
3727
3718
  if (depth > 0 && isArray$1(element)) {
3728
- elementLen = lengthOfArrayLike$3(element);
3729
- targetIndex = flattenIntoArray$2(target, original, element, elementLen, targetIndex, depth - 1) - 1;
3719
+ elementLen = lengthOfArrayLike$2(element);
3720
+ targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
3730
3721
  } else {
3731
3722
  doesNotExceedSafeInteger(targetIndex + 1);
3732
3723
  target[targetIndex] = element;
@@ -3739,24 +3730,24 @@ var flattenIntoArray$2 = function (target, original, source, sourceLen, start, d
3739
3730
  return targetIndex;
3740
3731
  };
3741
3732
 
3742
- var flattenIntoArray_1 = flattenIntoArray$2;
3733
+ var flattenIntoArray_1 = flattenIntoArray$1;
3743
3734
 
3744
- var uncurryThis$7 = functionUncurryThis;
3745
- var fails$6 = fails$r;
3746
- var isCallable$6 = isCallable$o;
3735
+ var uncurryThis$6 = functionUncurryThis;
3736
+ var fails$5 = fails$q;
3737
+ var isCallable$5 = isCallable$n;
3747
3738
  var classof$1 = classof$6;
3748
- var getBuiltIn$4 = getBuiltIn$9;
3739
+ var getBuiltIn$3 = getBuiltIn$8;
3749
3740
  var inspectSource$1 = inspectSource$3;
3750
3741
 
3751
3742
  var noop = function () { /* empty */ };
3752
3743
  var empty = [];
3753
- var construct = getBuiltIn$4('Reflect', 'construct');
3744
+ var construct = getBuiltIn$3('Reflect', 'construct');
3754
3745
  var constructorRegExp = /^\s*(?:class|function)\b/;
3755
- var exec$1 = uncurryThis$7(constructorRegExp.exec);
3746
+ var exec$1 = uncurryThis$6(constructorRegExp.exec);
3756
3747
  var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
3757
3748
 
3758
3749
  var isConstructorModern = function isConstructor(argument) {
3759
- if (!isCallable$6(argument)) return false;
3750
+ if (!isCallable$5(argument)) return false;
3760
3751
  try {
3761
3752
  construct(noop, empty, argument);
3762
3753
  return true;
@@ -3766,7 +3757,7 @@ var isConstructorModern = function isConstructor(argument) {
3766
3757
  };
3767
3758
 
3768
3759
  var isConstructorLegacy = function isConstructor(argument) {
3769
- if (!isCallable$6(argument)) return false;
3760
+ if (!isCallable$5(argument)) return false;
3770
3761
  switch (classof$1(argument)) {
3771
3762
  case 'AsyncFunction':
3772
3763
  case 'GeneratorFunction':
@@ -3786,7 +3777,7 @@ isConstructorLegacy.sham = true;
3786
3777
 
3787
3778
  // `IsConstructor` abstract operation
3788
3779
  // https://tc39.es/ecma262/#sec-isconstructor
3789
- var isConstructor$2 = !construct || fails$6(function () {
3780
+ var isConstructor$2 = !construct || fails$5(function () {
3790
3781
  var called;
3791
3782
  return isConstructorModern(isConstructorModern.call)
3792
3783
  || !isConstructorModern(Object)
@@ -3821,37 +3812,37 @@ var arraySpeciesConstructor = arraySpeciesConstructor$1;
3821
3812
 
3822
3813
  // `ArraySpeciesCreate` abstract operation
3823
3814
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
3824
- var arraySpeciesCreate$2 = function (originalArray, length) {
3815
+ var arraySpeciesCreate$1 = function (originalArray, length) {
3825
3816
  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
3826
3817
  };
3827
3818
 
3828
- var $$e = _export;
3829
- var flattenIntoArray$1 = flattenIntoArray_1;
3819
+ var $$b = _export;
3820
+ var flattenIntoArray = flattenIntoArray_1;
3830
3821
  var aCallable$5 = aCallable$a;
3831
- var toObject$1 = toObject$8;
3832
- var lengthOfArrayLike$2 = lengthOfArrayLike$8;
3833
- var arraySpeciesCreate$1 = arraySpeciesCreate$2;
3822
+ var toObject = toObject$7;
3823
+ var lengthOfArrayLike$1 = lengthOfArrayLike$7;
3824
+ var arraySpeciesCreate = arraySpeciesCreate$1;
3834
3825
 
3835
3826
  // `Array.prototype.flatMap` method
3836
3827
  // https://tc39.es/ecma262/#sec-array.prototype.flatmap
3837
- $$e({ target: 'Array', proto: true }, {
3828
+ $$b({ target: 'Array', proto: true }, {
3838
3829
  flatMap: function flatMap(callbackfn /* , thisArg */) {
3839
- var O = toObject$1(this);
3840
- var sourceLen = lengthOfArrayLike$2(O);
3830
+ var O = toObject(this);
3831
+ var sourceLen = lengthOfArrayLike$1(O);
3841
3832
  var A;
3842
3833
  aCallable$5(callbackfn);
3843
- A = arraySpeciesCreate$1(O, 0);
3844
- A.length = flattenIntoArray$1(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3834
+ A = arraySpeciesCreate(O, 0);
3835
+ A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3845
3836
  return A;
3846
3837
  }
3847
3838
  });
3848
3839
 
3849
3840
  // this method was added to unscopables after implementation
3850
3841
  // in popular engines, so it's moved to a separate module
3851
- var addToUnscopables$1 = addToUnscopables$4;
3842
+ var addToUnscopables = addToUnscopables$3;
3852
3843
 
3853
3844
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3854
- addToUnscopables$1('flatMap');
3845
+ addToUnscopables('flatMap');
3855
3846
 
3856
3847
  const renderDivider = (divider, index) => Array.isArray(divider) ? divider[index] : divider;
3857
3848
  const InputGroup = _a => {
@@ -3971,42 +3962,42 @@ const InputGroup = _a => {
3971
3962
  }));
3972
3963
  };
3973
3964
 
3974
- var uncurryThis$6 = functionUncurryThis;
3965
+ var uncurryThis$5 = functionUncurryThis;
3975
3966
 
3976
3967
  // `thisNumberValue` abstract operation
3977
3968
  // https://tc39.es/ecma262/#sec-thisnumbervalue
3978
- var thisNumberValue$1 = uncurryThis$6(1.0.valueOf);
3969
+ var thisNumberValue$1 = uncurryThis$5(1.0.valueOf);
3979
3970
 
3980
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$7;
3981
- var toString$5 = toString$c;
3982
- var requireObjectCoercible$2 = requireObjectCoercible$9;
3971
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$6;
3972
+ var toString$4 = toString$b;
3973
+ var requireObjectCoercible$1 = requireObjectCoercible$8;
3983
3974
 
3984
3975
  var $RangeError$1 = RangeError;
3985
3976
 
3986
3977
  // `String.prototype.repeat` method implementation
3987
3978
  // https://tc39.es/ecma262/#sec-string.prototype.repeat
3988
3979
  var stringRepeat = function repeat(count) {
3989
- var str = toString$5(requireObjectCoercible$2(this));
3980
+ var str = toString$4(requireObjectCoercible$1(this));
3990
3981
  var result = '';
3991
- var n = toIntegerOrInfinity$2(count);
3982
+ var n = toIntegerOrInfinity$1(count);
3992
3983
  if (n < 0 || n == Infinity) throw $RangeError$1('Wrong number of repetitions');
3993
3984
  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
3994
3985
  return result;
3995
3986
  };
3996
3987
 
3997
- var $$d = _export;
3998
- var uncurryThis$5 = functionUncurryThis;
3999
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$7;
3988
+ var $$a = _export;
3989
+ var uncurryThis$4 = functionUncurryThis;
3990
+ var toIntegerOrInfinity = toIntegerOrInfinity$6;
4000
3991
  var thisNumberValue = thisNumberValue$1;
4001
3992
  var $repeat = stringRepeat;
4002
- var fails$5 = fails$r;
3993
+ var fails$4 = fails$q;
4003
3994
 
4004
3995
  var $RangeError = RangeError;
4005
3996
  var $String = String;
4006
3997
  var floor = Math.floor;
4007
- var repeat = uncurryThis$5($repeat);
4008
- var stringSlice$2 = uncurryThis$5(''.slice);
4009
- var nativeToFixed = uncurryThis$5(1.0.toFixed);
3998
+ var repeat = uncurryThis$4($repeat);
3999
+ var stringSlice$1 = uncurryThis$4(''.slice);
4000
+ var nativeToFixed = uncurryThis$4(1.0.toFixed);
4010
4001
 
4011
4002
  var pow = function (x, n, acc) {
4012
4003
  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
@@ -4056,22 +4047,22 @@ var dataToString = function (data) {
4056
4047
  } return s;
4057
4048
  };
4058
4049
 
4059
- var FORCED$2 = fails$5(function () {
4050
+ var FORCED$2 = fails$4(function () {
4060
4051
  return nativeToFixed(0.00008, 3) !== '0.000' ||
4061
4052
  nativeToFixed(0.9, 0) !== '1' ||
4062
4053
  nativeToFixed(1.255, 2) !== '1.25' ||
4063
4054
  nativeToFixed(1000000000000000128.0, 0) !== '1000000000000000128';
4064
- }) || !fails$5(function () {
4055
+ }) || !fails$4(function () {
4065
4056
  // V8 ~ Android 4.3-
4066
4057
  nativeToFixed({});
4067
4058
  });
4068
4059
 
4069
4060
  // `Number.prototype.toFixed` method
4070
4061
  // https://tc39.es/ecma262/#sec-number.prototype.tofixed
4071
- $$d({ target: 'Number', proto: true, forced: FORCED$2 }, {
4062
+ $$a({ target: 'Number', proto: true, forced: FORCED$2 }, {
4072
4063
  toFixed: function toFixed(fractionDigits) {
4073
4064
  var number = thisNumberValue(this);
4074
- var fractDigits = toIntegerOrInfinity$1(fractionDigits);
4065
+ var fractDigits = toIntegerOrInfinity(fractionDigits);
4075
4066
  var data = [0, 0, 0, 0, 0, 0];
4076
4067
  var sign = '';
4077
4068
  var result = '0';
@@ -4118,7 +4109,7 @@ $$d({ target: 'Number', proto: true, forced: FORCED$2 }, {
4118
4109
  k = result.length;
4119
4110
  result = sign + (k <= fractDigits
4120
4111
  ? '0.' + repeat('0', fractDigits - k) + result
4121
- : stringSlice$2(result, 0, k - fractDigits) + '.' + stringSlice$2(result, k - fractDigits));
4112
+ : stringSlice$1(result, 0, k - fractDigits) + '.' + stringSlice$1(result, k - fractDigits));
4122
4113
  } else {
4123
4114
  result = sign + result;
4124
4115
  } return result;
@@ -4126,34 +4117,34 @@ $$d({ target: 'Number', proto: true, forced: FORCED$2 }, {
4126
4117
  });
4127
4118
 
4128
4119
  var global$a = global$p;
4129
- var fails$4 = fails$r;
4130
- var uncurryThis$4 = functionUncurryThis;
4131
- var toString$4 = toString$c;
4120
+ var fails$3 = fails$q;
4121
+ var uncurryThis$3 = functionUncurryThis;
4122
+ var toString$3 = toString$b;
4132
4123
  var trim$1 = stringTrim.trim;
4133
4124
  var whitespaces$1 = whitespaces$4;
4134
4125
 
4135
- var charAt = uncurryThis$4(''.charAt);
4126
+ var charAt = uncurryThis$3(''.charAt);
4136
4127
  var $parseFloat$1 = global$a.parseFloat;
4137
4128
  var Symbol$2 = global$a.Symbol;
4138
4129
  var ITERATOR$4 = Symbol$2 && Symbol$2.iterator;
4139
4130
  var FORCED$1 = 1 / $parseFloat$1(whitespaces$1 + '-0') !== -Infinity
4140
4131
  // MS Edge 18- broken with boxed symbols
4141
- || (ITERATOR$4 && !fails$4(function () { $parseFloat$1(Object(ITERATOR$4)); }));
4132
+ || (ITERATOR$4 && !fails$3(function () { $parseFloat$1(Object(ITERATOR$4)); }));
4142
4133
 
4143
4134
  // `parseFloat` method
4144
4135
  // https://tc39.es/ecma262/#sec-parsefloat-string
4145
4136
  var numberParseFloat = FORCED$1 ? function parseFloat(string) {
4146
- var trimmedString = trim$1(toString$4(string));
4137
+ var trimmedString = trim$1(toString$3(string));
4147
4138
  var result = $parseFloat$1(trimmedString);
4148
4139
  return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;
4149
4140
  } : $parseFloat$1;
4150
4141
 
4151
- var $$c = _export;
4142
+ var $$9 = _export;
4152
4143
  var $parseFloat = numberParseFloat;
4153
4144
 
4154
4145
  // `parseFloat` method
4155
4146
  // https://tc39.es/ecma262/#sec-parsefloat-string
4156
- $$c({ global: true, forced: parseFloat != $parseFloat }, {
4147
+ $$9({ global: true, forced: parseFloat != $parseFloat }, {
4157
4148
  parseFloat: $parseFloat
4158
4149
  });
4159
4150
 
@@ -4161,16 +4152,16 @@ const useUtils = () => {
4161
4152
  const getCurrencySymbol = React.useCallback(currency => {
4162
4153
  let currencySymbol = undefined;
4163
4154
  switch (currency) {
4164
- case jsApi.SE.Currency.USD:
4165
- case jsApi.SE.Currency.CAD:
4166
- case jsApi.SE.Currency.AUD:
4167
- case jsApi.SE.Currency.NZD:
4155
+ case alchemy.SE.Currency.USD:
4156
+ case alchemy.SE.Currency.CAD:
4157
+ case alchemy.SE.Currency.AUD:
4158
+ case alchemy.SE.Currency.NZD:
4168
4159
  currencySymbol = "$";
4169
4160
  break;
4170
- case jsApi.SE.Currency.GBP:
4161
+ case alchemy.SE.Currency.GBP:
4171
4162
  currencySymbol = "£‎";
4172
4163
  break;
4173
- case jsApi.SE.Currency.EUR:
4164
+ case alchemy.SE.Currency.EUR:
4174
4165
  currencySymbol = "€";
4175
4166
  break;
4176
4167
  }
@@ -4201,7 +4192,7 @@ const transform$3 = {
4201
4192
  var _a;
4202
4193
  return {
4203
4194
  amount: (_a = hasFocus ? amount : Number.isNaN(amount !== null && amount !== void 0 ? amount : NaN) ? "" : Number(amount).toFixed(2)) !== null && _a !== void 0 ? _a : "",
4204
- currency: currency !== null && currency !== void 0 ? currency : jsApi.SE.Currency.USD
4195
+ currency: currency !== null && currency !== void 0 ? currency : alchemy.SE.Currency.USD
4205
4196
  };
4206
4197
  },
4207
4198
  out: ({
@@ -4254,7 +4245,7 @@ const MoneyInput = _a => {
4254
4245
  } else {
4255
4246
  onChange(transform$3.out({
4256
4247
  amount: parseFloat(event.target.value),
4257
- currency: jsApi.SE.Currency.USD
4248
+ currency: alchemy.SE.Currency.USD
4258
4249
  }));
4259
4250
  }
4260
4251
  },
@@ -4286,9 +4277,9 @@ const MoneyInput = _a => {
4286
4277
  };
4287
4278
 
4288
4279
  var global$9 = global$p;
4289
- var fails$3 = fails$r;
4290
- var uncurryThis$3 = functionUncurryThis;
4291
- var toString$3 = toString$c;
4280
+ var fails$2 = fails$q;
4281
+ var uncurryThis$2 = functionUncurryThis;
4282
+ var toString$2 = toString$b;
4292
4283
  var trim = stringTrim.trim;
4293
4284
  var whitespaces = whitespaces$4;
4294
4285
 
@@ -4296,24 +4287,24 @@ var $parseInt$1 = global$9.parseInt;
4296
4287
  var Symbol$1 = global$9.Symbol;
4297
4288
  var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
4298
4289
  var hex = /^[+-]?0x/i;
4299
- var exec = uncurryThis$3(hex.exec);
4290
+ var exec = uncurryThis$2(hex.exec);
4300
4291
  var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
4301
4292
  // MS Edge 18- broken with boxed symbols
4302
- || (ITERATOR$3 && !fails$3(function () { $parseInt$1(Object(ITERATOR$3)); }));
4293
+ || (ITERATOR$3 && !fails$2(function () { $parseInt$1(Object(ITERATOR$3)); }));
4303
4294
 
4304
4295
  // `parseInt` method
4305
4296
  // https://tc39.es/ecma262/#sec-parseint-string-radix
4306
4297
  var numberParseInt = FORCED ? function parseInt(string, radix) {
4307
- var S = trim(toString$3(string));
4298
+ var S = trim(toString$2(string));
4308
4299
  return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
4309
4300
  } : $parseInt$1;
4310
4301
 
4311
- var $$b = _export;
4302
+ var $$8 = _export;
4312
4303
  var $parseInt = numberParseInt;
4313
4304
 
4314
4305
  // `parseInt` method
4315
4306
  // https://tc39.es/ecma262/#sec-parseint-string-radix
4316
- $$b({ global: true, forced: parseInt != $parseInt }, {
4307
+ $$8({ global: true, forced: parseInt != $parseInt }, {
4317
4308
  parseInt: $parseInt
4318
4309
  });
4319
4310
 
@@ -4374,24 +4365,24 @@ var regexpGetFlags = function (R) {
4374
4365
  };
4375
4366
 
4376
4367
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4377
- var defineBuiltIn$3 = defineBuiltIn$8;
4368
+ var defineBuiltIn$2 = defineBuiltIn$7;
4378
4369
  var anObject$6 = anObject$f;
4379
- var $toString = toString$c;
4380
- var fails$2 = fails$r;
4370
+ var $toString = toString$b;
4371
+ var fails$1 = fails$q;
4381
4372
  var getRegExpFlags = regexpGetFlags;
4382
4373
 
4383
4374
  var TO_STRING = 'toString';
4384
4375
  var RegExpPrototype = RegExp.prototype;
4385
4376
  var nativeToString = RegExpPrototype[TO_STRING];
4386
4377
 
4387
- var NOT_GENERIC = fails$2(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
4378
+ var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
4388
4379
  // FF44- RegExp#toString has a wrong name
4389
4380
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
4390
4381
 
4391
4382
  // `RegExp.prototype.toString` method
4392
4383
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
4393
4384
  if (NOT_GENERIC || INCORRECT_NAME) {
4394
- defineBuiltIn$3(RegExp.prototype, TO_STRING, function toString() {
4385
+ defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
4395
4386
  var R = anObject$6(this);
4396
4387
  var pattern = $toString(R.source);
4397
4388
  var flags = $toString(getRegExpFlags(R));
@@ -4589,7 +4580,7 @@ const CostBreakdown = ({
4589
4580
  }, {
4590
4581
  children: formatMoney({
4591
4582
  amount: totalAmount,
4592
- currency: (shippingAmount === null || shippingAmount === void 0 ? void 0 : shippingAmount.currency) || jsApi.SE.Currency.USD
4583
+ currency: (shippingAmount === null || shippingAmount === void 0 ? void 0 : shippingAmount.currency) || alchemy.SE.Currency.USD
4593
4584
  })
4594
4585
  })), showExtendedData && !!(priceItems === null || priceItems === void 0 ? void 0 : priceItems.length) && jsxRuntime.jsx("table", Object.assign({
4595
4586
  css: getTableStyles
@@ -4654,7 +4645,6 @@ const RateCard = ({
4654
4645
  insuranceAmount,
4655
4646
  isAcknowledged,
4656
4647
  messages,
4657
- displayNickname,
4658
4648
  onClick,
4659
4649
  onClickAcknowledgement,
4660
4650
  otherAmount,
@@ -4699,7 +4689,7 @@ const RateCard = ({
4699
4689
  css: getServiceTypeStyles
4700
4690
  }, {
4701
4691
  children: serviceType
4702
- })), displayNickname && carrierNickname && jsxRuntime.jsx(giger.Typography, Object.assign({
4692
+ })), carrierNickname && jsxRuntime.jsx(giger.Typography, Object.assign({
4703
4693
  css: getCarrierNameStyles
4704
4694
  }, {
4705
4695
  children: carrierNickname
@@ -4781,8 +4771,8 @@ const RateSelect = _a => {
4781
4771
  role: "radiogroup"
4782
4772
  }, {
4783
4773
  children: options === null || options === void 0 ? void 0 : options.map(option => react.createElement(RateCard, Object.assign({}, optionWithEnabledData(option), {
4774
+ carrierNickname: nicknameFeature ? option.carrierNickname : undefined,
4784
4775
  css: getRateCardOptionStyles,
4785
- displayNickname: nicknameFeature,
4786
4776
  isAcknowledged: field.value.isAcknowledged,
4787
4777
  key: option.rateId,
4788
4778
  onClick: rateId => {
@@ -5045,9 +5035,9 @@ const useConfirmationOptions = () => {
5045
5035
  const {
5046
5036
  t
5047
5037
  } = reactI18next.useTranslation("common");
5048
- return React.useMemo(() => Object.values(jsApi.SE.ConfirmationType)
5038
+ return React.useMemo(() => Object.values(alchemy.SE.ConfirmationType)
5049
5039
  // TODO: Remove this filter once these options are better supported by UpdateShipment
5050
- .filter(v => v !== jsApi.SE.ConfirmationType.DELIVERY_MAILED && v !== jsApi.SE.ConfirmationType.DIRECT_SIGNATURE && v !== jsApi.SE.ConfirmationType.VERBAL_CONFIRMATION).flatMap(v => v === "none" ? [] : {
5040
+ .filter(v => v !== alchemy.SE.ConfirmationType.DELIVERY_MAILED && v !== alchemy.SE.ConfirmationType.DIRECT_SIGNATURE && v !== alchemy.SE.ConfirmationType.VERBAL_CONFIRMATION).flatMap(v => v === "none" ? [] : {
5051
5041
  label: t(`confirmationTypes.${humps.camelize(v)}`),
5052
5042
  value: v
5053
5043
  }), [t]);
@@ -5062,7 +5052,7 @@ const useCustomsContentsOptions = () => {
5062
5052
  const {
5063
5053
  t
5064
5054
  } = reactI18next.useTranslation("common");
5065
- return React.useMemo(() => Object.values(jsApi.SE.CustomsContentsType).flatMap(v => ({
5055
+ return React.useMemo(() => Object.values(alchemy.SE.CustomsContentsType).flatMap(v => ({
5066
5056
  label: t(`customs.contents.${humps.camelize(v)}`),
5067
5057
  value: v
5068
5058
  })), [t]);
@@ -5072,7 +5062,7 @@ const useCustomsNonDeliveryOptions = () => {
5072
5062
  const {
5073
5063
  t
5074
5064
  } = reactI18next.useTranslation("common");
5075
- return React.useMemo(() => Object.values(jsApi.SE.CustomsNonDeliveryType).flatMap(v => ({
5065
+ return React.useMemo(() => Object.values(alchemy.SE.CustomsNonDeliveryType).flatMap(v => ({
5076
5066
  label: t(`customs.nonDelivery.${humps.camelize(v)}`),
5077
5067
  value: v
5078
5068
  })), [t]);
@@ -5156,7 +5146,7 @@ const useInsuranceProviderOptions = (insuranceAccount, features) => {
5156
5146
  const {
5157
5147
  t
5158
5148
  } = reactI18next.useTranslation("common");
5159
- return React.useMemo(() => Object.values(jsApi.SE.InsuranceProviderType).flatMap(v => v === "none" || v === "third_party" && !(features === null || features === void 0 ? void 0 : features.includeThirdPartyInsurance) || v === "shipsurance" && !(insuranceAccount === null || insuranceAccount === void 0 ? void 0 : insuranceAccount.amount) && !(features === null || features === void 0 ? void 0 : features.includeShipsuranceInsurance) ? [] : {
5149
+ return React.useMemo(() => Object.values(alchemy.SE.InsuranceProviderType).flatMap(v => v === "none" || v === "third_party" && !(features === null || features === void 0 ? void 0 : features.includeThirdPartyInsurance) || v === "shipsurance" && !(insuranceAccount === null || insuranceAccount === void 0 ? void 0 : insuranceAccount.amount) && !(features === null || features === void 0 ? void 0 : features.includeShipsuranceInsurance) ? [] : {
5160
5150
  label: t(`insuranceProviders.${humps.camelize(v)}`),
5161
5151
  value: v
5162
5152
  }), [t, insuranceAccount, features === null || features === void 0 ? void 0 : features.includeThirdPartyInsurance, features === null || features === void 0 ? void 0 : features.includeShipsuranceInsurance]);
@@ -5445,6 +5435,24 @@ const useCarrierMetadata = carrierCodes => {
5445
5435
  }) : carrierMetadatas;
5446
5436
  };
5447
5437
 
5438
+ /**
5439
+ * A no-frills wrapper around React.createPortal for more elegant DOM composition
5440
+ *
5441
+ * @category Components
5442
+ *
5443
+ * @see {@link useNestedForm}
5444
+ */
5445
+ const Portal = ({
5446
+ children,
5447
+ target
5448
+ }) => {
5449
+ if (target) {
5450
+ if (target instanceof HTMLElement) return /*#__PURE__*/reactDom.createPortal(children, target);
5451
+ if (target.current) return /*#__PURE__*/reactDom.createPortal(children, target.current);
5452
+ }
5453
+ return null;
5454
+ };
5455
+
5448
5456
  const RootPortalContext = /*#__PURE__*/React.createContext(undefined);
5449
5457
  RootPortalContext.displayName = "RootPortalContext";
5450
5458
  /**
@@ -5485,75 +5493,6 @@ const useRootPortal = () => {
5485
5493
  return rootPortal;
5486
5494
  };
5487
5495
 
5488
- /**
5489
- * @category Contexts
5490
- */
5491
- const ElementsContext = /*#__PURE__*/React.createContext(undefined);
5492
- /**
5493
- * @category Providers
5494
- */
5495
- const ElementsProvider = ({
5496
- baseURL,
5497
- brandName,
5498
- children,
5499
- environment: _environment = "production",
5500
- getToken,
5501
- onError
5502
- }) => {
5503
- const value = React.useMemo(() => ({
5504
- brandName,
5505
- environment: _environment,
5506
- onError
5507
- }), [_environment, onError, brandName]);
5508
- return jsxRuntime.jsx(reactApi.ShipEngine, Object.assign({
5509
- baseURL: baseURL,
5510
- getToken: getToken,
5511
- headers: {
5512
- "x-shipengine-environment": `${_environment}`
5513
- }
5514
- }, {
5515
- children: jsxRuntime.jsx(ElementsContext.Provider, Object.assign({
5516
- value: value
5517
- }, {
5518
- children: jsxRuntime.jsx(RootPortalProvider, {
5519
- children: children
5520
- })
5521
- }))
5522
- }));
5523
- };
5524
- /**
5525
- * Must be used within {@link ElementsProvider}
5526
- *
5527
- * @category Elements Hooks
5528
- *
5529
- * @see {@link registerElement}
5530
- */
5531
- const useElements = () => {
5532
- const context = React.useContext(ElementsContext);
5533
- if (!context) {
5534
- throw new Error("useElements must be called from within the scope of ElementsProvider");
5535
- }
5536
- return context;
5537
- };
5538
-
5539
- /**
5540
- * A no-frills wrapper around React.createPortal for more elegant DOM composition
5541
- *
5542
- * @category Components
5543
- *
5544
- * @see {@link useNestedForm}
5545
- */
5546
- const Portal = ({
5547
- children,
5548
- target
5549
- }) => {
5550
- if (target) {
5551
- if (target instanceof HTMLElement) return /*#__PURE__*/reactDom.createPortal(children, target);
5552
- if (target.current) return /*#__PURE__*/reactDom.createPortal(children, target.current);
5553
- }
5554
- return null;
5555
- };
5556
-
5557
5496
  /**
5558
5497
  * Returns a nested form element that can be rendered within another form
5559
5498
  *
@@ -5759,7 +5698,7 @@ var call$5 = functionCall;
5759
5698
  var anObject$3 = anObject$f;
5760
5699
  var tryToString$1 = tryToString$5;
5761
5700
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
5762
- var lengthOfArrayLike$1 = lengthOfArrayLike$8;
5701
+ var lengthOfArrayLike = lengthOfArrayLike$7;
5763
5702
  var isPrototypeOf$2 = objectIsPrototypeOf;
5764
5703
  var getIterator = getIterator$1;
5765
5704
  var getIteratorMethod = getIteratorMethod$2;
@@ -5804,7 +5743,7 @@ var iterate$3 = function (iterable, unboundFunction, options) {
5804
5743
  if (!iterFn) throw $TypeError$4(tryToString$1(iterable) + ' is not iterable');
5805
5744
  // optimisation for array iterators
5806
5745
  if (isArrayIteratorMethod(iterFn)) {
5807
- for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
5746
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
5808
5747
  result = callFn(iterable[index]);
5809
5748
  if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
5810
5749
  } return new Result(false);
@@ -5823,13 +5762,13 @@ var iterate$3 = function (iterable, unboundFunction, options) {
5823
5762
  } return new Result(false);
5824
5763
  };
5825
5764
 
5826
- var $$a = _export;
5765
+ var $$7 = _export;
5827
5766
  var iterate$2 = iterate$3;
5828
5767
  var createProperty = createProperty$2;
5829
5768
 
5830
5769
  // `Object.fromEntries` method
5831
5770
  // https://github.com/tc39/proposal-object-from-entries
5832
- $$a({ target: 'Object', stat: true }, {
5771
+ $$7({ target: 'Object', stat: true }, {
5833
5772
  fromEntries: function fromEntries(iterable) {
5834
5773
  var obj = {};
5835
5774
  iterate$2(iterable, function (k, v) {
@@ -5844,7 +5783,7 @@ const useAddressValidation = () => {
5844
5783
  const {
5845
5784
  error: validateAddressErrors,
5846
5785
  mutateAsync: validateAddresses
5847
- } = reactApi.useValidateAddresses();
5786
+ } = alchemy.useValidateAddresses();
5848
5787
  const caseInsensitiveCompare = React.useCallback((matched, original) => {
5849
5788
  if (matched === undefined || original === undefined) return false;
5850
5789
  const originalAddress = Object.fromEntries(Object.entries(original).map(([key, value]) => [key, typeof value == "string" ? value.toLowerCase() : value]));
@@ -6155,9 +6094,9 @@ var call$4 = functionCall;
6155
6094
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
6156
6095
  var anObject$2 = anObject$f;
6157
6096
  var isNullOrUndefined$1 = isNullOrUndefined$6;
6158
- var toLength$1 = toLength$4;
6159
- var toString$2 = toString$c;
6160
- var requireObjectCoercible$1 = requireObjectCoercible$9;
6097
+ var toLength = toLength$3;
6098
+ var toString$1 = toString$b;
6099
+ var requireObjectCoercible = requireObjectCoercible$8;
6161
6100
  var getMethod = getMethod$5;
6162
6101
  var advanceStringIndex = advanceStringIndex$2;
6163
6102
  var regExpExec = regexpExecAbstract;
@@ -6168,15 +6107,15 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
6168
6107
  // `String.prototype.match` method
6169
6108
  // https://tc39.es/ecma262/#sec-string.prototype.match
6170
6109
  function match(regexp) {
6171
- var O = requireObjectCoercible$1(this);
6110
+ var O = requireObjectCoercible(this);
6172
6111
  var matcher = isNullOrUndefined$1(regexp) ? undefined : getMethod(regexp, MATCH);
6173
- return matcher ? call$4(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$2(O));
6112
+ return matcher ? call$4(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$1(O));
6174
6113
  },
6175
6114
  // `RegExp.prototype[@@match]` method
6176
6115
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
6177
6116
  function (string) {
6178
6117
  var rx = anObject$2(this);
6179
- var S = toString$2(string);
6118
+ var S = toString$1(string);
6180
6119
  var res = maybeCallNative(nativeMatch, rx, S);
6181
6120
 
6182
6121
  if (res.done) return res.value;
@@ -6189,9 +6128,9 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
6189
6128
  var n = 0;
6190
6129
  var result;
6191
6130
  while ((result = regExpExec(rx, S)) !== null) {
6192
- var matchStr = toString$2(result[0]);
6131
+ var matchStr = toString$1(result[0]);
6193
6132
  A[n] = matchStr;
6194
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$1(rx.lastIndex), fullUnicode);
6133
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
6195
6134
  n++;
6196
6135
  }
6197
6136
  return n === 0 ? null : A;
@@ -6218,7 +6157,7 @@ const addressSchema = zod.z.object({
6218
6157
 
6219
6158
  extendZod();
6220
6159
  const postalCodeRegex$2 = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
6221
- const addressFormSchema = addressSchema.refine(schema => !schema.phone || min$4.isValidPhoneNumber(schema.phone, schema.countryCode), {
6160
+ const addressFormSchema = addressSchema.refine(schema => !schema.phone || min$3.isValidPhoneNumber(schema.phone, schema.countryCode), {
6222
6161
  message: "schemaErrors.notAValidPhoneNumber",
6223
6162
  path: ["phone"]
6224
6163
  }).refine(schema => {
@@ -6457,7 +6396,7 @@ const addCarrierSchema = zod.z.object({
6457
6396
  addressResidentialIndicator: zod.z.preprocess(v => v === "yes" ? true : false, zod.z.boolean().default(false).transform(value => value ? "yes" : "no")),
6458
6397
  companyName: zod.z.string().trim().min(1),
6459
6398
  phone: zod.z.string().trim().min(1)
6460
- }).refine(schema => min$4.isValidPhoneNumber(schema.phone, schema.countryCode), {
6399
+ }).refine(schema => min$3.isValidPhoneNumber(schema.phone, schema.countryCode), {
6461
6400
  message: "schemaErrors.notAValidPhoneNumber",
6462
6401
  path: ["phone"]
6463
6402
  }).refine(schema => {
@@ -6769,6 +6708,16 @@ const AddressPreferenceDisplay = ({
6769
6708
  yield onChangePreference === null || onChangePreference === void 0 ? void 0 : onChangePreference(selectedAddress);
6770
6709
  }), [addressPreference, onChangePreference]);
6771
6710
  const disclosureContentTitle = React.useMemo(() => addressPreference.status === "verified" ? t(`address.preference.${addressPreference.alternativeSource}`) : t("address.preference.addressNotValidated"), [addressPreference, t]);
6711
+ const isVerified = React.useMemo(() => {
6712
+ if (isDomesticAddress(addressPreference.selection) || addressPreference.selectionSource === "matchedAddress") {
6713
+ return addressPreference.status === "verified";
6714
+ }
6715
+ // If the address is international and is modified, We might get "verified" even though we are displaying original "not verified" address
6716
+ if (addressPreference.isModified) {
6717
+ return false;
6718
+ }
6719
+ return addressPreference.status === "verified";
6720
+ }, [addressPreference]);
6772
6721
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6773
6722
  children: [jsxRuntime.jsx(AddressDisplay, {
6774
6723
  address: addressPreference.selection,
@@ -6779,13 +6728,13 @@ const AddressPreferenceDisplay = ({
6779
6728
  }), jsxRuntime.jsx(Disclosure, Object.assign({
6780
6729
  "data-testid": "address-preference-disclosure",
6781
6730
  label: jsxRuntime.jsx(giger.Tag, Object.assign({
6782
- color: addressPreference.status === "verified" ? giger.TagColor.SUCCESS : giger.TagColor.ERROR
6731
+ color: isVerified ? giger.TagColor.SUCCESS : giger.TagColor.ERROR
6783
6732
  }, {
6784
- children: addressPreference.status === "verified" ? t("address.validation.validated") : t("address.validation.notValidated")
6733
+ children: isVerified ? t("address.validation.validated") : t("address.validation.notValidated")
6785
6734
  })),
6786
6735
  onToggle: isOpen => onToggleDisclosure === null || onToggleDisclosure === void 0 ? void 0 : onToggleDisclosure(isOpen, addressPreference),
6787
6736
  // Only default to open if the address was unable to be verified
6788
- open: addressPreference.status !== "verified",
6737
+ open: !isVerified,
6789
6738
  showToggle: addressPreference.status === "error" || !!addressPreference.alternative
6790
6739
  }, {
6791
6740
  children: toggleDisclosure => jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -6846,7 +6795,7 @@ const baseSchema = addressSchema.extend({
6846
6795
  addressResidentialIndicator: zod.z.preprocess(v => v === "yes" ? true : false, zod.z.boolean().default(false).transform(value => value ? "yes" : "no")),
6847
6796
  companyName: zod.z.string().trim().min(1),
6848
6797
  phone: zod.z.string().trim().min(1)
6849
- }).refine(schema => min$4.isValidPhoneNumber(schema.phone, schema.countryCode), {
6798
+ }).refine(schema => min$3.isValidPhoneNumber(schema.phone, schema.countryCode), {
6850
6799
  message: "schemaErrors.notAValidPhoneNumber",
6851
6800
  path: ["phone"]
6852
6801
  }).refine(schema => {
@@ -7105,28 +7054,28 @@ const CarrierTermsForm = ({
7105
7054
  }));
7106
7055
  };
7107
7056
 
7108
- var $$9 = _export;
7057
+ var $$6 = _export;
7109
7058
  var DESCRIPTORS$1 = descriptors;
7110
7059
  var global$8 = global$p;
7111
- var uncurryThis$2 = functionUncurryThis;
7060
+ var uncurryThis$1 = functionUncurryThis;
7112
7061
  var hasOwn$1 = hasOwnProperty_1;
7113
- var isCallable$5 = isCallable$o;
7062
+ var isCallable$4 = isCallable$n;
7114
7063
  var isPrototypeOf$1 = objectIsPrototypeOf;
7115
- var toString$1 = toString$c;
7064
+ var toString = toString$b;
7116
7065
  var defineProperty = objectDefineProperty.f;
7117
7066
  var copyConstructorProperties = copyConstructorProperties$2;
7118
7067
 
7119
7068
  var NativeSymbol = global$8.Symbol;
7120
7069
  var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
7121
7070
 
7122
- if (DESCRIPTORS$1 && isCallable$5(NativeSymbol) && (!('description' in SymbolPrototype) ||
7071
+ if (DESCRIPTORS$1 && isCallable$4(NativeSymbol) && (!('description' in SymbolPrototype) ||
7123
7072
  // Safari 12 bug
7124
7073
  NativeSymbol().description !== undefined
7125
7074
  )) {
7126
7075
  var EmptyStringDescriptionStore = {};
7127
7076
  // wrap Symbol constructor for correct work with undefined description
7128
7077
  var SymbolWrapper = function Symbol() {
7129
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$1(arguments[0]);
7078
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
7130
7079
  var result = isPrototypeOf$1(SymbolPrototype, this)
7131
7080
  ? new NativeSymbol(description)
7132
7081
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
@@ -7140,11 +7089,11 @@ if (DESCRIPTORS$1 && isCallable$5(NativeSymbol) && (!('description' in SymbolPro
7140
7089
  SymbolPrototype.constructor = SymbolWrapper;
7141
7090
 
7142
7091
  var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
7143
- var thisSymbolValue = uncurryThis$2(SymbolPrototype.valueOf);
7144
- var symbolDescriptiveString = uncurryThis$2(SymbolPrototype.toString);
7092
+ var thisSymbolValue = uncurryThis$1(SymbolPrototype.valueOf);
7093
+ var symbolDescriptiveString = uncurryThis$1(SymbolPrototype.toString);
7145
7094
  var regexp = /^Symbol\((.*)\)[^)]+$/;
7146
- var replace = uncurryThis$2(''.replace);
7147
- var stringSlice$1 = uncurryThis$2(''.slice);
7095
+ var replace = uncurryThis$1(''.replace);
7096
+ var stringSlice = uncurryThis$1(''.slice);
7148
7097
 
7149
7098
  defineProperty(SymbolPrototype, 'description', {
7150
7099
  configurable: true,
@@ -7152,12 +7101,12 @@ if (DESCRIPTORS$1 && isCallable$5(NativeSymbol) && (!('description' in SymbolPro
7152
7101
  var symbol = thisSymbolValue(this);
7153
7102
  if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
7154
7103
  var string = symbolDescriptiveString(symbol);
7155
- var desc = NATIVE_SYMBOL ? stringSlice$1(string, 7, -1) : replace(string, regexp, '$1');
7104
+ var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
7156
7105
  return desc === '' ? undefined : desc;
7157
7106
  }
7158
7107
  });
7159
7108
 
7160
- $$9({ global: true, constructor: true, forced: true }, {
7109
+ $$6({ global: true, constructor: true, forced: true }, {
7161
7110
  Symbol: SymbolWrapper
7162
7111
  });
7163
7112
  }
@@ -7167,13 +7116,13 @@ if (DESCRIPTORS$1 && isCallable$5(NativeSymbol) && (!('description' in SymbolPro
7167
7116
  */
7168
7117
  const moneySchema = zod.z.object({
7169
7118
  amount: zod.z.number().nonnegative(),
7170
- currency: zod.z.nativeEnum(jsApi.SE.Currency)
7119
+ currency: zod.z.nativeEnum(alchemy.SE.Currency)
7171
7120
  });
7172
7121
 
7173
7122
  /**
7174
7123
  * @category Form Validation
7175
7124
  */
7176
- const phoneSchema = (defaultCountryCode = "US") => zod.z.string().trim().refine(val => min$4.isValidPhoneNumber(val, defaultCountryCode), "schemaErrors.notAValidPhoneNumber");
7125
+ const phoneSchema = (defaultCountryCode = "US") => zod.z.string().trim().refine(val => min$3.isValidPhoneNumber(val, defaultCountryCode), "schemaErrors.notAValidPhoneNumber");
7177
7126
  /**
7178
7127
  * @category Form Validation
7179
7128
  */
@@ -7235,7 +7184,7 @@ const CustomsItemForm = ({
7235
7184
  // Per Anne, this was to handle backwards compatibility when API used to only accept Number
7236
7185
  value: {
7237
7186
  amount: customsItem.value,
7238
- currency: jsApi.SE.Currency.USD
7187
+ currency: alchemy.SE.Currency.USD
7239
7188
  }
7240
7189
  }
7241
7190
  } : {
@@ -7268,7 +7217,7 @@ const CustomsItemForm = ({
7268
7217
  control: form.control,
7269
7218
  defaultValue: {
7270
7219
  amount: undefined,
7271
- currency: jsApi.SE.Currency.USD
7220
+ currency: alchemy.SE.Currency.USD
7272
7221
  },
7273
7222
  form: formId,
7274
7223
  label: t("customs.fields.value"),
@@ -7737,7 +7686,7 @@ const styles$6 = createStyles({
7737
7686
  })
7738
7687
  });
7739
7688
 
7740
- const ListCarriers$1 = ({
7689
+ const ListCarriers = ({
7741
7690
  carriers: _carriers = [],
7742
7691
  errors,
7743
7692
  isLoading,
@@ -8270,7 +8219,7 @@ const warehouseAddressSchema = addressSchema.extend({
8270
8219
  addressResidentialIndicator: zod.z.preprocess(v => v === "yes" ? true : false, zod.z.boolean().default(false).transform(value => value ? "yes" : "no")),
8271
8220
  companyName: zod.z.string().trim().min(1),
8272
8221
  phone: zod.z.string().trim().min(1)
8273
- }).refine(schema => !schema.phone || min$4.isValidPhoneNumber(schema.phone, schema.countryCode), {
8222
+ }).refine(schema => !schema.phone || min$3.isValidPhoneNumber(schema.phone, schema.countryCode), {
8274
8223
  message: "schemaErrors.notAValidPhoneNumber",
8275
8224
  path: ["phone"]
8276
8225
  }).refine(schema => {
@@ -8461,7 +8410,7 @@ const styles$4 = createStyles({
8461
8410
  })
8462
8411
  });
8463
8412
 
8464
- const ManageWarehouses$1 = ({
8413
+ const ManageWarehouses = ({
8465
8414
  errors,
8466
8415
  onAdd,
8467
8416
  onDelete,
@@ -8494,11 +8443,15 @@ const ManageWarehouses$1 = ({
8494
8443
  } = payload,
8495
8444
  rest = __rest(payload, ["passengerData"]);
8496
8445
  onAdd(Object.assign(Object.assign({}, rest), passengerData));
8446
+ toggleShowAddNewWarehouseForm(false);
8497
8447
  }
8498
8448
  }, {
8499
8449
  children: jsxRuntime.jsx(WarehouseForm, {
8500
8450
  onCancel: () => toggleShowAddNewWarehouseForm(false),
8501
- onSubmit: payload => onAdd(payload),
8451
+ onSubmit: payload => {
8452
+ onAdd(payload);
8453
+ toggleShowAddNewWarehouseForm(false);
8454
+ },
8502
8455
  submitButtonTitle: t("actions.save")
8503
8456
  })
8504
8457
  })) : jsxRuntime.jsx(ButtonGroup, Object.assign({
@@ -8521,10 +8474,7 @@ const ManageWarehouses$1 = ({
8521
8474
  })), jsxRuntime.jsx("div", Object.assign({
8522
8475
  css: styles$4.cardSpacing
8523
8476
  }, {
8524
- children: warehouses.sort((a, b) => {
8525
- if (b.isDefault) return 1;
8526
- return sortByCreationDate(a, b, "desc");
8527
- }).map(warehouse => {
8477
+ children: warehouses.map(warehouse => {
8528
8478
  if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
8529
8479
  return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
8530
8480
  css: styles$4.well,
@@ -8552,7 +8502,8 @@ const ManageWarehouses$1 = ({
8552
8502
  onCancel: () => setEditWarehouseId(undefined),
8553
8503
  onDelete: warehouse.isDefault ? undefined : () => onDelete(warehouse.warehouseId),
8554
8504
  onSubmit: payload => __awaiter(void 0, void 0, void 0, function* () {
8555
- return onEdit(payload, warehouse.warehouseId);
8505
+ onEdit(payload, warehouse.warehouseId);
8506
+ setEditWarehouseId(undefined);
8556
8507
  }),
8557
8508
  submitButtonTitle: t("actions.save"),
8558
8509
  warehouse: warehouse
@@ -8584,7 +8535,7 @@ const ManageWarehouses$1 = ({
8584
8535
  });
8585
8536
  };
8586
8537
 
8587
- var getBuiltIn$3 = getBuiltIn$9;
8538
+ var getBuiltIn$2 = getBuiltIn$8;
8588
8539
  var definePropertyModule = objectDefineProperty;
8589
8540
  var wellKnownSymbol$3 = wellKnownSymbol$j;
8590
8541
  var DESCRIPTORS = descriptors;
@@ -8592,7 +8543,7 @@ var DESCRIPTORS = descriptors;
8592
8543
  var SPECIES$2 = wellKnownSymbol$3('species');
8593
8544
 
8594
8545
  var setSpecies$1 = function (CONSTRUCTOR_NAME) {
8595
- var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
8546
+ var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
8596
8547
  var defineProperty = definePropertyModule.f;
8597
8548
 
8598
8549
  if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
@@ -8632,15 +8583,15 @@ var SPECIES$1 = wellKnownSymbol$2('species');
8632
8583
 
8633
8584
  // `SpeciesConstructor` abstract operation
8634
8585
  // https://tc39.es/ecma262/#sec-speciesconstructor
8635
- var speciesConstructor$2 = function (O, defaultConstructor) {
8586
+ var speciesConstructor$1 = function (O, defaultConstructor) {
8636
8587
  var C = anObject$1(O).constructor;
8637
8588
  var S;
8638
8589
  return C === undefined || isNullOrUndefined(S = anObject$1(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
8639
8590
  };
8640
8591
 
8641
- var uncurryThis$1 = functionUncurryThis;
8592
+ var uncurryThis = functionUncurryThis;
8642
8593
 
8643
- var arraySlice$1 = uncurryThis$1([].slice);
8594
+ var arraySlice$1 = uncurryThis([].slice);
8644
8595
 
8645
8596
  var $TypeError$1 = TypeError;
8646
8597
 
@@ -8656,9 +8607,9 @@ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
8656
8607
  var global$7 = global$p;
8657
8608
  var apply = functionApply;
8658
8609
  var bind$2 = functionBindContext;
8659
- var isCallable$4 = isCallable$o;
8610
+ var isCallable$3 = isCallable$n;
8660
8611
  var hasOwn = hasOwnProperty_1;
8661
- var fails$1 = fails$r;
8612
+ var fails = fails$q;
8662
8613
  var html = html$2;
8663
8614
  var arraySlice = arraySlice$1;
8664
8615
  var createElement = documentCreateElement$2;
@@ -8710,7 +8661,7 @@ var post = function (id) {
8710
8661
  if (!set || !clear) {
8711
8662
  set = function setImmediate(handler) {
8712
8663
  validateArgumentsLength(arguments.length, 1);
8713
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
8664
+ var fn = isCallable$3(handler) ? handler : Function$1(handler);
8714
8665
  var args = arraySlice(arguments, 1);
8715
8666
  queue$1[++counter] = function () {
8716
8667
  apply(fn, undefined, args);
@@ -8742,10 +8693,10 @@ if (!set || !clear) {
8742
8693
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
8743
8694
  } else if (
8744
8695
  global$7.addEventListener &&
8745
- isCallable$4(global$7.postMessage) &&
8696
+ isCallable$3(global$7.postMessage) &&
8746
8697
  !global$7.importScripts &&
8747
8698
  $location && $location.protocol !== 'file:' &&
8748
- !fails$1(post)
8699
+ !fails(post)
8749
8700
  ) {
8750
8701
  defer = post;
8751
8702
  global$7.addEventListener('message', listener, false);
@@ -8781,7 +8732,7 @@ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
8781
8732
 
8782
8733
  var global$5 = global$p;
8783
8734
  var bind$1 = functionBindContext;
8784
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
8735
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
8785
8736
  var macrotask = task$1.set;
8786
8737
  var IS_IOS = engineIsIos;
8787
8738
  var IS_IOS_PEBBLE = engineIsIosPebble;
@@ -8793,7 +8744,7 @@ var document$2 = global$5.document;
8793
8744
  var process$2 = global$5.process;
8794
8745
  var Promise$1 = global$5.Promise;
8795
8746
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
8796
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor$1(global$5, 'queueMicrotask');
8747
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
8797
8748
  var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
8798
8749
 
8799
8750
  var flush, head, last, notify$1, toggle, node, promise, then;
@@ -8922,8 +8873,8 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
8922
8873
  && typeof document == 'object';
8923
8874
 
8924
8875
  var global$2 = global$p;
8925
- var NativePromiseConstructor$4 = promiseNativeConstructor;
8926
- var isCallable$3 = isCallable$o;
8876
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
8877
+ var isCallable$2 = isCallable$n;
8927
8878
  var isForced = isForced_1;
8928
8879
  var inspectSource = inspectSource$3;
8929
8880
  var wellKnownSymbol$1 = wellKnownSymbol$j;
@@ -8931,14 +8882,14 @@ var IS_BROWSER = engineIsBrowser;
8931
8882
  var IS_DENO = engineIsDeno;
8932
8883
  var V8_VERSION = engineV8Version;
8933
8884
 
8934
- NativePromiseConstructor$4 && NativePromiseConstructor$4.prototype;
8885
+ NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
8935
8886
  var SPECIES = wellKnownSymbol$1('species');
8936
8887
  var SUBCLASSING = false;
8937
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$2.PromiseRejectionEvent);
8888
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
8938
8889
 
8939
8890
  var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
8940
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$4);
8941
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$4);
8891
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
8892
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
8942
8893
  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
8943
8894
  // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
8944
8895
  // We can't detect it synchronously, so just check versions
@@ -8948,7 +8899,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
8948
8899
  // https://github.com/zloirock/core-js/issues/679
8949
8900
  if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
8950
8901
  // Detect correctness of subclassing with @@species support
8951
- var promise = new NativePromiseConstructor$4(function (resolve) { resolve(1); });
8902
+ var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
8952
8903
  var FakePromise = function (exec) {
8953
8904
  exec(function () { /* empty */ }, function () { /* empty */ });
8954
8905
  };
@@ -8989,26 +8940,26 @@ newPromiseCapability$2.f = function (C) {
8989
8940
  return new PromiseCapability(C);
8990
8941
  };
8991
8942
 
8992
- var $$8 = _export;
8943
+ var $$5 = _export;
8993
8944
  var IS_NODE = engineIsNode;
8994
8945
  var global$1 = global$p;
8995
8946
  var call$3 = functionCall;
8996
- var defineBuiltIn$2 = defineBuiltIn$8;
8947
+ var defineBuiltIn$1 = defineBuiltIn$7;
8997
8948
  var setPrototypeOf = objectSetPrototypeOf;
8998
8949
  var setToStringTag = setToStringTag$3;
8999
8950
  var setSpecies = setSpecies$1;
9000
8951
  var aCallable$2 = aCallable$a;
9001
- var isCallable$2 = isCallable$o;
8952
+ var isCallable$1 = isCallable$n;
9002
8953
  var isObject$1 = isObject$a;
9003
8954
  var anInstance = anInstance$1;
9004
- var speciesConstructor$1 = speciesConstructor$2;
8955
+ var speciesConstructor = speciesConstructor$1;
9005
8956
  var task = task$1.set;
9006
8957
  var microtask = microtask$1;
9007
8958
  var hostReportErrors = hostReportErrors$1;
9008
8959
  var perform$2 = perform$3;
9009
8960
  var Queue = queue;
9010
8961
  var InternalStateModule = internalState;
9011
- var NativePromiseConstructor$3 = promiseNativeConstructor;
8962
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
9012
8963
  var PromiseConstructorDetection = promiseConstructorDetection;
9013
8964
  var newPromiseCapabilityModule$3 = newPromiseCapability$2;
9014
8965
 
@@ -9018,9 +8969,9 @@ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT
9018
8969
  var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
9019
8970
  var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
9020
8971
  var setInternalState = InternalStateModule.set;
9021
- var NativePromisePrototype$2 = NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
9022
- var PromiseConstructor = NativePromiseConstructor$3;
9023
- var PromisePrototype = NativePromisePrototype$2;
8972
+ var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
8973
+ var PromiseConstructor = NativePromiseConstructor$2;
8974
+ var PromisePrototype = NativePromisePrototype$1;
9024
8975
  var TypeError$1 = global$1.TypeError;
9025
8976
  var document$1 = global$1.document;
9026
8977
  var process$1 = global$1.process;
@@ -9041,7 +8992,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
9041
8992
  // helpers
9042
8993
  var isThenable = function (it) {
9043
8994
  var then;
9044
- return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
8995
+ return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
9045
8996
  };
9046
8997
 
9047
8998
  var callReaction = function (reaction, state) {
@@ -9215,12 +9166,12 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9215
9166
 
9216
9167
  // `Promise.prototype.then` method
9217
9168
  // https://tc39.es/ecma262/#sec-promise.prototype.then
9218
- Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
9169
+ Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
9219
9170
  var state = getInternalPromiseState(this);
9220
- var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
9171
+ var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
9221
9172
  state.parent = true;
9222
- reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
9223
- reaction.fail = isCallable$2(onRejected) && onRejected;
9173
+ reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
9174
+ reaction.fail = isCallable$1(onRejected) && onRejected;
9224
9175
  reaction.domain = IS_NODE ? process$1.domain : undefined;
9225
9176
  if (state.state == PENDING) state.reactions.add(reaction);
9226
9177
  else microtask(function () {
@@ -9243,12 +9194,12 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9243
9194
  : newGenericPromiseCapability(C);
9244
9195
  };
9245
9196
 
9246
- if (isCallable$2(NativePromiseConstructor$3) && NativePromisePrototype$2 !== Object.prototype) {
9247
- nativeThen = NativePromisePrototype$2.then;
9197
+ if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
9198
+ nativeThen = NativePromisePrototype$1.then;
9248
9199
 
9249
9200
  if (!NATIVE_PROMISE_SUBCLASSING) {
9250
9201
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
9251
- defineBuiltIn$2(NativePromisePrototype$2, 'then', function then(onFulfilled, onRejected) {
9202
+ defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
9252
9203
  var that = this;
9253
9204
  return new PromiseConstructor(function (resolve, reject) {
9254
9205
  call$3(nativeThen, that, resolve, reject);
@@ -9259,17 +9210,17 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9259
9210
 
9260
9211
  // make `.constructor === Promise` work for native promise-based APIs
9261
9212
  try {
9262
- delete NativePromisePrototype$2.constructor;
9213
+ delete NativePromisePrototype$1.constructor;
9263
9214
  } catch (error) { /* empty */ }
9264
9215
 
9265
9216
  // make `instanceof Promise` work for native promise-based APIs
9266
9217
  if (setPrototypeOf) {
9267
- setPrototypeOf(NativePromisePrototype$2, PromisePrototype);
9218
+ setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
9268
9219
  }
9269
9220
  }
9270
9221
  }
9271
9222
 
9272
- $$8({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
9223
+ $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
9273
9224
  Promise: PromiseConstructor
9274
9225
  });
9275
9226
 
@@ -9315,15 +9266,15 @@ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
9315
9266
  return ITERATION_SUPPORT;
9316
9267
  };
9317
9268
 
9318
- var NativePromiseConstructor$2 = promiseNativeConstructor;
9269
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
9319
9270
  var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
9320
9271
  var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
9321
9272
 
9322
9273
  var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
9323
- NativePromiseConstructor$2.all(iterable).then(undefined, function () { /* empty */ });
9274
+ NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
9324
9275
  });
9325
9276
 
9326
- var $$7 = _export;
9277
+ var $$4 = _export;
9327
9278
  var call$2 = functionCall;
9328
9279
  var aCallable$1 = aCallable$a;
9329
9280
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
@@ -9333,7 +9284,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
9333
9284
 
9334
9285
  // `Promise.all` method
9335
9286
  // https://tc39.es/ecma262/#sec-promise.all
9336
- $$7({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
9287
+ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
9337
9288
  all: function all(iterable) {
9338
9289
  var C = this;
9339
9290
  var capability = newPromiseCapabilityModule$2.f(C);
@@ -9362,32 +9313,32 @@ $$7({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
9362
9313
  }
9363
9314
  });
9364
9315
 
9365
- var $$6 = _export;
9316
+ var $$3 = _export;
9366
9317
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
9367
- var NativePromiseConstructor$1 = promiseNativeConstructor;
9368
- var getBuiltIn$2 = getBuiltIn$9;
9369
- var isCallable$1 = isCallable$o;
9370
- var defineBuiltIn$1 = defineBuiltIn$8;
9318
+ var NativePromiseConstructor = promiseNativeConstructor;
9319
+ var getBuiltIn$1 = getBuiltIn$8;
9320
+ var isCallable = isCallable$n;
9321
+ var defineBuiltIn = defineBuiltIn$7;
9371
9322
 
9372
- var NativePromisePrototype$1 = NativePromiseConstructor$1 && NativePromiseConstructor$1.prototype;
9323
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
9373
9324
 
9374
9325
  // `Promise.prototype.catch` method
9375
9326
  // https://tc39.es/ecma262/#sec-promise.prototype.catch
9376
- $$6({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
9327
+ $$3({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
9377
9328
  'catch': function (onRejected) {
9378
9329
  return this.then(undefined, onRejected);
9379
9330
  }
9380
9331
  });
9381
9332
 
9382
9333
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
9383
- if (isCallable$1(NativePromiseConstructor$1)) {
9384
- var method$1 = getBuiltIn$2('Promise').prototype['catch'];
9385
- if (NativePromisePrototype$1['catch'] !== method$1) {
9386
- defineBuiltIn$1(NativePromisePrototype$1, 'catch', method$1, { unsafe: true });
9334
+ if (isCallable(NativePromiseConstructor)) {
9335
+ var method = getBuiltIn$1('Promise').prototype['catch'];
9336
+ if (NativePromisePrototype['catch'] !== method) {
9337
+ defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
9387
9338
  }
9388
9339
  }
9389
9340
 
9390
- var $$5 = _export;
9341
+ var $$2 = _export;
9391
9342
  var call$1 = functionCall;
9392
9343
  var aCallable = aCallable$a;
9393
9344
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
@@ -9397,7 +9348,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
9397
9348
 
9398
9349
  // `Promise.race` method
9399
9350
  // https://tc39.es/ecma262/#sec-promise.race
9400
- $$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
9351
+ $$2({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
9401
9352
  race: function race(iterable) {
9402
9353
  var C = this;
9403
9354
  var capability = newPromiseCapabilityModule$1.f(C);
@@ -9413,14 +9364,14 @@ $$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
9413
9364
  }
9414
9365
  });
9415
9366
 
9416
- var $$4 = _export;
9367
+ var $$1 = _export;
9417
9368
  var call = functionCall;
9418
9369
  var newPromiseCapabilityModule = newPromiseCapability$2;
9419
9370
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
9420
9371
 
9421
9372
  // `Promise.reject` method
9422
9373
  // https://tc39.es/ecma262/#sec-promise.reject
9423
- $$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
9374
+ $$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
9424
9375
  reject: function reject(r) {
9425
9376
  var capability = newPromiseCapabilityModule.f(this);
9426
9377
  call(capability.reject, undefined, r);
@@ -9432,7 +9383,7 @@ var anObject = anObject$f;
9432
9383
  var isObject = isObject$a;
9433
9384
  var newPromiseCapability = newPromiseCapability$2;
9434
9385
 
9435
- var promiseResolve$2 = function (C, x) {
9386
+ var promiseResolve$1 = function (C, x) {
9436
9387
  anObject(C);
9437
9388
  if (isObject(x) && x.constructor === C) return x;
9438
9389
  var promiseCapability = newPromiseCapability.f(C);
@@ -9441,18 +9392,18 @@ var promiseResolve$2 = function (C, x) {
9441
9392
  return promiseCapability.promise;
9442
9393
  };
9443
9394
 
9444
- var $$3 = _export;
9445
- var getBuiltIn$1 = getBuiltIn$9;
9395
+ var $ = _export;
9396
+ var getBuiltIn = getBuiltIn$8;
9446
9397
  var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
9447
- var promiseResolve$1 = promiseResolve$2;
9398
+ var promiseResolve = promiseResolve$1;
9448
9399
 
9449
- getBuiltIn$1('Promise');
9400
+ getBuiltIn('Promise');
9450
9401
 
9451
9402
  // `Promise.resolve` method
9452
9403
  // https://tc39.es/ecma262/#sec-promise.resolve
9453
- $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
9404
+ $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
9454
9405
  resolve: function resolve(x) {
9455
- return promiseResolve$1(this, x);
9406
+ return promiseResolve(this, x);
9456
9407
  }
9457
9408
  });
9458
9409
 
@@ -9588,7 +9539,7 @@ const billingAddressSchema = addressSchema.extend({
9588
9539
  addressLine2: addressLine2Schema.refine(v => !v || !isPoBox(v), "schemaErrors.invalidAddressPoBox"),
9589
9540
  companyName: zod.z.string().trim().min(1),
9590
9541
  phone: zod.z.string().trim().min(1)
9591
- }).refine(schema => !schema.phone || min$4.isValidPhoneNumber(schema.phone, schema.countryCode), {
9542
+ }).refine(schema => !schema.phone || min$3.isValidPhoneNumber(schema.phone, schema.countryCode), {
9592
9543
  message: "schemaErrors.notAValidPhoneNumber",
9593
9544
  path: ["phone"]
9594
9545
  }).refine(schema => {
@@ -9872,7 +9823,7 @@ const styles$2 = createStyles({
9872
9823
  })
9873
9824
  });
9874
9825
 
9875
- const Onboarding$1 = ({
9826
+ const Onboarding = ({
9876
9827
  carriers,
9877
9828
  createWarehouse,
9878
9829
  onCarrierCreated,
@@ -10301,8 +10252,8 @@ const AddFundsForm = ({
10301
10252
  const {
10302
10253
  t
10303
10254
  } = reactI18next.useTranslation();
10304
- const addFunds = reactApi.useAddFunds(carrierId);
10305
- const carrier = reactApi.useGetCarrierById(carrierId);
10255
+ const addFunds = alchemy.useAddFunds(carrierId);
10256
+ const carrier = alchemy.useGetCarrierById(carrierId);
10306
10257
  const chips = [{
10307
10258
  label: "$20",
10308
10259
  value: 20
@@ -10322,7 +10273,7 @@ const AddFundsForm = ({
10322
10273
  defaultValues: {
10323
10274
  funds: {
10324
10275
  amount: selectedChip.value === "custom" ? _minimumAmount : selectedChip.value,
10325
- currency: jsApi.SE.Currency.USD
10276
+ currency: alchemy.SE.Currency.USD
10326
10277
  }
10327
10278
  },
10328
10279
  resolver: validationResolver(getAddFundsSchema(_minimumAmount))
@@ -10374,7 +10325,7 @@ const AddFundsForm = ({
10374
10325
  form.reset({
10375
10326
  funds: {
10376
10327
  amount: chip.value,
10377
- currency: jsApi.SE.Currency.USD
10328
+ currency: alchemy.SE.Currency.USD
10378
10329
  }
10379
10330
  });
10380
10331
  }
@@ -10401,7 +10352,7 @@ const AddFundsForm = ({
10401
10352
  css: getStyles$4().fundsInput,
10402
10353
  defaultValue: {
10403
10354
  amount: undefined,
10404
- currency: jsApi.SE.Currency.USD
10355
+ currency: alchemy.SE.Currency.USD
10405
10356
  },
10406
10357
  form: formId,
10407
10358
  hint: t("manage-funding:addFunds.minimumPurchaseAmount"),
@@ -10489,7 +10440,7 @@ const CarrierBalance = ({
10489
10440
  data: carrier,
10490
10441
  isLoading: isLoadingCarrier,
10491
10442
  isRefetching: isRefetchingCarrier
10492
- } = reactApi.useGetCarrierById(carrierId);
10443
+ } = alchemy.useGetCarrierById(carrierId);
10493
10444
  const balance = carrier === null || carrier === void 0 ? void 0 : carrier.balance;
10494
10445
  return jsxRuntime.jsx(InlineLabel, Object.assign({
10495
10446
  label: t("manage-funding:currentBalance")
@@ -10500,7 +10451,7 @@ const CarrierBalance = ({
10500
10451
  }, {
10501
10452
  children: balance === undefined ? t("manage-funding:errors.balanceUnknown") : formatMoney({
10502
10453
  amount: balance,
10503
- currency: jsApi.SE.Currency.USD
10454
+ currency: alchemy.SE.Currency.USD
10504
10455
  })
10505
10456
  }))
10506
10457
  }));
@@ -10606,7 +10557,7 @@ const FundAndPurchase = ({
10606
10557
  const {
10607
10558
  data: carrier,
10608
10559
  isLoading: isLoadingCarrier
10609
- } = reactApi.useGetCarrierById(carrierId);
10560
+ } = alchemy.useGetCarrierById(carrierId);
10610
10561
  const {
10611
10562
  isSubmitting: isRateFormSubmitting,
10612
10563
  isValid: isRateFormValid
@@ -10714,7 +10665,7 @@ const FundAndPurchase = ({
10714
10665
  }, {
10715
10666
  children: formatMoney({
10716
10667
  amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
10717
- currency: jsApi.SE.Currency.USD
10668
+ currency: alchemy.SE.Currency.USD
10718
10669
  })
10719
10670
  }))
10720
10671
  })), jsxRuntime.jsx(InlineLabel, Object.assign({
@@ -10725,7 +10676,7 @@ const FundAndPurchase = ({
10725
10676
  }, {
10726
10677
  children: formatMoney({
10727
10678
  amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
10728
- currency: jsApi.SE.Currency.USD
10679
+ currency: alchemy.SE.Currency.USD
10729
10680
  })
10730
10681
  }))
10731
10682
  })), balance >= purchaseAmount && jsxRuntime.jsx(ButtonGroup, Object.assign({
@@ -10848,7 +10799,17 @@ const RateForm = ({
10848
10799
  // },
10849
10800
  // }
10850
10801
  );
10851
-
10802
+ // Return true if User has multiple accounts for a single carrier.
10803
+ const hasDuplicateCarrierCode = carriers => {
10804
+ const uniqueCarrierCodes = new Set();
10805
+ for (const carrier of carriers) {
10806
+ if (uniqueCarrierCodes.has(carrier.carrierCode)) {
10807
+ return true;
10808
+ }
10809
+ uniqueCarrierCodes.add(carrier.carrierCode);
10810
+ }
10811
+ return false;
10812
+ };
10852
10813
  const selectedRate = React.useMemo(() => rateOptions === null || rateOptions === void 0 ? void 0 : rateOptions.find(r => r.rateId === selectedRateId), [rateOptions, selectedRateId]);
10853
10814
  const handleSaveRate = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
10854
10815
  const isValid = yield form.trigger();
@@ -10898,7 +10859,9 @@ const RateForm = ({
10898
10859
  control: form.control,
10899
10860
  label: "Rate",
10900
10861
  name: "rate",
10901
- nicknameFeature: features.nicknameRate,
10862
+ nicknameFeature:
10863
+ // if feature flag is on, and if account has duplicate carrierCodes, then show nickname
10864
+ features.nicknameRate && carriers && hasDuplicateCarrierCode(carriers),
10902
10865
  onClick: onSelectRate,
10903
10866
  options: showHiddenRates ? rateOptions : filteredRateOptions
10904
10867
  }), rateOptions.some(option => option.requiresAcknowledgement) && rateOptions.length > 5 && jsxRuntime.jsx(giger.Link, Object.assign({
@@ -11277,7 +11240,7 @@ const CustomsItemsDisplay = ({
11277
11240
  }, {
11278
11241
  children: formatMoney({
11279
11242
  amount: Number(item.value),
11280
- currency: jsApi.SE.Currency.USD
11243
+ currency: alchemy.SE.Currency.USD
11281
11244
  })
11282
11245
  })), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
11283
11246
  css: getCustomsItemInfoRightStyle
@@ -11288,7 +11251,7 @@ const CustomsItemsDisplay = ({
11288
11251
  }, {
11289
11252
  children: formatMoney({
11290
11253
  amount: Number(item.value) * item.quantity,
11291
- currency: jsApi.SE.Currency.USD
11254
+ currency: alchemy.SE.Currency.USD
11292
11255
  })
11293
11256
  })), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
11294
11257
  css: getCustomsItemInfoRightStyle
@@ -11325,9 +11288,9 @@ const getShipmentSchema = ({
11325
11288
  } = {}) => {
11326
11289
  const baseSchema = zod.z.object({
11327
11290
  carrierId: zod.z.string().nullish(),
11328
- confirmation: zod.z.nativeEnum(jsApi.SE.ConfirmationType).default(jsApi.SE.ConfirmationType.NONE),
11291
+ confirmation: zod.z.nativeEnum(alchemy.SE.ConfirmationType).default(alchemy.SE.ConfirmationType.NONE),
11329
11292
  customs: zod.z.object({
11330
- contents: zod.z.nativeEnum(jsApi.SE.CustomsContentsType),
11293
+ contents: zod.z.nativeEnum(alchemy.SE.CustomsContentsType),
11331
11294
  customsItems: zod.z.object({
11332
11295
  countryOfOrigin: zod.z.string().nullishDefault(undefined),
11333
11296
  customsItemId: zod.z.string().nullishDefault(undefined),
@@ -11336,9 +11299,9 @@ const getShipmentSchema = ({
11336
11299
  quantity: zod.z.number().int(),
11337
11300
  value: zod.z.number()
11338
11301
  }).array().min(1),
11339
- nonDelivery: zod.z.nativeEnum(jsApi.SE.CustomsNonDeliveryType)
11302
+ nonDelivery: zod.z.nativeEnum(alchemy.SE.CustomsNonDeliveryType)
11340
11303
  }).nullish(),
11341
- insuranceProvider: zod.z.nativeEnum(jsApi.SE.InsuranceProviderType).default(jsApi.SE.InsuranceProviderType.NONE),
11304
+ insuranceProvider: zod.z.nativeEnum(alchemy.SE.InsuranceProviderType).default(alchemy.SE.InsuranceProviderType.NONE),
11342
11305
  packages: zod.z.object({
11343
11306
  contentDescription: _isContentDescriptionRequired ? zod.z.string().min(1).max(36, "Maximum 36 characters") : zod.z.string().optional().nullable(),
11344
11307
  dimensions: (_requireMeasurements ? zod.z.object({
@@ -11718,9 +11681,9 @@ const ShipmentForm = ({
11718
11681
  // If customs wasn't previously required
11719
11682
  // Hydrate customs object with default values
11720
11683
  form.setValue("customs", {
11721
- contents: jsApi.SE.CustomsContentsType.MERCHANDISE,
11684
+ contents: alchemy.SE.CustomsContentsType.MERCHANDISE,
11722
11685
  customsItems: [],
11723
- nonDelivery: jsApi.SE.CustomsNonDeliveryType.RETURN_TO_SENDER
11686
+ nonDelivery: alchemy.SE.CustomsNonDeliveryType.RETURN_TO_SENDER
11724
11687
  });
11725
11688
  } else if (wasCustomsRequired && !customsRequired) {
11726
11689
  // If customs is no longer required, clear customs object from schema
@@ -12109,7 +12072,7 @@ const ShipmentForm = ({
12109
12072
  }, {
12110
12073
  children: [jsxRuntime.jsx(Select, {
12111
12074
  control: form.control,
12112
- defaultValue: insuranceEnabled ? jsApi.SE.InsuranceProviderType.CARRIER : jsApi.SE.InsuranceProviderType.NONE,
12075
+ defaultValue: insuranceEnabled ? alchemy.SE.InsuranceProviderType.CARRIER : alchemy.SE.InsuranceProviderType.NONE,
12113
12076
  displayLabel: false,
12114
12077
  label: t("purchase-label:fields.insuranceProvider"),
12115
12078
  name: "insuranceProvider",
@@ -12119,7 +12082,7 @@ const ShipmentForm = ({
12119
12082
  control: form.control,
12120
12083
  defaultValue: {
12121
12084
  amount: undefined,
12122
- currency: jsApi.SE.Currency.USD
12085
+ currency: alchemy.SE.Currency.USD
12123
12086
  },
12124
12087
  displayLabel: false,
12125
12088
  label: t("purchase-label:fields.insuredValue"),
@@ -12190,7 +12153,7 @@ const isHighValueRequired = (shipment, carriers = []) => {
12190
12153
  var _a;
12191
12154
  return shipment.packages.some(p => p.insuredValue ? p.insuredValue.amount > 1000 : false) && shipment.insuranceProvider === "carrier" && ((_a = carriers.find(c => c.carrierId === shipment.carrierId)) === null || _a === void 0 ? void 0 : _a.carrierCode) === "ups";
12192
12155
  };
12193
- const Shipment$1 = ({
12156
+ const Shipment = ({
12194
12157
  carriers,
12195
12158
  features,
12196
12159
  labels,
@@ -12410,7 +12373,7 @@ const SuspendShipment = ({
12410
12373
  }));
12411
12374
  };
12412
12375
 
12413
- const VoidLabel$1 = ({
12376
+ const VoidLabel = ({
12414
12377
  onComplete,
12415
12378
  onSubmit,
12416
12379
  onViewShipment,
@@ -12519,7 +12482,7 @@ const VoidLabel$1 = ({
12519
12482
  });
12520
12483
  };
12521
12484
 
12522
- var index$1 = /*#__PURE__*/Object.freeze({
12485
+ var index = /*#__PURE__*/Object.freeze({
12523
12486
  __proto__: null,
12524
12487
  AddCarrierForm: AddCarrierForm,
12525
12488
  addCarrierSchema: addCarrierSchema,
@@ -12541,17 +12504,17 @@ var index$1 = /*#__PURE__*/Object.freeze({
12541
12504
  getCustomsItemFormSchema: getCustomsItemFormSchema,
12542
12505
  Label: Label,
12543
12506
  LandingPage: LandingPage,
12544
- ListCarriers: ListCarriers$1,
12545
- ManageWarehouses: ManageWarehouses$1,
12546
- Onboarding: Onboarding$1,
12507
+ ListCarriers: ListCarriers,
12508
+ ManageWarehouses: ManageWarehouses,
12509
+ Onboarding: Onboarding,
12547
12510
  RateForm: RateForm,
12548
12511
  SuspendSalesOrder: SuspendSalesOrder,
12549
12512
  ShipmentForm: ShipmentForm,
12550
12513
  schedulePickupForCarrier: schedulePickupForCarrier,
12551
- Shipment: Shipment$1,
12514
+ Shipment: Shipment,
12552
12515
  SuspendShipment: SuspendShipment,
12553
12516
  WarehouseForm: WarehouseForm,
12554
- VoidLabel: VoidLabel$1,
12517
+ VoidLabel: VoidLabel,
12555
12518
  WalletForm: WalletForm,
12556
12519
  styles: styles$3,
12557
12520
  billingAddressSchema: billingAddressSchema,
@@ -12605,8 +12568,8 @@ const AutoFundingForm = ({
12605
12568
  const {
12606
12569
  t
12607
12570
  } = reactI18next.useTranslation();
12608
- const updateAutoFunding = reactApi.useUpdateAutoFunding(carrierId);
12609
- const autoFundingConfiguration = reactApi.useGetAutoFundingConfiguration(carrierId);
12571
+ const updateAutoFunding = alchemy.useUpdateAutoFunding(carrierId);
12572
+ const autoFundingConfiguration = alchemy.useGetAutoFundingConfiguration(carrierId);
12610
12573
  const {
12611
12574
  data: autoFundingSettings
12612
12575
  } = autoFundingConfiguration;
@@ -12696,7 +12659,7 @@ const AutoFundingForm = ({
12696
12659
  "data-testid": "auto-funding-threshold-input",
12697
12660
  defaultValue: {
12698
12661
  amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
12699
- currency: jsApi.Currency.USD
12662
+ currency: alchemy.Currency.USD
12700
12663
  },
12701
12664
  disabled: !watchIsEnabled,
12702
12665
  label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
@@ -12713,7 +12676,7 @@ const AutoFundingForm = ({
12713
12676
  "data-testid": "auto-funding-purchase-amount-input",
12714
12677
  defaultValue: {
12715
12678
  amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
12716
- currency: jsApi.Currency.USD
12679
+ currency: alchemy.Currency.USD
12717
12680
  },
12718
12681
  disabled: !watchIsEnabled,
12719
12682
  label: t("manage-funding:autoFunding.purchaseAmount"),
@@ -12851,67 +12814,40 @@ const DateRangeCombo = ({
12851
12814
  };
12852
12815
 
12853
12816
  /**
12854
- * Captures errors thrown within an Element, logs them and displays a fallback component
12855
- *
12856
- * @category Components
12817
+ * Fallback component for the Elements ErrorBoundary
12857
12818
  *
12858
12819
  * @see {@link registerElement}
12859
12820
  */
12860
- class ErrorBoundary extends React__namespace.Component {
12861
- constructor(props) {
12862
- super(props);
12863
- this.state = {
12864
- error: null
12865
- };
12866
- }
12867
- componentDidCatch(error, {
12868
- componentStack
12869
- }) {
12870
- const {
12871
- onError,
12872
- element
12873
- } = this.props;
12874
- const errorBoundaryError = new Error(error.message);
12875
- errorBoundaryError.name = `React ErrorBoundary ${errorBoundaryError.name}`;
12876
- errorBoundaryError.stack = componentStack;
12877
- error.cause = errorBoundaryError;
12878
- onError === null || onError === void 0 ? void 0 : onError(error, {
12879
- componentStack,
12880
- element
12881
- });
12882
- reactApi.logger.error({
12883
- componentStack,
12884
- error
12885
- }, error.message);
12886
- this.setState({
12887
- error
12888
- });
12889
- }
12890
- render() {
12891
- const {
12892
- fallback,
12893
- children
12894
- } = this.props;
12895
- const {
12896
- error
12897
- } = this.state;
12898
- if (error) {
12899
- let element;
12900
- if (typeof fallback === "function") {
12901
- element = fallback({
12902
- error
12903
- });
12904
- } else {
12905
- element = fallback;
12906
- }
12907
- return element;
12908
- }
12909
- if (typeof children === "function") {
12910
- return children();
12821
+ const ErrorFallback = ({
12822
+ error
12823
+ }) => {
12824
+ const {
12825
+ t
12826
+ } = reactI18next.useTranslation("common");
12827
+ return jsxRuntime.jsxs("div", Object.assign({
12828
+ css: {
12829
+ alignItems: "center",
12830
+ display: "flex",
12831
+ flexDirection: "column",
12832
+ height: "100%",
12833
+ justifyContent: "center",
12834
+ textAlign: "center",
12835
+ width: "100%"
12911
12836
  }
12912
- return children;
12913
- }
12914
- }
12837
+ }, {
12838
+ children: [jsxRuntime.jsx("div", Object.assign({
12839
+ css: theme => ({
12840
+ color: theme.palette.error.main,
12841
+ marginBottom: theme.spacing(2)
12842
+ })
12843
+ }, {
12844
+ children: jsxRuntime.jsx(giger.Icon, {
12845
+ name: gigerTheme.IconNames.CANCEL,
12846
+ size: giger.IconSize.SIZE_LARGE
12847
+ })
12848
+ })), t([typeof error === "string" ? error : error.message, "errorMessages.unknown"])]
12849
+ }));
12850
+ };
12915
12851
 
12916
12852
  const ManageFunding = ({
12917
12853
  carrierId
@@ -12922,7 +12858,7 @@ const ManageFunding = ({
12922
12858
  const queryClient = reactQuery.useQueryClient();
12923
12859
  const {
12924
12860
  isLoading: isLoadingCarrier
12925
- } = reactApi.useGetCarrierById(carrierId);
12861
+ } = alchemy.useGetCarrierById(carrierId);
12926
12862
  const [isAddFundsFormOpen, setIsAddFundsFormOpen] = React.useState(false);
12927
12863
  if (isLoadingCarrier) return jsxRuntime.jsx(Loader, {
12928
12864
  message: t("loading.carrier")
@@ -12999,68 +12935,6 @@ const StoryNotes = ({
12999
12935
  }), children]
13000
12936
  });
13001
12937
 
13002
- var $$2 = _export;
13003
- var uncurryThis = functionUncurryThisClause;
13004
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
13005
- var toLength = toLength$4;
13006
- var toString = toString$c;
13007
- var notARegExp = notARegexp;
13008
- var requireObjectCoercible = requireObjectCoercible$9;
13009
- var correctIsRegExpLogic = correctIsRegexpLogic;
13010
-
13011
- // eslint-disable-next-line es/no-string-prototype-startswith -- safe
13012
- var nativeStartsWith = uncurryThis(''.startsWith);
13013
- var stringSlice = uncurryThis(''.slice);
13014
- var min = Math.min;
13015
-
13016
- var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
13017
- // https://github.com/zloirock/core-js/pull/702
13018
- var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
13019
- var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
13020
- return descriptor && !descriptor.writable;
13021
- }();
13022
-
13023
- // `String.prototype.startsWith` method
13024
- // https://tc39.es/ecma262/#sec-string.prototype.startswith
13025
- $$2({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
13026
- startsWith: function startsWith(searchString /* , position = 0 */) {
13027
- var that = toString(requireObjectCoercible(this));
13028
- notARegExp(searchString);
13029
- var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
13030
- var search = toString(searchString);
13031
- return nativeStartsWith
13032
- ? nativeStartsWith(that, search, index)
13033
- : stringSlice(that, index, index + search.length) === search;
13034
- }
13035
- });
13036
-
13037
- var $$1 = _export;
13038
- var flattenIntoArray = flattenIntoArray_1;
13039
- var toObject = toObject$8;
13040
- var lengthOfArrayLike = lengthOfArrayLike$8;
13041
- var toIntegerOrInfinity = toIntegerOrInfinity$7;
13042
- var arraySpeciesCreate = arraySpeciesCreate$2;
13043
-
13044
- // `Array.prototype.flat` method
13045
- // https://tc39.es/ecma262/#sec-array.prototype.flat
13046
- $$1({ target: 'Array', proto: true }, {
13047
- flat: function flat(/* depthArg = 1 */) {
13048
- var depthArg = arguments.length ? arguments[0] : undefined;
13049
- var O = toObject(this);
13050
- var sourceLen = lengthOfArrayLike(O);
13051
- var A = arraySpeciesCreate(O, 0);
13052
- A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
13053
- return A;
13054
- }
13055
- });
13056
-
13057
- // this method was added to unscopables after implementation
13058
- // in popular engines, so it's moved to a separate module
13059
- var addToUnscopables = addToUnscopables$4;
13060
-
13061
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
13062
- addToUnscopables('flat');
13063
-
13064
12938
  var common = {
13065
12939
  actions: {
13066
12940
  add: "Add",
@@ -13299,7 +13173,7 @@ var common$1 = {
13299
13173
  common: common
13300
13174
  };
13301
13175
 
13302
- var listCarriers = {
13176
+ var listCarriers$1 = {
13303
13177
  "list-carriers": {
13304
13178
  headers: {
13305
13179
  accountCarriers: "ShipEngine Carrier Accounts",
@@ -13402,7 +13276,7 @@ var manageFunding = {
13402
13276
  }
13403
13277
  };
13404
13278
 
13405
- var manageWarehouses = {
13279
+ var manageWarehouses$1 = {
13406
13280
  "manage-warehouses": {
13407
13281
  addNew: "Add New Address",
13408
13282
  editWarehouse: "Edit Address",
@@ -13418,7 +13292,7 @@ var manageWarehouses = {
13418
13292
  }
13419
13293
  };
13420
13294
 
13421
- var onboarding = {
13295
+ var onboarding$1 = {
13422
13296
  inlineTitle: "Why are we asking?",
13423
13297
  landing: {
13424
13298
  action: "Login",
@@ -13445,11 +13319,11 @@ var onboarding = {
13445
13319
  action: "Let's get started"
13446
13320
  }
13447
13321
  };
13448
- var onboarding$1 = {
13449
- onboarding: onboarding
13322
+ var onboarding$2 = {
13323
+ onboarding: onboarding$1
13450
13324
  };
13451
13325
 
13452
- var purchaseLabel = {
13326
+ var purchaseLabel$1 = {
13453
13327
  "purchase-label": {
13454
13328
  actions: {
13455
13329
  calculateRates_one: "Calculate Rate",
@@ -13596,7 +13470,7 @@ var registerWallet = {
13596
13470
  }
13597
13471
  };
13598
13472
 
13599
- var viewShipment = {
13473
+ var viewShipment$1 = {
13600
13474
  "view-shipment": {
13601
13475
  actions: {
13602
13476
  buyAnotherLabel: "Buy Another Label",
@@ -13629,7 +13503,7 @@ var viewShipment = {
13629
13503
  }
13630
13504
  };
13631
13505
 
13632
- var voidLabel = {
13506
+ var voidLabel$1 = {
13633
13507
  "void-label": {
13634
13508
  actions: {
13635
13509
  complete: "Done",
@@ -13668,228 +13542,7 @@ var walletHistory = {
13668
13542
  }
13669
13543
  };
13670
13544
 
13671
- var index = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, common$1), listCarriers), manageDefaults), manageFunding), manageWarehouses), manageDefaults), onboarding$1), purchaseLabel), registerCarrier), registerWallet), viewShipment), voidLabel), walletHistory);
13672
-
13673
- var resources = /*#__PURE__*/Object.freeze({
13674
- __proto__: null,
13675
- en: index
13676
- });
13677
-
13678
- var $ = _export;
13679
- var NativePromiseConstructor = promiseNativeConstructor;
13680
- var fails = fails$r;
13681
- var getBuiltIn = getBuiltIn$9;
13682
- var isCallable = isCallable$o;
13683
- var speciesConstructor = speciesConstructor$2;
13684
- var promiseResolve = promiseResolve$2;
13685
- var defineBuiltIn = defineBuiltIn$8;
13686
-
13687
- var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
13688
-
13689
- // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
13690
- var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
13691
- // eslint-disable-next-line unicorn/no-thenable -- required for testing
13692
- NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
13693
- });
13694
-
13695
- // `Promise.prototype.finally` method
13696
- // https://tc39.es/ecma262/#sec-promise.prototype.finally
13697
- $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
13698
- 'finally': function (onFinally) {
13699
- var C = speciesConstructor(this, getBuiltIn('Promise'));
13700
- var isFunction = isCallable(onFinally);
13701
- return this.then(
13702
- isFunction ? function (x) {
13703
- return promiseResolve(C, onFinally()).then(function () { return x; });
13704
- } : onFinally,
13705
- isFunction ? function (e) {
13706
- return promiseResolve(C, onFinally()).then(function () { throw e; });
13707
- } : onFinally
13708
- );
13709
- }
13710
- });
13711
-
13712
- // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
13713
- if (isCallable(NativePromiseConstructor)) {
13714
- var method = getBuiltIn('Promise').prototype['finally'];
13715
- if (NativePromisePrototype['finally'] !== method) {
13716
- defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
13717
- }
13718
- }
13719
-
13720
- function useJsonFromCDN(url, defaultValue) {
13721
- const [value, setValue] = React.useState(defaultValue);
13722
- const [loading, setLoading] = React.useState(true);
13723
- React.useEffect(() => {
13724
- setLoading(true);
13725
- fetch(url).then(response => response.json()).then(data => setValue(data)).finally(() => setLoading(false));
13726
- }, [url]);
13727
- return [value, loading];
13728
- }
13729
- const cdnUrl = "https://cdn.packlink.com";
13730
- const fallbackTheme = new gigerTheme.Theme();
13731
- /**
13732
- * @category Providers
13733
- */
13734
- const GigerProvider = ({
13735
- children,
13736
- brandName: _brandName = brands.BrandName.PAYPAL_SHIPCENTER,
13737
- rootId
13738
- }) => {
13739
- const [theme, themeLoading] = useJsonFromCDN(`${cdnUrl}/brand/${_brandName}/theme.json`, fallbackTheme);
13740
- const [iconIndex, iconIndexLoading] = useJsonFromCDN(`${cdnUrl}/brand/iconIndex.json`, null);
13741
- const deserializedTheme = React.useMemo(() => new gigerTheme.Theme(theme), [theme]);
13742
- // Function get icon from cdn depending on the brand
13743
- const resolveIcon = React.useCallback(iconName => __awaiter(void 0, void 0, void 0, function* () {
13744
- if (!iconIndexLoading && iconIndex && iconName) {
13745
- const iconBrand = (iconIndex[iconName.toLowerCase()] || []).includes(_brandName) ? _brandName : brands.BrandName.PACKLINK_CONS;
13746
- const response = yield fetch(`${cdnUrl}/brand/${iconBrand}/icons/${iconName.toLowerCase()}.svg`);
13747
- return yield response.text();
13748
- }
13749
- return "";
13750
- }), [iconIndex, _brandName, iconIndexLoading]);
13751
- const root = document.getElementById(rootId);
13752
- const themeRoot = document.getElementById(`${rootId}-theme`);
13753
- return jsxRuntime.jsx(react.ThemeProvider, Object.assign({
13754
- theme: deserializedTheme
13755
- }, {
13756
- children: jsxRuntime.jsxs(giger.GigerConfigProvider, Object.assign({
13757
- resolveIcon: resolveIcon
13758
- }, {
13759
- children: [root && jsxRuntime.jsx(giger.EmotionReset, {
13760
- reference: root
13761
- }), themeRoot && jsxRuntime.jsx(giger.FontsLoader, {
13762
- cdnUrl: cdnUrl,
13763
- reference: themeRoot,
13764
- theme: deserializedTheme
13765
- }), jsxRuntime.jsx("div", Object.assign({
13766
- css: {
13767
- height: "100%",
13768
- width: "100%"
13769
- },
13770
- id: `${rootId}-theme`
13771
- }, {
13772
- children: !themeLoading && children
13773
- }))]
13774
- }))
13775
- }));
13776
- };
13777
-
13778
- /**
13779
- * Scopes emotion CSS cache to the specific Element instead of the page body
13780
- *
13781
- * @see {@link registerElement}
13782
- */
13783
- const memoizedCreateCacheWithScope = memoize__default["default"](scope => {
13784
- const scopeSelectors = element => {
13785
- if ((element === null || element === void 0 ? void 0 : element.type) === "rule" && (element === null || element === void 0 ? void 0 : element.value.startsWith(".css"))) {
13786
- element.props = [element.props].flat().map(value => {
13787
- if (value.includes(scope)) return value;
13788
- return `${scope} ${value}`;
13789
- });
13790
- }
13791
- };
13792
- return createCache__default["default"]({
13793
- key: "css",
13794
- stylisPlugins: [scopeSelectors, stylis.prefixer]
13795
- });
13796
- });
13797
- /**
13798
- * Fallback component for the Elements ErrorBoundary
13799
- *
13800
- * @see {@link registerElement}
13801
- */
13802
- const ErrorFallback = ({
13803
- error
13804
- }) => {
13805
- const {
13806
- t
13807
- } = reactI18next.useTranslation("common");
13808
- return jsxRuntime.jsxs("div", Object.assign({
13809
- css: {
13810
- alignItems: "center",
13811
- display: "flex",
13812
- flexDirection: "column",
13813
- height: "100%",
13814
- justifyContent: "center",
13815
- textAlign: "center",
13816
- width: "100%"
13817
- }
13818
- }, {
13819
- children: [jsxRuntime.jsx("div", Object.assign({
13820
- css: theme => ({
13821
- color: theme.palette.error.main,
13822
- marginBottom: theme.spacing(2)
13823
- })
13824
- }, {
13825
- children: jsxRuntime.jsx(giger.Icon, {
13826
- name: gigerTheme.IconNames.CANCEL,
13827
- size: giger.IconSize.SIZE_LARGE
13828
- })
13829
- })), t([typeof error === "string" ? error : error.message, "errorMessages.unknown"])]
13830
- }));
13831
- };
13832
- /**
13833
- * Registers element with all necessary providers and wrappers
13834
- */
13835
- const registerElement = (name, Element, rootId = `lmnt-${name}`) => {
13836
- const fallback = ({
13837
- error
13838
- }) => jsxRuntime.jsx(ErrorFallback, {
13839
- error: error
13840
- });
13841
- const i18next = i18n__default["default"].createInstance({
13842
- defaultNS: "common",
13843
- fallbackLng: "en",
13844
- fallbackNS: "common",
13845
- load: "languageOnly",
13846
- ns: ["common", name],
13847
- overloadTranslationOptionHandler: args => ({
13848
- defaultValue: args[1]
13849
- }),
13850
- react: {
13851
- useSuspense: false
13852
- },
13853
- resources,
13854
- supportedLngs: Object.keys(resources)
13855
- }, (err, t) => {
13856
- if (err) return console.log(err);
13857
- }).use(languageDetector__default["default"]).use(reactI18next.initReactI18next);
13858
- return props => {
13859
- const {
13860
- onError,
13861
- brandName
13862
- } = useElements();
13863
- return jsxRuntime.jsx("div", Object.assign({
13864
- css: {
13865
- height: "100%",
13866
- width: "100%"
13867
- },
13868
- id: rootId
13869
- }, {
13870
- children: jsxRuntime.jsx(reactI18next.I18nextProvider, Object.assign({
13871
- i18n: i18next
13872
- }, {
13873
- children: jsxRuntime.jsx(react.CacheProvider, Object.assign({
13874
- value: memoizedCreateCacheWithScope(".giger-emotion-reset")
13875
- }, {
13876
- children: jsxRuntime.jsx(GigerProvider, Object.assign({
13877
- brandName: brandName,
13878
- rootId: rootId
13879
- }, {
13880
- children: jsxRuntime.jsx(ErrorBoundary, Object.assign({
13881
- element: name,
13882
- fallback: fallback,
13883
- onError: onError
13884
- }, {
13885
- children: jsxRuntime.jsx(Element, Object.assign({}, props))
13886
- }))
13887
- }))
13888
- }))
13889
- }))
13890
- }));
13891
- };
13892
- };
13545
+ var en = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, common$1), listCarriers$1), manageDefaults), manageFunding), manageWarehouses$1), manageDefaults), onboarding$2), purchaseLabel$1), registerCarrier), registerWallet), viewShipment$1), voidLabel$1), walletHistory);
13893
13546
 
13894
13547
  const useListConnectedCarriers = () => {
13895
13548
  const {
@@ -13897,7 +13550,7 @@ const useListConnectedCarriers = () => {
13897
13550
  error,
13898
13551
  isLoading,
13899
13552
  refetch
13900
- } = reactApi.useListCarriers();
13553
+ } = alchemy.useListCarriers();
13901
13554
  const carrierMetadatas = useCarrierMetadata();
13902
13555
  const normalizedCarrierCodes = new Set(carriers === null || carriers === void 0 ? void 0 : carriers.map(c => c.carrierCode === "usps" ? "stamps_com" : c.carrierCode.includes("dhl") ? "dhl_express_walleted" : c.nickname.includes("free") ? "stamps_com" : c.carrierCode));
13903
13556
  return {
@@ -13911,7 +13564,7 @@ const useListConnectedCarriers = () => {
13911
13564
  };
13912
13565
  };
13913
13566
 
13914
- const ListCarriers = () => {
13567
+ const Component$5 = () => {
13915
13568
  const {
13916
13569
  data: carriersConnectedStatus,
13917
13570
  error,
@@ -13921,7 +13574,7 @@ const ListCarriers = () => {
13921
13574
  const {
13922
13575
  error: registerCarrierErrors,
13923
13576
  mutateAsync: carrierConnectAction
13924
- } = reactApi.useConnectCarrier();
13577
+ } = alchemy.useConnectCarrier();
13925
13578
  const handleRegistration = args => __awaiter(void 0, void 0, void 0, function* () {
13926
13579
  try {
13927
13580
  yield carrierConnectAction(Object.assign({}, args));
@@ -13931,7 +13584,7 @@ const ListCarriers = () => {
13931
13584
  yield refetchCarriers();
13932
13585
  });
13933
13586
  // TODO: How to pass two sets of errors and isLoading, possible example is to join errors like in RateForm and ShipmentForm.
13934
- return jsxRuntime.jsx(ListCarriers$1, {
13587
+ return jsxRuntime.jsx(ListCarriers, {
13935
13588
  carriers: carriersConnectedStatus,
13936
13589
  errors: error,
13937
13590
  isLoading: isLoading,
@@ -13939,10 +13592,23 @@ const ListCarriers = () => {
13939
13592
  registerCarrierErrors: registerCarrierErrors
13940
13593
  });
13941
13594
  };
13595
+ const Element$5 = alchemy__default["default"].createElement(Component$5, ErrorFallback, {
13596
+ css: {
13597
+ height: "100%",
13598
+ width: "100%"
13599
+ },
13600
+ resources: {
13601
+ en
13602
+ }
13603
+ });
13942
13604
 
13943
- const Element$5 = registerElement("list-carriers", ListCarriers);
13605
+ var listCarriers = /*#__PURE__*/Object.freeze({
13606
+ __proto__: null,
13607
+ Component: Component$5,
13608
+ Element: Element$5
13609
+ });
13944
13610
 
13945
- const ManageWarehouses = ({
13611
+ const Component$4 = ({
13946
13612
  onWarehouseAddressValidation
13947
13613
  }) => {
13948
13614
  const {
@@ -13953,19 +13619,19 @@ const ManageWarehouses = ({
13953
13619
  error: listWarehouseErrors,
13954
13620
  isLoading: isLoadingWarehouses,
13955
13621
  refetch: refreshListWarehouses
13956
- } = reactApi.useListWarehouses();
13622
+ } = alchemy.useListWarehouses();
13957
13623
  const {
13958
13624
  error: updateWarehouseErrors,
13959
13625
  mutateAsync: updateWarehouse
13960
- } = reactApi.useUpdateWarehouse();
13626
+ } = alchemy.useUpdateWarehouse();
13961
13627
  const {
13962
13628
  error: createWarehouseErrors,
13963
13629
  mutateAsync: createWarehouse
13964
- } = reactApi.useCreateWarehouse();
13630
+ } = alchemy.useCreateWarehouse();
13965
13631
  const {
13966
13632
  error: deleteWarehouseErrors,
13967
13633
  mutateAsync: deleteWarehouse
13968
- } = reactApi.useDeleteWarehouse();
13634
+ } = alchemy.useDeleteWarehouse();
13969
13635
  const handleDeleteWarehouse = warehouseId => __awaiter(void 0, void 0, void 0, function* () {
13970
13636
  yield deleteWarehouse({
13971
13637
  warehouseId
@@ -13978,6 +13644,7 @@ const ManageWarehouses = ({
13978
13644
  });
13979
13645
  const handleSubmitEditWarehouse = (payload, warehouseId) => __awaiter(void 0, void 0, void 0, function* () {
13980
13646
  yield updateWarehouse({
13647
+ isDefault: payload.isDefault,
13981
13648
  name: payload.name,
13982
13649
  originAddress: payload.originAddress,
13983
13650
  returnAddress: payload.returnAddress,
@@ -13999,18 +13666,108 @@ const ManageWarehouses = ({
13999
13666
  if (listWarehouseErrors) throw new Error(listWarehouseErrors.map(e => e.message).join(", "));
14000
13667
  throw new Error("errorMessages.unableToLoad.warehouses");
14001
13668
  }
13669
+ const sortedWarehouses = warehouses.sort((a, b) => {
13670
+ if (b.isDefault && !a.isDefault) return 1;
13671
+ if (a.isDefault && !b.isDefault) return -1;
13672
+ return sortByCreationDate(a, b, "desc");
13673
+ });
14002
13674
  const errors = [...(updateWarehouseErrors !== null && updateWarehouseErrors !== void 0 ? updateWarehouseErrors : []), ...(createWarehouseErrors !== null && createWarehouseErrors !== void 0 ? createWarehouseErrors : []), ...(deleteWarehouseErrors !== null && deleteWarehouseErrors !== void 0 ? deleteWarehouseErrors : [])];
14003
- return jsxRuntime.jsx(ManageWarehouses$1, {
13675
+ return jsxRuntime.jsx(ManageWarehouses, {
14004
13676
  errors: errors,
14005
13677
  onAdd: handleSubmitAddNewWarehouse,
14006
13678
  onDelete: handleDeleteWarehouse,
14007
13679
  onEdit: handleSubmitEditWarehouse,
14008
13680
  onSetDefault: handleSetDefault,
13681
+ warehouses: sortedWarehouses
13682
+ });
13683
+ };
13684
+ const Element$4 = alchemy__default["default"].createElement(Component$4, ErrorFallback, {
13685
+ css: {
13686
+ height: "100%",
13687
+ width: "100%"
13688
+ },
13689
+ resources: {
13690
+ en
13691
+ }
13692
+ });
13693
+
13694
+ var manageWarehouses = /*#__PURE__*/Object.freeze({
13695
+ __proto__: null,
13696
+ Component: Component$4,
13697
+ Element: Element$4
13698
+ });
13699
+
13700
+ const Component$3 = ({
13701
+ onCompleteOnboarding
13702
+ }) => {
13703
+ const {
13704
+ t
13705
+ } = reactI18next.useTranslation();
13706
+ const {
13707
+ data: warehouses,
13708
+ refetch: refetchWarehouses
13709
+ } = alchemy.useListWarehouses();
13710
+ const {
13711
+ mutateAsync: createWarehouse
13712
+ } = alchemy.useCreateWarehouse();
13713
+ const {
13714
+ data: carriers,
13715
+ refetch: refetchCarriers
13716
+ } = alchemy.useListCarriers();
13717
+ const {
13718
+ error: registerStampsCarrierErrors,
13719
+ mutateAsync: registerStampsCarrier
13720
+ } = alchemy.useConnectCarrier();
13721
+ const {
13722
+ error: registerUpsCarrierErrors,
13723
+ mutateAsync: registerUpsCarrier
13724
+ } = alchemy.useConnectCarrier();
13725
+ const {
13726
+ error: registerDhlCarrierErrors,
13727
+ mutateAsync: registerDhlCarrier
13728
+ } = alchemy.useConnectCarrier();
13729
+ const onWarehouseCreated = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
13730
+ yield refetchWarehouses();
13731
+ }), [refetchWarehouses]);
13732
+ const onCarrierCreated = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
13733
+ yield refetchCarriers();
13734
+ }), [refetchCarriers]);
13735
+ if (!carriers) return jsxRuntime.jsx(Loader, {
13736
+ message: t("errorMessages.unableToLoad.carriers")
13737
+ });
13738
+ if (!warehouses) return jsxRuntime.jsx(Loader, {
13739
+ message: t("errorMessages.unableToLoad.warehouses")
13740
+ });
13741
+ return jsxRuntime.jsx(Onboarding, {
13742
+ carriers: carriers,
13743
+ createWarehouse: createWarehouse,
13744
+ onCarrierCreated: onCarrierCreated,
13745
+ onCompleteOnboarding: onCompleteOnboarding,
13746
+ onWarehouseCreated: onWarehouseCreated,
13747
+ registerDhlCarrier: registerDhlCarrier,
13748
+ registerDhlCarrierErrors: registerDhlCarrierErrors,
13749
+ registerStampsCarrier: registerStampsCarrier,
13750
+ registerStampsCarrierErrors: registerStampsCarrierErrors,
13751
+ registerUpsCarrier: registerUpsCarrier,
13752
+ registerUpsCarrierErrors: registerUpsCarrierErrors,
14009
13753
  warehouses: warehouses
14010
13754
  });
14011
13755
  };
13756
+ const Element$3 = alchemy__default["default"].createElement(Component$3, ErrorFallback, {
13757
+ css: {
13758
+ height: "100%",
13759
+ width: "100%"
13760
+ },
13761
+ resources: {
13762
+ en
13763
+ }
13764
+ });
14012
13765
 
14013
- const Element$4 = registerElement("manage-warehouses", ManageWarehouses);
13766
+ var onboarding = /*#__PURE__*/Object.freeze({
13767
+ __proto__: null,
13768
+ Component: Component$3,
13769
+ Element: Element$3
13770
+ });
14014
13771
 
14015
13772
  const useAddress = ({
14016
13773
  compatibleCountryCodes,
@@ -14025,15 +13782,15 @@ const useAddress = ({
14025
13782
  const {
14026
13783
  error: validateAddressErrors,
14027
13784
  mutateAsync: validateAddresses
14028
- } = reactApi.useValidateAddresses();
13785
+ } = alchemy.useValidateAddresses();
14029
13786
  const {
14030
13787
  error: updateShipmentErrors,
14031
13788
  mutateAsync: updateShipment
14032
- } = reactApi.useUpdateSalesOrderShipment();
13789
+ } = alchemy.useUpdateSalesOrderShipment();
14033
13790
  const {
14034
13791
  error: parseAddressErrors,
14035
13792
  mutateAsync: parseAddress
14036
- } = reactApi.useParseAddress();
13793
+ } = alchemy.useParseAddress();
14037
13794
  const [addressPreference, setAddressPreference] = React.useState();
14038
13795
  const toggle = React.useCallback(() => {
14039
13796
  let updatedSelection = undefined;
@@ -14173,7 +13930,7 @@ const useCustoms = ({
14173
13930
  const {
14174
13931
  error: updateShipmentErrors,
14175
13932
  mutateAsync: updateShipment
14176
- } = reactApi.useUpdateSalesOrderShipment();
13933
+ } = alchemy.useUpdateSalesOrderShipment();
14177
13934
  const handleUpdateCustoms = React.useCallback(customs => __awaiter(void 0, void 0, void 0, function* () {
14178
13935
  if (!shipment) throw new Error("shipment not found");
14179
13936
  const updatedShipment = yield updateShipment(Object.assign(Object.assign({}, shipment), {
@@ -14198,7 +13955,7 @@ const usePresets = ({
14198
13955
  const {
14199
13956
  error: updateShipmentErrors,
14200
13957
  mutateAsync: updateShipment
14201
- } = reactApi.useUpdateSalesOrderShipment();
13958
+ } = alchemy.useUpdateSalesOrderShipment();
14202
13959
  const handleApplyPreset = preset => __awaiter(void 0, void 0, void 0, function* () {
14203
13960
  if (!shipment) throw new Error("shipment not found");
14204
13961
  const updatedShipment = yield updateShipment(Object.assign(Object.assign(Object.assign({}, shipment), preset.serviceCode && preset.carrierId && {
@@ -14317,17 +14074,17 @@ const useRequestRates = ({
14317
14074
  }) => {
14318
14075
  const {
14319
14076
  data: carriers
14320
- } = reactApi.useListCarriers();
14077
+ } = alchemy.useListCarriers();
14321
14078
  const {
14322
14079
  data: customPackageTypes
14323
- } = reactApi.useListCustomPackageTypes();
14080
+ } = alchemy.useListCustomPackageTypes();
14324
14081
  const {
14325
14082
  data: ratedShipment,
14326
14083
  error: ratesErrors,
14327
14084
  isLoading: ratesCalculating,
14328
14085
  reset: resetRates,
14329
14086
  mutateAsync: calculateRates
14330
- } = reactApi.useCalculateRates();
14087
+ } = alchemy.useCalculateRates();
14331
14088
  const requestRates = React.useCallback(shipment => __awaiter(void 0, void 0, void 0, function* () {
14332
14089
  var _a;
14333
14090
  const result = yield calculateRates({
@@ -14375,15 +14132,15 @@ const useRatesForm = ({
14375
14132
  const [beforeCreateError, setBeforeCreateError] = React.useState();
14376
14133
  const {
14377
14134
  data: carriers
14378
- } = reactApi.useListCarriers();
14135
+ } = alchemy.useListCarriers();
14379
14136
  const {
14380
14137
  mutateAsync: updateShipment
14381
- } = reactApi.useUpdateSalesOrderShipment();
14138
+ } = alchemy.useUpdateSalesOrderShipment();
14382
14139
  const {
14383
14140
  error: labelErrors,
14384
14141
  reset: resetLabel,
14385
14142
  mutateAsync: createLabel
14386
- } = reactApi.useCreateLabel();
14143
+ } = alchemy.useCreateLabel();
14387
14144
  const {
14388
14145
  ratesCalculating,
14389
14146
  ratesErrors,
@@ -14497,18 +14254,18 @@ const useShipmentForm = ({
14497
14254
  }) => {
14498
14255
  const {
14499
14256
  data: carriers
14500
- } = reactApi.useListCarriers();
14257
+ } = alchemy.useListCarriers();
14501
14258
  const {
14502
14259
  data: customPackageTypes
14503
- } = reactApi.useListCustomPackageTypes();
14260
+ } = alchemy.useListCustomPackageTypes();
14504
14261
  const {
14505
14262
  data: warehouses
14506
- } = reactApi.useListWarehouses();
14263
+ } = alchemy.useListWarehouses();
14507
14264
  const {
14508
14265
  error: updateShipmentErrors,
14509
14266
  mutateAsync: updateShipment,
14510
14267
  reset: resetSalesOrderShipment
14511
- } = reactApi.useUpdateSalesOrderShipment();
14268
+ } = alchemy.useUpdateSalesOrderShipment();
14512
14269
  const {
14513
14270
  addressErrors,
14514
14271
  addressPreference,
@@ -14657,63 +14414,6 @@ const ConfigureShipment = _a => {
14657
14414
  });
14658
14415
  };
14659
14416
 
14660
- const Onboarding = ({
14661
- onCompleteOnboarding
14662
- }) => {
14663
- const {
14664
- t
14665
- } = reactI18next.useTranslation();
14666
- const {
14667
- data: warehouses,
14668
- refetch: refetchWarehouses
14669
- } = reactApi.useListWarehouses();
14670
- const {
14671
- mutateAsync: createWarehouse
14672
- } = reactApi.useCreateWarehouse();
14673
- const {
14674
- data: carriers,
14675
- refetch: refetchCarriers
14676
- } = reactApi.useListCarriers();
14677
- const {
14678
- error: registerStampsCarrierErrors,
14679
- mutateAsync: registerStampsCarrier
14680
- } = reactApi.useConnectCarrier();
14681
- const {
14682
- error: registerUpsCarrierErrors,
14683
- mutateAsync: registerUpsCarrier
14684
- } = reactApi.useConnectCarrier();
14685
- const {
14686
- error: registerDhlCarrierErrors,
14687
- mutateAsync: registerDhlCarrier
14688
- } = reactApi.useConnectCarrier();
14689
- const onWarehouseCreated = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
14690
- yield refetchWarehouses();
14691
- }), [refetchWarehouses]);
14692
- const onCarrierCreated = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
14693
- yield refetchCarriers();
14694
- }), [refetchCarriers]);
14695
- if (!carriers) return jsxRuntime.jsx(Loader, {
14696
- message: t("errorMessages.unableToLoad.carriers")
14697
- });
14698
- if (!warehouses) return jsxRuntime.jsx(Loader, {
14699
- message: t("errorMessages.unableToLoad.warehouses")
14700
- });
14701
- return jsxRuntime.jsx(Onboarding$1, {
14702
- carriers: carriers,
14703
- createWarehouse: createWarehouse,
14704
- onCarrierCreated: onCarrierCreated,
14705
- onCompleteOnboarding: onCompleteOnboarding,
14706
- onWarehouseCreated: onWarehouseCreated,
14707
- registerDhlCarrier: registerDhlCarrier,
14708
- registerDhlCarrierErrors: registerDhlCarrierErrors,
14709
- registerStampsCarrier: registerStampsCarrier,
14710
- registerStampsCarrierErrors: registerStampsCarrierErrors,
14711
- registerUpsCarrier: registerUpsCarrier,
14712
- registerUpsCarrierErrors: registerUpsCarrierErrors,
14713
- warehouses: warehouses
14714
- });
14715
- };
14716
-
14717
14417
  const usePendingShipment = ({
14718
14418
  onLoad,
14719
14419
  salesOrder,
@@ -14723,21 +14423,21 @@ const usePendingShipment = ({
14723
14423
  const {
14724
14424
  data: warehouses,
14725
14425
  error: listWarehouseErrors
14726
- } = reactApi.useListWarehouses();
14426
+ } = alchemy.useListWarehouses();
14727
14427
  const {
14728
14428
  data: shipments,
14729
14429
  error: listShipmentsErrors,
14730
14430
  isLoading: isListShipmentsLoading,
14731
14431
  isFetching: isListShipmentsValidating,
14732
14432
  refetch: reloadShipments
14733
- } = reactApi.useListSalesOrderShipments({
14433
+ } = alchemy.useListSalesOrderShipments({
14734
14434
  salesOrderIds: salesOrder ? [salesOrder === null || salesOrder === void 0 ? void 0 : salesOrder.salesOrderId] : undefined
14735
14435
  });
14736
14436
  const {
14737
14437
  error: createShipmentErrors,
14738
14438
  isLoading: isShipmentCreating,
14739
14439
  mutateAsync: createShipment
14740
- } = reactApi.useCreateSalesOrderShipment();
14440
+ } = alchemy.useCreateSalesOrderShipment();
14741
14441
  const pendingShipment = getPendingShipment(shipments);
14742
14442
  const defaultWarehouse = (_a = warehouses === null || warehouses === void 0 ? void 0 : warehouses.find(w => w.warehouseId === warehouseId)) !== null && _a !== void 0 ? _a : warehouses === null || warehouses === void 0 ? void 0 : warehouses[0];
14743
14443
  // On page load, check for a shipment and either call the onLoad callback or create a new shipment
@@ -14802,7 +14502,7 @@ const useConfigureShipment = ({
14802
14502
  yield reloadPendingShipment();
14803
14503
  yield onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(shipment);
14804
14504
  }), [onShipmentUpdated, reloadPendingShipment]);
14805
- const labelLayoutSetting = (_b = (_a = reactApi.useGetAccountSettings().data) === null || _a === void 0 ? void 0 : _a.defaultLabelLayout) !== null && _b !== void 0 ? _b : "4x6";
14505
+ const labelLayoutSetting = (_b = (_a = alchemy.useGetAccountSettings().data) === null || _a === void 0 ? void 0 : _a.defaultLabelLayout) !== null && _b !== void 0 ? _b : "4x6";
14806
14506
  return {
14807
14507
  errors: pendingShipmentErrors,
14808
14508
  isLoading: isPendingShipmentLoading,
@@ -14826,7 +14526,7 @@ const useImportSalesOrder = ({
14826
14526
  isFetching: isFetchingSalesOrders,
14827
14527
  isLoading: isLoadingSalesOrders,
14828
14528
  refetch: refetchSalesOrders
14829
- } = reactApi.useListSalesOrders({
14529
+ } = alchemy.useListSalesOrders({
14830
14530
  externalOrderId,
14831
14531
  externalOrderNumber
14832
14532
  });
@@ -14836,17 +14536,17 @@ const useImportSalesOrder = ({
14836
14536
  isFetching: isFetchingSalesOrder,
14837
14537
  isLoading: isLoadingSalesOrder,
14838
14538
  refetch: refetchSalesOrder
14839
- } = reactApi.useGetSalesOrder(salesOrderId !== null && salesOrderId !== void 0 ? salesOrderId : salesOrders && salesOrders[0] ? salesOrders[0].salesOrderId : undefined);
14539
+ } = alchemy.useGetSalesOrder(salesOrderId !== null && salesOrderId !== void 0 ? salesOrderId : salesOrders && salesOrders[0] ? salesOrders[0].salesOrderId : undefined);
14840
14540
  const {
14841
14541
  data: orderSources,
14842
14542
  error: listOrderSourcesErrors
14843
- } = reactApi.useListOrderSources();
14543
+ } = alchemy.useListOrderSources();
14844
14544
  const {
14845
14545
  data: refreshedOrderSource,
14846
14546
  error: refreshOrderSourceErrors,
14847
14547
  isLoading: isRefreshingOrderSource,
14848
14548
  mutateAsync: refreshOrderSource
14849
- } = reactApi.useRefreshOrderSource();
14549
+ } = alchemy.useRefreshOrderSource();
14850
14550
  React.useEffect(() => {
14851
14551
  // Refreshes the matching order sources and re-executes the sales-order fetch
14852
14552
  // to handle scenarios where the sales order has not yet been imported. If the
@@ -14917,7 +14617,7 @@ const useLoadShipment = ({
14917
14617
  error: loadShipmentErrors,
14918
14618
  refetch: refetchShipment,
14919
14619
  isLoading
14920
- } = reactApi.useGetShipment(shipmentId);
14620
+ } = alchemy.useGetShipment(shipmentId);
14921
14621
  const errors = [...(loadShipmentErrors !== null && loadShipmentErrors !== void 0 ? loadShipmentErrors : [])];
14922
14622
  return {
14923
14623
  errors: errors.length > 0 ? errors : undefined,
@@ -14968,7 +14668,7 @@ const PurchaseLabelByShipment = _a => {
14968
14668
  }));
14969
14669
  };
14970
14670
 
14971
- const PurchaseLabel = _a => {
14671
+ const Component$2 = _a => {
14972
14672
  var {
14973
14673
  shipmentId
14974
14674
  } = _a,
@@ -14981,8 +14681,23 @@ const PurchaseLabel = _a => {
14981
14681
  return jsxRuntime.jsx(PurchaseLabelBySalesOrder, Object.assign({}, props));
14982
14682
  }
14983
14683
  };
14684
+ const Element$2 = alchemy__default["default"].createElement(Component$2, ErrorFallback, {
14685
+ css: {
14686
+ height: "100%",
14687
+ width: "100%"
14688
+ },
14689
+ resources: {
14690
+ en
14691
+ }
14692
+ });
14984
14693
 
14985
- const Shipment = ({
14694
+ var purchaseLabel = /*#__PURE__*/Object.freeze({
14695
+ __proto__: null,
14696
+ Component: Component$2,
14697
+ Element: Element$2
14698
+ });
14699
+
14700
+ const Component$1 = ({
14986
14701
  features,
14987
14702
  onClickPrintLabel,
14988
14703
  onClickPurchaseLabel,
@@ -14993,13 +14708,13 @@ const Shipment = ({
14993
14708
  const {
14994
14709
  t
14995
14710
  } = reactI18next.useTranslation(["common", "view-shipment"]);
14996
- const shipment = reactApi.useGetSalesOrderShipment(shipmentId);
14997
- const labels = reactApi.useListLabels({
14711
+ const shipment = alchemy.useGetSalesOrderShipment(shipmentId);
14712
+ const labels = alchemy.useListLabels({
14998
14713
  shipmentId
14999
14714
  });
15000
- const salesOrder = reactApi.useGetSalesOrder((_b = (_a = shipment.data) === null || _a === void 0 ? void 0 : _a.salesOrderIds) === null || _b === void 0 ? void 0 : _b[0]);
15001
- const warehouses = reactApi.useListWarehouses();
15002
- const carriers = reactApi.useListCarriers();
14715
+ const salesOrder = alchemy.useGetSalesOrder((_b = (_a = shipment.data) === null || _a === void 0 ? void 0 : _a.salesOrderIds) === null || _b === void 0 ? void 0 : _b[0]);
14716
+ const warehouses = alchemy.useListWarehouses();
14717
+ const carriers = alchemy.useListCarriers();
15003
14718
  if (!shipment.data && !shipment.error) return jsxRuntime.jsx(Loader, {
15004
14719
  message: t("loading.shipment")
15005
14720
  });
@@ -15009,7 +14724,7 @@ const Shipment = ({
15009
14724
  var _a;
15010
14725
  return w.warehouseId === ((_a = shipment.data) === null || _a === void 0 ? void 0 : _a.warehouseId);
15011
14726
  });
15012
- return jsxRuntime.jsx(Shipment$1, {
14727
+ return jsxRuntime.jsx(Shipment, {
15013
14728
  carriers: carriers.data,
15014
14729
  features: features === null || features === void 0 ? void 0 : features.shipment,
15015
14730
  labels: labels.data,
@@ -15021,17 +14736,32 @@ const Shipment = ({
15021
14736
  warehouse: warehouse
15022
14737
  });
15023
14738
  };
14739
+ const Element$1 = alchemy__default["default"].createElement(Component$1, ErrorFallback, {
14740
+ css: {
14741
+ height: "100%",
14742
+ width: "100%"
14743
+ },
14744
+ resources: {
14745
+ en
14746
+ }
14747
+ });
15024
14748
 
15025
- const VoidLabel = ({
14749
+ var viewShipment = /*#__PURE__*/Object.freeze({
14750
+ __proto__: null,
14751
+ Component: Component$1,
14752
+ Element: Element$1
14753
+ });
14754
+
14755
+ const Component = ({
15026
14756
  labelId,
15027
14757
  onComplete,
15028
14758
  onSuccess,
15029
14759
  onViewShipment
15030
14760
  }) => {
15031
14761
  var _a;
15032
- const label = reactApi.useGetLabel(labelId);
15033
- const shipment = reactApi.useGetSalesOrderShipment((_a = label.data) === null || _a === void 0 ? void 0 : _a.shipmentId);
15034
- const voidLabel = reactApi.useVoidLabel();
14762
+ const label = alchemy.useGetLabel(labelId);
14763
+ const shipment = alchemy.useGetSalesOrderShipment((_a = label.data) === null || _a === void 0 ? void 0 : _a.shipmentId);
14764
+ const voidLabel = alchemy.useVoidLabel();
15035
14765
  const handleVoidLabelSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
15036
14766
  if (!labelId) throw new Error("labelId is required");
15037
14767
  const result = yield voidLabel.mutateAsync(labelId);
@@ -15041,7 +14771,7 @@ const VoidLabel = ({
15041
14771
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(label.data, shipment.data);
15042
14772
  }
15043
14773
  });
15044
- return jsxRuntime.jsx(VoidLabel$1, {
14774
+ return jsxRuntime.jsx(VoidLabel, {
15045
14775
  onComplete: onComplete,
15046
14776
  onSubmit: handleVoidLabelSubmit,
15047
14777
  onViewShipment: onViewShipment,
@@ -15049,14 +14779,21 @@ const VoidLabel = ({
15049
14779
  voidRequest: voidLabel.data
15050
14780
  });
15051
14781
  };
14782
+ const Element = alchemy__default["default"].createElement(Component, ErrorFallback, {
14783
+ css: {
14784
+ height: "100%",
14785
+ width: "100%"
14786
+ },
14787
+ resources: {
14788
+ en
14789
+ }
14790
+ });
15052
14791
 
15053
- const Element$3 = registerElement("purchase-label", PurchaseLabel);
15054
-
15055
- const Element$2 = registerElement("onboarding", Onboarding);
15056
-
15057
- const Element$1 = registerElement("view-shipment", Shipment);
15058
-
15059
- const Element = registerElement("void-label", VoidLabel);
14792
+ var voidLabel = /*#__PURE__*/Object.freeze({
14793
+ __proto__: null,
14794
+ Component: Component,
14795
+ Element: Element
14796
+ });
15060
14797
 
15061
14798
  exports.AddFundsForm = AddFundsForm;
15062
14799
  exports.AutoFundingForm = AutoFundingForm;
@@ -15066,36 +14803,32 @@ exports.Country = Country;
15066
14803
  exports.Cube = Cube;
15067
14804
  exports.DateRangeCombo = DateRangeCombo;
15068
14805
  exports.DateRangeSelect = DateRangeSelect;
15069
- exports.ElementsContext = ElementsContext;
15070
- exports.ElementsProvider = ElementsProvider;
15071
- exports.ErrorBoundary = ErrorBoundary;
15072
14806
  exports.ErrorFallback = ErrorFallback;
15073
14807
  exports.Field = fields;
15074
14808
  exports.FieldLabel = FieldLabel;
15075
14809
  exports.FormPortal = FormPortal;
15076
14810
  exports.FundAndPurchase = FundAndPurchase;
15077
- exports.GigerProvider = GigerProvider;
15078
14811
  exports.InlineLabel = InlineLabel;
15079
14812
  exports.ItemsBreakdown = ItemsBreakdown;
15080
14813
  exports.LinkAction = LinkAction;
15081
- exports.ListCarriers = Element$5;
14814
+ exports.ListCarriers = listCarriers;
15082
14815
  exports.Loader = Loader;
15083
14816
  exports.ManageFunding = ManageFunding;
15084
- exports.ManageWarehouses = Element$4;
15085
- exports.Onboarding = Element$2;
14817
+ exports.ManageWarehouses = manageWarehouses;
14818
+ exports.Onboarding = onboarding;
15086
14819
  exports.PageLayoutProvider = PageLayoutProvider;
15087
14820
  exports.Portal = Portal;
15088
- exports.PurchaseLabel = Element$3;
14821
+ exports.PurchaseLabel = purchaseLabel;
15089
14822
  exports.RootPortalProvider = RootPortalProvider;
15090
14823
  exports.Section = Section;
15091
14824
  exports.Spacer = Spacer;
15092
14825
  exports.Spread = Spread;
15093
14826
  exports.StoryNotes = StoryNotes;
15094
- exports.Templates = index$1;
14827
+ exports.Templates = index;
15095
14828
  exports.UsState = UsState;
15096
14829
  exports.UsaCity = UsaCity;
15097
- exports.ViewShipment = Element$1;
15098
- exports.VoidLabel = Element;
14830
+ exports.ViewShipment = viewShipment;
14831
+ exports.VoidLabel = voidLabel;
15099
14832
  exports.autoFundingSchema = autoFundingSchema;
15100
14833
  exports.calculateTotal = calculateTotal;
15101
14834
  exports.capitalizeFirstLetter = capitalizeFirstLetter;
@@ -15146,7 +14879,6 @@ exports.overrideCarrierCodes = overrideCarrierCodes$1;
15146
14879
  exports.phoneSchema = phoneSchema;
15147
14880
  exports.phoneSchemaUnvalidated = phoneSchemaUnvalidated;
15148
14881
  exports.postalCodeRegex = postalCodeRegex$3;
15149
- exports.registerElement = registerElement;
15150
14882
  exports.sortByCreationDate = sortByCreationDate;
15151
14883
  exports.usCities = usCities;
15152
14884
  exports.usStateCodes = usStateCodes;
@@ -15158,7 +14890,6 @@ exports.useCountryCodeOptions = useCountryCodeOptions;
15158
14890
  exports.useCustomsContentsOptions = useCustomsContentsOptions;
15159
14891
  exports.useCustomsNonDeliveryOptions = useCustomsNonDeliveryOptions;
15160
14892
  exports.useDateRangeOptions = useDateRangeOptions;
15161
- exports.useElements = useElements;
15162
14893
  exports.useExpirationMonthOptions = useExpirationMonthOptions;
15163
14894
  exports.useInsuranceProviderOptions = useInsuranceProviderOptions;
15164
14895
  exports.useNestedForm = useNestedForm;