@devtron-labs/devtron-fe-common-lib 0.0.55-beta-1 → 0.0.55-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 (113) hide show
  1. package/dist/{CodeEditor-0a5bfd53.js → CodeEditor-3c2aaef5.js} +11082 -11082
  2. package/dist/Common/AddCDButton/AddCDButton.js +24 -24
  3. package/dist/Common/AppStatus/AppStatus.js +16 -16
  4. package/dist/Common/BreadCrumb/BreadCrumb.js +43 -43
  5. package/dist/Common/BreadCrumb/BreadcrumbStore.js +9 -9
  6. package/dist/Common/ChartVersionAndTypeSelector.js +42 -42
  7. package/dist/Common/Checkbox.js +8 -8
  8. package/dist/Common/ClipboardButton/ClipboardButton.js +17 -17
  9. package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.js +10 -10
  10. package/dist/Common/CodeEditor/CodeEditor.js +4 -4
  11. package/dist/Common/Common.service.js +1 -1
  12. package/dist/Common/CustomInput/CustomInput.js +56 -56
  13. package/dist/Common/CustomTagSelector/PropagateTagInfo.js +22 -22
  14. package/dist/Common/CustomTagSelector/ResizableTagTextArea.js +22 -22
  15. package/dist/Common/CustomTagSelector/TagDetails.js +33 -33
  16. package/dist/Common/CustomTagSelector/TagLabelSelect.js +33 -33
  17. package/dist/Common/CustomTagSelector/TagLabelValueSelector.js +83 -83
  18. package/dist/Common/DebouncedSearch/DebouncedSearch.js +24 -24
  19. package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.js +16 -16
  20. package/dist/Common/DeleteComponentModal/DeleteComponent.js +49 -49
  21. package/dist/Common/DevtronProgressing/DevtronProgressing.js +2 -2
  22. package/dist/Common/Dialogs/ConfirmationDialog.js +14 -14
  23. package/dist/Common/Dialogs/DeleteDialog.js +24 -24
  24. package/dist/Common/Dialogs/DialogForm.js +21 -21
  25. package/dist/Common/Dialogs/ForceDeleteDialog.js +12 -12
  26. package/dist/Common/DraggableWrapper/DraggableButton.js +6 -6
  27. package/dist/Common/DraggableWrapper/DraggableWrapper.js +42 -1468
  28. package/dist/Common/Drawer/Drawer.js +6 -6
  29. package/dist/Common/EmptyState/EmptyState.js +19 -19
  30. package/dist/Common/EmptyState/GenericEmptyState.js +25 -25
  31. package/dist/Common/Error.js +6 -6
  32. package/dist/Common/ErrorScreenNotFound.js +3 -3
  33. package/dist/Common/Grid/Grid.js +11 -11
  34. package/dist/Common/Helper.js +3 -3
  35. package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.js +1 -1
  36. package/dist/Common/ImageTags.js +224 -221
  37. package/dist/Common/InfoColorBar/InfoColourbar.js +37 -37
  38. package/dist/Common/Modals/Modal.js +8 -8
  39. package/dist/Common/Modals/OpaqueModal.js +13 -13
  40. package/dist/Common/Modals/VisibleModal.js +3 -3
  41. package/dist/Common/Modals/VisibleModal2.js +8 -8
  42. package/dist/Common/MultiSelectCustomization.js +45 -45
  43. package/dist/Common/Pagination/PageSizeSelector.js +37 -34
  44. package/dist/Common/Pagination/Pagination.js +60 -57
  45. package/dist/Common/PopupMenu.js +32 -32
  46. package/dist/Common/Progressing.js +20 -20
  47. package/dist/Common/RJSF/Form.js +14 -9877
  48. package/dist/Common/RJSF/common/FieldRow.js +16 -16
  49. package/dist/Common/RJSF/config.js +3 -3
  50. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.js +13 -13
  51. package/dist/Common/RJSF/templates/ArrayFieldTemplate.js +37 -40
  52. package/dist/Common/RJSF/templates/BaseInput.js +14 -6
  53. package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.js +6 -6
  54. package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.js +3 -3
  55. package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.js +6 -8
  56. package/dist/Common/RJSF/templates/Description.js +6 -6
  57. package/dist/Common/RJSF/templates/Field.js +12 -15
  58. package/dist/Common/RJSF/templates/FieldErrorTemplate.js +8 -10
  59. package/dist/Common/RJSF/templates/ObjectFieldTemplate.js +35 -40
  60. package/dist/Common/RJSF/templates/TitleField.js +5 -5
  61. package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.js +23 -24
  62. package/dist/Common/RJSF/templates/index.js +3 -3
  63. package/dist/Common/RJSF/utils.js +9 -12
  64. package/dist/Common/RJSF/widgets/Checkbox.js +20 -20
  65. package/dist/Common/RJSF/widgets/Select.js +609 -40
  66. package/dist/Common/RadioGroup/RadioGroup.js +32 -32
  67. package/dist/Common/RadioGroup.js +17 -17
  68. package/dist/Common/Reload.js +10 -10
  69. package/dist/Common/ResizableTextarea.js +11 -11
  70. package/dist/Common/SearchBar/SearchBar.component.js +26 -26
  71. package/dist/Common/Security/ScanVulnerabilitiesTable.js +20 -20
  72. package/dist/Common/Select/Select.js +93 -93
  73. package/dist/Common/TippyCustomized.js +4 -4
  74. package/dist/Common/ToastBody.js +22 -22
  75. package/dist/Common/Toggle/Toggle.js +15 -15
  76. package/dist/Common/index.js +3 -3
  77. package/dist/{Helper-e1262739.js → Helper-a0caa238.js} +916 -916
  78. package/dist/TippyCustomized-7b9b46b9.js +124 -0
  79. package/dist/{_commonjsHelpers-c5d32002.js → _commonjsHelpers-aeeeeb92.js} +2 -2
  80. package/dist/{cssMode-c259da7f.js → cssMode-c5cae484.js} +1 -1
  81. package/dist/{freemarker2-d852fa33.js → freemarker2-b9a8615c.js} +1 -1
  82. package/dist/{handlebars-7e868cd0.js → handlebars-3803af36.js} +1 -1
  83. package/dist/{html-1faea799.js → html-498f0150.js} +1 -1
  84. package/dist/{htmlMode-175871d9.js → htmlMode-a8ae8cc5.js} +1 -1
  85. package/dist/index.js +3 -3
  86. package/dist/{javascript-46245cbe.js → javascript-4363ced3.js} +1 -1
  87. package/dist/{jsonMode-bbe5176f.js → jsonMode-80290b9e.js} +1 -1
  88. package/dist/jsx-runtime-0dcb030c.js +667 -0
  89. package/dist/{liquid-e6b820e1.js → liquid-1398df0a.js} +1 -1
  90. package/dist/{python-7d292338.js → python-dd2d43e8.js} +1 -1
  91. package/dist/{razor-c6ab49dd.js → razor-20a66096.js} +1 -1
  92. package/dist/{react-select.esm-27b8d563.js → react-select.esm-97f26847.js} +1280 -1112
  93. package/dist/{react-toastify.esm-e28f7200.js → react-toastify.esm-1042de65.js} +149 -155
  94. package/dist/{react.esm-5465a283.js → react.esm-2c92920f.js} +4929 -4393
  95. package/dist/{tippy-react.esm-d5c56a0a.js → tippy-react.esm-8dc66a75.js} +89 -89
  96. package/dist/{tsMode-4d1329d1.js → tsMode-3fa4eb6a.js} +1 -1
  97. package/dist/{typescript-402306e6.js → typescript-1bbaf605.js} +1 -1
  98. package/dist/{xml-8975e1f9.js → xml-a2693dbd.js} +1 -1
  99. package/dist/{yaml-680c02bf.js → yaml-01ce4fdd.js} +1 -1
  100. package/package.json +3 -12
  101. package/dist/BaseInput-8101e714.js +0 -1686
  102. package/dist/Common/UseWindowSize.d.ts +0 -4
  103. package/dist/Common/UseWindowSize.js +0 -20
  104. package/dist/TippyCustomized-c58fd46a.js +0 -124
  105. package/dist/canExpand-ab1f6741.js +0 -10
  106. package/dist/englishStringTranslator-2c9a30fc.js +0 -17
  107. package/dist/enums-d0bd3f97.js +0 -6618
  108. package/dist/getSubmitButtonOptions-a1be9bb0.js +0 -20
  109. package/dist/getTemplate-91d3260d.js +0 -11
  110. package/dist/getUiOptions-844b45a7.js +0 -10
  111. package/dist/idGenerators-0b33693c.js +0 -35
  112. package/dist/index-5a231705.js +0 -17417
  113. package/dist/index-c855d89c.js +0 -173
