@bonlineza/luxity-lib 2.36.1-beta.1 → 2.36.1-beta.3

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 (90) hide show
  1. package/Accordion.js +76 -116
  2. package/AddInterest.js +440 -777
  3. package/AddProductInterest.js +485 -644
  4. package/BrandSelector.js +176 -336
  5. package/Checkbox.js +68 -101
  6. package/CheckboxButton.js +79 -124
  7. package/CommunicationPreferenceOptionsRenderer.js +159 -169
  8. package/CommunicationPreferenceSection.js +166 -178
  9. package/CommunicationPreferences.js +549 -427
  10. package/ConditionSelector.js +174 -336
  11. package/CountryCodeSelect.js +7 -10
  12. package/CurrencyInputFormatter.js +29 -56
  13. package/CurrencySelect.js +23 -49
  14. package/DropdownSelector.js +68 -92
  15. package/GALink.js +6 -16
  16. package/GenderSelector.js +88 -142
  17. package/GraphQLDropdownSelector.js +933 -1511
  18. package/GraphQLMultiSelector.js +141 -274
  19. package/IconHeader.js +11 -25
  20. package/IconWrapper.js +3 -7
  21. package/InterestCatSelector.js +34 -74
  22. package/InterestItem.js +103 -187
  23. package/Interests.js +922 -1471
  24. package/InterestsSubheading.js +5 -10
  25. package/InvertedTextButton.js +27 -63
  26. package/LuxityAppSideNav.js +18 -21
  27. package/LuxityDesktopHeader.js +219 -274
  28. package/LuxityFooter.js +430 -321
  29. package/LuxityGraphQLDropdownSelector.js +949 -1543
  30. package/LuxityGraphQLMultiselector.js +167 -321
  31. package/LuxityMobileHeader.js +251 -342
  32. package/LuxityPageReady.js +74 -136
  33. package/LuxityProductInterestItem.js +97 -175
  34. package/LuxitySideNav.js +165 -215
  35. package/MaterialSelector.js +956 -1551
  36. package/ModelSelector.js +956 -1551
  37. package/NotificationDropDown.js +122 -221
  38. package/Notify.js +0 -1
  39. package/OutlinePrimaryButton.js +26 -58
  40. package/PriceRangeSelector.js +168 -281
  41. package/PrimaryButton.js +26 -58
  42. package/RadioButtons.js +114 -140
  43. package/RangeSlider.js +152 -242
  44. package/RareStepFooter.js +27 -41
  45. package/RareStepHeader.js +139 -190
  46. package/ReactSelectWrapper.js +0 -1
  47. package/SecondaryButton.js +26 -58
  48. package/ShoeSizeRangeSelector.js +162 -260
  49. package/ShoeSizeSelector.js +158 -263
  50. package/SimpleErrorBoundary.js +59 -106
  51. package/StyleSelector.js +176 -336
  52. package/TextButton.js +26 -58
  53. package/Tooltip.js +17 -39
  54. package/Tracking.js +0 -1
  55. package/WrapperButton.js +20 -43
  56. package/build/bundle.css +1 -1
  57. package/build/bundle.js +1834 -2387
  58. package/package.json +3 -2
  59. package/svg/Accessories.js +6 -13
  60. package/svg/Account.js +6 -13
  61. package/svg/Add.js +6 -13
  62. package/svg/ArrowRight.js +6 -13
  63. package/svg/Bags.js +6 -13
  64. package/svg/BurgerMenu.js +6 -13
  65. package/svg/Calendar.js +6 -13
  66. package/svg/CalendarCircled.js +6 -13
  67. package/svg/CheckCircled.js +6 -13
  68. package/svg/Close.js +6 -13
  69. package/svg/Clothing.js +6 -13
  70. package/svg/Dot.js +6 -13
  71. package/svg/Edit.js +6 -13
  72. package/svg/Eye.js +6 -13
  73. package/svg/FileAttach.js +6 -13
  74. package/svg/FileAttachCircled.js +6 -13
  75. package/svg/LightBulb.js +6 -13
  76. package/svg/Logo.js +6 -13
  77. package/svg/LuxityMenu.js +6 -13
  78. package/svg/Minus.js +6 -13
  79. package/svg/MobileAvatar.js +6 -13
  80. package/svg/MyOrder.js +6 -13
  81. package/svg/MyPayment.js +6 -13
  82. package/svg/MyProfile.js +8 -14
  83. package/svg/MySale.js +6 -13
  84. package/svg/Notification.js +6 -13
  85. package/svg/PointerDown.js +6 -13
  86. package/svg/Search.js +6 -13
  87. package/svg/Shoes.js +6 -13
  88. package/svg/SvgWrapper.js +3 -7
  89. package/svg/Trash.js +6 -13
  90. package/svg/Watches.js +6 -13
@@ -14,555 +14,462 @@
14
14
  raf = raf && Object.prototype.hasOwnProperty.call(raf, 'default') ? raf['default'] : raf;
15
15
  AutosizeInput = AutosizeInput && Object.prototype.hasOwnProperty.call(AutosizeInput, 'default') ? AutosizeInput['default'] : AutosizeInput;
16
16
 
