react-toast-master 3.0.0 → 3.0.1

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/dist/index.es.js CHANGED
@@ -1,653 +1,28 @@
1
- import Oe, { useContext as Xe, createContext as Ze, forwardRef as Qe, createElement as Re, useState as Tr, useRef as Ce, useEffect as Ee, useCallback as z } from "react";
2
- var Se = { exports: {} }, oe = {};
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var qe;
13
- function Rr() {
14
- if (qe) return oe;
15
- qe = 1;
16
- var r = Oe, s = Symbol.for("react.element"), d = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, C = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function j(p, i, w) {
18
- var h, T = {}, D = null, M = null;
19
- w !== void 0 && (D = "" + w), i.key !== void 0 && (D = "" + i.key), i.ref !== void 0 && (M = i.ref);
20
- for (h in i) l.call(i, h) && !x.hasOwnProperty(h) && (T[h] = i[h]);
21
- if (p && p.defaultProps) for (h in i = p.defaultProps, i) T[h] === void 0 && (T[h] = i[h]);
22
- return { $$typeof: s, type: p, key: D, ref: M, props: T, _owner: C.current };
23
- }
24
- return oe.Fragment = d, oe.jsx = j, oe.jsxs = j, oe;
25
- }
26
- var se = {};
27
- /**
28
- * @license React
29
- * react-jsx-runtime.development.js
30
- *
31
- * Copyright (c) Facebook, Inc. and its affiliates.
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE file in the root directory of this source tree.
35
- */
36
- var Ge;
37
- function Sr() {
38
- return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
39
- var r = Oe, s = Symbol.for("react.element"), d = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), p = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), M = Symbol.for("react.offscreen"), o = Symbol.iterator, m = "@@iterator";
40
- function v(e) {
41
- if (e === null || typeof e != "object")
42
- return null;
43
- var t = o && e[o] || e[m];
44
- return typeof t == "function" ? t : null;
45
- }
46
- var R = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function y(e) {
48
- {
49
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
50
- n[c - 1] = arguments[c];
51
- N("error", e, n);
52
- }
53
- }
54
- function N(e, t, n) {
55
- {
56
- var c = R.ReactDebugCurrentFrame, _ = c.getStackAddendum();
57
- _ !== "" && (t += "%s", n = n.concat([_]));
58
- var g = n.map(function(f) {
59
- return String(f);
60
- });
61
- g.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, g);
62
- }
63
- }
64
- var V = !1, q = !1, re = !1, te = !1, H = !1, U;
65
- U = Symbol.for("react.module.reference");
66
- function ge(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === l || e === x || H || e === C || e === w || e === h || te || e === M || V || q || re || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === T || e.$$typeof === j || e.$$typeof === p || e.$$typeof === i || // This needs to include all possible module reference object
68
- // types supported by any Flight configuration anywhere since
69
- // we don't know which Flight build this will end up being used
70
- // with.
71
- e.$$typeof === U || e.getModuleId !== void 0));
72
- }
73
- function pe(e, t, n) {
74
- var c = e.displayName;
75
- if (c)
76
- return c;
77
- var _ = t.displayName || t.name || "";
78
- return _ !== "" ? n + "(" + _ + ")" : n;
79
- }
80
- function ne(e) {
81
- return e.displayName || "Context";
82
- }
83
- function B(e) {
84
- if (e == null)
85
- return null;
86
- if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
- return e.displayName || e.name || null;
88
- if (typeof e == "string")
89
- return e;
90
- switch (e) {
91
- case l:
92
- return "Fragment";
93
- case d:
94
- return "Portal";
95
- case x:
96
- return "Profiler";
97
- case C:
98
- return "StrictMode";
99
- case w:
100
- return "Suspense";
101
- case h:
102
- return "SuspenseList";
103
- }
104
- if (typeof e == "object")
105
- switch (e.$$typeof) {
106
- case p:
107
- var t = e;
108
- return ne(t) + ".Consumer";
109
- case j:
110
- var n = e;
111
- return ne(n._context) + ".Provider";
112
- case i:
113
- return pe(e, e.render, "ForwardRef");
114
- case T:
115
- var c = e.displayName || null;
116
- return c !== null ? c : B(e.type) || "Memo";
117
- case D: {
118
- var _ = e, g = _._payload, f = _._init;
119
- try {
120
- return B(f(g));
121
- } catch {
122
- return null;
123
- }
124
- }
125
- }
126
- return null;
127
- }
128
- var S = Object.assign, G = 0, ie, ce, le, ue, de, fe, J;
129
- function A() {
130
- }
131
- A.__reactDisabledLog = !0;
132
- function Y() {
133
- {
134
- if (G === 0) {
135
- ie = console.log, ce = console.info, le = console.warn, ue = console.error, de = console.group, fe = console.groupCollapsed, J = console.groupEnd;
136
- var e = {
137
- configurable: !0,
138
- enumerable: !0,
139
- value: A,
140
- writable: !0
141
- };
142
- Object.defineProperties(console, {
143
- info: e,
144
- log: e,
145
- warn: e,
146
- error: e,
147
- group: e,
148
- groupCollapsed: e,
149
- groupEnd: e
150
- });
151
- }
152
- G++;
153
- }
154
- }
155
- function W() {
156
- {
157
- if (G--, G === 0) {
158
- var e = {
159
- configurable: !0,
160
- enumerable: !0,
161
- writable: !0
162
- };
163
- Object.defineProperties(console, {
164
- log: S({}, e, {
165
- value: ie
166
- }),
167
- info: S({}, e, {
168
- value: ce
169
- }),
170
- warn: S({}, e, {
171
- value: le
172
- }),
173
- error: S({}, e, {
174
- value: ue
175
- }),
176
- group: S({}, e, {
177
- value: de
178
- }),
179
- groupCollapsed: S({}, e, {
180
- value: fe
181
- }),
182
- groupEnd: S({}, e, {
183
- value: J
184
- })
185
- });
186
- }
187
- G < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
- }
189
- }
190
- var O = R.ReactCurrentDispatcher, L;
191
- function X(e, t, n) {
192
- {
193
- if (L === void 0)
194
- try {
195
- throw Error();
196
- } catch (_) {
197
- var c = _.stack.trim().match(/\n( *(at )?)/);
198
- L = c && c[1] || "";
199
- }
200
- return `
201
- ` + L + e;
202
- }
203
- }
204
- var ve = !1, _e;
205
- {
206
- var tr = typeof WeakMap == "function" ? WeakMap : Map;
207
- _e = new tr();
208
- }
209
- function $e(e, t) {
210
- if (!e || ve)
211
- return "";
212
- {
213
- var n = _e.get(e);
214
- if (n !== void 0)
215
- return n;
216
- }
217
- var c;
218
- ve = !0;
219
- var _ = Error.prepareStackTrace;
220
- Error.prepareStackTrace = void 0;
221
- var g;
222
- g = O.current, O.current = null, Y();
223
- try {
224
- if (t) {
225
- var f = function() {
226
- throw Error();
227
- };
228
- if (Object.defineProperty(f.prototype, "props", {
229
- set: function() {
230
- throw Error();
231
- }
232
- }), typeof Reflect == "object" && Reflect.construct) {
233
- try {
234
- Reflect.construct(f, []);
235
- } catch (F) {
236
- c = F;
237
- }
238
- Reflect.construct(e, [], f);
239
- } else {
240
- try {
241
- f.call();
242
- } catch (F) {
243
- c = F;
244
- }
245
- e.call(f.prototype);
246
- }
247
- } else {
248
- try {
249
- throw Error();
250
- } catch (F) {
251
- c = F;
252
- }
253
- e();
254
- }
255
- } catch (F) {
256
- if (F && c && typeof F.stack == "string") {
257
- for (var u = F.stack.split(`
258
- `), $ = c.stack.split(`
259
- `), b = u.length - 1, k = $.length - 1; b >= 1 && k >= 0 && u[b] !== $[k]; )
260
- k--;
261
- for (; b >= 1 && k >= 0; b--, k--)
262
- if (u[b] !== $[k]) {
263
- if (b !== 1 || k !== 1)
264
- do
265
- if (b--, k--, k < 0 || u[b] !== $[k]) {
266
- var I = `
267
- ` + u[b].replace(" at new ", " at ");
268
- return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && _e.set(e, I), I;
269
- }
270
- while (b >= 1 && k >= 0);
271
- break;
272
- }
273
- }
274
- } finally {
275
- ve = !1, O.current = g, W(), Error.prepareStackTrace = _;
276
- }
277
- var Q = e ? e.displayName || e.name : "", K = Q ? X(Q) : "";
278
- return typeof e == "function" && _e.set(e, K), K;
279
- }
280
- function nr(e, t, n) {
281
- return $e(e, !1);
282
- }
283
- function ar(e) {
284
- var t = e.prototype;
285
- return !!(t && t.isReactComponent);
286
- }
287
- function he(e, t, n) {
288
- if (e == null)
289
- return "";
290
- if (typeof e == "function")
291
- return $e(e, ar(e));
292
- if (typeof e == "string")
293
- return X(e);
294
- switch (e) {
295
- case w:
296
- return X("Suspense");
297
- case h:
298
- return X("SuspenseList");
299
- }
300
- if (typeof e == "object")
301
- switch (e.$$typeof) {
302
- case i:
303
- return nr(e.render);
304
- case T:
305
- return he(e.type, t, n);
306
- case D: {
307
- var c = e, _ = c._payload, g = c._init;
308
- try {
309
- return he(g(_), t, n);
310
- } catch {
311
- }
312
- }
313
- }
314
- return "";
315
- }
316
- var ae = Object.prototype.hasOwnProperty, Pe = {}, De = R.ReactDebugCurrentFrame;
317
- function me(e) {
318
- if (e) {
319
- var t = e._owner, n = he(e.type, e._source, t ? t.type : null);
320
- De.setExtraStackFrame(n);
321
- } else
322
- De.setExtraStackFrame(null);
323
- }
324
- function or(e, t, n, c, _) {
325
- {
326
- var g = Function.call.bind(ae);
327
- for (var f in e)
328
- if (g(e, f)) {
329
- var u = void 0;
330
- try {
331
- if (typeof e[f] != "function") {
332
- var $ = Error((c || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw $.name = "Invariant Violation", $;
334
- }
335
- u = e[f](t, f, c, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (b) {
337
- u = b;
338
- }
339
- u && !(u instanceof Error) && (me(_), y("%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).", c || "React class", n, f, typeof u), me(null)), u instanceof Error && !(u.message in Pe) && (Pe[u.message] = !0, me(_), y("Failed %s type: %s", n, u.message), me(null));
340
- }
341
- }
342
- }
343
- var sr = Array.isArray;
344
- function ye(e) {
345
- return sr(e);
346
- }
347
- function ir(e) {
348
- {
349
- var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
- return n;
351
- }
352
- }
353
- function cr(e) {
354
- try {
355
- return Fe(e), !1;
356
- } catch {
357
- return !0;
358
- }
359
- }
360
- function Fe(e) {
361
- return "" + e;
362
- }
363
- function Ae(e) {
364
- if (cr(e))
365
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), Fe(e);
366
- }
367
- var Ne = R.ReactCurrentOwner, lr = {
368
- key: !0,
369
- ref: !0,
370
- __self: !0,
371
- __source: !0
372
- }, Ie, Me;
373
- function ur(e) {
374
- if (ae.call(e, "ref")) {
375
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
376
- if (t && t.isReactWarning)
377
- return !1;
378
- }
379
- return e.ref !== void 0;
380
- }
381
- function dr(e) {
382
- if (ae.call(e, "key")) {
383
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
384
- if (t && t.isReactWarning)
385
- return !1;
386
- }
387
- return e.key !== void 0;
388
- }
389
- function fr(e, t) {
390
- typeof e.ref == "string" && Ne.current;
391
- }
392
- function _r(e, t) {
393
- {
394
- var n = function() {
395
- Ie || (Ie = !0, y("%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)", t));
396
- };
397
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
398
- get: n,
399
- configurable: !0
400
- });
401
- }
402
- }
403
- function hr(e, t) {
404
- {
405
- var n = function() {
406
- Me || (Me = !0, y("%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)", t));
407
- };
408
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
- get: n,
410
- configurable: !0
411
- });
412
- }
413
- }
414
- var mr = function(e, t, n, c, _, g, f) {
415
- var u = {
416
- // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: s,
418
- // Built-in properties that belong on the element
419
- type: e,
420
- key: t,
421
- ref: n,
422
- props: f,
423
- // Record the component responsible for creating this element.
424
- _owner: g
425
- };
426
- return u._store = {}, Object.defineProperty(u._store, "validated", {
427
- configurable: !1,
428
- enumerable: !1,
429
- writable: !0,
430
- value: !1
431
- }), Object.defineProperty(u, "_self", {
432
- configurable: !1,
433
- enumerable: !1,
434
- writable: !1,
435
- value: c
436
- }), Object.defineProperty(u, "_source", {
437
- configurable: !1,
438
- enumerable: !1,
439
- writable: !1,
440
- value: _
441
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
442
- };
443
- function gr(e, t, n, c, _) {
444
- {
445
- var g, f = {}, u = null, $ = null;
446
- n !== void 0 && (Ae(n), u = "" + n), dr(t) && (Ae(t.key), u = "" + t.key), ur(t) && ($ = t.ref, fr(t, _));
447
- for (g in t)
448
- ae.call(t, g) && !lr.hasOwnProperty(g) && (f[g] = t[g]);
449
- if (e && e.defaultProps) {
450
- var b = e.defaultProps;
451
- for (g in b)
452
- f[g] === void 0 && (f[g] = b[g]);
453
- }
454
- if (u || $) {
455
- var k = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- u && _r(f, k), $ && hr(f, k);
457
- }
458
- return mr(e, u, $, _, c, Ne.current, f);
459
- }
460
- }
461
- var we = R.ReactCurrentOwner, We = R.ReactDebugCurrentFrame;
462
- function Z(e) {
463
- if (e) {
464
- var t = e._owner, n = he(e.type, e._source, t ? t.type : null);
465
- We.setExtraStackFrame(n);
466
- } else
467
- We.setExtraStackFrame(null);
468
- }
469
- var be;
470
- be = !1;
471
- function xe(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === s;
473
- }
474
- function Le() {
475
- {
476
- if (we.current) {
477
- var e = B(we.current.type);
478
- if (e)
479
- return `
480
-
481
- Check the render method of \`` + e + "`.";
482
- }
483
- return "";
484
- }
485
- }
486
- function pr(e) {
487
- return "";
488
- }
489
- var Be = {};
490
- function vr(e) {
491
- {
492
- var t = Le();
493
- if (!t) {
494
- var n = typeof e == "string" ? e : e.displayName || e.name;
495
- n && (t = `
496
-
497
- Check the top-level render call using <` + n + ">.");
498
- }
499
- return t;
500
- }
501
- }
502
- function Ye(e, t) {
503
- {
504
- if (!e._store || e._store.validated || e.key != null)
505
- return;
506
- e._store.validated = !0;
507
- var n = vr(t);
508
- if (Be[n])
509
- return;
510
- Be[n] = !0;
511
- var c = "";
512
- e && e._owner && e._owner !== we.current && (c = " It was passed a child from " + B(e._owner.type) + "."), Z(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, c), Z(null);
513
- }
514
- }
515
- function Ve(e, t) {
516
- {
517
- if (typeof e != "object")
518
- return;
519
- if (ye(e))
520
- for (var n = 0; n < e.length; n++) {
521
- var c = e[n];
522
- xe(c) && Ye(c, t);
523
- }
524
- else if (xe(e))
525
- e._store && (e._store.validated = !0);
526
- else if (e) {
527
- var _ = v(e);
528
- if (typeof _ == "function" && _ !== e.entries)
529
- for (var g = _.call(e), f; !(f = g.next()).done; )
530
- xe(f.value) && Ye(f.value, t);
531
- }
532
- }
533
- }
534
- function yr(e) {
535
- {
536
- var t = e.type;
537
- if (t == null || typeof t == "string")
538
- return;
539
- var n;
540
- if (typeof t == "function")
541
- n = t.propTypes;
542
- else if (typeof t == "object" && (t.$$typeof === i || // Note: Memo only checks outer props here.
543
- // Inner props are checked in the reconciler.
544
- t.$$typeof === T))
545
- n = t.propTypes;
546
- else
547
- return;
548
- if (n) {
549
- var c = B(t);
550
- or(n, e.props, "prop", c, e);
551
- } else if (t.PropTypes !== void 0 && !be) {
552
- be = !0;
553
- var _ = B(t);
554
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
555
- }
556
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
- }
558
- }
559
- function wr(e) {
560
- {
561
- for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
562
- var c = t[n];
563
- if (c !== "children" && c !== "key") {
564
- Z(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), Z(null);
565
- break;
566
- }
567
- }
568
- e.ref !== null && (Z(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
569
- }
570
- }
571
- var ze = {};
572
- function Ue(e, t, n, c, _, g) {
573
- {
574
- var f = ge(e);
575
- if (!f) {
576
- var u = "";
577
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
- var $ = pr();
579
- $ ? u += $ : u += Le();
580
- var b;
581
- e === null ? b = "null" : ye(e) ? b = "array" : e !== void 0 && e.$$typeof === s ? (b = "<" + (B(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, u);
582
- }
583
- var k = gr(e, t, n, _, g);
584
- if (k == null)
585
- return k;
586
- if (f) {
587
- var I = t.children;
588
- if (I !== void 0)
589
- if (c)
590
- if (ye(I)) {
591
- for (var Q = 0; Q < I.length; Q++)
592
- Ve(I[Q], e);
593
- Object.freeze && Object.freeze(I);
594
- } else
595
- y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
- else
597
- Ve(I, e);
598
- }
599
- if (ae.call(t, "key")) {
600
- var K = B(e), F = Object.keys(t).filter(function(jr) {
601
- return jr !== "key";
602
- }), ke = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!ze[K + ke]) {
604
- var Er = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
605
- y(`A props object containing a "key" prop is being spread into JSX:
606
- let props = %s;
607
- <%s {...props} />
608
- React keys must be passed directly to JSX without using spread:
609
- let props = %s;
610
- <%s key={someKey} {...props} />`, ke, K, Er, K), ze[K + ke] = !0;
611
- }
612
- }
613
- return e === l ? wr(k) : yr(k), k;
614
- }
615
- }
616
- function br(e, t, n) {
617
- return Ue(e, t, n, !0);
618
- }
619
- function xr(e, t, n) {
620
- return Ue(e, t, n, !1);
621
- }
622
- var kr = xr, Cr = br;
623
- se.Fragment = l, se.jsx = kr, se.jsxs = Cr;
624
- }()), se;
625
- }
626
- process.env.NODE_ENV === "production" ? Se.exports = Rr() : Se.exports = Sr();
627
- var a = Se.exports;
1
+ import { jsx as o, jsxs as l, Fragment as z } from "react/jsx-runtime";
2
+ import ue, { useContext as U, createContext as Z, forwardRef as Y, createElement as H, useState as _e, useRef as O, useEffect as R, useCallback as x } from "react";
628
3
  /**
629
4
  * @license lucide-react v1.17.0 - ISC
630
5
  *
631
6
  * This source code is licensed under the ISC license.
632
7
  * See the LICENSE file in the root directory of this source tree.
633
8
  */
634
- const er = (...r) => r.filter((s, d, l) => !!s && s.trim() !== "" && l.indexOf(s) === d).join(" ").trim();
9
+ const J = (...e) => e.filter((n, s, r) => !!n && n.trim() !== "" && r.indexOf(n) === s).join(" ").trim();
635
10
  /**
636
11
  * @license lucide-react v1.17.0 - ISC
637
12
  *
638
13
  * This source code is licensed under the ISC license.
639
14
  * See the LICENSE file in the root directory of this source tree.
640
15
  */
641
- const Or = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
16
+ const he = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
642
17
  /**
643
18
  * @license lucide-react v1.17.0 - ISC
644
19
  *
645
20
  * This source code is licensed under the ISC license.
646
21
  * See the LICENSE file in the root directory of this source tree.
647
22
  */
648
- const $r = (r) => r.replace(
23
+ const fe = (e) => e.replace(
649
24
  /^([A-Z])|[\s-_]+(\w)/g,
650
- (s, d, l) => l ? l.toUpperCase() : d.toLowerCase()
25
+ (n, s, r) => r ? r.toUpperCase() : s.toLowerCase()
651
26
  );
652
27
  /**
653
28
  * @license lucide-react v1.17.0 - ISC
@@ -655,9 +30,9 @@ const $r = (r) => r.replace(
655
30
  * This source code is licensed under the ISC license.
656
31
  * See the LICENSE file in the root directory of this source tree.
657
32
  */
658
- const Ke = (r) => {
659
- const s = $r(r);
660
- return s.charAt(0).toUpperCase() + s.slice(1);
33
+ const K = (e) => {
34
+ const n = fe(e);
35
+ return n.charAt(0).toUpperCase() + n.slice(1);
661
36
  };
662
37
  /**
663
38
  * @license lucide-react v1.17.0 - ISC
@@ -665,7 +40,7 @@ const Ke = (r) => {
665
40
  * This source code is licensed under the ISC license.
666
41
  * See the LICENSE file in the root directory of this source tree.
667
42
  */
668
- var je = {
43
+ var P = {
669
44
  xmlns: "http://www.w3.org/2000/svg",
670
45
  width: 24,
671
46
  height: 24,
@@ -682,36 +57,36 @@ var je = {
682
57
  * This source code is licensed under the ISC license.
683
58
  * See the LICENSE file in the root directory of this source tree.
684
59
  */
685
- const Pr = (r) => {
686
- for (const s in r)
687
- if (s.startsWith("aria-") || s === "role" || s === "title")
60
+ const me = (e) => {
61
+ for (const n in e)
62
+ if (n.startsWith("aria-") || n === "role" || n === "title")
688
63
  return !0;
689
64
  return !1;
690
- }, Dr = Ze({}), Fr = () => Xe(Dr), Ar = Qe(
691
- ({ color: r, size: s, strokeWidth: d, absoluteStrokeWidth: l, className: C = "", children: x, iconNode: j, ...p }, i) => {
65
+ }, ge = Z({}), we = () => U(ge), ye = Y(
66
+ ({ color: e, size: n, strokeWidth: s, absoluteStrokeWidth: r, className: m = "", children: _, iconNode: y, ...d }, i) => {
692
67
  const {
693
- size: w = 24,
68
+ size: g = 24,
694
69
  strokeWidth: h = 2,
695
- absoluteStrokeWidth: T = !1,
696
- color: D = "currentColor",
697
- className: M = ""
698
- } = Fr() ?? {}, o = l ?? T ? Number(d ?? h) * 24 / Number(s ?? w) : d ?? h;
699
- return Re(
70
+ absoluteStrokeWidth: D = !1,
71
+ color: F = "currentColor",
72
+ className: S = ""
73
+ } = we() ?? {}, t = r ?? D ? Number(s ?? h) * 24 / Number(n ?? g) : s ?? h;
74
+ return H(
700
75
  "svg",
701
76
  {
702
77
  ref: i,
703
- ...je,
704
- width: s ?? w ?? je.width,
705
- height: s ?? w ?? je.height,
706
- stroke: r ?? D,
707
- strokeWidth: o,
708
- className: er("lucide", M, C),
709
- ...!x && !Pr(p) && { "aria-hidden": "true" },
710
- ...p
78
+ ...P,
79
+ width: n ?? g ?? P.width,
80
+ height: n ?? g ?? P.height,
81
+ stroke: e ?? F,
82
+ strokeWidth: t,
83
+ className: J("lucide", S, m),
84
+ ...!_ && !me(d) && { "aria-hidden": "true" },
85
+ ...d
711
86
  },
712
87
  [
713
- ...j.map(([m, v]) => Re(m, v)),
714
- ...Array.isArray(x) ? x : [x]
88
+ ...y.map(([a, c]) => H(a, c)),
89
+ ...Array.isArray(_) ? _ : [_]
715
90
  ]
716
91
  );
717
92
  }
@@ -722,20 +97,20 @@ const Pr = (r) => {
722
97
  * This source code is licensed under the ISC license.
723
98
  * See the LICENSE file in the root directory of this source tree.
724
99
  */
725
- const ee = (r, s) => {
726
- const d = Qe(
727
- ({ className: l, ...C }, x) => Re(Ar, {
728
- ref: x,
729
- iconNode: s,
730
- className: er(
731
- `lucide-${Or(Ke(r))}`,
732
- `lucide-${r}`,
733
- l
100
+ const B = (e, n) => {
101
+ const s = Y(
102
+ ({ className: r, ...m }, _) => H(ye, {
103
+ ref: _,
104
+ iconNode: n,
105
+ className: J(
106
+ `lucide-${he(K(e))}`,
107
+ `lucide-${e}`,
108
+ r
734
109
  ),
735
- ...C
110
+ ...m
736
111
  })
737
112
  );
738
- return d.displayName = Ke(r), d;
113
+ return s.displayName = K(e), s;
739
114
  };
740
115
  /**
741
116
  * @license lucide-react v1.17.0 - ISC
@@ -743,17 +118,17 @@ const ee = (r, s) => {
743
118
  * This source code is licensed under the ISC license.
744
119
  * See the LICENSE file in the root directory of this source tree.
745
120
  */
746
- const Nr = [
121
+ const ke = [
747
122
  ["path", { d: "M18 6 7 17l-5-5", key: "116fxf" }],
748
123
  ["path", { d: "m22 10-7.5 7.5L13 16", key: "ke71qq" }]
749
- ], Ir = ee("check-check", Nr);
124
+ ], pe = B("check-check", ke);
750
125
  /**
751
126
  * @license lucide-react v1.17.0 - ISC
752
127
  *
753
128
  * This source code is licensed under the ISC license.
754
129
  * See the LICENSE file in the root directory of this source tree.
755
130
  */
756
- const Mr = [
131
+ const be = [
757
132
  ["path", { d: "M10.1 2.182a10 10 0 0 1 3.8 0", key: "5ilxe3" }],
758
133
  ["path", { d: "M13.9 21.818a10 10 0 0 1-3.8 0", key: "11zvb9" }],
759
134
  ["path", { d: "M17.609 3.721a10 10 0 0 1 2.69 2.7", key: "1iw5b2" }],
@@ -762,36 +137,36 @@ const Mr = [
762
137
  ["path", { d: "M21.818 10.1a10 10 0 0 1 0 3.8", key: "qkgqxc" }],
763
138
  ["path", { d: "M3.721 6.391a10 10 0 0 1 2.7-2.69", key: "1mcia2" }],
764
139
  ["path", { d: "M6.391 20.279a10 10 0 0 1-2.69-2.7", key: "1fvljs" }]
765
- ], Wr = ee("circle-dashed", Mr);
140
+ ], xe = B("circle-dashed", be);
766
141
  /**
767
142
  * @license lucide-react v1.17.0 - ISC
768
143
  *
769
144
  * This source code is licensed under the ISC license.
770
145
  * See the LICENSE file in the root directory of this source tree.
771
146
  */
772
- const Lr = [
147
+ const Ce = [
773
148
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
774
149
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
775
150
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
776
- ], Br = ee("circle-x", Lr);
151
+ ], ve = B("circle-x", Ce);
777
152
  /**
778
153
  * @license lucide-react v1.17.0 - ISC
779
154
  *
780
155
  * This source code is licensed under the ISC license.
781
156
  * See the LICENSE file in the root directory of this source tree.
782
157
  */
783
- const Yr = [
158
+ const $e = [
784
159
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
785
160
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
786
161
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
787
- ], Vr = ee("info", Yr);
162
+ ], Te = B("info", $e);
788
163
  /**
789
164
  * @license lucide-react v1.17.0 - ISC
790
165
  *
791
166
  * This source code is licensed under the ISC license.
792
167
  * See the LICENSE file in the root directory of this source tree.
793
168
  */
794
- const zr = [
169
+ const Ne = [
795
170
  ["path", { d: "M12 17v5", key: "bb1du9" }],
796
171
  [
797
172
  "path",
@@ -800,17 +175,17 @@ const zr = [
800
175
  key: "1nkz8b"
801
176
  }
802
177
  ]
803
- ], Ur = ee("pin", zr);
178
+ ], Me = B("pin", Ne);
804
179
  /**
805
180
  * @license lucide-react v1.17.0 - ISC
806
181
  *
807
182
  * This source code is licensed under the ISC license.
808
183
  * See the LICENSE file in the root directory of this source tree.
809
184
  */
810
- const qr = [
185
+ const De = [
811
186
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
812
187
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
813
- ], He = ee("x", qr), P = {
188
+ ], V = B("x", De), f = {
814
189
  // Text color classes for different toast types
815
190
  textClasses: {
816
191
  success: "text_success",
@@ -908,7 +283,7 @@ const qr = [
908
283
  twoXl: "rounded_2xl",
909
284
  full: "rounded_full"
910
285
  }
911
- }, E = {
286
+ }, u = {
912
287
  // Types that auto-hide
913
288
  autoHideTypes: [
914
289
  "success",
@@ -947,7 +322,7 @@ const qr = [
947
322
  loadingFooterDelay: 5330,
948
323
  loadingCloseButtonDelay: 5e3
949
324
  }
950
- }, Gr = ({ footer: r, toastAlignment: s, toastBG: d }) => /* @__PURE__ */ a.jsx("div", { className: `_footer toast_width ${s} ${Kr[d]}`, children: r }), Kr = {
325
+ }, Fe = ({ footer: e, toastAlignment: n, toastBG: s }) => /* @__PURE__ */ o("div", { className: `_footer toast_width ${n} ${Se[s]}`, children: e }), Se = {
951
326
  dark: "footer_dark",
952
327
  warning: "footer_dark",
953
328
  white: "footer_white",
@@ -957,7 +332,7 @@ const qr = [
957
332
  gray: "footer_success",
958
333
  glass: "footer_success",
959
334
  transparent: "footer_success"
960
- }, Je = ({ footer: r, toastAlignment: s, toastBG: d }) => /* @__PURE__ */ a.jsx("div", { className: `innerFooter ${s} ${Hr[d]}`, children: r }), Hr = {
335
+ }, X = ({ footer: e, toastAlignment: n, toastBG: s }) => /* @__PURE__ */ o("div", { className: `innerFooter ${n} ${Be[s]}`, children: e }), Be = {
961
336
  dark: "footer_dark",
962
337
  warning: "footer_dark",
963
338
  white: "footer_white",
@@ -967,7 +342,7 @@ const qr = [
967
342
  gray: "footer_success",
968
343
  glass: "footer_success",
969
344
  transparent: "footer_success"
970
- }, Jr = ({ toastAlignment: r, toastBG: s, loadFooter: d }) => /* @__PURE__ */ a.jsx("div", { className: `_footer toast_width reveal_ani ${r} ${Xr[s]}`, children: d }), Xr = {
345
+ }, Le = ({ toastAlignment: e, toastBG: n, loadFooter: s }) => /* @__PURE__ */ o("div", { className: `_footer toast_width reveal_ani ${e} ${Ae[n]}`, children: s }), Ae = {
971
346
  dark: "footer_dark",
972
347
  warning: "footer_dark",
973
348
  white: "footer_white",
@@ -977,62 +352,62 @@ const qr = [
977
352
  gray: "footer_success",
978
353
  glass: "footer_success",
979
354
  transparent: "footer_success"
980
- }, Zr = ({ toast: r, onHide: s, onConfirm: d, onCancel: l, onMouseEnter: C, onMouseLeave: x, setToasts: j }) => {
981
- const p = Object.keys(P.positionClasses).find(
982
- (o) => P.positionClasses[o] === r.position
983
- ), i = Object.keys(P.backgroundClasses).find(
984
- (o) => P.backgroundClasses[o] === r.background
985
- ), w = p === "bottomFull" || p === "topFull", h = E.overlayTypes.includes(r.type), T = r.type === "basic" || r.type === "basicDark", D = r.type === "custom" || r.type === "customStay", M = (o) => o.includes("success") ? /* @__PURE__ */ a.jsx(Ir, {}) : o.includes("error") ? /* @__PURE__ */ a.jsx(Br, {}) : o.includes("loading") ? /* @__PURE__ */ a.jsx(Wr, { className: "animate_spin" }) : o.includes("warning") ? /* @__PURE__ */ a.jsx(Vr, {}) : o.includes("info") ? /* @__PURE__ */ a.jsx(Ur, { className: "rotate_deg" }) : null;
986
- return /* @__PURE__ */ a.jsxs(Oe.Fragment, { children: [
987
- r.showOverlay && /* @__PURE__ */ a.jsx("div", { className: `overlay ${r.showOverlay ? "show" : ""}` }),
988
- /* @__PURE__ */ a.jsx(
355
+ }, We = ({ toast: e, onHide: n, onConfirm: s, onCancel: r, onMouseEnter: m, onMouseLeave: _, setToasts: y }) => {
356
+ const d = Object.keys(f.positionClasses).find(
357
+ (t) => f.positionClasses[t] === e.position
358
+ ), i = Object.keys(f.backgroundClasses).find(
359
+ (t) => f.backgroundClasses[t] === e.background
360
+ ), g = d === "bottomFull" || d === "topFull", h = u.overlayTypes.includes(e.type), D = e.type === "basic" || e.type === "basicDark", F = e.type === "custom" || e.type === "customStay", S = (t) => t.includes("success") ? /* @__PURE__ */ o(pe, {}) : t.includes("error") ? /* @__PURE__ */ o(ve, {}) : t.includes("loading") ? /* @__PURE__ */ o(xe, { className: "animate_spin" }) : t.includes("warning") ? /* @__PURE__ */ o(Te, {}) : t.includes("info") ? /* @__PURE__ */ o(Me, { className: "rotate_deg" }) : null;
361
+ return /* @__PURE__ */ l(ue.Fragment, { children: [
362
+ e.showOverlay && /* @__PURE__ */ o("div", { className: `overlay ${e.showOverlay ? "show" : ""}` }),
363
+ /* @__PURE__ */ o(
989
364
  "div",
990
365
  {
991
366
  className: `
992
367
  outer_container
993
- ${r.position}
994
- ${r.animation}
995
- ${r.isExiting ? "exiting" : ""}
368
+ ${e.position}
369
+ ${e.animation}
370
+ ${e.isExiting ? "exiting" : ""}
996
371
  `,
997
372
  style: { zIndex: 9999 },
998
373
  onAnimationEnd: () => {
999
- r.isExiting && j((o) => o.filter((m) => m.id !== r.id));
374
+ e.isExiting && y((t) => t.filter((a) => a.id !== e.id));
1000
375
  },
1001
- children: D ? /* @__PURE__ */ a.jsx(
376
+ children: F ? /* @__PURE__ */ o(
1002
377
  "div",
1003
378
  {
1004
- className: `inner_container ${w ? "toast_width_full" : "max_width"} ${r.radius}`,
1005
- onMouseEnter: () => C(r.id, r.type),
1006
- onMouseLeave: () => x(r.id, r.type),
1007
- children: r.custom
379
+ className: `inner_container ${g ? "toast_width_full" : "max_width"} ${e.radius}`,
380
+ onMouseEnter: () => m(e.id, e.type),
381
+ onMouseLeave: () => _(e.id, e.type),
382
+ children: e.custom
1008
383
  }
1009
- ) : h ? /* @__PURE__ */ a.jsx(
384
+ ) : h ? /* @__PURE__ */ o(
1010
385
  "div",
1011
386
  {
1012
- className: `inner_container ${w ? "toast_width_full" : "max_width"} ${P.textClasses[r.type]} ${r.background} ${r.skew} ${r.shadow} ${r.radius}`,
1013
- onMouseEnter: () => C(r.id, r.type),
1014
- onMouseLeave: () => x(r.id, r.type),
1015
- children: /* @__PURE__ */ a.jsxs("div", { className: h ? "toast_width_confirm" : "toast_width", children: [
1016
- /* @__PURE__ */ a.jsxs("div", { className: `confirm_message ${r.alignment}`, children: [
1017
- !T && /* @__PURE__ */ a.jsxs("div", { children: [
1018
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "toast icon" }),
1019
- /* @__PURE__ */ a.jsx("span", { "aria-hidden": "true", children: M(r.type) })
387
+ className: `inner_container ${g ? "toast_width_full" : "max_width"} ${f.textClasses[e.type]} ${e.background} ${e.skew} ${e.shadow} ${e.radius}`,
388
+ onMouseEnter: () => m(e.id, e.type),
389
+ onMouseLeave: () => _(e.id, e.type),
390
+ children: /* @__PURE__ */ l("div", { className: h ? "toast_width_confirm" : "toast_width", children: [
391
+ /* @__PURE__ */ l("div", { className: `confirm_message ${e.alignment}`, children: [
392
+ !D && /* @__PURE__ */ l("div", { children: [
393
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "toast icon" }),
394
+ /* @__PURE__ */ o("span", { "aria-hidden": "true", children: S(e.type) })
1020
395
  ] }),
1021
- /* @__PURE__ */ a.jsx(a.Fragment, { children: r.message }),
1022
- /* @__PURE__ */ a.jsx(
396
+ /* @__PURE__ */ o(z, { children: e.message }),
397
+ /* @__PURE__ */ o(
1023
398
  "div",
1024
399
  {
1025
- className: `closeDiv ${r.showCloseButton && r.showButton && !h ? "div_flex" : "div_hidden"}`,
1026
- children: /* @__PURE__ */ a.jsxs(
400
+ className: `closeDiv ${e.showCloseButton && e.showButton && !h ? "div_flex" : "div_hidden"}`,
401
+ children: /* @__PURE__ */ l(
1027
402
  "button",
1028
403
  {
1029
- onClick: () => s(r.id),
1030
- id: `close-${r.id}`,
404
+ onClick: () => n(e.id),
405
+ id: `close-${e.id}`,
1031
406
  className: `closeButton ${i === "white" ? "bg_whiter" : i === "glass" || i === "transparent" ? "bg_glass_close" : "bg_darker"}`,
1032
407
  children: [
1033
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "close toast" }),
1034
- /* @__PURE__ */ a.jsx(
1035
- He,
408
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "close toast" }),
409
+ /* @__PURE__ */ o(
410
+ V,
1036
411
  {
1037
412
  "aria-hidden": "true",
1038
413
  size: 18
@@ -1044,37 +419,37 @@ const qr = [
1044
419
  }
1045
420
  )
1046
421
  ] }),
1047
- r.footer && /* @__PURE__ */ a.jsx(
1048
- Je,
422
+ e.footer && /* @__PURE__ */ o(
423
+ X,
1049
424
  {
1050
- footer: r.footer,
425
+ footer: e.footer,
1051
426
  toastBG: i,
1052
- toastAlignment: r.alignment
427
+ toastAlignment: e.alignment
1053
428
  }
1054
429
  ),
1055
- /* @__PURE__ */ a.jsxs(
430
+ /* @__PURE__ */ l(
1056
431
  "div",
1057
432
  {
1058
- className: `confirm_div ${r.alignment === "text_start" ? "justify_end" : r.alignment === "text_end" ? "justify_start" : r.alignment === "text_center" ? "justify_center" : null}`,
433
+ className: `confirm_div ${e.alignment === "text_start" ? "justify_end" : e.alignment === "text_end" ? "justify_start" : e.alignment === "text_center" ? "justify_center" : null}`,
1059
434
  children: [
1060
- /* @__PURE__ */ a.jsxs(
435
+ /* @__PURE__ */ l(
1061
436
  "button",
1062
437
  {
1063
438
  className: `cancel_button ${i === "white" ? "cancel_button_dark" : i === "success" || i === "warning" || i === "error" || i === "info" || i === "dark" ? "cancel_button_all" : "cancel_button_glass"}`,
1064
- onClick: () => l(r.id),
439
+ onClick: () => r(e.id),
1065
440
  children: [
1066
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "close toast" }),
441
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "close toast" }),
1067
442
  "Cancel"
1068
443
  ]
1069
444
  }
1070
445
  ),
1071
- /* @__PURE__ */ a.jsxs(
446
+ /* @__PURE__ */ l(
1072
447
  "button",
1073
448
  {
1074
449
  className: `confirm_button ${i === "dark" ? "confirm_button_dark" : "confirm_button_white"}`,
1075
- onClick: () => d(r.id),
450
+ onClick: () => s(e.id),
1076
451
  children: [
1077
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "confirm action" }),
452
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "confirm action" }),
1078
453
  "Confirm"
1079
454
  ]
1080
455
  }
@@ -1084,35 +459,35 @@ const qr = [
1084
459
  )
1085
460
  ] })
1086
461
  }
1087
- ) : /* @__PURE__ */ a.jsxs(
462
+ ) : /* @__PURE__ */ l(
1088
463
  "div",
1089
464
  {
1090
- className: `inner_container ${w ? "toast_width_full" : "max_width"} ${P.textClasses[r.type]} ${r.background} ${r.skew} ${r.shadow} ${r.radius}`,
1091
- onMouseEnter: () => C(r.id, r.type),
1092
- onMouseLeave: () => x(r.id, r.type),
465
+ className: `inner_container ${g ? "toast_width_full" : "max_width"} ${f.textClasses[e.type]} ${e.background} ${e.skew} ${e.shadow} ${e.radius}`,
466
+ onMouseEnter: () => m(e.id, e.type),
467
+ onMouseLeave: () => _(e.id, e.type),
1093
468
  children: [
1094
- /* @__PURE__ */ a.jsxs("div", { className: h ? "toast_width_confirm" : "toast_width", children: [
1095
- /* @__PURE__ */ a.jsxs("div", { className: `toast_message ${r.alignment}`, children: [
1096
- !h && !T && /* @__PURE__ */ a.jsxs("div", { children: [
1097
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "toast icon" }),
1098
- /* @__PURE__ */ a.jsx("span", { "aria-hidden": "true", children: M(r.type) })
469
+ /* @__PURE__ */ l("div", { className: h ? "toast_width_confirm" : "toast_width", children: [
470
+ /* @__PURE__ */ l("div", { className: `toast_message ${e.alignment}`, children: [
471
+ !h && !D && /* @__PURE__ */ l("div", { children: [
472
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "toast icon" }),
473
+ /* @__PURE__ */ o("span", { "aria-hidden": "true", children: S(e.type) })
1099
474
  ] }),
1100
- /* @__PURE__ */ a.jsx(a.Fragment, { children: r.message }),
1101
- /* @__PURE__ */ a.jsx(
475
+ /* @__PURE__ */ o(z, { children: e.message }),
476
+ /* @__PURE__ */ o(
1102
477
  "div",
1103
478
  {
1104
- className: `closeDiv ${r.showCloseButton && r.showButton && !h ? "div_flex" : "div_hidden"}`,
1105
- children: /* @__PURE__ */ a.jsxs(
479
+ className: `closeDiv ${e.showCloseButton && e.showButton && !h ? "div_flex" : "div_hidden"}`,
480
+ children: /* @__PURE__ */ l(
1106
481
  "button",
1107
482
  {
1108
- onClick: () => s(r.id),
1109
- id: `close-${r.id}`,
483
+ onClick: () => n(e.id),
484
+ id: `close-${e.id}`,
1110
485
  className: `closeButton
1111
486
  ${i === "white" ? "bg_whiter" : i === "glass" || i === "transparent" ? "bg_glass_close" : "bg_darker"}`,
1112
487
  children: [
1113
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "close toast" }),
1114
- /* @__PURE__ */ a.jsx(
1115
- He,
488
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "close toast" }),
489
+ /* @__PURE__ */ o(
490
+ V,
1116
491
  {
1117
492
  "aria-hidden": "true",
1118
493
  size: 18
@@ -1124,40 +499,40 @@ const qr = [
1124
499
  }
1125
500
  )
1126
501
  ] }),
1127
- h && r.footer && /* @__PURE__ */ a.jsx(
1128
- Je,
502
+ h && e.footer && /* @__PURE__ */ o(
503
+ X,
1129
504
  {
1130
- footer: r.footer,
505
+ footer: e.footer,
1131
506
  toastBG: i,
1132
- toastAlignment: r.alignment
507
+ toastAlignment: e.alignment
1133
508
  }
1134
509
  ),
1135
- h && /* @__PURE__ */ a.jsxs(
510
+ h && /* @__PURE__ */ l(
1136
511
  "div",
1137
512
  {
1138
513
  className: `confirm_div
1139
- ${r.alignment === "text_start" ? "justify_end" : r.alignment === "text_end" ? "justify_start" : r.alignment === "text_center" ? "justify_center" : null}
514
+ ${e.alignment === "text_start" ? "justify_end" : e.alignment === "text_end" ? "justify_start" : e.alignment === "text_center" ? "justify_center" : null}
1140
515
  `,
1141
516
  children: [
1142
- /* @__PURE__ */ a.jsxs(
517
+ /* @__PURE__ */ l(
1143
518
  "button",
1144
519
  {
1145
520
  className: `cancel_button ${i === "white" ? "cancel_button_dark" : i === "success" || i === "warning" || i === "error" || i === "info" || i === "dark" ? "cancel_button_all" : "cancel_button_glass"}`,
1146
- onClick: () => l(r.id),
521
+ onClick: () => r(e.id),
1147
522
  children: [
1148
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "close toast" }),
523
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "close toast" }),
1149
524
  "Cancel"
1150
525
  ]
1151
526
  }
1152
527
  ),
1153
- /* @__PURE__ */ a.jsxs(
528
+ /* @__PURE__ */ l(
1154
529
  "button",
1155
530
  {
1156
531
  className: `confirm_button
1157
532
  ${i === "dark" ? "confirm_button_dark" : "confirm_button_white"}`,
1158
- onClick: () => d(r.id),
533
+ onClick: () => s(e.id),
1159
534
  children: [
1160
- /* @__PURE__ */ a.jsx("span", { className: "sr_only", children: "confirm action" }),
535
+ /* @__PURE__ */ o("span", { className: "sr_only", children: "confirm action" }),
1161
536
  "Confirm"
1162
537
  ]
1163
538
  }
@@ -1166,21 +541,21 @@ const qr = [
1166
541
  }
1167
542
  )
1168
543
  ] }),
1169
- /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1170
- !h && !w && r.footer && /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsx(
1171
- Gr,
544
+ /* @__PURE__ */ l(z, { children: [
545
+ !h && !g && e.footer && /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
546
+ Fe,
1172
547
  {
1173
- footer: r.footer,
548
+ footer: e.footer,
1174
549
  toastBG: i,
1175
- toastAlignment: r.alignment
550
+ toastAlignment: e.alignment
1176
551
  }
1177
552
  ) }),
1178
- !h && !w && r.showLoadFooter && r.loadFooter && /* @__PURE__ */ a.jsx(
1179
- Jr,
553
+ !h && !g && e.showLoadFooter && e.loadFooter && /* @__PURE__ */ o(
554
+ Le,
1180
555
  {
1181
- toastAlignment: r.alignment,
556
+ toastAlignment: e.alignment,
1182
557
  toastBG: i,
1183
- loadFooter: r.loadFooter
558
+ loadFooter: e.loadFooter
1184
559
  }
1185
560
  )
1186
561
  ] })
@@ -1189,9 +564,9 @@ const qr = [
1189
564
  )
1190
565
  }
1191
566
  )
1192
- ] }, r.id);
1193
- }, Te = (r, s) => {
1194
- let l = {
567
+ ] }, e.id);
568
+ }, G = (e, n) => {
569
+ let r = {
1195
570
  ani_top: "ani_slide_out_up",
1196
571
  ani_down: "ani_slide_out_down",
1197
572
  ani_left: "ani_slide_out_left",
@@ -1199,201 +574,201 @@ const qr = [
1199
574
  ani_jelly: "ani_jelly_out",
1200
575
  ani_zoom: "ani_zoom_out",
1201
576
  ani_fade: "ani_fade_out"
1202
- }[r] || "ani_fade_out";
1203
- return s && ["bottomFull", "topFull"].includes(s) && (l = "ani_fade_out_full"), l;
1204
- }, Qr = () => {
1205
- const [r, s] = Tr([]), d = Ce(/* @__PURE__ */ new Map()), l = Ce(/* @__PURE__ */ new Map()), C = Ce(r);
1206
- Ee(() => {
1207
- C.current = r;
1208
- }, [r]);
1209
- const x = z(() => `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, []), j = z((o) => {
1210
- l.current.has(o) && (clearTimeout(l.current.get(o)), l.current.delete(o));
1211
- }, []), p = z((o) => {
1212
- var R, y;
1213
- const m = o ?? ((y = (R = C.current) == null ? void 0 : R[C.current.length - 1]) == null ? void 0 : y.id);
1214
- if (!m) return;
1215
- s((N) => {
1216
- const V = N.findIndex((U) => U.id === m);
1217
- if (V === -1) return N;
1218
- const q = N[V], re = Object.keys(P.positionClasses).find(
1219
- (U) => P.positionClasses[U] === q.position
1220
- ), te = Te(q.animation, re), H = [...N];
1221
- return H[V] = { ...q, animation: te, isExiting: !0 }, H;
577
+ }[e] || "ani_fade_out";
578
+ return n && ["bottomFull", "topFull"].includes(n) && (r = "ani_fade_out_full"), r;
579
+ }, Ee = () => {
580
+ const [e, n] = _e([]), s = O(/* @__PURE__ */ new Map()), r = O(/* @__PURE__ */ new Map()), m = O(e);
581
+ R(() => {
582
+ m.current = e;
583
+ }, [e]);
584
+ const _ = x(() => `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, []), y = x((t) => {
585
+ r.current.has(t) && (clearTimeout(r.current.get(t)), r.current.delete(t));
586
+ }, []), d = x((t) => {
587
+ var C, v;
588
+ const a = t ?? ((v = (C = m.current) == null ? void 0 : C[m.current.length - 1]) == null ? void 0 : v.id);
589
+ if (!a) return;
590
+ n((k) => {
591
+ const T = k.findIndex((A) => A.id === a);
592
+ if (T === -1) return k;
593
+ const L = k[T], E = Object.keys(f.positionClasses).find(
594
+ (A) => f.positionClasses[A] === L.position
595
+ ), I = G(L.animation, E), W = [...k];
596
+ return W[T] = { ...L, animation: I, isExiting: !0 }, W;
1222
597
  });
1223
- const v = setTimeout(() => {
1224
- s((N) => N.filter((V) => V.id !== m)), d.current.delete(m);
1225
- }, E.durations.animationClose);
1226
- l.current.set(m, v);
1227
- }, []), i = z(
1228
- (o) => {
1229
- s((m) => {
1230
- const v = m.findIndex((N) => N.id === o);
1231
- if (v === -1) return m;
1232
- const R = [...m], y = R[v];
1233
- return R[v] = {
1234
- ...y,
1235
- animation: Te(y.animation, y.position)
1236
- }, R;
1237
- }), j(o), l.current.set(
1238
- o,
598
+ const c = setTimeout(() => {
599
+ n((k) => k.filter((T) => T.id !== a)), s.current.delete(a);
600
+ }, u.durations.animationClose);
601
+ r.current.set(a, c);
602
+ }, []), i = x(
603
+ (t) => {
604
+ n((a) => {
605
+ const c = a.findIndex((k) => k.id === t);
606
+ if (c === -1) return a;
607
+ const C = [...a], v = C[c];
608
+ return C[c] = {
609
+ ...v,
610
+ animation: G(v.animation, v.position)
611
+ }, C;
612
+ }), y(t), r.current.set(
613
+ t,
1239
614
  setTimeout(() => {
1240
- d.current.has(o) && (d.current.get(o)(!0), d.current.delete(o)), s((m) => m.filter((v) => v.id !== o));
1241
- }, E.durations.animationClose)
615
+ s.current.has(t) && (s.current.get(t)(!0), s.current.delete(t)), n((a) => a.filter((c) => c.id !== t));
616
+ }, u.durations.animationClose)
1242
617
  );
1243
618
  },
1244
- [j]
1245
- ), w = z(
1246
- (o) => {
1247
- d.current.has(o) && (d.current.get(o)(!1), d.current.delete(o)), p(o);
619
+ [y]
620
+ ), g = x(
621
+ (t) => {
622
+ s.current.has(t) && (s.current.get(t)(!1), s.current.delete(t)), d(t);
1248
623
  },
1249
- [p]
1250
- ), h = z(
1251
- (o, m) => {
1252
- E.autoHideTypes.includes(m) && j(o);
624
+ [d]
625
+ ), h = x(
626
+ (t, a) => {
627
+ u.autoHideTypes.includes(a) && y(t);
1253
628
  },
1254
- [j]
1255
- ), T = z(
1256
- (o, m) => {
1257
- E.autoHideTypes.includes(m) && l.current.set(
1258
- o,
1259
- setTimeout(() => p(o), E.durations.afterHover)
629
+ [y]
630
+ ), D = x(
631
+ (t, a) => {
632
+ u.autoHideTypes.includes(a) && r.current.set(
633
+ t,
634
+ setTimeout(() => d(t), u.durations.afterHover)
1260
635
  );
1261
636
  },
1262
- [p]
1263
- ), D = z(
1264
- (o, m) => {
637
+ [d]
638
+ ), F = x(
639
+ (t, a) => {
1265
640
  const {
1266
- type: v = "success",
1267
- message: R = "",
1268
- bg: y = "white",
1269
- position: N = "top",
1270
- transition: V = "zoom",
1271
- loadFooter: q = null,
1272
- footer: re = null,
1273
- skew: te = "",
1274
- cancelButton: H = !0,
1275
- shadow: U = "gray",
1276
- radius: ge = "lg",
1277
- align: pe = "center",
1278
- timeout: ne = E.durations.standard,
1279
- custom: B = null
1280
- } = o, S = x(), G = P.backgroundClasses[y] || "", ie = P.positionClasses[N] || "", ce = P.animationClasses[V] || "", le = P.skewClasses[te] || "", ue = P.shadowClasses[U] || "", de = P.radiusClasses[ge] || "", fe = P.alignmentClasses[pe] || "", J = {
1281
- id: S,
1282
- type: v,
1283
- message: R,
1284
- position: ie,
1285
- background: G,
1286
- animation: ce,
1287
- skew: le,
1288
- shadow: ue,
1289
- radius: de,
1290
- alignment: fe,
1291
- footer: re,
1292
- loadFooter: q,
1293
- showButton: H,
641
+ type: c = "success",
642
+ message: C = "",
643
+ bg: v = "white",
644
+ position: k = "top",
645
+ transition: T = "zoom",
646
+ loadFooter: L = null,
647
+ footer: E = null,
648
+ skew: I = "",
649
+ cancelButton: W = !0,
650
+ shadow: A = "gray",
651
+ radius: ee = "lg",
652
+ align: te = "center",
653
+ timeout: q = u.durations.standard,
654
+ custom: ne = null
655
+ } = t, N = _(), oe = f.backgroundClasses[v] || "", se = f.positionClasses[k] || "", ie = f.animationClasses[T] || "", re = f.skewClasses[I] || "", ae = f.shadowClasses[A] || "", ce = f.radiusClasses[ee] || "", le = f.alignmentClasses[te] || "", j = {
656
+ id: N,
657
+ type: c,
658
+ message: C,
659
+ position: se,
660
+ background: oe,
661
+ animation: ie,
662
+ skew: re,
663
+ shadow: ae,
664
+ radius: ce,
665
+ alignment: le,
666
+ footer: E,
667
+ loadFooter: L,
668
+ showButton: W,
1294
669
  showCloseButton: !0,
1295
670
  showLoadFooter: !1,
1296
- showOverlay: E.overlayTypes.includes(v),
1297
- timeout: ne,
1298
- custom: B
671
+ showOverlay: u.overlayTypes.includes(c),
672
+ timeout: q,
673
+ custom: ne
1299
674
  };
1300
- return E.loadingTypes.includes(v) && (J.showCloseButton = !1, J.showLoadFooter = !1), s((A) => {
1301
- const Y = A.filter((O) => !O.isExiting);
1302
- let W = [...A];
1303
- if (Y.length >= 3) {
1304
- const O = Y[0];
1305
- W = W.map(
1306
- (L) => L.id === O.id ? {
1307
- ...L,
675
+ return u.loadingTypes.includes(c) && (j.showCloseButton = !1, j.showLoadFooter = !1), n((p) => {
676
+ const $ = p.filter((w) => !w.isExiting);
677
+ let b = [...p];
678
+ if ($.length >= 3) {
679
+ const w = $[0];
680
+ b = b.map(
681
+ (M) => M.id === w.id ? {
682
+ ...M,
1308
683
  isExiting: !0,
1309
- animation: Te(L.animation, L.position)
1310
- } : L
684
+ animation: G(M.animation, M.position)
685
+ } : M
1311
686
  ), setTimeout(() => {
1312
- s(
1313
- (L) => L.filter((X) => X.id !== O.id)
1314
- ), l.current.has(O.id) && (clearTimeout(l.current.get(O.id)), l.current.delete(O.id));
1315
- }, E.durations.animationClose);
687
+ n(
688
+ (M) => M.filter((de) => de.id !== w.id)
689
+ ), r.current.has(w.id) && (clearTimeout(r.current.get(w.id)), r.current.delete(w.id));
690
+ }, u.durations.animationClose);
1316
691
  }
1317
- return [...W, J];
1318
- }), E.loadingTypes.includes(v) && (setTimeout(() => {
1319
- s((A) => {
1320
- const Y = A.findIndex((O) => O.id === S);
1321
- if (Y === -1) return A;
1322
- const W = [...A];
1323
- return W[Y].showCloseButton = !0, W;
692
+ return [...b, j];
693
+ }), u.loadingTypes.includes(c) && (setTimeout(() => {
694
+ n((p) => {
695
+ const $ = p.findIndex((w) => w.id === N);
696
+ if ($ === -1) return p;
697
+ const b = [...p];
698
+ return b[$].showCloseButton = !0, b;
1324
699
  });
1325
- }, E.durations.loadingCloseButtonDelay), setTimeout(() => {
1326
- s((A) => {
1327
- const Y = A.findIndex((O) => O.id === S);
1328
- if (Y === -1) return A;
1329
- const W = [...A];
1330
- return W[Y].showLoadFooter = !0, W;
700
+ }, u.durations.loadingCloseButtonDelay), setTimeout(() => {
701
+ n((p) => {
702
+ const $ = p.findIndex((w) => w.id === N);
703
+ if ($ === -1) return p;
704
+ const b = [...p];
705
+ return b[$].showLoadFooter = !0, b;
1331
706
  });
1332
- }, E.durations.loadingFooterDelay)), E.overlayTypes.includes(v) && m && d.current.set(S, m), !E.stayTypes.includes(v) && !E.loadingTypes.includes(v) && !E.overlayTypes.includes(v) && l.current.set(
1333
- S,
1334
- setTimeout(() => p(S), ne)
1335
- ), S;
707
+ }, u.durations.loadingFooterDelay)), u.overlayTypes.includes(c) && a && s.current.set(N, a), !u.stayTypes.includes(c) && !u.loadingTypes.includes(c) && !u.overlayTypes.includes(c) && r.current.set(
708
+ N,
709
+ setTimeout(() => d(N), q)
710
+ ), N;
1336
711
  },
1337
- [x, p]
1338
- ), M = z(
1339
- (o) => new Promise((m) => D(o, m)),
1340
- [D]
712
+ [_, d]
713
+ ), S = x(
714
+ (t) => new Promise((a) => F(t, a)),
715
+ [F]
1341
716
  );
1342
- return Ee(() => {
1343
- const o = (m) => {
1344
- if (m.key === "Escape" && r.length > 0) {
1345
- const v = r[r.length - 1];
1346
- v && p(v.id);
717
+ return R(() => {
718
+ const t = (a) => {
719
+ if (a.key === "Escape" && e.length > 0) {
720
+ const c = e[e.length - 1];
721
+ c && d(c.id);
1347
722
  }
1348
723
  };
1349
- return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
1350
- }, [p, r]), Ee(() => () => {
1351
- l.current.forEach((o) => clearTimeout(o)), l.current.clear();
724
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
725
+ }, [d, e]), R(() => () => {
726
+ r.current.forEach((t) => clearTimeout(t)), r.current.clear();
1352
727
  }, []), {
1353
- toasts: r,
1354
- setToasts: s,
1355
- toastMaster: M,
1356
- hideToast: p,
728
+ toasts: e,
729
+ setToasts: n,
730
+ toastMaster: S,
731
+ hideToast: d,
1357
732
  handleConfirm: i,
1358
- handleCancel: w,
733
+ handleCancel: g,
1359
734
  handleMouseEnter: h,
1360
- handleMouseLeave: T
735
+ handleMouseLeave: D
1361
736
  };
1362
- }, rr = Ze(null), rt = ({ children: r }) => {
737
+ }, Q = Z(null), ze = ({ children: e }) => {
1363
738
  const {
1364
- toasts: s,
1365
- setToasts: d,
1366
- toastMaster: l,
1367
- hideToast: C,
1368
- handleConfirm: x,
1369
- handleCancel: j,
1370
- handleMouseEnter: p,
739
+ toasts: n,
740
+ setToasts: s,
741
+ toastMaster: r,
742
+ hideToast: m,
743
+ handleConfirm: _,
744
+ handleCancel: y,
745
+ handleMouseEnter: d,
1371
746
  handleMouseLeave: i
1372
- } = Qr();
1373
- return /* @__PURE__ */ a.jsxs(rr.Provider, { value: { toastMaster: l, hideToast: C }, children: [
1374
- r,
1375
- s.map((w) => /* @__PURE__ */ a.jsx(
1376
- Zr,
747
+ } = Ee();
748
+ return /* @__PURE__ */ l(Q.Provider, { value: { toastMaster: r, hideToast: m }, children: [
749
+ e,
750
+ n.map((g) => /* @__PURE__ */ o(
751
+ We,
1377
752
  {
1378
- toast: w,
1379
- setToasts: d,
1380
- onHide: C,
1381
- onConfirm: x,
1382
- onCancel: j,
1383
- onMouseEnter: p,
753
+ toast: g,
754
+ setToasts: s,
755
+ onHide: m,
756
+ onConfirm: _,
757
+ onCancel: y,
758
+ onMouseEnter: d,
1384
759
  onMouseLeave: i
1385
760
  },
1386
- w.id
761
+ g.id
1387
762
  ))
1388
763
  ] });
1389
- }, tt = () => {
1390
- const r = Xe(rr);
1391
- if (!r)
764
+ }, Oe = () => {
765
+ const e = U(Q);
766
+ if (!e)
1392
767
  throw new Error("useToast must be used within a ToastProvider");
1393
- return r;
768
+ return e;
1394
769
  };
1395
770
  export {
1396
- rr as ToastContext,
1397
- rt as ToastProvider,
1398
- tt as useToast
771
+ Q as ToastContext,
772
+ ze as ToastProvider,
773
+ Oe as useToast
1399
774
  };