@@ -1,5 +1,5 @@
1
- import ge, { createElement as p, useRef as F, useLayoutEffect as _e, useEffect as U, useReducer as xe, useState as ie, isValidElement as G, cloneElement as ue } from "react";
2
- import { r as De } from "./index-5a231705.js";
1
+ import ge, { createElement as p, useRef as F, useLayoutEffect as xe, useEffect as U, useReducer as Be, useState as ie, isValidElement as G, cloneElement as ue } from "react";
2
+ import { render as De } from "react-dom";
3
3
  function he(e) {
4
4
  var t, n, a = "";
5
5
  if (typeof e == "string" || typeof e == "number")
@@ -13,16 +13,11 @@ function he(e) {
13
13
  e[t] && (a && (a += " "), a += t);
14
14
  return a;
15
15
  }
16
- function M() {
16
+ function k() {
17
17
  for (var e, t, n = 0, a = ""; n < arguments.length; )
18
18
  (e = arguments[n++]) && (t = he(e)) && (a && (a += " "), a += t);
19
19
  return a;
20
20
  }
21
- const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
- __proto__: null,
23
- clsx: M,
24
- default: M
25
- }, Symbol.toStringTag, { value: "Module" }));
26
21
  function D() {
27
22
  return D = Object.assign || function(e) {
28
23
  for (var t = 1; t < arguments.length; t++) {
@@ -59,28 +54,28 @@ function J(e) {
59
54
  function re(e) {
60
55
  return e === 0 || e;
61
56
  }
62
- function Be(e, t) {
57
+ function _e(e, t) {
63
58
  return e === !1 || Z(e) && e > 0 ? e : t;
64
59
  }
65
- var be = !!(typeof window < "u" && window.document && window.document.createElement);
60
+ var Ce = !!(typeof window < "u" && window.document && window.document.createElement);
66
61
  function se(e) {
67
62
  return G(e) || Q(e) || R(e) || Z(e);
68
63
  }
69
- var Ce = {
64
+ var be = {
70
65
  TOP_LEFT: "top-left",
71
66
  TOP_RIGHT: "top-right",
72
67
  TOP_CENTER: "top-center",
73
68
  BOTTOM_LEFT: "bottom-left",
74
69
  BOTTOM_RIGHT: "bottom-right",
75
70
  BOTTOM_CENTER: "bottom-center"
76
- }, k = {
71
+ }, M = {
77
72
  INFO: "info",
78
73
  SUCCESS: "success",
79
74
  WARNING: "warning",
80
75
  ERROR: "error",
81
76
  DEFAULT: "default"
82
77
  };
83
- function Se(e, t, n) {
78
+ function we(e, t, n) {
84
79
  n === void 0 && (n = 300);
85
80
  var a = e.scrollHeight, i = e.style;
86
81
  requestAnimationFrame(function() {
@@ -89,21 +84,21 @@ function Se(e, t, n) {
89
84
  });
90
85
  });
91
86
  }
92
- function we(e) {
87
+ function Se(e) {
93
88
  var t = e.enter, n = e.exit, a = e.appendPosition, i = a === void 0 ? !1 : a, f = e.collapse, g = f === void 0 ? !0 : f, v = e.collapseDuration, o = v === void 0 ? 300 : v;
94
89
  return function(m) {
95
- var O = m.children, T = m.position, y = m.preventExitTransition, L = m.done, h = m.nodeRef, I = m.isIn, u = i ? t + "--" + T : t, c = i ? n + "--" + T : n, C = F(), E = F(
90
+ var I = m.children, T = m.position, y = m.preventExitTransition, L = m.done, h = m.nodeRef, O = m.isIn, u = i ? t + "--" + T : t, c = i ? n + "--" + T : n, b = F(), E = F(
96
91
  0
97
92
  /* Enter */
98
93
  );
99
- _e(function() {
94
+ xe(function() {
100
95
  r();
101
96
  }, []), U(function() {
102
- I || (y ? _() : B());
103
- }, [I]);
97
+ O || (y ? x() : _());
98
+ }, [O]);
104
99
  function r() {
105
100
  var s = h.current;
106
- C.current = s.className, s.className += " " + u, s.addEventListener("animationend", P), s.addEventListener("animationcancel", P);
101
+ b.current = s.className, s.className += " " + u, s.addEventListener("animationend", P), s.addEventListener("animationcancel", P);
107
102
  }
108
103
  function P(s) {
109
104
  if (s.target === h.current) {
@@ -111,22 +106,22 @@ function we(e) {
111
106
  d.dispatchEvent(new Event(
112
107
  "d"
113
108
  /* ENTRANCE_ANIMATION_END */
114
- )), d.removeEventListener("animationend", P), d.removeEventListener("animationcancel", P), E.current === 0 && (d.className = C.current);
109
+ )), d.removeEventListener("animationend", P), d.removeEventListener("animationcancel", P), E.current === 0 && (d.className = b.current);
115
110
  }
116
111
  }
117
- function B() {
112
+ function _() {
118
113
  E.current = 1;
119
114
  var s = h.current;
120
- s.className += " " + c, s.addEventListener("animationend", _);
115
+ s.className += " " + c, s.addEventListener("animationend", x);
121
116
  }
122
- function _() {
117
+ function x() {
123
118
  var s = h.current;
124
- s.removeEventListener("animationend", _), g ? Se(s, L, o) : L();
119
+ s.removeEventListener("animationend", x), g ? we(s, L, o) : L();
125
120
  }
126
- return ge.createElement(ge.Fragment, null, O);
121
+ return ge.createElement(ge.Fragment, null, I);
127
122
  };
128
123
  }
129
- var w = {
124
+ var S = {
130
125
  list: /* @__PURE__ */ new Map(),
131
126
  emitQueue: /* @__PURE__ */ new Map(),
132
127
  on: function(t, n) {
@@ -163,9 +158,9 @@ var w = {
163
158
  n.emitQueue.has(t) || n.emitQueue.set(t, []), n.emitQueue.get(t).push(v);
164
159
  });
165
160
  }
166
- }, Me = ["delay", "staleId"];
167
- function Ae(e) {
168
- var t = xe(function(u) {
161
+ }, Ae = ["delay", "staleId"];
162
+ function Me(e) {
163
+ var t = Be(function(u) {
169
164
  return u + 1;
170
165
  }, 0), n = t[1], a = ie([]), i = a[0], f = a[1], g = F(null), v = F(/* @__PURE__ */ new Map()).current, o = function(c) {
171
166
  return i.indexOf(c) !== -1;
@@ -182,7 +177,7 @@ function Ae(e) {
182
177
  }
183
178
  }).current;
184
179
  U(function() {
185
- return l.containerId = e.containerId, w.cancelEmit(
180
+ return l.containerId = e.containerId, S.cancelEmit(
186
181
  3
187
182
  /* WillUnmount */
188
183
  ).on(
@@ -191,7 +186,7 @@ function Ae(e) {
191
186
  ).on(
192
187
  1,
193
188
  function(u) {
194
- return g.current && O(u);
189
+ return g.current && I(u);
195
190
  }
196
191
  ).on(
197
192
  5,
@@ -200,13 +195,13 @@ function Ae(e) {
200
195
  2,
201
196
  l
202
197
  ), function() {
203
- return w.emit(
198
+ return S.emit(
204
199
  3,
205
200
  l
206
201
  );
207
202
  };
208
203
  }, []), U(function() {
209
- l.isToastActive = o, l.displayedToast = i.length, w.emit(
204
+ l.isToastActive = o, l.displayedToast = i.length, S.emit(
210
205
  4,
211
206
  i.length,
212
207
  e.containerId
@@ -215,33 +210,33 @@ function Ae(e) {
215
210
  l.props = e;
216
211
  });
217
212
  function m(u) {
218
- var c = u.containerId, C = l.props.limit;
219
- C && (!c || l.containerId === c) && (l.count -= l.queue.length, l.queue = []);
213
+ var c = u.containerId, b = l.props.limit;
214
+ b && (!c || l.containerId === c) && (l.count -= l.queue.length, l.queue = []);
220
215
  }
221
- function O(u) {
216
+ function I(u) {
222
217
  f(function(c) {
223
- return re(u) ? c.filter(function(C) {
224
- return C !== u;
218
+ return re(u) ? c.filter(function(b) {
219
+ return b !== u;
225
220
  }) : [];
226
221
  });
227
222
  }
228
223
  function T() {
229
- var u = l.queue.shift(), c = u.toastContent, C = u.toastProps, E = u.staleId;
230
- h(c, C, E);
224
+ var u = l.queue.shift(), c = u.toastContent, b = u.toastProps, E = u.staleId;
225
+ h(c, b, E);
231
226
  }
232
227
  function y(u) {
233
228
  return !g.current || l.props.enableMultiContainer && u.containerId !== l.props.containerId || v.has(u.toastId) && u.updateId == null;
234
229
  }
235
230
  function L(u, c) {
236
- var C = c.delay, E = c.staleId, r = pe(c, Me);
231
+ var b = c.delay, E = c.staleId, r = pe(c, Ae);
237
232
  if (!(!se(u) || y(r))) {
238
- var P = r.toastId, B = r.updateId, _ = r.data, s = l.props, d = function() {
239
- return O(P);
240
- }, N = B == null;
233
+ var P = r.toastId, _ = r.updateId, x = r.data, s = l.props, d = function() {
234
+ return I(P);
235
+ }, N = _ == null;
241
236
  N && l.count++;
242
- var x = {
237
+ var B = {
243
238
  toastId: P,
244
- updateId: B,
239
+ updateId: _,
245
240
  isLoading: r.isLoading,
246
241
  theme: r.theme || s.theme,
247
242
  icon: r.icon != null ? r.icon : s.icon,
@@ -266,7 +261,7 @@ function Ae(e) {
266
261
  closeOnClick: $(r.closeOnClick) ? r.closeOnClick : s.closeOnClick,
267
262
  progressClassName: J(r.progressClassName || s.progressClassName),
268
263
  progressStyle: r.progressStyle || s.progressStyle,
269
- autoClose: r.isLoading ? !1 : Be(r.autoClose, s.autoClose),
264
+ autoClose: r.isLoading ? !1 : _e(r.autoClose, s.autoClose),
270
265
  hideProgressBar: $(r.hideProgressBar) ? r.hideProgressBar : s.hideProgressBar,
271
266
  progress: r.progress,
272
267
  role: r.role || s.role,
@@ -274,11 +269,11 @@ function Ae(e) {
274
269
  v.delete(P);
275
270
  var j = l.queue.length;
276
271
  if (l.count = re(P) ? l.count - 1 : l.count - l.displayedToast, l.count < 0 && (l.count = 0), j > 0) {
277
- var S = re(P) ? 1 : l.props.limit;
278
- if (j === 1 || S === 1)
272
+ var w = re(P) ? 1 : l.props.limit;
273
+ if (j === 1 || w === 1)
279
274
  l.displayedToast++, T();
280
275
  else {
281
- var z = S > j ? j : S;
276
+ var z = w > j ? j : w;
282
277
  l.displayedToast = z;
283
278
  for (var Y = 0; Y < z; Y++)
284
279
  T();
@@ -287,39 +282,39 @@ function Ae(e) {
287
282
  n();
288
283
  }
289
284
  };
290
- R(r.onOpen) && (x.onOpen = r.onOpen), R(r.onClose) && (x.onClose = r.onClose), x.closeButton = s.closeButton, r.closeButton === !1 || se(r.closeButton) ? x.closeButton = r.closeButton : r.closeButton === !0 && (x.closeButton = se(s.closeButton) ? s.closeButton : !0);
285
+ R(r.onOpen) && (B.onOpen = r.onOpen), R(r.onClose) && (B.onClose = r.onClose), B.closeButton = s.closeButton, r.closeButton === !1 || se(r.closeButton) ? B.closeButton = r.closeButton : r.closeButton === !0 && (B.closeButton = se(s.closeButton) ? s.closeButton : !0);
291
286
  var A = u;
292
287
  G(u) && !Q(u.type) ? A = ue(u, {
293
288
  closeToast: d,
294
- toastProps: x,
295
- data: _
289
+ toastProps: B,
290
+ data: x
296
291
  }) : R(u) && (A = u({
297
292
  closeToast: d,
298
- toastProps: x,
299
- data: _
293
+ toastProps: B,
294
+ data: x
300
295
  })), s.limit && s.limit > 0 && l.count > s.limit && N ? l.queue.push({
301
296
  toastContent: A,
302
- toastProps: x,
297
+ toastProps: B,
303
298
  staleId: E
304
- }) : Z(C) && C > 0 ? setTimeout(function() {
305
- h(A, x, E);
306
- }, C) : h(A, x, E);
299
+ }) : Z(b) && b > 0 ? setTimeout(function() {
300
+ h(A, B, E);
301
+ }, b) : h(A, B, E);
307
302
  }
308
303
  }
309
- function h(u, c, C) {
304
+ function h(u, c, b) {
310
305
  var E = c.toastId;
311
- C && v.delete(C), v.set(E, {
306
+ b && v.delete(b), v.set(E, {
312
307
  content: u,
313
308
  props: c
314
309
  }), f(function(r) {
315
310
  return [].concat(r, [E]).filter(function(P) {
316
- return P !== C;
311
+ return P !== b;
317
312
  });
318
313
  });
319
314
  }
320
- function I(u) {
321
- var c = /* @__PURE__ */ new Map(), C = Array.from(v.values());
322
- return e.newestOnTop && C.reverse(), C.forEach(function(E) {
315
+ function O(u) {
316
+ var c = /* @__PURE__ */ new Map(), b = Array.from(v.values());
317
+ return e.newestOnTop && b.reverse(), b.forEach(function(E) {
323
318
  var r = E.props.position;
324
319
  c.has(r) || c.set(r, []), c.get(r).push(E);
325
320
  }), Array.from(c, function(E) {
@@ -327,7 +322,7 @@ function Ae(e) {
327
322
  });
328
323
  }
329
324
  return {
330
- getToastToRender: I,
325
+ getToastToRender: O,
331
326
  containerRef: g,
332
327
  isToastActive: o
333
328
  };
@@ -349,7 +344,7 @@ function ke(e) {
349
344
  canDrag: !1,
350
345
  boundingRect: null,
351
346
  didMove: !1
352
- }).current, l = F(e), m = e.autoClose, O = e.pauseOnHover, T = e.closeToast, y = e.onClick, L = e.closeOnClick;
347
+ }).current, l = F(e), m = e.autoClose, I = e.pauseOnHover, T = e.closeToast, y = e.onClick, L = e.closeOnClick;
353
348
  U(function() {
354
349
  l.current = e;
355
350
  }), U(function() {
@@ -364,7 +359,7 @@ function ke(e) {
364
359
  R(d.onClose) && d.onClose(G(d.children) && d.children.props);
365
360
  };
366
361
  }, []), U(function() {
367
- return e.pauseOnFocusLoss && C(), function() {
362
+ return e.pauseOnFocusLoss && b(), function() {
368
363
  e.pauseOnFocusLoss && E();
369
364
  };
370
365
  }, [e.pauseOnFocusLoss]);
@@ -375,10 +370,10 @@ function ke(e) {
375
370
  o.canCloseOnClick = !0, o.canDrag = !0, o.boundingRect = N.getBoundingClientRect(), N.style.transition = "", o.x = me(d.nativeEvent), o.y = Te(d.nativeEvent), e.draggableDirection === "x" ? (o.start = o.x, o.removalDistance = N.offsetWidth * (e.draggablePercent / 100)) : (o.start = o.y, o.removalDistance = N.offsetHeight * (e.draggablePercent === 80 ? e.draggablePercent * 1.5 : e.draggablePercent / 100));
376
371
  }
377
372
  }
378
- function I() {
373
+ function O() {
379
374
  if (o.boundingRect) {
380
- var d = o.boundingRect, N = d.top, x = d.bottom, A = d.left, H = d.right;
381
- e.pauseOnHover && o.x >= A && o.x <= H && o.y >= N && o.y <= x ? c() : u();
375
+ var d = o.boundingRect, N = d.top, B = d.bottom, A = d.left, H = d.right;
376
+ e.pauseOnHover && o.x >= A && o.x <= H && o.y >= N && o.y <= B ? c() : u();
382
377
  }
383
378
  }
384
379
  function u() {
@@ -387,23 +382,23 @@ function ke(e) {
387
382
  function c() {
388
383
  a(!1);
389
384
  }
390
- function C() {
385
+ function b() {
391
386
  document.hasFocus() || c(), window.addEventListener("focus", u), window.addEventListener("blur", c);
392
387
  }
393
388
  function E() {
394
389
  window.removeEventListener("focus", u), window.removeEventListener("blur", c);
395
390
  }
396
391
  function r() {
397
- o.didMove = !1, document.addEventListener("mousemove", B), document.addEventListener("mouseup", _), document.addEventListener("touchmove", B), document.addEventListener("touchend", _);
392
+ o.didMove = !1, document.addEventListener("mousemove", _), document.addEventListener("mouseup", x), document.addEventListener("touchmove", _), document.addEventListener("touchend", x);
398
393
  }
399
394
  function P() {
400
- document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", _), document.removeEventListener("touchmove", B), document.removeEventListener("touchend", _);
395
+ document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", x), document.removeEventListener("touchmove", _), document.removeEventListener("touchend", x);
401
396
  }
402
- function B(d) {
397
+ function _(d) {
403
398
  var N = v.current;
404
399
  o.canDrag && N && (o.didMove = !0, n && c(), o.x = me(d), o.y = Te(d), e.draggableDirection === "x" ? o.delta = o.x - o.start : o.delta = o.y - o.start, o.start !== o.x && (o.canCloseOnClick = !1), N.style.transform = "translate" + e.draggableDirection + "(" + o.delta + "px)", N.style.opacity = "" + (1 - Math.abs(o.delta / o.removalDistance)));
405
400
  }
406
- function _() {
401
+ function x() {
407
402
  P();
408
403
  var d = v.current;
409
404
  if (o.canDrag && o.didMove && d) {
@@ -417,10 +412,10 @@ function ke(e) {
417
412
  var s = {
418
413
  onMouseDown: h,
419
414
  onTouchStart: h,
420
- onMouseUp: I,
421
- onTouchEnd: I
415
+ onMouseUp: O,
416
+ onTouchEnd: O
422
417
  };
423
- return m && O && (s.onMouseEnter = c, s.onMouseLeave = u), L && (s.onClick = function(d) {
418
+ return m && I && (s.onMouseEnter = c, s.onMouseLeave = u), L && (s.onClick = function(d) {
424
419
  y && y(d), o.canCloseOnClick && T();
425
420
  }), {
426
421
  playToast: u,
@@ -448,18 +443,18 @@ function Ee(e) {
448
443
  d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"
449
444
  })));
450
445
  }
451
- function Oe(e) {
452
- var t, n, a = e.delay, i = e.isRunning, f = e.closeToast, g = e.type, v = e.hide, o = e.className, l = e.style, m = e.controlledProgress, O = e.progress, T = e.rtl, y = e.isIn, L = e.theme, h = D({}, l, {
446
+ function Ie(e) {
447
+ var t, n, a = e.delay, i = e.isRunning, f = e.closeToast, g = e.type, v = e.hide, o = e.className, l = e.style, m = e.controlledProgress, I = e.progress, T = e.rtl, y = e.isIn, L = e.theme, h = D({}, l, {
453
448
  animationDuration: a + "ms",
454
449
  animationPlayState: i ? "running" : "paused",
455
450
  opacity: v ? 0 : 1
456
451
  });
457
- m && (h.transform = "scaleX(" + O + ")");
458
- var I = M("Toastify__progress-bar", m ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", "Toastify__progress-bar-theme--" + L, "Toastify__progress-bar--" + g, (t = {}, t["Toastify__progress-bar--rtl"] = T, t)), u = R(o) ? o({
452
+ m && (h.transform = "scaleX(" + I + ")");
453
+ var O = k("Toastify__progress-bar", m ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", "Toastify__progress-bar-theme--" + L, "Toastify__progress-bar--" + g, (t = {}, t["Toastify__progress-bar--rtl"] = T, t)), u = R(o) ? o({
459
454
  rtl: T,
460
455
  type: g,
461
- defaultClassName: I
462
- }) : M(I, o), c = (n = {}, n[m && O >= 1 ? "onTransitionEnd" : "onAnimationEnd"] = m && O < 1 ? null : function() {
456
+ defaultClassName: O
457
+ }) : k(O, o), c = (n = {}, n[m && I >= 1 ? "onTransitionEnd" : "onAnimationEnd"] = m && I < 1 ? null : function() {
463
458
  y && f();
464
459
  }, n);
465
460
  return p("div", Object.assign({
@@ -470,8 +465,8 @@ function Oe(e) {
470
465
  style: h
471
466
  }, c));
472
467
  }
473
- Oe.defaultProps = {
474
- type: k.DEFAULT,
468
+ Ie.defaultProps = {
469
+ type: M.DEFAULT,
475
470
  hide: !1
476
471
  };
477
472
  var Fe = ["theme", "type"], ee = function(t) {
@@ -515,16 +510,16 @@ var ye = {
515
510
  error: qe,
516
511
  spinner: Ue
517
512
  }, Qe = function(t) {
518
- var n, a, i = ke(t), f = i.isRunning, g = i.preventExitTransition, v = i.toastRef, o = i.eventHandlers, l = t.closeButton, m = t.children, O = t.autoClose, T = t.onClick, y = t.type, L = t.hideProgressBar, h = t.closeToast, I = t.transition, u = t.position, c = t.className, C = t.style, E = t.bodyClassName, r = t.bodyStyle, P = t.progressClassName, B = t.progressStyle, _ = t.updateId, s = t.role, d = t.progress, N = t.rtl, x = t.toastId, A = t.deleteToast, H = t.isIn, j = t.isLoading, S = t.icon, z = t.theme, Y = M("Toastify__toast", "Toastify__toast-theme--" + z, "Toastify__toast--" + y, (n = {}, n["Toastify__toast--rtl"] = N, n)), Pe = R(c) ? c({
513
+ var n, a, i = ke(t), f = i.isRunning, g = i.preventExitTransition, v = i.toastRef, o = i.eventHandlers, l = t.closeButton, m = t.children, I = t.autoClose, T = t.onClick, y = t.type, L = t.hideProgressBar, h = t.closeToast, O = t.transition, u = t.position, c = t.className, b = t.style, E = t.bodyClassName, r = t.bodyStyle, P = t.progressClassName, _ = t.progressStyle, x = t.updateId, s = t.role, d = t.progress, N = t.rtl, B = t.toastId, A = t.deleteToast, H = t.isIn, j = t.isLoading, w = t.icon, z = t.theme, Y = k("Toastify__toast", "Toastify__toast-theme--" + z, "Toastify__toast--" + y, (n = {}, n["Toastify__toast--rtl"] = N, n)), Pe = R(c) ? c({
519
514
  rtl: N,
520
515
  position: u,
521
516
  type: y,
522
517
  defaultClassName: Y
523
- }) : M(Y, c), ae = !!d, fe = ye[y], oe = {
518
+ }) : k(Y, c), ae = !!d, fe = ye[y], oe = {
524
519
  theme: z,
525
520
  type: y
526
521
  }, q = fe && fe(oe);
527
- S === !1 ? q = void 0 : R(S) ? q = S(oe) : G(S) ? q = ue(S, oe) : Q(S) ? q = S : j && (q = ye.spinner());
522
+ w === !1 ? q = void 0 : R(w) ? q = w(oe) : G(w) ? q = ue(w, oe) : Q(w) ? q = w : j && (q = ye.spinner());
528
523
  function Re(X) {
529
524
  if (X) {
530
525
  var ve = {
@@ -538,82 +533,82 @@ var ye = {
538
533
  return ue(X, ve);
539
534
  }
540
535
  }
541
- return p(I, {
536
+ return p(O, {
542
537
  isIn: H,
543
538
  done: A,
544
539
  position: u,
545
540
  preventExitTransition: g,
546
541
  nodeRef: v
547
542
  }, p("div", Object.assign({
548
- id: x,
543
+ id: B,
549
544
  onClick: T,
550
545
  className: Pe
551
546
  }, o, {
552
- style: C,
547
+ style: b,
553
548
  ref: v
554
549
  }), p("div", Object.assign({}, H && {
555
550
  role: s
556
551
  }, {
557
552
  className: R(E) ? E({
558
553
  type: y
559
- }) : M("Toastify__toast-body", E),
554
+ }) : k("Toastify__toast-body", E),
560
555
  style: r
561
556
  }), q && p("div", {
562
- className: M("Toastify__toast-icon", (a = {}, a["Toastify--animate-icon Toastify__zoom-enter"] = !j, a))
563
- }, q), p("div", null, m)), Re(l), (O || ae) && p(Oe, Object.assign({}, _ && !ae ? {
564
- key: "pb-" + _
557
+ className: k("Toastify__toast-icon", (a = {}, a["Toastify--animate-icon Toastify__zoom-enter"] = !j, a))
558
+ }, q), p("div", null, m)), Re(l), (I || ae) && p(Ie, Object.assign({}, x && !ae ? {
559
+ key: "pb-" + x
565
560
  } : {}, {
566
561
  rtl: N,
567
562
  theme: z,
568
- delay: O,
563
+ delay: I,
569
564
  isRunning: f,
570
565
  isIn: H,
571
566
  closeToast: h,
572
567
  hide: L,
573
568
  type: y,
574
- style: B,
569
+ style: _,
575
570
  className: P,
576
571
  controlledProgress: ae,
577
572
  progress: d
578
573
  }))));
579
- }, We = /* @__PURE__ */ we({
574
+ }, We = /* @__PURE__ */ Se({
580
575
  enter: "Toastify--animate Toastify__bounce-enter",
581
576
  exit: "Toastify--animate Toastify__bounce-exit",
582
577
  appendPosition: !0
583
- }), Ie = function(t) {
584
- var n = Ae(t), a = n.getToastToRender, i = n.containerRef, f = n.isToastActive, g = t.className, v = t.style, o = t.rtl, l = t.containerId;
585
- function m(O) {
586
- var T, y = M("Toastify__toast-container", "Toastify__toast-container--" + O, (T = {}, T["Toastify__toast-container--rtl"] = o, T));
578
+ }), Oe = function(t) {
579
+ var n = Me(t), a = n.getToastToRender, i = n.containerRef, f = n.isToastActive, g = t.className, v = t.style, o = t.rtl, l = t.containerId;
580
+ function m(I) {
581
+ var T, y = k("Toastify__toast-container", "Toastify__toast-container--" + I, (T = {}, T["Toastify__toast-container--rtl"] = o, T));
587
582
  return R(g) ? g({
588
- position: O,
583
+ position: I,
589
584
  rtl: o,
590
585
  defaultClassName: y
591
- }) : M(y, J(g));
586
+ }) : k(y, J(g));
592
587
  }
593
588
  return p("div", {
594
589
  ref: i,
595
590
  className: "Toastify",
596
591
  id: l
597
- }, a(function(O, T) {
592
+ }, a(function(I, T) {
598
593
  var y = T.length ? D({}, v) : D({}, v, {
599
594
  pointerEvents: "none"
600
595
  });
601
596
  return p("div", {
602
- className: m(O),
597
+ className: m(I),
603
598
  style: y,
604
- key: "container-" + O
599
+ key: "container-" + I
605
600
  }, T.map(function(L) {
606
- var h = L.content, I = L.props;
607
- return p(Qe, Object.assign({}, I, {
608
- isIn: f(I.toastId),
609
- key: "toast-" + I.key,
610
- closeButton: I.closeButton === !0 ? Ee : I.closeButton
601
+ var h = L.content, O = L.props;
602
+ return p(Qe, Object.assign({}, O, {
603
+ isIn: f(O.toastId),
604
+ key: "toast-" + O.key,
605
+ closeButton: O.closeButton === !0 ? Ee : O.closeButton
611
606
  }), h);
612
607
  }));
613
608
  }));
614
609
  };
615
- Ie.defaultProps = {
616
- position: Ce.TOP_RIGHT,
610
+ Oe.defaultProps = {
611
+ position: be.TOP_RIGHT,
617
612
  transition: We,
618
613
  rtl: !1,
619
614
  autoClose: 5e3,
@@ -641,14 +636,14 @@ function Ye(e) {
641
636
  return e && (Q(e.toastId) || Z(e.toastId)) ? e.toastId : Le();
642
637
  }
643
638
  function V(e, t) {
644
- return W.size > 0 ? w.emit(
639
+ return W.size > 0 ? S.emit(
645
640
  0,
646
641
  e,
647
642
  t
648
643
  ) : (ce.push({
649
644
  content: e,
650
645
  options: t
651
- }), de && be && (de = !1, K = document.createElement("div"), document.body.appendChild(K), De.render(p(Ie, Object.assign({}, Ne)), K))), t.toastId;
646
+ }), de && Ce && (de = !1, K = document.createElement("div"), document.body.appendChild(K), De(p(Oe, Object.assign({}, Ne)), K))), t.toastId;
652
647
  }
653
648
  function te(e, t) {
654
649
  return D({}, t, {
@@ -661,11 +656,11 @@ function ne(e) {
661
656
  return V(t, te(e, n));
662
657
  };
663
658
  }
664
- function b(e, t) {
665
- return V(e, te(k.DEFAULT, t));
659
+ function C(e, t) {
660
+ return V(e, te(M.DEFAULT, t));
666
661
  }
667
- b.loading = function(e, t) {
668
- return V(e, te(k.DEFAULT, D({
662
+ C.loading = function(e, t) {
663
+ return V(e, te(M.DEFAULT, D({
669
664
  isLoading: !0,
670
665
  autoClose: !1,
671
666
  closeOnClick: !1,
@@ -675,26 +670,26 @@ b.loading = function(e, t) {
675
670
  };
676
671
  function Xe(e, t, n) {
677
672
  var a = t.pending, i = t.error, f = t.success, g;
678
- a && (g = Q(a) ? b.loading(a, n) : b.loading(a.render, D({}, n, a)));
673
+ a && (g = Q(a) ? C.loading(a, n) : C.loading(a.render, D({}, n, a)));
679
674
  var v = {
680
675
  isLoading: null,
681
676
  autoClose: null,
682
677
  closeOnClick: null,
683
678
  closeButton: null,
684
679
  draggable: null
685
- }, o = function(O, T, y) {
680
+ }, o = function(I, T, y) {
686
681
  if (T == null) {
687
- b.dismiss(g);
682
+ C.dismiss(g);
688
683
  return;
689
684
  }
690
685
  var L = D({
691
- type: O
686
+ type: I
692
687
  }, v, n, {
693
688
  data: y
694
689
  }), h = Q(T) ? {
695
690
  render: T
696
691
  } : T;
697
- return g ? b.update(g, D({}, L, h)) : b(h.render, D({}, L, h)), y;
692
+ return g ? C.update(g, D({}, L, h)) : C(h.render, D({}, L, h)), y;
698
693
  }, l = R(e) ? e() : e;
699
694
  return l.then(function(m) {
700
695
  return o("success", f, m);
@@ -702,36 +697,36 @@ function Xe(e, t, n) {
702
697
  return o("error", i, m);
703
698
  }), l;
704
699
  }
705
- b.promise = Xe;
706
- b.success = /* @__PURE__ */ ne(k.SUCCESS);
707
- b.info = /* @__PURE__ */ ne(k.INFO);
708
- b.error = /* @__PURE__ */ ne(k.ERROR);
709
- b.warning = /* @__PURE__ */ ne(k.WARNING);
710
- b.warn = b.warning;
711
- b.dark = function(e, t) {
712
- return V(e, te(k.DEFAULT, D({
700
+ C.promise = Xe;
701
+ C.success = /* @__PURE__ */ ne(M.SUCCESS);
702
+ C.info = /* @__PURE__ */ ne(M.INFO);
703
+ C.error = /* @__PURE__ */ ne(M.ERROR);
704
+ C.warning = /* @__PURE__ */ ne(M.WARNING);
705
+ C.warn = C.warning;
706
+ C.dark = function(e, t) {
707
+ return V(e, te(M.DEFAULT, D({
713
708
  theme: "dark"
714
709
  }, t)));
715
710
  };
716
- b.dismiss = function(e) {
717
- return w.emit(
711
+ C.dismiss = function(e) {
712
+ return S.emit(
718
713
  1,
719
714
  e
720
715
  );
721
716
  };
722
- b.clearWaitingQueue = function(e) {
723
- return e === void 0 && (e = {}), w.emit(
717
+ C.clearWaitingQueue = function(e) {
718
+ return e === void 0 && (e = {}), S.emit(
724
719
  5,
725
720
  e
726
721
  );
727
722
  };
728
- b.isActive = function(e) {
723
+ C.isActive = function(e) {
729
724
  var t = !1;
730
725
  return W.forEach(function(n) {
731
726
  n.isToastActive && n.isToastActive(e) && (t = !0);
732
727
  }), t;
733
728
  };
734
- b.update = function(e, t) {
729
+ C.update = function(e, t) {
735
730
  t === void 0 && (t = {}), setTimeout(function() {
736
731
  var n = Ge(e, t);
737
732
  if (n) {
@@ -745,32 +740,32 @@ b.update = function(e, t) {
745
740
  }
746
741
  }, 0);
747
742
  };
748
- b.done = function(e) {
749
- b.update(e, {
743
+ C.done = function(e) {
744
+ C.update(e, {
750
745
  progress: 1
751
746
  });
752
747
  };
753
- b.onChange = function(e) {
754
- return R(e) && w.on(
748
+ C.onChange = function(e) {
749
+ return R(e) && S.on(
755
750
  4,
756
751
  e
757
752
  ), function() {
758
- R(e) && w.off(
753
+ R(e) && S.off(
759
754
  4,
760
755
  e
761
756
  );
762
757
  };
763
758
  };
764
- b.configure = function(e) {
759
+ C.configure = function(e) {
765
760
  e === void 0 && (e = {}), de = !0, Ne = e;
766
761
  };
767
- b.POSITION = Ce;
768
- b.TYPE = k;
769
- w.on(
762
+ C.POSITION = be;
763
+ C.TYPE = M;
764
+ S.on(
770
765
  2,
771
766
  function(e) {
772
767
  le = e.containerId || e, W.set(le, e), ce.forEach(function(t) {
773
- w.emit(
768
+ S.emit(
774
769
  0,
775
770
  t.content,
776
771
  t.options
@@ -780,7 +775,7 @@ w.on(
780
775
  ).on(
781
776
  3,
782
777
  function(e) {
783
- W.delete(e.containerId || e), W.size === 0 && w.off(
778
+ W.delete(e.containerId || e), W.size === 0 && S.off(
784
779
  0
785
780
  /* Show */
786
781
  ).off(
@@ -789,10 +784,9 @@ w.on(
789
784
  ).off(
790
785
  5
791
786
  /* ClearWaitingQueue */
792
- ), be && K && document.body.removeChild(K);
787
+ ), Ce && K && document.body.removeChild(K);
793
788
  }
794
789
  );
795
790
  export {
796
- Ve as c,
797
- b as t
791
+ C as t
798
792
  };