@undp/data-viz 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/BiVariateChoroplethMap.cjs +1 -1
  2. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  3. package/dist/BiVariateChoroplethMap.js +297 -289
  4. package/dist/BiVariateChoroplethMap.js.map +1 -1
  5. package/dist/ChoroplethMap.cjs +1 -1
  6. package/dist/ChoroplethMap.cjs.map +1 -1
  7. package/dist/ChoroplethMap.js +307 -299
  8. package/dist/ChoroplethMap.js.map +1 -1
  9. package/dist/CopyTextButton.cjs +1 -1
  10. package/dist/CopyTextButton.cjs.map +1 -1
  11. package/dist/CopyTextButton.js +281 -279
  12. package/dist/CopyTextButton.js.map +1 -1
  13. package/dist/CsvDownloadButton.cjs +4 -4
  14. package/dist/CsvDownloadButton.cjs.map +1 -1
  15. package/dist/CsvDownloadButton.js +268 -266
  16. package/dist/CsvDownloadButton.js.map +1 -1
  17. package/dist/DotDensityMap.cjs +1 -1
  18. package/dist/DotDensityMap.cjs.map +1 -1
  19. package/dist/DotDensityMap.js +277 -269
  20. package/dist/DotDensityMap.js.map +1 -1
  21. package/dist/ExcelDownloadButton.cjs +1 -1
  22. package/dist/ExcelDownloadButton.cjs.map +1 -1
  23. package/dist/ExcelDownloadButton.js +21 -19
  24. package/dist/ExcelDownloadButton.js.map +1 -1
  25. package/dist/HybridMap.cjs +1 -1
  26. package/dist/HybridMap.cjs.map +1 -1
  27. package/dist/HybridMap.js +299 -291
  28. package/dist/HybridMap.js.map +1 -1
  29. package/dist/ImageDownloadButton.cjs +1 -1
  30. package/dist/ImageDownloadButton.cjs.map +1 -1
  31. package/dist/ImageDownloadButton.js +19 -17
  32. package/dist/ImageDownloadButton.js.map +1 -1
  33. package/dist/SVGDownloadButton.cjs +1 -1
  34. package/dist/SVGDownloadButton.cjs.map +1 -1
  35. package/dist/SVGDownloadButton.js +20 -18
  36. package/dist/SVGDownloadButton.js.map +1 -1
  37. package/dist/ScatterPlot.cjs +1 -1
  38. package/dist/ScatterPlot.cjs.map +1 -1
  39. package/dist/ScatterPlot.d.ts +1 -1
  40. package/dist/ScatterPlot.js +107 -107
  41. package/dist/ScatterPlot.js.map +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { _ as R, a as i, m as P, b as pe, c as ze, j as $ } from "./index-CHPV5EwG-BzibaIRc.js";
1
+ import { _ as R, a as c, m as P, b as pe, c as ze, j as $ } from "./index-CHPV5EwG-BzibaIRc.js";
2
2
  import { f as We, u as Ue } from "./index-ApTBN0kp.js";
3
- import * as l from "react";
3
+ import * as d from "react";
4
4
  import S, { createElement as Xe } from "react";
5
5
  import * as Ye from "react-dom";
6
6
  import { g as Ze, P as me, $ as Ge, w as D, a as fe, _ as He, E as Be, j as _, c as Y, Z as Je, u as Qe, N as et, b as tt } from "./index-w64Zl8io-ihagHOdP.js";
@@ -11,116 +11,116 @@ let H = 0;
11
11
  function ot() {
12
12
  return H = (H + 1) % Number.MAX_SAFE_INTEGER, H.toString();
13
13
  }
