@mechane-ai/elements 0.35.0 → 0.36.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.
Files changed (39) hide show
  1. package/dist/ai.js +4 -4
  2. package/dist/chart-frame-C0UBu4ku.js +213 -0
  3. package/dist/{chart-input-CN8PMrni.js → chart-input-Ccr2NJ6J.js} +2 -2
  4. package/dist/{categorical-values-DpnNvPkc.js → chart-theme-Bwr9YSP1.js} +56 -5
  5. package/dist/charts/cartesian.js +617 -623
  6. package/dist/charts/distribution.js +77 -76
  7. package/dist/charts/graph.js +29 -28
  8. package/dist/charts/hierarchy.js +32 -31
  9. package/dist/charts/matrix.js +48 -47
  10. package/dist/charts/timeline.js +2 -2
  11. package/dist/charts.js +3 -1
  12. package/dist/collections.js +314 -267
  13. package/dist/elements.css +14 -0
  14. package/dist/feedback.js +1 -1
  15. package/dist/forms/dates.js +86 -63
  16. package/dist/forms.js +2 -2
  17. package/dist/packages/charts/src/cartesian/bar-data.d.ts +1 -1
  18. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +1 -1
  19. package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
  20. package/dist/packages/charts/src/categorical-values.d.ts +1 -1
  21. package/dist/packages/charts/src/chart-series-marker.d.ts +7 -0
  22. package/dist/packages/charts/src/chart-theme.d.ts +1 -2
  23. package/dist/packages/charts/src/distribution/ecdf.d.ts +1 -1
  24. package/dist/packages/charts/src/distribution/histogram.d.ts +1 -1
  25. package/dist/packages/charts/src/distribution/interval-plot.d.ts +1 -1
  26. package/dist/packages/charts/src/distribution/ranked-bars.d.ts +1 -1
  27. package/dist/packages/charts/src/graph/relation-graph.d.ts +1 -1
  28. package/dist/packages/charts/src/index.d.ts +4 -2
  29. package/dist/packages/collections/src/data-table.d.ts +6 -4
  30. package/dist/packages/feedback/src/progress.d.ts +8 -2
  31. package/dist/packages/forms/src/dates/civil.d.ts +6 -4
  32. package/dist/packages/forms/src/dates/index.d.ts +1 -0
  33. package/dist/packages/forms/src/index.d.ts +2 -0
  34. package/dist/packages/forms/src/select-control.d.ts +26 -0
  35. package/dist/packages/foundations/src/chart-tones.d.ts +2 -0
  36. package/dist/{src-BYKjPC-0.js → src-CoFxE4Cj.js} +282 -227
  37. package/dist/{src-BHllGfI8.js → src-DXdsMc_Z.js} +415 -307
  38. package/package.json +1 -1
  39. package/dist/chart-frame-BV0IPZtQ.js +0 -270
@@ -1,41 +1,41 @@
1
1
  import { A as e, N as t, i as n, j as r, k as i, s as a } from "./src-C-Sx37kz.js";
2
- import { b as o, i as s, u as c, y as l } from "./tokens.stylex-CJbIDPB9.js";
3
- import { t as u } from "./accessibility-C-aIZ1Yx.js";
4
- import { mergeProps as d } from "@base-ui/react/merge-props";
5
- import * as f from "@stylexjs/stylex";
6
- import p, { createContext as m, useContext as h, useEffect as ee, useRef as g, useState as _ } from "react";
7
- import { Fragment as te, jsx as v, jsxs as y } from "react/jsx-runtime";
8
- import { Box as ne, CircleCheck as b, CircleX as x, Info as S, LoaderCircle as C, TriangleAlert as w, X as T } from "lucide-react";
9
- import { Meter as E } from "@base-ui/react/meter";
10
- import { Progress as D } from "@base-ui/react/progress";
11
- import O from "react-dom";
2
+ import { b as o, i as s, n as c, r as l, u, y as d } from "./tokens.stylex-CJbIDPB9.js";
3
+ import { t as f } from "./accessibility-C-aIZ1Yx.js";
4
+ import { mergeProps as p } from "@base-ui/react/merge-props";
5
+ import * as m from "@stylexjs/stylex";
6
+ import h, { createContext as g, useContext as _, useEffect as v, useRef as y, useState as b } from "react";
7
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
8
+ import { Box as w, CircleCheck as T, CircleX as ee, Info as E, LoaderCircle as D, TriangleAlert as te, X as O } from "lucide-react";
9
+ import { Meter as k } from "@base-ui/react/meter";
10
+ import { Progress as A } from "@base-ui/react/progress";
11
+ import ne from "react-dom";
12
12
  // packages/feedback/src/feedback.tsx
