@alfadocs/ui-kit-debug 1.129.0 → 1.130.0
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/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js +13663 -0
- package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js.map +1 -0
- package/dist/_chunks/contact-round-DiSvB3LP.js +18 -0
- package/dist/_chunks/contact-round-DiSvB3LP.js.map +1 -0
- package/dist/_chunks/{entity-summary-Dzk54yom.js → entity-summary-KHM0PnSI.js} +55 -67
- package/dist/_chunks/entity-summary-KHM0PnSI.js.map +1 -0
- package/dist/_chunks/{header-settings-DsvheAOt.js → header-settings-ZGvYAuKF.js} +101 -97
- package/dist/_chunks/header-settings-ZGvYAuKF.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js → marketplace-app-shell-D_HA8CKx.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js.map → marketplace-app-shell-D_HA8CKx.js.map} +1 -1
- package/dist/_chunks/{patient-search-D_S7joff.js → patient-search-OAwFgOW3.js} +2 -2
- package/dist/_chunks/{patient-search-D_S7joff.js.map → patient-search-OAwFgOW3.js.map} +1 -1
- package/dist/_chunks/{toast-BNoN8Qjh.js → toast-DQ1Zu1kk.js} +264 -251
- package/dist/_chunks/{toast-BNoN8Qjh.js.map → toast-DQ1Zu1kk.js.map} +1 -1
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js +2475 -0
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +7 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +2 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +5 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/i18n/locales/ar.d.ts +12 -4
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +15 -7
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +12 -4
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +15 -7
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +12 -4
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +15 -7
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +12 -4
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +12 -4
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +12 -4
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +15 -7
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +12 -4
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +15 -7
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +12 -4
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +15 -7
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +12 -4
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +15 -7
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +12 -4
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +15 -7
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +12 -4
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +15 -7
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +12 -4
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +15 -7
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +12 -4
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +15 -7
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +12 -4
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +15 -7
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +12 -4
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +15 -7
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +12 -4
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +15 -7
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +12 -4
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +15 -7
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +12 -4
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +15 -7
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +12 -4
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +15 -7
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/locales/ar.json +15 -7
- package/dist/locales/de.json +15 -7
- package/dist/locales/el.json +15 -7
- package/dist/locales/en.json +12 -4
- package/dist/locales/es.json +15 -7
- package/dist/locales/fr.json +15 -7
- package/dist/locales/hi.json +15 -7
- package/dist/locales/it.json +15 -7
- package/dist/locales/ja.json +15 -7
- package/dist/locales/nl.json +15 -7
- package/dist/locales/pl.json +15 -7
- package/dist/locales/pt.json +15 -7
- package/dist/locales/ro.json +15 -7
- package/dist/locales/ru.json +15 -7
- package/dist/locales/sq.json +15 -7
- package/dist/locales/sv.json +15 -7
- package/dist/locales/tr.json +15 -7
- package/dist/locales/zh.json +15 -7
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +10 -1
- package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-appointment-editor-dialog.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-load-error.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-settings-practice.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +27 -0
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +5 -6
- package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.model.d.ts +57 -8
- package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +46 -3
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.types.d.ts +13 -5
- package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js +0 -13438
- package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js.map +0 -1
- package/dist/_chunks/entity-summary-Dzk54yom.js.map +0 -1
- package/dist/_chunks/header-settings-DsvheAOt.js.map +0 -1
- package/dist/_chunks/use-appointment-details-read-n7kycxrm.js +0 -2439
- package/dist/_chunks/use-appointment-details-read-n7kycxrm.js.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import s, {
|
|
3
|
-
import
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
6
|
-
import { C as
|
|
7
|
-
import { T as
|
|
8
|
-
import { C as
|
|
9
|
-
import { I as
|
|
10
|
-
import { X as
|
|
11
|
-
function
|
|
1
|
+
import { jsx as O, jsxs as Ht } from "react/jsx-runtime";
|
|
2
|
+
import s, { useRef as te, useState as Lt, useEffect as $t, useReducer as ee } from "react";
|
|
3
|
+
import ae from "react-dom";
|
|
4
|
+
import { useTranslation as se } from "react-i18next";
|
|
5
|
+
import { I as ne } from "./icon-button-S8_weU3g.js";
|
|
6
|
+
import { C as oe } from "./circle-alert-rGDZ73Wh.js";
|
|
7
|
+
import { T as re } from "./triangle-alert-CBnO6nq_.js";
|
|
8
|
+
import { C as ie } from "./circle-check-BN6rz4NV.js";
|
|
9
|
+
import { I as le } from "./info-CGn22peZ.js";
|
|
10
|
+
import { X as de } from "./x-B5YnXwCz.js";
|
|
11
|
+
function ce(n) {
|
|
12
12
|
if (typeof document > "u") return;
|
|
13
13
|
let a = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
|
|
14
14
|
e.type = "text/css", a.appendChild(e), e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const ue = (n) => {
|
|
17
17
|
switch (n) {
|
|
18
18
|
case "success":
|
|
19
|
-
return fe;
|
|
20
|
-
case "info":
|
|
21
19
|
return pe;
|
|
20
|
+
case "info":
|
|
21
|
+
return he;
|
|
22
22
|
case "warning":
|
|
23
|
-
return me;
|
|
24
|
-
case "error":
|
|
25
23
|
return ge;
|
|
24
|
+
case "error":
|
|
25
|
+
return be;
|
|
26
26
|
default:
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, fe = Array(12).fill(0), me = ({ visible: n, className: a }) => /* @__PURE__ */ s.createElement("div", {
|
|
30
30
|
className: [
|
|
31
31
|
"sonner-loading-wrapper",
|
|
32
32
|
a
|
|
@@ -34,10 +34,10 @@ const de = (n) => {
|
|
|
34
34
|
"data-visible": n
|
|
35
35
|
}, /* @__PURE__ */ s.createElement("div", {
|
|
36
36
|
className: "sonner-spinner"
|
|
37
|
-
},
|
|
37
|
+
}, fe.map((e, o) => /* @__PURE__ */ s.createElement("div", {
|
|
38
38
|
className: "sonner-loading-bar",
|
|
39
39
|
key: `spinner-bar-${o}`
|
|
40
|
-
})))),
|
|
40
|
+
})))), pe = /* @__PURE__ */ s.createElement("svg", {
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
viewBox: "0 0 20 20",
|
|
43
43
|
fill: "currentColor",
|
|
@@ -47,7 +47,7 @@ const de = (n) => {
|
|
|
47
47
|
fillRule: "evenodd",
|
|
48
48
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
49
49
|
clipRule: "evenodd"
|
|
50
|
-
})),
|
|
50
|
+
})), ge = /* @__PURE__ */ s.createElement("svg", {
|
|
51
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
52
52
|
viewBox: "0 0 24 24",
|
|
53
53
|
fill: "currentColor",
|
|
@@ -57,7 +57,7 @@ const de = (n) => {
|
|
|
57
57
|
fillRule: "evenodd",
|
|
58
58
|
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
59
59
|
clipRule: "evenodd"
|
|
60
|
-
})),
|
|
60
|
+
})), he = /* @__PURE__ */ s.createElement("svg", {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
viewBox: "0 0 20 20",
|
|
63
63
|
fill: "currentColor",
|
|
@@ -67,7 +67,7 @@ const de = (n) => {
|
|
|
67
67
|
fillRule: "evenodd",
|
|
68
68
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
69
69
|
clipRule: "evenodd"
|
|
70
|
-
})),
|
|
70
|
+
})), be = /* @__PURE__ */ s.createElement("svg", {
|
|
71
71
|
xmlns: "http://www.w3.org/2000/svg",
|
|
72
72
|
viewBox: "0 0 20 20",
|
|
73
73
|
fill: "currentColor",
|
|
@@ -77,7 +77,7 @@ const de = (n) => {
|
|
|
77
77
|
fillRule: "evenodd",
|
|
78
78
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
79
79
|
clipRule: "evenodd"
|
|
80
|
-
})),
|
|
80
|
+
})), ve = /* @__PURE__ */ s.createElement("svg", {
|
|
81
81
|
xmlns: "http://www.w3.org/2000/svg",
|
|
82
82
|
width: "12",
|
|
83
83
|
height: "12",
|
|
@@ -97,7 +97,7 @@ const de = (n) => {
|
|
|
97
97
|
y1: "6",
|
|
98
98
|
x2: "18",
|
|
99
99
|
y2: "18"
|
|
100
|
-
})),
|
|
100
|
+
})), ye = () => {
|
|
101
101
|
const [n, a] = s.useState(document.hidden);
|
|
102
102
|
return s.useEffect(() => {
|
|
103
103
|
const e = () => {
|
|
@@ -106,8 +106,8 @@ const de = (n) => {
|
|
|
106
106
|
return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
|
|
107
107
|
}, []), n;
|
|
108
108
|
};
|
|
109
|
-
let
|
|
110
|
-
class
|
|
109
|
+
let Dt = 1;
|
|
110
|
+
class we {
|
|
111
111
|
constructor() {
|
|
112
112
|
this.subscribe = (a) => (this.subscribers.push(a), () => {
|
|
113
113
|
const e = this.subscribers.indexOf(a);
|
|
@@ -121,7 +121,7 @@ class ve {
|
|
|
121
121
|
];
|
|
122
122
|
}, this.create = (a) => {
|
|
123
123
|
var e;
|
|
124
|
-
const { message: o, ...v } = a, l = typeof (a == null ? void 0 : a.id) == "number" || ((e = a.id) == null ? void 0 : e.length) > 0 ? a.id :
|
|
124
|
+
const { message: o, ...v } = a, l = typeof (a == null ? void 0 : a.id) == "number" || ((e = a.id) == null ? void 0 : e.length) > 0 ? a.id : Dt++, u = this.toasts.find((b) => b.id === l), h = a.dismissible === void 0 ? !0 : a.dismissible;
|
|
125
125
|
return this.dismissedToasts.has(l) && this.dismissedToasts.delete(l), u ? this.toasts = this.toasts.map((b) => b.id === l ? (this.publish({
|
|
126
126
|
...b,
|
|
127
127
|
...a,
|
|
@@ -193,7 +193,7 @@ class ve {
|
|
|
193
193
|
type: "default",
|
|
194
194
|
message: r
|
|
195
195
|
});
|
|
196
|
-
else if (
|
|
196
|
+
else if (Ee(r) && !r.ok) {
|
|
197
197
|
l = !1;
|
|
198
198
|
const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${r.status}`) : e.error, T = typeof e.description == "function" ? await e.description(`HTTP error! status: ${r.status}`) : e.description, k = typeof t == "object" && !s.isValidElement(t) ? t : {
|
|
199
199
|
message: t
|
|
@@ -233,14 +233,14 @@ class ve {
|
|
|
233
233
|
r
|
|
234
234
|
], e.error !== void 0) {
|
|
235
235
|
l = !1;
|
|
236
|
-
const N = typeof e.error == "function" ? await e.error(r) : e.error, t = typeof e.description == "function" ? await e.description(r) : e.description,
|
|
236
|
+
const N = typeof e.error == "function" ? await e.error(r) : e.error, t = typeof e.description == "function" ? await e.description(r) : e.description, H = typeof N == "object" && !s.isValidElement(N) ? N : {
|
|
237
237
|
message: N
|
|
238
238
|
};
|
|
239
239
|
this.create({
|
|
240
240
|
id: o,
|
|
241
241
|
type: "error",
|
|
242
242
|
description: t,
|
|
243
|
-
...
|
|
243
|
+
...H
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
}).finally(() => {
|
|
@@ -252,7 +252,7 @@ class ve {
|
|
|
252
252
|
unwrap: b
|
|
253
253
|
});
|
|
254
254
|
}, this.custom = (a, e) => {
|
|
255
|
-
const o = (e == null ? void 0 : e.id) ||
|
|
255
|
+
const o = (e == null ? void 0 : e.id) || Dt++;
|
|
256
256
|
return this.create({
|
|
257
257
|
jsx: a(o),
|
|
258
258
|
id: o,
|
|
@@ -261,14 +261,14 @@ class ve {
|
|
|
261
261
|
}, this.getActiveToasts = () => this.toasts.filter((a) => !this.dismissedToasts.has(a.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
const S = new
|
|
265
|
-
const e = (a == null ? void 0 : a.id) ||
|
|
264
|
+
const S = new we(), xe = (n, a) => {
|
|
265
|
+
const e = (a == null ? void 0 : a.id) || Dt++;
|
|
266
266
|
return S.addToast({
|
|
267
267
|
title: n,
|
|
268
268
|
...a,
|
|
269
269
|
id: e
|
|
270
270
|
}), e;
|
|
271
|
-
},
|
|
271
|
+
}, Ee = (n) => n && typeof n == "object" && "ok" in n && typeof n.ok == "boolean" && "status" in n && typeof n.status == "number", Te = xe, ke = () => S.toasts, Ne = () => S.getActiveToasts(), F = Object.assign(Te, {
|
|
272
272
|
success: S.success,
|
|
273
273
|
info: S.info,
|
|
274
274
|
warning: S.warning,
|
|
@@ -279,53 +279,53 @@ const S = new ve(), ye = (n, a) => {
|
|
|
279
279
|
dismiss: S.dismiss,
|
|
280
280
|
loading: S.loading
|
|
281
281
|
}, {
|
|
282
|
-
getHistory:
|
|
283
|
-
getToasts:
|
|
282
|
+
getHistory: ke,
|
|
283
|
+
getToasts: Ne
|
|
284
284
|
});
|
|
285
|
-
le("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
286
|
-
function
|
|
285
|
+
ce("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
286
|
+
function bt(n) {
|
|
287
287
|
return n.label !== void 0;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const Se = 3, De = "24px", _e = "16px", jt = 4e3, Re = 356, Ce = 14, Be = 45, Me = 200;
|
|
290
290
|
function z(...n) {
|
|
291
291
|
return n.filter(Boolean).join(" ");
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Ie(n) {
|
|
294
294
|
const [a, e] = n.split("-"), o = [];
|
|
295
295
|
return a && o.push(a), e && o.push(e), o;
|
|
296
296
|
}
|
|
297
|
-
const
|
|
297
|
+
const Ae = (n) => {
|
|
298
298
|
var a, e, o, v, l, u, h, b, r;
|
|
299
|
-
const { invert: N, toast: t, unstyled: T, interacting:
|
|
300
|
-
|
|
299
|
+
const { invert: N, toast: t, unstyled: T, interacting: H, setHeights: k, visibleToasts: wt, heights: K, index: c, toasts: it, expanded: q, removeToast: lt, defaultRichColors: xt, closeButton: j, style: st, cancelButtonStyle: V, actionButtonStyle: Et, className: dt = "", descriptionClassName: Tt = "", duration: nt, position: A, gap: ct, expandByDefault: ot, classNames: f, icons: w, closeButtonAriaLabel: $ = "Close toast" } = n, [W, B] = s.useState(null), [X, ut] = s.useState(null), [d, g] = s.useState(!1), [p, R] = s.useState(!1), [G, m] = s.useState(!1), [Q, ft] = s.useState(!1), [mt, J] = s.useState(!1), [Yt, kt] = s.useState(0), [Ft, _t] = s.useState(0), rt = s.useRef(t.duration || nt || jt), Rt = s.useRef(null), P = s.useRef(null), Vt = c === 0, Wt = c + 1 <= wt, D = t.type, Z = t.dismissible !== !1, Xt = t.className || "", Ut = t.descriptionClassName || "", pt = s.useMemo(() => K.findIndex((i) => i.toastId === t.id) || 0, [
|
|
300
|
+
K,
|
|
301
301
|
t.id
|
|
302
|
-
]),
|
|
302
|
+
]), Kt = s.useMemo(() => {
|
|
303
303
|
var i;
|
|
304
304
|
return (i = t.closeButton) != null ? i : j;
|
|
305
305
|
}, [
|
|
306
306
|
t.closeButton,
|
|
307
307
|
j
|
|
308
|
-
]),
|
|
308
|
+
]), Ct = s.useMemo(() => t.duration || nt || jt, [
|
|
309
309
|
t.duration,
|
|
310
|
-
|
|
311
|
-
]),
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
]),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
310
|
+
nt
|
|
311
|
+
]), Nt = s.useRef(0), tt = s.useRef(0), Bt = s.useRef(0), et = s.useRef(null), [qt, Gt] = A.split("-"), Mt = s.useMemo(() => K.reduce((i, y, E) => E >= pt ? i : i + y.height, 0), [
|
|
312
|
+
K,
|
|
313
|
+
pt
|
|
314
|
+
]), It = ye(), Qt = t.invert || N, St = D === "loading";
|
|
315
|
+
tt.current = s.useMemo(() => pt * ct + Mt, [
|
|
316
|
+
pt,
|
|
317
|
+
Mt
|
|
318
318
|
]), s.useEffect(() => {
|
|
319
|
-
|
|
319
|
+
rt.current = Ct;
|
|
320
320
|
}, [
|
|
321
|
-
|
|
321
|
+
Ct
|
|
322
322
|
]), s.useEffect(() => {
|
|
323
323
|
g(!0);
|
|
324
324
|
}, []), s.useEffect(() => {
|
|
325
325
|
const i = P.current;
|
|
326
326
|
if (i) {
|
|
327
327
|
const y = i.getBoundingClientRect().height;
|
|
328
|
-
return
|
|
328
|
+
return _t(y), k((E) => [
|
|
329
329
|
{
|
|
330
330
|
toastId: t.id,
|
|
331
331
|
height: y,
|
|
@@ -342,10 +342,10 @@ const Me = (n) => {
|
|
|
342
342
|
const i = P.current, y = i.style.height;
|
|
343
343
|
i.style.height = "auto";
|
|
344
344
|
const E = i.getBoundingClientRect().height;
|
|
345
|
-
i.style.height = y,
|
|
346
|
-
...
|
|
345
|
+
i.style.height = y, _t(E), k((_) => _.find((x) => x.toastId === t.id) ? _.map((x) => x.toastId === t.id ? {
|
|
346
|
+
...x,
|
|
347
347
|
height: E
|
|
348
|
-
} :
|
|
348
|
+
} : x) : [
|
|
349
349
|
{
|
|
350
350
|
toastId: t.id,
|
|
351
351
|
height: E,
|
|
@@ -363,157 +363,157 @@ const Me = (n) => {
|
|
|
363
363
|
t.action,
|
|
364
364
|
t.cancel
|
|
365
365
|
]);
|
|
366
|
-
const
|
|
367
|
-
R(!0),
|
|
368
|
-
|
|
369
|
-
},
|
|
366
|
+
const Y = s.useCallback(() => {
|
|
367
|
+
R(!0), kt(tt.current), k((i) => i.filter((y) => y.toastId !== t.id)), setTimeout(() => {
|
|
368
|
+
lt(t);
|
|
369
|
+
}, Me);
|
|
370
370
|
}, [
|
|
371
371
|
t,
|
|
372
|
-
|
|
372
|
+
lt,
|
|
373
373
|
k,
|
|
374
|
-
|
|
374
|
+
tt
|
|
375
375
|
]);
|
|
376
376
|
s.useEffect(() => {
|
|
377
377
|
if (t.promise && D === "loading" || t.duration === 1 / 0 || t.type === "loading") return;
|
|
378
378
|
let i;
|
|
379
|
-
return
|
|
380
|
-
if (
|
|
381
|
-
const _ = (/* @__PURE__ */ new Date()).getTime() -
|
|
382
|
-
|
|
379
|
+
return q || H || It ? (() => {
|
|
380
|
+
if (Bt.current < Nt.current) {
|
|
381
|
+
const _ = (/* @__PURE__ */ new Date()).getTime() - Nt.current;
|
|
382
|
+
rt.current = rt.current - _;
|
|
383
383
|
}
|
|
384
|
-
|
|
384
|
+
Bt.current = (/* @__PURE__ */ new Date()).getTime();
|
|
385
385
|
})() : (() => {
|
|
386
|
-
|
|
387
|
-
t.onAutoClose == null || t.onAutoClose.call(t, t),
|
|
388
|
-
},
|
|
386
|
+
rt.current !== 1 / 0 && (Nt.current = (/* @__PURE__ */ new Date()).getTime(), i = setTimeout(() => {
|
|
387
|
+
t.onAutoClose == null || t.onAutoClose.call(t, t), Y();
|
|
388
|
+
}, rt.current));
|
|
389
389
|
})(), () => clearTimeout(i);
|
|
390
390
|
}, [
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
q,
|
|
392
|
+
H,
|
|
393
393
|
t,
|
|
394
394
|
D,
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
It,
|
|
396
|
+
Y
|
|
397
397
|
]), s.useEffect(() => {
|
|
398
|
-
t.delete && (
|
|
398
|
+
t.delete && (Y(), t.onDismiss == null || t.onDismiss.call(t, t));
|
|
399
399
|
}, [
|
|
400
|
-
|
|
400
|
+
Y,
|
|
401
401
|
t.delete
|
|
402
402
|
]);
|
|
403
|
-
function
|
|
403
|
+
function Jt() {
|
|
404
404
|
var i;
|
|
405
|
-
if (
|
|
405
|
+
if (w != null && w.loading) {
|
|
406
406
|
var y;
|
|
407
407
|
return /* @__PURE__ */ s.createElement("div", {
|
|
408
408
|
className: z(f == null ? void 0 : f.loader, t == null || (y = t.classNames) == null ? void 0 : y.loader, "sonner-loader"),
|
|
409
409
|
"data-visible": D === "loading"
|
|
410
|
-
},
|
|
410
|
+
}, w.loading);
|
|
411
411
|
}
|
|
412
|
-
return /* @__PURE__ */ s.createElement(
|
|
412
|
+
return /* @__PURE__ */ s.createElement(me, {
|
|
413
413
|
className: z(f == null ? void 0 : f.loader, t == null || (i = t.classNames) == null ? void 0 : i.loader),
|
|
414
414
|
visible: D === "loading"
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
-
const
|
|
418
|
-
var
|
|
417
|
+
const Zt = t.icon || (w == null ? void 0 : w[D]) || ue(D);
|
|
418
|
+
var At, zt;
|
|
419
419
|
return /* @__PURE__ */ s.createElement("li", {
|
|
420
420
|
tabIndex: 0,
|
|
421
421
|
ref: P,
|
|
422
|
-
className: z(
|
|
422
|
+
className: z(dt, Xt, f == null ? void 0 : f.toast, t == null || (a = t.classNames) == null ? void 0 : a.toast, f == null ? void 0 : f.default, f == null ? void 0 : f[D], t == null || (e = t.classNames) == null ? void 0 : e[D]),
|
|
423
423
|
"data-sonner-toast": "",
|
|
424
|
-
"data-rich-colors": (
|
|
424
|
+
"data-rich-colors": (At = t.richColors) != null ? At : xt,
|
|
425
425
|
"data-styled": !(t.jsx || t.unstyled || T),
|
|
426
426
|
"data-mounted": d,
|
|
427
427
|
"data-promise": !!t.promise,
|
|
428
|
-
"data-swiped":
|
|
428
|
+
"data-swiped": mt,
|
|
429
429
|
"data-removed": p,
|
|
430
|
-
"data-visible":
|
|
431
|
-
"data-y-position":
|
|
432
|
-
"data-x-position":
|
|
430
|
+
"data-visible": Wt,
|
|
431
|
+
"data-y-position": qt,
|
|
432
|
+
"data-x-position": Gt,
|
|
433
433
|
"data-index": c,
|
|
434
|
-
"data-front":
|
|
435
|
-
"data-swiping":
|
|
436
|
-
"data-dismissible":
|
|
434
|
+
"data-front": Vt,
|
|
435
|
+
"data-swiping": G,
|
|
436
|
+
"data-dismissible": Z,
|
|
437
437
|
"data-type": D,
|
|
438
|
-
"data-invert":
|
|
439
|
-
"data-swipe-out":
|
|
438
|
+
"data-invert": Qt,
|
|
439
|
+
"data-swipe-out": Q,
|
|
440
440
|
"data-swipe-direction": X,
|
|
441
|
-
"data-expanded": !!(
|
|
441
|
+
"data-expanded": !!(q || ot && d),
|
|
442
442
|
"data-testid": t.testId,
|
|
443
443
|
style: {
|
|
444
444
|
"--index": c,
|
|
445
445
|
"--toasts-before": c,
|
|
446
|
-
"--z-index":
|
|
447
|
-
"--offset": `${p ?
|
|
448
|
-
"--initial-height":
|
|
449
|
-
...
|
|
446
|
+
"--z-index": it.length - c,
|
|
447
|
+
"--offset": `${p ? Yt : tt.current}px`,
|
|
448
|
+
"--initial-height": ot ? "auto" : `${Ft}px`,
|
|
449
|
+
...st,
|
|
450
450
|
...t.style
|
|
451
451
|
},
|
|
452
452
|
onDragEnd: () => {
|
|
453
|
-
m(!1), B(null),
|
|
453
|
+
m(!1), B(null), et.current = null;
|
|
454
454
|
},
|
|
455
455
|
onPointerDown: (i) => {
|
|
456
|
-
i.button !== 2 && (
|
|
456
|
+
i.button !== 2 && (St || !Z || (Rt.current = /* @__PURE__ */ new Date(), kt(tt.current), i.target.setPointerCapture(i.pointerId), i.target.tagName !== "BUTTON" && (m(!0), et.current = {
|
|
457
457
|
x: i.clientX,
|
|
458
458
|
y: i.clientY
|
|
459
459
|
})));
|
|
460
460
|
},
|
|
461
461
|
onPointerUp: () => {
|
|
462
462
|
var i, y, E;
|
|
463
|
-
if (
|
|
464
|
-
|
|
465
|
-
const _ = Number(((i = P.current) == null ? void 0 : i.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0),
|
|
466
|
-
if (Math.abs(C) >=
|
|
467
|
-
|
|
463
|
+
if (Q || !Z) return;
|
|
464
|
+
et.current = null;
|
|
465
|
+
const _ = Number(((i = P.current) == null ? void 0 : i.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), gt = Number(((y = P.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), x = (/* @__PURE__ */ new Date()).getTime() - ((E = Rt.current) == null ? void 0 : E.getTime()), C = W === "x" ? _ : gt, ht = Math.abs(C) / x;
|
|
466
|
+
if (Math.abs(C) >= Be || ht > 0.11) {
|
|
467
|
+
kt(tt.current), t.onDismiss == null || t.onDismiss.call(t, t), ut(W === "x" ? _ > 0 ? "right" : "left" : gt > 0 ? "down" : "up"), Y(), ft(!0);
|
|
468
468
|
return;
|
|
469
469
|
} else {
|
|
470
470
|
var M, I;
|
|
471
471
|
(M = P.current) == null || M.style.setProperty("--swipe-amount-x", "0px"), (I = P.current) == null || I.style.setProperty("--swipe-amount-y", "0px");
|
|
472
472
|
}
|
|
473
|
-
|
|
473
|
+
J(!1), m(!1), B(null);
|
|
474
474
|
},
|
|
475
475
|
onPointerMove: (i) => {
|
|
476
476
|
var y, E, _;
|
|
477
|
-
if (!
|
|
478
|
-
const
|
|
479
|
-
var
|
|
480
|
-
const M = (
|
|
481
|
-
!
|
|
477
|
+
if (!et.current || !Z || ((y = window.getSelection()) == null ? void 0 : y.toString().length) > 0) return;
|
|
478
|
+
const x = i.clientY - et.current.y, C = i.clientX - et.current.x;
|
|
479
|
+
var ht;
|
|
480
|
+
const M = (ht = n.swipeDirections) != null ? ht : Ie(A);
|
|
481
|
+
!W && (Math.abs(C) > 1 || Math.abs(x) > 1) && B(Math.abs(C) > Math.abs(x) ? "x" : "y");
|
|
482
482
|
let I = {
|
|
483
483
|
x: 0,
|
|
484
484
|
y: 0
|
|
485
485
|
};
|
|
486
|
-
const
|
|
487
|
-
if (
|
|
486
|
+
const Ot = (U) => 1 / (1.5 + Math.abs(U) / 20);
|
|
487
|
+
if (W === "y") {
|
|
488
488
|
if (M.includes("top") || M.includes("bottom"))
|
|
489
|
-
if (M.includes("top") &&
|
|
490
|
-
I.y =
|
|
489
|
+
if (M.includes("top") && x < 0 || M.includes("bottom") && x > 0)
|
|
490
|
+
I.y = x;
|
|
491
491
|
else {
|
|
492
|
-
const U =
|
|
493
|
-
I.y = Math.abs(U) < Math.abs(
|
|
492
|
+
const U = x * Ot(x);
|
|
493
|
+
I.y = Math.abs(U) < Math.abs(x) ? U : x;
|
|
494
494
|
}
|
|
495
|
-
} else if (
|
|
495
|
+
} else if (W === "x" && (M.includes("left") || M.includes("right")))
|
|
496
496
|
if (M.includes("left") && C < 0 || M.includes("right") && C > 0)
|
|
497
497
|
I.x = C;
|
|
498
498
|
else {
|
|
499
|
-
const U = C *
|
|
499
|
+
const U = C * Ot(C);
|
|
500
500
|
I.x = Math.abs(U) < Math.abs(C) ? U : C;
|
|
501
501
|
}
|
|
502
|
-
(Math.abs(I.x) > 0 || Math.abs(I.y) > 0) &&
|
|
502
|
+
(Math.abs(I.x) > 0 || Math.abs(I.y) > 0) && J(!0), (E = P.current) == null || E.style.setProperty("--swipe-amount-x", `${I.x}px`), (_ = P.current) == null || _.style.setProperty("--swipe-amount-y", `${I.y}px`);
|
|
503
503
|
}
|
|
504
|
-
},
|
|
505
|
-
"aria-label":
|
|
506
|
-
"data-disabled":
|
|
504
|
+
}, Kt && !t.jsx && D !== "loading" ? /* @__PURE__ */ s.createElement("button", {
|
|
505
|
+
"aria-label": $,
|
|
506
|
+
"data-disabled": St,
|
|
507
507
|
"data-close-button": !0,
|
|
508
|
-
onClick:
|
|
508
|
+
onClick: St || !Z ? () => {
|
|
509
509
|
} : () => {
|
|
510
|
-
|
|
510
|
+
Y(), t.onDismiss == null || t.onDismiss.call(t, t);
|
|
511
511
|
},
|
|
512
512
|
className: z(f == null ? void 0 : f.closeButton, t == null || (o = t.classNames) == null ? void 0 : o.closeButton)
|
|
513
|
-
}, (
|
|
513
|
+
}, (zt = w == null ? void 0 : w.close) != null ? zt : ve) : null, (D || t.icon || t.promise) && t.icon !== null && ((w == null ? void 0 : w[D]) !== null || t.icon) ? /* @__PURE__ */ s.createElement("div", {
|
|
514
514
|
"data-icon": "",
|
|
515
515
|
className: z(f == null ? void 0 : f.icon, t == null || (v = t.classNames) == null ? void 0 : v.icon)
|
|
516
|
-
}, t.promise || t.type === "loading" && !t.icon ? t.icon ||
|
|
516
|
+
}, t.promise || t.type === "loading" && !t.icon ? t.icon || Jt() : null, t.type !== "loading" ? Zt : null) : null, /* @__PURE__ */ s.createElement("div", {
|
|
517
517
|
"data-content": "",
|
|
518
518
|
className: z(f == null ? void 0 : f.content, t == null || (l = t.classNames) == null ? void 0 : l.content)
|
|
519
519
|
}, /* @__PURE__ */ s.createElement("div", {
|
|
@@ -521,37 +521,37 @@ const Me = (n) => {
|
|
|
521
521
|
className: z(f == null ? void 0 : f.title, t == null || (u = t.classNames) == null ? void 0 : u.title)
|
|
522
522
|
}, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ s.createElement("div", {
|
|
523
523
|
"data-description": "",
|
|
524
|
-
className: z(
|
|
525
|
-
}, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ s.isValidElement(t.cancel) ? t.cancel : t.cancel &&
|
|
524
|
+
className: z(Tt, Ut, f == null ? void 0 : f.description, t == null || (h = t.classNames) == null ? void 0 : h.description)
|
|
525
|
+
}, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ s.isValidElement(t.cancel) ? t.cancel : t.cancel && bt(t.cancel) ? /* @__PURE__ */ s.createElement("button", {
|
|
526
526
|
"data-button": !0,
|
|
527
527
|
"data-cancel": !0,
|
|
528
|
-
style: t.cancelButtonStyle ||
|
|
528
|
+
style: t.cancelButtonStyle || V,
|
|
529
529
|
onClick: (i) => {
|
|
530
|
-
|
|
530
|
+
bt(t.cancel) && Z && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, i), Y());
|
|
531
531
|
},
|
|
532
532
|
className: z(f == null ? void 0 : f.cancelButton, t == null || (b = t.classNames) == null ? void 0 : b.cancelButton)
|
|
533
|
-
}, t.cancel.label) : null, /* @__PURE__ */ s.isValidElement(t.action) ? t.action : t.action &&
|
|
533
|
+
}, t.cancel.label) : null, /* @__PURE__ */ s.isValidElement(t.action) ? t.action : t.action && bt(t.action) ? /* @__PURE__ */ s.createElement("button", {
|
|
534
534
|
"data-button": !0,
|
|
535
535
|
"data-action": !0,
|
|
536
|
-
style: t.actionButtonStyle ||
|
|
536
|
+
style: t.actionButtonStyle || Et,
|
|
537
537
|
onClick: (i) => {
|
|
538
|
-
|
|
538
|
+
bt(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, i), !i.defaultPrevented && Y());
|
|
539
539
|
},
|
|
540
540
|
className: z(f == null ? void 0 : f.actionButton, t == null || (r = t.classNames) == null ? void 0 : r.actionButton)
|
|
541
541
|
}, t.action.label) : null);
|
|
542
542
|
};
|
|
543
|
-
function
|
|
543
|
+
function Pt() {
|
|
544
544
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
545
545
|
const n = document.documentElement.getAttribute("dir");
|
|
546
546
|
return n === "auto" || !n ? window.getComputedStyle(document.documentElement).direction : n;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function ze(n, a) {
|
|
549
549
|
const e = {};
|
|
550
550
|
return [
|
|
551
551
|
n,
|
|
552
552
|
a
|
|
553
553
|
].forEach((o, v) => {
|
|
554
|
-
const l = v === 1, u = l ? "--mobile-offset" : "--offset", h = l ?
|
|
554
|
+
const l = v === 1, u = l ? "--mobile-offset" : "--offset", h = l ? _e : De;
|
|
555
555
|
function b(r) {
|
|
556
556
|
[
|
|
557
557
|
"top",
|
|
@@ -572,20 +572,20 @@ function Ie(n, a) {
|
|
|
572
572
|
}) : b(h);
|
|
573
573
|
}), e;
|
|
574
574
|
}
|
|
575
|
-
const
|
|
575
|
+
const Oe = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
576
576
|
const { id: o, invert: v, position: l = "bottom-right", hotkey: u = [
|
|
577
577
|
"altKey",
|
|
578
578
|
"KeyT"
|
|
579
|
-
], expand: h, closeButton: b, className: r, offset: N, mobileOffset: t, theme: T = "light", richColors:
|
|
579
|
+
], expand: h, closeButton: b, className: r, offset: N, mobileOffset: t, theme: T = "light", richColors: H, duration: k, style: wt, visibleToasts: K = Se, toastOptions: c, dir: it = Pt(), gap: q = Ce, icons: lt, containerAriaLabel: xt = "Notifications" } = a, [j, st] = s.useState([]), V = s.useMemo(() => o ? j.filter((d) => d.toasterId === o) : j.filter((d) => !d.toasterId), [
|
|
580
580
|
j,
|
|
581
581
|
o
|
|
582
|
-
]),
|
|
582
|
+
]), Et = s.useMemo(() => Array.from(new Set([
|
|
583
583
|
l
|
|
584
|
-
].concat(
|
|
585
|
-
|
|
584
|
+
].concat(V.filter((d) => d.position).map((d) => d.position)))), [
|
|
585
|
+
V,
|
|
586
586
|
l
|
|
587
|
-
]), [
|
|
588
|
-
|
|
587
|
+
]), [dt, Tt] = s.useState([]), [nt, A] = s.useState(!1), [ct, ot] = s.useState(!1), [f, w] = s.useState(T !== "system" ? T : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), $ = s.useRef(null), W = u.join("+").replace(/Key/g, "").replace(/Digit/g, ""), B = s.useRef(null), X = s.useRef(!1), ut = s.useCallback((d) => {
|
|
588
|
+
st((g) => {
|
|
589
589
|
var p;
|
|
590
590
|
return (p = g.find((R) => R.id === d.id)) != null && p.delete || S.dismiss(d.id), g.filter(({ id: R }) => R !== d.id);
|
|
591
591
|
});
|
|
@@ -593,7 +593,7 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
593
593
|
return s.useEffect(() => S.subscribe((d) => {
|
|
594
594
|
if (d.dismiss) {
|
|
595
595
|
requestAnimationFrame(() => {
|
|
596
|
-
|
|
596
|
+
st((g) => g.map((p) => p.id === d.id ? {
|
|
597
597
|
...p,
|
|
598
598
|
delete: !0
|
|
599
599
|
} : p));
|
|
@@ -601,8 +601,8 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
setTimeout(() => {
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
ae.flushSync(() => {
|
|
605
|
+
st((g) => {
|
|
606
606
|
const p = g.findIndex((R) => R.id === d.id);
|
|
607
607
|
return p !== -1 ? [
|
|
608
608
|
...g.slice(0, p),
|
|
@@ -622,19 +622,19 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
622
622
|
j
|
|
623
623
|
]), s.useEffect(() => {
|
|
624
624
|
if (T !== "system") {
|
|
625
|
-
|
|
625
|
+
w(T);
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
if (T === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
628
|
+
if (T === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? w("dark") : w("light")), typeof window > "u") return;
|
|
629
629
|
const d = window.matchMedia("(prefers-color-scheme: dark)");
|
|
630
630
|
try {
|
|
631
631
|
d.addEventListener("change", ({ matches: g }) => {
|
|
632
|
-
|
|
632
|
+
w(g ? "dark" : "light");
|
|
633
633
|
});
|
|
634
634
|
} catch {
|
|
635
635
|
d.addListener(({ matches: p }) => {
|
|
636
636
|
try {
|
|
637
|
-
|
|
637
|
+
w(p ? "dark" : "light");
|
|
638
638
|
} catch (R) {
|
|
639
639
|
console.error(R);
|
|
640
640
|
}
|
|
@@ -650,51 +650,51 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
650
650
|
const d = (g) => {
|
|
651
651
|
var p;
|
|
652
652
|
if (u.every((m) => g[m] || g.code === m)) {
|
|
653
|
-
var
|
|
654
|
-
A(!0), (
|
|
653
|
+
var G;
|
|
654
|
+
A(!0), (G = $.current) == null || G.focus();
|
|
655
655
|
}
|
|
656
|
-
g.code === "Escape" && (document.activeElement ===
|
|
656
|
+
g.code === "Escape" && (document.activeElement === $.current || (p = $.current) != null && p.contains(document.activeElement)) && A(!1);
|
|
657
657
|
};
|
|
658
658
|
return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
|
|
659
659
|
}, [
|
|
660
660
|
u
|
|
661
661
|
]), s.useEffect(() => {
|
|
662
|
-
if (
|
|
662
|
+
if ($.current)
|
|
663
663
|
return () => {
|
|
664
664
|
B.current && (B.current.focus({
|
|
665
665
|
preventScroll: !0
|
|
666
666
|
}), B.current = null, X.current = !1);
|
|
667
667
|
};
|
|
668
668
|
}, [
|
|
669
|
-
|
|
669
|
+
$.current
|
|
670
670
|
]), // Remove item from normal navigation flow, only available via hotkey
|
|
671
671
|
/* @__PURE__ */ s.createElement("section", {
|
|
672
672
|
ref: e,
|
|
673
|
-
"aria-label": `${
|
|
673
|
+
"aria-label": `${xt} ${W}`,
|
|
674
674
|
tabIndex: -1,
|
|
675
675
|
"aria-live": "polite",
|
|
676
676
|
"aria-relevant": "additions text",
|
|
677
677
|
"aria-atomic": "false",
|
|
678
678
|
suppressHydrationWarning: !0
|
|
679
|
-
},
|
|
679
|
+
}, Et.map((d, g) => {
|
|
680
680
|
var p;
|
|
681
|
-
const [R,
|
|
682
|
-
return
|
|
681
|
+
const [R, G] = d.split("-");
|
|
682
|
+
return V.length ? /* @__PURE__ */ s.createElement("ol", {
|
|
683
683
|
key: d,
|
|
684
|
-
dir:
|
|
684
|
+
dir: it === "auto" ? Pt() : it,
|
|
685
685
|
tabIndex: -1,
|
|
686
|
-
ref:
|
|
686
|
+
ref: $,
|
|
687
687
|
className: r,
|
|
688
688
|
"data-sonner-toaster": !0,
|
|
689
689
|
"data-sonner-theme": f,
|
|
690
690
|
"data-y-position": R,
|
|
691
|
-
"data-x-position":
|
|
691
|
+
"data-x-position": G,
|
|
692
692
|
style: {
|
|
693
|
-
"--front-toast-height": `${((p =
|
|
694
|
-
"--width": `${
|
|
695
|
-
"--gap": `${
|
|
696
|
-
...
|
|
697
|
-
...
|
|
693
|
+
"--front-toast-height": `${((p = dt[0]) == null ? void 0 : p.height) || 0}px`,
|
|
694
|
+
"--width": `${Re}px`,
|
|
695
|
+
"--gap": `${q}px`,
|
|
696
|
+
...wt,
|
|
697
|
+
...ze(N, t)
|
|
698
698
|
},
|
|
699
699
|
onBlur: (m) => {
|
|
700
700
|
X.current && !m.currentTarget.contains(m.relatedTarget) && (X.current = !1, B.current && (B.current.focus({
|
|
@@ -707,28 +707,28 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
707
707
|
onMouseEnter: () => A(!0),
|
|
708
708
|
onMouseMove: () => A(!0),
|
|
709
709
|
onMouseLeave: () => {
|
|
710
|
-
|
|
710
|
+
ct || A(!1);
|
|
711
711
|
},
|
|
712
712
|
onDragEnd: () => A(!1),
|
|
713
713
|
onPointerDown: (m) => {
|
|
714
|
-
m.target instanceof HTMLElement && m.target.dataset.dismissible === "false" ||
|
|
714
|
+
m.target instanceof HTMLElement && m.target.dataset.dismissible === "false" || ot(!0);
|
|
715
715
|
},
|
|
716
|
-
onPointerUp: () =>
|
|
717
|
-
},
|
|
718
|
-
var
|
|
719
|
-
return /* @__PURE__ */ s.createElement(
|
|
716
|
+
onPointerUp: () => ot(!1)
|
|
717
|
+
}, V.filter((m) => !m.position && g === 0 || m.position === d).map((m, Q) => {
|
|
718
|
+
var ft, mt;
|
|
719
|
+
return /* @__PURE__ */ s.createElement(Ae, {
|
|
720
720
|
key: m.id,
|
|
721
|
-
icons:
|
|
722
|
-
index:
|
|
721
|
+
icons: lt,
|
|
722
|
+
index: Q,
|
|
723
723
|
toast: m,
|
|
724
|
-
defaultRichColors:
|
|
725
|
-
duration: (
|
|
724
|
+
defaultRichColors: H,
|
|
725
|
+
duration: (ft = c == null ? void 0 : c.duration) != null ? ft : k,
|
|
726
726
|
className: c == null ? void 0 : c.className,
|
|
727
727
|
descriptionClassName: c == null ? void 0 : c.descriptionClassName,
|
|
728
728
|
invert: v,
|
|
729
|
-
visibleToasts:
|
|
730
|
-
closeButton: (
|
|
731
|
-
interacting:
|
|
729
|
+
visibleToasts: K,
|
|
730
|
+
closeButton: (mt = c == null ? void 0 : c.closeButton) != null ? mt : b,
|
|
731
|
+
interacting: ct,
|
|
732
732
|
position: d,
|
|
733
733
|
style: c == null ? void 0 : c.style,
|
|
734
734
|
unstyled: c == null ? void 0 : c.unstyled,
|
|
@@ -736,44 +736,44 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
736
736
|
cancelButtonStyle: c == null ? void 0 : c.cancelButtonStyle,
|
|
737
737
|
actionButtonStyle: c == null ? void 0 : c.actionButtonStyle,
|
|
738
738
|
closeButtonAriaLabel: c == null ? void 0 : c.closeButtonAriaLabel,
|
|
739
|
-
removeToast:
|
|
740
|
-
toasts:
|
|
741
|
-
heights:
|
|
742
|
-
setHeights:
|
|
739
|
+
removeToast: ut,
|
|
740
|
+
toasts: V.filter((J) => J.position == m.position),
|
|
741
|
+
heights: dt.filter((J) => J.position == m.position),
|
|
742
|
+
setHeights: Tt,
|
|
743
743
|
expandByDefault: h,
|
|
744
|
-
gap:
|
|
745
|
-
expanded:
|
|
744
|
+
gap: q,
|
|
745
|
+
expanded: nt,
|
|
746
746
|
swipeDirections: a.swipeDirections
|
|
747
747
|
});
|
|
748
748
|
})) : null;
|
|
749
749
|
}));
|
|
750
|
-
}),
|
|
751
|
-
info: /* @__PURE__ */
|
|
752
|
-
|
|
750
|
+
}), He = {
|
|
751
|
+
info: /* @__PURE__ */ O(
|
|
752
|
+
le,
|
|
753
753
|
{
|
|
754
754
|
"aria-hidden": "true",
|
|
755
755
|
size: 20,
|
|
756
756
|
className: "ds:shrink-0 ds:text-[var(--info)]"
|
|
757
757
|
}
|
|
758
758
|
),
|
|
759
|
-
success: /* @__PURE__ */
|
|
760
|
-
|
|
759
|
+
success: /* @__PURE__ */ O(
|
|
760
|
+
ie,
|
|
761
761
|
{
|
|
762
762
|
"aria-hidden": "true",
|
|
763
763
|
size: 20,
|
|
764
764
|
className: "ds:shrink-0 ds:text-[var(--success)]"
|
|
765
765
|
}
|
|
766
766
|
),
|
|
767
|
-
warning: /* @__PURE__ */
|
|
768
|
-
|
|
767
|
+
warning: /* @__PURE__ */ O(
|
|
768
|
+
re,
|
|
769
769
|
{
|
|
770
770
|
"aria-hidden": "true",
|
|
771
771
|
size: 20,
|
|
772
772
|
className: "ds:shrink-0 ds:text-[var(--warning)]"
|
|
773
773
|
}
|
|
774
774
|
),
|
|
775
|
-
error: /* @__PURE__ */
|
|
776
|
-
|
|
775
|
+
error: /* @__PURE__ */ O(
|
|
776
|
+
oe,
|
|
777
777
|
{
|
|
778
778
|
"aria-hidden": "true",
|
|
779
779
|
size: 20,
|
|
@@ -781,9 +781,24 @@ const Ae = /* @__PURE__ */ s.forwardRef(function(a, e) {
|
|
|
781
781
|
}
|
|
782
782
|
)
|
|
783
783
|
};
|
|
784
|
-
let
|
|
785
|
-
const
|
|
786
|
-
function
|
|
784
|
+
let L = null;
|
|
785
|
+
const vt = /* @__PURE__ */ new Set();
|
|
786
|
+
function je() {
|
|
787
|
+
const [n] = Lt(() => Symbol("toaster")), [, a] = ee((e) => e + 1, 0);
|
|
788
|
+
return L === null && (L = n), $t(() => {
|
|
789
|
+
const e = () => {
|
|
790
|
+
L !== null && L !== n || (L = n, vt.delete(e), a());
|
|
791
|
+
};
|
|
792
|
+
return L !== n && (vt.add(e), e()), () => {
|
|
793
|
+
if (vt.delete(e), L === n) {
|
|
794
|
+
L = null;
|
|
795
|
+
for (const o of [...vt]) o();
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
}, [n]), L === n;
|
|
799
|
+
}
|
|
800
|
+
const at = /* @__PURE__ */ new Set();
|
|
801
|
+
function Pe(n) {
|
|
787
802
|
const a = typeof document < "u" && document.documentElement.dir === "rtl";
|
|
788
803
|
return {
|
|
789
804
|
"top-start": a ? "top-right" : "top-left",
|
|
@@ -794,19 +809,17 @@ function He(n) {
|
|
|
794
809
|
"bottom-end": a ? "bottom-left" : "bottom-right"
|
|
795
810
|
}[n];
|
|
796
811
|
}
|
|
797
|
-
function
|
|
812
|
+
function Le({
|
|
798
813
|
position: n = "bottom-end",
|
|
799
814
|
offset: a = "var(--spacing-lg)",
|
|
800
815
|
gap: e = 8,
|
|
801
816
|
visibleToasts: o = 3,
|
|
802
817
|
className: v
|
|
803
818
|
}) {
|
|
804
|
-
const
|
|
819
|
+
const l = je(), u = te(null), [h, b] = Lt(
|
|
805
820
|
() => typeof document < "u" && document.documentElement.dir || "ltr"
|
|
806
821
|
);
|
|
807
|
-
return
|
|
808
|
-
l && (Nt = !1);
|
|
809
|
-
}, [l]), jt(() => {
|
|
822
|
+
return $t(() => {
|
|
810
823
|
if (!l) return;
|
|
811
824
|
const r = new MutationObserver(() => {
|
|
812
825
|
b(document.documentElement.dir || "ltr");
|
|
@@ -815,14 +828,14 @@ function Oe({
|
|
|
815
828
|
attributes: !0,
|
|
816
829
|
attributeFilter: ["dir"]
|
|
817
830
|
}), () => r.disconnect();
|
|
818
|
-
}, [l]), l ? /* @__PURE__ */
|
|
819
|
-
|
|
831
|
+
}, [l]), l ? /* @__PURE__ */ O(
|
|
832
|
+
Oe,
|
|
820
833
|
{
|
|
821
834
|
ref: (r) => {
|
|
822
835
|
u.current = r, r && r.setAttribute("data-component", "toast-region");
|
|
823
836
|
},
|
|
824
837
|
dir: h,
|
|
825
|
-
position:
|
|
838
|
+
position: Pe(n),
|
|
826
839
|
richColors: !1,
|
|
827
840
|
visibleToasts: o,
|
|
828
841
|
gap: e,
|
|
@@ -851,18 +864,18 @@ function Oe({
|
|
|
851
864
|
}
|
|
852
865
|
) : null;
|
|
853
866
|
}
|
|
854
|
-
|
|
855
|
-
function
|
|
867
|
+
Le.displayName = "Toaster";
|
|
868
|
+
function $e(n, a, e, o) {
|
|
856
869
|
return /* @__PURE__ */ Ht(
|
|
857
870
|
"div",
|
|
858
871
|
{
|
|
859
872
|
"data-toast-id": e,
|
|
860
873
|
className: "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
861
874
|
children: [
|
|
862
|
-
|
|
875
|
+
He[n],
|
|
863
876
|
/* @__PURE__ */ Ht("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
o && /* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ O("span", { dir: "auto", className: "type-label ds:leading-snug ds:break-words", children: a }),
|
|
878
|
+
o && /* @__PURE__ */ O(
|
|
866
879
|
"span",
|
|
867
880
|
{
|
|
868
881
|
dir: "auto",
|
|
@@ -871,28 +884,28 @@ function je(n, a, e, o) {
|
|
|
871
884
|
}
|
|
872
885
|
)
|
|
873
886
|
] }),
|
|
874
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ O(Ye, { toastId: e })
|
|
875
888
|
]
|
|
876
889
|
}
|
|
877
890
|
);
|
|
878
891
|
}
|
|
879
|
-
function
|
|
880
|
-
const { t: a } =
|
|
881
|
-
return /* @__PURE__ */
|
|
882
|
-
|
|
892
|
+
function Ye({ toastId: n }) {
|
|
893
|
+
const { t: a } = se("ui");
|
|
894
|
+
return /* @__PURE__ */ O(
|
|
895
|
+
ne,
|
|
883
896
|
{
|
|
884
|
-
icon: /* @__PURE__ */
|
|
897
|
+
icon: /* @__PURE__ */ O(de, {}),
|
|
885
898
|
intent: "ghost",
|
|
886
899
|
size: "sm",
|
|
887
900
|
"aria-label": a("common.close"),
|
|
888
|
-
onClick: () =>
|
|
901
|
+
onClick: () => F.dismiss(n),
|
|
889
902
|
className: "ds:shrink-0"
|
|
890
903
|
}
|
|
891
904
|
);
|
|
892
905
|
}
|
|
893
|
-
function
|
|
894
|
-
const o = n === "error" ? 1 / 0 : 4e3, v = `${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, l =
|
|
895
|
-
|
|
906
|
+
function yt(n, a, e) {
|
|
907
|
+
const o = n === "error" ? 1 / 0 : 4e3, v = `${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, l = $e(n, a, v, e == null ? void 0 : e.description);
|
|
908
|
+
at.add(v);
|
|
896
909
|
const u = {
|
|
897
910
|
id: v,
|
|
898
911
|
icon: null,
|
|
@@ -901,53 +914,53 @@ function bt(n, a, e) {
|
|
|
901
914
|
cancel: e != null && e.cancel ? { label: e.cancel.label, onClick: e.cancel.onClick } : void 0,
|
|
902
915
|
onDismiss: () => {
|
|
903
916
|
var h;
|
|
904
|
-
|
|
917
|
+
at.delete(v), (h = e == null ? void 0 : e.onDismiss) == null || h.call(e);
|
|
905
918
|
},
|
|
906
919
|
onAutoClose: () => {
|
|
907
920
|
var h;
|
|
908
|
-
|
|
921
|
+
at.delete(v), (h = e == null ? void 0 : e.onAutoClose) == null || h.call(e);
|
|
909
922
|
}
|
|
910
923
|
};
|
|
911
924
|
switch (n) {
|
|
912
925
|
case "error":
|
|
913
|
-
return
|
|
926
|
+
return F.error(l, u);
|
|
914
927
|
case "success":
|
|
915
|
-
return
|
|
928
|
+
return F.success(l, u);
|
|
916
929
|
case "warning":
|
|
917
|
-
return
|
|
930
|
+
return F.warning(l, u);
|
|
918
931
|
case "info":
|
|
919
|
-
return
|
|
932
|
+
return F.info(l, u);
|
|
920
933
|
default:
|
|
921
|
-
return
|
|
934
|
+
return F(l, u);
|
|
922
935
|
}
|
|
923
936
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
937
|
+
function ta(n, a) {
|
|
938
|
+
return yt("info", n, a);
|
|
926
939
|
}
|
|
927
|
-
function
|
|
928
|
-
return
|
|
940
|
+
function ea(n, a) {
|
|
941
|
+
return yt("success", n, a);
|
|
929
942
|
}
|
|
930
|
-
function
|
|
931
|
-
return
|
|
943
|
+
function aa(n, a) {
|
|
944
|
+
return yt("warning", n, a);
|
|
932
945
|
}
|
|
933
|
-
function
|
|
934
|
-
return
|
|
946
|
+
function sa(n, a) {
|
|
947
|
+
return yt("error", n, a);
|
|
935
948
|
}
|
|
936
|
-
const
|
|
937
|
-
getVisibleToasts: () => Array.from(
|
|
949
|
+
const na = {
|
|
950
|
+
getVisibleToasts: () => Array.from(at).map((n) => ({ id: n })),
|
|
938
951
|
dismiss: (n) => {
|
|
939
|
-
|
|
952
|
+
at.delete(n), F.dismiss(n);
|
|
940
953
|
},
|
|
941
954
|
dismissAll: () => {
|
|
942
|
-
|
|
955
|
+
at.clear(), F.dismiss();
|
|
943
956
|
}
|
|
944
957
|
};
|
|
945
958
|
export {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
959
|
+
Le as T,
|
|
960
|
+
sa as a,
|
|
961
|
+
ta as b,
|
|
962
|
+
ea as c,
|
|
963
|
+
aa as d,
|
|
964
|
+
na as t
|
|
952
965
|
};
|
|
953
|
-
//# sourceMappingURL=toast-
|
|
966
|
+
//# sourceMappingURL=toast-DQ1Zu1kk.js.map
|