@mechane-ai/elements 0.12.0 → 0.14.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 (88) hide show
  1. package/README.md +50 -11
  2. package/dist/ai.js +175 -148
  3. package/dist/{categorical-values-CTrHn9jH.js → categorical-values-BnWfIPlv.js} +3 -3
  4. package/dist/{chart-frame-38ES6kwK.js → chart-frame-Dm8UNfYD.js} +6 -6
  5. package/dist/{chart-input-C9fu7f1Q.js → chart-input-ceiMZYI-.js} +3 -3
  6. package/dist/charts/cartesian.js +16 -16
  7. package/dist/charts/distribution.js +6 -6
  8. package/dist/charts/graph.js +5 -5
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +13 -13
  11. package/dist/charts/timeline.js +30 -30
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-BjV2EFZS.js → code-block-D07N6mYS.js} +4 -4
  14. package/dist/collections.js +414 -395
  15. package/dist/constants.stylex-bbdiv1fD.js +83 -0
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +5 -5
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +4 -4
  20. package/dist/content/tree.js +2 -2
  21. package/dist/{content-link-C460m-O7.js → content-link-CEx2s1MU.js} +1 -1
  22. package/dist/content.js +5 -5
  23. package/dist/elements.css +71 -120
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +21 -21
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +22 -22
  29. package/dist/navigation/commands.js +6 -6
  30. package/dist/navigation.js +30 -16
  31. package/dist/overlays.js +1 -1
  32. package/dist/packages/ai/src/approval.d.ts +1 -1
  33. package/dist/packages/ai/src/conversation.d.ts +4 -4
  34. package/dist/packages/ai/src/index.d.ts +2 -2
  35. package/dist/packages/ai/src/prompt-input.d.ts +9 -5
  36. package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
  37. package/dist/packages/charts/src/cartesian/time-series.d.ts +2 -2
  38. package/dist/packages/charts/src/chart-frame.d.ts +2 -2
  39. package/dist/packages/collections/src/collection-controls.d.ts +8 -7
  40. package/dist/packages/collections/src/collection-scroll.d.ts +2 -2
  41. package/dist/packages/collections/src/data-table.d.ts +23 -6
  42. package/dist/packages/collections/src/index.d.ts +4 -5
  43. package/dist/packages/content/src/code/code-block.d.ts +4 -4
  44. package/dist/packages/content/src/diff/diff-source.d.ts +1 -1
  45. package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -2
  46. package/dist/packages/content/src/markdown/markdown.d.ts +2 -2
  47. package/dist/packages/content/src/trace.d.ts +3 -3
  48. package/dist/packages/core/src/actions.d.ts +2 -2
  49. package/dist/packages/core/src/surfaces.d.ts +6 -6
  50. package/dist/packages/core/src/text.d.ts +2 -2
  51. package/dist/packages/feedback/src/async-region.d.ts +18 -10
  52. package/dist/packages/feedback/src/control-placeholders.d.ts +10 -5
  53. package/dist/packages/feedback/src/feedback.d.ts +2 -2
  54. package/dist/packages/feedback/src/index.d.ts +2 -3
  55. package/dist/packages/forms/src/form-actions.d.ts +2 -2
  56. package/dist/packages/forms/src/forms.d.ts +2 -2
  57. package/dist/packages/forms/src/selection-styles.d.ts +1 -1
  58. package/dist/packages/foundations/src/constants.stylex.d.ts +90 -0
  59. package/dist/packages/foundations/src/control-styles.d.ts +21 -0
  60. package/dist/packages/foundations/src/tokens.d.ts +2 -0
  61. package/dist/packages/foundations/src/tokens.stylex.d.ts +0 -85
  62. package/dist/packages/layout/src/app-shell.d.ts +2 -2
  63. package/dist/packages/layout/src/page-toolbar.d.ts +3 -3
  64. package/dist/packages/layout/src/record-page.d.ts +2 -2
  65. package/dist/packages/layout/src/resizable.d.ts +2 -2
  66. package/dist/packages/layout/src/sidebar.d.ts +6 -6
  67. package/dist/packages/layout/src/view-stack.d.ts +2 -2
  68. package/dist/packages/layout/src/workbench.d.ts +2 -2
  69. package/dist/packages/navigation/src/commands/command.d.ts +3 -3
  70. package/dist/packages/navigation/src/index.d.ts +2 -2
  71. package/dist/packages/navigation/src/page-navigation.d.ts +7 -2
  72. package/dist/packages/overlays/src/drawer.d.ts +2 -2
  73. package/dist/{pierre-diff-sUAU-xeL.js → pierre-diff-C_j0nxwS.js} +2 -2
  74. package/dist/pierre-theme-BUeJim8s.js +127 -0
  75. package/dist/{pierre-tree-DKN2eGlZ.js → pierre-tree-CBBDlJ_Y.js} +4 -4
  76. package/dist/{src-DOzle5d4.js → src-BkXlN6aZ.js} +180 -195
  77. package/dist/{src-CI6KtN2w.js → src-C9GQP3px.js} +353 -377
  78. package/dist/{src-3gzujMhN.js → src-CyJd2qSZ.js} +47 -33
  79. package/dist/{src-CVlgjAlw.js → src-d7EAi61b.js} +9 -9
  80. package/dist/theme.js +1 -1
  81. package/dist/tokens.js +3 -203
  82. package/dist/tokens.stylex-DTHHFbyl.js +128 -0
  83. package/package.json +4 -2
  84. package/packages/foundations/src/constants.stylex.ts +91 -0
  85. package/packages/foundations/src/tokens.stylex.ts +0 -88
  86. package/dist/packages/collections/src/table.d.ts +0 -17
  87. package/dist/packages/feedback/src/loading.d.ts +0 -7
  88. package/dist/pierre-theme-CBAncKdH.js +0 -126
@@ -1,41 +1,42 @@
1
- import { O as e, i as t, s as n } from "./src-3gzujMhN.js";
2
- import { controls as r, layers as i, spacing as a } from "./tokens.js";
3
- import { t as o } from "./accessibility-C-aIZ1Yx.js";
4
- import { mergeProps as s } from "@base-ui/react/merge-props";
5
- import * as c from "@stylexjs/stylex";
6
- import l, { createContext as ee, useContext as u, useEffect as d, useState as f } from "react";
7
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
- import { Box as h, CircleCheck as g, CircleX as _, Info as v, LoaderCircle as y, TriangleAlert as b, X as te } from "lucide-react";
9
- import { Meter as x } from "@base-ui/react/meter";
10
- import { Progress as S } from "@base-ui/react/progress";
11
- import C from "react-dom";
1
+ import { O as e, i as t, s as n } from "./src-CyJd2qSZ.js";
2
+ import { i as r, l as i } from "./tokens.stylex-DTHHFbyl.js";
3
+ import { t as a } from "./accessibility-C-aIZ1Yx.js";
4
+ import { c as o, s } from "./constants.stylex-bbdiv1fD.js";
5
+ import { mergeProps as c } from "@base-ui/react/merge-props";
6
+ import * as l from "@stylexjs/stylex";
7
+ import u, { createContext as d, useContext as f, useEffect as p, useRef as m, useState as h } from "react";
8
+ import { Fragment as ee, jsx as g, jsxs as _ } from "react/jsx-runtime";
9
+ import { Box as v, CircleCheck as y, CircleX as b, Info as te, LoaderCircle as x, TriangleAlert as S, X as C } from "lucide-react";
10
+ import { Meter as w } from "@base-ui/react/meter";
11
+ import { Progress as T } from "@base-ui/react/progress";
12
+ import E from "react-dom";
12
13
  // packages/feedback/src/feedback.tsx