17
- function ownKeys(object, enumerableOnly) {
18
- var keys = Object.keys(object);
19
-
17
+ function _arrayLikeToArray(r, a) {
18
+ (null == a || a > r.length) && (a = r.length);
19
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
20
+ return n;
21
+ }
22
+ function _arrayWithHoles(r) {
23
+ if (Array.isArray(r)) return r;
24
+ }
25
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
26
+ try {
27
+ var i = n[a](c),
28
+ u = i.value;
29
+ } catch (n) {
30
+ return void e(n);
31
+ }
32
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
33
+ }
34
+ function _asyncToGenerator(n) {
35
+ return function () {
36
+ var t = this,
37
+ e = arguments;
38
+ return new Promise(function (r, o) {
39
+ var a = n.apply(t, e);
40
+ function _next(n) {
41
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
42
+ }
43
+ function _throw(n) {
44
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
45
+ }
46
+ _next(void 0);
47
+ });
48
+ };
49
+ }
50
+ function _defineProperty(e, r, t) {
51
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
52
+ value: t,
53
+ enumerable: !0,
54
+ configurable: !0,
55
+ writable: !0
56
+ }) : e[r] = t, e;
57
+ }
58
+ function _extends() {
59
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
60
+ for (var e = 1; e < arguments.length; e++) {
61
+ var t = arguments[e];
62
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
63
+ }
64
+ return n;
65
+ }, _extends.apply(null, arguments);
66
+ }
67
+ function _iterableToArrayLimit(r, l) {
68
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
69
+ if (null != t) {
70
+ var e,
71
+ n,
72
+ i,
73
+ u,
74
+ a = [],
75
+ f = !0,
76
+ o = !1;
77
+ try {
78
+ if (i = (t = t.call(r)).next, 0 === l) {
79
+ if (Object(t) !== t) return;
80
+ f = !1;
81
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
82
+ } catch (r) {
83
+ o = !0, n = r;
84
+ } finally {
85
+ try {
86
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
87
+ } finally {
88
+ if (o) throw n;
89
+ }
90
+ }
91
+ return a;
92
+ }
93
+ }
94
+ function _nonIterableRest() {
95
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
96
+ }
97
+ function ownKeys(e, r) {
98
+ var t = Object.keys(e);
20
99
  if (Object.getOwnPropertySymbols) {
21
- var symbols = Object.getOwnPropertySymbols(object);
22
- enumerableOnly && (symbols = symbols.filter(function (sym) {
23
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
24
- })), keys.push.apply(keys, symbols);
100
+ var o = Object.getOwnPropertySymbols(e);
101
+ r && (o = o.filter(function (r) {
102
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
103
+ })), t.push.apply(t, o);
25
104
  }
26
-
27
- return keys;
105
+ return t;
28
106
  }
29
-
30
- function _objectSpread2(target) {
31
- for (var i = 1; i < arguments.length; i++) {
32
- var source = null != arguments[i] ? arguments[i] : {};
33
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
34
- _defineProperty(target, key, source[key]);
35
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
36
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
107
+ function _objectSpread2(e) {
108
+ for (var r = 1; r < arguments.length; r++) {
109
+ var t = null != arguments[r] ? arguments[r] : {};
110
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
111
+ _defineProperty(e, r, t[r]);
112
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
113
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
37
114
  });
38
115
  }
39
-
40
- return target;
116
+ return e;
117
+ }
118
+ function _objectWithoutProperties(e, t) {
119
+ if (null == e) return {};
120
+ var o,
121
+ r,
122
+ i = _objectWithoutPropertiesLoose(e, t);
123
+ if (Object.getOwnPropertySymbols) {
124
+ var n = Object.getOwnPropertySymbols(e);
125
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
126
+ }
127
+ return i;
128
+ }
129
+ function _objectWithoutPropertiesLoose(r, e) {
130
+ if (null == r) return {};
131
+ var t = {};
132
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
133
+ if (-1 !== e.indexOf(n)) continue;
134
+ t[n] = r[n];
135
+ }
136
+ return t;
41
137
  }
