@edinelsonslima/toast-notification 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/style.css +1 -1
- package/dist/toast-notification.es.js +183 -177
- package/dist/toast-notification.umd.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">Toast Notifications</h1>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
<image src="https://github.com/edinelsonslima/lp-toast-notification/blob/main/lp.gif"/>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
## 👀 Links
|
|
8
|
+
- 🔗 [Apresentação do toast notification](https://edinelsonslima.github.io/lp-toast-notification/)
|
|
9
|
+
- 🔗 [NPM](https://www.npmjs.com/package/@edinelsonslima/toast-notification)
|
|
4
10
|
|
|
11
|
+
## ⤵️ Instalando
|
|
5
12
|
Adicionar com **yarn**
|
|
6
13
|
```
|
|
7
14
|
yarn add @edinelsonslima/toast-notification
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--animation-time: .5s}._toast-
|
|
1
|
+
:root{--animation-time: .5s}._toast-container_1p5ze_5{position:fixed;display:flex;flex-direction:column-reverse;gap:1rem;z-index:99999999}._toast-container_1p5ze_5[data-position=right-top]{right:1rem;top:1rem}._toast-container_1p5ze_5[data-position=right-center]{right:1rem;top:50%;transform:translateY(-50%)}._toast-container_1p5ze_5[data-position=right-bottom]{right:1rem;bottom:1rem}._toast-container_1p5ze_5[data-position=right-top] ._toast-message_1p5ze_29,._toast-container_1p5ze_5[data-position=right-center] ._toast-message_1p5ze_29,._toast-container_1p5ze_5[data-position=right-bottom] ._toast-message_1p5ze_29{animation:_screenRightIn_1p5ze_1 var(--animation-time) ease-in-out}._toast-container_1p5ze_5[data-position=center-top]{left:50%;top:1rem;transform:translate(-50%)}._toast-container_1p5ze_5[data-position=center-center]{left:50%;top:50%;transform:translate(-50%,-50%)}._toast-container_1p5ze_5[data-position=center-bottom]{left:50%;bottom:1rem;transform:translate(-50%)}._toast-container_1p5ze_5[data-position=center-top] ._toast-message_1p5ze_29,._toast-container_1p5ze_5[data-position=center-bottom] ._toast-message_1p5ze_29,._toast-container_1p5ze_5[data-position=center-center] ._toast-message_1p5ze_29{animation:_screenCenterIn_1p5ze_1 var(--animation-time) ease-in-out}._toast-container_1p5ze_5[data-position=left-top]{left:1rem;top:1rem}._toast-container_1p5ze_5[data-position=left-center]{left:1rem;top:50%;transform:translateY(-50%)}._toast-container_1p5ze_5[data-position=left-bottom]{left:1rem;bottom:1rem}._toast-container_1p5ze_5[data-position=left-top] ._toast-message_1p5ze_29,._toast-container_1p5ze_5[data-position=left-center] ._toast-message_1p5ze_29,._toast-container_1p5ze_5[data-position=left-bottom] ._toast-message_1p5ze_29{animation:_screenLeftIn_1p5ze_1 var(--animation-time) ease-in-out}._toast-message_1p5ze_29[data-animation-end=true]{animation:_screenOut_1p5ze_1 var(--animation-time) ease-in-out forwards!important}._toast-message_1p5ze_29{display:flex;gap:.5rem;align-items:center;justify-content:center;border-radius:.2rem;padding:.5rem;background:#c2c2c2;box-shadow:0 3px 10px #0000001a,0 3px 3px #0000000d;border:none;outline:none;cursor:pointer;transition:all .5s ease-in-out}._toast-message_1p5ze_29:hover{filter:brightness(.9)}._toast-message_1p5ze_29:active{filter:brightness(1.1)}._success_1p5ze_111{background:#61d345}._info_1p5ze_115{background:#4b8aff;color:#fff}._warn_1p5ze_120{background:#ffcc00}._error_1p5ze_124{background:#ff4b4b;color:#fff}._ghost_1p5ze_129{background:#ffffff}@keyframes _screenRightIn_1p5ze_1{0%{transform:translate(150%)}to{transform:translate(0)}}@keyframes _screenLeftIn_1p5ze_1{0%{transform:translate(-150%)}to{transform:translate(0)}}@keyframes _screenCenterIn_1p5ze_1{0%{transform:translateY(-150%)}to{transform:translate(0)}}@keyframes _screenOut_1p5ze_1{0%{opacity:1}to{opacity:0}}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var vr = Object.defineProperty;
|
|
2
2
|
var pr = (i, a, l) => a in i ? vr(i, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : i[a] = l;
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
class
|
|
3
|
+
var we = (i, a, l) => (pr(i, typeof a != "symbol" ? a + "" : a, l), l);
|
|
4
|
+
import xe, { useState as je, useEffect as ke, useCallback as _r } from "react";
|
|
5
|
+
class gr {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
7
|
+
we(this, "listeners", /* @__PURE__ */ new Map([]));
|
|
8
8
|
}
|
|
9
9
|
on(a, l) {
|
|
10
10
|
var c;
|
|
@@ -12,19 +12,19 @@ class hr {
|
|
|
12
12
|
}
|
|
13
13
|
emit(a, l) {
|
|
14
14
|
var c;
|
|
15
|
-
this.listeners.has(a) && ((c = this.listeners.get(a)) == null || c.forEach((
|
|
15
|
+
this.listeners.has(a) && ((c = this.listeners.get(a)) == null || c.forEach((E) => E(l)));
|
|
16
16
|
}
|
|
17
17
|
removeListener(a, l) {
|
|
18
18
|
const c = this.listeners.get(a);
|
|
19
19
|
if (!c)
|
|
20
20
|
return;
|
|
21
|
-
const
|
|
21
|
+
const E = c.filter(
|
|
22
22
|
(d) => d !== l
|
|
23
23
|
);
|
|
24
|
-
this.listeners.set(a,
|
|
24
|
+
this.listeners.set(a, E);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
const X = new
|
|
27
|
+
const X = new gr();
|
|
28
28
|
function C({ duration: i, text: a, type: l }) {
|
|
29
29
|
X.emit("add-toast", { duration: i, text: a, type: l });
|
|
30
30
|
}
|
|
@@ -43,18 +43,18 @@ var Z = { exports: {} }, F = {};
|
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
var i =
|
|
46
|
+
var Se;
|
|
47
|
+
function hr() {
|
|
48
|
+
return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
+
var i = xe, a = Symbol.for("react.element"), l = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), m = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), re = Symbol.iterator, Ie = "@@iterator";
|
|
50
50
|
function De(e) {
|
|
51
51
|
if (e === null || typeof e != "object")
|
|
52
52
|
return null;
|
|
53
|
-
var r =
|
|
53
|
+
var r = re && e[re] || e[Ie];
|
|
54
54
|
return typeof r == "function" ? r : null;
|
|
55
55
|
}
|
|
56
56
|
var j = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
|
-
function
|
|
57
|
+
function g(e) {
|
|
58
58
|
{
|
|
59
59
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
60
60
|
t[n - 1] = arguments[n];
|
|
@@ -71,14 +71,14 @@ function mr() {
|
|
|
71
71
|
f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var Fe = !1, $e = !1, Le = !1, We = !1, Me = !1,
|
|
75
|
-
|
|
74
|
+
var Fe = !1, $e = !1, Le = !1, We = !1, Me = !1, te;
|
|
75
|
+
te = Symbol.for("react.module.reference");
|
|
76
76
|
function Ye(e) {
|
|
77
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === d || Me || e ===
|
|
77
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === d || Me || e === E || e === T || e === y || We || e === L || Fe || $e || Le || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === O || e.$$typeof === b || e.$$typeof === m || e.$$typeof === _ || // This needs to include all possible module reference object
|
|
78
78
|
// types supported by any Flight configuration anywhere since
|
|
79
79
|
// we don't know which Flight build this will end up being used
|
|
80
80
|
// with.
|
|
81
|
-
e.$$typeof ===
|
|
81
|
+
e.$$typeof === te || e.getModuleId !== void 0));
|
|
82
82
|
}
|
|
83
83
|
function Ue(e, r, t) {
|
|
84
84
|
var n = e.displayName;
|
|
@@ -87,13 +87,13 @@ function mr() {
|
|
|
87
87
|
var u = r.displayName || r.name || "";
|
|
88
88
|
return u !== "" ? t + "(" + u + ")" : t;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ne(e) {
|
|
91
91
|
return e.displayName || "Context";
|
|
92
92
|
}
|
|
93
93
|
function w(e) {
|
|
94
94
|
if (e == null)
|
|
95
95
|
return null;
|
|
96
|
-
if (typeof e.tag == "number" &&
|
|
96
|
+
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
97
97
|
return e.displayName || e.name || null;
|
|
98
98
|
if (typeof e == "string")
|
|
99
99
|
return e;
|
|
@@ -104,27 +104,27 @@ function mr() {
|
|
|
104
104
|
return "Portal";
|
|
105
105
|
case d:
|
|
106
106
|
return "Profiler";
|
|
107
|
-
case
|
|
107
|
+
case E:
|
|
108
108
|
return "StrictMode";
|
|
109
109
|
case T:
|
|
110
110
|
return "Suspense";
|
|
111
|
-
case
|
|
111
|
+
case y:
|
|
112
112
|
return "SuspenseList";
|
|
113
113
|
}
|
|
114
114
|
if (typeof e == "object")
|
|
115
115
|
switch (e.$$typeof) {
|
|
116
|
-
case
|
|
116
|
+
case m:
|
|
117
117
|
var r = e;
|
|
118
|
-
return
|
|
118
|
+
return ne(r) + ".Consumer";
|
|
119
119
|
case b:
|
|
120
120
|
var t = e;
|
|
121
|
-
return
|
|
122
|
-
case
|
|
121
|
+
return ne(t._context) + ".Provider";
|
|
122
|
+
case _:
|
|
123
123
|
return Ue(e, e.render, "ForwardRef");
|
|
124
124
|
case O:
|
|
125
125
|
var n = e.displayName || null;
|
|
126
126
|
return n !== null ? n : w(e.type) || "Memo";
|
|
127
|
-
case
|
|
127
|
+
case P: {
|
|
128
128
|
var u = e, f = u._payload, s = u._init;
|
|
129
129
|
try {
|
|
130
130
|
return w(s(f));
|
|
@@ -135,18 +135,18 @@ function mr() {
|
|
|
135
135
|
}
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
|
-
var
|
|
139
|
-
function
|
|
138
|
+
var x = Object.assign, D = 0, ae, oe, ie, se, ue, fe, ce;
|
|
139
|
+
function le() {
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
le.__reactDisabledLog = !0;
|
|
142
142
|
function Ve() {
|
|
143
143
|
{
|
|
144
144
|
if (D === 0) {
|
|
145
|
-
|
|
145
|
+
ae = console.log, oe = console.info, ie = console.warn, se = console.error, ue = console.group, fe = console.groupCollapsed, ce = console.groupEnd;
|
|
146
146
|
var e = {
|
|
147
147
|
configurable: !0,
|
|
148
148
|
enumerable: !0,
|
|
149
|
-
value:
|
|
149
|
+
value: le,
|
|
150
150
|
writable: !0
|
|
151
151
|
};
|
|
152
152
|
Object.defineProperties(console, {
|
|
@@ -162,7 +162,7 @@ function mr() {
|
|
|
162
162
|
D++;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ze() {
|
|
166
166
|
{
|
|
167
167
|
if (D--, D === 0) {
|
|
168
168
|
var e = {
|
|
@@ -171,53 +171,53 @@ function mr() {
|
|
|
171
171
|
writable: !0
|
|
172
172
|
};
|
|
173
173
|
Object.defineProperties(console, {
|
|
174
|
-
log:
|
|
175
|
-
value: ne
|
|
176
|
-
}),
|
|
177
|
-
info: P({}, e, {
|
|
174
|
+
log: x({}, e, {
|
|
178
175
|
value: ae
|
|
179
176
|
}),
|
|
180
|
-
|
|
177
|
+
info: x({}, e, {
|
|
181
178
|
value: oe
|
|
182
179
|
}),
|
|
183
|
-
|
|
180
|
+
warn: x({}, e, {
|
|
184
181
|
value: ie
|
|
185
182
|
}),
|
|
186
|
-
|
|
183
|
+
error: x({}, e, {
|
|
187
184
|
value: se
|
|
188
185
|
}),
|
|
189
|
-
|
|
186
|
+
group: x({}, e, {
|
|
190
187
|
value: ue
|
|
191
188
|
}),
|
|
192
|
-
|
|
189
|
+
groupCollapsed: x({}, e, {
|
|
193
190
|
value: fe
|
|
191
|
+
}),
|
|
192
|
+
groupEnd: x({}, e, {
|
|
193
|
+
value: ce
|
|
194
194
|
})
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
D < 0 &&
|
|
197
|
+
D < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var z = j.ReactCurrentDispatcher, N;
|
|
201
201
|
function W(e, r, t) {
|
|
202
202
|
{
|
|
203
|
-
if (
|
|
203
|
+
if (N === void 0)
|
|
204
204
|
try {
|
|
205
205
|
throw Error();
|
|
206
206
|
} catch (u) {
|
|
207
207
|
var n = u.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
-
|
|
208
|
+
N = n && n[1] || "";
|
|
209
209
|
}
|
|
210
210
|
return `
|
|
211
|
-
` +
|
|
211
|
+
` + N + e;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
var
|
|
214
|
+
var B = !1, M;
|
|
215
215
|
{
|
|
216
|
-
var
|
|
217
|
-
M = new
|
|
216
|
+
var Ne = typeof WeakMap == "function" ? WeakMap : Map;
|
|
217
|
+
M = new Ne();
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
if (!e ||
|
|
219
|
+
function de(e, r) {
|
|
220
|
+
if (!e || B)
|
|
221
221
|
return "";
|
|
222
222
|
{
|
|
223
223
|
var t = M.get(e);
|
|
@@ -225,11 +225,11 @@ function mr() {
|
|
|
225
225
|
return t;
|
|
226
226
|
}
|
|
227
227
|
var n;
|
|
228
|
-
|
|
228
|
+
B = !0;
|
|
229
229
|
var u = Error.prepareStackTrace;
|
|
230
230
|
Error.prepareStackTrace = void 0;
|
|
231
231
|
var f;
|
|
232
|
-
f =
|
|
232
|
+
f = z.current, z.current = null, Ve();
|
|
233
233
|
try {
|
|
234
234
|
if (r) {
|
|
235
235
|
var s = function() {
|
|
@@ -242,37 +242,37 @@ function mr() {
|
|
|
242
242
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
243
243
|
try {
|
|
244
244
|
Reflect.construct(s, []);
|
|
245
|
-
} catch (
|
|
246
|
-
n =
|
|
245
|
+
} catch (S) {
|
|
246
|
+
n = S;
|
|
247
247
|
}
|
|
248
248
|
Reflect.construct(e, [], s);
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
251
|
s.call();
|
|
252
|
-
} catch (
|
|
253
|
-
n =
|
|
252
|
+
} catch (S) {
|
|
253
|
+
n = S;
|
|
254
254
|
}
|
|
255
255
|
e.call(s.prototype);
|
|
256
256
|
}
|
|
257
257
|
} else {
|
|
258
258
|
try {
|
|
259
259
|
throw Error();
|
|
260
|
-
} catch (
|
|
261
|
-
n =
|
|
260
|
+
} catch (S) {
|
|
261
|
+
n = S;
|
|
262
262
|
}
|
|
263
263
|
e();
|
|
264
264
|
}
|
|
265
|
-
} catch (
|
|
266
|
-
if (
|
|
267
|
-
for (var o =
|
|
268
|
-
`),
|
|
269
|
-
`), v = o.length - 1, p =
|
|
265
|
+
} catch (S) {
|
|
266
|
+
if (S && n && typeof S.stack == "string") {
|
|
267
|
+
for (var o = S.stack.split(`
|
|
268
|
+
`), h = n.stack.split(`
|
|
269
|
+
`), v = o.length - 1, p = h.length - 1; v >= 1 && p >= 0 && o[v] !== h[p]; )
|
|
270
270
|
p--;
|
|
271
271
|
for (; v >= 1 && p >= 0; v--, p--)
|
|
272
|
-
if (o[v] !==
|
|
272
|
+
if (o[v] !== h[p]) {
|
|
273
273
|
if (v !== 1 || p !== 1)
|
|
274
274
|
do
|
|
275
|
-
if (v--, p--, p < 0 || o[v] !==
|
|
275
|
+
if (v--, p--, p < 0 || o[v] !== h[p]) {
|
|
276
276
|
var R = `
|
|
277
277
|
` + o[v].replace(" at new ", " at ");
|
|
278
278
|
return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, R), R;
|
|
@@ -282,15 +282,15 @@ function mr() {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
} finally {
|
|
285
|
-
|
|
285
|
+
B = !1, z.current = f, ze(), Error.prepareStackTrace = u;
|
|
286
286
|
}
|
|
287
|
-
var I = e ? e.displayName || e.name : "",
|
|
288
|
-
return typeof e == "function" && M.set(e,
|
|
287
|
+
var I = e ? e.displayName || e.name : "", Oe = I ? W(I) : "";
|
|
288
|
+
return typeof e == "function" && M.set(e, Oe), Oe;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
return
|
|
290
|
+
function Be(e, r, t) {
|
|
291
|
+
return de(e, !1);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function qe(e) {
|
|
294
294
|
var r = e.prototype;
|
|
295
295
|
return !!(r && r.isReactComponent);
|
|
296
296
|
}
|
|
@@ -298,22 +298,22 @@ function mr() {
|
|
|
298
298
|
if (e == null)
|
|
299
299
|
return "";
|
|
300
300
|
if (typeof e == "function")
|
|
301
|
-
return
|
|
301
|
+
return de(e, qe(e));
|
|
302
302
|
if (typeof e == "string")
|
|
303
303
|
return W(e);
|
|
304
304
|
switch (e) {
|
|
305
305
|
case T:
|
|
306
306
|
return W("Suspense");
|
|
307
|
-
case
|
|
307
|
+
case y:
|
|
308
308
|
return W("SuspenseList");
|
|
309
309
|
}
|
|
310
310
|
if (typeof e == "object")
|
|
311
311
|
switch (e.$$typeof) {
|
|
312
|
-
case
|
|
313
|
-
return
|
|
312
|
+
case _:
|
|
313
|
+
return Be(e.render);
|
|
314
314
|
case O:
|
|
315
315
|
return Y(e.type, r, t);
|
|
316
|
-
case
|
|
316
|
+
case P: {
|
|
317
317
|
var n = e, u = n._payload, f = n._init;
|
|
318
318
|
try {
|
|
319
319
|
return Y(f(u), r, t);
|
|
@@ -323,15 +323,15 @@ function mr() {
|
|
|
323
323
|
}
|
|
324
324
|
return "";
|
|
325
325
|
}
|
|
326
|
-
var U = Object.prototype.hasOwnProperty,
|
|
326
|
+
var U = Object.prototype.hasOwnProperty, ve = {}, pe = j.ReactDebugCurrentFrame;
|
|
327
327
|
function V(e) {
|
|
328
328
|
if (e) {
|
|
329
329
|
var r = e._owner, t = Y(e.type, e._source, r ? r.type : null);
|
|
330
|
-
|
|
330
|
+
pe.setExtraStackFrame(t);
|
|
331
331
|
} else
|
|
332
|
-
|
|
332
|
+
pe.setExtraStackFrame(null);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Je(e, r, t, n, u) {
|
|
335
335
|
{
|
|
336
336
|
var f = Function.call.bind(U);
|
|
337
337
|
for (var s in e)
|
|
@@ -339,20 +339,20 @@ function mr() {
|
|
|
339
339
|
var o = void 0;
|
|
340
340
|
try {
|
|
341
341
|
if (typeof e[s] != "function") {
|
|
342
|
-
var
|
|
343
|
-
throw
|
|
342
|
+
var h = Error((n || "React class") + ": " + t + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
343
|
+
throw h.name = "Invariant Violation", h;
|
|
344
344
|
}
|
|
345
345
|
o = e[s](r, s, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
346
|
} catch (v) {
|
|
347
347
|
o = v;
|
|
348
348
|
}
|
|
349
|
-
o && !(o instanceof Error) && (V(u),
|
|
349
|
+
o && !(o instanceof Error) && (V(u), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, s, typeof o), V(null)), o instanceof Error && !(o.message in ve) && (ve[o.message] = !0, V(u), g("Failed %s type: %s", t, o.message), V(null));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
var
|
|
354
|
-
function
|
|
355
|
-
return
|
|
353
|
+
var Ge = Array.isArray;
|
|
354
|
+
function q(e) {
|
|
355
|
+
return Ge(e);
|
|
356
356
|
}
|
|
357
357
|
function Ke(e) {
|
|
358
358
|
{
|
|
@@ -362,25 +362,25 @@ function mr() {
|
|
|
362
362
|
}
|
|
363
363
|
function He(e) {
|
|
364
364
|
try {
|
|
365
|
-
return
|
|
365
|
+
return _e(e), !1;
|
|
366
366
|
} catch {
|
|
367
367
|
return !0;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function _e(e) {
|
|
371
371
|
return "" + e;
|
|
372
372
|
}
|
|
373
373
|
function ge(e) {
|
|
374
374
|
if (He(e))
|
|
375
|
-
return
|
|
375
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), _e(e);
|
|
376
376
|
}
|
|
377
377
|
var A = j.ReactCurrentOwner, Xe = {
|
|
378
378
|
key: !0,
|
|
379
379
|
ref: !0,
|
|
380
380
|
__self: !0,
|
|
381
381
|
__source: !0
|
|
382
|
-
}, he, me,
|
|
383
|
-
|
|
382
|
+
}, he, me, J;
|
|
383
|
+
J = {};
|
|
384
384
|
function Ze(e) {
|
|
385
385
|
if (U.call(e, "ref")) {
|
|
386
386
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -400,13 +400,13 @@ function mr() {
|
|
|
400
400
|
function er(e, r) {
|
|
401
401
|
if (typeof e.ref == "string" && A.current && r && A.current.stateNode !== r) {
|
|
402
402
|
var t = w(A.current.type);
|
|
403
|
-
|
|
403
|
+
J[t] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', w(A.current.type), e.ref), J[t] = !0);
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
function rr(e, r) {
|
|
407
407
|
{
|
|
408
408
|
var t = function() {
|
|
409
|
-
he || (he = !0,
|
|
409
|
+
he || (he = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
410
410
|
};
|
|
411
411
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
412
412
|
get: t,
|
|
@@ -417,7 +417,7 @@ function mr() {
|
|
|
417
417
|
function tr(e, r) {
|
|
418
418
|
{
|
|
419
419
|
var t = function() {
|
|
420
|
-
me || (me = !0,
|
|
420
|
+
me || (me = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
421
421
|
};
|
|
422
422
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
423
423
|
get: t,
|
|
@@ -456,8 +456,8 @@ function mr() {
|
|
|
456
456
|
};
|
|
457
457
|
function ar(e, r, t, n, u) {
|
|
458
458
|
{
|
|
459
|
-
var f, s = {}, o = null,
|
|
460
|
-
t !== void 0 && (ge(t), o = "" + t), Qe(r) && (ge(r.key), o = "" + r.key), Ze(r) && (
|
|
459
|
+
var f, s = {}, o = null, h = null;
|
|
460
|
+
t !== void 0 && (ge(t), o = "" + t), Qe(r) && (ge(r.key), o = "" + r.key), Ze(r) && (h = r.ref, er(r, u));
|
|
461
461
|
for (f in r)
|
|
462
462
|
U.call(r, f) && !Xe.hasOwnProperty(f) && (s[f] = r[f]);
|
|
463
463
|
if (e && e.defaultProps) {
|
|
@@ -465,20 +465,20 @@ function mr() {
|
|
|
465
465
|
for (f in v)
|
|
466
466
|
s[f] === void 0 && (s[f] = v[f]);
|
|
467
467
|
}
|
|
468
|
-
if (o ||
|
|
468
|
+
if (o || h) {
|
|
469
469
|
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
470
|
-
o && rr(s, p),
|
|
470
|
+
o && rr(s, p), h && tr(s, p);
|
|
471
471
|
}
|
|
472
|
-
return nr(e, o,
|
|
472
|
+
return nr(e, o, h, u, n, A.current, s);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
var
|
|
475
|
+
var G = j.ReactCurrentOwner, Ee = j.ReactDebugCurrentFrame;
|
|
476
476
|
function k(e) {
|
|
477
477
|
if (e) {
|
|
478
478
|
var r = e._owner, t = Y(e.type, e._source, r ? r.type : null);
|
|
479
|
-
|
|
479
|
+
Ee.setExtraStackFrame(t);
|
|
480
480
|
} else
|
|
481
|
-
|
|
481
|
+
Ee.setExtraStackFrame(null);
|
|
482
482
|
}
|
|
483
483
|
var K;
|
|
484
484
|
K = !1;
|
|
@@ -487,8 +487,8 @@ function mr() {
|
|
|
487
487
|
}
|
|
488
488
|
function ye() {
|
|
489
489
|
{
|
|
490
|
-
if (
|
|
491
|
-
var e = w(
|
|
490
|
+
if (G.current) {
|
|
491
|
+
var e = w(G.current.type);
|
|
492
492
|
if (e)
|
|
493
493
|
return `
|
|
494
494
|
|
|
@@ -508,7 +508,7 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
508
508
|
return "";
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
var
|
|
511
|
+
var be = {};
|
|
512
512
|
function ir(e) {
|
|
513
513
|
{
|
|
514
514
|
var r = ye();
|
|
@@ -521,27 +521,27 @@ Check the top-level render call using <` + t + ">.");
|
|
|
521
521
|
return r;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Re(e, r) {
|
|
525
525
|
{
|
|
526
526
|
if (!e._store || e._store.validated || e.key != null)
|
|
527
527
|
return;
|
|
528
528
|
e._store.validated = !0;
|
|
529
529
|
var t = ir(r);
|
|
530
|
-
if (
|
|
530
|
+
if (be[t])
|
|
531
531
|
return;
|
|
532
|
-
|
|
532
|
+
be[t] = !0;
|
|
533
533
|
var n = "";
|
|
534
|
-
e && e._owner && e._owner !==
|
|
534
|
+
e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + w(e._owner.type) + "."), k(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), k(null);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Te(e, r) {
|
|
538
538
|
{
|
|
539
539
|
if (typeof e != "object")
|
|
540
540
|
return;
|
|
541
|
-
if (
|
|
541
|
+
if (q(e))
|
|
542
542
|
for (var t = 0; t < e.length; t++) {
|
|
543
543
|
var n = e[t];
|
|
544
|
-
H(n) &&
|
|
544
|
+
H(n) && Re(n, r);
|
|
545
545
|
}
|
|
546
546
|
else if (H(e))
|
|
547
547
|
e._store && (e._store.validated = !0);
|
|
@@ -549,7 +549,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
549
549
|
var u = De(e);
|
|
550
550
|
if (typeof u == "function" && u !== e.entries)
|
|
551
551
|
for (var f = u.call(e), s; !(s = f.next()).done; )
|
|
552
|
-
H(s.value) &&
|
|
552
|
+
H(s.value) && Re(s.value, r);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
@@ -561,7 +561,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
561
561
|
var t;
|
|
562
562
|
if (typeof r == "function")
|
|
563
563
|
t = r.propTypes;
|
|
564
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
564
|
+
else if (typeof r == "object" && (r.$$typeof === _ || // Note: Memo only checks outer props here.
|
|
565
565
|
// Inner props are checked in the reconciler.
|
|
566
566
|
r.$$typeof === O))
|
|
567
567
|
t = r.propTypes;
|
|
@@ -569,13 +569,13 @@ Check the top-level render call using <` + t + ">.");
|
|
|
569
569
|
return;
|
|
570
570
|
if (t) {
|
|
571
571
|
var n = w(r);
|
|
572
|
-
|
|
572
|
+
Je(t, e.props, "prop", n, e);
|
|
573
573
|
} else if (r.PropTypes !== void 0 && !K) {
|
|
574
574
|
K = !0;
|
|
575
575
|
var u = w(r);
|
|
576
|
-
|
|
576
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
577
577
|
}
|
|
578
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
578
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
function ur(e) {
|
|
@@ -583,23 +583,23 @@ Check the top-level render call using <` + t + ">.");
|
|
|
583
583
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
584
584
|
var n = r[t];
|
|
585
585
|
if (n !== "children" && n !== "key") {
|
|
586
|
-
k(e),
|
|
586
|
+
k(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
|
|
587
587
|
break;
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
e.ref !== null && (k(e),
|
|
590
|
+
e.ref !== null && (k(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Ce(e, r, t, n, u, f) {
|
|
594
594
|
{
|
|
595
595
|
var s = Ye(e);
|
|
596
596
|
if (!s) {
|
|
597
597
|
var o = "";
|
|
598
598
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
599
|
-
var
|
|
600
|
-
|
|
599
|
+
var h = or(u);
|
|
600
|
+
h ? o += h : o += ye();
|
|
601
601
|
var v;
|
|
602
|
-
e === null ? v = "null" :
|
|
602
|
+
e === null ? v = "null" : q(e) ? v = "array" : e !== void 0 && e.$$typeof === a ? (v = "<" + (w(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, o);
|
|
603
603
|
}
|
|
604
604
|
var p = ar(e, r, t, u, f);
|
|
605
605
|
if (p == null)
|
|
@@ -608,23 +608,23 @@ Check the top-level render call using <` + t + ">.");
|
|
|
608
608
|
var R = r.children;
|
|
609
609
|
if (R !== void 0)
|
|
610
610
|
if (n)
|
|
611
|
-
if (
|
|
611
|
+
if (q(R)) {
|
|
612
612
|
for (var I = 0; I < R.length; I++)
|
|
613
|
-
|
|
613
|
+
Te(R[I], e);
|
|
614
614
|
Object.freeze && Object.freeze(R);
|
|
615
615
|
} else
|
|
616
|
-
|
|
616
|
+
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
617
617
|
else
|
|
618
|
-
|
|
618
|
+
Te(R, e);
|
|
619
619
|
}
|
|
620
620
|
return e === c ? ur(p) : sr(p), p;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
function fr(e, r, t) {
|
|
624
|
-
return
|
|
624
|
+
return Ce(e, r, t, !0);
|
|
625
625
|
}
|
|
626
626
|
function cr(e, r, t) {
|
|
627
|
-
return
|
|
627
|
+
return Ce(e, r, t, !1);
|
|
628
628
|
}
|
|
629
629
|
var lr = cr, dr = fr;
|
|
630
630
|
F.Fragment = c, F.jsx = lr, F.jsxs = dr;
|
|
@@ -640,97 +640,103 @@ var $ = {};
|
|
|
640
640
|
* This source code is licensed under the MIT license found in the
|
|
641
641
|
* LICENSE file in the root directory of this source tree.
|
|
642
642
|
*/
|
|
643
|
-
var
|
|
644
|
-
function
|
|
645
|
-
if (
|
|
643
|
+
var Pe;
|
|
644
|
+
function mr() {
|
|
645
|
+
if (Pe)
|
|
646
646
|
return $;
|
|
647
|
-
|
|
648
|
-
var i =
|
|
649
|
-
function b(
|
|
650
|
-
var
|
|
651
|
-
T !== void 0 && (
|
|
652
|
-
for (
|
|
653
|
-
c.call(
|
|
654
|
-
if (
|
|
655
|
-
for (
|
|
656
|
-
O[
|
|
657
|
-
return { $$typeof: a, type:
|
|
647
|
+
Pe = 1;
|
|
648
|
+
var i = xe, a = Symbol.for("react.element"), l = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, E = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
649
|
+
function b(m, _, T) {
|
|
650
|
+
var y, O = {}, P = null, L = null;
|
|
651
|
+
T !== void 0 && (P = "" + T), _.key !== void 0 && (P = "" + _.key), _.ref !== void 0 && (L = _.ref);
|
|
652
|
+
for (y in _)
|
|
653
|
+
c.call(_, y) && !d.hasOwnProperty(y) && (O[y] = _[y]);
|
|
654
|
+
if (m && m.defaultProps)
|
|
655
|
+
for (y in _ = m.defaultProps, _)
|
|
656
|
+
O[y] === void 0 && (O[y] = _[y]);
|
|
657
|
+
return { $$typeof: a, type: m, key: P, ref: L, props: O, _owner: E.current };
|
|
658
658
|
}
|
|
659
659
|
return $.Fragment = l, $.jsx = b, $.jsxs = b, $;
|
|
660
660
|
}
|
|
661
|
-
process.env.NODE_ENV === "production" ? Z.exports =
|
|
661
|
+
process.env.NODE_ENV === "production" ? Z.exports = mr() : Z.exports = hr();
|
|
662
662
|
var Q = Z.exports;
|
|
663
|
-
const
|
|
664
|
-
"toast-container": "_toast-
|
|
665
|
-
"toast-message": "_toast-
|
|
666
|
-
screenRightIn:
|
|
667
|
-
screenCenterIn:
|
|
663
|
+
const Er = "_screenRightIn_1p5ze_1", yr = "_screenCenterIn_1p5ze_1", br = "_screenLeftIn_1p5ze_1", Rr = "_screenOut_1p5ze_1", Tr = "_success_1p5ze_111", Cr = "_info_1p5ze_115", Or = "_warn_1p5ze_120", wr = "_error_1p5ze_124", Sr = "_ghost_1p5ze_129", ee = {
|
|
664
|
+
"toast-container": "_toast-container_1p5ze_5",
|
|
665
|
+
"toast-message": "_toast-message_1p5ze_29",
|
|
666
|
+
screenRightIn: Er,
|
|
667
|
+
screenCenterIn: yr,
|
|
668
668
|
screenLeftIn: br,
|
|
669
|
-
screenOut: Rr
|
|
669
|
+
screenOut: Rr,
|
|
670
|
+
success: Tr,
|
|
671
|
+
info: Cr,
|
|
672
|
+
warn: Or,
|
|
673
|
+
error: wr,
|
|
674
|
+
ghost: Sr
|
|
670
675
|
};
|
|
671
|
-
function
|
|
676
|
+
function Pr({
|
|
672
677
|
message: { duration: i = 1e3 * 7, id: a, text: l, type: c },
|
|
673
|
-
onRemoveMessage:
|
|
678
|
+
onRemoveMessage: E,
|
|
674
679
|
classNames: d
|
|
675
680
|
}) {
|
|
676
|
-
const [b,
|
|
677
|
-
function
|
|
678
|
-
b &&
|
|
681
|
+
const [b, m] = je(!1);
|
|
682
|
+
function _() {
|
|
683
|
+
b && E(a);
|
|
679
684
|
}
|
|
680
|
-
return
|
|
681
|
-
const T = setTimeout(() =>
|
|
685
|
+
return ke(() => {
|
|
686
|
+
const T = setTimeout(() => m(!0), i);
|
|
682
687
|
return () => clearTimeout(T);
|
|
683
|
-
}, [
|
|
688
|
+
}, [E, a, i]), /* @__PURE__ */ Q.jsx(
|
|
684
689
|
"button",
|
|
685
690
|
{
|
|
686
691
|
tabIndex: 0,
|
|
687
|
-
onAnimationEnd:
|
|
688
|
-
onClick: () =>
|
|
689
|
-
style: Cr(d == null ? void 0 : d[c]),
|
|
690
|
-
className: `${ke["toast-message"]} ${Or(d == null ? void 0 : d[c])}`,
|
|
691
|
-
"data-type": c,
|
|
692
|
+
onAnimationEnd: _,
|
|
693
|
+
onClick: () => m(!0),
|
|
692
694
|
"data-animation-end": b,
|
|
695
|
+
style: xr(d == null ? void 0 : d[c]),
|
|
696
|
+
className: `${ee["toast-message"]} ${ee[c]} ${jr(
|
|
697
|
+
d == null ? void 0 : d[c]
|
|
698
|
+
)}`,
|
|
693
699
|
children: l
|
|
694
700
|
}
|
|
695
701
|
);
|
|
696
702
|
}
|
|
697
|
-
function
|
|
703
|
+
function xr(i) {
|
|
698
704
|
if (!(!i || typeof i != "object"))
|
|
699
705
|
return i;
|
|
700
706
|
}
|
|
701
|
-
function
|
|
707
|
+
function jr(i) {
|
|
702
708
|
return !i || typeof i != "string" ? "" : i;
|
|
703
709
|
}
|
|
704
|
-
function
|
|
710
|
+
function Dr({
|
|
705
711
|
classNames: i,
|
|
706
712
|
position: a = "right-top"
|
|
707
713
|
}) {
|
|
708
|
-
const [l, c] =
|
|
714
|
+
const [l, c] = je([]), E = _r((d) => {
|
|
709
715
|
c(
|
|
710
|
-
(b) => b.filter((
|
|
716
|
+
(b) => b.filter((m) => m.id !== d)
|
|
711
717
|
);
|
|
712
718
|
}, []);
|
|
713
|
-
return
|
|
714
|
-
function d({ text: b, duration:
|
|
719
|
+
return ke(() => {
|
|
720
|
+
function d({ text: b, duration: m, type: _ }) {
|
|
715
721
|
c((T) => [
|
|
716
722
|
...T,
|
|
717
|
-
{ id: crypto.randomUUID(), text: b, duration:
|
|
723
|
+
{ id: crypto.randomUUID(), text: b, duration: m, type: _ }
|
|
718
724
|
]);
|
|
719
725
|
}
|
|
720
726
|
return X.on("add-toast", d), () => {
|
|
721
727
|
X.removeListener("add-toast", d);
|
|
722
728
|
};
|
|
723
|
-
}, []), /* @__PURE__ */ Q.jsx("div", { "data-position": a, className:
|
|
724
|
-
|
|
729
|
+
}, []), /* @__PURE__ */ Q.jsx("div", { "data-position": a, className: ee["toast-container"], children: l.map((d) => /* @__PURE__ */ Q.jsx(
|
|
730
|
+
Pr,
|
|
725
731
|
{
|
|
726
732
|
message: d,
|
|
727
733
|
classNames: i,
|
|
728
|
-
onRemoveMessage:
|
|
734
|
+
onRemoveMessage: E
|
|
729
735
|
},
|
|
730
736
|
d.id
|
|
731
737
|
)) });
|
|
732
738
|
}
|
|
733
739
|
export {
|
|
734
|
-
|
|
740
|
+
Dr as ToastContainer,
|
|
735
741
|
C as toast
|
|
736
742
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(y,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],p):(y=typeof globalThis<"u"?globalThis:y||self,p(y["toast-notification"]={},y.React))})(this,function(y,p){"use strict";var yr=Object.defineProperty;var Er=(y,p,
|
|
1
|
+
(function(y,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],p):(y=typeof globalThis<"u"?globalThis:y||self,p(y["toast-notification"]={},y.React))})(this,function(y,p){"use strict";var yr=Object.defineProperty;var Er=(y,p,x)=>p in y?yr(y,p,{enumerable:!0,configurable:!0,writable:!0,value:x}):y[p]=x;var ke=(y,p,x)=>(Er(y,typeof p!="symbol"?p+"":p,x),x);class x{constructor(){ke(this,"listeners",new Map([]))}on(i,g){var c;this.listeners.has(i)||this.listeners.set(i,[]),(c=this.listeners.get(i))==null||c.push(g)}emit(i,g){var c;this.listeners.has(i)&&((c=this.listeners.get(i))==null||c.forEach(b=>b(g)))}removeListener(i,g){const c=this.listeners.get(i);if(!c)return;const b=c.filter(l=>l!==g);this.listeners.set(i,b)}}const J=new x;function O({duration:u,text:i,type:g}){J.emit("add-toast",{duration:u,text:i,type:g})}O.error=({duration:u,text:i})=>O({duration:u,text:i,type:"error"}),O.success=({duration:u,text:i})=>O({duration:u,text:i,type:"success"}),O.warn=({duration:u,text:i})=>O({duration:u,text:i,type:"warn"}),O.info=({duration:u,text:i})=>O({duration:u,text:i,type:"info"}),O.ghost=({duration:u,text:i})=>O({duration:u,text:i,type:"ghost"});var G={exports:{}},L={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
10
|
-
`+
|
|
11
|
-
`),
|
|
12
|
-
`),d=a.length-1,v=
|
|
13
|
-
`+a[d].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"
|
|
9
|
+
*/var ae;function Ie(){return ae||(ae=1,process.env.NODE_ENV!=="production"&&function(){var u=p,i=Symbol.for("react.element"),g=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),E=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),ie=Symbol.iterator,We="@@iterator";function Ye(e){if(e===null||typeof e!="object")return null;var r=ie&&e[ie]||e[We];return typeof r=="function"?r:null}var D=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ue("error",e,t)}}function Ue(e,r,t){{var n=D.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var f=t.map(function(o){return String(o)});f.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,f)}}var Ve=!1,ze=!1,$e=!1,Ne=!1,Be=!1,se;se=Symbol.for("react.module.reference");function Je(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===l||Be||e===b||e===w||e===R||Ne||e===U||Ve||ze||$e||typeof e=="object"&&e!==null&&(e.$$typeof===k||e.$$typeof===S||e.$$typeof===T||e.$$typeof===E||e.$$typeof===_||e.$$typeof===se||e.getModuleId!==void 0))}function Ge(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function ue(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case g:return"Portal";case l:return"Profiler";case b:return"StrictMode";case w:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return ue(r)+".Consumer";case T:var t=e;return ue(t._context)+".Provider";case _:return Ge(e,e.render,"ForwardRef");case S:var n=e.displayName||null;return n!==null?n:P(e.type)||"Memo";case k:{var s=e,f=s._payload,o=s._init;try{return P(o(f))}catch{return null}}}return null}var I=Object.assign,W=0,fe,ce,le,de,ve,pe,_e;function ge(){}ge.__reactDisabledLog=!0;function Ke(){{if(W===0){fe=console.log,ce=console.info,le=console.warn,de=console.error,ve=console.group,pe=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function He(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:fe}),info:I({},e,{value:ce}),warn:I({},e,{value:le}),error:I({},e,{value:de}),group:I({},e,{value:ve}),groupCollapsed:I({},e,{value:pe}),groupEnd:I({},e,{value:_e})})}W<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=D.ReactCurrentDispatcher,q;function V(e,r,t){{if(q===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
|
|
10
|
+
`+q+e}}var Z=!1,z;{var Xe=typeof WeakMap=="function"?WeakMap:Map;z=new Xe}function he(e,r){if(!e||Z)return"";{var t=z.get(e);if(t!==void 0)return t}var n;Z=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=X.current,X.current=null,Ke();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(j){n=j}Reflect.construct(e,[],o)}else{try{o.call()}catch(j){n=j}e.call(o.prototype)}}else{try{throw Error()}catch(j){n=j}e()}}catch(j){if(j&&n&&typeof j.stack=="string"){for(var a=j.stack.split(`
|
|
11
|
+
`),m=n.stack.split(`
|
|
12
|
+
`),d=a.length-1,v=m.length-1;d>=1&&v>=0&&a[d]!==m[v];)v--;for(;d>=1&&v>=0;d--,v--)if(a[d]!==m[v]){if(d!==1||v!==1)do if(d--,v--,v<0||a[d]!==m[v]){var C=`
|
|
13
|
+
`+a[d].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&z.set(e,C),C}while(d>=1&&v>=0);break}}}finally{Z=!1,X.current=f,He(),Error.prepareStackTrace=s}var F=e?e.displayName||e.name:"",xe=F?V(F):"";return typeof e=="function"&&z.set(e,xe),xe}function qe(e,r,t){return he(e,!1)}function Ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function $(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,Ze(e));if(typeof e=="string")return V(e);switch(e){case w:return V("Suspense");case R:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case _:return qe(e.render);case S:return $(e.type,r,t);case k:{var n=e,s=n._payload,f=n._init;try{return $(f(s),r,t)}catch{}}}return""}var N=Object.prototype.hasOwnProperty,me={},ye=D.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=$(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Qe(e,r,t,n,s){{var f=Function.call.bind(N);for(var o in e)if(f(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var m=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){a=d}a&&!(a instanceof Error)&&(B(s),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),B(null)),a instanceof Error&&!(a.message in me)&&(me[a.message]=!0,B(s),h("Failed %s type: %s",t,a.message),B(null))}}}var er=Array.isArray;function Q(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function tr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function be(e){if(tr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),Ee(e)}var Y=D.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Re,Te,ee;ee={};function ar(e){if(N.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(N.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ir(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var t=P(Y.current.type);ee[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(Y.current.type),e.ref),ee[t]=!0)}}function sr(e,r){{var t=function(){Re||(Re=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ur(e,r){{var t=function(){Te||(Te=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var fr=function(e,r,t,n,s,f,o){var a={$$typeof:i,type:e,key:r,ref:t,props:o,_owner:f};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function cr(e,r,t,n,s){{var f,o={},a=null,m=null;t!==void 0&&(be(t),a=""+t),or(r)&&(be(r.key),a=""+r.key),ar(r)&&(m=r.ref,ir(r,s));for(f in r)N.call(r,f)&&!nr.hasOwnProperty(f)&&(o[f]=r[f]);if(e&&e.defaultProps){var d=e.defaultProps;for(f in d)o[f]===void 0&&(o[f]=d[f])}if(a||m){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&sr(o,v),m&&ur(o,v)}return fr(e,a,m,s,n,Y.current,o)}}var re=D.ReactCurrentOwner,Ce=D.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=$(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}var te;te=!1;function ne(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function Oe(){{if(re.current){var e=P(re.current.type);if(e)return`
|
|
14
14
|
|
|
15
15
|
Check the render method of \``+e+"`."}return""}}function lr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+r+":"+t+"."}return""}}var
|
|
17
|
+
Check your code at `+r+":"+t+"."}return""}}var we={};function dr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
19
|
+
Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=dr(r);if(we[t])return;we[t]=!0;var n="";e&&e._owner&&e._owner!==re.current&&(n=" It was passed a child from "+P(e._owner.type)+"."),A(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Pe(e,r){{if(typeof e!="object")return;if(Q(e))for(var t=0;t<e.length;t++){var n=e[t];ne(n)&&Se(n,r)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var s=Ye(e);if(typeof s=="function"&&s!==e.entries)for(var f=s.call(e),o;!(o=f.next()).done;)ne(o.value)&&Se(o.value,r)}}}function vr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===_||r.$$typeof===S))t=r.propTypes;else return;if(t){var n=P(r);Qe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!te){te=!0;var s=P(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function je(e,r,t,n,s,f){{var o=Je(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var m=lr(s);m?a+=m:a+=Oe();var d;e===null?d="null":Q(e)?d="array":e!==void 0&&e.$$typeof===i?(d="<"+(P(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,a)}var v=cr(e,r,t,s,f);if(v==null)return v;if(o){var C=r.children;if(C!==void 0)if(n)if(Q(C)){for(var F=0;F<C.length;F++)Pe(C[F],e);Object.freeze&&Object.freeze(C)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pe(C,e)}return e===c?pr(v):vr(v),v}}function _r(e,r,t){return je(e,r,t,!0)}function gr(e,r,t){return je(e,r,t,!1)}var hr=gr,mr=_r;L.Fragment=c,L.jsx=hr,L.jsxs=mr}()),L}var M={};/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
22
22
|
*
|
|
@@ -24,4 +24,4 @@ Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var
|
|
27
|
+
*/var oe;function De(){if(oe)return M;oe=1;var u=p,i=Symbol.for("react.element"),g=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,b=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function T(E,_,w){var R,S={},k=null,U=null;w!==void 0&&(k=""+w),_.key!==void 0&&(k=""+_.key),_.ref!==void 0&&(U=_.ref);for(R in _)c.call(_,R)&&!l.hasOwnProperty(R)&&(S[R]=_[R]);if(E&&E.defaultProps)for(R in _=E.defaultProps,_)S[R]===void 0&&(S[R]=_[R]);return{$$typeof:i,type:E,key:k,ref:U,props:S,_owner:b.current}}return M.Fragment=g,M.jsx=T,M.jsxs=T,M}process.env.NODE_ENV==="production"?G.exports=De():G.exports=Ie();var K=G.exports;const H={"toast-container":"_toast-container_1p5ze_5","toast-message":"_toast-message_1p5ze_29",screenRightIn:"_screenRightIn_1p5ze_1",screenCenterIn:"_screenCenterIn_1p5ze_1",screenLeftIn:"_screenLeftIn_1p5ze_1",screenOut:"_screenOut_1p5ze_1",success:"_success_1p5ze_111",info:"_info_1p5ze_115",warn:"_warn_1p5ze_120",error:"_error_1p5ze_124",ghost:"_ghost_1p5ze_129"};function Ae({message:{duration:u=1e3*7,id:i,text:g,type:c},onRemoveMessage:b,classNames:l}){const[T,E]=p.useState(!1);function _(){T&&b(i)}return p.useEffect(()=>{const w=setTimeout(()=>E(!0),u);return()=>clearTimeout(w)},[b,i,u]),K.jsx("button",{tabIndex:0,onAnimationEnd:_,onClick:()=>E(!0),"data-animation-end":T,style:Fe(l==null?void 0:l[c]),className:`${H["toast-message"]} ${H[c]} ${Le(l==null?void 0:l[c])}`,children:g})}function Fe(u){if(!(!u||typeof u!="object"))return u}function Le(u){return!u||typeof u!="string"?"":u}function Me({classNames:u,position:i="right-top"}){const[g,c]=p.useState([]),b=p.useCallback(l=>{c(T=>T.filter(E=>E.id!==l))},[]);return p.useEffect(()=>{function l({text:T,duration:E,type:_}){c(w=>[...w,{id:crypto.randomUUID(),text:T,duration:E,type:_}])}return J.on("add-toast",l),()=>{J.removeListener("add-toast",l)}},[]),K.jsx("div",{"data-position":i,className:H["toast-container"],children:g.map(l=>K.jsx(Ae,{message:l,classNames:u,onRemoveMessage:b},l.id))})}y.ToastContainer=Me,y.toast=O,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|