13
- function w({ title: e, children: r, action: i, ...a }) {
14
- return /* @__PURE__ */ m("div", {
15
- ...s({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid xeuugli x193iq5w x9f619 x9w77qv xnx3t7k x1n8ia3y x1hz01jw xj57cvi xvmahel xj0a0fe" }, a),
14
+ function ne({ title: e, children: r, action: i, ...a }) {
15
+ return /* @__PURE__ */ _("div", {
16
+ ...c({ className: "x78zum5 xdt5ytf x6s0dn4 xl56j7k x2b8uid xeuugli x193iq5w x9f619 x9w77qv xnx3t7k x1n8ia3y x1hz01jw xj57cvi xvmahel xj0a0fe" }, a),
16
17
  children: [
17
- /* @__PURE__ */ p(h, {
18
+ /* @__PURE__ */ g(v, {
18
19
  size: 22,
19
20
  "aria-hidden": !0,
20
21
  className: "x153jb6y x2lah0s"
21
22
  }),
22
- /* @__PURE__ */ p(n, { children: e }),
23
- r != null && /* @__PURE__ */ p(t, { children: r }),
24
- i != null && /* @__PURE__ */ p("div", {
23
+ /* @__PURE__ */ g(n, { children: e }),
24
+ r != null && /* @__PURE__ */ g(t, { children: r }),
25
+ i != null && /* @__PURE__ */ g("div", {
25
26
  className: "x78zum5 xl56j7k x1a02dak x1hnptsi xeuugli x193iq5w",
26
27
  children: i
27
28
  })
28
29
  ]
29
30
  });
30
31
  }
31
- function T({ error: e = !1, ...t }) {
32
- return /* @__PURE__ */ p("div", { ...s({ role: e ? "alert" : "status" }, {
32
+ function re({ hasError: e = !1, ...t }) {
33
+ return /* @__PURE__ */ g("div", { ...c({ role: e ? "alert" : "status" }, {
33
34
  0: { className: "xeuugli x193iq5w x9f619 x1qokhjc x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi x1dqe72f x1f9ixgr xj0a0fe" },
34
35
  1: { className: "xeuugli x193iq5w x9f619 x1qokhjc x1doqdfy x1ok0vyi x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi xj0a0fe xr5kp14 xcqwzn" }
35
36
  }[!!e | 0], t) });
36
37
  }
37
38
  // packages/feedback/src/skeleton.tsx
38
- var E = {
39
+ var D = {
39
40
  skeleton: {
40
41
  k1xSpc: "x1lliihq",
41
42
  ks0D6T: "x193iq5w",
@@ -73,50 +74,50 @@ var E = {
73
74
  k7Eaqz: "xeuugli",
74
75
  $$css: !0
75
76
  }
76
- }, ne = {
77
- rectangle: E.rectangle,
78
- circle: E.circle
77
+ }, O = {
78
+ rectangle: D.rectangle,
79
+ circle: D.circle
79
80
  };
80
- function D({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
81
- return /* @__PURE__ */ p("span", {
81
+ function k({ width: e = "100%", height: t = 8, shape: n = "rectangle" }) {
82
+ return /* @__PURE__ */ g("span", {
82
83
  "aria-hidden": !0,
83
- ...c.props(E.skeleton, E.dimensions(e, t), ne[n])
84
+ ...l.props(D.skeleton, D.dimensions(e, t), O[n])
84
85
  });
85
86
  }
86
- function O({ lines: e = 1, width: t = "100%" }) {
87
- return /* @__PURE__ */ p("span", {
87
+ function A({ lines: e = 1, width: t = "100%" }) {
88
+ return /* @__PURE__ */ g("span", {
88
89
  "aria-hidden": !0,
89
- ...c.props(E.text, E.width(t)),
90
- children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ p("span", {
90
+ ...l.props(D.text, D.width(t)),
91
+ children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ g("span", {
91
92
  className: "x78zum5 x6s0dn4 xg2ss61",
92
- children: /* @__PURE__ */ p(D, {
93
+ children: /* @__PURE__ */ g(k, {
93
94
  width: e > 1 && n === e - 1 ? "65%" : "100%",
94
95
  height: "0.6em"
95
96
  })
96
97
  }, `placeholder-${n}`))
97
98
  });
98
99
  }
99
- function k({ label: e, showLabel: t = !1 }) {
100
- return /* @__PURE__ */ m("span", {
100
+ function j({ label: e, showLabel: t = !1 }) {
101
+ return /* @__PURE__ */ _("span", {
101
102
  role: "status",
102
103
  className: "x3nfvp2 x1n2onr6 x6s0dn4 xeuugli x193iq5w x1hnptsi x153jb6y x1hz01jw xtqrqnz x1778rvt xj57cvi xj0a0fe",
103
- children: [/* @__PURE__ */ p(y, {
104
+ children: [/* @__PURE__ */ g(x, {
104
105
  "aria-hidden": !0,
105
106
  className: "xtwnzbg x18utl2x x2lah0s"
106
- }), /* @__PURE__ */ p("span", {
107
- ...c.props(E.label, !t && o.hidden),
107
+ }), /* @__PURE__ */ g("span", {
108
+ ...l.props(D.label, !t && a.hidden),
108
109
  children: e
109
110
  })]
110
111
  });
111
112
  }
112
113
  // packages/feedback/src/control-placeholders.tsx
113
- var A = {
114
+ var M = {
114
115
  ks0D6T: "x193iq5w",
115
116
  $$css: !0
116
- }, re = {
117
+ }, N = {
117
118
  kZKoxP: "x16ye13r",
118
119
  $$css: !0
119
- }, j = {
120
+ }, P = {
120
121
  button: {
121
122
  kWkggS: "x1r7kqkb",
122
123
  kXLuUW: "xxymvpz",
@@ -128,220 +129,173 @@ var A = {
128
129
  $$css: !0
129
130
  },
130
131
  width: (e) => [
131
- A,
132
+ M,
132
133
  {
133
134
  kzqmXN: e == null ? e : "x5lhr3w",
134
135
  $$css: !0
135
136
  },
136
137
  { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
137
138
  ],
138
- rows: (e) => [re, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`calc(${e} * 1lh + 2 * ${r.paddingBlock} + 2px)`) }]
139
+ rows: (e) => [N, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(`calc(${e} * 1lh + 2 * ${r.paddingBlock} + 2px)`) }]
139
140
  };
140
- function M({ width: t = "7ch", xstyle: n }) {
141
- return /* @__PURE__ */ p("span", {
141
+ function F({ width: t = "7ch", isIconOnly: n = !1, xstyle: i }) {
142
+ return /* @__PURE__ */ g("span", {
142
143
  "aria-hidden": !0,
143
- ...c.props(e.base, e.button, j.button, n),
144
- children: /* @__PURE__ */ p(O, { width: t })
144
+ inert: !0,
145
+ ...l.props(e.base, e.button, n && e.iconButton, P.button, i),
146
+ children: n ? /* @__PURE__ */ g(k, {
147
+ width: r.iconSize,
148
+ height: r.iconSize
149
+ }) : /* @__PURE__ */ g(A, { width: t })
145
150
  });
146
151
  }
147
- function N({ label: t, hint: n, multiline: r = !1, rows: i = 4, width: a = "100%", xstyle: o }) {
152
+ function I({ label: t, hint: n, isMultiline: r = !1, rows: i = 4, width: a = "100%", xstyle: o }) {
148
153
  let s = r ? Math.min(i, 6) : 1;
149
- return /* @__PURE__ */ m("div", {
154
+ return /* @__PURE__ */ _("div", {
150
155
  "aria-hidden": !0,
151
- ...c.props(e.fieldRoot, j.width(a), o),
156
+ ...l.props(e.fieldRoot, P.width(a), o),
152
157
  children: [
153
- t !== void 0 && /* @__PURE__ */ p("span", {
154
- ...c.props(e.label),
158
+ t !== void 0 && /* @__PURE__ */ g("span", {
159
+ ...l.props(e.label),
155
160
  children: t
156
161
  }),
157
- /* @__PURE__ */ p("div", {
158
- ...c.props(e.base, e.field, !r && j.singleLine, r && e.textarea, r && j.rows(i)),
159
- children: /* @__PURE__ */ p(O, {
162
+ /* @__PURE__ */ g("div", {
163
+ ...l.props(e.base, e.field, !r && P.singleLine, r && e.textarea, r && P.rows(i)),
164
+ children: /* @__PURE__ */ g(A, {
160
165
  width: "60%",
161
166
  lines: s
162
167
  })
163
168
  }),
164
- n !== void 0 && /* @__PURE__ */ p("span", {
165
- ...c.props(e.description),
169
+ n !== void 0 && /* @__PURE__ */ g("span", {
170
+ ...l.props(e.description),
166
171
  children: n
167
172
  })
168
173
  ]
169
174
  });
170
175
  }
171
- // packages/feedback/src/loading.tsx
172
- function P({ label: e, shape: t = "rows" }) {
173
- return /* @__PURE__ */ m("div", {
174
- role: "status",
175
- className: "xeuugli x1n2onr6",
176
- children: [/* @__PURE__ */ p("span", {
177
- ...c.props(o.hidden),
178
- children: e
179
- }), t === "rows" ? /* @__PURE__ */ m("div", {
180
- "aria-hidden": !0,
181
- children: [/* @__PURE__ */ p("div", {
182
- className: "xrvj5dj x18zg5m9 x6s0dn4 x9f619 x1hyy85k xso031l x1q0q8m5 x1qndepd",
183
- children: /* @__PURE__ */ p("div", {
184
- className: "xeuugli x1m92p3w",
185
- children: /* @__PURE__ */ p(D, { width: 54 })
186
- })
187
- }), [
188
- 0,
189
- 1,
190
- 2
191
- ].map((e) => /* @__PURE__ */ m("div", {
192
- className: "xrvj5dj x18zg5m9 x6s0dn4 xb4ss6y x9f619",
193
- children: [
194
- /* @__PURE__ */ p("div", {
195
- className: "xeuugli x1m92p3w",
196
- children: /* @__PURE__ */ p(D, { width: e === 1 ? 108 : 174 })
197
- }),
198
- /* @__PURE__ */ p("div", {
199
- className: "xeuugli x1m92p3w",
200
- children: /* @__PURE__ */ p(D, { width: 54 })
201
- }),
202
- /* @__PURE__ */ p("div", {
203
- className: "xeuugli x1m92p3w",
204
- children: /* @__PURE__ */ p(D, { width: 108 })
205
- })
206
- ]
207
- }, e))]
208
- }) : /* @__PURE__ */ m("div", {
209
- "aria-hidden": !0,
210
- className: "xrvj5dj xaml1ju x1ydxw8w",
211
- children: [
212
- /* @__PURE__ */ p(D, {
213
- width: 216,
214
- height: 24
215
- }),
216
- /* @__PURE__ */ p(D, { width: 174 }),
217
- /* @__PURE__ */ p(D, { width: 108 })
218
- ]
219
- })]
220
- });
221
- }
222
176
  // packages/feedback/src/progress.tsx
223
- function F({ label: e, value: t, max: n, valueLabel: r }) {
224
- return /* @__PURE__ */ m(S.Root, {
177
+ function ie({ label: e, value: t, max: n, valueLabel: r }) {
178
+ return /* @__PURE__ */ _(T.Root, {
225
179
  value: t,
226
180
  max: n,
227
181
  locale: "en-US",
228
182
  getAriaValueText: () => r,
229
183
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
230
- children: [/* @__PURE__ */ m("div", {
184
+ children: [/* @__PURE__ */ _("div", {
231
185
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
232
- children: [/* @__PURE__ */ p(S.Label, {
186
+ children: [/* @__PURE__ */ g(T.Label, {
233
187
  className: "xeuugli x193iq5w",
234
188
  children: e
235
- }), /* @__PURE__ */ p("span", {
189
+ }), /* @__PURE__ */ g("span", {
236
190
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
237
191
  children: r
238
192
  })]
239
- }), /* @__PURE__ */ p(S.Track, {
193
+ }), /* @__PURE__ */ g(T.Track, {
240
194
  ...{
241
195
  0: { className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr" },
242
196
  1: { className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619" }
243
197
  }[t === null | 0],
244
- children: t !== null && /* @__PURE__ */ p(S.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
198
+ children: t !== null && /* @__PURE__ */ g(T.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
245
199
  })]
246
200
  });
247
201
  }
248
- function I({ label: e, value: t, max: n, valueLabel: r }) {
249
- return t === null ? /* @__PURE__ */ m("div", {
202
+ function L({ label: e, value: t, max: n, valueLabel: r }) {
203
+ return t === null ? /* @__PURE__ */ _("div", {
250
204
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
251
- children: [/* @__PURE__ */ m("div", {
205
+ children: [/* @__PURE__ */ _("div", {
252
206
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
253
- children: [/* @__PURE__ */ p("span", {
207
+ children: [/* @__PURE__ */ g("span", {
254
208
  className: "xeuugli x193iq5w",
255
209
  children: e
256
- }), /* @__PURE__ */ p("span", {
210
+ }), /* @__PURE__ */ g("span", {
257
211
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
258
212
  children: r
259
213
  })]
260
- }), /* @__PURE__ */ p("div", {
214
+ }), /* @__PURE__ */ g("div", {
261
215
  "aria-hidden": !0,
262
216
  className: "xqu0tyb xh8yej3 x1ok0vyi xb3r6kr x1r7kqkb xmkeg23 xbsl7fq xqrc7c3 x9f619"
263
217
  })]
264
- }) : /* @__PURE__ */ m(x.Root, {
218
+ }) : /* @__PURE__ */ _(w.Root, {
265
219
  value: t,
266
220
  max: n,
267
221
  locale: "en-US",
268
222
  getAriaValueText: () => r,
269
223
  className: "x78zum5 xdt5ytf x1hnptsi xh8yej3 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft xj0a0fe",
270
- children: [/* @__PURE__ */ m("div", {
224
+ children: [/* @__PURE__ */ _("div", {
271
225
  className: "x78zum5 x1pha0wt x1qughib x1n8ia3y x1a02dak",
272
- children: [/* @__PURE__ */ p(x.Label, {
226
+ children: [/* @__PURE__ */ g(w.Label, {
273
227
  className: "xeuugli x193iq5w",
274
228
  children: e
275
- }), /* @__PURE__ */ p("span", {
229
+ }), /* @__PURE__ */ g("span", {
276
230
  className: "xeuugli x193iq5w x153jb6y xss6m8b",
277
231
  children: r
278
232
  })]
279
- }), /* @__PURE__ */ p(x.Track, {
233
+ }), /* @__PURE__ */ g(w.Track, {
280
234
  className: "xqu0tyb xh8yej3 x1ok0vyi x1fa40ue xb3r6kr",
281
- children: /* @__PURE__ */ p(x.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
235
+ children: /* @__PURE__ */ g(w.Indicator, { className: "x5yr21d x1pt885t x1ok0vyi" })
282
236
  })]
283
237
  });
284
238
  }
285
239
  // ../../../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
286
- var ie = (e) => {
240
+ var ae = (e) => {
287
241
  switch (e) {
288
- case "success": return L;
289
- case "info": return R;
290
- case "warning": return se;
242
+ case "success": return ce;
243
+ case "info": return le;
244
+ case "warning": return R;
291
245
  case "error": return z;
292
246
  default: return null;
293
247
  }
294
- }, ae = Array(12).fill(0), oe = ({ visible: e, className: t }) => /*#__PURE__*/ l.createElement("div", {
248
+ }, oe = Array(12).fill(0), se = ({ visible: e, className: t }) => /*#__PURE__*/ u.createElement("div", {
295
249
  className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
296
250
  "data-visible": e
297
- }, /*#__PURE__*/ l.createElement("div", { className: "sonner-spinner" }, ae.map((e, t) => /*#__PURE__*/ l.createElement("div", {
251
+ }, /*#__PURE__*/ u.createElement("div", { className: "sonner-spinner" }, oe.map((e, t) => /*#__PURE__*/ u.createElement("div", {
298
252
  className: "sonner-loading-bar",
299
253
  key: `spinner-bar-${t}`
300
- })))), L = /*#__PURE__*/ l.createElement("svg", {
254
+ })))), ce = /*#__PURE__*/ u.createElement("svg", {
301
255
  xmlns: "http://www.w3.org/2000/svg",
302
256
  viewBox: "0 0 20 20",
303
257
  fill: "currentColor",
304
258
  height: "20",
305
259
  width: "20",
306
260
  "aria-hidden": "true"
307
- }, /*#__PURE__*/ l.createElement("path", {
261
+ }, /*#__PURE__*/ u.createElement("path", {
308
262
  fillRule: "evenodd",
309
263
  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",
310
264
  clipRule: "evenodd"
311
- })), se = /*#__PURE__*/ l.createElement("svg", {
265
+ })), R = /*#__PURE__*/ u.createElement("svg", {
312
266
  xmlns: "http://www.w3.org/2000/svg",
313
267
  viewBox: "0 0 24 24",
314
268
  fill: "currentColor",
315
269
  height: "20",
316
270
  width: "20",
317
271
  "aria-hidden": "true"
318
- }, /*#__PURE__*/ l.createElement("path", {
272
+ }, /*#__PURE__*/ u.createElement("path", {
319
273
  fillRule: "evenodd",
320
274
  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",
321
275
  clipRule: "evenodd"
322
- })), R = /*#__PURE__*/ l.createElement("svg", {
276
+ })), le = /*#__PURE__*/ u.createElement("svg", {
323
277
  xmlns: "http://www.w3.org/2000/svg",
324
278
  viewBox: "0 0 20 20",
325
279
  fill: "currentColor",
326
280
  height: "20",
327
281
  width: "20",
328
282
  "aria-hidden": "true"
329
- }, /*#__PURE__*/ l.createElement("path", {
283
+ }, /*#__PURE__*/ u.createElement("path", {
330
284
  fillRule: "evenodd",
331
285
  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",
332
286
  clipRule: "evenodd"
333
- })), z = /*#__PURE__*/ l.createElement("svg", {
287
+ })), z = /*#__PURE__*/ u.createElement("svg", {
334
288
  xmlns: "http://www.w3.org/2000/svg",
335
289
  viewBox: "0 0 20 20",
336
290
  fill: "currentColor",
337
291
  height: "20",
338
292
  width: "20",
339
293
  "aria-hidden": "true"
340
- }, /*#__PURE__*/ l.createElement("path", {
294
+ }, /*#__PURE__*/ u.createElement("path", {
341
295
  fillRule: "evenodd",
342
296
  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",
343
297
  clipRule: "evenodd"
344
- })), ce = /*#__PURE__*/ l.createElement("svg", {
298
+ })), ue = /*#__PURE__*/ u.createElement("svg", {
345
299
  xmlns: "http://www.w3.org/2000/svg",
346
300
  width: "12",
347
301
  height: "12",
@@ -352,25 +306,25 @@ var ie = (e) => {
352
306
  strokeLinecap: "round",
353
307
  strokeLinejoin: "round",
354
308
  "aria-hidden": "true"
355
- }, /*#__PURE__*/ l.createElement("line", {
309
+ }, /*#__PURE__*/ u.createElement("line", {
356
310
  x1: "18",
357
311
  y1: "6",
358
312
  x2: "6",
359
313
  y2: "18"
360
- }), /*#__PURE__*/ l.createElement("line", {
314
+ }), /*#__PURE__*/ u.createElement("line", {
361
315
  x1: "6",
362
316
  y1: "6",
363
317
  x2: "18",
364
318
  y2: "18"
365
- })), le = () => {
366
- let [e, t] = l.useState(document.hidden);
367
- return l.useEffect(() => {
319
+ })), de = () => {
320
+ let [e, t] = u.useState(document.hidden);
321
+ return u.useEffect(() => {
368
322
  let e = () => {
369
323
  t(document.hidden);
370
324
  };
371
325
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
372
326
  }, []), e;
373
- }, B = 1, V = 100, ue = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : B++, H = new class {
327
+ }, fe = 1, pe = 100, B = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : fe++, V = new class {
374
328
  constructor() {
375
329
  this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
376
330
  let t = this.subscribers.indexOf(e);
@@ -380,10 +334,10 @@ var ie = (e) => {
380
334
  }, this.addToast = (e) => {
381
335
  this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
382
336
  }, this.trimHistory = () => {
383
- let e = this.toasts.length - V;
337
+ let e = this.toasts.length - pe;
384
338
  e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
385
339
  }, this.create = (e) => {
386
- let { message: t, ...n } = e, r = ue(e), i = this.pendingDismissals.get(r);
340
+ let { message: t, ...n } = e, r = B(e), i = this.pendingDismissals.get(r);
387
341
  i !== void 0 && (cancelAnimationFrame(i), this.pendingDismissals.delete(r), this.dismissedToasts.delete(r));
388
342
  let a = this.dismissedToasts.has(r), o = e.dismissible === void 0 || e.dismissible;
389
343
  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({
@@ -453,14 +407,14 @@ var ie = (e) => {
453
407
  description: typeof t.description == "function" ? void 0 : t.description
454
408
  }));
455
409
  let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
456
- if (a = ["resolve", e], l.isValidElement(e)) i = !1, this.create({
410
+ if (a = ["resolve", e], u.isValidElement(e)) i = !1, this.create({
457
411
  id: n,
458
412
  type: "default",
459
413
  message: e
460
414
  });
461
- else if (de(e) && !e.ok) {
415
+ else if (me(e) && !e.ok) {
462
416
  i = !1;
463
- 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" && !l.isValidElement(r) ? r : { message: r };
417
+ 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" && !u.isValidElement(r) ? r : { message: r };
464
418
  this.create({
465
419
  id: n,
466
420
  type: "error",
@@ -469,7 +423,7 @@ var ie = (e) => {
469
423
  });
470
424
  } else if (e instanceof Error) {
471
425
  i = !1;
472
- 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" && !l.isValidElement(r) ? r : { message: r };
426
+ 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" && !u.isValidElement(r) ? r : { message: r };
473
427
  this.create({
474
428
  id: n,
475
429
  type: "error",
@@ -478,7 +432,7 @@ var ie = (e) => {
478
432
  });
479
433
  } else if (t.success !== void 0) {
480
434
  i = !1;
481
- 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" && !l.isValidElement(r) ? r : { message: r };
435
+ 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" && !u.isValidElement(r) ? r : { message: r };
482
436
  this.create({
483
437
  id: n,
484
438
  type: "success",
@@ -489,7 +443,7 @@ var ie = (e) => {
489
443
  }).catch(async (e) => {
490
444
  if (a = ["reject", e], t.error !== void 0) {
491
445
  i = !1;
492
- 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" && !l.isValidElement(r) ? r : { message: r };
446
+ 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" && !u.isValidElement(r) ? r : { message: r };
493
447
  this.create({
494
448
  id: n,
495
449
  type: "error",
@@ -502,7 +456,7 @@ var ie = (e) => {
502
456
  }), s = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
503
457
  return typeof n != "string" && typeof n != "number" ? { unwrap: s } : Object.assign(n, { unwrap: s });
504
458
  }, this.custom = (e, t) => {
505
- let n = ue(t);
459
+ let n = B(t);
506
460
  return this.create({
507
461
  ...t,
508
462
  jsx: e(n),
@@ -511,53 +465,53 @@ var ie = (e) => {
511
465
  }), n;
512
466
  }, 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();
513
467
  }
514
- }(), U = (e, t) => H.message(e, t), de = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", W = Object.assign(U, {
515
- success: H.success,
516
- info: H.info,
517
- warning: H.warning,
518
- error: H.error,
519
- custom: H.custom,
520
- message: H.message,
521
- promise: H.promise,
522
- dismiss: H.dismiss,
523
- loading: H.loading
468
+ }(), H = (e, t) => V.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(H, {
469
+ success: V.success,
470
+ info: V.info,
471
+ warning: V.warning,
472
+ error: V.error,
473
+ custom: V.custom,
474
+ message: V.message,
475
+ promise: V.promise,
476
+ dismiss: V.dismiss,
477
+ loading: V.loading
524
478
  }, {
525
- getHistory: () => H.toasts,
526
- getToasts: () => H.getActiveToasts()
479
+ getHistory: () => V.toasts,
480
+ getToasts: () => V.getActiveToasts()
527
481
  });
528
- function G(e) {
482
+ function U(e) {
529
483
  return e.label !== void 0;
530
484
  }
531
- var fe = 3, pe = "24px", K = "16px", me = 4e3, he = 356, ge = 14, _e = 45, ve = 200;
485
+ var W = 3, ge = "24px", _e = "16px", ve = 4e3, G = 356, K = 14, ye = 45, be = 200;
532
486
  function q(...e) {
533
487
  return e.filter(Boolean).join(" ");
534
488
  }
535
- function ye(e) {
489
+ function xe(e) {
536
490
  let [t, n] = e.split("-"), r = [];
537
491
  return t && r.push(t), n && r.push(n), r;
538
492
  }
539
- var J = (e) => {
540
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: ee, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: te, expandByDefault: x, classNames: S, icons: C, closeButtonAriaLabel: w = "Close toast" } = e, [T, E] = l.useState(null), [ne, D] = l.useState(null), [O, k] = l.useState(!1), [A, re] = l.useState(!1), [j, M] = l.useState(!1), [N, P] = l.useState(!1), [F, I] = l.useState(!1), [ae, L] = l.useState(0), [se, R] = l.useState(0), z = l.useRef(n.duration || y || me), B = l.useRef(null), V = l.useRef(null), ue = c === 0, H = c + 1 <= o, U = n.type, de = U ?? "default", W = n.dismissible !== !1, fe = n.className || "", pe = n.descriptionClassName || "", K = l.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), he = l.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), ge = l.useMemo(() => n.duration || y || me, [n.duration, y]), J = l.useRef(0), Y = l.useRef(0), be = l.useRef(0), X = l.useRef(null), [xe, Se] = b.split("-"), Z = l.useMemo(() => s.reduce((e, t, n) => n >= K ? e : e + t.height, 0), [s, K]), Ce = le(), Q = l.useMemo(() => e.swipeDirections ?? ye(b), [e.swipeDirections, b]), we = n.invert || t, Te = U === "loading";
541
- Y.current = l.useMemo(() => K * te + Z, [K, Z]), l.useEffect(() => {
542
- z.current = ge;
543
- }, [ge]), l.useEffect(() => {
544
- k(!0);
545
- }, []), l.useEffect(() => {
546
- let e = V.current;
493
+ var Se = (e) => {
494
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: d, removeToast: f, defaultRichColors: p, closeButton: m, style: h, cancelButtonStyle: ee, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: te, expandByDefault: x, classNames: S, icons: C, closeButtonAriaLabel: w = "Close toast" } = e, [T, E] = u.useState(null), [ne, re] = u.useState(null), [D, O] = u.useState(!1), [k, A] = u.useState(!1), [j, M] = u.useState(!1), [N, P] = u.useState(!1), [F, I] = u.useState(!1), [ie, L] = u.useState(0), [oe, ce] = u.useState(0), R = u.useRef(n.duration || y || ve), le = u.useRef(null), z = u.useRef(null), fe = c === 0, pe = c + 1 <= o, B = n.type, V = B ?? "default", H = n.dismissible !== !1, me = n.className || "", he = n.descriptionClassName || "", W = u.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = u.useMemo(() => n.closeButton ?? m, [n.closeButton, m]), _e = u.useMemo(() => n.duration || y || ve, [n.duration, y]), G = u.useRef(0), K = u.useRef(0), Se = u.useRef(0), J = u.useRef(null), [Ce, we] = b.split("-"), Te = u.useMemo(() => s.reduce((e, t, n) => n >= W ? e : e + t.height, 0), [s, W]), Y = de(), X = u.useMemo(() => e.swipeDirections ?? xe(b), [e.swipeDirections, b]), Z = n.invert || t, Q = B === "loading";
495
+ K.current = u.useMemo(() => W * te + Te, [W, Te]), u.useEffect(() => {
496
+ R.current = _e;
497
+ }, [_e]), u.useEffect(() => {
498
+ O(!0);
499
+ }, []), u.useEffect(() => {
500
+ let e = z.current;
547
501
  if (e) {
548
502
  let t = e.getBoundingClientRect().height;
549
- return R(t), a((e) => [{
503
+ return ce(t), a((e) => [{
550
504
  toastId: n.id,
551
505
  height: t,
552
506
  position: n.position
553
507
  }, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
554
508
  }
555
- }, [a, n.id]), l.useLayoutEffect(() => {
556
- if (!O) return;
557
- let e = V.current, t = e.style.height;
509
+ }, [a, n.id]), u.useLayoutEffect(() => {
510
+ if (!D) return;
511
+ let e = z.current, t = e.style.height;
558
512
  e.style.height = "auto";
559
513
  let r = e.getBoundingClientRect().height;
560
- e.style.height = t, R(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
514
+ e.style.height = t, ce(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
561
515
  ...e,
562
516
  height: r
563
517
  } : e) : [{
@@ -566,7 +520,7 @@ var J = (e) => {
566
520
  position: n.position
567
521
  }, ...e]);
568
522
  }, [
569
- O,
523
+ D,
570
524
  n.title,
571
525
  n.description,
572
526
  a,
@@ -575,173 +529,173 @@ var J = (e) => {
575
529
  n.action,
576
530
  n.cancel
577
531
  ]);
578
- let $ = l.useCallback(() => {
579
- re(!0), L(Y.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
580
- d(n);
581
- }, ve);
532
+ let $ = u.useCallback(() => {
533
+ A(!0), L(K.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
534
+ f(n);
535
+ }, be);
582
536
  }, [
583
537
  n,
584
- d,
538
+ f,
585
539
  a,
586
- Y
540
+ K
587
541
  ]);
588
- l.useEffect(() => {
589
- if (n.promise && U === "loading" || n.duration === Infinity || n.type === "loading") return;
542
+ u.useEffect(() => {
543
+ if (n.promise && B === "loading" || n.duration === Infinity || n.type === "loading") return;
590
544
  let e;
591
- return u || i || Ce ? (() => {
592
- if (be.current < J.current) {
593
- let e = (/* @__PURE__ */ new Date()).getTime() - J.current;
594
- z.current -= e;
545
+ return d || i || Y ? (() => {
546
+ if (Se.current < G.current) {
547
+ let e = (/* @__PURE__ */ new Date()).getTime() - G.current;
548
+ R.current -= e;
595
549
  }
596
- be.current = (/* @__PURE__ */ new Date()).getTime();
597
- })() : z.current !== Infinity && (J.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
550
+ Se.current = (/* @__PURE__ */ new Date()).getTime();
551
+ })() : R.current !== Infinity && (G.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
598
552
  n.onAutoClose == null || n.onAutoClose.call(n, n), $();
599
- }, z.current)), () => clearTimeout(e);
553
+ }, R.current)), () => clearTimeout(e);
600
554
  }, [
601
- u,
555
+ d,
602
556
  i,
603
557
  n,
604
- U,
605
- Ce,
558
+ B,
559
+ Y,
606
560
  $
607
- ]), l.useEffect(() => {
561
+ ]), u.useEffect(() => {
608
562
  n.delete && ($(), n.onDismiss == null || n.onDismiss.call(n, n));
609
563
  }, [$, n.delete]);
610
564
  function Ee() {
611
- return C?.loading ? /*#__PURE__*/ l.createElement("div", {
565
+ return C?.loading ? /*#__PURE__*/ u.createElement("div", {
612
566
  className: q(S?.loader, n?.classNames?.loader, "sonner-loader"),
613
- "data-visible": U === "loading"
614
- }, C.loading) : /*#__PURE__*/ l.createElement(oe, {
567
+ "data-visible": B === "loading"
568
+ }, C.loading) : /*#__PURE__*/ u.createElement(se, {
615
569
  className: q(S?.loader, n?.classNames?.loader),
616
- visible: U === "loading"
570
+ visible: B === "loading"
617
571
  });
618
572
  }
619
- let De = n.icon || C?.[U] || ie(U);
620
- return /*#__PURE__*/ l.createElement("li", {
573
+ let De = n.icon || C?.[B] || ae(B);
574
+ return /*#__PURE__*/ u.createElement("li", {
621
575
  tabIndex: 0,
622
- ref: V,
623
- className: q(_, fe, S?.toast, n?.classNames?.toast, S?.[de], n?.classNames?.[de]),
576
+ ref: z,
577
+ className: q(_, me, S?.toast, n?.classNames?.toast, S?.[V], n?.classNames?.[V]),
624
578
  "data-sonner-toast": "",
625
- "data-rich-colors": n.richColors ?? f,
579
+ "data-rich-colors": n.richColors ?? p,
626
580
  "data-styled": !(n.jsx || n.unstyled || r),
627
- "data-mounted": O,
581
+ "data-mounted": D,
628
582
  "data-promise": !!n.promise,
629
583
  "data-swiped": F,
630
- "data-removed": A,
631
- "data-visible": H,
632
- "data-y-position": xe,
633
- "data-x-position": Se,
584
+ "data-removed": k,
585
+ "data-visible": pe,
586
+ "data-y-position": Ce,
587
+ "data-x-position": we,
634
588
  "data-index": c,
635
- "data-front": ue,
589
+ "data-front": fe,
636
590
  "data-swiping": j,
637
- "data-dismissible": W,
638
- "data-type": U,
639
- "data-invert": we,
591
+ "data-dismissible": H,
592
+ "data-type": B,
593
+ "data-invert": Z,
640
594
  "data-swipe-out": N,
641
595
  "data-swipe-direction": ne,
642
- "data-expanded": !!(u || x && O),
596
+ "data-expanded": !!(d || x && D),
643
597
  "data-testid": n.testId,
644
598
  style: {
645
599
  "--index": c,
646
600
  "--toasts-before": c,
647
- "--z-index": ee.length - c,
648
- "--offset": `${A ? ae : Y.current}px`,
649
- "--initial-height": x ? "auto" : `${se}px`,
650
- ...m,
601
+ "--z-index": l.length - c,
602
+ "--offset": `${k ? ie : K.current}px`,
603
+ "--initial-height": x ? "auto" : `${oe}px`,
604
+ ...h,
651
605
  ...n.style
652
606
  },
653
607
  onDragEnd: () => {
654
- M(!1), E(null), X.current = null;
608
+ M(!1), E(null), J.current = null;
655
609
  },
656
610
  onPointerDown: (e) => {
657
- e.button !== 2 && !Te && W && (B.current = /* @__PURE__ */ new Date(), L(Y.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (M(!0), X.current = {
611
+ e.button !== 2 && !Q && H && (le.current = /* @__PURE__ */ new Date(), L(K.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (M(!0), J.current = {
658
612
  x: e.clientX,
659
613
  y: e.clientY
660
614
  }));
661
615
  },
662
616
  onPointerUp: () => {
663
- if (N || !W) return;
664
- X.current = null;
665
- 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() - B.current?.getTime(), i = T === "x" ? e : t, a = Math.abs(i) / r;
666
- if ((T === "x" ? Q.includes(e > 0 ? "right" : "left") : Q.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= _e || a > .11)) L(Y.current), n.onDismiss == null || n.onDismiss.call(n, n), D(T === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), P(!0);
617
+ if (N || !H) return;
618
+ J.current = null;
619
+ let e = Number(z.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(z.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - le.current?.getTime(), i = T === "x" ? e : t, a = Math.abs(i) / r;
620
+ if ((T === "x" ? X.includes(e > 0 ? "right" : "left") : X.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= ye || a > .11)) L(K.current), n.onDismiss == null || n.onDismiss.call(n, n), re(T === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), P(!0);
667
621
  else {
668
622
  var o, s;
669
- (o = V.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = V.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), I(!1), M(!1), E(null);
623
+ (o = z.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = z.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), I(!1), M(!1), E(null);
670
624
  }
671
625
  },
672
626
  onPointerMove: (e) => {
673
627
  var t, n;
674
- if (!X.current || !W || window.getSelection()?.toString().length > 0) return;
675
- let r = e.clientY - X.current.y, i = e.clientX - X.current.x;
628
+ if (!J.current || !H || window.getSelection()?.toString().length > 0) return;
629
+ let r = e.clientY - J.current.y, i = e.clientX - J.current.x;
676
630
  !T && (Math.abs(i) > 1 || Math.abs(r) > 1) && E(Math.abs(i) > Math.abs(r) ? "x" : "y");
677
631
  let a = {
678
632
  x: 0,
679
633
  y: 0
680
634
  }, o = (e) => 1 / (1.5 + Math.abs(e) / 20);
681
635
  if (T === "y") {
682
- if (Q.includes("top") || Q.includes("bottom")) {
683
- if (Q.includes("top") && r < 0 || Q.includes("bottom") && r > 0) a.y = r;
636
+ if (X.includes("top") || X.includes("bottom")) {
637
+ if (X.includes("top") && r < 0 || X.includes("bottom") && r > 0) a.y = r;
684
638
  else {
685
639
  let e = r * o(r);
686
640
  a.y = Math.abs(e) < Math.abs(r) ? e : r;
687
641
  }
688
642
  }
689
- } else if (T === "x" && (Q.includes("left") || Q.includes("right"))) {
690
- if (Q.includes("left") && i < 0 || Q.includes("right") && i > 0) a.x = i;
643
+ } else if (T === "x" && (X.includes("left") || X.includes("right"))) {
644
+ if (X.includes("left") && i < 0 || X.includes("right") && i > 0) a.x = i;
691
645
  else {
692
646
  let e = i * o(i);
693
647
  a.x = Math.abs(e) < Math.abs(i) ? e : i;
694
648
  }
695
649
  }
696
- (Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && I(!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`);
650
+ (Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && I(!0), (t = z.current) == null || t.style.setProperty("--swipe-amount-x", `${a.x}px`), (n = z.current) == null || n.style.setProperty("--swipe-amount-y", `${a.y}px`);
697
651
  }
698
- }, he && !n.jsx && U !== "loading" ? /*#__PURE__*/ l.createElement("button", {
652
+ }, ge && !n.jsx && B !== "loading" ? /*#__PURE__*/ u.createElement("button", {
699
653
  "aria-label": w,
700
- "data-disabled": Te,
654
+ "data-disabled": Q,
701
655
  "data-close-button": !0,
702
- onClick: Te || !W ? () => {} : () => {
656
+ onClick: Q || !H ? () => {} : () => {
703
657
  $(), n.onDismiss == null || n.onDismiss.call(n, n);
704
658
  },
705
659
  className: q(S?.closeButton, n?.classNames?.closeButton)
706
- }, C?.close ?? ce) : null, (U || n.icon || n.promise) && n.icon !== null && (C?.[U] !== null || n.icon) ? /*#__PURE__*/ l.createElement("div", {
660
+ }, C?.close ?? ue) : null, (B || n.icon || n.promise) && n.icon !== null && (C?.[B] !== null || n.icon) ? /*#__PURE__*/ u.createElement("div", {
707
661
  "data-icon": "",
708
662
  className: q(S?.icon, n?.classNames?.icon)
709
- }, U === "loading" ? n.icon || Ee() : n.promise ? Ee() : null, U === "loading" ? null : De) : null, /*#__PURE__*/ l.createElement("div", {
663
+ }, B === "loading" ? n.icon || Ee() : n.promise ? Ee() : null, B === "loading" ? null : De) : null, /*#__PURE__*/ u.createElement("div", {
710
664
  "data-content": "",
711
665
  className: q(S?.content, n?.classNames?.content)
712
- }, /*#__PURE__*/ l.createElement("div", {
666
+ }, /*#__PURE__*/ u.createElement("div", {
713
667
  "data-title": "",
714
668
  className: q(S?.title, n?.classNames?.title)
715
- }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ l.createElement("div", {
669
+ }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ u.createElement("div", {
716
670
  "data-description": "",
717
- className: q(v, pe, S?.description, n?.classNames?.description)
718
- }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ l.isValidElement(n.cancel) ? n.cancel : n.cancel && G(n.cancel) ? /*#__PURE__*/ l.createElement("button", {
671
+ className: q(v, he, S?.description, n?.classNames?.description)
672
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ u.isValidElement(n.cancel) ? n.cancel : n.cancel && U(n.cancel) ? /*#__PURE__*/ u.createElement("button", {
719
673
  "data-button": !0,
720
674
  "data-cancel": !0,
721
- style: n.cancelButtonStyle || h,
675
+ style: n.cancelButtonStyle || ee,
722
676
  onClick: (e) => {
723
- G(n.cancel) && W && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
677
+ U(n.cancel) && H && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), $());
724
678
  },
725
679
  className: q(S?.cancelButton, n?.classNames?.cancelButton)
726
- }, n.cancel.label) : null, /*#__PURE__*/ l.isValidElement(n.action) ? n.action : n.action && G(n.action) ? /*#__PURE__*/ l.createElement("button", {
680
+ }, n.cancel.label) : null, /*#__PURE__*/ u.isValidElement(n.action) ? n.action : n.action && U(n.action) ? /*#__PURE__*/ u.createElement("button", {
727
681
  "data-button": !0,
728
682
  "data-action": !0,
729
683
  style: n.actionButtonStyle || g,
730
684
  onClick: (e) => {
731
- G(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || $());
685
+ U(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), e.defaultPrevented || $());
732
686
  },
733
687
  className: q(S?.actionButton, n?.classNames?.actionButton)
734
688
  }, n.action.label) : null);
735
689
  };
736
- function Y() {
690
+ function J() {
737
691
  if (typeof window > "u" || typeof document > "u") return "ltr";
738
692
  let e = document.documentElement.getAttribute("dir");
739
693
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
740
694
  }
741
- function be(e, t) {
695
+ function Ce(e, t) {
742
696
  let n = {};
743
697
  return [e, t].forEach((e, t) => {
744
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? K : pe;
698
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? _e : ge;
745
699
  function o(e) {
746
700
  [
747
701
  "top",
@@ -762,18 +716,18 @@ function be(e, t) {
762
716
  }) : o(a);
763
717
  }), n;
764
718
  }
765
- var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
766
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: ee, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = fe, toastOptions: g, dir: _ = Y(), gap: v = ge, icons: y, customAriaLabel: b, containerAriaLabel: te = "Notifications" } = e, [x, S] = l.useState([]), w = l.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), T = l.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, ne] = l.useState([]), [D, O] = l.useState(!1), [k, A] = l.useState(!1), [re, j] = l.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), M = l.useRef(null), N = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = l.useRef(null), F = l.useRef(!1), I = l.useCallback((e) => {
767
- S((t) => (t.find((t) => t.id === e.id)?.delete || H.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
719
+ var we = /*#__PURE__*/ u.forwardRef(function(e, t) {
720
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: d, theme: f = "light", richColors: p, duration: m, style: h, visibleToasts: ee = W, toastOptions: g, dir: _ = J(), gap: v = K, icons: y, customAriaLabel: b, containerAriaLabel: te = "Notifications" } = e, [x, S] = u.useState([]), C = u.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), w = u.useMemo(() => Array.from(new Set([i].concat(C.filter((e) => e.position).map((e) => e.position)))), [C, i]), [T, ne] = u.useState([]), [re, D] = u.useState(!1), [O, k] = u.useState(!1), [A, j] = u.useState(f === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : f), M = u.useRef(null), N = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = u.useRef(null), F = u.useRef(!1), I = u.useCallback((e) => {
721
+ S((t) => (t.find((t) => t.id === e.id)?.delete || V.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
768
722
  }, []);
769
- return l.useEffect(() => H.subscribe((e) => {
723
+ return u.useEffect(() => V.subscribe((e) => {
770
724
  e.dismiss ? requestAnimationFrame(() => {
771
725
  S((t) => t.map((t) => t.id === e.id ? {
772
726
  ...t,
773
727
  delete: !0
774
728
  } : t));
775
729
  }) : setTimeout(() => {
776
- C.flushSync(() => {
730
+ E.flushSync(() => {
777
731
  S((t) => {
778
732
  let n = t.findIndex((t) => t.id === e.id);
779
733
  return n === -1 ? [e, ...t] : [
@@ -787,12 +741,12 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
787
741
  });
788
742
  });
789
743
  });
790
- }), []), l.useEffect(() => {
791
- if (d !== "system") {
792
- j(d);
744
+ }), []), u.useEffect(() => {
745
+ if (f !== "system") {
746
+ j(f);
793
747
  return;
794
748
  }
795
- if (d === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? j("dark") : j("light")), typeof window > "u") return;
749
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? j("dark") : j("light")), typeof window > "u") return;
796
750
  let e = window.matchMedia("(prefers-color-scheme: dark)");
797
751
  try {
798
752
  e.addEventListener("change", ({ matches: e }) => {
@@ -807,22 +761,22 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
807
761
  }
808
762
  });
809
763
  }
810
- }, [d]), l.useEffect(() => {
811
- x.length <= 1 && O(!1);
812
- }, [x]), l.useEffect(() => {
764
+ }, [f]), u.useEffect(() => {
765
+ x.length <= 1 && D(!1);
766
+ }, [x]), u.useEffect(() => {
813
767
  let e = (e) => {
814
768
  if (a.length > 0 && a.every((t) => e[t] || e.code === t)) {
815
769
  var t;
816
- O(!0), (t = M.current) == null || t.focus();
770
+ D(!0), (t = M.current) == null || t.focus();
817
771
  }
818
- e.code === "Escape" && (document.activeElement === M.current || M.current?.contains(document.activeElement)) && O(!1);
772
+ e.code === "Escape" && (document.activeElement === M.current || M.current?.contains(document.activeElement)) && D(!1);
819
773
  };
820
774
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
821
- }, [a]), l.useEffect(() => {
775
+ }, [a]), u.useEffect(() => {
822
776
  if (M.current) return () => {
823
777
  P.current && (P.current.focus({ preventScroll: !0 }), P.current = null, F.current = !1);
824
778
  };
825
- }, [M.current]), /*#__PURE__*/ l.createElement("section", {
779
+ }, [M.current]), /*#__PURE__*/ u.createElement("section", {
826
780
  ref: t,
827
781
  "aria-label": b ?? `${te} ${N}`,
828
782
  tabIndex: -1,
@@ -831,24 +785,24 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
831
785
  "aria-atomic": "false",
832
786
  suppressHydrationWarning: !0,
833
787
  "data-react-aria-top-layer": !0
834
- }, T.map((t, n) => {
788
+ }, w.map((t, n) => {
835
789
  let [i, a] = t.split("-");
836
- return w.length ? /*#__PURE__*/ l.createElement("ol", {
790
+ return C.length ? /*#__PURE__*/ u.createElement("ol", {
837
791
  key: t,
838
- dir: _ === "auto" ? Y() : _,
792
+ dir: _ === "auto" ? J() : _,
839
793
  tabIndex: -1,
840
794
  ref: M,
841
795
  className: c,
842
796
  "data-sonner-toaster": !0,
843
- "data-sonner-theme": re,
797
+ "data-sonner-theme": A,
844
798
  "data-y-position": i,
845
799
  "data-x-position": a,
846
800
  style: {
847
- "--front-toast-height": `${E[0]?.height || 0}px`,
848
- "--width": `${he}px`,
801
+ "--front-toast-height": `${T[0]?.height || 0}px`,
802
+ "--width": `${G}px`,
849
803
  "--gap": `${v}px`,
850
- ...m,
851
- ...be(ee, u)
804
+ ...h,
805
+ ...Ce(l, d)
852
806
  },
853
807
  onBlur: (e) => {
854
808
  F.current && !e.currentTarget.contains(e.relatedTarget) && (F.current = !1, P.current &&= (P.current.focus({ preventScroll: !0 }), null));
@@ -856,29 +810,29 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
856
810
  onFocus: (e) => {
857
811
  e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || F.current || (F.current = !0, P.current = e.relatedTarget);
858
812
  },
859
- onMouseEnter: () => O(!0),
860
- onMouseMove: () => O(!0),
813
+ onMouseEnter: () => D(!0),
814
+ onMouseMove: () => D(!0),
861
815
  onMouseLeave: () => {
862
- k || O(!1);
816
+ O || D(!1);
863
817
  },
864
- onDragEnd: () => O(!1),
818
+ onDragEnd: () => D(!1),
865
819
  onPointerDown: (e) => {
866
- e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || A(!0);
820
+ e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || k(!0);
867
821
  },
868
- onPointerUp: () => A(!1)
869
- }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ l.createElement(J, {
822
+ onPointerUp: () => k(!1)
823
+ }, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ u.createElement(Se, {
870
824
  key: n.id,
871
825
  icons: y,
872
826
  index: i,
873
827
  toast: n,
874
- defaultRichColors: f,
875
- duration: g?.duration ?? p,
828
+ defaultRichColors: p,
829
+ duration: g?.duration ?? m,
876
830
  className: g?.className,
877
831
  descriptionClassName: g?.descriptionClassName,
878
832
  invert: r,
879
- visibleToasts: h,
833
+ visibleToasts: ee,
880
834
  closeButton: g?.closeButton ?? s,
881
- interacting: k,
835
+ interacting: O,
882
836
  position: t,
883
837
  style: g?.style,
884
838
  unstyled: g?.unstyled,
@@ -887,52 +841,52 @@ var X = /*#__PURE__*/ l.forwardRef(function(e, t) {
887
841
  actionButtonStyle: g?.actionButtonStyle,
888
842
  closeButtonAriaLabel: g?.closeButtonAriaLabel,
889
843
  removeToast: I,
890
- toasts: w.filter((e) => e.position == n.position),
891
- heights: E.filter((e) => e.position == n.position),
844
+ toasts: C.filter((e) => e.position == n.position),
845
+ heights: T.filter((e) => e.position == n.position),
892
846
  setHeights: ne,
893
847
  expandByDefault: o,
894
848
  gap: v,
895
- expanded: D,
849
+ expanded: re,
896
850
  swipeDirections: e.swipeDirections
897
851
  }))) : null;
898
852
  }));
899
853
  });
900
854
  // packages/feedback/src/toast.tsx
901
- function xe({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notification", offset: n = a.xl, mobileOffset: r = a.lg, ...o }) {
902
- return /* @__PURE__ */ p(X, {
903
- ...o,
904
- className: "x1xzild6 xkwcdv0 x19hn9gq x350ok5 x1dknavn x1qgcmqu x19j7ixz xgam3oh x7s97pk",
855
+ function Te({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notification", offset: n = i.xl, mobileOffset: r = i.lg, ...a }) {
856
+ return /* @__PURE__ */ g(we, {
857
+ ...a,
858
+ className: "x7kce61 xkwcdv0 x19hn9gq x350ok5 x1dknavn x1qgcmqu x19j7ixz xgam3oh x7s97pk",
905
859
  style: {
906
- zIndex: i.popup,
860
+ zIndex: s.popup,
907
861
  transitionProperty: "opacity, transform"
908
862
  },
909
863
  offset: n,
910
864
  mobileOffset: r,
911
865
  closeButton: e,
912
866
  icons: {
913
- success: /* @__PURE__ */ p(g, {
867
+ success: /* @__PURE__ */ g(y, {
914
868
  "aria-hidden": !0,
915
- className: "xtwnzbg x18utl2x x7zct4q x7ixh4y"
869
+ className: "xtwnzbg x18utl2x x19m34er x7ixh4y"
916
870
  }),
917
- error: /* @__PURE__ */ p(_, {
871
+ error: /* @__PURE__ */ g(b, {
918
872
  "aria-hidden": !0,
919
- className: "xtwnzbg x18utl2x x7zct4q xr5kp14"
873
+ className: "xtwnzbg x18utl2x x19m34er xr5kp14"
920
874
  }),
921
- warning: /* @__PURE__ */ p(b, {
875
+ warning: /* @__PURE__ */ g(S, {
922
876
  "aria-hidden": !0,
923
- className: "xtwnzbg x18utl2x x7zct4q x1f9ixgr"
877
+ className: "xtwnzbg x18utl2x x19m34er x1f9ixgr"
924
878
  }),
925
- info: /* @__PURE__ */ p(v, {
879
+ info: /* @__PURE__ */ g(te, {
926
880
  "aria-hidden": !0,
927
- className: "xtwnzbg x18utl2x x7zct4q x153jb6y"
881
+ className: "xtwnzbg x18utl2x x19m34er x153jb6y"
928
882
  }),
929
- loading: /* @__PURE__ */ p(y, {
883
+ loading: /* @__PURE__ */ g(x, {
930
884
  "aria-hidden": !0,
931
- className: "xtwnzbg x18utl2x x7zct4q x153jb6y"
885
+ className: "xtwnzbg x18utl2x x19m34er x153jb6y"
932
886
  }),
933
- close: /* @__PURE__ */ p(te, {
887
+ close: /* @__PURE__ */ g(C, {
934
888
  "aria-hidden": !0,
935
- className: "xtwnzbg x18utl2x x7zct4q"
889
+ className: "xtwnzbg x18utl2x x19m34er"
936
890
  })
937
891
  },
938
892
  toastOptions: {
@@ -940,89 +894,111 @@ function xe({ closeButton: e = !0, closeButtonAriaLabel: t = "Dismiss notificati
940
894
  closeButtonAriaLabel: t,
941
895
  style: { transitionProperty: "opacity, transform" },
942
896
  classNames: {
943
- toast: { className: "x1bl4301 x78zum5 x1a02dak x6s0dn4 x1hnptsi x1c8xbx5 xx4ccz x7ottyg xmkeg23 x1y0btm7 x1ey3b81 xy32g2j xpvm0e4 xbixft x16hm2kh x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi x1xzild6 xkwcdv0 x19hn9gq x350ok5 x1dknavn x1qgcmqu x19j7ixz xgam3oh x7s97pk x-default-marker" }.className ?? "",
897
+ toast: { className: "x1bl4301 x78zum5 x1a02dak x6s0dn4 x1hnptsi x1c8xbx5 xx4ccz x1l38xx4 xmkeg23 x1y0btm7 x1ey3b81 xy32g2j xpvm0e4 xbixft x16hm2kh x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi x7kce61 xkwcdv0 x19hn9gq x350ok5 x1dknavn x1qgcmqu x19j7ixz xgam3oh x7s97pk x-default-marker" }.className ?? "",
944
898
  title: { className: "xk4h15q" }.className ?? "",
945
899
  description: { className: "x153jb6y" }.className ?? "",
946
900
  content: { className: "x78zum5 xdt5ytf x1slnebi xeuugli xfko13i x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? "",
947
901
  icon: { className: "x78zum5 x1n2onr6 x2lah0s xtwnzbg x18utl2x x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? "",
948
- loader: { className: "x1xzild6 xkwcdv0 x19hn9gq x350ok5 x1dknavn" }.className ?? "",
949
- actionButton: { className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x9f619 xeuugli x193iq5w x17tes2r xwu7q15 x1hmw7ec x1atzlso xc342km x1ok0vyi x1hz01jw xtqrqnz x1778rvt xk4h15q xeaf4i8 xj0a0fe x1ypdohk x1pt885t x1ymx3u3 xbhuexu x1eou8nq x1qgcmqu x19j7ixz xgam3oh x7s97pk x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? "",
950
- cancelButton: { className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x9f619 xeuugli x193iq5w x17tes2r xwu7q15 x1hmw7ec x1atzlso xc342km x1ok0vyi x1hz01jw xtqrqnz x1778rvt xk4h15q xeaf4i8 xj0a0fe x1ypdohk x1r7kqkb xbixft xxg5jw2 x1ecmtor x1qgcmqu x19j7ixz xgam3oh x7s97pk x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? "",
951
- closeButton: { className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x9f619 x193iq5w x17tes2r xwu7q15 x1hmw7ec xc342km x1ok0vyi x1hz01jw xtqrqnz x1778rvt xk4h15q xeaf4i8 xj0a0fe x1ypdohk x10l6tqk x1m7q2ru x1b86y6l x16opp91 xidce53 xnjsko4 xjbqb8w x153jb6y xg54am9 xfkdqyo x1snzz31 xqu5dr6 x1qgcmqu x19j7ixz xgam3oh x7s97pk x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? ""
902
+ loader: { className: "x7kce61 xkwcdv0 x19hn9gq x350ok5 x1dknavn" }.className ?? "",
903
+ actionButton: { className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x9f619 xeuugli x193iq5w x17tes2r x17oiadl x1hmw7ec x1atzlso xc342km x1ok0vyi x1hz01jw xtqrqnz x1778rvt xk4h15q xeaf4i8 xj0a0fe x1ypdohk x1pt885t x1ymx3u3 xmn6lam x1eou8nq x1qgcmqu x19j7ixz xgam3oh x7s97pk x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? "",
904
+ cancelButton: { className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x9f619 xeuugli x193iq5w x17tes2r x17oiadl x1hmw7ec x1atzlso xc342km x1ok0vyi x1hz01jw xtqrqnz x1778rvt xk4h15q xeaf4i8 xj0a0fe x1ypdohk x1r7kqkb xbixft x1mkwuse x1ecmtor x1qgcmqu x19j7ixz xgam3oh x7s97pk x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? "",
905
+ closeButton: { className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x9f619 x193iq5w x17tes2r x17oiadl x1hmw7ec xc342km x1ok0vyi x1hz01jw xtqrqnz x1778rvt xk4h15q xeaf4i8 xj0a0fe x1ypdohk x10l6tqk x1m7q2ru x1b86y6l x16opp91 x1gjsuxi xnjsko4 xjbqb8w x153jb6y xbks5bx xfkdqyo x1snzz31 xqu5dr6 x1qgcmqu x19j7ixz xgam3oh x7s97pk x1hc1fzr xnglhca x19991ni xkwcdv0 x19hn9gq" }.className ?? ""
952
906
  }
953
907
  }
954
908
  });
955
909
  }
956
910
  // packages/feedback/src/async-region.tsx
957
- var Se = ee(!1);
958
- function Z({ enter: e, fill: t = !1, children: n }) {
959
- let r = u(Se), [i] = f(e && !r), [a, o] = f(i);
960
- return d(() => {
961
- let e = requestAnimationFrame(() => o(!1));
962
- return () => cancelAnimationFrame(e);
963
- }, []), /* @__PURE__ */ p("div", {
911
+ var Y = d(void 0), X = d(!1), Z = o.delaySeconds * 1e3;
912
+ function Q({ identity: e, initialStartedAt: t, children: n }) {
913
+ let [r, i] = h(() => ({
914
+ identity: e,
915
+ startedAt: t ?? Date.now()
916
+ })), a = r;
917
+ return r.identity !== e && (a = {
918
+ identity: e,
919
+ startedAt: Date.now()
920
+ }, i(a)), /* @__PURE__ */ g(Y, {
921
+ value: a,
922
+ children: n
923
+ });
924
+ }
925
+ function $({ shouldEnter: e, children: t }) {
926
+ let n = f(X), [r, i] = h(e && !n), a = m(null);
927
+ return p(() => {
928
+ let e = a.current;
929
+ if (!r || e === null) return;
930
+ let t = !0;
931
+ return Promise.allSettled(e.getAnimations().map((e) => e.finished)).then(() => {
932
+ t && i(!1);
933
+ }), () => {
934
+ t = !1;
935
+ };
936
+ }, [r]), /* @__PURE__ */ g("div", {
937
+ ref: a,
964
938
  ...{
965
- 0: { className: "xeuugli" },
966
- 2: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" },
967
- 1: { className: "xeuugli xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
968
- 3: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xqcmdr3 xcgnenq xwkv4th x1c3o69q" }
969
- }[!!t << 1 | !!i],
970
- children: /* @__PURE__ */ p(Se, {
971
- value: a,
972
- children: n
939
+ 0: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu" },
940
+ 1: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xqcmdr3 x1qme5af x1irg2zc x1c3o69q" }
941
+ }[!!r | 0],
942
+ children: /* @__PURE__ */ g(X, {
943
+ value: n || r,
944
+ children: t
973
945
  })
974
946
  });
975
947
  }
976
- function Ce({ label: e, placeholder: t, fill: n = !1, startedAt: r, delayMs: i = 0 }) {
977
- let [a] = f(() => r ?? Date.now()), [s, l] = f(i <= 0);
978
- return d(() => {
979
- let e = Math.max(0, i - (Date.now() - a)), t = setTimeout(() => l(!0), e);
948
+ function Ee({ label: e, placeholder: t, startedAt: n }) {
949
+ let [r, i] = h(() => Date.now() - n >= Z ? n : void 0), o = r === n;
950
+ return p(() => {
951
+ let e = Math.max(0, Z - (Date.now() - n)), t = setTimeout(() => i(n), e);
980
952
  return () => clearTimeout(t);
981
- }, [a, i]), /* @__PURE__ */ m("div", {
982
- ...{
983
- 0: { className: "xeuugli" },
984
- 4: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" },
985
- 2: { className: "xeuugli xlshs6z" },
986
- 6: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xlshs6z" },
987
- 1: { className: "xeuugli xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
988
- 5: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
989
- 3: { className: "xeuugli xlshs6z xqcmdr3 xcgnenq xwkv4th x1c3o69q" },
990
- 7: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf xlshs6z xqcmdr3 xcgnenq xwkv4th x1c3o69q" }
991
- }[!!n << 2 | !s << 1 | !!s],
992
- children: [s && /* @__PURE__ */ p("span", {
993
- role: "status",
994
- ...c.props(o.hidden),
995
- children: e
996
- }), /* @__PURE__ */ p("div", {
997
- "aria-hidden": "true",
953
+ }, [n]), /* @__PURE__ */ _(ee, { children: [/* @__PURE__ */ g("div", {
954
+ "aria-busy": !0,
955
+ className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
956
+ children: /* @__PURE__ */ g("div", {
957
+ "aria-hidden": !0,
998
958
  inert: !0,
999
959
  ...{
1000
- 0: { className: "xeuugli" },
1001
- 1: { className: "xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" }
1002
- }[!!n | 0],
960
+ 0: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu x18usnwx" },
961
+ 2: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xlshs6z x18usnwx" },
962
+ 1: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xqcmdr3 x1qme5af x1c3o69q x18usnwx" },
963
+ 3: { className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu xlshs6z xqcmdr3 x1qme5af x1c3o69q x18usnwx" }
964
+ }[!o << 1 | !!o],
1003
965
  children: t
1004
- })]
1005
- });
966
+ })
967
+ }), o && /* @__PURE__ */ g("span", {
968
+ role: "status",
969
+ ...l.props(a.hidden),
970
+ children: e
971
+ })] });
1006
972
  }
1007
- function Q({ pending: e, label: t, placeholder: n, children: r, fill: i = !1, startedAt: a, delayMs: o }) {
1008
- let [s, c] = f(e);
1009
- return e && !s && c(!0), /* @__PURE__ */ p("div", {
1010
- "aria-busy": e,
1011
- ...{
1012
- 0: { className: "x1n2onr6 xeuugli" },
1013
- 1: { className: "x1n2onr6 xeuugli x98rzlu x2lwn1j x78zum5 xdt5ytf" }
1014
- }[!!i | 0],
1015
- children: e ? /* @__PURE__ */ p(Ce, {
1016
- label: t,
1017
- placeholder: n,
1018
- fill: i,
1019
- startedAt: a,
1020
- delayMs: o
1021
- }, a) : /* @__PURE__ */ p(Z, {
1022
- enter: s,
1023
- fill: i,
1024
- children: r
973
+ function De(e) {
974
+ let t = f(Y), [n, r] = h(() => ({
975
+ state: e.state,
976
+ scope: t,
977
+ startedAt: t?.startedAt ?? Date.now(),
978
+ wasPending: e.state === "pending"
979
+ })), i = n;
980
+ if (n.scope !== t || n.state !== e.state) {
981
+ let a = n.scope !== t, o = n.startedAt;
982
+ a ? o = t?.startedAt ?? Date.now() : e.state === "pending" && (o = Date.now()), i = {
983
+ state: e.state,
984
+ scope: t,
985
+ startedAt: o,
986
+ wasPending: e.state === "pending" || !a && n.wasPending
987
+ }, r(i);
988
+ }
989
+ return /* @__PURE__ */ g("div", {
990
+ className: "x1n2onr6 xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
991
+ children: e.state === "pending" ? /* @__PURE__ */ g(Ee, {
992
+ label: e.label,
993
+ placeholder: e.placeholder,
994
+ startedAt: i.startedAt
995
+ }) : e.state === "failed" ? /* @__PURE__ */ g("div", {
996
+ className: "xeuugli x2lwn1j x78zum5 xdt5ytf x98rzlu",
997
+ children: e.children
998
+ }) : /* @__PURE__ */ g($, {
999
+ shouldEnter: i.wasPending,
1000
+ children: e.children
1025
1001
  })
1026
1002
  });
1027
1003
  }
1028
- export { I as a, M as c, O as d, k as f, W as i, N as l, T as m, Z as n, F as o, w as p, xe as r, P as s, Q as t, D as u };
1004
+ export { he as a, F as c, A as d, j as f, Te as i, I as l, re as m, $ as n, L as o, ne as p, Q as r, ie as s, De as t, k as u };