42
-
43
138
  function _regeneratorRuntime() {
44
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
45
-
46
139
  _regeneratorRuntime = function () {
47
- return exports;
140
+ return e;
48
141
  };
49
-
50
- var exports = {},
51
- Op = Object.prototype,
52
- hasOwn = Op.hasOwnProperty,
53
- $Symbol = "function" == typeof Symbol ? Symbol : {},
54
- iteratorSymbol = $Symbol.iterator || "@@iterator",
55
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
56
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
57
-
58
- function define(obj, key, value) {
59
- return Object.defineProperty(obj, key, {
60
- value: value,
142
+ var t,
143
+ e = {},
144
+ r = Object.prototype,
145
+ n = r.hasOwnProperty,
146
+ o = Object.defineProperty || function (t, e, r) {
147
+ t[e] = r.value;
148
+ },
149
+ i = "function" == typeof Symbol ? Symbol : {},
150
+ a = i.iterator || "@@iterator",
151
+ c = i.asyncIterator || "@@asyncIterator",
152
+ u = i.toStringTag || "@@toStringTag";
153
+ function define(t, e, r) {
154
+ return Object.defineProperty(t, e, {
155
+ value: r,
61
156
  enumerable: !0,
62
157
  configurable: !0,
63
158
  writable: !0
64
- }), obj[key];
159
+ }), t[e];
65
160
  }
66
-
67
161
  try {
68
162
  define({}, "");
69
- } catch (err) {
70
- define = function (obj, key, value) {
71
- return obj[key] = value;
163
+ } catch (t) {
164
+ define = function (t, e, r) {
165
+ return t[e] = r;
72
166
  };
73
167
  }
74
-
75
- function wrap(innerFn, outerFn, self, tryLocsList) {
76
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
77
- generator = Object.create(protoGenerator.prototype),
78
- context = new Context(tryLocsList || []);
79
- return generator._invoke = function (innerFn, self, context) {
80
- var state = "suspendedStart";
81
- return function (method, arg) {
82
- if ("executing" === state) throw new Error("Generator is already running");
83
-
84
- if ("completed" === state) {
85
- if ("throw" === method) throw arg;
86
- return doneResult();
87
- }
88
-
89
- for (context.method = method, context.arg = arg;;) {
90
- var delegate = context.delegate;
91
-
92
- if (delegate) {
93
- var delegateResult = maybeInvokeDelegate(delegate, context);
94
-
95
- if (delegateResult) {
96
- if (delegateResult === ContinueSentinel) continue;
97
- return delegateResult;
98
- }
99
- }
100
-
101
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
102
- if ("suspendedStart" === state) throw state = "completed", context.arg;
103
- context.dispatchException(context.arg);
104
- } else "return" === context.method && context.abrupt("return", context.arg);
105
- state = "executing";
106
- var record = tryCatch(innerFn, self, context);
107
-
108
- if ("normal" === record.type) {
109
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
110
- return {
111
- value: record.arg,
112
- done: context.done
113
- };
114
- }
115
-
116
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
117
- }
118
- };
119
- }(innerFn, self, context), generator;
168
+ function wrap(t, e, r, n) {
169
+ var i = e && e.prototype instanceof Generator ? e : Generator,
170
+ a = Object.create(i.prototype),
171
+ c = new Context(n || []);
172
+ return o(a, "_invoke", {
173
+ value: makeInvokeMethod(t, r, c)
174
+ }), a;
120
175
  }
121
-
122
- function tryCatch(fn, obj, arg) {
176
+ function tryCatch(t, e, r) {
123
177
  try {
124
178
  return {
125
179
  type: "normal",
126
- arg: fn.call(obj, arg)
180
+ arg: t.call(e, r)
127
181
  };
128
- } catch (err) {
182
+ } catch (t) {
129
183
  return {
130
184
  type: "throw",
131
- arg: err
185
+ arg: t
132
186
  };
133
187
  }
134
188
  }
135
-
136
- exports.wrap = wrap;
137
- var ContinueSentinel = {};
138
-
189
+ e.wrap = wrap;
190
+ var h = "suspendedStart",
191
+ l = "suspendedYield",
192
+ f = "executing",
193
+ s = "completed",
194
+ y = {};
139
195
  function Generator() {}
140
-
141
196
  function GeneratorFunction() {}
142
-
143
197
  function GeneratorFunctionPrototype() {}
144
-
145
- var IteratorPrototype = {};
146
- define(IteratorPrototype, iteratorSymbol, function () {
198
+ var p = {};
199
+ define(p, a, function () {
147
200
  return this;
148
201
  });
149
- var getProto = Object.getPrototypeOf,
150
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
151
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
152
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
153
-
154
- function defineIteratorMethods(prototype) {
155
- ["next", "throw", "return"].forEach(function (method) {
156
- define(prototype, method, function (arg) {
157
- return this._invoke(method, arg);
202
+ var d = Object.getPrototypeOf,
203
+ v = d && d(d(values([])));
204
+ v && v !== r && n.call(v, a) && (p = v);
205
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
206
+ function defineIteratorMethods(t) {
207
+ ["next", "throw", "return"].forEach(function (e) {
208
+ define(t, e, function (t) {
209
+ return this._invoke(e, t);
158
210
  });
159
211
  });
160
212
  }
161
-
162
- function AsyncIterator(generator, PromiseImpl) {
163
- function invoke(method, arg, resolve, reject) {
164
- var record = tryCatch(generator[method], generator, arg);
165
-
166
- if ("throw" !== record.type) {
167
- var result = record.arg,
168
- value = result.value;
169
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
170
- invoke("next", value, resolve, reject);
171
- }, function (err) {
172
- invoke("throw", err, resolve, reject);
173
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
174
- result.value = unwrapped, resolve(result);
175
- }, function (error) {
176
- return invoke("throw", error, resolve, reject);
213
+ function AsyncIterator(t, e) {
214
+ function invoke(r, o, i, a) {
215
+ var c = tryCatch(t[r], t, o);
216
+ if ("throw" !== c.type) {
217
+ var u = c.arg,
218
+ h = u.value;
219
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
220
+ invoke("next", t, i, a);
221
+ }, function (t) {
222
+ invoke("throw", t, i, a);
223
+ }) : e.resolve(h).then(function (t) {
224
+ u.value = t, i(u);
225
+ }, function (t) {
226
+ return invoke("throw", t, i, a);
177
227
  });
178
228
  }
179
-
180
- reject(record.arg);
181
- }
182
-
183
- var previousPromise;
184
-
185
- this._invoke = function (method, arg) {
186
- function callInvokeWithMethodAndArg() {
187
- return new PromiseImpl(function (resolve, reject) {
188
- invoke(method, arg, resolve, reject);
189
- });
229
+ a(c.arg);
230
+ }
231
+ var r;
232
+ o(this, "_invoke", {
233
+ value: function (t, n) {
234
+ function callInvokeWithMethodAndArg() {
235
+ return new e(function (e, r) {
236
+ invoke(t, n, e, r);
237
+ });
238
+ }
239
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
190
240
  }
191
-
192
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
193
- };
241
+ });
194
242
  }
195
-
196
- function maybeInvokeDelegate(delegate, context) {
197
- var method = delegate.iterator[context.method];
198
-
199
- if (undefined === method) {
200
- if (context.delegate = null, "throw" === context.method) {
201
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
202
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
243
+ function makeInvokeMethod(e, r, n) {
244
+ var o = h;
245
+ return function (i, a) {
246
+ if (o === f) throw Error("Generator is already running");
247
+ if (o === s) {
248
+ if ("throw" === i) throw a;
249
+ return {
250
+ value: t,
251
+ done: !0
252
+ };
203
253
  }
204
-
205
- return ContinueSentinel;
206
- }
207
-
208
- var record = tryCatch(method, delegate.iterator, context.arg);
209
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
210
- var info = record.arg;
211
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
254
+ for (n.method = i, n.arg = a;;) {
255
+ var c = n.delegate;
256
+ if (c) {
257
+ var u = maybeInvokeDelegate(c, n);
258
+ if (u) {
259
+ if (u === y) continue;
260
+ return u;
261
+ }
262
+ }
263
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
264
+ if (o === h) throw o = s, n.arg;
265
+ n.dispatchException(n.arg);
266
+ } else "return" === n.method && n.abrupt("return", n.arg);
267
+ o = f;
268
+ var p = tryCatch(e, r, n);
269
+ if ("normal" === p.type) {
270
+ if (o = n.done ? s : l, p.arg === y) continue;
271
+ return {
272
+ value: p.arg,
273
+ done: n.done
274
+ };
275
+ }
276
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
277
+ }
278
+ };
212
279
  }
213
-
214
- function pushTryEntry(locs) {
215
- var entry = {
216
- tryLoc: locs[0]
280
+ function maybeInvokeDelegate(e, r) {
281
+ var n = r.method,
282
+ o = e.iterator[n];
283
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
284
+ var i = tryCatch(o, e.iterator, r.arg);
285
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
286
+ var a = i.arg;
287
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
288
+ }
289
+ function pushTryEntry(t) {
290
+ var e = {
291
+ tryLoc: t[0]
217
292
  };
218
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
293
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
219
294
  }
220
-
221
- function resetTryEntry(entry) {
222
- var record = entry.completion || {};
223
- record.type = "normal", delete record.arg, entry.completion = record;
295
+ function resetTryEntry(t) {
296
+ var e = t.completion || {};
297
+ e.type = "normal", delete e.arg, t.completion = e;
224
298
  }
225
-
226
- function Context(tryLocsList) {
299
+ function Context(t) {
227
300
  this.tryEntries = [{
228
301
  tryLoc: "root"
229
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
302
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
230
303
  }
231
-
232
- function values(iterable) {
233
- if (iterable) {
234
- var iteratorMethod = iterable[iteratorSymbol];
235
- if (iteratorMethod) return iteratorMethod.call(iterable);
236
- if ("function" == typeof iterable.next) return iterable;
237
-
238
- if (!isNaN(iterable.length)) {
239
- var i = -1,
240
- next = function next() {
241
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
242
-
243
- return next.value = undefined, next.done = !0, next;
244
- };
245
-
246
- return next.next = next;
304
+ function values(e) {
305
+ if (e || "" === e) {
306
+ var r = e[a];
307
+ if (r) return r.call(e);
308
+ if ("function" == typeof e.next) return e;
309
+ if (!isNaN(e.length)) {
310
+ var o = -1,
311
+ i = function next() {
312
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
313
+ return next.value = t, next.done = !0, next;
314
+ };
315
+ return i.next = i;
247
316
  }
248
317
  }
249
-
250
- return {
251
- next: doneResult
252
- };
253
- }
254
-
255
- function doneResult() {
256
- return {
257
- value: undefined,
258
- done: !0
259
- };
318
+ throw new TypeError(typeof e + " is not iterable");
260
319
  }
261
-
262
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
263
- var ctor = "function" == typeof genFun && genFun.constructor;
264
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
265
- }, exports.mark = function (genFun) {
266
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
267
- }, exports.awrap = function (arg) {
320
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
321
+ value: GeneratorFunctionPrototype,
322
+ configurable: !0
323
+ }), o(GeneratorFunctionPrototype, "constructor", {
324
+ value: GeneratorFunction,
325
+ configurable: !0
326
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
327
+ var e = "function" == typeof t && t.constructor;
328
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
329
+ }, e.mark = function (t) {
330
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
331
+ }, e.awrap = function (t) {
268
332
  return {
269
- __await: arg
333
+ __await: t
270
334
  };
271
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
335
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
272
336
  return this;
273
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
274
- void 0 === PromiseImpl && (PromiseImpl = Promise);
275
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
276
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
277
- return result.done ? result.value : iter.next();
337
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
338
+ void 0 === i && (i = Promise);
339
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
340
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
341
+ return t.done ? t.value : a.next();
278
342
  });
279
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
343
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
280
344
  return this;
281
- }), define(Gp, "toString", function () {
345
+ }), define(g, "toString", function () {
282
346
  return "[object Generator]";
283
- }), exports.keys = function (object) {
284
- var keys = [];
285
-
286
- for (var key in object) keys.push(key);
287
-
288
- return keys.reverse(), function next() {
289
- for (; keys.length;) {
290
- var key = keys.pop();
291
- if (key in object) return next.value = key, next.done = !1, next;
347
+ }), e.keys = function (t) {
348
+ var e = Object(t),
349
+ r = [];
350
+ for (var n in e) r.push(n);
351
+ return r.reverse(), function next() {
352
+ for (; r.length;) {
353
+ var t = r.pop();
354
+ if (t in e) return next.value = t, next.done = !1, next;
292
355
  }
293
-
294
356
  return next.done = !0, next;
295
357
  };
296
- }, exports.values = values, Context.prototype = {
358
+ }, e.values = values, Context.prototype = {
297
359
  constructor: Context,
298
- reset: function (skipTempReset) {
299
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
360
+ reset: function (e) {
361
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
300
362
  },
301
363
  stop: function () {
302
364
  this.done = !0;
303
- var rootRecord = this.tryEntries[0].completion;
304
- if ("throw" === rootRecord.type) throw rootRecord.arg;
365
+ var t = this.tryEntries[0].completion;
366
+ if ("throw" === t.type) throw t.arg;
305
367
  return this.rval;
306
368
  },
307
- dispatchException: function (exception) {
308
- if (this.done) throw exception;
309
- var context = this;
310
-
311
- function handle(loc, caught) {
312
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
369
+ dispatchException: function (e) {
370
+ if (this.done) throw e;
371
+ var r = this;
372
+ function handle(n, o) {
373
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
313
374
  }
314
-
315
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
316
- var entry = this.tryEntries[i],
317
- record = entry.completion;
318
- if ("root" === entry.tryLoc) return handle("end");
319
-
320
- if (entry.tryLoc <= this.prev) {
321
- var hasCatch = hasOwn.call(entry, "catchLoc"),
322
- hasFinally = hasOwn.call(entry, "finallyLoc");
323
-
324
- if (hasCatch && hasFinally) {
325
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
326
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
327
- } else if (hasCatch) {
328
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
375
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
376
+ var i = this.tryEntries[o],
377
+ a = i.completion;
378
+ if ("root" === i.tryLoc) return handle("end");
379
+ if (i.tryLoc <= this.prev) {
380
+ var c = n.call(i, "catchLoc"),
381
+ u = n.call(i, "finallyLoc");
382
+ if (c && u) {
383
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
384
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
385
+ } else if (c) {
386
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
329
387
  } else {
330
- if (!hasFinally) throw new Error("try statement without catch or finally");
331
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
388
+ if (!u) throw Error("try statement without catch or finally");
389
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
332
390
  }
333
391
  }
334
392
  }
335
393
  },
336
- abrupt: function (type, arg) {
337
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
338
- var entry = this.tryEntries[i];
339
-
340
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
341
- var finallyEntry = entry;
394
+ abrupt: function (t, e) {
395
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
396
+ var o = this.tryEntries[r];
397
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
398
+ var i = o;
342
399
  break;
343
400
  }
344
401
  }
345
-
346
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
347
- var record = finallyEntry ? finallyEntry.completion : {};
348
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
402
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
403
+ var a = i ? i.completion : {};
404
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
349
405
  },
350
- complete: function (record, afterLoc) {
351
- if ("throw" === record.type) throw record.arg;
352
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
406
+ complete: function (t, e) {
407
+ if ("throw" === t.type) throw t.arg;
408
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
353
409
  },
354
- finish: function (finallyLoc) {
355
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
356
- var entry = this.tryEntries[i];
357
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
410
+ finish: function (t) {
411
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
412
+ var r = this.tryEntries[e];
413
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
358
414
  }
359
415
  },
360
- catch: function (tryLoc) {
361
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
362
- var entry = this.tryEntries[i];
363
-
364
- if (entry.tryLoc === tryLoc) {
365
- var record = entry.completion;
366
-
367
- if ("throw" === record.type) {
368
- var thrown = record.arg;
369
- resetTryEntry(entry);
416
+ catch: function (t) {
417
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
418
+ var r = this.tryEntries[e];
419
+ if (r.tryLoc === t) {
420
+ var n = r.completion;
421
+ if ("throw" === n.type) {
422
+ var o = n.arg;
423
+ resetTryEntry(r);
370
424
  }
371
-
372
- return thrown;
425
+ return o;
373
426
  }
374
427
  }
375
-
376
- throw new Error("illegal catch attempt");
428
+ throw Error("illegal catch attempt");
377
429
  },
378
- delegateYield: function (iterable, resultName, nextLoc) {
430
+ delegateYield: function (e, r, n) {
379
431
  return this.delegate = {
380
- iterator: values(iterable),
381
- resultName: resultName,
382
- nextLoc: nextLoc
383
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
432
+ iterator: values(e),
433
+ resultName: r,
434
+ nextLoc: n
435
+ }, "next" === this.method && (this.arg = t), y;
384
436
  }
385
- }, exports;
437
+ }, e;
386
438
  }
387
-
388
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
389
- try {
390
- var info = gen[key](arg);
391
- var value = info.value;
392
- } catch (error) {
393
- reject(error);
394
- return;
395
- }
396
-
397
- if (info.done) {
398
- resolve(value);
399
- } else {
400
- Promise.resolve(value).then(_next, _throw);
401
- }
439
+ function _slicedToArray(r, e) {
440
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
402
441
  }
403
-
404
- function _asyncToGenerator(fn) {
405
- return function () {
406
- var self = this,
407
- args = arguments;
408
- return new Promise(function (resolve, reject) {
409
- var gen = fn.apply(self, args);
410
-
411
- function _next(value) {
412
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
413
- }
414
-
415
- function _throw(err) {
416
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
417
- }
418
-
419
- _next(undefined);
420
- });
421
- };
422
- }
423
-
424
- function _defineProperty(obj, key, value) {
425
- if (key in obj) {
426
- Object.defineProperty(obj, key, {
427
- value: value,
428
- enumerable: true,
429
- configurable: true,
430
- writable: true
431
- });
432
- } else {
433
- obj[key] = value;
434
- }
435
-
436
- return obj;
437
- }
438
-
439
- function _extends() {
440
- _extends = Object.assign ? Object.assign.bind() : function (target) {
441
- for (var i = 1; i < arguments.length; i++) {
442
- var source = arguments[i];
443
-
444
- for (var key in source) {
445
- if (Object.prototype.hasOwnProperty.call(source, key)) {
446
- target[key] = source[key];
447
- }
448
- }
449
- }
450
-
451
- return target;
452
- };
453
- return _extends.apply(this, arguments);
454
- }
455
-
456
- function _objectWithoutPropertiesLoose(source, excluded) {
457
- if (source == null) return {};
458
- var target = {};
459
- var sourceKeys = Object.keys(source);
460
- var key, i;
461
-
462
- for (i = 0; i < sourceKeys.length; i++) {
463
- key = sourceKeys[i];
464
- if (excluded.indexOf(key) >= 0) continue;
465
- target[key] = source[key];
466
- }
467
-
468
- return target;
469
- }
470
-
471
- function _objectWithoutProperties(source, excluded) {
472
- if (source == null) return {};
473
-
474
- var target = _objectWithoutPropertiesLoose(source, excluded);
475
-
476
- var key, i;
477
-
478
- if (Object.getOwnPropertySymbols) {
479
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
480
-
481
- for (i = 0; i < sourceSymbolKeys.length; i++) {
482
- key = sourceSymbolKeys[i];
483
- if (excluded.indexOf(key) >= 0) continue;
484
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
485
- target[key] = source[key];
486
- }
487
- }
488
-
489
- return target;
490
- }
491
-
492
- function _taggedTemplateLiteral(strings, raw) {
493
- if (!raw) {
494
- raw = strings.slice(0);
495
- }
496
-
497
- return Object.freeze(Object.defineProperties(strings, {
442
+ function _taggedTemplateLiteral(e, t) {
443
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
498
444
  raw: {
499
- value: Object.freeze(raw)
445
+ value: Object.freeze(t)
500
446
  }
501
447
  }));
502
448
  }
503
-
504
- function _slicedToArray(arr, i) {
505
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
506
- }
507
-
508
- function _arrayWithHoles(arr) {
509
- if (Array.isArray(arr)) return arr;
510
- }
511
-
512
- function _iterableToArrayLimit(arr, i) {
513
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
514
-
515
- if (_i == null) return;
516
- var _arr = [];
517
- var _n = true;
518
- var _d = false;
519
-
520
- var _s, _e;
521
-
522
- try {
523
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
524
- _arr.push(_s.value);
525
-
526
- if (i && _arr.length === i) break;
527
- }
528
- } catch (err) {
529
- _d = true;
530
- _e = err;
531
- } finally {
532
- try {
533
- if (!_n && _i["return"] != null) _i["return"]();
534
- } finally {
535
- if (_d) throw _e;
536
- }
449
+ function _toPrimitive(t, r) {
450
+ if ("object" != typeof t || !t) return t;
451
+ var e = t[Symbol.toPrimitive];
452
+ if (void 0 !== e) {
453
+ var i = e.call(t, r || "default");
454
+ if ("object" != typeof i) return i;
455
+ throw new TypeError("@@toPrimitive must return a primitive value.");
537
456
  }
538
-
539
- return _arr;
457
+ return ("string" === r ? String : Number)(t);
540
458
  }
541
-
542
- function _unsupportedIterableToArray(o, minLen) {
543
- if (!o) return;
544
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
545
- var n = Object.prototype.toString.call(o).slice(8, -1);
546
- if (n === "Object" && o.constructor) n = o.constructor.name;
547
- if (n === "Map" || n === "Set") return Array.from(o);
548
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
459
+ function _toPropertyKey(t) {
460
+ var i = _toPrimitive(t, "string");
461
+ return "symbol" == typeof i ? i : i + "";
549
462
  }
550
-
551
- function _arrayLikeToArray(arr, len) {
552
- if (len == null || len > arr.length) len = arr.length;
553
-
554
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
555
-
556
- return arr2;
557
- }
558
-
559
- function _nonIterableRest() {
560
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
463
+ function _unsupportedIterableToArray(r, a) {
464
+ if (r) {
465
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
466
+ var t = {}.toString.call(r).slice(8, -1);
467
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
468
+ }
561
469
  }
562
470
 
563
471
  function getToken() {
564
472
  var _Cookies$get;
565
-
566
473
  return (_Cookies$get = Cookies.get('_tk')) === null || _Cookies$get === void 0 ? void 0 : _Cookies$get.replace('*', 'Bearer ');
567
474
  }
568
475
  function setToken(value) {
@@ -570,35 +477,29 @@
570
477
  }
571
478
 
572
479
  /** @format */
573
-
574
480
  function getEncodedSearch(currentUrl) {
575
481
  var splitUrl = currentUrl.split('?');
576
482
  var baseUrl = splitUrl[0];
577
483
  var nextUrlSegments = splitUrl[1].split('&');
578
484
  var nextQueryString = splitUrl[1];
579
-
580
485
  if (nextUrlSegments.length > 0) {
581
486
  nextQueryString = nextUrlSegments.map(function (v) {
582
487
  var nextValue = v;
583
-
584
488
  if (v.includes('search=')) {
585
489
  var temp = v.split('=');
586
490
  nextValue = "".concat(temp[0], "=").concat(encodeURIComponent(temp[1]));
587
491
  }
588
-
589
492
  return nextValue;
590
493
  }).join('&');
591
494
  }
592
-
593
495
  return "".concat(baseUrl, "?").concat(nextQueryString);
594
496
  }
497
+
595
498
  /**
596
499
  * Gets an instance of Axios that is configured with the custom failure handlers
597
500
  * @param {Function} onAuthFailed - callback triggers when auth fails - ie, server error is one of ['token_invalid', 'token_not_provided', 'user_not_found', 'token_expired'] or http status is one of [401, 503, 400]
598
501
  * @param {Function} onForbidden - callback triggers when http status = 403
599
502
  */
600
-
601
-
602
503
  var axiosInstance = function axiosInstance(onAuthFailed, onForbidden) {
603
504
  var instance = axios.create({
604
505
  validateStatus: function validateStatus(status) {
@@ -606,60 +507,56 @@
606
507
  }
607
508
  });
608
509
  var token = getToken();
609
-
610
510
  if (token !== '') {
611
511
  instance.defaults.headers.common.Authorization = token;
612
512
  }
513
+ instance.defaults.headers.common['Content-Type'] = 'application/json;charset=UTF-8';
613
514
 
614
- instance.defaults.headers.common['Content-Type'] = 'application/json;charset=UTF-8'; // Add a request interceptor
615
-
515
+ // Add a request interceptor
616
516
  instance.interceptors.request.use(function (request, error) {
617
517
  if (error) {
618
518
  return Promise.reject(error.response);
619
519
  }
620
-
621
520
  if (request.url.includes('search') && request.url.includes('?')) {
622
521
  // do some uri manipulation for ie
623
522
  // https://stackoverflow.com/questions/18220057
523
+
624
524
  // eslint-disable-next-line no-param-reassign
625
525
  request.url = getEncodedSearch(request.url);
626
- } // eslint-disable-next-line no-param-reassign
627
-
526
+ }
628
527
 
528
+ // eslint-disable-next-line no-param-reassign
629
529
  request.headers.common['Content-Type'] = 'application/json; charset=utf-8';
630
-
631
530
  if (typeof request.body === 'undefined') {
632
531
  request.body = {};
633
532
  }
634
-
635
533
  token = getToken();
636
-
637
534
  if (token !== '') {
638
535
  // eslint-disable-next-line no-param-reassign
639
536
  request.headers.common.Authorization = token;
640
537
  }
641
-
642
538
  return request;
643
539
  }, function (error) {
644
540
  return Promise.reject(error.message);
645
- }); // Add a response interceptor
541
+ });
646
542
 
543
+ // Add a response interceptor
647
544
  instance.interceptors.response.use(function (response, error) {
648
545
  if (error) {
649
546
  return Promise.reject(error.response);
650
547
  }
651
-
652
548
  if (response.headers.authorization) {
653
549
  setToken(response.headers.authorization);
654
550
  }
655
-
656
551
  return response;
657
552
  }, function (error) {
658
553
  if (error.response) {
659
554
  // network error
660
555
  if (error.response.data && error.response.data.error && (error.response.data.error === 'token_invalid' || error.response.data.error === 'token_not_provided' || error.response.data.error === 'user_not_found' || error.response.data.error === 'token_expired') || error.response.status === 401 || error.response.status === 503 || error.response.status === 400) {
661
556
  onAuthFailed();
662
- } // if (error.response.status === 500) {
557
+ }
558
+
559
+ // if (error.response.status === 500) {
663
560
  // // INTERNAL SERVER ERROR
664
561
  // store.dispatch({
665
562
  // type: AppConstants.OVERLAY.SERVER_ERROR,
@@ -667,19 +564,16 @@
667
564
  // return Promise.reject(error.response);
668
565
  // }
669
566
 
670
-
671
567
  if (error.response.status === 403) {
672
568
  // FORBIDDEN
673
569
  onForbidden();
674
570
  }
675
-
676
571
  return Promise.reject(error.response);
677
572
  }
678
-
679
573
  return Promise.reject(error);
680
574
  });
681
575
  return instance;
682
- }; // NOTE: this to be instanciated with params: onAuthFailed, onForbidden
576
+ };
683
577
 
684
578
  var defaultNotifyTime = 5000;
685
579
  var error = function error(message) {
@@ -7287,24 +7181,22 @@
7287
7181
  });
7288
7182
 
7289
7183
  var _excluded = ["children"];
7290
-
7291
7184
  var DropdownSelector = function DropdownSelector(_ref) {
7292
7185
  var selectedOption = _ref.selectedOption,
7293
- onOptionChange = _ref.onOptionChange,
7294
- options = _ref.options,
7295
- isSearchable = _ref.isSearchable,
7296
- placeholder = _ref.placeholder,
7297
- name = _ref.name,
7298
- showSearchIcon = _ref.showSearchIcon,
7299
- isDisabled = _ref.isDisabled;
7186
+ onOptionChange = _ref.onOptionChange,
7187
+ options = _ref.options,
7188
+ isSearchable = _ref.isSearchable,
7189
+ placeholder = _ref.placeholder,
7190
+ name = _ref.name,
7191
+ showSearchIcon = _ref.showSearchIcon,
7192
+ isDisabled = _ref.isDisabled;
7300
7193
  var customComponents = {
7301
7194
  DropdownIndicator: function DropdownIndicator() {
7302
7195
  return null;
7303
7196
  },
7304
7197
  ValueContainer: function ValueContainer(_ref2) {
7305
7198
  var children = _ref2.children,
7306
- props = _objectWithoutProperties(_ref2, _excluded);
7307
-
7199
+ props = _objectWithoutProperties(_ref2, _excluded);
7308
7200
  return /*#__PURE__*/React__default.createElement("div", _extends({
7309
7201
  style: {
7310
7202
  position: 'relative'
@@ -7432,7 +7324,6 @@
7432
7324
  isDisabled: isDisabled
7433
7325
  }));
7434
7326
  };
7435
-
7436
7327
  DropdownSelector.defaultProps = {
7437
7328
  isSearchable: false,
7438
7329
  selectedOption: null,
@@ -7511,25 +7402,20 @@
7511
7402
  var baseButtonStyle = styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 1rem 2rem;\n cursor: pointer;\n letter-spacing: 1.3px;\n border-style: none;\n text-transform: uppercase;\n font-size: 12px;\n color: #fff;\n transition: 0.2s ease-in-out;\n outline: none;\n"])));
7512
7403
 
7513
7404
  var _excluded$1 = ["children"];
7514
-
7515
7405
  var _templateObject$1;
7516
7406
  var Button = styled__default.button(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n background-color: #fff;\n color: ", ";\n border: 1px solid ", ";\n\n &:disabled {\n ", "\n }\n"])), baseButtonStyle, function (props) {
7517
7407
  return props.theme.colors.primary;
7518
7408
  }, function (props) {
7519
7409
  return props.theme.colors.primary;
7520
7410
  }, disabledButtonStyle);
7521
-
7522
7411
  var PrimaryButton = function PrimaryButton(_ref) {
7523
7412
  var children = _ref.children,
7524
- restProps = _objectWithoutProperties(_ref, _excluded$1);
7525
-
7413
+ restProps = _objectWithoutProperties(_ref, _excluded$1);
7526
7414
  return /*#__PURE__*/React__default.createElement(Button, restProps, children);
7527
7415
  };
7528
-
7529
7416
  var PrimaryButton$1 = themed(PrimaryButton);
7530
7417
 
7531
7418
  var _excluded$2 = ["children"];
7532
-
7533
7419
  var _templateObject$2;
7534
7420
  var Button$1 = styled__default.button(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:disabled {\n ", "\n &:hover {\n background-color: ", ";\n }\n }\n"])), baseButtonStyle, function (props) {
7535
7421
  return props.theme.colors.ntrlMin;
@@ -7544,14 +7430,11 @@
7544
7430
  }, disabledButtonStyle, function (props) {
7545
7431
  return props.theme.colors.base;
7546
7432
  });
7547
-
7548
7433
  var SecondaryButton = function SecondaryButton(_ref) {
7549
7434
  var children = _ref.children,
7550
- restProps = _objectWithoutProperties(_ref, _excluded$2);
7551
-
7435
+ restProps = _objectWithoutProperties(_ref, _excluded$2);
7552
7436
  return /*#__PURE__*/React__default.createElement(Button$1, restProps, children);
7553
7437
  };
7554
-
7555
7438
  var SecondaryButton$1 = themed(SecondaryButton);
7556
7439
 
7557
7440
  var media = {
@@ -7576,178 +7459,144 @@
7576
7459
  }, function (props) {
7577
7460
  return props.theme.marginPaddings[1];
7578
7461
  });
7579
-
7580
7462
  var AddProductInterest = function AddProductInterest(_ref) {
7581
7463
  var baseGraphApi = _ref.baseGraphApi,
7582
- getBrandsGraphQuery = _ref.getBrandsGraphQuery,
7583
- getModelsGraphQuery = _ref.getModelsGraphQuery,
7584
- getMaterialsGraphQuery = _ref.getMaterialsGraphQuery,
7585
- onCancel = _ref.onCancel,
7586
- requestInstance = _ref.requestInstance,
7587
- addLuxityProductInterestApi = _ref.addLuxityProductInterestApi,
7588
- onSubmitSuccess = _ref.onSubmitSuccess;
7589
-
7464
+ getBrandsGraphQuery = _ref.getBrandsGraphQuery,
7465
+ getModelsGraphQuery = _ref.getModelsGraphQuery,
7466
+ getMaterialsGraphQuery = _ref.getMaterialsGraphQuery,
7467
+ onCancel = _ref.onCancel,
7468
+ requestInstance = _ref.requestInstance,
7469
+ addLuxityProductInterestApi = _ref.addLuxityProductInterestApi,
7470
+ onSubmitSuccess = _ref.onSubmitSuccess;
7590
7471
  var _useState = React.useState([]),
7591
- _useState2 = _slicedToArray(_useState, 2),
7592
- brands = _useState2[0],
7593
- setBrands = _useState2[1];
7594
-
7472
+ _useState2 = _slicedToArray(_useState, 2),
7473
+ brands = _useState2[0],
7474
+ setBrands = _useState2[1];
7595
7475
  var _useState3 = React.useState([]),
7596
- _useState4 = _slicedToArray(_useState3, 2),
7597
- models = _useState4[0],
7598
- setModels = _useState4[1];
7599
-
7476
+ _useState4 = _slicedToArray(_useState3, 2),
7477
+ models = _useState4[0],
7478
+ setModels = _useState4[1];
7600
7479
  var _useState5 = React.useState([]),
7601
- _useState6 = _slicedToArray(_useState5, 2),
7602
- materials = _useState6[0],
7603
- setMaterials = _useState6[1];
7604
-
7480
+ _useState6 = _slicedToArray(_useState5, 2),
7481
+ materials = _useState6[0],
7482
+ setMaterials = _useState6[1];
7605
7483
  var _useState7 = React.useState(null),
7606
- _useState8 = _slicedToArray(_useState7, 2),
7607
- selectedBrand = _useState8[0],
7608
- setSelectedBrand = _useState8[1];
7609
-
7484
+ _useState8 = _slicedToArray(_useState7, 2),
7485
+ selectedBrand = _useState8[0],
7486
+ setSelectedBrand = _useState8[1];
7610
7487
  var _useState9 = React.useState(null),
7611
- _useState10 = _slicedToArray(_useState9, 2),
7612
- selectedModel = _useState10[0],
7613
- setSelectedModel = _useState10[1];
7614
-
7488
+ _useState10 = _slicedToArray(_useState9, 2),
7489
+ selectedModel = _useState10[0],
7490
+ setSelectedModel = _useState10[1];
7615
7491
  var _useState11 = React.useState(null),
7616
- _useState12 = _slicedToArray(_useState11, 2),
7617
- selectedMaterial = _useState12[0],
7618
- setSelectedMaterial = _useState12[1];
7619
-
7620
- var fetchBrands = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7492
+ _useState12 = _slicedToArray(_useState11, 2),
7493
+ selectedMaterial = _useState12[0],
7494
+ setSelectedMaterial = _useState12[1];
7495
+ var fetchBrands = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7621
7496
  var _response$data, _response$data$data, _response$data$data$l, response, formattedBrands;
7622
-
7623
7497
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7624
- while (1) {
7625
- switch (_context.prev = _context.next) {
7498
+ while (1) switch (_context.prev = _context.next) {
7499
+ case 0:
7500
+ _context.prev = 0;
7501
+ _context.next = 3;
7502
+ return axiosInstance.post("".concat(baseGraphApi, "?id=getBrands"), {
7503
+ query: getBrandsGraphQuery(1000, 1, 'id|desc')
7504
+ });
7505
+ case 3:
7506
+ response = _context.sent;
7507
+ if (response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$data = _response$data.data) !== null && _response$data$data !== void 0 && (_response$data$data$l = _response$data$data.luxity_brands) !== null && _response$data$data$l !== void 0 && _response$data$data$l.data) {
7508
+ formattedBrands = response.data.data.luxity_brands.data.map(function (brand) {
7509
+ return {
7510
+ value: brand.id,
7511
+ label: brand.name
7512
+ };
7513
+ });
7514
+ setBrands(formattedBrands);
7515
+ }
7516
+ _context.next = 10;
7517
+ break;
7518
+ case 7:
7519
+ _context.prev = 7;
7520
+ _context.t0 = _context["catch"](0);
7521
+ error(_context.t0.message);
7522
+ case 10:
7523
+ case "end":
7524
+ return _context.stop();
7525
+ }
7526
+ }, _callee, null, [[0, 7]]);
7527
+ })), [baseGraphApi, getBrandsGraphQuery]);
7528
+ var fetchModels = React.useCallback(/*#__PURE__*/function () {
7529
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(brandId) {
7530
+ var _response$data2, _response$data2$data, _response$data2$data$, response, formattedModels;
7531
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7532
+ while (1) switch (_context2.prev = _context2.next) {
7626
7533
  case 0:
7627
- _context.prev = 0;
7628
- _context.next = 3;
7629
- return axiosInstance.post("".concat(baseGraphApi, "?id=getBrands"), {
7630
- query: getBrandsGraphQuery(1000, 1, 'id|desc')
7534
+ _context2.prev = 0;
7535
+ _context2.next = 3;
7536
+ return axiosInstance.post("".concat(baseGraphApi, "?id=getModels"), {
7537
+ query: getModelsGraphQuery(brandId)
7631
7538
  });
7632
-
7633
7539
  case 3:
7634
- response = _context.sent;
7635
-
7636
- if (response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$data = _response$data.data) !== null && _response$data$data !== void 0 && (_response$data$data$l = _response$data$data.luxity_brands) !== null && _response$data$data$l !== void 0 && _response$data$data$l.data) {
7637
- formattedBrands = response.data.data.luxity_brands.data.map(function (brand) {
7540
+ response = _context2.sent;
7541
+ if (response !== null && response !== void 0 && (_response$data2 = response.data) !== null && _response$data2 !== void 0 && (_response$data2$data = _response$data2.data) !== null && _response$data2$data !== void 0 && (_response$data2$data$ = _response$data2$data.luxity_models) !== null && _response$data2$data$ !== void 0 && _response$data2$data$.data) {
7542
+ formattedModels = response.data.data.luxity_models.data.map(function (model) {
7638
7543
  return {
7639
- value: brand.id,
7640
- label: brand.name
7544
+ value: model.id,
7545
+ label: model.name
7641
7546
  };
7642
7547
  });
7643
- setBrands(formattedBrands);
7548
+ setModels(formattedModels);
7644
7549
  }
7645
-
7646
- _context.next = 10;
7550
+ _context2.next = 10;
7647
7551
  break;
7648
-
7649
7552
  case 7:
7650
- _context.prev = 7;
7651
- _context.t0 = _context["catch"](0);
7652
- error(_context.t0.message);
7653
-
7553
+ _context2.prev = 7;
7554
+ _context2.t0 = _context2["catch"](0);
7555
+ error(_context2.t0.message);
7654
7556
  case 10:
7655
7557
  case "end":
7656
- return _context.stop();
7657
- }
7658
- }
7659
- }, _callee, null, [[0, 7]]);
7660
- })), [baseGraphApi, getBrandsGraphQuery]);
7661
- var fetchModels = React.useCallback( /*#__PURE__*/function () {
7662
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(brandId) {
7663
- var _response$data2, _response$data2$data, _response$data2$data$, response, formattedModels;
7664
-
7665
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7666
- while (1) {
7667
- switch (_context2.prev = _context2.next) {
7668
- case 0:
7669
- _context2.prev = 0;
7670
- _context2.next = 3;
7671
- return axiosInstance.post("".concat(baseGraphApi, "?id=getModels"), {
7672
- query: getModelsGraphQuery(brandId)
7673
- });
7674
-
7675
- case 3:
7676
- response = _context2.sent;
7677
-
7678
- if (response !== null && response !== void 0 && (_response$data2 = response.data) !== null && _response$data2 !== void 0 && (_response$data2$data = _response$data2.data) !== null && _response$data2$data !== void 0 && (_response$data2$data$ = _response$data2$data.luxity_models) !== null && _response$data2$data$ !== void 0 && _response$data2$data$.data) {
7679
- formattedModels = response.data.data.luxity_models.data.map(function (model) {
7680
- return {
7681
- value: model.id,
7682
- label: model.name
7683
- };
7684
- });
7685
- setModels(formattedModels);
7686
- }
7687
-
7688
- _context2.next = 10;
7689
- break;
7690
-
7691
- case 7:
7692
- _context2.prev = 7;
7693
- _context2.t0 = _context2["catch"](0);
7694
- error(_context2.t0.message);
7695
-
7696
- case 10:
7697
- case "end":
7698
- return _context2.stop();
7699
- }
7558
+ return _context2.stop();
7700
7559
  }
7701
7560
  }, _callee2, null, [[0, 7]]);
7702
7561
  }));
7703
-
7704
7562
  return function (_x) {
7705
7563
  return _ref3.apply(this, arguments);
7706
7564
  };
7707
7565
  }(), [baseGraphApi, getModelsGraphQuery]);
7708
- var fetchMaterials = React.useCallback( /*#__PURE__*/function () {
7709
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(brandId) {
7566
+ var fetchMaterials = React.useCallback(/*#__PURE__*/function () {
7567
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(brandId) {
7710
7568
  var _response$data3, _response$data3$data, _response$data3$data$, response, formattedMaterials;
7711
-
7712
7569
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7713
- while (1) {
7714
- switch (_context3.prev = _context3.next) {
7715
- case 0:
7716
- _context3.prev = 0;
7717
- _context3.next = 3;
7718
- return axiosInstance.post("".concat(baseGraphApi, "?id=getMaterials"), {
7719
- query: getMaterialsGraphQuery(brandId)
7570
+ while (1) switch (_context3.prev = _context3.next) {
7571
+ case 0:
7572
+ _context3.prev = 0;
7573
+ _context3.next = 3;
7574
+ return axiosInstance.post("".concat(baseGraphApi, "?id=getMaterials"), {
7575
+ query: getMaterialsGraphQuery(brandId)
7576
+ });
7577
+ case 3:
7578
+ response = _context3.sent;
7579
+ if (response !== null && response !== void 0 && (_response$data3 = response.data) !== null && _response$data3 !== void 0 && (_response$data3$data = _response$data3.data) !== null && _response$data3$data !== void 0 && (_response$data3$data$ = _response$data3$data.luxity_materials) !== null && _response$data3$data$ !== void 0 && _response$data3$data$.data) {
7580
+ formattedMaterials = response.data.data.luxity_materials.data.map(function (material) {
7581
+ return {
7582
+ value: material.id,
7583
+ label: material.name
7584
+ };
7720
7585
  });
7721
-
7722
- case 3:
7723
- response = _context3.sent;
7724
-
7725
- if (response !== null && response !== void 0 && (_response$data3 = response.data) !== null && _response$data3 !== void 0 && (_response$data3$data = _response$data3.data) !== null && _response$data3$data !== void 0 && (_response$data3$data$ = _response$data3$data.luxity_materials) !== null && _response$data3$data$ !== void 0 && _response$data3$data$.data) {
7726
- formattedMaterials = response.data.data.luxity_materials.data.map(function (material) {
7727
- return {
7728
- value: material.id,
7729
- label: material.name
7730
- };
7731
- });
7732
- setMaterials(formattedMaterials);
7733
- }
7734
-
7735
- _context3.next = 10;
7736
- break;
7737
-
7738
- case 7:
7739
- _context3.prev = 7;
7740
- _context3.t0 = _context3["catch"](0);
7741
- error(_context3.t0.message);
7742
-
7743
- case 10:
7744
- case "end":
7745
- return _context3.stop();
7746
- }
7586
+ setMaterials(formattedMaterials);
7587
+ }
7588
+ _context3.next = 10;
7589
+ break;
7590
+ case 7:
7591
+ _context3.prev = 7;
7592
+ _context3.t0 = _context3["catch"](0);
7593
+ error(_context3.t0.message);
7594
+ case 10:
7595
+ case "end":
7596
+ return _context3.stop();
7747
7597
  }
7748
7598
  }, _callee3, null, [[0, 7]]);
7749
7599
  }));
7750
-
7751
7600
  return function (_x2) {
7752
7601
  return _ref4.apply(this, arguments);
7753
7602
  };
@@ -7768,19 +7617,15 @@
7768
7617
  setSelectedMaterial(null);
7769
7618
  }
7770
7619
  }, [selectedBrand, fetchModels, fetchMaterials]);
7771
-
7772
7620
  var onBrandChange = function onBrandChange(selectedOption) {
7773
7621
  setSelectedBrand(selectedOption);
7774
7622
  };
7775
-
7776
7623
  var onModelChange = function onModelChange(selectedOption) {
7777
7624
  setSelectedModel(selectedOption);
7778
7625
  };
7779
-
7780
7626
  var onMaterialChange = function onMaterialChange(selectedOption) {
7781
7627
  setSelectedMaterial(selectedOption);
7782
7628
  };
7783
-
7784
7629
  var submitInterest = function submitInterest() {
7785
7630
  var payload = {
7786
7631
  luxity_brand_id: selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.value,
@@ -7792,7 +7637,6 @@
7792
7637
  onCancel();
7793
7638
  }, handleRequestError);
7794
7639
  };
7795
-
7796
7640
  var handleRequestError = function handleRequestError(_ref5) {
7797
7641
  var data = _ref5.data;
7798
7642
  var errorMessages = Object.keys(data).map(function (key) {
@@ -7804,7 +7648,6 @@
7804
7648
  }, message);
7805
7649
  }));
7806
7650
  };
7807
-
7808
7651
  var onReset = function onReset() {
7809
7652
  onCancel();
7810
7653
  setSelectedModel(null);
@@ -7814,7 +7657,6 @@
7814
7657
  setMaterials([]);
7815
7658
  setModels([]);
7816
7659
  };
7817
-
7818
7660
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7819
7661
  className: "interests__section-wrapper"
7820
7662
  }, /*#__PURE__*/React__default.createElement(AddInterestContainer, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
@@ -7862,7 +7704,6 @@
7862
7704
  onClick: submitInterest
7863
7705
  }, "SAVE"))))))));
7864
7706
  };
7865
-
7866
7707
  var index$2 = themed(AddProductInterest);
7867
7708
 
7868
7709
  return index$2;