13
- function k({ title: e, children: t, action: r, ...i }) {
14
- return /* @__PURE__ */ y("div", {
15
- ...d({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid xeuugli x193iq5w x9f619 x9w77qv xnx3t7k x1n8ia3y x1hz01jw xj57cvi xvmahel xj0a0fe" }, i),
13
+ function j({ title: e, children: t, action: r, ...i }) {
14
+ return /* @__PURE__ */ C("div", {
15
+ ...p({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid xeuugli x193iq5w x9f619 x9w77qv xnx3t7k x1n8ia3y x1hz01jw xj57cvi xvmahel xj0a0fe" }, i),
16
16
  children: [
17
- /* @__PURE__ */ v(ne, {
17
+ /* @__PURE__ */ S(w, {
18
18
  size: 22,
19
19
  "aria-hidden": !0,
20
20
  className: "x153jb6y x2lah0s"
21
21
  }),
22
- /* @__PURE__ */ v(a, { children: e }),
23
- t != null && /* @__PURE__ */ v(n, { children: t }),
24
- r != null && /* @__PURE__ */ v("div", {
22
+ /* @__PURE__ */ S(a, { children: e }),
23
+ t != null && /* @__PURE__ */ S(n, { children: t }),
24
+ r != null && /* @__PURE__ */ S("div", {
25
25
  className: "x78zum5 xl56j7k x1a02dak x1hnptsi xeuugli x193iq5w",
26
26
  children: r
27
27
  })
28
28
  ]
29
29
  });
30
30
  }
31
- function A({ hasError: e = !1, ...t }) {
32
- return /* @__PURE__ */ v("div", { ...d({ role: e ? "alert" : "status" }, {
31
+ function M({ hasError: e = !1, ...t }) {
32
+ return /* @__PURE__ */ S("div", { ...p({ role: e ? "alert" : "status" }, {
33
33
  0: { className: "xeuugli x193iq5w x9f619 x1qokhjc x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi x1dqe72f x1f9ixgr xj0a0fe" },
34
34
  1: { className: "xeuugli x193iq5w x9f619 x1qokhjc x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi xj0a0fe xr5kp14 xcqwzn" }
35
35
  }[!!e | 0], t) });
36
36
  }
37
37
  // packages/feedback/src/skeleton.tsx
38
- var j = {
38
+ var N = {
39
39
  skeleton: {
40
40
  k1xSpc: "x1lliihq",
41
41
  ks0D6T: "x193iq5w",
@@ -73,50 +73,50 @@ var j = {
73
73
  k7Eaqz: "xeuugli",
74
74
  $$css: !0
75
75
  }
76
- }, M = {
77
- rectangle: j.rectangle,
78
- circle: j.circle
76
+ }, P = {
77
+ rectangle: N.rectangle,
78
+ circle: N.circle
79
79
  };
80
- function N({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
81
- return /* @__PURE__ */ v("span", {
80
+ function F({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
81
+ return /* @__PURE__ */ S("span", {
82
82
  "aria-hidden": !0,
83
- ...f.props(j.skeleton, j.dimensions(e, t), M[n])
83
+ ...m.props(N.skeleton, N.dimensions(e, t), P[n])
84
84
  });
85
85
  }
86
- function P({ lines: e = 1, width: t = "100%" }) {
87
- return /* @__PURE__ */ v("span", {
86
+ function I({ lines: e = 1, width: t = "100%" }) {
87
+ return /* @__PURE__ */ S("span", {
88
88
  "aria-hidden": !0,
89
- ...f.props(j.text, j.width(t)),
90
- children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ v("span", {
89
+ ...m.props(N.text, N.width(t)),
90
+ children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ S("span", {
91
91
  className: "x78zum5 x6s0dn4 xg2ss61",
92
- children: /* @__PURE__ */ v(N, {
92
+ children: /* @__PURE__ */ S(F, {
93
93
  width: e > 1 && n === e - 1 ? "65%" : "100%",
94
94
  height: "0.6em"
95
95
  })
96
96
  }, `placeholder-${n}`))
97
97
  });
98
98
  }
99
- function F({ label: e, showLabel: t = !1 }) {
100
- return /* @__PURE__ */ y("span", {
99
+ function L({ label: e, showLabel: t = !1 }) {
100
+ return /* @__PURE__ */ C("span", {
101
101
  role: "status",
102
102
  className: "x3nfvp2 x1n2onr6 x6s0dn4 xeuugli x193iq5w x1hnptsi x153jb6y x1hz01jw xtqrqnz x1778rvt xj57cvi xj0a0fe",
103
- children: [/* @__PURE__ */ v(C, {
103
+ children: [/* @__PURE__ */ S(D, {
104
104
  "aria-hidden": !0,
105
105
  className: "xtwnzbg x18utl2x x2lah0s"
106
- }), /* @__PURE__ */ v("span", {
107
- ...f.props(j.label, !t && u.hidden),
106
+ }), /* @__PURE__ */ S("span", {
107
+ ...m.props(N.label, !t && f.hidden),
108
108
  children: e
109
109
  })]
110
110
  });
111
111
  }
112
112
  // packages/feedback/src/control-placeholders.tsx
113
- var I = {
113
+ var re = {
114
114
  ks0D6T: "x193iq5w",
115
115
  $$css: !0
116
- }, L = {
116
+ }, R = {
117
117
  kZKoxP: "x16ye13r",
118
118
  $$css: !0
119
- }, R = {
119
+ }, z = {
120
120
  button: {
121
121
  kWkggS: "x1r7kqkb",
122
122
  kXLuUW: "xxymvpz",
@@ -128,173 +128,281 @@ var I = {
128
128
  $$css: !0
129
129
  },
130
130
  width: (e) => [
131
- I,
131
+ re,
132
132
  {
133
133
  kzqmXN: e == null ? e : "x5lhr3w",
134
134
  $$css: !0
135
135
  },
136
136
  { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
137
137
  ],
138
- rows: (e) => [L, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`calc(${e} * 1lh + 2 * ${s.paddingBlock} + 2px)`) }]
138
+ rows: (e) => [R, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`calc(${e} * 1lh + 2 * ${s.paddingBlock} + 2px)`) }]
139
139
  };
140
- function z({ width: t = "7ch", isIconOnly: n = !1, density: a = "standard", xstyle: o }) {
141
- return /* @__PURE__ */ v("span", {
140
+ function ie({ width: t = "7ch", isIconOnly: n = !1, density: a = "standard", xstyle: o }) {
141
+ return /* @__PURE__ */ S("span", {
142
142
  "aria-hidden": !0,
143
143
  inert: !0,
144
- ...f.props(r.base, r.button, e[a], i[a], n && r.iconButton, R.button, o),
145
- children: n ? /* @__PURE__ */ v(N, {
144
+ ...m.props(r.base, r.button, e[a], i[a], n && r.iconButton, z.button, o),
145
+ children: n ? /* @__PURE__ */ S(F, {
146
146
  width: s.iconSize,
147
147
  height: s.iconSize
148
- }) : /* @__PURE__ */ v(P, { width: t })
148
+ }) : /* @__PURE__ */ S(I, { width: t })
149
149
  });
150
150
  }
151
- function re({ label: n, hint: i, isMultiline: a = !1, density: o = "standard", rows: s = 4, width: c = "100%", xstyle: l }) {
151
+ function B({ label: n, hint: i, isMultiline: a = !1, density: o = "standard", rows: s = 4, width: c = "100%", xstyle: l }) {
152
152
  let u = a ? Math.min(s, 6) : 1;
153
- return /* @__PURE__ */ y("div", {
153
+ return /* @__PURE__ */ C("div", {
154
154
  "aria-hidden": !0,
155
- ...f.props(r.fieldRoot, R.width(c), l),
155
+ ...m.props(r.fieldRoot, z.width(c), l),
156
156
  children: [
157
- n !== void 0 && /* @__PURE__ */ v("span", {
158
- ...f.props(r.label),
157
+ n !== void 0 && /* @__PURE__ */ S("span", {
158
+ ...m.props(r.label),
159
159
  children: n
160
160
  }),
161
- /* @__PURE__ */ v("div", {
162
- ...f.props(r.base, r.field, e[o], !a && r.singleLineField, !a && t[o], !a && R.singleLine, a && r.textarea, a && R.rows(s)),
163
- children: /* @__PURE__ */ v(P, {
161
+ /* @__PURE__ */ S("div", {
162
+ ...m.props(r.base, r.field, e[o], !a && r.singleLineField, !a && t[o], !a && z.singleLine, a && r.textarea, a && z.rows(s)),
163
+ children: /* @__PURE__ */ S(I, {
164
164
  width: "60%",
165
165
  lines: u
166
166
  })
167
167
  }),
168
- i !== void 0 && /* @__PURE__ */ v("span", {
169
- ...f.props(r.description),
168
+ i !== void 0 && /* @__PURE__ */ S("span", {
169
+ ...m.props(r.description),
170
170
  children: i
171
171
  })
172
172
  ]
173
173
  });
174
174
  }
175
- // packages/feedback/src/progress.tsx
176
- function ie({ label: e, value: t, max: n, valueLabel: r }) {
177
- return /* @__PURE__ */ y(D.Root, {
175
+ // packages/foundations/src/chart-tones.ts
176
+ var V = {
177
+ series1: c.series1,
178
+ series2: c.series2,
179
+ series3: c.series3,
180
+ series4: c.series4,
181
+ series5: c.series5,
182
+ series6: c.series6,
183
+ positive: c.positive,
184
+ negative: c.negative,
185
+ neutral: l.muted
186
+ }, H = {
187
+ root: {
188
+ k1xSpc: "x78zum5",
189
+ kXwgrk: "xdt5ytf",
190
+ kOIVth: "x1hnptsi",
191
+ kzqmXN: "xh8yej3",
192
+ k7Eaqz: "xeuugli",
193
+ kMv6JI: "x1hz01jw",
194
+ kGuDYH: "xtqrqnz",
195
+ kLWn49: "x1778rvt",
196
+ k63SB2: "xj57cvi",
197
+ kMwMTN: "xbixft",
198
+ kHjlTd: "xj0a0fe",
199
+ $$css: !0
200
+ },
201
+ heading: {
202
+ k1xSpc: "x78zum5",
203
+ kGNEyG: "x1pha0wt",
204
+ kjj79g: "x1qughib",
205
+ kOIVth: "x1n8ia3y",
206
+ kwnvtZ: "x1a02dak",
207
+ $$css: !0
208
+ },
209
+ label: {
210
+ k7Eaqz: "xeuugli",
211
+ ks0D6T: "x193iq5w",
212
+ $$css: !0
213
+ },
214
+ value: {
215
+ k7Eaqz: "xeuugli",
216
+ ks0D6T: "x193iq5w",
217
+ kMwMTN: "x153jb6y",
218
+ kcqcaj: "xss6m8b",
219
+ $$css: !0
220
+ },
221
+ track: {
222
+ kZKoxP: "xqu0tyb",
223
+ kzqmXN: "xh8yej3",
224
+ kaIpWk: "x1ok0vyi",
225
+ kWkggS: "x1fa40ue",
226
+ kVQacm: "xb3r6kr",
227
+ $$css: !0
228
+ },
229
+ indicator: {
230
+ kZKoxP: "x5yr21d",
231
+ kWkggS: "x1pt885t",
232
+ kaIpWk: "x1ok0vyi",
233
+ $$css: !0
234
+ },
235
+ inline: {
236
+ kXwgrk: "x1q0g3np",
237
+ kGNEyG: "x6s0dn4",
238
+ kjj79g: "x13a6bvl",
239
+ kwnvtZ: "x1a02dak",
240
+ $$css: !0
241
+ },
242
+ inlineHeading: {
243
+ k1xSpc: "xjp7ctv",
244
+ $$css: !0
245
+ },
246
+ inlineValue: {
247
+ kMwMTN: "xbixft",
248
+ $$css: !0
249
+ },
250
+ inlineTrack: {
251
+ kzqmXN: "x1useyqa x1251vi3",
252
+ kmuXW: "x2lah0s",
253
+ $$css: !0
254
+ },
255
+ tone: (e) => [{
256
+ kWkggS: e == null ? e : "xl8spv7",
257
+ $$css: !0
258
+ }, { "--x-backgroundColor": e ?? void 0 }],
259
+ unknown: {
260
+ kWkggS: "x1r7kqkb",
261
+ kMzoRj: "xmkeg23",
262
+ ksu8eU: "xbsl7fq",
263
+ kVAM5u: "xqrc7c3",
264
+ kB7OPa: "x9f619",
265
+ $$css: !0
266
+ }
267
+ }, ae = {
268
+ stacked: {
269
+ root: void 0,
270
+ heading: void 0,
271
+ label: void 0,
272
+ value: void 0,
273
+ track: void 0
274
+ },
275
+ inline: {
276
+ root: H.inline,
277
+ heading: H.inlineHeading,
278
+ label: f.hidden,
279
+ value: H.inlineValue,
280
+ track: H.inlineTrack
281
+ }
282
+ };
283
+ function oe({ label: e, value: t, max: n, valueLabel: r }) {
284
+ return /* @__PURE__ */ C(A.Root, {
178
285
  value: t,
179
286
  max: n,
180
287
  locale: "en-US",
181
288
  getAriaValueText: () => r,
182
289
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
183
- children: [/* @__PURE__ */ y("div", {
290
+ children: [/* @__PURE__ */ C("div", {
184
291
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
185
- children: [/* @__PURE__ */ v(D.Label, {
292
+ children: [/* @__PURE__ */ S(A.Label, {
186
293
  className: "xeuugli x193iq5w",
187
294
  children: e
188
- }), /* @__PURE__ */ v("span", {
295
+ }), /* @__PURE__ */ S("span", {
189
296
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
190
297
  children: r
191
298
  })]
192
- }), /* @__PURE__ */ v(D.Track, {
299
+ }), /* @__PURE__ */ S(A.Track, {
193
300
  ...{
194
301
  0: { className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr" },
195
302
  1: { className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619" }
196
303
  }[t === null | 0],
197
- children: t !== null && /* @__PURE__ */ v(D.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
304
+ children: t !== null && /* @__PURE__ */ S(A.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
198
305
  })]
199
306
  });
200
307
  }
201
- function B({ label: e, value: t, max: n, valueLabel: r }) {
202
- return t === null ? /* @__PURE__ */ y("div", {
203
- className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
204
- children: [/* @__PURE__ */ y("div", {
205
- className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
206
- children: [/* @__PURE__ */ v("span", {
207
- className: "xeuugli x193iq5w",
208
- children: e
209
- }), /* @__PURE__ */ v("span", {
210
- className: "xeuugli x193iq5w x153jb6y xss6m8b",
211
- children: r
212
- })]
213
- }), /* @__PURE__ */ v("div", {
214
- "aria-hidden": !0,
215
- className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619"
216
- })]
217
- }) : /* @__PURE__ */ y(E.Root, {
308
+ function U({ label: e, value: t, max: n, valueLabel: r, layout: i = "stacked", tone: a }) {
309
+ let o = ae[i], s = a === void 0 ? void 0 : H.tone(V[a]), c = t !== null && Number.isFinite(t);
310
+ return Number.isFinite(n) && n > 0 && c && t >= 0 && t <= n ? /* @__PURE__ */ C(k.Root, {
218
311
  value: t,
219
312
  max: n,
220
313
  locale: "en-US",
221
314
  getAriaValueText: () => r,
222
- className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
223
- children: [/* @__PURE__ */ y("div", {
224
- className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
225
- children: [/* @__PURE__ */ v(E.Label, {
226
- className: "xeuugli x193iq5w",
315
+ ...m.props(H.root, o.root),
316
+ children: [/* @__PURE__ */ C("div", {
317
+ ...m.props(H.heading, o.heading),
318
+ children: [/* @__PURE__ */ S(k.Label, {
319
+ ...m.props(H.label, o.label),
227
320
  children: e
228
- }), /* @__PURE__ */ v("span", {
229
- className: "xeuugli x193iq5w x153jb6y xss6m8b",
321
+ }), /* @__PURE__ */ S("span", {
322
+ ...m.props(H.value, o.value),
230
323
  children: r
231
324
  })]
232
- }), /* @__PURE__ */ v(E.Track, {
233
- className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr",
234
- children: /* @__PURE__ */ v(E.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
325
+ }), /* @__PURE__ */ S(k.Track, {
326
+ ...m.props(H.track, o.track),
327
+ children: /* @__PURE__ */ S(k.Indicator, { ...m.props(H.indicator, s) })
328
+ })]
329
+ }) : /* @__PURE__ */ C("div", {
330
+ ...m.props(H.root, o.root),
331
+ children: [/* @__PURE__ */ C("div", {
332
+ ...m.props(H.heading, o.heading),
333
+ children: [/* @__PURE__ */ S("span", {
334
+ ...m.props(H.label, o.label),
335
+ children: e
336
+ }), /* @__PURE__ */ S("span", {
337
+ ...m.props(H.value, o.value),
338
+ children: r
339
+ })]
340
+ }), /* @__PURE__ */ S("div", {
341
+ "aria-hidden": !0,
342
+ ...m.props(H.track, o.track, H.unknown)
235
343
  })]
236
344
  });
237
345
  }
238
346
  // ../../../node_modules/.pnpm/sonner@2.0.8_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/sonner/dist/index.mjs
239
- var ae = (e) => {
347
+ var se = (e) => {
240
348
  switch (e) {
241
- case "success": return V;
242
- case "info": return le;
243
- case "warning": return ce;
244
- case "error": return H;
349
+ case "success": return W;
350
+ case "info": return de;
351
+ case "warning": return ue;
352
+ case "error": return G;
245
353
  default: return null;
246
354
  }
247
- }, oe = Array(12).fill(0), se = ({ visible: e, className: t }) => /*#__PURE__*/ p.createElement("div", {
355
+ }, ce = Array(12).fill(0), le = ({ visible: e, className: t }) => /*#__PURE__*/ h.createElement("div", {
248
356
  className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
249
357
  "data-visible": e
250
- }, /*#__PURE__*/ p.createElement("div", { className: "sonner-spinner" }, oe.map((e, t) => /*#__PURE__*/ p.createElement("div", {
358
+ }, /*#__PURE__*/ h.createElement("div", { className: "sonner-spinner" }, ce.map((e, t) => /*#__PURE__*/ h.createElement("div", {
251
359
  className: "sonner-loading-bar",
252
360
  key: `spinner-bar-${t}`
253
- })))), V = /*#__PURE__*/ p.createElement("svg", {
361
+ })))), W = /*#__PURE__*/ h.createElement("svg", {
254
362
  xmlns: "http://www.w3.org/2000/svg",
255
363
  viewBox: "0 0 20 20",
256
364
  fill: "currentColor",
257
365
  height: "20",
258
366
  width: "20",
259
367
  "aria-hidden": "true"
260
- }, /*#__PURE__*/ p.createElement("path", {
368
+ }, /*#__PURE__*/ h.createElement("path", {
261
369
  fillRule: "evenodd",
262
370
  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",
263
371
  clipRule: "evenodd"
264
- })), ce = /*#__PURE__*/ p.createElement("svg", {
372
+ })), ue = /*#__PURE__*/ h.createElement("svg", {
265
373
  xmlns: "http://www.w3.org/2000/svg",
266
374
  viewBox: "0 0 24 24",
267
375
  fill: "currentColor",
268
376
  height: "20",
269
377
  width: "20",
270
378
  "aria-hidden": "true"
271
- }, /*#__PURE__*/ p.createElement("path", {
379
+ }, /*#__PURE__*/ h.createElement("path", {
272
380
  fillRule: "evenodd",
273
381
  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",
274
382
  clipRule: "evenodd"
275
- })), le = /*#__PURE__*/ p.createElement("svg", {
383
+ })), de = /*#__PURE__*/ h.createElement("svg", {
276
384
  xmlns: "http://www.w3.org/2000/svg",
277
385
  viewBox: "0 0 20 20",
278
386
  fill: "currentColor",
279
387
  height: "20",
280
388
  width: "20",
281
389
  "aria-hidden": "true"
282
- }, /*#__PURE__*/ p.createElement("path", {
390
+ }, /*#__PURE__*/ h.createElement("path", {
283
391
  fillRule: "evenodd",
284
392
  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",
285
393
  clipRule: "evenodd"
286
- })), H = /*#__PURE__*/ p.createElement("svg", {
394
+ })), G = /*#__PURE__*/ h.createElement("svg", {
287
395
  xmlns: "http://www.w3.org/2000/svg",
288
396
  viewBox: "0 0 20 20",
289
397
  fill: "currentColor",
290
398
  height: "20",
291
399
  width: "20",
292
400
  "aria-hidden": "true"
293
- }, /*#__PURE__*/ p.createElement("path", {
401
+ }, /*#__PURE__*/ h.createElement("path", {
294
402
  fillRule: "evenodd",
295
403
  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",
296
404
  clipRule: "evenodd"
297
- })), ue = /*#__PURE__*/ p.createElement("svg", {
405
+ })), fe = /*#__PURE__*/ h.createElement("svg", {
298
406
  xmlns: "http://www.w3.org/2000/svg",
299
407
  width: "12",
300
408
  height: "12",
@@ -305,25 +413,25 @@ var ae = (e) => {
305
413
  strokeLinecap: "round",
306
414
  strokeLinejoin: "round",
307
415
  "aria-hidden": "true"
308
- }, /*#__PURE__*/ p.createElement("line", {
416
+ }, /*#__PURE__*/ h.createElement("line", {
309
417
  x1: "18",
310
418
  y1: "6",
311
419
  x2: "6",
312
420
  y2: "18"
313
- }), /*#__PURE__*/ p.createElement("line", {
421
+ }), /*#__PURE__*/ h.createElement("line", {
314
422
  x1: "6",
315
423
  y1: "6",
316
424
  x2: "18",
317
425
  y2: "18"
318
- })), de = () => {
319
- let [e, t] = p.useState(document.hidden);
320
- return p.useEffect(() => {
426
+ })), pe = () => {
427
+ let [e, t] = h.useState(document.hidden);
428
+ return h.useEffect(() => {
321
429
  let e = () => {
322
430
  t(document.hidden);
323
431
  };
324
432
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
325
433
  }, []), e;
326
- }, fe = 1, U = 100, pe = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : fe++, W = new class {
434
+ }, me = 1, he = 100, K = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : me++, q = new class {
327
435
  constructor() {
328
436
  this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
329
437
  let t = this.subscribers.indexOf(e);
@@ -333,10 +441,10 @@ var ae = (e) => {
333
441
  }, this.addToast = (e) => {
334
442
  this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
335
443
  }, this.trimHistory = () => {
336
- let e = this.toasts.length - U;
444
+ let e = this.toasts.length - he;
337
445
  e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
338
446
  }, this.create = (e) => {
339
- let { message: t, ...n } = e, r = pe(e), i = this.pendingDismissals.get(r);
447
+ let { message: t, ...n } = e, r = K(e), i = this.pendingDismissals.get(r);
340
448
  i !== void 0 && (cancelAnimationFrame(i), this.pendingDismissals.delete(r), this.dismissedToasts.delete(r));
341
449
  let a = this.dismissedToasts.has(r), o = e.dismissible === void 0 || e.dismissible;
342
450
  return a && (this.dismissedToasts.delete(r), this.toasts = this.toasts.filter((e) => e.id !== r)), !a && this.toasts.find((e) => e.id === r) ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
@@ -406,14 +514,14 @@ var ae = (e) => {
406
514
  description: typeof t.description == "function" ? void 0 : t.description
407
515
  }));
408
516
  let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
409
- if (a = ["resolve", e], p.isValidElement(e)) i = !1, this.create({
517
+ if (a = ["resolve", e], h.isValidElement(e)) i = !1, this.create({
410
518
  id: n,
411
519
  type: "default",
412
520
  message: e
413
521
  });
414
- else if (me(e) && !e.ok) {
522
+ else if (J(e) && !e.ok) {
415
523
  i = !1;
416
- let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !p.isValidElement(r) ? r : { message: r };
524
+ let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !h.isValidElement(r) ? r : { message: r };
417
525
  this.create({
418
526
  id: n,
419
527
  type: "error",
@@ -422,7 +530,7 @@ var ae = (e) => {
422
530
  });
423
531
  } else if (e instanceof Error) {
424
532
  i = !1;
425
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !p.isValidElement(r) ? r : { message: r };
533
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !h.isValidElement(r) ? r : { message: r };
426
534
  this.create({
427
535
  id: n,
428
536
  type: "error",
@@ -431,7 +539,7 @@ var ae = (e) => {
431
539
  });
432
540
  } else if (t.success !== void 0) {
433
541
  i = !1;
434
- let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !p.isValidElement(r) ? r : { message: r };
542
+ let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !h.isValidElement(r) ? r : { message: r };
435
543
  this.create({
436
544
  id: n,
437
545
  type: "success",
@@ -442,7 +550,7 @@ var ae = (e) => {
442
550
  }).catch(async (e) => {
443
551
  if (a = ["reject", e], t.error !== void 0) {
444
552
  i = !1;
445
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !p.isValidElement(r) ? r : { message: r };
553
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !h.isValidElement(r) ? r : { message: r };
446
554
  this.create({
447
555
  id: n,
448
556
  type: "error",
@@ -455,7 +563,7 @@ var ae = (e) => {
455
563
  }), s = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
456
564
  return typeof n != "string" && typeof n != "number" ? { unwrap: s } : Object.assign(n, { unwrap: s });
457
565
  }, this.custom = (e, t) => {
458
- let n = pe(t);
566
+ let n = K(t);
459
567
  return this.create({
460
568
  ...t,
461
569
  jsx: e(n),
@@ -464,39 +572,39 @@ var ae = (e) => {
464
572
  }), n;
465
573
  }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(), this.pendingDismissals = /* @__PURE__ */ new Map();
466
574
  }
467
- }(), G = (e, t) => W.message(e, t), me = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", he = Object.assign(G, {
468
- success: W.success,
469
- info: W.info,
470
- warning: W.warning,
471
- error: W.error,
472
- custom: W.custom,
473
- message: W.message,
474
- promise: W.promise,
475
- dismiss: W.dismiss,
476
- loading: W.loading
575
+ }(), ge = (e, t) => q.message(e, t), J = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", _e = Object.assign(ge, {
576
+ success: q.success,
577
+ info: q.info,
578
+ warning: q.warning,
579
+ error: q.error,
580
+ custom: q.custom,
581
+ message: q.message,
582
+ promise: q.promise,
583
+ dismiss: q.dismiss,
584
+ loading: q.loading
477
585
  }, {
478
- getHistory: () => W.toasts,
479
- getToasts: () => W.getActiveToasts()
586
+ getHistory: () => q.toasts,
587
+ getToasts: () => q.getActiveToasts()
480
588
  });
481
- function K(e) {
589
+ function Y(e) {
482
590
  return e.label !== void 0;
483
591
  }
484
- var q = 3, J = "24px", ge = "16px", _e = 4e3, Y = 356, ve = 14, ye = 45, be = 200;
485
- function X(...e) {
592
+ var ve = 3, ye = "24px", be = "16px", xe = 4e3, X = 356, Se = 14, Ce = 45, we = 200;
593
+ function Z(...e) {
486
594
  return e.filter(Boolean).join(" ");
487
595
  }
488
- function xe(e) {
596
+ function Te(e) {
489
597
  let [t, n] = e.split("-"), r = [];
490
598
  return t && r.push(t), n && r.push(n), r;
491
599
  }
492
- var Se = (e) => {
493
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: m, style: h, cancelButtonStyle: ee, actionButtonStyle: g, className: _ = "", descriptionClassName: te = "", duration: v, position: y, gap: ne, expandByDefault: b, classNames: x, icons: S, closeButtonAriaLabel: C = "Close toast" } = e, [w, T] = p.useState(null), [E, D] = p.useState(null), [O, k] = p.useState(!1), [A, j] = p.useState(!1), [M, N] = p.useState(!1), [P, F] = p.useState(!1), [I, L] = p.useState(!1), [R, z] = p.useState(0), [re, ie] = p.useState(0), B = p.useRef(n.duration || v || _e), oe = p.useRef(null), V = p.useRef(null), ce = c === 0, le = c + 1 <= o, H = n.type, fe = H ?? "default", U = n.dismissible !== !1, pe = n.className || "", W = n.descriptionClassName || "", G = p.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), me = p.useMemo(() => n.closeButton ?? m, [n.closeButton, m]), he = p.useMemo(() => n.duration || v || _e, [n.duration, v]), q = p.useRef(0), J = p.useRef(0), ge = p.useRef(0), Y = p.useRef(null), [ve, Se] = y.split("-"), Ce = p.useMemo(() => s.reduce((e, t, n) => n >= G ? e : e + t.height, 0), [s, G]), we = de(), Z = p.useMemo(() => e.swipeDirections ?? xe(y), [e.swipeDirections, y]), Te = n.invert || t, Q = H === "loading";
494
- J.current = p.useMemo(() => G * ne + Ce, [G, Ce]), p.useEffect(() => {
600
+ var Q = (e) => {
601
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: g, actionButtonStyle: _, className: v = "", descriptionClassName: y = "", duration: b, position: x, gap: S, expandByDefault: C, classNames: w, icons: T, closeButtonAriaLabel: ee = "Close toast" } = e, [E, D] = h.useState(null), [te, O] = h.useState(null), [k, A] = h.useState(!1), [ne, j] = h.useState(!1), [M, N] = h.useState(!1), [P, F] = h.useState(!1), [I, L] = h.useState(!1), [re, R] = h.useState(0), [z, ie] = h.useState(0), B = h.useRef(n.duration || b || xe), V = h.useRef(null), H = h.useRef(null), ae = c === 0, oe = c + 1 <= o, U = n.type, ce = U ?? "default", W = n.dismissible !== !1, ue = n.className || "", de = n.descriptionClassName || "", G = h.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), me = h.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), he = h.useMemo(() => n.duration || b || xe, [n.duration, b]), K = h.useRef(0), q = h.useRef(0), ge = h.useRef(0), J = h.useRef(null), [_e, ve] = x.split("-"), ye = h.useMemo(() => s.reduce((e, t, n) => n >= G ? e : e + t.height, 0), [s, G]), be = pe(), X = h.useMemo(() => e.swipeDirections ?? Te(x), [e.swipeDirections, x]), Se = n.invert || t, Q = U === "loading";
602
+ q.current = h.useMemo(() => G * S + ye, [G, ye]), h.useEffect(() => {
495
603
  B.current = he;
496
- }, [he]), p.useEffect(() => {
497
- k(!0);
498
- }, []), p.useEffect(() => {
499
- let e = V.current;
604
+ }, [he]), h.useEffect(() => {
605
+ A(!0);
606
+ }, []), h.useEffect(() => {
607
+ let e = H.current;
500
608
  if (e) {
501
609
  let t = e.getBoundingClientRect().height;
502
610
  return ie(t), a((e) => [{
@@ -505,9 +613,9 @@ var Se = (e) => {
505
613
  position: n.position
506
614
  }, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
507
615
  }
508
- }, [a, n.id]), p.useLayoutEffect(() => {
509
- if (!O) return;
510
- let e = V.current, t = e.style.height;
616
+ }, [a, n.id]), h.useLayoutEffect(() => {
617
+ if (!k) return;
618
+ let e = H.current, t = e.style.height;
511
619
  e.style.height = "auto";
512
620
  let r = e.getBoundingClientRect().height;
513
621
  e.style.height = t, ie(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
@@ -519,7 +627,7 @@ var Se = (e) => {
519
627
  position: n.position
520
628
  }, ...e]);
521
629
  }, [
522
- O,
630
+ k,
523
631
  n.title,
524
632
  n.description,
525
633
  a,
@@ -528,173 +636,173 @@ var Se = (e) => {
528
636
  n.action,
529
637
  n.cancel
530
638
  ]);
531
- let $ = p.useCallback(() => {
532
- j(!0), z(J.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
639
+ let $ = h.useCallback(() => {
640
+ j(!0), R(q.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
533
641
  d(n);
534
- }, be);
642
+ }, we);
535
643
  }, [
536
644
  n,
537
645
  d,
538
646
  a,
539
- J
647
+ q
540
648
  ]);
541
- p.useEffect(() => {
542
- if (n.promise && H === "loading" || n.duration === Infinity || n.type === "loading") return;
649
+ h.useEffect(() => {
650
+ if (n.promise && U === "loading" || n.duration === Infinity || n.type === "loading") return;
543
651
  let e;
544
- return u || i || we ? (() => {
545
- if (ge.current < q.current) {
546
- let e = (/* @__PURE__ */ new Date()).getTime() - q.current;
652
+ return u || i || be ? (() => {
653
+ if (ge.current < K.current) {
654
+ let e = (/* @__PURE__ */ new Date()).getTime() - K.current;
547
655
  B.current -= e;
548
656
  }
549
657
  ge.current = (/* @__PURE__ */ new Date()).getTime();
550
- })() : B.current !== Infinity && (q.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
658
+ })() : B.current !== Infinity && (K.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
551
659
  n.onAutoClose == null || n.onAutoClose.call(n, n), $();
552
660
  }, B.current)), () => clearTimeout(e);
553
661
  }, [
554
662
  u,
555
663
  i,
556
664
  n,
557
- H,
558
- we,
665
+ U,
666
+ be,
559
667
  $
560
- ]), p.useEffect(() => {
668
+ ]), h.useEffect(() => {
561
669
  n.delete && ($(), n.onDismiss == null || n.onDismiss.call(n, n));
562
670
  }, [$, n.delete]);
563
671
  function Ee() {
564
- return S?.loading ? /*#__PURE__*/ p.createElement("div", {
565
- className: X(x?.loader, n?.classNames?.loader, "sonner-loader"),
566
- "data-visible": H === "loading"
567
- }, S.loading) : /*#__PURE__*/ p.createElement(se, {
568
- className: X(x?.loader, n?.classNames?.loader),
569
- visible: H === "loading"
672
+ return T?.loading ? /*#__PURE__*/ h.createElement("div", {
673
+ className: Z(w?.loader, n?.classNames?.loader, "sonner-loader"),
674
+ "data-visible": U === "loading"
675
+ }, T.loading) : /*#__PURE__*/ h.createElement(le, {
676
+ className: Z(w?.loader, n?.classNames?.loader),
677
+ visible: U === "loading"
570
678
  });
571
679
  }
572
- let De = n.icon || S?.[H] || ae(H);
573
- return /*#__PURE__*/ p.createElement("li", {
680
+ let De = n.icon || T?.[U] || se(U);
681
+ return /*#__PURE__*/ h.createElement("li", {
574
682
  tabIndex: 0,
575
- ref: V,
576
- className: X(_, pe, x?.toast, n?.classNames?.toast, x?.[fe], n?.classNames?.[fe]),
683
+ ref: H,
684
+ className: Z(v, ue, w?.toast, n?.classNames?.toast, w?.[ce], n?.classNames?.[ce]),
577
685
  "data-sonner-toast": "",
578
686
  "data-rich-colors": n.richColors ?? f,
579
687
  "data-styled": !(n.jsx || n.unstyled || r),
580
- "data-mounted": O,
688
+ "data-mounted": k,
581
689
  "data-promise": !!n.promise,
582
690
  "data-swiped": I,
583
- "data-removed": A,
584
- "data-visible": le,
585
- "data-y-position": ve,
586
- "data-x-position": Se,
691
+ "data-removed": ne,
692
+ "data-visible": oe,
693
+ "data-y-position": _e,
694
+ "data-x-position": ve,
587
695
  "data-index": c,
588
- "data-front": ce,
696
+ "data-front": ae,
589
697
  "data-swiping": M,
590
- "data-dismissible": U,
591
- "data-type": H,
592
- "data-invert": Te,
698
+ "data-dismissible": W,
699
+ "data-type": U,
700
+ "data-invert": Se,
593
701
  "data-swipe-out": P,
594
- "data-swipe-direction": E,
595
- "data-expanded": !!(u || b && O),
702
+ "data-swipe-direction": te,
703
+ "data-expanded": !!(u || C && k),
596
704
  "data-testid": n.testId,
597
705
  style: {
598
706
  "--index": c,
599
707
  "--toasts-before": c,
600
708
  "--z-index": l.length - c,
601
- "--offset": `${A ? R : J.current}px`,
602
- "--initial-height": b ? "auto" : `${re}px`,
603
- ...h,
709
+ "--offset": `${ne ? re : q.current}px`,
710
+ "--initial-height": C ? "auto" : `${z}px`,
711
+ ...m,
604
712
  ...n.style
605
713
  },
606
714
  onDragEnd: () => {
607
- N(!1), T(null), Y.current = null;
715
+ N(!1), D(null), J.current = null;
608
716
  },
609
717
  onPointerDown: (e) => {
610
- e.button !== 2 && !Q && U && (oe.current = /* @__PURE__ */ new Date(), z(J.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (N(!0), Y.current = {
718
+ e.button !== 2 && !Q && W && (V.current = /* @__PURE__ */ new Date(), R(q.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (N(!0), J.current = {
611
719
  x: e.clientX,
612
720
  y: e.clientY
613
721
  }));
614
722
  },
615
723
  onPointerUp: () => {
616
- if (P || !U) return;
617
- Y.current = null;
618
- let e = Number(V.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(V.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - oe.current?.getTime(), i = w === "x" ? e : t, a = Math.abs(i) / r;
619
- if ((w === "x" ? Z.includes(e > 0 ? "right" : "left") : Z.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= ye || a > .11)) z(J.current), n.onDismiss == null || n.onDismiss.call(n, n), D(w === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), F(!0);
724
+ if (P || !W) return;
725
+ J.current = null;
726
+ let e = Number(H.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(H.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - V.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
727
+ if ((E === "x" ? X.includes(e > 0 ? "right" : "left") : X.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= Ce || a > .11)) R(q.current), n.onDismiss == null || n.onDismiss.call(n, n), O(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), F(!0);
620
728
  else {
621
729
  var o, s;
622
- (o = V.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = V.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), L(!1), N(!1), T(null);
730
+ (o = H.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = H.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), L(!1), N(!1), D(null);
623
731
  }
624
732
  },
625
733
  onPointerMove: (e) => {
626
734
  var t, n;
627
- if (!Y.current || !U || window.getSelection()?.toString().length > 0) return;
628
- let r = e.clientY - Y.current.y, i = e.clientX - Y.current.x;
629
- !w && (Math.abs(i) > 1 || Math.abs(r) > 1) && T(Math.abs(i) > Math.abs(r) ? "x" : "y");
735
+ if (!J.current || !W || window.getSelection()?.toString().length > 0) return;
736
+ let r = e.clientY - J.current.y, i = e.clientX - J.current.x;
737
+ !E && (Math.abs(i) > 1 || Math.abs(r) > 1) && D(Math.abs(i) > Math.abs(r) ? "x" : "y");
630
738
  let a = {
631
739
  x: 0,
632
740
  y: 0
633
741
  }, o = (e) => 1 / (1.5 + Math.abs(e) / 20);
634
- if (w === "y") {
635
- if (Z.includes("top") || Z.includes("bottom")) {
636
- if (Z.includes("top") && r < 0 || Z.includes("bottom") && r > 0) a.y = r;
742
+ if (E === "y") {
743
+ if (X.includes("top") || X.includes("bottom")) {
744
+ if (X.includes("top") && r < 0 || X.includes("bottom") && r > 0) a.y = r;
637
745
  else {
638
746
  let e = r * o(r);
639
747
  a.y = Math.abs(e) < Math.abs(r) ? e : r;
640
748
  }
641
749
  }
642
- } else if (w === "x" && (Z.includes("left") || Z.includes("right"))) {
643
- if (Z.includes("left") && i < 0 || Z.includes("right") && i > 0) a.x = i;
750
+ } else if (E === "x" && (X.includes("left") || X.includes("right"))) {
751
+ if (X.includes("left") && i < 0 || X.includes("right") && i > 0) a.x = i;
644
752
  else {
645
753
  let e = i * o(i);
646
754
  a.x = Math.abs(e) < Math.abs(i) ? e : i;
647
755
  }
648
756
  }
649
- (Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && L(!0), (t = V.current) == null || t.style.setProperty("--swipe-amount-x", `${a.x}px`), (n = V.current) == null || n.style.setProperty("--swipe-amount-y", `${a.y}px`);
757
+ (Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && L(!0), (t = H.current) == null || t.style.setProperty("--swipe-amount-x", `${a.x}px`), (n = H.current) == null || n.style.setProperty("--swipe-amount-y", `${a.y}px`);
650
758
  }
651
- }, me && !n.jsx && H !== "loading" ? /*#__PURE__*/ p.createElement("button", {
652
- "aria-label": C,
759
+ }, me && !n.jsx && U !== "loading" ? /*#__PURE__*/ h.createElement("button", {
760
+ "aria-label": ee,
653
761
  "data-disabled": Q,
654
762
  "data-close-button": !0,
655
- onClick: Q || !U ? () => {} : () => {
763
+ onClick: Q || !W ? () => {} : () => {
656
764
  $(), n.onDismiss == null || n.onDismiss.call(n, n);
657
765
  },
658
- className: X(x?.closeButton, n?.classNames?.closeButton)
659
- }, S?.close ?? ue) : null, (H || n.icon || n.promise) && n.icon !== null && (S?.[H] !== null || n.icon) ? /*#__PURE__*/ p.createElement("div", {
766
+ className: Z(w?.closeButton, n?.classNames?.closeButton)
767
+ }, T?.close ?? fe) : null, (U || n.icon || n.promise) && n.icon !== null && (T?.[U] !== null || n.icon) ? /*#__PURE__*/ h.createElement("div", {
660
768
  "data-icon": "",
661
- className: X(x?.icon, n?.classNames?.icon)
662
- }, H === "loading" ? n.icon || Ee() : n.promise ? Ee() : null, H === "loading" ? null : De) : null, /*#__PURE__*/ p.createElement("div", {
769
+ className: Z(w?.icon, n?.classNames?.icon)
770
+ }, U === "loading" ? n.icon || Ee() : n.promise ? Ee() : null, U === "loading" ? null : De) : null, /*#__PURE__*/ h.createElement("div", {
663
771
  "data-content": "",
664
- className: X(x?.content, n?.classNames?.content)
665
- }, /*#__PURE__*/ p.createElement("div", {
772
+ className: Z(w?.content, n?.classNames?.content)
773
+ }, /*#__PURE__*/ h.createElement("div", {
666
774
  "data-title": "",
667
- className: X(x?.title, n?.classNames?.title)
668
- }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ p.createElement("div", {
775
+ className: Z(w?.title, n?.classNames?.title)
776
+ }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ h.createElement("div", {
669
777
  "data-description": "",
670
- className: X(te, W, x?.description, n?.classNames?.description)
671
- }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ p.isValidElement(n.cancel) ? n.cancel : n.cancel && K(n.cancel) ? /*#__PURE__*/ p.createElement("button", {
778
+ className: Z(y, de, w?.description, n?.classNames?.description)
779
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ h.isValidElement(n.cancel) ? n.cancel : n.cancel && Y(n.cancel) ? /*#__PURE__*/ h.createElement("button", {
672
780
  "data-button": !0,
673
781
  "data-cancel": !0,
674
- style: n.cancelButtonStyle || ee,
782
+ style: n.cancelButtonStyle || g,
675
783
  onClick: (e) => {
676
- K(n.cancel) && U && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
784
+ Y(n.cancel) && W && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
677
785
  },
678
- className: X(x?.cancelButton, n?.classNames?.cancelButton)
679
- }, n.cancel.label) : null, /*#__PURE__*/ p.isValidElement(n.action) ? n.action : n.action && K(n.action) ? /*#__PURE__*/ p.createElement("button", {
786
+ className: Z(w?.cancelButton, n?.classNames?.cancelButton)
787
+ }, n.cancel.label) : null, /*#__PURE__*/ h.isValidElement(n.action) ? n.action : n.action && Y(n.action) ? /*#__PURE__*/ h.createElement("button", {
680
788
  "data-button": !0,
681
789
  "data-action": !0,
682
- style: n.actionButtonStyle || g,
790
+ style: n.actionButtonStyle || _,
683
791
  onClick: (e) => {
684
- K(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || $());
792
+ Y(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || $());
685
793
  },
686
- className: X(x?.actionButton, n?.classNames?.actionButton)
794
+ className: Z(w?.actionButton, n?.classNames?.actionButton)
687
795
  }, n.action.label) : null);
688
796
  };
689
- function Ce() {
797
+ function $() {
690
798
  if (typeof window > "u" || typeof document > "u") return "ltr";
691
799
  let e = document.documentElement.getAttribute("dir");
692
800
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
693
801
  }
694
- function we(e, t) {
802
+ function Ee(e, t) {
695
803
  let n = {};
696
804
  return [e, t].forEach((e, t) => {
697
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? ge : J;
805
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? be : ye;
698
806
  function o(e) {
699
807
  [
700
808
  "top",
@@ -715,19 +823,19 @@ function we(e, t) {
715
823
  }) : o(a);
716
824
  }), n;
717
825
  }
718
- var Z = /*#__PURE__*/ p.forwardRef(function(e, t) {
719
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: m, style: h, visibleToasts: ee = q, toastOptions: g, dir: _ = Ce(), gap: te = ve, icons: v, customAriaLabel: y, containerAriaLabel: ne = "Notifications" } = e, [b, x] = p.useState([]), S = p.useMemo(() => n ? b.filter((e) => e.toasterId === n) : b.filter((e) => !e.toasterId), [b, n]), C = p.useMemo(() => Array.from(new Set([i].concat(S.filter((e) => e.position).map((e) => e.position)))), [S, i]), [w, T] = p.useState([]), [E, D] = p.useState(!1), [k, A] = p.useState(!1), [j, M] = p.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), N = p.useRef(null), P = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), F = p.useRef(null), I = p.useRef(!1), L = p.useCallback((e) => {
720
- x((t) => (t.find((t) => t.id === e.id)?.delete || W.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
826
+ var De = /*#__PURE__*/ h.forwardRef(function(e, t) {
827
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: g = ve, toastOptions: _, dir: v = $(), gap: y = Se, icons: b, customAriaLabel: x, containerAriaLabel: S = "Notifications" } = e, [C, w] = h.useState([]), T = h.useMemo(() => n ? C.filter((e) => e.toasterId === n) : C.filter((e) => !e.toasterId), [C, n]), ee = h.useMemo(() => Array.from(new Set([i].concat(T.filter((e) => e.position).map((e) => e.position)))), [T, i]), [E, D] = h.useState([]), [te, O] = h.useState(!1), [k, A] = h.useState(!1), [j, M] = h.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), N = h.useRef(null), P = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), F = h.useRef(null), I = h.useRef(!1), L = h.useCallback((e) => {
828
+ w((t) => (t.find((t) => t.id === e.id)?.delete || q.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
721
829
  }, []);
722
- return p.useEffect(() => W.subscribe((e) => {
830
+ return h.useEffect(() => q.subscribe((e) => {
723
831
  e.dismiss ? requestAnimationFrame(() => {
724
- x((t) => t.map((t) => t.id === e.id ? {
832
+ w((t) => t.map((t) => t.id === e.id ? {
725
833
  ...t,
726
834
  delete: !0
727
835
  } : t));
728
836
  }) : setTimeout(() => {
729
- O.flushSync(() => {
730
- x((t) => {
837
+ ne.flushSync(() => {
838
+ w((t) => {
731
839
  let n = t.findIndex((t) => t.id === e.id);
732
840
  return n === -1 ? [e, ...t] : [
733
841
  ...t.slice(0, n),
@@ -740,7 +848,7 @@ var Z = /*#__PURE__*/ p.forwardRef(function(e, t) {
740
848
  });
741
849
  });
742
850
  });
743
- }), []), p.useEffect(() => {
851
+ }), []), h.useEffect(() => {
744
852
  if (d !== "system") {
745
853
  M(d);
746
854
  return;
@@ -760,35 +868,35 @@ var Z = /*#__PURE__*/ p.forwardRef(function(e, t) {
760
868
  }
761
869
  });
762
870
  }
763
- }, [d]), p.useEffect(() => {
764
- b.length <= 1 && D(!1);
765
- }, [b]), p.useEffect(() => {
871
+ }, [d]), h.useEffect(() => {
872
+ C.length <= 1 && O(!1);
873
+ }, [C]), h.useEffect(() => {
766
874
  let e = (e) => {
767
875
  if (a.length > 0 && a.every((t) => e[t] || e.code === t)) {
768
876
  var t;
769
- D(!0), (t = N.current) == null || t.focus();
877
+ O(!0), (t = N.current) == null || t.focus();
770
878
  }
771
- e.code === "Escape" && (document.activeElement === N.current || N.current?.contains(document.activeElement)) && D(!1);
879
+ e.code === "Escape" && (document.activeElement === N.current || N.current?.contains(document.activeElement)) && O(!1);
772
880
  };
773
881
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
774
- }, [a]), p.useEffect(() => {
882
+ }, [a]), h.useEffect(() => {
775
883
  if (N.current) return () => {
776
884
  F.current && (F.current.focus({ preventScroll: !0 }), F.current = null, I.current = !1);
777
885
  };
778
- }, [N.current]), /*#__PURE__*/ p.createElement("section", {
886
+ }, [N.current]), /*#__PURE__*/ h.createElement("section", {
779
887
  ref: t,
780
- "aria-label": y ?? `${ne} ${P}`,
888
+ "aria-label": x ?? `${S} ${P}`,
781
889
  tabIndex: -1,
782
890
  "aria-live": "polite",
783
891
  "aria-relevant": "additions text",
784
892
  "aria-atomic": "false",
785
893
  suppressHydrationWarning: !0,
786
894
  "data-react-aria-top-layer": !0
787
- }, C.map((t, n) => {
895
+ }, ee.map((t, n) => {
788
896
  let [i, a] = t.split("-");
789
- return S.length ? /*#__PURE__*/ p.createElement("ol", {
897
+ return T.length ? /*#__PURE__*/ h.createElement("ol", {
790
898
  key: t,
791
- dir: _ === "auto" ? Ce() : _,
899
+ dir: v === "auto" ? $() : v,
792
900
  tabIndex: -1,
793
901
  ref: N,
794
902
  className: c,
@@ -797,11 +905,11 @@ var Z = /*#__PURE__*/ p.forwardRef(function(e, t) {
797
905
  "data-y-position": i,
798
906
  "data-x-position": a,
799
907
  style: {
800
- "--front-toast-height": `${w[0]?.height || 0}px`,
801
- "--width": `${Y}px`,
802
- "--gap": `${te}px`,
803
- ...h,
804
- ...we(l, u)
908
+ "--front-toast-height": `${E[0]?.height || 0}px`,
909
+ "--width": `${X}px`,
910
+ "--gap": `${y}px`,
911
+ ...m,
912
+ ...Ee(l, u)
805
913
  },
806
914
  onBlur: (e) => {
807
915
  I.current && !e.currentTarget.contains(e.relatedTarget) && (I.current = !1, F.current &&= (F.current.focus({ preventScroll: !0 }), null));
@@ -809,81 +917,81 @@ var Z = /*#__PURE__*/ p.forwardRef(function(e, t) {
809
917
  onFocus: (e) => {
810
918
  e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || I.current || (I.current = !0, F.current = e.relatedTarget);
811
919
  },
812
- onMouseEnter: () => D(!0),
813
- onMouseMove: () => D(!0),
920
+ onMouseEnter: () => O(!0),
921
+ onMouseMove: () => O(!0),
814
922
  onMouseLeave: () => {
815
- k || D(!1);
923
+ k || O(!1);
816
924
  },
817
- onDragEnd: () => D(!1),
925
+ onDragEnd: () => O(!1),
818
926
  onPointerDown: (e) => {
819
927
  e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || A(!0);
820
928
  },
821
929
  onPointerUp: () => A(!1)
822
- }, S.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ p.createElement(Se, {
930
+ }, T.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ h.createElement(Q, {
823
931
  key: n.id,
824
- icons: v,
932
+ icons: b,
825
933
  index: i,
826
934
  toast: n,
827
935
  defaultRichColors: f,
828
- duration: g?.duration ?? m,
829
- className: g?.className,
830
- descriptionClassName: g?.descriptionClassName,
936
+ duration: _?.duration ?? p,
937
+ className: _?.className,
938
+ descriptionClassName: _?.descriptionClassName,
831
939
  invert: r,
832
- visibleToasts: ee,
833
- closeButton: g?.closeButton ?? s,
940
+ visibleToasts: g,
941
+ closeButton: _?.closeButton ?? s,
834
942
  interacting: k,
835
943
  position: t,
836
- style: g?.style,
837
- unstyled: g?.unstyled,
838
- classNames: g?.classNames,
839
- cancelButtonStyle: g?.cancelButtonStyle,
840
- actionButtonStyle: g?.actionButtonStyle,
841
- closeButtonAriaLabel: g?.closeButtonAriaLabel,
944
+ style: _?.style,
945
+ unstyled: _?.unstyled,
946
+ classNames: _?.classNames,
947
+ cancelButtonStyle: _?.cancelButtonStyle,
948
+ actionButtonStyle: _?.actionButtonStyle,
949
+ closeButtonAriaLabel: _?.closeButtonAriaLabel,
842
950
  removeToast: L,
843
- toasts: S.filter((e) => e.position == n.position),
844
- heights: w.filter((e) => e.position == n.position),
845
- setHeights: T,
951
+ toasts: T.filter((e) => e.position == n.position),
952
+ heights: E.filter((e) => e.position == n.position),
953
+ setHeights: D,
846
954
  expandByDefault: o,
847
- gap: te,
848
- expanded: E,
955
+ gap: y,
956
+ expanded: te,
849
957
  swipeDirections: e.swipeDirections
850
958
  }))) : null;
851
959
  }));
852
960
  });
853
961
  // packages/feedback/src/toast.tsx
854
- function Te({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notification", offset: n = c.xl, mobileOffset: r = c.lg, ...i }) {
855
- return /* @__PURE__ */ v(Z, {
962
+ function Oe({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notification", offset: n = u.xl, mobileOffset: r = u.lg, ...i }) {
963
+ return /* @__PURE__ */ S(De, {
856
964
  ...i,
857
965
  className: "x7kce61 xkwcdv0 x19hn9gq x350ok5 x1dknavn x1qgcmqu x19j7ixz xgam3oh x7s97pk",
858
966
  style: {
859
- zIndex: l.popup,
967
+ zIndex: d.popup,
860
968
  transitionProperty: "opacity, transform"
861
969
  },
862
970
  offset: n,
863
971
  mobileOffset: r,
864
972
  closeButton: e,
865
973
  icons: {
866
- success: /* @__PURE__ */ v(b, {
974
+ success: /* @__PURE__ */ S(T, {
867
975
  "aria-hidden": !0,
868
976
  className: "xtwnzbg x18utl2x x19m34er x7ixh4y"
869
977
  }),
870
- error: /* @__PURE__ */ v(x, {
978
+ error: /* @__PURE__ */ S(ee, {
871
979
  "aria-hidden": !0,
872
980
  className: "xtwnzbg x18utl2x x19m34er xr5kp14"
873
981
  }),
874
- warning: /* @__PURE__ */ v(w, {
982
+ warning: /* @__PURE__ */ S(te, {
875
983
  "aria-hidden": !0,
876
984
  className: "xtwnzbg x18utl2x x19m34er x1f9ixgr"
877
985
  }),
878
- info: /* @__PURE__ */ v(S, {
986
+ info: /* @__PURE__ */ S(E, {
879
987
  "aria-hidden": !0,
880
988
  className: "xtwnzbg x18utl2x x19m34er x153jb6y"
881
989
  }),
882
- loading: /* @__PURE__ */ v(C, {
990
+ loading: /* @__PURE__ */ S(D, {
883
991
  "aria-hidden": !0,
884
992
  className: "xtwnzbg x18utl2x x19m34er x153jb6y"
885
993
  }),
886
- close: /* @__PURE__ */ v(T, {
994
+ close: /* @__PURE__ */ S(O, {
887
995
  "aria-hidden": !0,
888
996
  className: "xtwnzbg x18utl2x x19m34er"
889
997
  })
@@ -907,7 +1015,7 @@ function Te({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notificati
907
1015
  });
908
1016
  }
909
1017
  // packages/feedback/src/async-region.tsx
910
- var Q = m(void 0), $ = m(!1), Ee = o.delaySeconds * 1e3, De = {
1018
+ var ke = g(void 0), Ae = g(!1), je = o.delaySeconds * 1e3, Me = {
911
1019
  content: {
912
1020
  k7Eaqz: "xeuugli",
913
1021
  kAzted: "x2lwn1j",
@@ -926,26 +1034,26 @@ var Q = m(void 0), $ = m(!1), Ee = o.delaySeconds * 1e3, De = {
926
1034
  k44tkh: "x11hm9ij",
927
1035
  $$css: !0
928
1036
  }
929
- }, Oe = {
1037
+ }, Ne = {
930
1038
  content: null,
931
- image: De.imageReveal
1039
+ image: Me.imageReveal
932
1040
  };
933
- function ke({ identity: e, initialStartedAt: t, children: n }) {
934
- let [r, i] = _(() => ({
1041
+ function Pe({ identity: e, initialStartedAt: t, children: n }) {
1042
+ let [r, i] = b(() => ({
935
1043
  identity: e,
936
1044
  startedAt: t ?? Date.now()
937
1045
  })), a = r;
938
1046
  return r.identity !== e && (a = {
939
1047
  identity: e,
940
1048
  startedAt: Date.now()
941
- }, i(a)), /* @__PURE__ */ v(Q, {
1049
+ }, i(a)), /* @__PURE__ */ S(ke, {
942
1050
  value: a,
943
1051
  children: n
944
1052
  });
945
1053
  }
946
- function Ae({ shouldEnter: e, presentation: t = "content", children: n }) {
947
- let r = h($), [i, a] = _(e && !r), o = g(null);
948
- return ee(() => {
1054
+ function Fe({ shouldEnter: e, presentation: t = "content", children: n }) {
1055
+ let r = _(Ae), [i, a] = b(e && !r), o = y(null);
1056
+ return v(() => {
949
1057
  let e = o.current;
950
1058
  if (!i || e === null) return;
951
1059
  let t = !0;
@@ -954,24 +1062,24 @@ function Ae({ shouldEnter: e, presentation: t = "content", children: n }) {
954
1062
  }), () => {
955
1063
  t = !1;
956
1064
  };
957
- }, [i]), /* @__PURE__ */ v("div", {
1065
+ }, [i]), /* @__PURE__ */ S("div", {
958
1066
  ref: o,
959
- ...f.props(De.content, i && De.reveal, Oe[t]),
960
- children: /* @__PURE__ */ v($, {
1067
+ ...m.props(Me.content, i && Me.reveal, Ne[t]),
1068
+ children: /* @__PURE__ */ S(Ae, {
961
1069
  value: r || i,
962
1070
  children: n
963
1071
  })
964
1072
  });
965
1073
  }
966
- function je({ label: e, placeholder: t, startedAt: n, presentation: r }) {
967
- let [i, a] = _(() => Date.now() - n >= Ee ? n : void 0), o = i === n, s = r === "image";
968
- return ee(() => {
969
- let e = Math.max(0, Ee - (Date.now() - n)), t = setTimeout(() => a(n), e);
1074
+ function Ie({ label: e, placeholder: t, startedAt: n, presentation: r }) {
1075
+ let [i, a] = b(() => Date.now() - n >= je ? n : void 0), o = i === n, s = r === "image";
1076
+ return v(() => {
1077
+ let e = Math.max(0, je - (Date.now() - n)), t = setTimeout(() => a(n), e);
970
1078
  return () => clearTimeout(t);
971
- }, [n]), /* @__PURE__ */ y(te, { children: [/* @__PURE__ */ v("div", {
1079
+ }, [n]), /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
972
1080
  "aria-busy": !0,
973
1081
  className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
974
- children: /* @__PURE__ */ v("div", {
1082
+ children: /* @__PURE__ */ S("div", {
975
1083
  "aria-hidden": !0,
976
1084
  inert: !0,
977
1085
  ...{
@@ -982,14 +1090,14 @@ function je({ label: e, placeholder: t, startedAt: n, presentation: r }) {
982
1090
  }[!(s || o) << 1 | !(s || !o)],
983
1091
  children: t
984
1092
  })
985
- }), o && /* @__PURE__ */ v("span", {
1093
+ }), o && /* @__PURE__ */ S("span", {
986
1094
  role: "status",
987
- ...f.props(u.hidden),
1095
+ ...m.props(f.hidden),
988
1096
  children: e
989
1097
  })] });
990
1098
  }
991
- function Me(e) {
992
- let t = h(Q), [n, r] = _(() => ({
1099
+ function Le(e) {
1100
+ let t = _(ke), [n, r] = b(() => ({
993
1101
  state: e.state,
994
1102
  scope: t,
995
1103
  startedAt: t?.startedAt ?? Date.now(),
@@ -1004,21 +1112,21 @@ function Me(e) {
1004
1112
  wasPending: e.state === "pending" || !a && n.wasPending
1005
1113
  }, r(i);
1006
1114
  }
1007
- return /* @__PURE__ */ v("div", {
1115
+ return /* @__PURE__ */ S("div", {
1008
1116
  className: "x1n2onr6 xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
1009
- children: e.state === "pending" ? /* @__PURE__ */ v(je, {
1117
+ children: e.state === "pending" ? /* @__PURE__ */ S(Ie, {
1010
1118
  label: e.label,
1011
1119
  placeholder: e.placeholder,
1012
1120
  startedAt: i.startedAt,
1013
1121
  presentation: e.presentation ?? "content"
1014
- }) : e.state === "failed" ? /* @__PURE__ */ v("div", {
1122
+ }) : e.state === "failed" ? /* @__PURE__ */ S("div", {
1015
1123
  className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
1016
1124
  children: e.children
1017
- }) : /* @__PURE__ */ v(Ae, {
1125
+ }) : /* @__PURE__ */ S(Fe, {
1018
1126
  shouldEnter: i.wasPending,
1019
1127
  presentation: e.presentation ?? "content",
1020
1128
  children: e.children
1021
1129
  })
1022
1130
  });
1023
1131
  }
1024
- export { he as a, z as c, P as d, F as f, Te as i, re as l, A as m, Ae as n, B as o, k as p, ke as r, ie as s, Me as t, N as u };
1132
+ export { _e as a, V as c, F as d, I as f, M as h, Oe as i, ie as l, j as m, Fe as n, U as o, L as p, Pe as r, oe as s, Le as t, B as u };