14
- const B = /* @__PURE__ */ new Map(), de = (t) => {
15
- if (B.has(t))
14
+ const B = /* @__PURE__ */ new Map(), de = (r) => {
15
+ if (B.has(r))
16
16
  return;
17
- const r = setTimeout(() => {
18
- B.delete(t), O({
17
+ const t = setTimeout(() => {
18
+ B.delete(r), O({
19
19
  type: "REMOVE_TOAST",
20
- toastId: t
20
+ toastId: r
21
21
  });
22
22
  }, nt);
23
- B.set(t, r);
24
- }, it = (t, r) => {
25
- switch (r.type) {
23
+ B.set(r, t);
24
+ }, it = (r, t) => {
25
+ switch (t.type) {
26
26
  case "ADD_TOAST":
27
27
  return {
28
- ...t,
29
- toasts: [r.toast, ...t.toasts].slice(0, at)
28
+ ...r,
29
+ toasts: [t.toast, ...r.toasts].slice(0, at)
30
30
  };
31
31
  case "UPDATE_TOAST":
32
32
  return {
33
- ...t,
34
- toasts: t.toasts.map((e) => e.id === r.toast.id ? {
33
+ ...r,
34
+ toasts: r.toasts.map((e) => e.id === t.toast.id ? {
35
35
  ...e,
36
- ...r.toast
36
+ ...t.toast
37
37
  } : e)
38
38
  };
39
39
  case "DISMISS_TOAST": {
40
40
  const {
41
41
  toastId: e
42
- } = r;
43
- return e ? de(e) : t.toasts.forEach((s) => {
42
+ } = t;
43
+ return e ? de(e) : r.toasts.forEach((s) => {
44
44
  de(s.id);
45
45
  }), {
46
- ...t,
47
- toasts: t.toasts.map((s) => s.id === e || e === void 0 ? {
46
+ ...r,
47
+ toasts: r.toasts.map((s) => s.id === e || e === void 0 ? {
48
48
  ...s,
49
49
  open: !1
50
50
  } : s)
51
51
  };
52
52
  }
53
53
  case "REMOVE_TOAST":
54
- return r.toastId === void 0 ? {
55
- ...t,
54
+ return t.toastId === void 0 ? {
55
+ ...r,
56
56
  toasts: []
57
57
  } : {
58
- ...t,
59
- toasts: t.toasts.filter((e) => e.id !== r.toastId)
58
+ ...r,
59
+ toasts: r.toasts.filter((e) => e.id !== t.toastId)
60
60
  };
61
61
  default:
62
62
  return {
63
- ...t
63
+ ...r
64
64
  };
65
65
  }
66
66
  }, U = [];
67
67
  let X = {
68
68
  toasts: []
69
69
  };
70
- function O(t) {
71
- X = it(X, t), U.forEach((r) => {
72
- r(X);
70
+ function O(r) {
71
+ X = it(X, r), U.forEach((t) => {
72
+ t(X);
73
73
  });
74
74
  }
75
75
  function ct({
76
- ...t
76
+ ...r
77
77
  }) {
78
- const r = ot(), e = (a) => O({
78
+ const t = ot(), e = (a) => O({
79
79
  type: "UPDATE_TOAST",
80
80
  toast: {
81
81
  ...a,
82
- id: r
82
+ id: t
83
83
  }
84
84
  }), s = () => O({
85
85
  type: "DISMISS_TOAST",
86
- toastId: r
86
+ toastId: t
87
87
  });
88
88
  return O({
89
89
  type: "ADD_TOAST",
90
90
  toast: {
91
- ...t,
92
- id: r,
91
+ ...r,
92
+ id: t,
93
93
  open: !0,
94
94
  onOpenChange: (a) => {
95
95
  a || s();
96
96
  }
97
97
  }
98
98
  }), {
99
- id: r,
99
+ id: t,
100
100
  dismiss: s,
101
101
  update: e
102
102
  };
103
103
  }
104
104
  function ye() {
105
- const t = R.c(5), [r, e] = S.useState(X);
105
+ const r = R.c(5), [t, e] = S.useState(X);
106
106
  let s;
107
- t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = () => (U.push(e), () => {
107
+ r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = () => (U.push(e), () => {
108
108
  const o = U.indexOf(e);
109
109
  o > -1 && U.splice(o, 1);
110
- }), t[0] = s) : s = t[0];
110
+ }), r[0] = s) : s = r[0];
111
111
  let a;
112
- t[1] !== r ? (a = [r], t[1] = r, t[2] = a) : a = t[2], S.useEffect(s, a);
112
+ r[1] !== t ? (a = [t], r[1] = t, r[2] = a) : a = r[2], S.useEffect(s, a);
113
113
  let n;
114
- return t[3] !== r ? (n = {
115
- ...r,
114
+ return r[3] !== t ? (n = {
115
+ ...t,
116
116
  toast: ct,
117
117
  dismiss: lt
118
- }, t[3] = r, t[4] = n) : n = t[4], n;
118
+ }, r[3] = t, r[4] = n) : n = r[4], n;
119
119
  }
120
- function lt(t) {
120
+ function lt(r) {
121
121
  return O({
122
122
  type: "DISMISS_TOAST",
123
- toastId: t
123
+ toastId: r
124
124
  });
125
125
  }
126
126
  const dt = [
@@ -141,53 +141,53 @@ const dt = [
141
141
  ["path", { d: "M12 9v4", key: "juzpu7" }],
142
142
  ["path", { d: "M12 17h.01", key: "p32p05" }]
143
143
  ], yt = re("triangle-alert", ft);
144
- var se = "ToastProvider", [ae, vt, xt] = rt("Toast"), [ve] = Ze("Toast", [xt]), [wt, Z] = ve(se), xe = (t) => {
144
+ var se = "ToastProvider", [ae, vt, xt] = rt("Toast"), [ve] = Ze("Toast", [xt]), [wt, Z] = ve(se), xe = (r) => {
145
145
  const {
146
- __scopeToast: r,
146
+ __scopeToast: t,
147
147
  label: e = "Notification",
148
148
  duration: s = 5e3,
149
149
  swipeDirection: a = "right",
150
150
  swipeThreshold: n = 50,
151
151
  children: o
152
- } = t, [u, y] = l.useState(null), [c, x] = l.useState(0), m = l.useRef(!1), b = l.useRef(!1);
152
+ } = r, [u, f] = d.useState(null), [i, x] = d.useState(0), m = d.useRef(!1), E = d.useRef(!1);
153
153
  return e.trim() || console.error(
154
154
  `Invalid prop \`label\` supplied to \`${se}\`. Expected non-empty \`string\`.`
155
- ), /* @__PURE__ */ i.jsx(ae.Provider, { scope: r, children: /* @__PURE__ */ i.jsx(
155
+ ), /* @__PURE__ */ c.jsx(ae.Provider, { scope: t, children: /* @__PURE__ */ c.jsx(
156
156
  wt,
157
157
  {
158
- scope: r,
158
+ scope: t,
159
159
  label: e,
160
160
  duration: s,
161
161
  swipeDirection: a,
162
162
  swipeThreshold: n,
163
- toastCount: c,
163
+ toastCount: i,
164
164
  viewport: u,
165
- onViewportChange: y,
166
- onToastAdd: l.useCallback(() => x((E) => E + 1), []),
167
- onToastRemove: l.useCallback(() => x((E) => E - 1), []),
165
+ onViewportChange: f,
166
+ onToastAdd: d.useCallback(() => x((T) => T + 1), []),
167
+ onToastRemove: d.useCallback(() => x((T) => T - 1), []),
168
168
  isFocusedToastEscapeKeyDownRef: m,
169
- isClosePausedRef: b,
169
+ isClosePausedRef: E,
170
170
  children: o
171
171
  }
172
172
  ) });
173
173
  };
174
174
  xe.displayName = se;
175
- var we = "ToastViewport", ht = ["F8"], Q = "toast.viewportPause", ee = "toast.viewportResume", he = l.forwardRef(
176
- (t, r) => {
175
+ var we = "ToastViewport", ht = ["F8"], Q = "toast.viewportPause", ee = "toast.viewportResume", he = d.forwardRef(
176
+ (r, t) => {
177
177
  const {
178
178
  __scopeToast: e,
179
179
  hotkey: s = ht,
180
180
  label: a = "Notifications ({hotkey})",
181
181
  ...n
182
- } = t, o = Z(we, e), u = vt(e), y = l.useRef(null), c = l.useRef(null), x = l.useRef(null), m = l.useRef(null), b = me(r, m, o.onViewportChange), E = s.join("+").replace(/Key/g, "").replace(/Digit/g, ""), g = o.toastCount > 0;
183
- l.useEffect(() => {
184
- const d = (w) => {
182
+ } = r, o = Z(we, e), u = vt(e), f = d.useRef(null), i = d.useRef(null), x = d.useRef(null), m = d.useRef(null), E = me(t, m, o.onViewportChange), T = s.join("+").replace(/Key/g, "").replace(/Digit/g, ""), g = o.toastCount > 0;
183
+ d.useEffect(() => {
184
+ const l = (w) => {
185
185
  s.length !== 0 && s.every((v) => w[v] || w.code === v) && m.current?.focus();
186
186
  };
187
- return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
188
- }, [s]), l.useEffect(() => {
189
- const d = y.current, w = m.current;
190
- if (g && d && w) {
187
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
188
+ }, [s]), d.useEffect(() => {
189
+ const l = f.current, w = m.current;
190
+ if (g && l && w) {
191
191
  const v = () => {
192
192
  if (!o.isClosePausedRef.current) {
193
193
  const N = new CustomEvent(Q);
@@ -198,74 +198,74 @@ var we = "ToastViewport", ht = ["F8"], Q = "toast.viewportPause", ee = "toast.vi
198
198
  const N = new CustomEvent(ee);
199
199
  w.dispatchEvent(N), o.isClosePausedRef.current = !1;
200
200
  }
201
- }, T = (N) => {
202
- !d.contains(N.relatedTarget) && h();
201
+ }, b = (N) => {
202
+ !l.contains(N.relatedTarget) && h();
203
203
  }, k = () => {
204
- d.contains(document.activeElement) || h();
204
+ l.contains(document.activeElement) || h();
205
205
  };
206
- return d.addEventListener("focusin", v), d.addEventListener("focusout", T), d.addEventListener("pointermove", v), d.addEventListener("pointerleave", k), window.addEventListener("blur", v), window.addEventListener("focus", h), () => {
207
- d.removeEventListener("focusin", v), d.removeEventListener("focusout", T), d.removeEventListener("pointermove", v), d.removeEventListener("pointerleave", k), window.removeEventListener("blur", v), window.removeEventListener("focus", h);
206
+ return l.addEventListener("focusin", v), l.addEventListener("focusout", b), l.addEventListener("pointermove", v), l.addEventListener("pointerleave", k), window.addEventListener("blur", v), window.addEventListener("focus", h), () => {
207
+ l.removeEventListener("focusin", v), l.removeEventListener("focusout", b), l.removeEventListener("pointermove", v), l.removeEventListener("pointerleave", k), window.removeEventListener("blur", v), window.removeEventListener("focus", h);
208
208
  };
209
209
  }
210
210
  }, [g, o.isClosePausedRef]);
211
- const f = l.useCallback(
212
- ({ tabbingDirection: d }) => {
211
+ const y = d.useCallback(
212
+ ({ tabbingDirection: l }) => {
213
213
  const w = u().map((v) => {
214
- const h = v.ref.current, T = [h, ...Dt(h)];
215
- return d === "forwards" ? T : T.reverse();
214
+ const h = v.ref.current, b = [h, ...Dt(h)];
215
+ return l === "forwards" ? b : b.reverse();
216
216
  });
217
- return (d === "forwards" ? w.reverse() : w).flat();
217
+ return (l === "forwards" ? w.reverse() : w).flat();
218
218
  },
219
219
  [u]
220
220
  );
221
- return l.useEffect(() => {
222
- const d = m.current;
223
- if (d) {
221
+ return d.useEffect(() => {
222
+ const l = m.current;
223
+ if (l) {
224
224
  const w = (v) => {
225
225
  const h = v.altKey || v.ctrlKey || v.metaKey;
226
226
  if (v.key === "Tab" && !h) {
227
- const T = document.activeElement, k = v.shiftKey;
228
- if (v.target === d && k) {
229
- c.current?.focus();
227
+ const b = document.activeElement, k = v.shiftKey;
228
+ if (v.target === l && k) {
229
+ i.current?.focus();
230
230
  return;
231
231
  }
232
- const N = f({ tabbingDirection: k ? "backwards" : "forwards" }), A = N.findIndex((I) => I === T);
233
- J(N.slice(A + 1)) ? v.preventDefault() : k ? c.current?.focus() : x.current?.focus();
232
+ const N = y({ tabbingDirection: k ? "backwards" : "forwards" }), A = N.findIndex((I) => I === b);
233
+ J(N.slice(A + 1)) ? v.preventDefault() : k ? i.current?.focus() : x.current?.focus();
234
234
  }
235
235
  };
236
- return d.addEventListener("keydown", w), () => d.removeEventListener("keydown", w);
236
+ return l.addEventListener("keydown", w), () => l.removeEventListener("keydown", w);
237
237
  }
238
- }, [u, f]), /* @__PURE__ */ i.jsxs(
238
+ }, [u, y]), /* @__PURE__ */ c.jsxs(
239
239
  Ge,
240
240
  {
241
- ref: y,
241
+ ref: f,
242
242
  role: "region",
243
- "aria-label": a.replace("{hotkey}", E),
243
+ "aria-label": a.replace("{hotkey}", T),
244
244
  tabIndex: -1,
245
245
  style: { pointerEvents: g ? void 0 : "none" },
246
246
  children: [
247
- g && /* @__PURE__ */ i.jsx(
247
+ g && /* @__PURE__ */ c.jsx(
248
248
  te,
249
249
  {
250
- ref: c,
250
+ ref: i,
251
251
  onFocusFromOutsideViewport: () => {
252
- const d = f({
252
+ const l = y({
253
253
  tabbingDirection: "forwards"
254
254
  });
255
- J(d);
255
+ J(l);
256
256
  }
257
257
  }
258
258
  ),
259
- /* @__PURE__ */ i.jsx(ae.Slot, { scope: e, children: /* @__PURE__ */ i.jsx(D.ol, { tabIndex: -1, ...n, ref: b }) }),
260
- g && /* @__PURE__ */ i.jsx(
259
+ /* @__PURE__ */ c.jsx(ae.Slot, { scope: e, children: /* @__PURE__ */ c.jsx(D.ol, { tabIndex: -1, ...n, ref: E }) }),
260
+ g && /* @__PURE__ */ c.jsx(
261
261
  te,
262
262
  {
263
263
  ref: x,
264
264
  onFocusFromOutsideViewport: () => {
265
- const d = f({
265
+ const l = y({
266
266
  tabbingDirection: "backwards"
267
267
  });
268
- J(d);
268
+ J(l);
269
269
  }
270
270
  }
271
271
  )
@@ -275,15 +275,15 @@ var we = "ToastViewport", ht = ["F8"], Q = "toast.viewportPause", ee = "toast.vi
275
275
  }
276
276
  );
277
277
  he.displayName = we;
278
- var Te = "ToastFocusProxy", te = l.forwardRef(
279
- (t, r) => {
280
- const { __scopeToast: e, onFocusFromOutsideViewport: s, ...a } = t, n = Z(Te, e);
281
- return /* @__PURE__ */ i.jsx(
278
+ var Te = "ToastFocusProxy", te = d.forwardRef(
279
+ (r, t) => {
280
+ const { __scopeToast: e, onFocusFromOutsideViewport: s, ...a } = r, n = Z(Te, e);
281
+ return /* @__PURE__ */ c.jsx(
282
282
  fe,
283
283
  {
284
284
  tabIndex: 0,
285
285
  ...a,
286
- ref: r,
286
+ ref: t,
287
287
  style: { position: "fixed" },
288
288
  onFocus: (o) => {
289
289
  const u = o.relatedTarget;
@@ -294,36 +294,36 @@ var Te = "ToastFocusProxy", te = l.forwardRef(
294
294
  }
295
295
  );
296
296
  te.displayName = Te;
297
- var K = "Toast", Tt = "toast.swipeStart", bt = "toast.swipeMove", Et = "toast.swipeCancel", gt = "toast.swipeEnd", be = l.forwardRef(
298
- (t, r) => {
299
- const { forceMount: e, open: s, defaultOpen: a, onOpenChange: n, ...o } = t, [u, y] = He({
297
+ var K = "Toast", Tt = "toast.swipeStart", bt = "toast.swipeMove", Et = "toast.swipeCancel", gt = "toast.swipeEnd", be = d.forwardRef(
298
+ (r, t) => {
299
+ const { forceMount: e, open: s, defaultOpen: a, onOpenChange: n, ...o } = r, [u, f] = He({
300
300
  prop: s,
301
301
  defaultProp: a ?? !0,
302
302
  onChange: n,
303
303
  caller: K
304
304
  });
305
- return /* @__PURE__ */ i.jsx(Be, { present: e || u, children: /* @__PURE__ */ i.jsx(
305
+ return /* @__PURE__ */ c.jsx(Be, { present: e || u, children: /* @__PURE__ */ c.jsx(
306
306
  _t,
307
307
  {
308
308
  open: u,
309
309
  ...o,
310
- ref: r,
311
- onClose: () => y(!1),
312
- onPause: Y(t.onPause),
313
- onResume: Y(t.onResume),
314
- onSwipeStart: _(t.onSwipeStart, (c) => {
315
- c.currentTarget.setAttribute("data-swipe", "start");
310
+ ref: t,
311
+ onClose: () => f(!1),
312
+ onPause: Y(r.onPause),
313
+ onResume: Y(r.onResume),
314
+ onSwipeStart: _(r.onSwipeStart, (i) => {
315
+ i.currentTarget.setAttribute("data-swipe", "start");
316
316
  }),
317
- onSwipeMove: _(t.onSwipeMove, (c) => {
318
- const { x, y: m } = c.detail.delta;
319
- c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${m}px`);
317
+ onSwipeMove: _(r.onSwipeMove, (i) => {
318
+ const { x, y: m } = i.detail.delta;
319
+ i.currentTarget.setAttribute("data-swipe", "move"), i.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${m}px`);
320
320
  }),
321
- onSwipeCancel: _(t.onSwipeCancel, (c) => {
322
- c.currentTarget.setAttribute("data-swipe", "cancel"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
321
+ onSwipeCancel: _(r.onSwipeCancel, (i) => {
322
+ i.currentTarget.setAttribute("data-swipe", "cancel"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
323
323
  }),
324
- onSwipeEnd: _(t.onSwipeEnd, (c) => {
325
- const { x, y: m } = c.detail.delta;
326
- c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${m}px`), y(!1);
324
+ onSwipeEnd: _(r.onSwipeEnd, (i) => {
325
+ const { x, y: m } = i.detail.delta;
326
+ i.currentTarget.setAttribute("data-swipe", "end"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${m}px`), f(!1);
327
327
  })
328
328
  }
329
329
  ) });
@@ -333,8 +333,8 @@ be.displayName = K;
333
333
  var [kt, Nt] = ve(K, {
334
334
  onClose() {
335
335
  }
336
- }), _t = l.forwardRef(
337
- (t, r) => {
336
+ }), _t = d.forwardRef(
337
+ (r, t) => {
338
338
  const {
339
339
  __scopeToast: e,
340
340
  type: s = "foreground",
@@ -342,40 +342,40 @@ var [kt, Nt] = ve(K, {
342
342
  open: n,
343
343
  onClose: o,
344
344
  onEscapeKeyDown: u,
345
- onPause: y,
346
- onResume: c,
345
+ onPause: f,
346
+ onResume: i,
347
347
  onSwipeStart: x,
348
348
  onSwipeMove: m,
349
- onSwipeCancel: b,
350
- onSwipeEnd: E,
349
+ onSwipeCancel: E,
350
+ onSwipeEnd: T,
351
351
  ...g
352
- } = t, f = Z(K, e), [d, w] = l.useState(null), v = me(r, (p) => w(p)), h = l.useRef(null), T = l.useRef(null), k = a || f.duration, N = l.useRef(0), A = l.useRef(k), I = l.useRef(0), { onToastAdd: oe, onToastRemove: ie } = f, L = Y(() => {
353
- d?.contains(document.activeElement) && f.viewport?.focus(), o();
354
- }), V = l.useCallback(
352
+ } = r, y = Z(K, e), [l, w] = d.useState(null), v = me(t, (p) => w(p)), h = d.useRef(null), b = d.useRef(null), k = a || y.duration, N = d.useRef(0), A = d.useRef(k), I = d.useRef(0), { onToastAdd: oe, onToastRemove: ie } = y, L = Y(() => {
353
+ l?.contains(document.activeElement) && y.viewport?.focus(), o();
354
+ }), V = d.useCallback(
355
355
  (p) => {
356
356
  !p || p === 1 / 0 || (window.clearTimeout(I.current), N.current = (/* @__PURE__ */ new Date()).getTime(), I.current = window.setTimeout(L, p));
357
357
  },
358
358
  [L]
359
359
  );
360
- l.useEffect(() => {
361
- const p = f.viewport;
360
+ d.useEffect(() => {
361
+ const p = y.viewport;
362
362
  if (p) {
363
363
  const j = () => {
364
- V(A.current), c?.();
364
+ V(A.current), i?.();
365
365
  }, C = () => {
366
366
  const M = (/* @__PURE__ */ new Date()).getTime() - N.current;
367
- A.current = A.current - M, window.clearTimeout(I.current), y?.();
367
+ A.current = A.current - M, window.clearTimeout(I.current), f?.();
368
368
  };
369
369
  return p.addEventListener(Q, C), p.addEventListener(ee, j), () => {
370
370
  p.removeEventListener(Q, C), p.removeEventListener(ee, j);
371
371
  };
372
372
  }
373
- }, [f.viewport, k, y, c, V]), l.useEffect(() => {
374
- n && !f.isClosePausedRef.current && V(k);
375
- }, [n, k, f.isClosePausedRef, V]), l.useEffect(() => (oe(), () => ie()), [oe, ie]);
376
- const ce = l.useMemo(() => d ? je(d) : null, [d]);
377
- return f.viewport ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
378
- ce && /* @__PURE__ */ i.jsx(
373
+ }, [y.viewport, k, f, i, V]), d.useEffect(() => {
374
+ n && !y.isClosePausedRef.current && V(k);
375
+ }, [n, k, y.isClosePausedRef, V]), d.useEffect(() => (oe(), () => ie()), [oe, ie]);
376
+ const ce = d.useMemo(() => l ? je(l) : null, [l]);
377
+ return y.viewport ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
378
+ ce && /* @__PURE__ */ c.jsx(
379
379
  St,
380
380
  {
381
381
  __scopeToast: e,
@@ -384,47 +384,47 @@ var [kt, Nt] = ve(K, {
384
384
  children: ce
385
385
  }
386
386
  ),
387
- /* @__PURE__ */ i.jsx(kt, { scope: e, onClose: L, children: Ye.createPortal(
388
- /* @__PURE__ */ i.jsx(ae.ItemSlot, { scope: e, children: /* @__PURE__ */ i.jsx(
387
+ /* @__PURE__ */ c.jsx(kt, { scope: e, onClose: L, children: Ye.createPortal(
388
+ /* @__PURE__ */ c.jsx(ae.ItemSlot, { scope: e, children: /* @__PURE__ */ c.jsx(
389
389
  Je,
390
390
  {
391
391
  asChild: !0,
392
392
  onEscapeKeyDown: _(u, () => {
393
- f.isFocusedToastEscapeKeyDownRef.current || L(), f.isFocusedToastEscapeKeyDownRef.current = !1;
393
+ y.isFocusedToastEscapeKeyDownRef.current || L(), y.isFocusedToastEscapeKeyDownRef.current = !1;
394
394
  }),
395
- children: /* @__PURE__ */ i.jsx(
395
+ children: /* @__PURE__ */ c.jsx(
396
396
  D.li,
397
397
  {
398
398
  tabIndex: 0,
399
399
  "data-state": n ? "open" : "closed",
400
- "data-swipe-direction": f.swipeDirection,
400
+ "data-swipe-direction": y.swipeDirection,
401
401
  ...g,
402
402
  ref: v,
403
- style: { userSelect: "none", touchAction: "none", ...t.style },
404
- onKeyDown: _(t.onKeyDown, (p) => {
405
- p.key === "Escape" && (u?.(p.nativeEvent), p.nativeEvent.defaultPrevented || (f.isFocusedToastEscapeKeyDownRef.current = !0, L()));
403
+ style: { userSelect: "none", touchAction: "none", ...r.style },
404
+ onKeyDown: _(r.onKeyDown, (p) => {
405
+ p.key === "Escape" && (u?.(p.nativeEvent), p.nativeEvent.defaultPrevented || (y.isFocusedToastEscapeKeyDownRef.current = !0, L()));
406
406
  }),
407
- onPointerDown: _(t.onPointerDown, (p) => {
407
+ onPointerDown: _(r.onPointerDown, (p) => {
408
408
  p.button === 0 && (h.current = { x: p.clientX, y: p.clientY });
409
409
  }),
410
- onPointerMove: _(t.onPointerMove, (p) => {
410
+ onPointerMove: _(r.onPointerMove, (p) => {
411
411
  if (!h.current) return;
412
- const j = p.clientX - h.current.x, C = p.clientY - h.current.y, M = !!T.current, F = ["left", "right"].includes(f.swipeDirection), q = ["left", "up"].includes(f.swipeDirection) ? Math.min : Math.max, Ve = F ? q(0, j) : 0, qe = F ? 0 : q(0, C), G = p.pointerType === "touch" ? 10 : 2, z = { x: Ve, y: qe }, le = { originalEvent: p, delta: z };
413
- M ? (T.current = z, W(bt, m, le, {
412
+ const j = p.clientX - h.current.x, C = p.clientY - h.current.y, M = !!b.current, F = ["left", "right"].includes(y.swipeDirection), q = ["left", "up"].includes(y.swipeDirection) ? Math.min : Math.max, Ve = F ? q(0, j) : 0, qe = F ? 0 : q(0, C), G = p.pointerType === "touch" ? 10 : 2, z = { x: Ve, y: qe }, le = { originalEvent: p, delta: z };
413
+ M ? (b.current = z, W(bt, m, le, {
414
414
  discrete: !1
415
- })) : ue(z, f.swipeDirection, G) ? (T.current = z, W(Tt, x, le, {
415
+ })) : ue(z, y.swipeDirection, G) ? (b.current = z, W(Tt, x, le, {
416
416
  discrete: !1
417
417
  }), p.target.setPointerCapture(p.pointerId)) : (Math.abs(j) > G || Math.abs(C) > G) && (h.current = null);
418
418
  }),
419
- onPointerUp: _(t.onPointerUp, (p) => {
420
- const j = T.current, C = p.target;
421
- if (C.hasPointerCapture(p.pointerId) && C.releasePointerCapture(p.pointerId), T.current = null, h.current = null, j) {
419
+ onPointerUp: _(r.onPointerUp, (p) => {
420
+ const j = b.current, C = p.target;
421
+ if (C.hasPointerCapture(p.pointerId) && C.releasePointerCapture(p.pointerId), b.current = null, h.current = null, j) {
422
422
  const M = p.currentTarget, F = { originalEvent: p, delta: j };
423
- ue(j, f.swipeDirection, f.swipeThreshold) ? W(gt, E, F, {
423
+ ue(j, y.swipeDirection, y.swipeThreshold) ? W(gt, T, F, {
424
424
  discrete: !0
425
425
  }) : W(
426
426
  Et,
427
- b,
427
+ E,
428
428
  F,
429
429
  {
430
430
  discrete: !0
@@ -438,131 +438,131 @@ var [kt, Nt] = ve(K, {
438
438
  )
439
439
  }
440
440
  ) }),
441
- f.viewport
441
+ y.viewport
442
442
  ) })
443
443
  ] }) : null;
444
444
  }
445
- ), St = (t) => {
446
- const { __scopeToast: r, children: e, ...s } = t, a = Z(K, r), [n, o] = l.useState(!1), [u, y] = l.useState(!1);
447
- return Rt(() => o(!0)), l.useEffect(() => {
448
- const c = window.setTimeout(() => y(!0), 1e3);
449
- return () => window.clearTimeout(c);
450
- }, []), u ? null : /* @__PURE__ */ i.jsx(Qe, { asChild: !0, children: /* @__PURE__ */ i.jsx(fe, { ...s, children: n && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
445
+ ), St = (r) => {
446
+ const { __scopeToast: t, children: e, ...s } = r, a = Z(K, t), [n, o] = d.useState(!1), [u, f] = d.useState(!1);
447
+ return Rt(() => o(!0)), d.useEffect(() => {
448
+ const i = window.setTimeout(() => f(!0), 1e3);
449
+ return () => window.clearTimeout(i);
450
+ }, []), u ? null : /* @__PURE__ */ c.jsx(Qe, { asChild: !0, children: /* @__PURE__ */ c.jsx(fe, { ...s, children: n && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
451
451
  a.label,
452
452
  " ",
453
453
  e
454
454
  ] }) }) });
455
- }, jt = "ToastTitle", Ee = l.forwardRef(
456
- (t, r) => {
457
- const { __scopeToast: e, ...s } = t;
458
- return /* @__PURE__ */ i.jsx(D.div, { ...s, ref: r });
455
+ }, jt = "ToastTitle", Ee = d.forwardRef(
456
+ (r, t) => {
457
+ const { __scopeToast: e, ...s } = r;
458
+ return /* @__PURE__ */ c.jsx(D.div, { ...s, ref: t });
459
459
  }
460
460
  );
461
461
  Ee.displayName = jt;
462
- var Ct = "ToastDescription", ge = l.forwardRef(
463
- (t, r) => {
464
- const { __scopeToast: e, ...s } = t;
465
- return /* @__PURE__ */ i.jsx(D.div, { ...s, ref: r });
462
+ var Ct = "ToastDescription", ge = d.forwardRef(
463
+ (r, t) => {
464
+ const { __scopeToast: e, ...s } = r;
465
+ return /* @__PURE__ */ c.jsx(D.div, { ...s, ref: t });
466
466
  }
467
467
  );
468
468
  ge.displayName = Ct;
469
- var ke = "ToastAction", Ne = l.forwardRef(
470
- (t, r) => {
471
- const { altText: e, ...s } = t;
472
- return e.trim() ? /* @__PURE__ */ i.jsx(Se, { altText: e, asChild: !0, children: /* @__PURE__ */ i.jsx(ne, { ...s, ref: r }) }) : (console.error(
469
+ var ke = "ToastAction", Ne = d.forwardRef(
470
+ (r, t) => {
471
+ const { altText: e, ...s } = r;
472
+ return e.trim() ? /* @__PURE__ */ c.jsx(Se, { altText: e, asChild: !0, children: /* @__PURE__ */ c.jsx(ne, { ...s, ref: t }) }) : (console.error(
473
473
  `Invalid prop \`altText\` supplied to \`${ke}\`. Expected non-empty \`string\`.`
474
474
  ), null);
475
475
  }
476
476
  );
477
477
  Ne.displayName = ke;
478
- var _e = "ToastClose", ne = l.forwardRef(
479
- (t, r) => {
480
- const { __scopeToast: e, ...s } = t, a = Nt(_e, e);
481
- return /* @__PURE__ */ i.jsx(Se, { asChild: !0, children: /* @__PURE__ */ i.jsx(
478
+ var _e = "ToastClose", ne = d.forwardRef(
479
+ (r, t) => {
480
+ const { __scopeToast: e, ...s } = r, a = Nt(_e, e);
481
+ return /* @__PURE__ */ c.jsx(Se, { asChild: !0, children: /* @__PURE__ */ c.jsx(
482
482
  D.button,
483
483
  {
484
484
  type: "button",
485
485
  ...s,
486
- ref: r,
487
- onClick: _(t.onClick, a.onClose)
486
+ ref: t,
487
+ onClick: _(r.onClick, a.onClose)
488
488
  }
489
489
  ) });
490
490
  }
491
491
  );
492
492
  ne.displayName = _e;
493
- var Se = l.forwardRef((t, r) => {
494
- const { __scopeToast: e, altText: s, ...a } = t;
495
- return /* @__PURE__ */ i.jsx(
493
+ var Se = d.forwardRef((r, t) => {
494
+ const { __scopeToast: e, altText: s, ...a } = r;
495
+ return /* @__PURE__ */ c.jsx(
496
496
  D.div,
497
497
  {
498
498
  "data-radix-toast-announce-exclude": "",
499
499
  "data-radix-toast-announce-alt": s || void 0,
500
500
  ...a,
501
- ref: r
501
+ ref: t
502
502
  }
503
503
  );
504
504
  });
505
- function je(t) {
506
- const r = [];
507
- return Array.from(t.childNodes).forEach((e) => {
508
- if (e.nodeType === e.TEXT_NODE && e.textContent && r.push(e.textContent), Pt(e)) {
505
+ function je(r) {
506
+ const t = [];
507
+ return Array.from(r.childNodes).forEach((e) => {
508
+ if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), Pt(e)) {
509
509
  const s = e.ariaHidden || e.hidden || e.style.display === "none", a = e.dataset.radixToastAnnounceExclude === "";
510
510
  if (!s)
511
511
  if (a) {
512
512
  const n = e.dataset.radixToastAnnounceAlt;
513
- n && r.push(n);
513
+ n && t.push(n);
514
514
  } else
515
- r.push(...je(e));
515
+ t.push(...je(e));
516
516
  }
517
- }), r;
517
+ }), t;
518
518
  }
519
- function W(t, r, e, { discrete: s }) {
520
- const a = e.originalEvent.currentTarget, n = new CustomEvent(t, { bubbles: !0, cancelable: !0, detail: e });
521
- r && a.addEventListener(t, r, { once: !0 }), s ? et(a, n) : a.dispatchEvent(n);
519
+ function W(r, t, e, { discrete: s }) {
520
+ const a = e.originalEvent.currentTarget, n = new CustomEvent(r, { bubbles: !0, cancelable: !0, detail: e });
521
+ t && a.addEventListener(r, t, { once: !0 }), s ? et(a, n) : a.dispatchEvent(n);
522
522
  }
523
- var ue = (t, r, e = 0) => {
524
- const s = Math.abs(t.x), a = Math.abs(t.y), n = s > a;
525
- return r === "left" || r === "right" ? n && s > e : !n && a > e;
523
+ var ue = (r, t, e = 0) => {
524
+ const s = Math.abs(r.x), a = Math.abs(r.y), n = s > a;
525
+ return t === "left" || t === "right" ? n && s > e : !n && a > e;
526
526
  };
527
- function Rt(t = () => {
527
+ function Rt(r = () => {
528
528
  }) {
529
- const r = Y(t);
529
+ const t = Y(r);
530
530
  tt(() => {
531
531
  let e = 0, s = 0;
532
- return e = window.requestAnimationFrame(() => s = window.requestAnimationFrame(r)), () => {
532
+ return e = window.requestAnimationFrame(() => s = window.requestAnimationFrame(t)), () => {
533
533
  window.cancelAnimationFrame(e), window.cancelAnimationFrame(s);
534
534
  };
535
- }, [r]);
535
+ }, [t]);
536
536
  }
537
- function Pt(t) {
538
- return t.nodeType === t.ELEMENT_NODE;
537
+ function Pt(r) {
538
+ return r.nodeType === r.ELEMENT_NODE;
539
539
  }
540
- function Dt(t) {
541
- const r = [], e = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
540
+ function Dt(r) {
541
+ const t = [], e = document.createTreeWalker(r, NodeFilter.SHOW_ELEMENT, {
542
542
  acceptNode: (s) => {
543
543
  const a = s.tagName === "INPUT" && s.type === "hidden";
544
544
  return s.disabled || s.hidden || a ? NodeFilter.FILTER_SKIP : s.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
545
545
  }
546
546
  });
547
- for (; e.nextNode(); ) r.push(e.currentNode);
548
- return r;
547
+ for (; e.nextNode(); ) t.push(e.currentNode);
548
+ return t;
549
549
  }
550
- function J(t) {
551
- const r = document.activeElement;
552
- return t.some((e) => e === r ? !0 : (e.focus(), document.activeElement !== r));
550
+ function J(r) {
551
+ const t = document.activeElement;
552
+ return r.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
553
553
  }
554
554
  var At = xe, Ce = he, Re = be, Pe = Ee, De = ge, Ae = Ne, Ie = ne;
555
- const It = At, Le = S.createContext(null), Me = S.forwardRef((t, r) => {
555
+ const It = At, Le = S.createContext(null), Me = S.forwardRef((r, t) => {
556
556
  const e = R.c(9);
557
557
  let s, a;
558
- e[0] !== t ? ({
558
+ e[0] !== r ? ({
559
559
  className: s,
560
560
  ...a
561
- } = t, e[0] = t, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
561
+ } = r, e[0] = r, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
562
562
  let n;
563
563
  e[3] !== s ? (n = P("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", s), e[3] = s, e[4] = n) : n = e[4];
564
564
  let o;
565
- return e[5] !== a || e[6] !== r || e[7] !== n ? (o = /* @__PURE__ */ i.jsx(Ce, { ...a, ref: r, className: n }), e[5] = a, e[6] = r, e[7] = n, e[8] = o) : o = e[8], o;
565
+ return e[5] !== a || e[6] !== t || e[7] !== n ? (o = /* @__PURE__ */ c.jsx(Ce, { ...a, ref: t, className: n }), e[5] = a, e[6] = t, e[7] = n, e[8] = o) : o = e[8], o;
566
566
  });
567
567
  Me.displayName = Ce.displayName;
568
568
  const Lt = pe("group pointer-events-auto relative shadow-xs bg-primary-white dark:bg-primary-gray-650 flex w-full text-primary-black dark:text-primary-white items-center justify-between flex gap-2 overflow-hidden rounded-sm border border-primary-gray-400 p-2 pr-6 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full", {
@@ -589,14 +589,14 @@ const Lt = pe("group pointer-events-auto relative shadow-xs bg-primary-white dar
589
589
  defaultVariants: {
590
590
  variant: "default"
591
591
  }
592
- }), Fe = S.forwardRef((t, r) => {
592
+ }), Fe = S.forwardRef((r, t) => {
593
593
  const e = R.c(16);
594
594
  let s, a, n;
595
- e[0] !== t ? ({
595
+ e[0] !== r ? ({
596
596
  className: s,
597
597
  variant: n,
598
598
  ...a
599
- } = t, e[0] = t, e[1] = s, e[2] = a, e[3] = n) : (s = e[1], a = e[2], n = e[3]);
599
+ } = r, e[0] = r, e[1] = s, e[2] = a, e[3] = n) : (s = e[1], a = e[2], n = e[3]);
600
600
  let o;
601
601
  e[4] !== n ? (o = {
602
602
  variant: n
@@ -605,155 +605,157 @@ const Lt = pe("group pointer-events-auto relative shadow-xs bg-primary-white dar
605
605
  e[6] !== s || e[7] !== n ? (u = P(Lt({
606
606
  variant: n
607
607
  }), s), e[6] = s, e[7] = n, e[8] = u) : u = e[8];
608
- let y;
609
- e[9] !== a || e[10] !== r || e[11] !== u ? (y = /* @__PURE__ */ i.jsx(Re, { ...a, ref: r, className: u }), e[9] = a, e[10] = r, e[11] = u, e[12] = y) : y = e[12];
610
- let c;
611
- return e[13] !== o || e[14] !== y ? (c = /* @__PURE__ */ i.jsx(Le.Provider, { value: o, children: y }), e[13] = o, e[14] = y, e[15] = c) : c = e[15], c;
608
+ let f;
609
+ e[9] !== a || e[10] !== t || e[11] !== u ? (f = /* @__PURE__ */ c.jsx(Re, { ...a, ref: t, className: u }), e[9] = a, e[10] = t, e[11] = u, e[12] = f) : f = e[12];
610
+ let i;
611
+ return e[13] !== o || e[14] !== f ? (i = /* @__PURE__ */ c.jsx(Le.Provider, { value: o, children: f }), e[13] = o, e[14] = f, e[15] = i) : i = e[15], i;
612
612
  });
613
613
  Fe.displayName = Re.displayName;
614
- const Ft = S.forwardRef((t, r) => {
614
+ const Ft = S.forwardRef((r, t) => {
615
615
  const e = R.c(9);
616
616
  let s, a;
617
- e[0] !== t ? ({
617
+ e[0] !== r ? ({
618
618
  className: s,
619
619
  ...a
620
- } = t, e[0] = t, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
620
+ } = r, e[0] = r, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
621
621
  let n;
622
622
  e[3] !== s ? (n = P("inline-flex h-8 shrink-0 items-center text-primary-gray-700 dark:text-primary-gray-100 justify-center rounded-none bg-transparent px-3 text-sm font-medium transition-colors hover:bg-primary-gray-200 dark:hover:bg-primary-gray-600 focus:outline-hidden focus:ring-1 disabled:pointer-events-none disabled:opacity-50", s), e[3] = s, e[4] = n) : n = e[4];
623
623
  let o;
624
- return e[5] !== a || e[6] !== r || e[7] !== n ? (o = /* @__PURE__ */ i.jsx(Ae, { ...a, ref: r, className: n }), e[5] = a, e[6] = r, e[7] = n, e[8] = o) : o = e[8], o;
624
+ return e[5] !== a || e[6] !== t || e[7] !== n ? (o = /* @__PURE__ */ c.jsx(Ae, { ...a, ref: t, className: n }), e[5] = a, e[6] = t, e[7] = n, e[8] = o) : o = e[8], o;
625
625
  });
626
626
  Ft.displayName = Ae.displayName;
627
- const $e = S.forwardRef((t, r) => {
627
+ const $e = S.forwardRef((r, t) => {
628
628
  const e = R.c(10);
629
629
  let s, a;
630
- e[0] !== t ? ({
630
+ e[0] !== r ? ({
631
631
  className: s,
632
632
  ...a
633
- } = t, e[0] = t, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
633
+ } = r, e[0] = r, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
634
634
  let n;
635
635
  e[3] !== s ? (n = P("absolute right-1 top-1 rounded-md p-1 text-primary-gray-700/50 dark:text-primary-gray-100/50 opacity-0 transition-opacity hover:text-primary-gray-700 dark:hover:text-primary-gray-100 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100", s), e[3] = s, e[4] = n) : n = e[4];
636
636
  let o;
637
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ i.jsx(st, { className: "h-4 w-4" }), e[5] = o) : o = e[5];
637
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ c.jsx(st, { className: "h-4 w-4" }), e[5] = o) : o = e[5];
638
638
  let u;
639
- return e[6] !== a || e[7] !== r || e[8] !== n ? (u = /* @__PURE__ */ i.jsx(Ie, { ...a, ref: r, className: n, "toast-close": "", children: o }), e[6] = a, e[7] = r, e[8] = n, e[9] = u) : u = e[9], u;
639
+ return e[6] !== a || e[7] !== t || e[8] !== n ? (u = /* @__PURE__ */ c.jsx(Ie, { ...a, ref: t, className: n, "toast-close": "", children: o }), e[6] = a, e[7] = t, e[8] = n, e[9] = u) : u = e[9], u;
640
640
  });
641
641
  $e.displayName = Ie.displayName;
642
- const Oe = S.forwardRef((t, r) => {
642
+ const Oe = S.forwardRef((r, t) => {
643
643
  const e = R.c(16);
644
644
  let s, a;
645
- e[0] !== t ? ({
645
+ e[0] !== r ? ({
646
646
  className: s,
647
647
  ...a
648
- } = t, e[0] = t, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
648
+ } = r, e[0] = r, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
649
649
  const n = S.useContext(Le);
650
650
  let o;
651
651
  e[3] !== s || e[4] !== n?.variant ? (o = P(Mt({
652
652
  variant: n?.variant
653
653
  }), "text-lg font-bold [&+div]:text-xs", s), e[3] = s, e[4] = n?.variant, e[5] = o) : o = e[5];
654
654
  const u = o;
655
- let y;
655
+ let f;
656
656
  e: switch (n?.variant) {
657
657
  case "destructive": {
658
658
  let m;
659
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ i.jsx(mt, { className: "h-4 w-4 stroke-accent-dark-red", strokeWidth: 2 }), e[6] = m) : m = e[6], y = m;
659
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ c.jsx(mt, { className: "h-4 w-4 stroke-accent-dark-red", strokeWidth: 2 }), e[6] = m) : m = e[6], f = m;
660
660
  break e;
661
661
  }
662
662
  case "success": {
663
663
  let m;
664
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ i.jsx(ut, { className: "h-4 w-4 stroke-accent-dark-green", strokeWidth: 2 }), e[7] = m) : m = e[7], y = m;
664
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ c.jsx(ut, { className: "h-4 w-4 stroke-accent-dark-green", strokeWidth: 2 }), e[7] = m) : m = e[7], f = m;
665
665
  break e;
666
666
  }
667
667
  case "warning": {
668
668
  let m;
669
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ i.jsx(yt, { className: "h-4 w-4 stroke-accent-dark-yellow", strokeWidth: 2 }), e[8] = m) : m = e[8], y = m;
669
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ c.jsx(yt, { className: "h-4 w-4 stroke-accent-dark-yellow", strokeWidth: 2 }), e[8] = m) : m = e[8], f = m;
670
670
  break e;
671
671
  }
672
672
  default:
673
- y = null;
673
+ f = null;
674
674
  }
675
- let c;
676
- e[9] !== u || e[10] !== a || e[11] !== r ? (c = /* @__PURE__ */ i.jsx(Pe, { ...a, ref: r, className: u }), e[9] = u, e[10] = a, e[11] = r, e[12] = c) : c = e[12];
675
+ let i;
676
+ e[9] !== u || e[10] !== a || e[11] !== t ? (i = /* @__PURE__ */ c.jsx(Pe, { ...a, ref: t, className: u }), e[9] = u, e[10] = a, e[11] = t, e[12] = i) : i = e[12];
677
677
  let x;
678
- return e[13] !== y || e[14] !== c ? (x = /* @__PURE__ */ i.jsxs("div", { className: "flex gap-x-1 items-center", children: [
679
- y,
680
- c
681
- ] }), e[13] = y, e[14] = c, e[15] = x) : x = e[15], x;
678
+ return e[13] !== f || e[14] !== i ? (x = /* @__PURE__ */ c.jsxs("div", { className: "flex gap-x-1 items-center", children: [
679
+ f,
680
+ i
681
+ ] }), e[13] = f, e[14] = i, e[15] = x) : x = e[15], x;
682
682
  });
683
683
  Oe.displayName = Pe.displayName;
684
- const Ke = S.forwardRef((t, r) => {
684
+ const Ke = S.forwardRef((r, t) => {
685
685
  const e = R.c(9);
686
686
  let s, a;
687
- e[0] !== t ? ({
687
+ e[0] !== r ? ({
688
688
  className: s,
689
689
  ...a
690
- } = t, e[0] = t, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
690
+ } = r, e[0] = r, e[1] = s, e[2] = a) : (s = e[1], a = e[2]);
691
691
  let n;
692
692
  e[3] !== s ? (n = P("text-base opacity-90 dark:text-primary-white", s), e[3] = s, e[4] = n) : n = e[4];
693
693
  let o;
694
- return e[5] !== a || e[6] !== r || e[7] !== n ? (o = /* @__PURE__ */ i.jsx(De, { ...a, ref: r, className: n }), e[5] = a, e[6] = r, e[7] = n, e[8] = o) : o = e[8], o;
694
+ return e[5] !== a || e[6] !== t || e[7] !== n ? (o = /* @__PURE__ */ c.jsx(De, { ...a, ref: t, className: n }), e[5] = a, e[6] = t, e[7] = n, e[8] = o) : o = e[8], o;
695
695
  });
696
696
  Ke.displayName = De.displayName;
697
697
  function $t() {
698
- const t = R.c(5), {
699
- toasts: r
698
+ const r = R.c(5), {
699
+ toasts: t
700
700
  } = ye();
701
701
  let e;
702
- t[0] !== r ? (e = r.map(Ot), t[0] = r, t[1] = e) : e = t[1];
702
+ r[0] !== t ? (e = t.map(Ot), r[0] = t, r[1] = e) : e = r[1];
703
703
  let s;
704
- t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ i.jsx(Me, {}), t[2] = s) : s = t[2];
704
+ r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ c.jsx(Me, {}), r[2] = s) : s = r[2];
705
705
  let a;
706
- return t[3] !== e ? (a = /* @__PURE__ */ i.jsxs(It, { children: [
706
+ return r[3] !== e ? (a = /* @__PURE__ */ c.jsxs(It, { children: [
707
707
  e,
708
708
  s
709
- ] }), t[3] = e, t[4] = a) : a = t[4], a;
709
+ ] }), r[3] = e, r[4] = a) : a = r[4], a;
710
710
  }
711
- function Ot(t) {
711
+ function Ot(r) {
712
712
  const {
713
- id: r,
713
+ id: t,
714
714
  title: e,
715
715
  description: s,
716
716
  action: a,
717
717
  ...n
718
- } = t;
719
- return /* @__PURE__ */ Xe(Fe, { ...n, key: r }, /* @__PURE__ */ i.jsxs("div", { className: "grid gap-1", children: [
720
- e && /* @__PURE__ */ i.jsx(Oe, { children: e }),
721
- s && /* @__PURE__ */ i.jsx(Ke, { children: s })
722
- ] }), a, /* @__PURE__ */ i.jsx($e, {}));
718
+ } = r;
719
+ return /* @__PURE__ */ Xe(Fe, { ...n, key: t }, /* @__PURE__ */ c.jsxs("div", { className: "grid gap-1", children: [
720
+ e && /* @__PURE__ */ c.jsx(Oe, { children: e }),
721
+ s && /* @__PURE__ */ c.jsx(Ke, { children: s })
722
+ ] }), a, /* @__PURE__ */ c.jsx($e, {}));
723
723
  }
724
- function Xt(t) {
725
- const r = ze.c(12), {
724
+ function Xt(r) {
725
+ const t = ze.c(15), {
726
726
  text: e,
727
727
  successMessage: s,
728
728
  buttonText: a,
729
729
  buttonSmall: n,
730
730
  className: o
731
- } = t, u = s === void 0 ? "Text copied" : s, y = n === void 0 ? !1 : n, c = o === void 0 ? "" : o, {
731
+ } = r, u = s === void 0 ? "Text copied" : s, f = n === void 0 ? !1 : n, i = o === void 0 ? "" : o, {
732
732
  toast: x
733
- } = ye(), m = `${y ? "p-2" : "py-4 px-6"} ${c}`;
734
- let b;
735
- r[0] !== u || r[1] !== e || r[2] !== x ? (b = () => {
733
+ } = ye(), m = f ? "p-2" : "py-4 px-6";
734
+ let E;
735
+ t[0] !== i || t[1] !== m ? (E = P(m, i), t[0] = i, t[1] = m, t[2] = E) : E = t[2];
736
+ let T;
737
+ t[3] !== u || t[4] !== e || t[5] !== x ? (T = () => {
736
738
  navigator.clipboard.writeText(e), x({
737
739
  variant: "success",
738
740
  description: u,
739
741
  duration: 1e3
740
742
  });
741
- }, r[0] = u, r[1] = e, r[2] = x, r[3] = b) : b = r[3];
742
- let E;
743
- r[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ $.jsx(We, {}), r[4] = E) : E = r[4];
744
- const g = a || null;
745
- let f;
746
- r[5] !== m || r[6] !== b || r[7] !== g ? (f = /* @__PURE__ */ $.jsxs(Ue, { variant: "tertiary", className: m, onClick: b, "aria-label": "Click to copy the text", children: [
747
- E,
748
- g
749
- ] }), r[5] = m, r[6] = b, r[7] = g, r[8] = f) : f = r[8];
750
- let d;
751
- r[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ $.jsx($t, {}), r[9] = d) : d = r[9];
743
+ }, t[3] = u, t[4] = e, t[5] = x, t[6] = T) : T = t[6];
744
+ let g;
745
+ t[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ $.jsx(We, {}), t[7] = g) : g = t[7];
746
+ const y = a || null;
747
+ let l;
748
+ t[8] !== E || t[9] !== T || t[10] !== y ? (l = /* @__PURE__ */ $.jsxs(Ue, { variant: "tertiary", className: E, onClick: T, "aria-label": "Click to copy the text", children: [
749
+ g,
750
+ y
751
+ ] }), t[8] = E, t[9] = T, t[10] = y, t[11] = l) : l = t[11];
752
752
  let w;
753
- return r[10] !== f ? (w = /* @__PURE__ */ $.jsxs($.Fragment, { children: [
754
- f,
755
- d
756
- ] }), r[10] = f, r[11] = w) : w = r[11], w;
753
+ t[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ $.jsx($t, {}), t[12] = w) : w = t[12];
754
+ let v;
755
+ return t[13] !== l ? (v = /* @__PURE__ */ $.jsxs($.Fragment, { children: [
756
+ l,
757
+ w
758
+ ] }), t[13] = l, t[14] = v) : v = t[14], v;
757
759
  }
758
760
  export {
759
761
  Xt as CopyTextButton