@ukpc-lib/react 0.15.0 → 0.15.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.
@@ -0,0 +1,320 @@
1
+ import { r as b, R as y } from "./react-to-web-component-w5r1Fs9q.js";
2
+ import { c as F } from "./clsx-DB4S2d7J.js";
3
+ const J = (e) => typeof e == "number" && !isNaN(e), q = (e) => typeof e == "string", k = (e) => typeof e == "function", ne = (e) => q(e) || k(e) ? e : null, ie = (e) => b.isValidElement(e) || q(e) || k(e) || J(e);
4
+ function ye(e, t, o) {
5
+ o === void 0 && (o = 300);
6
+ const { scrollHeight: r, style: a } = e;
7
+ requestAnimationFrame(() => {
8
+ a.minHeight = "initial", a.height = r + "px", a.transition = `all ${o}ms`, requestAnimationFrame(() => {
9
+ a.height = "0", a.padding = "0", a.margin = "0", setTimeout(t, o);
10
+ });
11
+ });
12
+ }
13
+ function se(e) {
14
+ let { enter: t, exit: o, appendPosition: r = !1, collapse: a = !0, collapseDuration: d = 300 } = e;
15
+ return function(n) {
16
+ let { children: E, position: p, preventExitTransition: _, done: u, nodeRef: C, isIn: I, playToast: N } = n;
17
+ const m = r ? `${t}--${p}` : t, c = r ? `${o}--${p}` : o, T = b.useRef(0);
18
+ return b.useLayoutEffect(() => {
19
+ const f = C.current, l = m.split(" "), s = (g) => {
20
+ g.target === C.current && (N(), f.removeEventListener("animationend", s), f.removeEventListener("animationcancel", s), T.current === 0 && g.type !== "animationcancel" && f.classList.remove(...l));
21
+ };
22
+ f.classList.add(...l), f.addEventListener("animationend", s), f.addEventListener("animationcancel", s);
23
+ }, []), b.useEffect(() => {
24
+ const f = C.current, l = () => {
25
+ f.removeEventListener("animationend", l), a ? ye(f, u, d) : u();
26
+ };
27
+ I || (_ ? l() : (T.current = 1, f.className += ` ${c}`, f.addEventListener("animationend", l)));
28
+ }, [I]), y.createElement(y.Fragment, null, E);
29
+ };
30
+ }
31
+ function ce(e, t) {
32
+ return e != null ? { content: e.content, containerId: e.props.containerId, id: e.props.toastId, theme: e.props.theme, type: e.props.type, data: e.props.data || {}, isLoading: e.props.isLoading, icon: e.props.icon, status: t } : {};
33
+ }
34
+ const $ = /* @__PURE__ */ new Map();
35
+ let K = [];
36
+ const le = /* @__PURE__ */ new Set(), ve = (e) => le.forEach((t) => t(e)), ue = () => $.size > 0;
37
+ function pe(e, t) {
38
+ var o;
39
+ if (t)
40
+ return !((o = $.get(t)) == null || !o.isToastActive(e));
41
+ let r = !1;
42
+ return $.forEach((a) => {
43
+ a.isToastActive(e) && (r = !0);
44
+ }), r;
45
+ }
46
+ function fe(e, t) {
47
+ ie(e) && (ue() || K.push({ content: e, options: t }), $.forEach((o) => {
48
+ o.buildToast(e, t);
49
+ }));
50
+ }
51
+ function de(e, t) {
52
+ $.forEach((o) => {
53
+ t != null && t != null && t.containerId ? (t == null ? void 0 : t.containerId) === o.id && o.toggle(e, t == null ? void 0 : t.id) : o.toggle(e, t == null ? void 0 : t.id);
54
+ });
55
+ }
56
+ function he(e) {
57
+ const { subscribe: t, getSnapshot: o, setProps: r } = b.useRef(function(d) {
58
+ const n = d.containerId || 1;
59
+ return { subscribe(E) {
60
+ const p = /* @__PURE__ */ function(u, C, I) {
61
+ let N = 1, m = 0, c = [], T = [], f = [], l = C;
62
+ const s = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), M = () => {
63
+ f = Array.from(s.values()), g.forEach((i) => i());
64
+ }, B = (i) => {
65
+ T = i == null ? [] : T.filter((v) => v !== i), M();
66
+ }, L = (i) => {
67
+ const { toastId: v, onOpen: w, updateId: O, children: S } = i.props, Y = O == null;
68
+ i.staleId && s.delete(i.staleId), s.set(v, i), T = [...T, i.props.toastId].filter((z) => z !== i.staleId), M(), I(ce(i, Y ? "added" : "updated")), Y && k(w) && w(b.isValidElement(S) && S.props);
69
+ };
70
+ return { id: u, props: l, observe: (i) => (g.add(i), () => g.delete(i)), toggle: (i, v) => {
71
+ s.forEach((w) => {
72
+ v != null && v !== w.props.toastId || k(w.toggle) && w.toggle(i);
73
+ });
74
+ }, removeToast: B, toasts: s, clearQueue: () => {
75
+ m -= c.length, c = [];
76
+ }, buildToast: (i, v) => {
77
+ if (((A) => {
78
+ let { containerId: P, toastId: x, updateId: R } = A;
79
+ const V = P ? P !== u : u !== 1, U = s.has(x) && R == null;
80
+ return V || U;
81
+ })(v))
82
+ return;
83
+ const { toastId: w, updateId: O, data: S, staleId: Y, delay: z } = v, Q = () => {
84
+ B(w);
85
+ }, Z = O == null;
86
+ Z && m++;
87
+ const D = { ...l, style: l.toastStyle, key: N++, ...Object.fromEntries(Object.entries(v).filter((A) => {
88
+ let [P, x] = A;
89
+ return x != null;
90
+ })), toastId: w, updateId: O, data: S, closeToast: Q, isIn: !1, className: ne(v.className || l.toastClassName), bodyClassName: ne(v.bodyClassName || l.bodyClassName), progressClassName: ne(v.progressClassName || l.progressClassName), autoClose: !v.isLoading && (H = v.autoClose, j = l.autoClose, H === !1 || J(H) && H > 0 ? H : j), deleteToast() {
91
+ const A = s.get(w), { onClose: P, children: x } = A.props;
92
+ k(P) && P(b.isValidElement(x) && x.props), I(ce(A, "removed")), s.delete(w), m--, m < 0 && (m = 0), c.length > 0 ? L(c.shift()) : M();
93
+ } };
94
+ var H, j;
95
+ D.closeButton = l.closeButton, v.closeButton === !1 || ie(v.closeButton) ? D.closeButton = v.closeButton : v.closeButton === !0 && (D.closeButton = !ie(l.closeButton) || l.closeButton);
96
+ let W = i;
97
+ b.isValidElement(i) && !q(i.type) ? W = b.cloneElement(i, { closeToast: Q, toastProps: D, data: S }) : k(i) && (W = i({ closeToast: Q, toastProps: D, data: S }));
98
+ const X = { content: W, props: D, staleId: Y };
99
+ l.limit && l.limit > 0 && m > l.limit && Z ? c.push(X) : J(z) ? setTimeout(() => {
100
+ L(X);
101
+ }, z) : L(X);
102
+ }, setProps(i) {
103
+ l = i;
104
+ }, setToggle: (i, v) => {
105
+ s.get(i).toggle = v;
106
+ }, isToastActive: (i) => T.some((v) => v === i), getSnapshot: () => f };
107
+ }(n, d, ve);
108
+ $.set(n, p);
109
+ const _ = p.observe(E);
110
+ return K.forEach((u) => fe(u.content, u.options)), K = [], () => {
111
+ _(), $.delete(n);
112
+ };
113
+ }, setProps(E) {
114
+ var p;
115
+ (p = $.get(n)) == null || p.setProps(E);
116
+ }, getSnapshot() {
117
+ var E;
118
+ return (E = $.get(n)) == null ? void 0 : E.getSnapshot();
119
+ } };
120
+ }(e)).current;
121
+ r(e);
122
+ const a = b.useSyncExternalStore(t, o, o);
123
+ return { getToastToRender: function(d) {
124
+ if (!a)
125
+ return [];
126
+ const n = /* @__PURE__ */ new Map();
127
+ return e.newestOnTop && a.reverse(), a.forEach((E) => {
128
+ const { position: p } = E.props;
129
+ n.has(p) || n.set(p, []), n.get(p).push(E);
130
+ }), Array.from(n, (E) => d(E[0], E[1]));
131
+ }, isToastActive: pe, count: a == null ? void 0 : a.length };
132
+ }
133
+ function Ee(e) {
134
+ const [t, o] = b.useState(!1), [r, a] = b.useState(!1), d = b.useRef(null), n = b.useRef({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: E, pauseOnHover: p, closeToast: _, onClick: u, closeOnClick: C } = e;
135
+ var I, N;
136
+ function m() {
137
+ o(!0);
138
+ }
139
+ function c() {
140
+ o(!1);
141
+ }
142
+ function T(s) {
143
+ const g = d.current;
144
+ n.canDrag && g && (n.didMove = !0, t && c(), n.delta = e.draggableDirection === "x" ? s.clientX - n.start : s.clientY - n.start, n.start !== s.clientX && (n.canCloseOnClick = !1), g.style.transform = `translate3d(${e.draggableDirection === "x" ? `${n.delta}px, var(--y)` : `0, calc(${n.delta}px + var(--y))`},0)`, g.style.opacity = "" + (1 - Math.abs(n.delta / n.removalDistance)));
145
+ }
146
+ function f() {
147
+ document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", f);
148
+ const s = d.current;
149
+ if (n.canDrag && n.didMove && s) {
150
+ if (n.canDrag = !1, Math.abs(n.delta) > n.removalDistance)
151
+ return a(!0), e.closeToast(), void e.collapseAll();
152
+ s.style.transition = "transform 0.2s, opacity 0.2s", s.style.removeProperty("transform"), s.style.removeProperty("opacity");
153
+ }
154
+ }
155
+ (N = $.get((I = { id: e.toastId, containerId: e.containerId, fn: o }).containerId || 1)) == null || N.setToggle(I.id, I.fn), b.useEffect(() => {
156
+ if (e.pauseOnFocusLoss)
157
+ return document.hasFocus() || c(), window.addEventListener("focus", m), window.addEventListener("blur", c), () => {
158
+ window.removeEventListener("focus", m), window.removeEventListener("blur", c);
159
+ };
160
+ }, [e.pauseOnFocusLoss]);
161
+ const l = { onPointerDown: function(s) {
162
+ if (e.draggable === !0 || e.draggable === s.pointerType) {
163
+ n.didMove = !1, document.addEventListener("pointermove", T), document.addEventListener("pointerup", f);
164
+ const g = d.current;
165
+ n.canCloseOnClick = !0, n.canDrag = !0, g.style.transition = "none", e.draggableDirection === "x" ? (n.start = s.clientX, n.removalDistance = g.offsetWidth * (e.draggablePercent / 100)) : (n.start = s.clientY, n.removalDistance = g.offsetHeight * (e.draggablePercent === 80 ? 1.5 * e.draggablePercent : e.draggablePercent) / 100);
166
+ }
167
+ }, onPointerUp: function(s) {
168
+ const { top: g, bottom: M, left: B, right: L } = d.current.getBoundingClientRect();
169
+ s.nativeEvent.type !== "touchend" && e.pauseOnHover && s.clientX >= B && s.clientX <= L && s.clientY >= g && s.clientY <= M ? c() : m();
170
+ } };
171
+ return E && p && (l.onMouseEnter = c, e.stacked || (l.onMouseLeave = m)), C && (l.onClick = (s) => {
172
+ u && u(s), n.canCloseOnClick && _();
173
+ }), { playToast: m, pauseToast: c, isRunning: t, preventExitTransition: r, toastRef: d, eventHandlers: l };
174
+ }
175
+ function Te(e) {
176
+ let { delay: t, isRunning: o, closeToast: r, type: a = "default", hide: d, className: n, style: E, controlledProgress: p, progress: _, rtl: u, isIn: C, theme: I } = e;
177
+ const N = d || p && _ === 0, m = { ...E, animationDuration: `${t}ms`, animationPlayState: o ? "running" : "paused" };
178
+ p && (m.transform = `scaleX(${_})`);
179
+ const c = F("Toastify__progress-bar", p ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${I}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": u }), T = k(n) ? n({ rtl: u, type: a, defaultClassName: c }) : F(c, n), f = { [p && _ >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: p && _ < 1 ? null : () => {
180
+ C && r();
181
+ } };
182
+ return y.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": N }, y.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${I} Toastify__progress-bar--${a}` }), y.createElement("div", { role: "progressbar", "aria-hidden": N ? "true" : "false", "aria-label": "notification timer", className: T, style: m, ...f }));
183
+ }
184
+ let be = 1;
185
+ const me = () => "" + be++;
186
+ function Ie(e) {
187
+ return e && (q(e.toastId) || J(e.toastId)) ? e.toastId : me();
188
+ }
189
+ function G(e, t) {
190
+ return fe(e, t), t.toastId;
191
+ }
192
+ function oe(e, t) {
193
+ return { ...t, type: t && t.type || e, toastId: Ie(t) };
194
+ }
195
+ function ee(e) {
196
+ return (t, o) => G(t, oe(e, o));
197
+ }
198
+ function h(e, t) {
199
+ return G(e, oe("default", t));
200
+ }
201
+ h.loading = (e, t) => G(e, oe("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...t })), h.promise = function(e, t, o) {
202
+ let r, { pending: a, error: d, success: n } = t;
203
+ a && (r = q(a) ? h.loading(a, o) : h.loading(a.render, { ...o, ...a }));
204
+ const E = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, p = (u, C, I) => {
205
+ if (C == null)
206
+ return void h.dismiss(r);
207
+ const N = { type: u, ...E, ...o, data: I }, m = q(C) ? { render: C } : C;
208
+ return r ? h.update(r, { ...N, ...m }) : h(m.render, { ...N, ...m }), I;
209
+ }, _ = k(e) ? e() : e;
210
+ return _.then((u) => p("success", n, u)).catch((u) => p("error", d, u)), _;
211
+ }, h.success = ee("success"), h.info = ee("info"), h.error = ee("error"), h.warning = ee("warning"), h.warn = h.warning, h.dark = (e, t) => G(e, oe("default", { theme: "dark", ...t })), h.dismiss = function(e) {
212
+ (function(t) {
213
+ var o;
214
+ if (ue()) {
215
+ if (t == null || q(o = t) || J(o))
216
+ $.forEach((r) => {
217
+ r.removeToast(t);
218
+ });
219
+ else if (t && ("containerId" in t || "id" in t)) {
220
+ const r = $.get(t.containerId);
221
+ r ? r.removeToast(t.id) : $.forEach((a) => {
222
+ a.removeToast(t.id);
223
+ });
224
+ }
225
+ } else
226
+ K = K.filter((r) => t != null && r.options.toastId !== t);
227
+ })(e);
228
+ }, h.clearWaitingQueue = function(e) {
229
+ e === void 0 && (e = {}), $.forEach((t) => {
230
+ !t.props.limit || e.containerId && t.id !== e.containerId || t.clearQueue();
231
+ });
232
+ }, h.isActive = pe, h.update = function(e, t) {
233
+ t === void 0 && (t = {});
234
+ const o = ((r, a) => {
235
+ var d;
236
+ let { containerId: n } = a;
237
+ return (d = $.get(n || 1)) == null ? void 0 : d.toasts.get(r);
238
+ })(e, t);
239
+ if (o) {
240
+ const { props: r, content: a } = o, d = { delay: 100, ...r, ...t, toastId: t.toastId || e, updateId: me() };
241
+ d.toastId !== e && (d.staleId = e);
242
+ const n = d.render || a;
243
+ delete d.render, G(n, d);
244
+ }
245
+ }, h.done = (e) => {
246
+ h.update(e, { progress: 1 });
247
+ }, h.onChange = function(e) {
248
+ return le.add(e), () => {
249
+ le.delete(e);
250
+ };
251
+ }, h.play = (e) => de(!0, e), h.pause = (e) => de(!1, e);
252
+ const _e = typeof window < "u" ? b.useLayoutEffect : b.useEffect, te = (e) => {
253
+ let { theme: t, type: o, isLoading: r, ...a } = e;
254
+ return y.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: t === "colored" ? "currentColor" : `var(--toastify-icon-color-${o})`, ...a });
255
+ }, re = { info: function(e) {
256
+ return y.createElement(te, { ...e }, y.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
257
+ }, warning: function(e) {
258
+ return y.createElement(te, { ...e }, y.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
259
+ }, success: function(e) {
260
+ return y.createElement(te, { ...e }, y.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
261
+ }, error: function(e) {
262
+ return y.createElement(te, { ...e }, y.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
263
+ }, spinner: function() {
264
+ return y.createElement("div", { className: "Toastify__spinner" });
265
+ } }, Ce = (e) => {
266
+ const { isRunning: t, preventExitTransition: o, toastRef: r, eventHandlers: a, playToast: d } = Ee(e), { closeButton: n, children: E, autoClose: p, onClick: _, type: u, hideProgressBar: C, closeToast: I, transition: N, position: m, className: c, style: T, bodyClassName: f, bodyStyle: l, progressClassName: s, progressStyle: g, updateId: M, role: B, progress: L, rtl: i, toastId: v, deleteToast: w, isIn: O, isLoading: S, closeOnClick: Y, theme: z } = e, Q = F("Toastify__toast", `Toastify__toast-theme--${z}`, `Toastify__toast--${u}`, { "Toastify__toast--rtl": i }, { "Toastify__toast--close-on-click": Y }), Z = k(c) ? c({ rtl: i, position: m, type: u, defaultClassName: Q }) : F(Q, c), D = function(X) {
267
+ let { theme: A, type: P, isLoading: x, icon: R } = X, V = null;
268
+ const U = { theme: A, type: P };
269
+ return R === !1 || (k(R) ? V = R({ ...U, isLoading: x }) : b.isValidElement(R) ? V = b.cloneElement(R, U) : x ? V = re.spinner() : ((ge) => ge in re)(P) && (V = re[P](U))), V;
270
+ }(e), H = !!L || !p, j = { closeToast: I, type: u, theme: z };
271
+ let W = null;
272
+ return n === !1 || (W = k(n) ? n(j) : b.isValidElement(n) ? b.cloneElement(n, j) : function(X) {
273
+ let { closeToast: A, theme: P, ariaLabel: x = "close" } = X;
274
+ return y.createElement("button", { className: `Toastify__close-button Toastify__close-button--${P}`, type: "button", onClick: (R) => {
275
+ R.stopPropagation(), A(R);
276
+ }, "aria-label": x }, y.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, y.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
277
+ }(j)), y.createElement(N, { isIn: O, done: w, position: m, preventExitTransition: o, nodeRef: r, playToast: d }, y.createElement("div", { id: v, onClick: _, "data-in": O, className: Z, ...a, style: T, ref: r }, y.createElement("div", { ...O && { role: B }, className: k(f) ? f({ type: u }) : F("Toastify__toast-body", f), style: l }, D != null && y.createElement("div", { className: F("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !S }) }, D), y.createElement("div", null, E)), W, y.createElement(Te, { ...M && !H ? { key: `pb-${M}` } : {}, rtl: i, theme: z, delay: p, isRunning: t, isIn: O, closeToast: I, hide: C, type: u, style: g, className: s, controlledProgress: H, progress: L || 0 })));
278
+ }, ae = function(e, t) {
279
+ return t === void 0 && (t = !1), { enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t };
280
+ }, Le = se(ae("bounce", !0));
281
+ se(ae("slide", !0));
282
+ se(ae("zoom"));
283
+ se(ae("flip"));
284
+ const Ne = { position: "top-right", transition: Le, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
285
+ function ke(e) {
286
+ let t = { ...Ne, ...e };
287
+ const o = e.stacked, [r, a] = b.useState(!0), d = b.useRef(null), { getToastToRender: n, isToastActive: E, count: p } = he(t), { className: _, style: u, rtl: C, containerId: I } = t;
288
+ function N(c) {
289
+ const T = F("Toastify__toast-container", `Toastify__toast-container--${c}`, { "Toastify__toast-container--rtl": C });
290
+ return k(_) ? _({ position: c, rtl: C, defaultClassName: T }) : F(T, ne(_));
291
+ }
292
+ function m() {
293
+ o && (a(!0), h.play());
294
+ }
295
+ return _e(() => {
296
+ if (o) {
297
+ var c;
298
+ const T = d.current.querySelectorAll('[data-in="true"]'), f = 12, l = (c = t.position) == null ? void 0 : c.includes("top");
299
+ let s = 0, g = 0;
300
+ Array.from(T).reverse().forEach((M, B) => {
301
+ const L = M;
302
+ L.classList.add("Toastify__toast--stacked"), B > 0 && (L.dataset.collapsed = `${r}`), L.dataset.pos || (L.dataset.pos = l ? "top" : "bot");
303
+ const i = s * (r ? 0.2 : 1) + (r ? 0 : f * B);
304
+ L.style.setProperty("--y", `${l ? i : -1 * i}px`), L.style.setProperty("--g", `${f}`), L.style.setProperty("--s", "" + (1 - (r ? g : 0))), s += L.offsetHeight, g += 0.025;
305
+ });
306
+ }
307
+ }, [r, p, o]), y.createElement("div", { ref: d, className: "Toastify", id: I, onMouseEnter: () => {
308
+ o && (a(!1), h.pause());
309
+ }, onMouseLeave: m }, n((c, T) => {
310
+ const f = T.length ? { ...u } : { ...u, pointerEvents: "none" };
311
+ return y.createElement("div", { className: N(c), style: f, key: `container-${c}` }, T.map((l) => {
312
+ let { content: s, props: g } = l;
313
+ return y.createElement(Ce, { ...g, stacked: o, collapseAll: m, isIn: E(g.toastId, g.containerId), style: g.style, key: `toast-${g.key}` }, s);
314
+ }));
315
+ }));
316
+ }
317
+ export {
318
+ h as B,
319
+ ke as Q
320
+ };
@@ -0,0 +1,14 @@
1
+ function o(e) {
2
+ if (e === void 0)
3
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
+ return e;
5
+ }
6
+ function n(e, r) {
7
+ return n = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, i) {
8
+ return t.__proto__ = i, t;
9
+ }, n(e, r);
10
+ }
11
+ export {
12
+ o as _,
13
+ n as a
14
+ };
@@ -0,0 +1,22 @@
1
+ import { s as t, j as s } from "../react-to-web-component-w5r1Fs9q.js";
2
+ import { Q as e } from "../react-toastify.esm-H_Xdunfj.js";
3
+ const n = (o) => /* @__PURE__ */ s.jsx(
4
+ e,
5
+ {
6
+ autoClose: 3e3,
7
+ hideProgressBar: !0,
8
+ closeButton: !1,
9
+ position: "bottom-left",
10
+ newestOnTop: !0,
11
+ pauseOnFocusLoss: !1,
12
+ style: { fontFamily: "inherit" },
13
+ ...o
14
+ }
15
+ );
16
+ {
17
+ const o = t(n);
18
+ customElements.define("toast-config", o);
19
+ }
20
+ export {
21
+ n as ToastConfig
22
+ };
@@ -0,0 +1,26 @@
1
+ import { s as a, j as t } from "../react-to-web-component-w5r1Fs9q.js";
2
+ import { Q as s } from "../react-toastify.esm-H_Xdunfj.js";
3
+ const i = ':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}}.Toastify__toast{--y: 0;position:relative;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px #0000001a;display:flex;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;flex:1 1 auto;padding:6px;display:flex;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;flex:1}.Toastify__toast-icon{margin-inline-end:10px;width:20px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}', r = (o) => /* @__PURE__ */ t.jsx(
4
+ s,
5
+ {
6
+ autoClose: 3e3,
7
+ hideProgressBar: !0,
8
+ closeButton: !1,
9
+ position: "bottom-left",
10
+ newestOnTop: !0,
11
+ pauseOnFocusLoss: !1,
12
+ style: { fontFamily: "inherit", width: "610px" },
13
+ containerId: "toastifyNotification",
14
+ ...o
15
+ }
16
+ ), e = () => /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
17
+ /* @__PURE__ */ t.jsx("style", { children: i }),
18
+ /* @__PURE__ */ t.jsx(r, {})
19
+ ] });
20
+ {
21
+ const o = a(e);
22
+ customElements.define("toast-config-notification", o);
23
+ }
24
+ export {
25
+ r as ToastConfigNotification
26
+ };