@purpurds/modal 8.2.2 → 8.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/modal.es.js CHANGED
@@ -1,85 +1,85 @@
1
- import { jsx as d, Fragment as ae, jsxs as T } from "react/jsx-runtime";
1
+ import { jsx as f, jsxs as $, Fragment as xe } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { useState as ye, forwardRef as Pe, useRef as be, useCallback as Qt, useEffect as we } from "react";
4
- import * as Jt from "react-dom";
5
- import er from "react-dom";
3
+ import { useState as ye, forwardRef as Ce, useRef as be, useCallback as Yt, useEffect as we } from "react";
4
+ import * as Xt from "react-dom";
5
+ import Zt from "react-dom";
6
6
  function L(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
7
7
  return function(a) {
8
8
  if (e == null || e(a), r === !1 || !a.defaultPrevented)
9
9
  return t == null ? void 0 : t(a);
10
10
  };
11
11
  }
12
- function $e(e, t) {
12
+ function Ae(e, t) {
13
13
  if (typeof e == "function")
14
14
  return e(t);
15
15
  e != null && (e.current = t);
16
16
  }
17
- function lt(...e) {
17
+ function ut(...e) {
18
18
  return (t) => {
19
19
  let r = !1;
20
20
  const o = e.map((a) => {
21
- const n = $e(a, t);
21
+ const n = Ae(a, t);
22
22
  return !r && typeof n == "function" && (r = !0), n;
23
23
  });
24
24
  if (r)
25
25
  return () => {
26
26
  for (let a = 0; a < o.length; a++) {
27
27
  const n = o[a];
28
- typeof n == "function" ? n() : $e(e[a], null);
28
+ typeof n == "function" ? n() : Ae(e[a], null);
29
29
  }
30
30
  };
31
31
  };
32
32
  }
33
- function B(...e) {
34
- return s.useCallback(lt(...e), e);
33
+ function W(...e) {
34
+ return s.useCallback(ut(...e), e);
35
35
  }
36
- function tr(e, t) {
36
+ function Qt(e, t) {
37
37
  const r = s.createContext(t), o = (n) => {
38
- const { children: i, ...u } = n, p = s.useMemo(() => u, Object.values(u));
39
- return /* @__PURE__ */ d(r.Provider, { value: p, children: i });
38
+ const { children: u, ...i } = n, d = s.useMemo(() => i, Object.values(i));
39
+ return /* @__PURE__ */ f(r.Provider, { value: d, children: u });
40
40
  };
41
41
  o.displayName = e + "Provider";
42
42
  function a(n) {
43
- const i = s.useContext(r);
44
- if (i) return i;
43
+ const u = s.useContext(r);
44
+ if (u) return u;
45
45
  if (t !== void 0) return t;
46
46
  throw new Error(`\`${n}\` must be used within \`${e}\``);
47
47
  }
48
48
  return [o, a];
49
49
  }
50
- function rr(e, t = []) {
50
+ function Jt(e, t = []) {
51
51
  let r = [];
52
- function o(n, i) {
53
- const u = s.createContext(i), p = r.length;
54
- r = [...r, i];
55
- const l = (v) => {
52
+ function o(n, u) {
53
+ const i = s.createContext(u), d = r.length;
54
+ r = [...r, u];
55
+ const c = (v) => {
56
56
  var _;
57
- const { scope: h, children: m, ...b } = v, c = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[p]) || u, g = s.useMemo(() => b, Object.values(b));
58
- return /* @__PURE__ */ d(c.Provider, { value: g, children: m });
57
+ const { scope: h, children: g, ...b } = v, l = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[d]) || i, m = s.useMemo(() => b, Object.values(b));
58
+ return /* @__PURE__ */ f(l.Provider, { value: m, children: g });
59
59
  };
60
- l.displayName = n + "Provider";
61
- function f(v, h) {
62
- var c;
63
- const m = ((c = h == null ? void 0 : h[e]) == null ? void 0 : c[p]) || u, b = s.useContext(m);
60
+ c.displayName = n + "Provider";
61
+ function p(v, h) {
62
+ var l;
63
+ const g = ((l = h == null ? void 0 : h[e]) == null ? void 0 : l[d]) || i, b = s.useContext(g);
64
64
  if (b) return b;
65
- if (i !== void 0) return i;
65
+ if (u !== void 0) return u;
66
66
  throw new Error(`\`${v}\` must be used within \`${n}\``);
67
67
  }
68
- return [l, f];
68
+ return [c, p];
69
69
  }
70
70
  const a = () => {
71
- const n = r.map((i) => s.createContext(i));
72
- return function(u) {
73
- const p = (u == null ? void 0 : u[e]) || n;
71
+ const n = r.map((u) => s.createContext(u));
72
+ return function(i) {
73
+ const d = (i == null ? void 0 : i[e]) || n;
74
74
  return s.useMemo(
75
- () => ({ [`__scope${e}`]: { ...u, [e]: p } }),
76
- [u, p]
75
+ () => ({ [`__scope${e}`]: { ...i, [e]: d } }),
76
+ [i, d]
77
77
  );
78
78
  };
79
79
  };
80
- return a.scopeName = e, [o, nr(a, ...t)];
80
+ return a.scopeName = e, [o, er(a, ...t)];
81
81
  }
82
- function nr(...e) {
82
+ function er(...e) {
83
83
  const t = e[0];
84
84
  if (e.length === 1) return t;
85
85
  const r = () => {
@@ -88,88 +88,108 @@ function nr(...e) {
88
88
  scopeName: a.scopeName
89
89
  }));
90
90
  return function(n) {
91
- const i = o.reduce((u, { useScope: p, scopeName: l }) => {
92
- const v = p(n)[`__scope${l}`];
93
- return { ...u, ...v };
91
+ const u = o.reduce((i, { useScope: d, scopeName: c }) => {
92
+ const v = d(n)[`__scope${c}`];
93
+ return { ...i, ...v };
94
94
  }, {});
95
- return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
95
+ return s.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
96
96
  };
97
97
  };
98
98
  return r.scopeName = t.scopeName, r;
99
99
  }
100
- var ie = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
101
- }, or = s.useId || (() => {
102
- }), ar = 0;
100
+ var q = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
101
+ }, tr = s[" useId ".trim().toString()] || (() => {
102
+ }), rr = 0;
103
103
  function le(e) {
104
- const [t, r] = s.useState(or());
105
- return ie(() => {
106
- r((o) => o ?? String(ar++));
104
+ const [t, r] = s.useState(tr());
105
+ return q(() => {
106
+ r((o) => o ?? String(rr++));
107
107
  }, [e]), e || (t ? `radix-${t}` : "");
108
108
  }
109
- function k(e) {
110
- const t = s.useRef(e);
111
- return s.useEffect(() => {
112
- t.current = e;
113
- }), s.useMemo(() => (...r) => {
114
- var o;
115
- return (o = t.current) == null ? void 0 : o.call(t, ...r);
116
- }, []);
117
- }
118
- function ir({
109
+ var nr = s[" useInsertionEffect ".trim().toString()] || q;
110
+ function or({
119
111
  prop: e,
120
112
  defaultProp: t,
121
113
  onChange: r = () => {
122
- }
114
+ },
115
+ caller: o
123
116
  }) {
124
- const [o, a] = ur({ defaultProp: t, onChange: r }), n = e !== void 0, i = n ? e : o, u = k(r), p = s.useCallback(
125
- (l) => {
126
- if (n) {
127
- const v = typeof l == "function" ? l(e) : l;
128
- v !== e && u(v);
117
+ const [a, n, u] = ar({
118
+ defaultProp: t,
119
+ onChange: r
120
+ }), i = e !== void 0, d = i ? e : a;
121
+ {
122
+ const p = s.useRef(e !== void 0);
123
+ s.useEffect(() => {
124
+ const v = p.current;
125
+ v !== i && console.warn(
126
+ `${o} is changing from ${v ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
127
+ ), p.current = i;
128
+ }, [i, o]);
129
+ }
130
+ const c = s.useCallback(
131
+ (p) => {
132
+ var v;
133
+ if (i) {
134
+ const h = ir(p) ? p(e) : p;
135
+ h !== e && ((v = u.current) == null || v.call(u, h));
129
136
  } else
130
- a(l);
137
+ n(p);
131
138
  },
132
- [n, e, a, u]
139
+ [i, e, n, u]
133
140
  );
134
- return [i, p];
141
+ return [d, c];
135
142
  }
136
- function ur({
143
+ function ar({
137
144
  defaultProp: e,
138
145
  onChange: t
139
146
  }) {
140
- const r = s.useState(e), [o] = r, a = s.useRef(o), n = k(t);
141
- return s.useEffect(() => {
142
- a.current !== o && (n(o), a.current = o);
143
- }, [o, a, n]), r;
144
- }
145
- var Oe = s.forwardRef((e, t) => {
146
- const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(cr);
147
- if (n) {
148
- const i = n.props.children, u = a.map((p) => p === n ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : p);
149
- return /* @__PURE__ */ d(Ee, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
150
- }
151
- return /* @__PURE__ */ d(Ee, { ...o, ref: t, children: r });
152
- });
153
- Oe.displayName = "Slot";
154
- var Ee = s.forwardRef((e, t) => {
155
- const { children: r, ...o } = e;
156
- if (s.isValidElement(r)) {
157
- const a = dr(r), n = lr(o, r.props);
158
- return r.type !== s.Fragment && (n.ref = t ? lt(t, a) : a), s.cloneElement(r, n);
159
- }
160
- return s.Children.count(r) > 1 ? s.Children.only(null) : null;
161
- });
162
- Ee.displayName = "SlotClone";
163
- var sr = ({ children: e }) => /* @__PURE__ */ d(ae, { children: e });
147
+ const [r, o] = s.useState(e), a = s.useRef(r), n = s.useRef(t);
148
+ return nr(() => {
149
+ n.current = t;
150
+ }, [t]), s.useEffect(() => {
151
+ var u;
152
+ a.current !== r && ((u = n.current) == null || u.call(n, r), a.current = r);
153
+ }, [r, a]), [r, o, n];
154
+ }
155
+ function ir(e) {
156
+ return typeof e == "function";
157
+ }
158
+ // @__NO_SIDE_EFFECTS__
159
+ function st(e) {
160
+ const t = /* @__PURE__ */ ur(e), r = s.forwardRef((o, a) => {
161
+ const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(cr);
162
+ if (d) {
163
+ const c = d.props.children, p = i.map((v) => v === d ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : v);
164
+ return /* @__PURE__ */ f(t, { ...u, ref: a, children: s.isValidElement(c) ? s.cloneElement(c, void 0, p) : null });
165
+ }
166
+ return /* @__PURE__ */ f(t, { ...u, ref: a, children: n });
167
+ });
168
+ return r.displayName = `${e}.Slot`, r;
169
+ }
170
+ // @__NO_SIDE_EFFECTS__
171
+ function ur(e) {
172
+ const t = s.forwardRef((r, o) => {
173
+ const { children: a, ...n } = r;
174
+ if (s.isValidElement(a)) {
175
+ const u = dr(a), i = lr(n, a.props);
176
+ return a.type !== s.Fragment && (i.ref = o ? ut(o, u) : u), s.cloneElement(a, i);
177
+ }
178
+ return s.Children.count(a) > 1 ? s.Children.only(null) : null;
179
+ });
180
+ return t.displayName = `${e}.SlotClone`, t;
181
+ }
182
+ var sr = Symbol("radix.slottable");
164
183
  function cr(e) {
165
- return s.isValidElement(e) && e.type === sr;
184
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === sr;
166
185
  }
167
186
  function lr(e, t) {
168
187
  const r = { ...t };
169
188
  for (const o in t) {
170
189
  const a = e[o], n = t[o];
171
- /^on[A-Z]/.test(o) ? a && n ? r[o] = (...u) => {
172
- n(...u), a(...u);
190
+ /^on[A-Z]/.test(o) ? a && n ? r[o] = (...i) => {
191
+ const d = n(...i);
192
+ return a(...i), d;
173
193
  } : a && (r[o] = a) : o === "style" ? r[o] = { ...a, ...n } : o === "className" && (r[o] = [a, n].filter(Boolean).join(" "));
174
194
  }
175
195
  return { ...e, ...r };
@@ -193,21 +213,31 @@ var pr = [
193
213
  "nav",
194
214
  "ol",
195
215
  "p",
216
+ "select",
196
217
  "span",
197
218
  "svg",
198
219
  "ul"
199
220
  ], M = pr.reduce((e, t) => {
200
- const r = s.forwardRef((o, a) => {
201
- const { asChild: n, ...i } = o, u = n ? Oe : t;
202
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(u, { ...i, ref: a });
221
+ const r = /* @__PURE__ */ st(`Primitive.${t}`), o = s.forwardRef((a, n) => {
222
+ const { asChild: u, ...i } = a, d = u ? r : t;
223
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(d, { ...i, ref: n });
203
224
  });
204
- return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
225
+ return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
205
226
  }, {});
206
227
  function fr(e, t) {
207
- e && Jt.flushSync(() => e.dispatchEvent(t));
228
+ e && Xt.flushSync(() => e.dispatchEvent(t));
229
+ }
230
+ function Y(e) {
231
+ const t = s.useRef(e);
232
+ return s.useEffect(() => {
233
+ t.current = e;
234
+ }), s.useMemo(() => (...r) => {
235
+ var o;
236
+ return (o = t.current) == null ? void 0 : o.call(t, ...r);
237
+ }, []);
208
238
  }
209
239
  function vr(e, t = globalThis == null ? void 0 : globalThis.document) {
210
- const r = k(e);
240
+ const r = Y(e);
211
241
  s.useEffect(() => {
212
242
  const o = (a) => {
213
243
  a.key === "Escape" && r(a);
@@ -215,46 +245,46 @@ function vr(e, t = globalThis == null ? void 0 : globalThis.document) {
215
245
  return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
216
246
  }, [r, t]);
217
247
  }
218
- var hr = "DismissableLayer", Ce = "dismissableLayer.update", gr = "dismissableLayer.pointerDownOutside", mr = "dismissableLayer.focusOutside", Me, dt = s.createContext({
248
+ var hr = "DismissableLayer", Ee = "dismissableLayer.update", mr = "dismissableLayer.pointerDownOutside", gr = "dismissableLayer.focusOutside", De, ct = s.createContext({
219
249
  layers: /* @__PURE__ */ new Set(),
220
250
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
221
251
  branches: /* @__PURE__ */ new Set()
222
- }), pt = s.forwardRef(
252
+ }), lt = s.forwardRef(
223
253
  (e, t) => {
224
254
  const {
225
255
  disableOutsidePointerEvents: r = !1,
226
256
  onEscapeKeyDown: o,
227
257
  onPointerDownOutside: a,
228
258
  onFocusOutside: n,
229
- onInteractOutside: i,
230
- onDismiss: u,
231
- ...p
232
- } = e, l = s.useContext(dt), [f, v] = s.useState(null), h = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = s.useState({}), b = B(t, (y) => v(y)), c = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = c.indexOf(g), S = f ? c.indexOf(f) : -1, w = l.layersWithOutsidePointerEventsDisabled.size > 0, E = S >= _, C = br((y) => {
233
- const x = y.target, R = [...l.branches].some((K) => K.contains(x));
234
- !E || R || (a == null || a(y), i == null || i(y), y.defaultPrevented || u == null || u());
259
+ onInteractOutside: u,
260
+ onDismiss: i,
261
+ ...d
262
+ } = e, c = s.useContext(ct), [p, v] = s.useState(null), h = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = s.useState({}), b = W(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), w = p ? l.indexOf(p) : -1, E = c.layersWithOutsidePointerEventsDisabled.size > 0, S = w >= _, C = br((y) => {
263
+ const x = y.target, R = [...c.branches].some((z) => z.contains(x));
264
+ !S || R || (a == null || a(y), u == null || u(y), y.defaultPrevented || i == null || i());
235
265
  }, h), P = wr((y) => {
236
266
  const x = y.target;
237
- [...l.branches].some((K) => K.contains(x)) || (n == null || n(y), i == null || i(y), y.defaultPrevented || u == null || u());
267
+ [...c.branches].some((z) => z.contains(x)) || (n == null || n(y), u == null || u(y), y.defaultPrevented || i == null || i());
238
268
  }, h);
239
269
  return vr((y) => {
240
- S === l.layers.size - 1 && (o == null || o(y), !y.defaultPrevented && u && (y.preventDefault(), u()));
270
+ w === c.layers.size - 1 && (o == null || o(y), !y.defaultPrevented && i && (y.preventDefault(), i()));
241
271
  }, h), s.useEffect(() => {
242
- if (f)
243
- return r && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Me = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), Ie(), () => {
244
- r && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Me);
272
+ if (p)
273
+ return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (De = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(p)), c.layers.add(p), $e(), () => {
274
+ r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = De);
245
275
  };
246
- }, [f, h, r, l]), s.useEffect(() => () => {
247
- f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), Ie());
248
- }, [f, l]), s.useEffect(() => {
249
- const y = () => m({});
250
- return document.addEventListener(Ce, y), () => document.removeEventListener(Ce, y);
251
- }, []), /* @__PURE__ */ d(
276
+ }, [p, h, r, c]), s.useEffect(() => () => {
277
+ p && (c.layers.delete(p), c.layersWithOutsidePointerEventsDisabled.delete(p), $e());
278
+ }, [p, c]), s.useEffect(() => {
279
+ const y = () => g({});
280
+ return document.addEventListener(Ee, y), () => document.removeEventListener(Ee, y);
281
+ }, []), /* @__PURE__ */ f(
252
282
  M.div,
253
283
  {
254
- ...p,
284
+ ...d,
255
285
  ref: b,
256
286
  style: {
257
- pointerEvents: w ? E ? "auto" : "none" : void 0,
287
+ pointerEvents: E ? S ? "auto" : "none" : void 0,
258
288
  ...e.style
259
289
  },
260
290
  onFocusCapture: L(e.onFocusCapture, P.onFocusCapture),
@@ -267,42 +297,42 @@ var hr = "DismissableLayer", Ce = "dismissableLayer.update", gr = "dismissableLa
267
297
  );
268
298
  }
269
299
  );
270
- pt.displayName = hr;
300
+ lt.displayName = hr;
271
301
  var _r = "DismissableLayerBranch", yr = s.forwardRef((e, t) => {
272
- const r = s.useContext(dt), o = s.useRef(null), a = B(t, o);
302
+ const r = s.useContext(ct), o = s.useRef(null), a = W(t, o);
273
303
  return s.useEffect(() => {
274
304
  const n = o.current;
275
305
  if (n)
276
306
  return r.branches.add(n), () => {
277
307
  r.branches.delete(n);
278
308
  };
279
- }, [r.branches]), /* @__PURE__ */ d(M.div, { ...e, ref: a });
309
+ }, [r.branches]), /* @__PURE__ */ f(M.div, { ...e, ref: a });
280
310
  });
281
311
  yr.displayName = _r;
282
312
  function br(e, t = globalThis == null ? void 0 : globalThis.document) {
283
- const r = k(e), o = s.useRef(!1), a = s.useRef(() => {
313
+ const r = Y(e), o = s.useRef(!1), a = s.useRef(() => {
284
314
  });
285
315
  return s.useEffect(() => {
286
- const n = (u) => {
287
- if (u.target && !o.current) {
288
- let p = function() {
289
- ft(
290
- gr,
316
+ const n = (i) => {
317
+ if (i.target && !o.current) {
318
+ let d = function() {
319
+ dt(
320
+ mr,
291
321
  r,
292
- l,
322
+ c,
293
323
  { discrete: !0 }
294
324
  );
295
325
  };
296
- const l = { originalEvent: u };
297
- u.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = p, t.addEventListener("click", a.current, { once: !0 })) : p();
326
+ const c = { originalEvent: i };
327
+ i.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = d, t.addEventListener("click", a.current, { once: !0 })) : d();
298
328
  } else
299
329
  t.removeEventListener("click", a.current);
300
330
  o.current = !1;
301
- }, i = window.setTimeout(() => {
331
+ }, u = window.setTimeout(() => {
302
332
  t.addEventListener("pointerdown", n);
303
333
  }, 0);
304
334
  return () => {
305
- window.clearTimeout(i), t.removeEventListener("pointerdown", n), t.removeEventListener("click", a.current);
335
+ window.clearTimeout(u), t.removeEventListener("pointerdown", n), t.removeEventListener("click", a.current);
306
336
  };
307
337
  }, [t, r]), {
308
338
  // ensures we check React component tree (not just DOM tree)
@@ -310,10 +340,10 @@ function br(e, t = globalThis == null ? void 0 : globalThis.document) {
310
340
  };
311
341
  }
312
342
  function wr(e, t = globalThis == null ? void 0 : globalThis.document) {
313
- const r = k(e), o = s.useRef(!1);
343
+ const r = Y(e), o = s.useRef(!1);
314
344
  return s.useEffect(() => {
315
345
  const a = (n) => {
316
- n.target && !o.current && ft(mr, r, { originalEvent: n }, {
346
+ n.target && !o.current && dt(gr, r, { originalEvent: n }, {
317
347
  discrete: !1
318
348
  });
319
349
  };
@@ -323,22 +353,22 @@ function wr(e, t = globalThis == null ? void 0 : globalThis.document) {
323
353
  onBlurCapture: () => o.current = !1
324
354
  };
325
355
  }
326
- function Ie() {
327
- const e = new CustomEvent(Ce);
356
+ function $e() {
357
+ const e = new CustomEvent(Ee);
328
358
  document.dispatchEvent(e);
329
359
  }
330
- function ft(e, t, r, { discrete: o }) {
360
+ function dt(e, t, r, { discrete: o }) {
331
361
  const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
332
362
  t && a.addEventListener(e, t, { once: !0 }), o ? fr(a, n) : a.dispatchEvent(n);
333
363
  }
334
- var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Le = { bubbles: !1, cancelable: !0 }, Er = "FocusScope", vt = s.forwardRef((e, t) => {
364
+ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te = { bubbles: !1, cancelable: !0 }, Er = "FocusScope", pt = s.forwardRef((e, t) => {
335
365
  const {
336
366
  loop: r = !1,
337
367
  trapped: o = !1,
338
368
  onMountAutoFocus: a,
339
369
  onUnmountAutoFocus: n,
340
- ...i
341
- } = e, [u, p] = s.useState(null), l = k(a), f = k(n), v = s.useRef(null), h = B(t, (c) => p(c)), m = s.useRef({
370
+ ...u
371
+ } = e, [i, d] = s.useState(null), c = Y(a), p = Y(n), v = s.useRef(null), h = W(t, (l) => d(l)), g = s.useRef({
342
372
  paused: !1,
343
373
  pause() {
344
374
  this.paused = !0;
@@ -349,65 +379,65 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Le
349
379
  }).current;
350
380
  s.useEffect(() => {
351
381
  if (o) {
352
- let c = function(w) {
353
- if (m.paused || !u) return;
354
- const E = w.target;
355
- u.contains(E) ? v.current = E : I(v.current, { select: !0 });
356
- }, g = function(w) {
357
- if (m.paused || !u) return;
358
- const E = w.relatedTarget;
359
- E !== null && (u.contains(E) || I(v.current, { select: !0 }));
360
- }, _ = function(w) {
382
+ let l = function(E) {
383
+ if (g.paused || !i) return;
384
+ const S = E.target;
385
+ i.contains(S) ? v.current = S : I(v.current, { select: !0 });
386
+ }, m = function(E) {
387
+ if (g.paused || !i) return;
388
+ const S = E.relatedTarget;
389
+ S !== null && (i.contains(S) || I(v.current, { select: !0 }));
390
+ }, _ = function(E) {
361
391
  if (document.activeElement === document.body)
362
- for (const C of w)
363
- C.removedNodes.length > 0 && I(u);
392
+ for (const C of E)
393
+ C.removedNodes.length > 0 && I(i);
364
394
  };
365
- document.addEventListener("focusin", c), document.addEventListener("focusout", g);
366
- const S = new MutationObserver(_);
367
- return u && S.observe(u, { childList: !0, subtree: !0 }), () => {
368
- document.removeEventListener("focusin", c), document.removeEventListener("focusout", g), S.disconnect();
395
+ document.addEventListener("focusin", l), document.addEventListener("focusout", m);
396
+ const w = new MutationObserver(_);
397
+ return i && w.observe(i, { childList: !0, subtree: !0 }), () => {
398
+ document.removeEventListener("focusin", l), document.removeEventListener("focusout", m), w.disconnect();
369
399
  };
370
400
  }
371
- }, [o, u, m.paused]), s.useEffect(() => {
372
- if (u) {
373
- ke.add(m);
374
- const c = document.activeElement;
375
- if (!u.contains(c)) {
376
- const _ = new CustomEvent(de, Le);
377
- u.addEventListener(de, l), u.dispatchEvent(_), _.defaultPrevented || (Cr(Rr(ht(u)), { select: !0 }), document.activeElement === c && I(u));
401
+ }, [o, i, g.paused]), s.useEffect(() => {
402
+ if (i) {
403
+ Ie.add(g);
404
+ const l = document.activeElement;
405
+ if (!i.contains(l)) {
406
+ const _ = new CustomEvent(de, Te);
407
+ i.addEventListener(de, c), i.dispatchEvent(_), _.defaultPrevented || (Sr(Rr(ft(i)), { select: !0 }), document.activeElement === l && I(i));
378
408
  }
379
409
  return () => {
380
- u.removeEventListener(de, l), setTimeout(() => {
381
- const _ = new CustomEvent(pe, Le);
382
- u.addEventListener(pe, f), u.dispatchEvent(_), _.defaultPrevented || I(c ?? document.body, { select: !0 }), u.removeEventListener(pe, f), ke.remove(m);
410
+ i.removeEventListener(de, c), setTimeout(() => {
411
+ const _ = new CustomEvent(pe, Te);
412
+ i.addEventListener(pe, p), i.dispatchEvent(_), _.defaultPrevented || I(l ?? document.body, { select: !0 }), i.removeEventListener(pe, p), Ie.remove(g);
383
413
  }, 0);
384
414
  };
385
415
  }
386
- }, [u, l, f, m]);
416
+ }, [i, c, p, g]);
387
417
  const b = s.useCallback(
388
- (c) => {
389
- if (!r && !o || m.paused) return;
390
- const g = c.key === "Tab" && !c.altKey && !c.ctrlKey && !c.metaKey, _ = document.activeElement;
391
- if (g && _) {
392
- const S = c.currentTarget, [w, E] = Sr(S);
393
- w && E ? !c.shiftKey && _ === E ? (c.preventDefault(), r && I(w, { select: !0 })) : c.shiftKey && _ === w && (c.preventDefault(), r && I(E, { select: !0 })) : _ === S && c.preventDefault();
418
+ (l) => {
419
+ if (!r && !o || g.paused) return;
420
+ const m = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, _ = document.activeElement;
421
+ if (m && _) {
422
+ const w = l.currentTarget, [E, S] = Cr(w);
423
+ E && S ? !l.shiftKey && _ === S ? (l.preventDefault(), r && I(E, { select: !0 })) : l.shiftKey && _ === E && (l.preventDefault(), r && I(S, { select: !0 })) : _ === w && l.preventDefault();
394
424
  }
395
425
  },
396
- [r, o, m.paused]
426
+ [r, o, g.paused]
397
427
  );
398
- return /* @__PURE__ */ d(M.div, { tabIndex: -1, ...i, ref: h, onKeyDown: b });
428
+ return /* @__PURE__ */ f(M.div, { tabIndex: -1, ...u, ref: h, onKeyDown: b });
399
429
  });
400
- vt.displayName = Er;
401
- function Cr(e, { select: t = !1 } = {}) {
430
+ pt.displayName = Er;
431
+ function Sr(e, { select: t = !1 } = {}) {
402
432
  const r = document.activeElement;
403
433
  for (const o of e)
404
434
  if (I(o, { select: t }), document.activeElement !== r) return;
405
435
  }
406
- function Sr(e) {
407
- const t = ht(e), r = Fe(t, e), o = Fe(t.reverse(), e);
436
+ function Cr(e) {
437
+ const t = ft(e), r = Me(t, e), o = Me(t.reverse(), e);
408
438
  return [r, o];
409
439
  }
410
- function ht(e) {
440
+ function ft(e) {
411
441
  const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
412
442
  acceptNode: (o) => {
413
443
  const a = o.tagName === "INPUT" && o.type === "hidden";
@@ -417,7 +447,7 @@ function ht(e) {
417
447
  for (; r.nextNode(); ) t.push(r.currentNode);
418
448
  return t;
419
449
  }
420
- function Fe(e, t) {
450
+ function Me(e, t) {
421
451
  for (const r of e)
422
452
  if (!Nr(r, { upTo: t })) return r;
423
453
  }
@@ -439,45 +469,45 @@ function I(e, { select: t = !1 } = {}) {
439
469
  e.focus({ preventScroll: !0 }), e !== r && Pr(e) && t && e.select();
440
470
  }
441
471
  }
442
- var ke = Or();
472
+ var Ie = Or();
443
473
  function Or() {
444
474
  let e = [];
445
475
  return {
446
476
  add(t) {
447
477
  const r = e[0];
448
- t !== r && (r == null || r.pause()), e = We(e, t), e.unshift(t);
478
+ t !== r && (r == null || r.pause()), e = Le(e, t), e.unshift(t);
449
479
  },
450
480
  remove(t) {
451
481
  var r;
452
- e = We(e, t), (r = e[0]) == null || r.resume();
482
+ e = Le(e, t), (r = e[0]) == null || r.resume();
453
483
  }
454
484
  };
455
485
  }
456
- function We(e, t) {
486
+ function Le(e, t) {
457
487
  const r = [...e], o = r.indexOf(t);
458
488
  return o !== -1 && r.splice(o, 1), r;
459
489
  }
460
490
  function Rr(e) {
461
491
  return e.filter((t) => t.tagName !== "A");
462
492
  }
463
- var xr = "Portal", gt = s.forwardRef((e, t) => {
464
- var u;
493
+ var xr = "Portal", vt = s.forwardRef((e, t) => {
494
+ var i;
465
495
  const { container: r, ...o } = e, [a, n] = s.useState(!1);
466
- ie(() => n(!0), []);
467
- const i = r || a && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
468
- return i ? er.createPortal(/* @__PURE__ */ d(M.div, { ...o, ref: t }), i) : null;
496
+ q(() => n(!0), []);
497
+ const u = r || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
498
+ return u ? Zt.createPortal(/* @__PURE__ */ f(M.div, { ...o, ref: t }), u) : null;
469
499
  });
470
- gt.displayName = xr;
500
+ vt.displayName = xr;
471
501
  function Ar(e, t) {
472
502
  return s.useReducer((r, o) => t[r][o] ?? r, e);
473
503
  }
474
- var se = (e) => {
475
- const { present: t, children: r } = e, o = Dr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = B(o.ref, Tr(a));
504
+ var ue = (e) => {
505
+ const { present: t, children: r } = e, o = Dr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = W(o.ref, $r(a));
476
506
  return typeof r == "function" || o.isPresent ? s.cloneElement(a, { ref: n }) : null;
477
507
  };
478
- se.displayName = "Presence";
508
+ ue.displayName = "Presence";
479
509
  function Dr(e) {
480
- const [t, r] = s.useState(), o = s.useRef({}), a = s.useRef(e), n = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, p] = Ar(i, {
510
+ const [t, r] = s.useState(), o = s.useRef(null), a = s.useRef(e), n = s.useRef("none"), u = e ? "mounted" : "unmounted", [i, d] = Ar(u, {
481
511
  mounted: {
482
512
  UNMOUNT: "unmounted",
483
513
  ANIMATION_OUT: "unmountSuspended"
@@ -491,71 +521,71 @@ function Dr(e) {
491
521
  }
492
522
  });
493
523
  return s.useEffect(() => {
494
- const l = X(o.current);
495
- n.current = u === "mounted" ? l : "none";
496
- }, [u]), ie(() => {
497
- const l = o.current, f = a.current;
498
- if (f !== e) {
499
- const h = n.current, m = X(l);
500
- e ? p("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? p("UNMOUNT") : p(f && h !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
524
+ const c = Z(o.current);
525
+ n.current = i === "mounted" ? c : "none";
526
+ }, [i]), q(() => {
527
+ const c = o.current, p = a.current;
528
+ if (p !== e) {
529
+ const h = n.current, g = Z(c);
530
+ e ? d("MOUNT") : g === "none" || (c == null ? void 0 : c.display) === "none" ? d("UNMOUNT") : d(p && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
501
531
  }
502
- }, [e, p]), ie(() => {
532
+ }, [e, d]), q(() => {
503
533
  if (t) {
504
- let l;
505
- const f = t.ownerDocument.defaultView ?? window, v = (m) => {
506
- const c = X(o.current).includes(m.animationName);
507
- if (m.target === t && c && (p("ANIMATION_END"), !a.current)) {
508
- const g = t.style.animationFillMode;
509
- t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
510
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
534
+ let c;
535
+ const p = t.ownerDocument.defaultView ?? window, v = (g) => {
536
+ const l = Z(o.current).includes(CSS.escape(g.animationName));
537
+ if (g.target === t && l && (d("ANIMATION_END"), !a.current)) {
538
+ const m = t.style.animationFillMode;
539
+ t.style.animationFillMode = "forwards", c = p.setTimeout(() => {
540
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = m);
511
541
  });
512
542
  }
513
- }, h = (m) => {
514
- m.target === t && (n.current = X(o.current));
543
+ }, h = (g) => {
544
+ g.target === t && (n.current = Z(o.current));
515
545
  };
516
546
  return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
517
- f.clearTimeout(l), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
547
+ p.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
518
548
  };
519
549
  } else
520
- p("ANIMATION_END");
521
- }, [t, p]), {
522
- isPresent: ["mounted", "unmountSuspended"].includes(u),
523
- ref: s.useCallback((l) => {
524
- l && (o.current = getComputedStyle(l)), r(l);
550
+ d("ANIMATION_END");
551
+ }, [t, d]), {
552
+ isPresent: ["mounted", "unmountSuspended"].includes(i),
553
+ ref: s.useCallback((c) => {
554
+ o.current = c ? getComputedStyle(c) : null, r(c);
525
555
  }, [])
526
556
  };
527
557
  }
528
- function X(e) {
558
+ function Z(e) {
529
559
  return (e == null ? void 0 : e.animationName) || "none";
530
560
  }
531
- function Tr(e) {
561
+ function $r(e) {
532
562
  var o, a;
533
563
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
534
564
  return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
535
565
  }
536
566
  var fe = 0;
537
- function $r() {
567
+ function Tr() {
538
568
  s.useEffect(() => {
539
569
  const e = document.querySelectorAll("[data-radix-focus-guard]");
540
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Be()), document.body.insertAdjacentElement("beforeend", e[1] ?? Be()), fe++, () => {
570
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Fe()), document.body.insertAdjacentElement("beforeend", e[1] ?? Fe()), fe++, () => {
541
571
  fe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), fe--;
542
572
  };
543
573
  }, []);
544
574
  }
545
- function Be() {
575
+ function Fe() {
546
576
  const e = document.createElement("span");
547
577
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
548
578
  }
549
- var $ = function() {
550
- return $ = Object.assign || function(t) {
579
+ var T = function() {
580
+ return T = Object.assign || function(t) {
551
581
  for (var r, o = 1, a = arguments.length; o < a; o++) {
552
582
  r = arguments[o];
553
583
  for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
554
584
  }
555
585
  return t;
556
- }, $.apply(this, arguments);
586
+ }, T.apply(this, arguments);
557
587
  };
558
- function mt(e, t) {
588
+ function ht(e, t) {
559
589
  var r = {};
560
590
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
561
591
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -568,7 +598,7 @@ function Mr(e, t, r) {
568
598
  (n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
569
599
  return e.concat(n || Array.prototype.slice.call(t));
570
600
  }
571
- var ne = "right-scroll-bar-position", oe = "width-before-scroll-bar", Ir = "with-scroll-bars-hidden", Lr = "--removed-body-scroll-bar-size";
601
+ var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", Ir = "with-scroll-bars-hidden", Lr = "--removed-body-scroll-bar-size";
572
602
  function ve(e, t) {
573
603
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
574
604
  }
@@ -593,7 +623,7 @@ function Fr(e, t) {
593
623
  })[0];
594
624
  return r.callback = t, r.facade;
595
625
  }
596
- var kr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, je = /* @__PURE__ */ new WeakMap();
626
+ var kr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, ke = /* @__PURE__ */ new WeakMap();
597
627
  function Wr(e, t) {
598
628
  var r = Fr(null, function(o) {
599
629
  return e.forEach(function(a) {
@@ -601,16 +631,16 @@ function Wr(e, t) {
601
631
  });
602
632
  });
603
633
  return kr(function() {
604
- var o = je.get(r);
634
+ var o = ke.get(r);
605
635
  if (o) {
606
- var a = new Set(o), n = new Set(e), i = r.current;
607
- a.forEach(function(u) {
608
- n.has(u) || ve(u, null);
609
- }), n.forEach(function(u) {
610
- a.has(u) || ve(u, i);
636
+ var a = new Set(o), n = new Set(e), u = r.current;
637
+ a.forEach(function(i) {
638
+ n.has(i) || ve(i, null);
639
+ }), n.forEach(function(i) {
640
+ a.has(i) || ve(i, u);
611
641
  });
612
642
  }
613
- je.set(r, e);
643
+ ke.set(r, e);
614
644
  }, [e]), r;
615
645
  }
616
646
  function Br(e) {
@@ -625,21 +655,21 @@ function jr(e, t) {
625
655
  return r.length ? r[r.length - 1] : e;
626
656
  },
627
657
  useMedium: function(n) {
628
- var i = t(n, o);
629
- return r.push(i), function() {
630
- r = r.filter(function(u) {
631
- return u !== i;
658
+ var u = t(n, o);
659
+ return r.push(u), function() {
660
+ r = r.filter(function(i) {
661
+ return i !== u;
632
662
  });
633
663
  };
634
664
  },
635
665
  assignSyncMedium: function(n) {
636
666
  for (o = !0; r.length; ) {
637
- var i = r;
638
- r = [], i.forEach(n);
667
+ var u = r;
668
+ r = [], u.forEach(n);
639
669
  }
640
670
  r = {
641
- push: function(u) {
642
- return n(u);
671
+ push: function(i) {
672
+ return n(i);
643
673
  },
644
674
  filter: function() {
645
675
  return r;
@@ -648,23 +678,23 @@ function jr(e, t) {
648
678
  },
649
679
  assignMedium: function(n) {
650
680
  o = !0;
651
- var i = [];
681
+ var u = [];
652
682
  if (r.length) {
653
- var u = r;
654
- r = [], u.forEach(n), i = r;
683
+ var i = r;
684
+ r = [], i.forEach(n), u = r;
655
685
  }
656
- var p = function() {
657
- var f = i;
658
- i = [], f.forEach(n);
659
- }, l = function() {
660
- return Promise.resolve().then(p);
686
+ var d = function() {
687
+ var p = u;
688
+ u = [], p.forEach(n);
689
+ }, c = function() {
690
+ return Promise.resolve().then(d);
661
691
  };
662
- l(), r = {
663
- push: function(f) {
664
- i.push(f), l();
692
+ c(), r = {
693
+ push: function(p) {
694
+ u.push(p), c();
665
695
  },
666
- filter: function(f) {
667
- return i = i.filter(f), r;
696
+ filter: function(p) {
697
+ return u = u.filter(p), r;
668
698
  }
669
699
  };
670
700
  }
@@ -674,43 +704,43 @@ function jr(e, t) {
674
704
  function Ur(e) {
675
705
  e === void 0 && (e = {});
676
706
  var t = jr(null);
677
- return t.options = $({ async: !0, ssr: !1 }, e), t;
707
+ return t.options = T({ async: !0, ssr: !1 }, e), t;
678
708
  }
679
- var _t = function(e) {
680
- var t = e.sideCar, r = mt(e, ["sideCar"]);
709
+ var mt = function(e) {
710
+ var t = e.sideCar, r = ht(e, ["sideCar"]);
681
711
  if (!t)
682
712
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
683
713
  var o = t.read();
684
714
  if (!o)
685
715
  throw new Error("Sidecar medium not found");
686
- return s.createElement(o, $({}, r));
716
+ return s.createElement(o, T({}, r));
687
717
  };
688
- _t.isSideCarExport = !0;
718
+ mt.isSideCarExport = !0;
689
719
  function Vr(e, t) {
690
- return e.useMedium(t), _t;
720
+ return e.useMedium(t), mt;
691
721
  }
692
- var yt = Ur(), he = function() {
693
- }, ce = s.forwardRef(function(e, t) {
722
+ var gt = Ur(), he = function() {
723
+ }, se = s.forwardRef(function(e, t) {
694
724
  var r = s.useRef(null), o = s.useState({
695
725
  onScrollCapture: he,
696
726
  onWheelCapture: he,
697
727
  onTouchMoveCapture: he
698
- }), a = o[0], n = o[1], i = e.forwardProps, u = e.children, p = e.className, l = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, m = e.noIsolation, b = e.inert, c = e.allowPinchZoom, g = e.as, _ = g === void 0 ? "div" : g, S = e.gapMode, w = mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = h, C = Wr([r, t]), P = $($({}, w), a);
728
+ }), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar, p = e.enabled, v = e.shards, h = e.sideCar, g = e.noRelative, b = e.noIsolation, l = e.inert, m = e.allowPinchZoom, _ = e.as, w = _ === void 0 ? "div" : _, E = e.gapMode, S = ht(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, P = Wr([r, t]), y = T(T({}, S), a);
699
729
  return s.createElement(
700
730
  s.Fragment,
701
731
  null,
702
- f && s.createElement(E, { sideCar: yt, removeScrollBar: l, shards: v, noIsolation: m, inert: b, setCallbacks: n, allowPinchZoom: !!c, lockRef: r, gapMode: S }),
703
- i ? s.cloneElement(s.Children.only(u), $($({}, P), { ref: C })) : s.createElement(_, $({}, P, { className: p, ref: C }), u)
732
+ p && s.createElement(C, { sideCar: gt, removeScrollBar: c, shards: v, noRelative: g, noIsolation: b, inert: l, setCallbacks: n, allowPinchZoom: !!m, lockRef: r, gapMode: E }),
733
+ u ? s.cloneElement(s.Children.only(i), T(T({}, y), { ref: P })) : s.createElement(w, T({}, y, { className: d, ref: P }), i)
704
734
  );
705
735
  });
706
- ce.defaultProps = {
736
+ se.defaultProps = {
707
737
  enabled: !0,
708
738
  removeScrollBar: !0,
709
739
  inert: !1
710
740
  };
711
- ce.classNames = {
712
- fullWidth: oe,
713
- zeroRight: ne
741
+ se.classNames = {
742
+ fullWidth: ae,
743
+ zeroRight: oe
714
744
  };
715
745
  var Hr = function() {
716
746
  if (typeof __webpack_nonce__ < "u")
@@ -724,10 +754,10 @@ function zr() {
724
754
  var t = Hr();
725
755
  return t && e.setAttribute("nonce", t), e;
726
756
  }
727
- function Kr(e, t) {
757
+ function Gr(e, t) {
728
758
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
729
759
  }
730
- function Gr(e) {
760
+ function Kr(e) {
731
761
  var t = document.head || document.getElementsByTagName("head")[0];
732
762
  t.appendChild(e);
733
763
  }
@@ -735,7 +765,7 @@ var qr = function() {
735
765
  var e = 0, t = null;
736
766
  return {
737
767
  add: function(r) {
738
- e == 0 && (t = zr()) && (Kr(t, r), Gr(t)), e++;
768
+ e == 0 && (t = zr()) && (Gr(t, r), Kr(t)), e++;
739
769
  },
740
770
  remove: function() {
741
771
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
@@ -750,7 +780,7 @@ var qr = function() {
750
780
  };
751
781
  }, [t && r]);
752
782
  };
753
- }, bt = function() {
783
+ }, _t = function() {
754
784
  var e = Yr(), t = function(r) {
755
785
  var o = r.styles, a = r.dynamic;
756
786
  return e(o, a), null;
@@ -761,11 +791,11 @@ var qr = function() {
761
791
  top: 0,
762
792
  right: 0,
763
793
  gap: 0
764
- }, ge = function(e) {
794
+ }, me = function(e) {
765
795
  return parseInt(e || "", 10) || 0;
766
796
  }, Zr = function(e) {
767
797
  var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
768
- return [ge(r), ge(o), ge(a)];
798
+ return [me(r), me(o), me(a)];
769
799
  }, Qr = function(e) {
770
800
  if (e === void 0 && (e = "margin"), typeof window > "u")
771
801
  return Xr;
@@ -776,14 +806,14 @@ var qr = function() {
776
806
  right: t[2],
777
807
  gap: Math.max(0, o - r + t[2] - t[0])
778
808
  };
779
- }, Jr = bt(), z = "data-scroll-locked", en = function(e, t, r, o) {
780
- var a = e.left, n = e.top, i = e.right, u = e.gap;
809
+ }, Jr = _t(), H = "data-scroll-locked", en = function(e, t, r, o) {
810
+ var a = e.left, n = e.top, u = e.right, i = e.gap;
781
811
  return r === void 0 && (r = "margin"), `
782
812
  .`.concat(Ir, ` {
783
813
  overflow: hidden `).concat(o, `;
784
- padding-right: `).concat(u, "px ").concat(o, `;
814
+ padding-right: `).concat(i, "px ").concat(o, `;
785
815
  }
786
- body[`).concat(z, `] {
816
+ body[`).concat(H, `] {
787
817
  overflow: hidden `).concat(o, `;
788
818
  overscroll-behavior: contain;
789
819
  `).concat([
@@ -791,43 +821,43 @@ var qr = function() {
791
821
  r === "margin" && `
792
822
  padding-left: `.concat(a, `px;
793
823
  padding-top: `).concat(n, `px;
794
- padding-right: `).concat(i, `px;
824
+ padding-right: `).concat(u, `px;
795
825
  margin-left:0;
796
826
  margin-top:0;
797
- margin-right: `).concat(u, "px ").concat(o, `;
827
+ margin-right: `).concat(i, "px ").concat(o, `;
798
828
  `),
799
- r === "padding" && "padding-right: ".concat(u, "px ").concat(o, ";")
829
+ r === "padding" && "padding-right: ".concat(i, "px ").concat(o, ";")
800
830
  ].filter(Boolean).join(""), `
801
831
  }
802
832
 
803
- .`).concat(ne, ` {
804
- right: `).concat(u, "px ").concat(o, `;
833
+ .`).concat(oe, ` {
834
+ right: `).concat(i, "px ").concat(o, `;
805
835
  }
806
836
 
807
- .`).concat(oe, ` {
808
- margin-right: `).concat(u, "px ").concat(o, `;
837
+ .`).concat(ae, ` {
838
+ margin-right: `).concat(i, "px ").concat(o, `;
809
839
  }
810
840
 
811
- .`).concat(ne, " .").concat(ne, ` {
841
+ .`).concat(oe, " .").concat(oe, ` {
812
842
  right: 0 `).concat(o, `;
813
843
  }
814
844
 
815
- .`).concat(oe, " .").concat(oe, ` {
845
+ .`).concat(ae, " .").concat(ae, ` {
816
846
  margin-right: 0 `).concat(o, `;
817
847
  }
818
848
 
819
- body[`).concat(z, `] {
820
- `).concat(Lr, ": ").concat(u, `px;
849
+ body[`).concat(H, `] {
850
+ `).concat(Lr, ": ").concat(i, `px;
821
851
  }
822
852
  `);
823
- }, Ue = function() {
824
- var e = parseInt(document.body.getAttribute(z) || "0", 10);
853
+ }, We = function() {
854
+ var e = parseInt(document.body.getAttribute(H) || "0", 10);
825
855
  return isFinite(e) ? e : 0;
826
856
  }, tn = function() {
827
857
  s.useEffect(function() {
828
- return document.body.setAttribute(z, (Ue() + 1).toString()), function() {
829
- var e = Ue() - 1;
830
- e <= 0 ? document.body.removeAttribute(z) : document.body.setAttribute(z, e.toString());
858
+ return document.body.setAttribute(H, (We() + 1).toString()), function() {
859
+ var e = We() - 1;
860
+ e <= 0 ? document.body.removeAttribute(H) : document.body.setAttribute(H, e.toString());
831
861
  };
832
862
  }, []);
833
863
  }, rn = function(e) {
@@ -840,18 +870,18 @@ var qr = function() {
840
870
  }, Se = !1;
841
871
  if (typeof window < "u")
842
872
  try {
843
- var Z = Object.defineProperty({}, "passive", {
873
+ var Q = Object.defineProperty({}, "passive", {
844
874
  get: function() {
845
875
  return Se = !0, !0;
846
876
  }
847
877
  });
848
- window.addEventListener("test", Z, Z), window.removeEventListener("test", Z, Z);
878
+ window.addEventListener("test", Q, Q), window.removeEventListener("test", Q, Q);
849
879
  } catch {
850
880
  Se = !1;
851
881
  }
852
- var U = Se ? { passive: !1 } : !1, nn = function(e) {
882
+ var j = Se ? { passive: !1 } : !1, nn = function(e) {
853
883
  return e.tagName === "TEXTAREA";
854
- }, wt = function(e, t) {
884
+ }, yt = function(e, t) {
855
885
  if (!(e instanceof Element))
856
886
  return !1;
857
887
  var r = window.getComputedStyle(e);
@@ -861,17 +891,17 @@ var U = Se ? { passive: !1 } : !1, nn = function(e) {
861
891
  !(r.overflowY === r.overflowX && !nn(e) && r[t] === "visible")
862
892
  );
863
893
  }, on = function(e) {
864
- return wt(e, "overflowY");
894
+ return yt(e, "overflowY");
865
895
  }, an = function(e) {
866
- return wt(e, "overflowX");
867
- }, Ve = function(e, t) {
896
+ return yt(e, "overflowX");
897
+ }, Be = function(e, t) {
868
898
  var r = t.ownerDocument, o = t;
869
899
  do {
870
900
  typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
871
- var a = Et(e, o);
901
+ var a = bt(e, o);
872
902
  if (a) {
873
- var n = Ct(e, o), i = n[1], u = n[2];
874
- if (i > u)
903
+ var n = wt(e, o), u = n[1], i = n[2];
904
+ if (u > i)
875
905
  return !0;
876
906
  }
877
907
  o = o.parentNode;
@@ -891,28 +921,32 @@ var U = Se ? { passive: !1 } : !1, nn = function(e) {
891
921
  r,
892
922
  o
893
923
  ];
894
- }, Et = function(e, t) {
924
+ }, bt = function(e, t) {
895
925
  return e === "v" ? on(t) : an(t);
896
- }, Ct = function(e, t) {
926
+ }, wt = function(e, t) {
897
927
  return e === "v" ? un(t) : sn(t);
898
928
  }, cn = function(e, t) {
899
929
  return e === "h" && t === "rtl" ? -1 : 1;
900
930
  }, ln = function(e, t, r, o, a) {
901
- var n = cn(e, window.getComputedStyle(t).direction), i = n * o, u = r.target, p = t.contains(u), l = !1, f = i > 0, v = 0, h = 0;
931
+ var n = cn(e, window.getComputedStyle(t).direction), u = n * o, i = r.target, d = t.contains(i), c = !1, p = u > 0, v = 0, h = 0;
902
932
  do {
903
- var m = Ct(e, u), b = m[0], c = m[1], g = m[2], _ = c - g - n * b;
904
- (b || _) && Et(e, u) && (v += _, h += b), u instanceof ShadowRoot ? u = u.host : u = u.parentNode;
933
+ if (!i)
934
+ break;
935
+ var g = wt(e, i), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
936
+ (b || _) && bt(e, i) && (v += _, h += b);
937
+ var w = i.parentNode;
938
+ i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
905
939
  } while (
906
940
  // portaled content
907
- !p && u !== document.body || // self content
908
- p && (t.contains(u) || t === u)
941
+ !d && i !== document.body || // self content
942
+ d && (t.contains(i) || t === i)
909
943
  );
910
- return (f && Math.abs(v) < 1 || !f && Math.abs(h) < 1) && (l = !0), l;
911
- }, Q = function(e) {
944
+ return (p && Math.abs(v) < 1 || !p && Math.abs(h) < 1) && (c = !0), c;
945
+ }, J = function(e) {
912
946
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
913
- }, He = function(e) {
947
+ }, je = function(e) {
914
948
  return [e.deltaX, e.deltaY];
915
- }, ze = function(e) {
949
+ }, Ue = function(e) {
916
950
  return e && "current" in e ? e.current : e;
917
951
  }, dn = function(e, t) {
918
952
  return e[0] === t[0] && e[1] === t[1];
@@ -921,87 +955,87 @@ var U = Se ? { passive: !1 } : !1, nn = function(e) {
921
955
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
922
956
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
923
957
  `);
924
- }, fn = 0, V = [];
958
+ }, fn = 0, U = [];
925
959
  function vn(e) {
926
- var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(fn++)[0], n = s.useState(bt)[0], i = s.useRef(e);
960
+ var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(fn++)[0], n = s.useState(_t)[0], u = s.useRef(e);
927
961
  s.useEffect(function() {
928
- i.current = e;
962
+ u.current = e;
929
963
  }, [e]), s.useEffect(function() {
930
964
  if (e.inert) {
931
965
  document.body.classList.add("block-interactivity-".concat(a));
932
- var c = Mr([e.lockRef.current], (e.shards || []).map(ze), !0).filter(Boolean);
933
- return c.forEach(function(g) {
934
- return g.classList.add("allow-interactivity-".concat(a));
966
+ var l = Mr([e.lockRef.current], (e.shards || []).map(Ue), !0).filter(Boolean);
967
+ return l.forEach(function(m) {
968
+ return m.classList.add("allow-interactivity-".concat(a));
935
969
  }), function() {
936
- document.body.classList.remove("block-interactivity-".concat(a)), c.forEach(function(g) {
937
- return g.classList.remove("allow-interactivity-".concat(a));
970
+ document.body.classList.remove("block-interactivity-".concat(a)), l.forEach(function(m) {
971
+ return m.classList.remove("allow-interactivity-".concat(a));
938
972
  });
939
973
  };
940
974
  }
941
975
  }, [e.inert, e.lockRef.current, e.shards]);
942
- var u = s.useCallback(function(c, g) {
943
- if ("touches" in c && c.touches.length === 2 || c.type === "wheel" && c.ctrlKey)
944
- return !i.current.allowPinchZoom;
945
- var _ = Q(c), S = r.current, w = "deltaX" in c ? c.deltaX : S[0] - _[0], E = "deltaY" in c ? c.deltaY : S[1] - _[1], C, P = c.target, y = Math.abs(w) > Math.abs(E) ? "h" : "v";
946
- if ("touches" in c && y === "h" && P.type === "range")
976
+ var i = s.useCallback(function(l, m) {
977
+ if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
978
+ return !u.current.allowPinchZoom;
979
+ var _ = J(l), w = r.current, E = "deltaX" in l ? l.deltaX : w[0] - _[0], S = "deltaY" in l ? l.deltaY : w[1] - _[1], C, P = l.target, y = Math.abs(E) > Math.abs(S) ? "h" : "v";
980
+ if ("touches" in l && y === "h" && P.type === "range")
947
981
  return !1;
948
- var x = Ve(y, P);
982
+ var x = Be(y, P);
949
983
  if (!x)
950
984
  return !0;
951
- if (x ? C = y : (C = y === "v" ? "h" : "v", x = Ve(y, P)), !x)
985
+ if (x ? C = y : (C = y === "v" ? "h" : "v", x = Be(y, P)), !x)
952
986
  return !1;
953
- if (!o.current && "changedTouches" in c && (w || E) && (o.current = C), !C)
987
+ if (!o.current && "changedTouches" in l && (E || S) && (o.current = C), !C)
954
988
  return !0;
955
989
  var R = o.current || C;
956
- return ln(R, g, c, R === "h" ? w : E);
957
- }, []), p = s.useCallback(function(c) {
958
- var g = c;
959
- if (!(!V.length || V[V.length - 1] !== n)) {
960
- var _ = "deltaY" in g ? He(g) : Q(g), S = t.current.filter(function(C) {
961
- return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && dn(C.delta, _);
990
+ return ln(R, m, l, R === "h" ? E : S);
991
+ }, []), d = s.useCallback(function(l) {
992
+ var m = l;
993
+ if (!(!U.length || U[U.length - 1] !== n)) {
994
+ var _ = "deltaY" in m ? je(m) : J(m), w = t.current.filter(function(C) {
995
+ return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && dn(C.delta, _);
962
996
  })[0];
963
- if (S && S.should) {
964
- g.cancelable && g.preventDefault();
997
+ if (w && w.should) {
998
+ m.cancelable && m.preventDefault();
965
999
  return;
966
1000
  }
967
- if (!S) {
968
- var w = (i.current.shards || []).map(ze).filter(Boolean).filter(function(C) {
969
- return C.contains(g.target);
970
- }), E = w.length > 0 ? u(g, w[0]) : !i.current.noIsolation;
971
- E && g.cancelable && g.preventDefault();
1001
+ if (!w) {
1002
+ var E = (u.current.shards || []).map(Ue).filter(Boolean).filter(function(C) {
1003
+ return C.contains(m.target);
1004
+ }), S = E.length > 0 ? i(m, E[0]) : !u.current.noIsolation;
1005
+ S && m.cancelable && m.preventDefault();
972
1006
  }
973
1007
  }
974
- }, []), l = s.useCallback(function(c, g, _, S) {
975
- var w = { name: c, delta: g, target: _, should: S, shadowParent: hn(_) };
976
- t.current.push(w), setTimeout(function() {
977
- t.current = t.current.filter(function(E) {
978
- return E !== w;
1008
+ }, []), c = s.useCallback(function(l, m, _, w) {
1009
+ var E = { name: l, delta: m, target: _, should: w, shadowParent: hn(_) };
1010
+ t.current.push(E), setTimeout(function() {
1011
+ t.current = t.current.filter(function(S) {
1012
+ return S !== E;
979
1013
  });
980
1014
  }, 1);
981
- }, []), f = s.useCallback(function(c) {
982
- r.current = Q(c), o.current = void 0;
983
- }, []), v = s.useCallback(function(c) {
984
- l(c.type, He(c), c.target, u(c, e.lockRef.current));
985
- }, []), h = s.useCallback(function(c) {
986
- l(c.type, Q(c), c.target, u(c, e.lockRef.current));
1015
+ }, []), p = s.useCallback(function(l) {
1016
+ r.current = J(l), o.current = void 0;
1017
+ }, []), v = s.useCallback(function(l) {
1018
+ c(l.type, je(l), l.target, i(l, e.lockRef.current));
1019
+ }, []), h = s.useCallback(function(l) {
1020
+ c(l.type, J(l), l.target, i(l, e.lockRef.current));
987
1021
  }, []);
988
1022
  s.useEffect(function() {
989
- return V.push(n), e.setCallbacks({
1023
+ return U.push(n), e.setCallbacks({
990
1024
  onScrollCapture: v,
991
1025
  onWheelCapture: v,
992
1026
  onTouchMoveCapture: h
993
- }), document.addEventListener("wheel", p, U), document.addEventListener("touchmove", p, U), document.addEventListener("touchstart", f, U), function() {
994
- V = V.filter(function(c) {
995
- return c !== n;
996
- }), document.removeEventListener("wheel", p, U), document.removeEventListener("touchmove", p, U), document.removeEventListener("touchstart", f, U);
1027
+ }), document.addEventListener("wheel", d, j), document.addEventListener("touchmove", d, j), document.addEventListener("touchstart", p, j), function() {
1028
+ U = U.filter(function(l) {
1029
+ return l !== n;
1030
+ }), document.removeEventListener("wheel", d, j), document.removeEventListener("touchmove", d, j), document.removeEventListener("touchstart", p, j);
997
1031
  };
998
1032
  }, []);
999
- var m = e.removeScrollBar, b = e.inert;
1033
+ var g = e.removeScrollBar, b = e.inert;
1000
1034
  return s.createElement(
1001
1035
  s.Fragment,
1002
1036
  null,
1003
1037
  b ? s.createElement(n, { styles: pn(a) }) : null,
1004
- m ? s.createElement(rn, { gapMode: e.gapMode }) : null
1038
+ g ? s.createElement(rn, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1005
1039
  );
1006
1040
  }
1007
1041
  function hn(e) {
@@ -1009,101 +1043,102 @@ function hn(e) {
1009
1043
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1010
1044
  return t;
1011
1045
  }
1012
- const gn = Vr(yt, vn);
1013
- var St = s.forwardRef(function(e, t) {
1014
- return s.createElement(ce, $({}, e, { ref: t, sideCar: gn }));
1046
+ const mn = Vr(gt, vn);
1047
+ var Et = s.forwardRef(function(e, t) {
1048
+ return s.createElement(se, T({}, e, { ref: t, sideCar: mn }));
1015
1049
  });
1016
- St.classNames = ce.classNames;
1017
- var mn = function(e) {
1050
+ Et.classNames = se.classNames;
1051
+ var gn = function(e) {
1018
1052
  if (typeof document > "u")
1019
1053
  return null;
1020
1054
  var t = Array.isArray(e) ? e[0] : e;
1021
1055
  return t.ownerDocument.body;
1022
- }, H = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ee = {}, me = 0, Nt = function(e) {
1023
- return e && (e.host || Nt(e.parentNode));
1056
+ }, V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, ge = 0, St = function(e) {
1057
+ return e && (e.host || St(e.parentNode));
1024
1058
  }, _n = function(e, t) {
1025
1059
  return t.map(function(r) {
1026
1060
  if (e.contains(r))
1027
1061
  return r;
1028
- var o = Nt(r);
1062
+ var o = St(r);
1029
1063
  return o && e.contains(o) ? o : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
1030
1064
  }).filter(function(r) {
1031
1065
  return !!r;
1032
1066
  });
1033
1067
  }, yn = function(e, t, r, o) {
1034
1068
  var a = _n(t, Array.isArray(e) ? e : [e]);
1035
- ee[r] || (ee[r] = /* @__PURE__ */ new WeakMap());
1036
- var n = ee[r], i = [], u = /* @__PURE__ */ new Set(), p = new Set(a), l = function(v) {
1037
- !v || u.has(v) || (u.add(v), l(v.parentNode));
1069
+ te[r] || (te[r] = /* @__PURE__ */ new WeakMap());
1070
+ var n = te[r], u = [], i = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
1071
+ !v || i.has(v) || (i.add(v), c(v.parentNode));
1038
1072
  };
1039
- a.forEach(l);
1040
- var f = function(v) {
1041
- !v || p.has(v) || Array.prototype.forEach.call(v.children, function(h) {
1042
- if (u.has(h))
1043
- f(h);
1073
+ a.forEach(c);
1074
+ var p = function(v) {
1075
+ !v || d.has(v) || Array.prototype.forEach.call(v.children, function(h) {
1076
+ if (i.has(h))
1077
+ p(h);
1044
1078
  else
1045
1079
  try {
1046
- var m = h.getAttribute(o), b = m !== null && m !== "false", c = (H.get(h) || 0) + 1, g = (n.get(h) || 0) + 1;
1047
- H.set(h, c), n.set(h, g), i.push(h), c === 1 && b && J.set(h, !0), g === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
1080
+ var g = h.getAttribute(o), b = g !== null && g !== "false", l = (V.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
1081
+ V.set(h, l), n.set(h, m), u.push(h), l === 1 && b && ee.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
1048
1082
  } catch (_) {
1049
1083
  console.error("aria-hidden: cannot operate on ", h, _);
1050
1084
  }
1051
1085
  });
1052
1086
  };
1053
- return f(t), u.clear(), me++, function() {
1054
- i.forEach(function(v) {
1055
- var h = H.get(v) - 1, m = n.get(v) - 1;
1056
- H.set(v, h), n.set(v, m), h || (J.has(v) || v.removeAttribute(o), J.delete(v)), m || v.removeAttribute(r);
1057
- }), me--, me || (H = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ee = {});
1087
+ return p(t), i.clear(), ge++, function() {
1088
+ u.forEach(function(v) {
1089
+ var h = V.get(v) - 1, g = n.get(v) - 1;
1090
+ V.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
1091
+ }), ge--, ge || (V = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
1058
1092
  };
1059
1093
  }, bn = function(e, t, r) {
1060
1094
  r === void 0 && (r = "data-aria-hidden");
1061
- var o = Array.from(Array.isArray(e) ? e : [e]), a = mn(e);
1062
- return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), yn(o, a, r, "aria-hidden")) : function() {
1095
+ var o = Array.from(Array.isArray(e) ? e : [e]), a = gn(e);
1096
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))), yn(o, a, r, "aria-hidden")) : function() {
1063
1097
  return null;
1064
1098
  };
1065
- }, Re = "Dialog", [Pt, Vo] = rr(Re), [wn, A] = Pt(Re), Ot = (e) => {
1099
+ }, ce = "Dialog", [Ct] = Jt(ce), [wn, A] = Ct(ce), Nt = (e) => {
1066
1100
  const {
1067
1101
  __scopeDialog: t,
1068
1102
  children: r,
1069
1103
  open: o,
1070
1104
  defaultOpen: a,
1071
1105
  onOpenChange: n,
1072
- modal: i = !0
1073
- } = e, u = s.useRef(null), p = s.useRef(null), [l = !1, f] = ir({
1106
+ modal: u = !0
1107
+ } = e, i = s.useRef(null), d = s.useRef(null), [c, p] = or({
1074
1108
  prop: o,
1075
- defaultProp: a,
1076
- onChange: n
1109
+ defaultProp: a ?? !1,
1110
+ onChange: n,
1111
+ caller: ce
1077
1112
  });
1078
- return /* @__PURE__ */ d(
1113
+ return /* @__PURE__ */ f(
1079
1114
  wn,
1080
1115
  {
1081
1116
  scope: t,
1082
- triggerRef: u,
1083
- contentRef: p,
1117
+ triggerRef: i,
1118
+ contentRef: d,
1084
1119
  contentId: le(),
1085
1120
  titleId: le(),
1086
1121
  descriptionId: le(),
1087
- open: l,
1088
- onOpenChange: f,
1089
- onOpenToggle: s.useCallback(() => f((v) => !v), [f]),
1090
- modal: i,
1122
+ open: c,
1123
+ onOpenChange: p,
1124
+ onOpenToggle: s.useCallback(() => p((v) => !v), [p]),
1125
+ modal: u,
1091
1126
  children: r
1092
1127
  }
1093
1128
  );
1094
1129
  };
1095
- Ot.displayName = Re;
1096
- var Rt = "DialogTrigger", xt = s.forwardRef(
1130
+ Nt.displayName = ce;
1131
+ var Pt = "DialogTrigger", Ot = s.forwardRef(
1097
1132
  (e, t) => {
1098
- const { __scopeDialog: r, ...o } = e, a = A(Rt, r), n = B(t, a.triggerRef);
1099
- return /* @__PURE__ */ d(
1133
+ const { __scopeDialog: r, ...o } = e, a = A(Pt, r), n = W(t, a.triggerRef);
1134
+ return /* @__PURE__ */ f(
1100
1135
  M.button,
1101
1136
  {
1102
1137
  type: "button",
1103
1138
  "aria-haspopup": "dialog",
1104
1139
  "aria-expanded": a.open,
1105
1140
  "aria-controls": a.contentId,
1106
- "data-state": De(a.open),
1141
+ "data-state": Oe(a.open),
1107
1142
  ...o,
1108
1143
  ref: n,
1109
1144
  onClick: L(e.onClick, a.onOpenToggle)
@@ -1111,31 +1146,31 @@ var Rt = "DialogTrigger", xt = s.forwardRef(
1111
1146
  );
1112
1147
  }
1113
1148
  );
1114
- xt.displayName = Rt;
1115
- var xe = "DialogPortal", [En, At] = Pt(xe, {
1149
+ Ot.displayName = Pt;
1150
+ var Ne = "DialogPortal", [En, Rt] = Ct(Ne, {
1116
1151
  forceMount: void 0
1117
- }), Dt = (e) => {
1118
- const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = A(xe, t);
1119
- return /* @__PURE__ */ d(En, { scope: t, forceMount: r, children: s.Children.map(o, (i) => /* @__PURE__ */ d(se, { present: r || n.open, children: /* @__PURE__ */ d(gt, { asChild: !0, container: a, children: i }) })) });
1152
+ }), xt = (e) => {
1153
+ const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = A(Ne, t);
1154
+ return /* @__PURE__ */ f(En, { scope: t, forceMount: r, children: s.Children.map(o, (u) => /* @__PURE__ */ f(ue, { present: r || n.open, children: /* @__PURE__ */ f(vt, { asChild: !0, container: a, children: u }) })) });
1120
1155
  };
1121
- Dt.displayName = xe;
1122
- var ue = "DialogOverlay", Tt = s.forwardRef(
1156
+ xt.displayName = Ne;
1157
+ var ie = "DialogOverlay", At = s.forwardRef(
1123
1158
  (e, t) => {
1124
- const r = At(ue, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(ue, e.__scopeDialog);
1125
- return n.modal ? /* @__PURE__ */ d(se, { present: o || n.open, children: /* @__PURE__ */ d(Cn, { ...a, ref: t }) }) : null;
1159
+ const r = Rt(ie, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(ie, e.__scopeDialog);
1160
+ return n.modal ? /* @__PURE__ */ f(ue, { present: o || n.open, children: /* @__PURE__ */ f(Cn, { ...a, ref: t }) }) : null;
1126
1161
  }
1127
1162
  );
1128
- Tt.displayName = ue;
1129
- var Cn = s.forwardRef(
1163
+ At.displayName = ie;
1164
+ var Sn = /* @__PURE__ */ st("DialogOverlay.RemoveScroll"), Cn = s.forwardRef(
1130
1165
  (e, t) => {
1131
- const { __scopeDialog: r, ...o } = e, a = A(ue, r);
1166
+ const { __scopeDialog: r, ...o } = e, a = A(ie, r);
1132
1167
  return (
1133
1168
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1134
1169
  // ie. when `Overlay` and `Content` are siblings
1135
- /* @__PURE__ */ d(St, { as: Oe, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ d(
1170
+ /* @__PURE__ */ f(Et, { as: Sn, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
1136
1171
  M.div,
1137
1172
  {
1138
- "data-state": De(a.open),
1173
+ "data-state": Oe(a.open),
1139
1174
  ...o,
1140
1175
  ref: t,
1141
1176
  style: { pointerEvents: "auto", ...o.style }
@@ -1143,33 +1178,33 @@ var Cn = s.forwardRef(
1143
1178
  ) })
1144
1179
  );
1145
1180
  }
1146
- ), W = "DialogContent", $t = s.forwardRef(
1181
+ ), k = "DialogContent", Dt = s.forwardRef(
1147
1182
  (e, t) => {
1148
- const r = At(W, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(W, e.__scopeDialog);
1149
- return /* @__PURE__ */ d(se, { present: o || n.open, children: n.modal ? /* @__PURE__ */ d(Sn, { ...a, ref: t }) : /* @__PURE__ */ d(Nn, { ...a, ref: t }) });
1183
+ const r = Rt(k, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(k, e.__scopeDialog);
1184
+ return /* @__PURE__ */ f(ue, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(Nn, { ...a, ref: t }) : /* @__PURE__ */ f(Pn, { ...a, ref: t }) });
1150
1185
  }
1151
1186
  );
1152
- $t.displayName = W;
1153
- var Sn = s.forwardRef(
1187
+ Dt.displayName = k;
1188
+ var Nn = s.forwardRef(
1154
1189
  (e, t) => {
1155
- const r = A(W, e.__scopeDialog), o = s.useRef(null), a = B(t, r.contentRef, o);
1190
+ const r = A(k, e.__scopeDialog), o = s.useRef(null), a = W(t, r.contentRef, o);
1156
1191
  return s.useEffect(() => {
1157
1192
  const n = o.current;
1158
1193
  if (n) return bn(n);
1159
- }, []), /* @__PURE__ */ d(
1160
- Mt,
1194
+ }, []), /* @__PURE__ */ f(
1195
+ $t,
1161
1196
  {
1162
1197
  ...e,
1163
1198
  ref: a,
1164
1199
  trapFocus: r.open,
1165
1200
  disableOutsidePointerEvents: !0,
1166
1201
  onCloseAutoFocus: L(e.onCloseAutoFocus, (n) => {
1167
- var i;
1168
- n.preventDefault(), (i = r.triggerRef.current) == null || i.focus();
1202
+ var u;
1203
+ n.preventDefault(), (u = r.triggerRef.current) == null || u.focus();
1169
1204
  }),
1170
1205
  onPointerDownOutside: L(e.onPointerDownOutside, (n) => {
1171
- const i = n.detail.originalEvent, u = i.button === 0 && i.ctrlKey === !0;
1172
- (i.button === 2 || u) && n.preventDefault();
1206
+ const u = n.detail.originalEvent, i = u.button === 0 && u.ctrlKey === !0;
1207
+ (u.button === 2 || i) && n.preventDefault();
1173
1208
  }),
1174
1209
  onFocusOutside: L(
1175
1210
  e.onFocusOutside,
@@ -1178,80 +1213,80 @@ var Sn = s.forwardRef(
1178
1213
  }
1179
1214
  );
1180
1215
  }
1181
- ), Nn = s.forwardRef(
1216
+ ), Pn = s.forwardRef(
1182
1217
  (e, t) => {
1183
- const r = A(W, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
1184
- return /* @__PURE__ */ d(
1185
- Mt,
1218
+ const r = A(k, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
1219
+ return /* @__PURE__ */ f(
1220
+ $t,
1186
1221
  {
1187
1222
  ...e,
1188
1223
  ref: t,
1189
1224
  trapFocus: !1,
1190
1225
  disableOutsidePointerEvents: !1,
1191
1226
  onCloseAutoFocus: (n) => {
1192
- var i, u;
1193
- (i = e.onCloseAutoFocus) == null || i.call(e, n), n.defaultPrevented || (o.current || (u = r.triggerRef.current) == null || u.focus(), n.preventDefault()), o.current = !1, a.current = !1;
1227
+ var u, i;
1228
+ (u = e.onCloseAutoFocus) == null || u.call(e, n), n.defaultPrevented || (o.current || (i = r.triggerRef.current) == null || i.focus(), n.preventDefault()), o.current = !1, a.current = !1;
1194
1229
  },
1195
1230
  onInteractOutside: (n) => {
1196
- var p, l;
1197
- (p = e.onInteractOutside) == null || p.call(e, n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
1198
- const i = n.target;
1199
- ((l = r.triggerRef.current) == null ? void 0 : l.contains(i)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
1231
+ var d, c;
1232
+ (d = e.onInteractOutside) == null || d.call(e, n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
1233
+ const u = n.target;
1234
+ ((c = r.triggerRef.current) == null ? void 0 : c.contains(u)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
1200
1235
  }
1201
1236
  }
1202
1237
  );
1203
1238
  }
1204
- ), Mt = s.forwardRef(
1239
+ ), $t = s.forwardRef(
1205
1240
  (e, t) => {
1206
- const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, u = A(W, r), p = s.useRef(null), l = B(t, p);
1207
- return $r(), /* @__PURE__ */ T(ae, { children: [
1208
- /* @__PURE__ */ d(
1209
- vt,
1241
+ const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i = A(k, r), d = s.useRef(null), c = W(t, d);
1242
+ return Tr(), /* @__PURE__ */ $(xe, { children: [
1243
+ /* @__PURE__ */ f(
1244
+ pt,
1210
1245
  {
1211
1246
  asChild: !0,
1212
1247
  loop: !0,
1213
1248
  trapped: o,
1214
1249
  onMountAutoFocus: a,
1215
1250
  onUnmountAutoFocus: n,
1216
- children: /* @__PURE__ */ d(
1217
- pt,
1251
+ children: /* @__PURE__ */ f(
1252
+ lt,
1218
1253
  {
1219
1254
  role: "dialog",
1220
- id: u.contentId,
1221
- "aria-describedby": u.descriptionId,
1222
- "aria-labelledby": u.titleId,
1223
- "data-state": De(u.open),
1224
- ...i,
1225
- ref: l,
1226
- onDismiss: () => u.onOpenChange(!1)
1255
+ id: i.contentId,
1256
+ "aria-describedby": i.descriptionId,
1257
+ "aria-labelledby": i.titleId,
1258
+ "data-state": Oe(i.open),
1259
+ ...u,
1260
+ ref: c,
1261
+ onDismiss: () => i.onOpenChange(!1)
1227
1262
  }
1228
1263
  )
1229
1264
  }
1230
1265
  ),
1231
- /* @__PURE__ */ T(ae, { children: [
1232
- /* @__PURE__ */ d(Pn, { titleId: u.titleId }),
1233
- /* @__PURE__ */ d(Rn, { contentRef: p, descriptionId: u.descriptionId })
1266
+ /* @__PURE__ */ $(xe, { children: [
1267
+ /* @__PURE__ */ f(On, { titleId: i.titleId }),
1268
+ /* @__PURE__ */ f(xn, { contentRef: d, descriptionId: i.descriptionId })
1234
1269
  ] })
1235
1270
  ] });
1236
1271
  }
1237
- ), Ae = "DialogTitle", It = s.forwardRef(
1272
+ ), Pe = "DialogTitle", Tt = s.forwardRef(
1238
1273
  (e, t) => {
1239
- const { __scopeDialog: r, ...o } = e, a = A(Ae, r);
1240
- return /* @__PURE__ */ d(M.h2, { id: a.titleId, ...o, ref: t });
1274
+ const { __scopeDialog: r, ...o } = e, a = A(Pe, r);
1275
+ return /* @__PURE__ */ f(M.h2, { id: a.titleId, ...o, ref: t });
1241
1276
  }
1242
1277
  );
1243
- It.displayName = Ae;
1244
- var Lt = "DialogDescription", Ft = s.forwardRef(
1278
+ Tt.displayName = Pe;
1279
+ var Mt = "DialogDescription", It = s.forwardRef(
1245
1280
  (e, t) => {
1246
- const { __scopeDialog: r, ...o } = e, a = A(Lt, r);
1247
- return /* @__PURE__ */ d(M.p, { id: a.descriptionId, ...o, ref: t });
1281
+ const { __scopeDialog: r, ...o } = e, a = A(Mt, r);
1282
+ return /* @__PURE__ */ f(M.p, { id: a.descriptionId, ...o, ref: t });
1248
1283
  }
1249
1284
  );
1250
- Ft.displayName = Lt;
1251
- var kt = "DialogClose", Wt = s.forwardRef(
1285
+ It.displayName = Mt;
1286
+ var Lt = "DialogClose", Ft = s.forwardRef(
1252
1287
  (e, t) => {
1253
- const { __scopeDialog: r, ...o } = e, a = A(kt, r);
1254
- return /* @__PURE__ */ d(
1288
+ const { __scopeDialog: r, ...o } = e, a = A(Lt, r);
1289
+ return /* @__PURE__ */ f(
1255
1290
  M.button,
1256
1291
  {
1257
1292
  type: "button",
@@ -1262,16 +1297,16 @@ var kt = "DialogClose", Wt = s.forwardRef(
1262
1297
  );
1263
1298
  }
1264
1299
  );
1265
- Wt.displayName = kt;
1266
- function De(e) {
1300
+ Ft.displayName = Lt;
1301
+ function Oe(e) {
1267
1302
  return e ? "open" : "closed";
1268
1303
  }
1269
- var Bt = "DialogTitleWarning", [Ho, jt] = tr(Bt, {
1270
- contentName: W,
1271
- titleName: Ae,
1304
+ var kt = "DialogTitleWarning", [Go, Wt] = Qt(kt, {
1305
+ contentName: k,
1306
+ titleName: Pe,
1272
1307
  docsSlug: "dialog"
1273
- }), Pn = ({ titleId: e }) => {
1274
- const t = jt(Bt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1308
+ }), On = ({ titleId: e }) => {
1309
+ const t = Wt(kt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1275
1310
 
1276
1311
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1277
1312
 
@@ -1279,35 +1314,35 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1279
1314
  return s.useEffect(() => {
1280
1315
  e && (document.getElementById(e) || console.error(r));
1281
1316
  }, [r, e]), null;
1282
- }, On = "DialogDescriptionWarning", Rn = ({ contentRef: e, descriptionId: t }) => {
1283
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jt(On).contentName}}.`;
1317
+ }, Rn = "DialogDescriptionWarning", xn = ({ contentRef: e, descriptionId: t }) => {
1318
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wt(Rn).contentName}}.`;
1284
1319
  return s.useEffect(() => {
1285
1320
  var n;
1286
1321
  const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
1287
1322
  t && a && (document.getElementById(t) || console.warn(o));
1288
1323
  }, [o, e, t]), null;
1289
- }, xn = Ot, An = xt, Dn = Dt, Tn = Tt, $n = $t, Mn = It, Ke = Ft, In = Wt;
1290
- const Ln = {
1324
+ }, An = Nt, Dn = Ot, $n = xt, Tn = At, Mn = Dt, In = Tt, Ve = It, Ln = Ft;
1325
+ const Fn = {
1291
1326
  LG: "lg"
1292
1327
  };
1293
- function Fn(e) {
1328
+ function kn(e) {
1294
1329
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1295
1330
  }
1296
- var Ge = { exports: {} };
1331
+ var He = { exports: {} };
1297
1332
  /*!
1298
1333
  Copyright (c) 2018 Jed Watson.
1299
1334
  Licensed under the MIT License (MIT), see
1300
1335
  http://jedwatson.github.io/classnames
1301
1336
  */
1302
- var qe;
1303
- function kn() {
1304
- return qe || (qe = 1, function(e) {
1337
+ var ze;
1338
+ function Wn() {
1339
+ return ze || (ze = 1, (function(e) {
1305
1340
  (function() {
1306
1341
  var t = {}.hasOwnProperty;
1307
1342
  function r() {
1308
- for (var n = "", i = 0; i < arguments.length; i++) {
1309
- var u = arguments[i];
1310
- u && (n = a(n, o.call(this, u)));
1343
+ for (var n = "", u = 0; u < arguments.length; u++) {
1344
+ var i = arguments[u];
1345
+ i && (n = a(n, o.call(this, i)));
1311
1346
  }
1312
1347
  return n;
1313
1348
  }
@@ -1320,42 +1355,42 @@ function kn() {
1320
1355
  return r.apply(this, n);
1321
1356
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
1322
1357
  return n.toString();
1323
- var i = "";
1324
- for (var u in n)
1325
- t.call(n, u) && n[u] && (i = a(i, this && this[u] || u));
1326
- return i;
1358
+ var u = "";
1359
+ for (var i in n)
1360
+ t.call(n, i) && n[i] && (u = a(u, this && this[i] || i));
1361
+ return u;
1327
1362
  }
1328
- function a(n, i) {
1329
- return i ? n ? n + " " + i : n + i : n;
1363
+ function a(n, u) {
1364
+ return u ? n ? n + " " + u : n + u : n;
1330
1365
  }
1331
1366
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1332
1367
  })();
1333
- }(Ge)), Ge.exports;
1368
+ })(He)), He.exports;
1334
1369
  }
1335
- var Wn = kn();
1336
- const Bn = /* @__PURE__ */ Fn(Wn), jn = "_rotate_12t9p_1", Un = "_dash_12t9p_1", Vn = {
1370
+ var Bn = Wn();
1371
+ const jn = /* @__PURE__ */ kn(Bn), Un = "_rotate_12t9p_1", Vn = "_dash_12t9p_1", Hn = {
1337
1372
  "purpur-spinner": "_purpur-spinner_12t9p_2",
1338
- rotate: jn,
1373
+ rotate: Un,
1339
1374
  "purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
1340
1375
  "purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
1341
1376
  "purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
1342
1377
  "purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
1343
1378
  "purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
1344
1379
  "purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
1345
- dash: Un,
1380
+ dash: Vn,
1346
1381
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
1347
1382
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
1348
- }, Ye = Bn.bind(Vn), G = "purpur-spinner", Hn = {
1383
+ }, Ge = jn.bind(Hn), G = "purpur-spinner", zn = {
1349
1384
  SM: "sm"
1350
- }, zn = ({
1385
+ }, Gn = ({
1351
1386
  disabled: e = !1,
1352
1387
  negative: t = !1,
1353
- size: r = Hn.SM,
1388
+ size: r = zn.SM,
1354
1389
  ...o
1355
- }) => /* @__PURE__ */ d("div", { className: Ye(G, `${G}--${r}`), ...o, children: /* @__PURE__ */ d("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ d(
1390
+ }) => /* @__PURE__ */ f("div", { className: Ge(G, `${G}--${r}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
1356
1391
  "circle",
1357
1392
  {
1358
- className: Ye(`${G}__circle`, {
1393
+ className: Ge(`${G}__circle`, {
1359
1394
  [`${G}__circle--disabled`]: e,
1360
1395
  [`${G}__circle--negative`]: t
1361
1396
  }),
@@ -1367,21 +1402,21 @@ const Bn = /* @__PURE__ */ Fn(Wn), jn = "_rotate_12t9p_1", Un = "_dash_12t9p_1",
1367
1402
  function Kn(e) {
1368
1403
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1369
1404
  }
1370
- var Xe = { exports: {} };
1405
+ var Ke = { exports: {} };
1371
1406
  /*!
1372
1407
  Copyright (c) 2018 Jed Watson.
1373
1408
  Licensed under the MIT License (MIT), see
1374
1409
  http://jedwatson.github.io/classnames
1375
1410
  */
1376
- var Ze;
1377
- function Gn() {
1378
- return Ze || (Ze = 1, function(e) {
1411
+ var qe;
1412
+ function qn() {
1413
+ return qe || (qe = 1, (function(e) {
1379
1414
  (function() {
1380
1415
  var t = {}.hasOwnProperty;
1381
1416
  function r() {
1382
- for (var n = "", i = 0; i < arguments.length; i++) {
1383
- var u = arguments[i];
1384
- u && (n = a(n, o.call(this, u)));
1417
+ for (var n = "", u = 0; u < arguments.length; u++) {
1418
+ var i = arguments[u];
1419
+ i && (n = a(n, o.call(this, i)));
1385
1420
  }
1386
1421
  return n;
1387
1422
  }
@@ -1394,20 +1429,20 @@ function Gn() {
1394
1429
  return r.apply(this, n);
1395
1430
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
1396
1431
  return n.toString();
1397
- var i = "";
1398
- for (var u in n)
1399
- t.call(n, u) && n[u] && (i = a(i, this && this[u] || u));
1400
- return i;
1432
+ var u = "";
1433
+ for (var i in n)
1434
+ t.call(n, i) && n[i] && (u = a(u, this && this[i] || i));
1435
+ return u;
1401
1436
  }
1402
- function a(n, i) {
1403
- return i ? n ? n + " " + i : n + i : n;
1437
+ function a(n, u) {
1438
+ return u ? n ? n + " " + u : n + u : n;
1404
1439
  }
1405
1440
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1406
1441
  })();
1407
- }(Xe)), Xe.exports;
1442
+ })(Ke)), Ke.exports;
1408
1443
  }
1409
- var qn = Gn();
1410
- const Yn = /* @__PURE__ */ Kn(qn), Xn = {
1444
+ var Yn = qn();
1445
+ const Xn = /* @__PURE__ */ Kn(Yn), Zn = {
1411
1446
  "purpur-button": "_purpur-button_1goi7_1",
1412
1447
  "purpur-button--xs": "_purpur-button--xs_1goi7_33",
1413
1448
  "purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
@@ -1429,7 +1464,7 @@ const Yn = /* @__PURE__ */ Kn(qn), Xn = {
1429
1464
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
1430
1465
  "purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
1431
1466
  "purpur-button--text": "_purpur-button--text_1goi7_181"
1432
- }, Zn = Yn.bind(Xn), F = "purpur-button", Ut = Pe(
1467
+ }, Qn = Xn.bind(Zn), F = "purpur-button", Bt = Ce(
1433
1468
  ({
1434
1469
  children: e,
1435
1470
  className: t,
@@ -1437,47 +1472,47 @@ const Yn = /* @__PURE__ */ Kn(qn), Xn = {
1437
1472
  fullWidth: o = !1,
1438
1473
  iconOnly: a,
1439
1474
  loading: n = !1,
1440
- negative: i = !1,
1441
- onClick: u,
1442
- size: p = "md",
1443
- variant: l,
1444
- type: f = "button",
1475
+ negative: u = !1,
1476
+ onClick: i,
1477
+ size: d = "md",
1478
+ variant: c,
1479
+ type: p = "button",
1445
1480
  ...v
1446
1481
  }, h) => {
1447
- if (a && l === "destructive")
1482
+ if (a && c === "destructive")
1448
1483
  return null;
1449
- const m = Zn(
1484
+ const g = Qn(
1450
1485
  [
1451
1486
  F,
1452
- `${F}--${i ? `${l}-negative` : l}`,
1453
- `${F}--${p}`
1487
+ `${F}--${u ? `${c}-negative` : c}`,
1488
+ `${F}--${d}`
1454
1489
  ],
1455
1490
  {
1456
1491
  [`${F}--icon-only`]: a,
1457
- [`${F}--negative`]: i,
1492
+ [`${F}--negative`]: u,
1458
1493
  [`${F}--full-width`]: o,
1459
1494
  [`${F}--disabled`]: r || n
1460
1495
  },
1461
1496
  t
1462
- ), b = (g) => {
1463
- r || n ? g.preventDefault() : u && u(g);
1464
- }, c = !!v["aria-disabled"] || r || n;
1465
- return /* @__PURE__ */ T(
1497
+ ), b = (m) => {
1498
+ r || n ? m.preventDefault() : i && i(m);
1499
+ }, l = !!v["aria-disabled"] || r || n;
1500
+ return /* @__PURE__ */ $(
1466
1501
  "button",
1467
1502
  {
1468
- className: m,
1469
- type: f,
1503
+ className: g,
1504
+ type: p,
1470
1505
  ref: h,
1471
- "aria-disabled": c,
1506
+ "aria-disabled": l,
1472
1507
  onClick: b,
1473
1508
  ...v,
1474
1509
  children: [
1475
- n && /* @__PURE__ */ d(
1476
- zn,
1510
+ n && /* @__PURE__ */ f(
1511
+ Gn,
1477
1512
  {
1478
- size: p === Ln.LG ? "xs" : "xxs",
1479
- negative: i,
1480
- disabled: c
1513
+ size: d === Fn.LG ? "xs" : "xxs",
1514
+ negative: u,
1515
+ disabled: l
1481
1516
  }
1482
1517
  ),
1483
1518
  " ",
@@ -1487,25 +1522,25 @@ const Yn = /* @__PURE__ */ Kn(qn), Xn = {
1487
1522
  );
1488
1523
  }
1489
1524
  );
1490
- Ut.displayName = "Button";
1491
- function Qn(e) {
1525
+ Bt.displayName = "Button";
1526
+ function Jn(e) {
1492
1527
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1493
1528
  }
1494
- var Qe = { exports: {} };
1529
+ var Ye = { exports: {} };
1495
1530
  /*!
1496
1531
  Copyright (c) 2018 Jed Watson.
1497
1532
  Licensed under the MIT License (MIT), see
1498
1533
  http://jedwatson.github.io/classnames
1499
1534
  */
1500
- var Je;
1501
- function Jn() {
1502
- return Je || (Je = 1, function(e) {
1535
+ var Xe;
1536
+ function eo() {
1537
+ return Xe || (Xe = 1, (function(e) {
1503
1538
  (function() {
1504
1539
  var t = {}.hasOwnProperty;
1505
1540
  function r() {
1506
- for (var n = "", i = 0; i < arguments.length; i++) {
1507
- var u = arguments[i];
1508
- u && (n = a(n, o(u)));
1541
+ for (var n = "", u = 0; u < arguments.length; u++) {
1542
+ var i = arguments[u];
1543
+ i && (n = a(n, o(i)));
1509
1544
  }
1510
1545
  return n;
1511
1546
  }
@@ -1518,20 +1553,20 @@ function Jn() {
1518
1553
  return r.apply(null, n);
1519
1554
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
1520
1555
  return n.toString();
1521
- var i = "";
1522
- for (var u in n)
1523
- t.call(n, u) && n[u] && (i = a(i, u));
1524
- return i;
1556
+ var u = "";
1557
+ for (var i in n)
1558
+ t.call(n, i) && n[i] && (u = a(u, i));
1559
+ return u;
1525
1560
  }
1526
- function a(n, i) {
1527
- return i ? n ? n + " " + i : n + i : n;
1561
+ function a(n, u) {
1562
+ return u ? n ? n + " " + u : n + u : n;
1528
1563
  }
1529
1564
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1530
1565
  })();
1531
- }(Qe)), Qe.exports;
1566
+ })(Ye)), Ye.exports;
1532
1567
  }
1533
- var eo = Jn();
1534
- const to = /* @__PURE__ */ Qn(eo), te = {
1568
+ var to = eo();
1569
+ const ro = /* @__PURE__ */ Jn(to), re = {
1535
1570
  "purpur-heading": "_purpur-heading_vo751_1",
1536
1571
  "purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
1537
1572
  "purpur-heading--negative": "_purpur-heading--negative_vo751_11",
@@ -1551,47 +1586,47 @@ const to = /* @__PURE__ */ Qn(eo), te = {
1551
1586
  "purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
1552
1587
  "purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
1553
1588
  "purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
1554
- }, ro = {
1589
+ }, no = {
1555
1590
  TITLE100: "title-100"
1556
- }, re = "purpur-heading", Vt = ({
1591
+ }, ne = "purpur-heading", jt = ({
1557
1592
  children: e,
1558
1593
  className: t = "",
1559
1594
  enableHyphenation: r = !1,
1560
1595
  negative: o = !1,
1561
1596
  tag: a,
1562
- variant: n = ro.TITLE100,
1563
- ...i
1597
+ variant: n = no.TITLE100,
1598
+ ...u
1564
1599
  }) => {
1565
- const u = a, p = to([
1600
+ const i = a, d = ro([
1566
1601
  t,
1567
- te[re],
1568
- te[`${re}--${n}`],
1602
+ re[ne],
1603
+ re[`${ne}--${n}`],
1569
1604
  {
1570
- [te[`${re}--hyphens`]]: r,
1571
- [te[`${re}--negative`]]: o
1605
+ [re[`${ne}--hyphens`]]: r,
1606
+ [re[`${ne}--negative`]]: o
1572
1607
  }
1573
1608
  ]);
1574
- return /* @__PURE__ */ d(u, { className: p, ...i, children: e });
1609
+ return /* @__PURE__ */ f(i, { className: d, ...u, children: e });
1575
1610
  };
1576
- Vt.displayName = "Heading";
1577
- function no(e) {
1611
+ jt.displayName = "Heading";
1612
+ function oo(e) {
1578
1613
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1579
1614
  }
1580
- var et = { exports: {} };
1615
+ var Ze = { exports: {} };
1581
1616
  /*!
1582
1617
  Copyright (c) 2018 Jed Watson.
1583
1618
  Licensed under the MIT License (MIT), see
1584
1619
  http://jedwatson.github.io/classnames
1585
1620
  */
1586
- var tt;
1587
- function oo() {
1588
- return tt || (tt = 1, function(e) {
1621
+ var Qe;
1622
+ function ao() {
1623
+ return Qe || (Qe = 1, (function(e) {
1589
1624
  (function() {
1590
1625
  var t = {}.hasOwnProperty;
1591
1626
  function r() {
1592
- for (var n = "", i = 0; i < arguments.length; i++) {
1593
- var u = arguments[i];
1594
- u && (n = a(n, o.call(this, u)));
1627
+ for (var n = "", u = 0; u < arguments.length; u++) {
1628
+ var i = arguments[u];
1629
+ i && (n = a(n, o.call(this, i)));
1595
1630
  }
1596
1631
  return n;
1597
1632
  }
@@ -1604,20 +1639,20 @@ function oo() {
1604
1639
  return r.apply(this, n);
1605
1640
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
1606
1641
  return n.toString();
1607
- var i = "";
1608
- for (var u in n)
1609
- t.call(n, u) && n[u] && (i = a(i, this && this[u] || u));
1610
- return i;
1642
+ var u = "";
1643
+ for (var i in n)
1644
+ t.call(n, i) && n[i] && (u = a(u, this && this[i] || i));
1645
+ return u;
1611
1646
  }
1612
- function a(n, i) {
1613
- return i ? n ? n + " " + i : n + i : n;
1647
+ function a(n, u) {
1648
+ return u ? n ? n + " " + u : n + u : n;
1614
1649
  }
1615
1650
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1616
1651
  })();
1617
- }(et)), et.exports;
1652
+ })(Ze)), Ze.exports;
1618
1653
  }
1619
- var ao = oo();
1620
- const io = /* @__PURE__ */ no(ao), uo = {
1654
+ var io = ao();
1655
+ const uo = /* @__PURE__ */ oo(io), so = {
1621
1656
  "purpur-icon": "_purpur-icon_8u1lq_1",
1622
1657
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
1623
1658
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -1625,47 +1660,47 @@ const io = /* @__PURE__ */ no(ao), uo = {
1625
1660
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1626
1661
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1627
1662
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1628
- }, so = io.bind(uo), rt = "purpur-icon", co = "md", lo = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), po = ({ content: e = "", title: t } = {}) => {
1663
+ }, co = uo.bind(so), Je = "purpur-icon", lo = "md", po = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), fo = ({ content: e = "", title: t } = {}) => {
1629
1664
  const r = [
1630
1665
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1631
1666
  { name: "fill", value: "currentColor" },
1632
1667
  { name: "viewBox", value: "0 0 24 24" },
1633
1668
  t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1634
1669
  ], o = t ? `<title>${t}</title>` : "";
1635
- return `<svg ${lo(r)}>${o}${e}</svg>`;
1636
- }, fo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ht = ({ svg: e, allyTitle: t, className: r, size: o = co, ...a }) => {
1637
- const n = po({
1638
- content: fo(e.svg),
1670
+ return `<svg ${po(r)}>${o}${e}</svg>`;
1671
+ }, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ut = ({ svg: e, allyTitle: t, className: r, size: o = lo, ...a }) => {
1672
+ const n = fo({
1673
+ content: vo(e.svg),
1639
1674
  title: t
1640
- }), i = so(r, rt, `${rt}--${o}`);
1641
- return /* @__PURE__ */ d("span", { className: i, dangerouslySetInnerHTML: { __html: n }, ...a });
1675
+ }), u = co(r, Je, `${Je}--${o}`);
1676
+ return /* @__PURE__ */ f("span", { className: u, dangerouslySetInnerHTML: { __html: n }, ...a });
1642
1677
  };
1643
- Ht.displayName = "Icon";
1644
- const vo = {
1678
+ Ut.displayName = "Icon";
1679
+ const ho = {
1645
1680
  name: "close",
1646
1681
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
1647
1682
  keywords: ["close"],
1648
1683
  category: "utility"
1649
- }, zt = (e) => /* @__PURE__ */ d(Ht, { ...e, svg: vo });
1650
- zt.displayName = "IconClose";
1651
- function ho(e) {
1684
+ }, Vt = (e) => /* @__PURE__ */ f(Ut, { ...e, svg: ho });
1685
+ Vt.displayName = "IconClose";
1686
+ function mo(e) {
1652
1687
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1653
1688
  }
1654
- var nt = { exports: {} };
1689
+ var et = { exports: {} };
1655
1690
  /*!
1656
1691
  Copyright (c) 2018 Jed Watson.
1657
1692
  Licensed under the MIT License (MIT), see
1658
1693
  http://jedwatson.github.io/classnames
1659
1694
  */
1660
- var ot;
1695
+ var tt;
1661
1696
  function go() {
1662
- return ot || (ot = 1, function(e) {
1697
+ return tt || (tt = 1, (function(e) {
1663
1698
  (function() {
1664
1699
  var t = {}.hasOwnProperty;
1665
1700
  function r() {
1666
- for (var n = "", i = 0; i < arguments.length; i++) {
1667
- var u = arguments[i];
1668
- u && (n = a(n, o.call(this, u)));
1701
+ for (var n = "", u = 0; u < arguments.length; u++) {
1702
+ var i = arguments[u];
1703
+ i && (n = a(n, o.call(this, i)));
1669
1704
  }
1670
1705
  return n;
1671
1706
  }
@@ -1678,20 +1713,20 @@ function go() {
1678
1713
  return r.apply(this, n);
1679
1714
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
1680
1715
  return n.toString();
1681
- var i = "";
1682
- for (var u in n)
1683
- t.call(n, u) && n[u] && (i = a(i, this && this[u] || u));
1684
- return i;
1716
+ var u = "";
1717
+ for (var i in n)
1718
+ t.call(n, i) && n[i] && (u = a(u, this && this[i] || i));
1719
+ return u;
1685
1720
  }
1686
- function a(n, i) {
1687
- return i ? n ? n + " " + i : n + i : n;
1721
+ function a(n, u) {
1722
+ return u ? n ? n + " " + u : n + u : n;
1688
1723
  }
1689
1724
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1690
1725
  })();
1691
- }(nt)), nt.exports;
1726
+ })(et)), et.exports;
1692
1727
  }
1693
- var mo = go();
1694
- const _o = /* @__PURE__ */ ho(mo), yo = {
1728
+ var _o = go();
1729
+ const yo = /* @__PURE__ */ mo(_o), bo = {
1695
1730
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
1696
1731
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
1697
1732
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -1706,84 +1741,90 @@ const _o = /* @__PURE__ */ ho(mo), yo = {
1706
1741
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
1707
1742
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
1708
1743
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
1709
- }, bo = _o.bind(yo), wo = {
1744
+ }, wo = yo.bind(bo), Eo = {
1710
1745
  PARAGRAPH100: "paragraph-100"
1711
- }, q = "purpur-paragraph", Kt = ({
1746
+ }, K = "purpur-paragraph", Ht = ({
1712
1747
  children: e,
1713
1748
  className: t,
1714
1749
  disabled: r,
1715
1750
  enableHyphenation: o = !1,
1716
1751
  negative: a = !1,
1717
- variant: n = wo.PARAGRAPH100,
1718
- ...i
1752
+ variant: n = Eo.PARAGRAPH100,
1753
+ ...u
1719
1754
  }) => {
1720
- const u = bo(t, q, `${q}--${n}`, {
1721
- [`${q}--hyphens`]: o,
1722
- [`${q}--disabled`]: r,
1723
- [`${q}--negative`]: a
1755
+ const i = wo(t, K, `${K}--${n}`, {
1756
+ [`${K}--hyphens`]: o,
1757
+ [`${K}--disabled`]: r,
1758
+ [`${K}--negative`]: a
1724
1759
  });
1725
- return /* @__PURE__ */ d("p", { ...i, className: u, children: e });
1760
+ return /* @__PURE__ */ f("p", { ...u, className: i, children: e });
1726
1761
  };
1727
- Kt.displayName = "Paragraph";
1728
- function at(e, t) {
1762
+ Ht.displayName = "Paragraph";
1763
+ function rt(e, t) {
1729
1764
  if (typeof e == "function")
1730
1765
  return e(t);
1731
1766
  e != null && (e.current = t);
1732
1767
  }
1733
- function Eo(...e) {
1768
+ function So(...e) {
1734
1769
  return (t) => {
1735
1770
  let r = !1;
1736
1771
  const o = e.map((a) => {
1737
- const n = at(a, t);
1772
+ const n = rt(a, t);
1738
1773
  return !r && typeof n == "function" && (r = !0), n;
1739
1774
  });
1740
1775
  if (r)
1741
1776
  return () => {
1742
1777
  for (let a = 0; a < o.length; a++) {
1743
1778
  const n = o[a];
1744
- typeof n == "function" ? n() : at(e[a], null);
1779
+ typeof n == "function" ? n() : rt(e[a], null);
1745
1780
  }
1746
1781
  };
1747
1782
  };
1748
1783
  }
1749
- var Gt = s.forwardRef((e, t) => {
1750
- const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(So);
1751
- if (n) {
1752
- const i = n.props.children, u = a.map((p) => p === n ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : p);
1753
- return /* @__PURE__ */ d(Ne, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
1754
- }
1755
- return /* @__PURE__ */ d(Ne, { ...o, ref: t, children: r });
1756
- });
1757
- Gt.displayName = "Slot";
1758
- var Ne = s.forwardRef((e, t) => {
1759
- const { children: r, ...o } = e;
1760
- if (s.isValidElement(r)) {
1761
- const a = Po(r), n = No(o, r.props);
1762
- return r.type !== s.Fragment && (n.ref = t ? Eo(t, a) : a), s.cloneElement(r, n);
1763
- }
1764
- return s.Children.count(r) > 1 ? s.Children.only(null) : null;
1765
- });
1766
- Ne.displayName = "SlotClone";
1767
- var Co = ({ children: e }) => /* @__PURE__ */ d(ae, { children: e });
1768
- function So(e) {
1769
- return s.isValidElement(e) && e.type === Co;
1784
+ // @__NO_SIDE_EFFECTS__
1785
+ function Co(e) {
1786
+ const t = /* @__PURE__ */ No(e), r = s.forwardRef((o, a) => {
1787
+ const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(Oo);
1788
+ if (d) {
1789
+ const c = d.props.children, p = i.map((v) => v === d ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : v);
1790
+ return /* @__PURE__ */ f(t, { ...u, ref: a, children: s.isValidElement(c) ? s.cloneElement(c, void 0, p) : null });
1791
+ }
1792
+ return /* @__PURE__ */ f(t, { ...u, ref: a, children: n });
1793
+ });
1794
+ return r.displayName = `${e}.Slot`, r;
1795
+ }
1796
+ // @__NO_SIDE_EFFECTS__
1797
+ function No(e) {
1798
+ const t = s.forwardRef((r, o) => {
1799
+ const { children: a, ...n } = r;
1800
+ if (s.isValidElement(a)) {
1801
+ const u = xo(a), i = Ro(n, a.props);
1802
+ return a.type !== s.Fragment && (i.ref = o ? So(o, u) : u), s.cloneElement(a, i);
1803
+ }
1804
+ return s.Children.count(a) > 1 ? s.Children.only(null) : null;
1805
+ });
1806
+ return t.displayName = `${e}.SlotClone`, t;
1770
1807
  }
1771
- function No(e, t) {
1808
+ var Po = Symbol("radix.slottable");
1809
+ function Oo(e) {
1810
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Po;
1811
+ }
1812
+ function Ro(e, t) {
1772
1813
  const r = { ...t };
1773
1814
  for (const o in t) {
1774
1815
  const a = e[o], n = t[o];
1775
- /^on[A-Z]/.test(o) ? a && n ? r[o] = (...i) => {
1776
- n(...i), a(...i);
1816
+ /^on[A-Z]/.test(o) ? a && n ? r[o] = (...u) => {
1817
+ n(...u), a(...u);
1777
1818
  } : a && (r[o] = a) : o === "style" ? r[o] = { ...a, ...n } : o === "className" && (r[o] = [a, n].filter(Boolean).join(" "));
1778
1819
  }
1779
1820
  return { ...e, ...r };
1780
1821
  }
1781
- function Po(e) {
1822
+ function xo(e) {
1782
1823
  var t, r;
1783
1824
  let o = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning;
1784
1825
  return a ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
1785
1826
  }
1786
- var Oo = [
1827
+ var Ao = [
1787
1828
  "a",
1788
1829
  "button",
1789
1830
  "div",
@@ -1800,15 +1841,15 @@ var Oo = [
1800
1841
  "span",
1801
1842
  "svg",
1802
1843
  "ul"
1803
- ], Ro = Oo.reduce((e, t) => {
1804
- const r = s.forwardRef((o, a) => {
1805
- const { asChild: n, ...i } = o, u = n ? Gt : t;
1806
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(u, { ...i, ref: a });
1844
+ ], Do = Ao.reduce((e, t) => {
1845
+ const r = /* @__PURE__ */ Co(`Primitive.${t}`), o = s.forwardRef((a, n) => {
1846
+ const { asChild: u, ...i } = a, d = u ? r : t;
1847
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(d, { ...i, ref: n });
1807
1848
  });
1808
- return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
1809
- }, {}), xo = "VisuallyHidden", qt = s.forwardRef(
1810
- (e, t) => /* @__PURE__ */ d(
1811
- Ro.span,
1849
+ return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
1850
+ }, {}), $o = "VisuallyHidden", zt = s.forwardRef(
1851
+ (e, t) => /* @__PURE__ */ f(
1852
+ Do.span,
1812
1853
  {
1813
1854
  ...e,
1814
1855
  ref: t,
@@ -1829,10 +1870,10 @@ var Oo = [
1829
1870
  }
1830
1871
  )
1831
1872
  );
1832
- qt.displayName = xo;
1833
- var Ao = qt;
1834
- const Do = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ d(Ao, { asChild: e, ...r, children: t });
1835
- function To(e) {
1873
+ zt.displayName = $o;
1874
+ var To = zt;
1875
+ const Mo = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(To, { asChild: e, ...r, children: t });
1876
+ function Io(e) {
1836
1877
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1837
1878
  }
1838
1879
  var _e = { exports: {} };
@@ -1841,15 +1882,15 @@ var _e = { exports: {} };
1841
1882
  Licensed under the MIT License (MIT), see
1842
1883
  http://jedwatson.github.io/classnames
1843
1884
  */
1844
- var it;
1845
- function $o() {
1846
- return it || (it = 1, function(e) {
1885
+ var nt;
1886
+ function Lo() {
1887
+ return nt || (nt = 1, (function(e) {
1847
1888
  (function() {
1848
1889
  var t = {}.hasOwnProperty;
1849
1890
  function r() {
1850
- for (var n = "", i = 0; i < arguments.length; i++) {
1851
- var u = arguments[i];
1852
- u && (n = a(n, o.call(this, u)));
1891
+ for (var n = "", u = 0; u < arguments.length; u++) {
1892
+ var i = arguments[u];
1893
+ i && (n = a(n, o.call(this, i)));
1853
1894
  }
1854
1895
  return n;
1855
1896
  }
@@ -1862,22 +1903,22 @@ function $o() {
1862
1903
  return r.apply(this, n);
1863
1904
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
1864
1905
  return n.toString();
1865
- var i = "";
1866
- for (var u in n)
1867
- t.call(n, u) && n[u] && (i = a(i, this && this[u] || u));
1868
- return i;
1906
+ var u = "";
1907
+ for (var i in n)
1908
+ t.call(n, i) && n[i] && (u = a(u, this && this[i] || i));
1909
+ return u;
1869
1910
  }
1870
- function a(n, i) {
1871
- return i ? n ? n + " " + i : n + i : n;
1911
+ function a(n, u) {
1912
+ return u ? n ? n + " " + u : n + u : n;
1872
1913
  }
1873
1914
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1874
1915
  })();
1875
- }(_e)), _e.exports;
1916
+ })(_e)), _e.exports;
1876
1917
  }
1877
- var Mo = $o();
1878
- const Io = /* @__PURE__ */ To(Mo), Lo = "_fadeIn_4aird_1", Fo = {
1918
+ var Fo = Lo();
1919
+ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
1879
1920
  "purpur-modal-content": "_purpur-modal-content_4aird_1",
1880
- fadeIn: Lo,
1921
+ fadeIn: Wo,
1881
1922
  "purpur-modal-content__overlay": "_purpur-modal-content__overlay_4aird_30",
1882
1923
  "purpur-modal-content__close-button": "_purpur-modal-content__close-button_4aird_37",
1883
1924
  "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_4aird_47",
@@ -1895,7 +1936,7 @@ const Io = /* @__PURE__ */ To(Mo), Lo = "_fadeIn_4aird_1", Fo = {
1895
1936
  "purpur-modal-content__actions": "_purpur-modal-content__actions_4aird_123",
1896
1937
  "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_4aird_175",
1897
1938
  "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_4aird_185"
1898
- }, ut = (e) => e.showCloseButton === !0, O = Io.bind(Fo), N = "purpur-modal-content", ko = Pe(
1939
+ }, ot = (e) => e.showCloseButton === !0, O = ko.bind(Bo), N = "purpur-modal-content", jo = Ce(
1899
1940
  ({
1900
1941
  ["data-testid"]: e,
1901
1942
  actions: t,
@@ -1903,129 +1944,129 @@ const Io = /* @__PURE__ */ To(Mo), Lo = "_fadeIn_4aird_1", Fo = {
1903
1944
  className: o,
1904
1945
  description: a,
1905
1946
  disableCloseOnClickOutside: n,
1906
- hideDescription: i,
1907
- image: u,
1908
- stickyButtons: p = !0,
1909
- title: l,
1910
- notification: f = void 0,
1947
+ hideDescription: u,
1948
+ image: i,
1949
+ stickyButtons: d = !0,
1950
+ title: c,
1951
+ notification: p = void 0,
1911
1952
  zIndex: v,
1912
1953
  onCloseAutoFocus: h,
1913
- ...m
1954
+ ...g
1914
1955
  }, b) => {
1915
- const { closeButtonAriaLabel: c, showCloseButton: g, ..._ } = m, [S, w] = ye(!1), [E, C] = ye(0), P = be(null), y = be(null), x = O(
1956
+ const { closeButtonAriaLabel: l, showCloseButton: m, ..._ } = g, [w, E] = ye(!1), [S, C] = ye(0), P = be(null), y = be(null), x = O(
1916
1957
  N,
1917
- { [`${N}--with-image`]: !!u },
1918
- { [`${N}--overflow`]: S },
1919
- { [`${N}--sticky-footer`]: p },
1958
+ { [`${N}--with-image`]: !!i },
1959
+ { [`${N}--overflow`]: w },
1960
+ { [`${N}--sticky-footer`]: d },
1920
1961
  o
1921
- ), R = (D) => e ? `${e} ${D}` : void 0, K = (D) => {
1962
+ ), R = (D) => e ? `${e} ${D}` : void 0, z = (D) => {
1922
1963
  n && D.preventDefault();
1923
- }, j = Qt(() => {
1964
+ }, B = Yt(() => {
1924
1965
  if (!P.current || !y.current)
1925
1966
  return;
1926
- const D = window.getComputedStyle(P.current, null), Y = parseFloat(D.getPropertyValue("height")), Zt = y.current.offsetHeight;
1927
- w(Y < Zt), C(
1967
+ const D = window.getComputedStyle(P.current, null), X = parseFloat(D.getPropertyValue("height")), qt = y.current.offsetHeight;
1968
+ E(X < qt), C(
1928
1969
  (P.current.offsetWidth ?? 0) - (P.current.clientWidth ?? 0)
1929
1970
  );
1930
- }, []), Yt = () => {
1971
+ }, []), Gt = () => {
1931
1972
  const D = y.current;
1932
1973
  if (D) {
1933
- const Y = D.querySelector("h2");
1934
- Y && setTimeout(() => {
1935
- Y.focus();
1974
+ const X = D.querySelector("h2");
1975
+ X && setTimeout(() => {
1976
+ X.focus();
1936
1977
  });
1937
1978
  }
1938
- }, Xt = (D) => {
1939
- n && !g && D.preventDefault();
1979
+ }, Kt = (D) => {
1980
+ n && !m && D.preventDefault();
1940
1981
  };
1941
- return we(() => (window.addEventListener("resize", j), () => {
1942
- window.removeEventListener("resize", j);
1943
- }), [j]), we(() => {
1944
- j();
1945
- }, [f, r, j]), /* @__PURE__ */ T(Dn, { children: [
1946
- /* @__PURE__ */ d(Tn, { className: O(`${N}__overlay`), style: { zIndex: v } }),
1947
- /* @__PURE__ */ T(
1948
- $n,
1982
+ return we(() => (window.addEventListener("resize", B), () => {
1983
+ window.removeEventListener("resize", B);
1984
+ }), [B]), we(() => {
1985
+ B();
1986
+ }, [p, r, B]), /* @__PURE__ */ $($n, { children: [
1987
+ /* @__PURE__ */ f(Tn, { className: O(`${N}__overlay`), style: { zIndex: v } }),
1988
+ /* @__PURE__ */ $(
1989
+ Mn,
1949
1990
  {
1950
1991
  ..._,
1951
1992
  className: x,
1952
1993
  "data-testid": e,
1953
1994
  ref: b,
1954
1995
  ...!a && { "aria-describedby": void 0 },
1955
- onPointerDownOutside: K,
1996
+ onPointerDownOutside: z,
1956
1997
  onOpenAutoFocus: () => {
1957
- j(), Yt();
1998
+ B(), Gt();
1958
1999
  },
1959
- onEscapeKeyDown: Xt,
2000
+ onEscapeKeyDown: Kt,
1960
2001
  onCloseAutoFocus: h,
1961
2002
  style: { zIndex: `calc(${v} + 1)` },
1962
2003
  children: [
1963
- /* @__PURE__ */ T("div", { ref: P, className: O(`${N}__wrapper`), children: [
1964
- ut(m) && c && u && /* @__PURE__ */ d(
1965
- st,
2004
+ /* @__PURE__ */ $("div", { ref: P, className: O(`${N}__wrapper`), children: [
2005
+ ot(g) && l && i && /* @__PURE__ */ f(
2006
+ at,
1966
2007
  {
1967
- "aria-label": c,
2008
+ "aria-label": l,
1968
2009
  hasImage: !0,
1969
- scrollbarWidth: E,
2010
+ scrollbarWidth: S,
1970
2011
  "data-testid": R("close-button")
1971
2012
  }
1972
2013
  ),
1973
- /* @__PURE__ */ T("div", { ref: y, className: O(`${N}__wrapper-inner`), children: [
1974
- /* @__PURE__ */ T("div", { className: O(`${N}__header`), children: [
1975
- ut(m) && c && !u && /* @__PURE__ */ d(
1976
- st,
2014
+ /* @__PURE__ */ $("div", { ref: y, className: O(`${N}__wrapper-inner`), children: [
2015
+ /* @__PURE__ */ $("div", { className: O(`${N}__header`), children: [
2016
+ ot(g) && l && !i && /* @__PURE__ */ f(
2017
+ at,
1977
2018
  {
1978
- "aria-label": c,
2019
+ "aria-label": l,
1979
2020
  "data-testid": R("close-button")
1980
2021
  }
1981
2022
  ),
1982
- /* @__PURE__ */ d(
1983
- Mn,
2023
+ /* @__PURE__ */ f(
2024
+ In,
1984
2025
  {
1985
2026
  asChild: !0,
1986
2027
  className: O(`${N}__title`),
1987
2028
  "data-testid": R("title"),
1988
- children: /* @__PURE__ */ d(Vt, { tag: "h2", variant: "title-200", tabIndex: -1, children: l })
2029
+ children: /* @__PURE__ */ f(jt, { tag: "h2", variant: "title-200", tabIndex: -1, children: c })
1989
2030
  }
1990
2031
  )
1991
2032
  ] }),
1992
- u && /* @__PURE__ */ d(
2033
+ i && /* @__PURE__ */ f(
1993
2034
  "div",
1994
2035
  {
1995
2036
  className: O(`${N}__image-wrapper`),
1996
2037
  "data-testid": R("image"),
1997
- children: u
2038
+ children: i
1998
2039
  }
1999
2040
  ),
2000
- /* @__PURE__ */ d("div", { className: O(`${N}__body`), children: /* @__PURE__ */ T("div", { className: O(`${N}__body-inner`), children: [
2001
- a && i && /* @__PURE__ */ d(Do, { asChild: !0, children: /* @__PURE__ */ d(Ke, { "data-testid": R("description"), children: a }) }),
2002
- a && !i && /* @__PURE__ */ d(
2003
- Ke,
2041
+ /* @__PURE__ */ f("div", { className: O(`${N}__body`), children: /* @__PURE__ */ $("div", { className: O(`${N}__body-inner`), children: [
2042
+ a && u && /* @__PURE__ */ f(Mo, { asChild: !0, children: /* @__PURE__ */ f(Ve, { "data-testid": R("description"), children: a }) }),
2043
+ a && !u && /* @__PURE__ */ f(
2044
+ Ve,
2004
2045
  {
2005
2046
  asChild: !0,
2006
2047
  className: O(`${N}__description`),
2007
2048
  "data-testid": R("description"),
2008
- children: /* @__PURE__ */ d(Kt, { variant: "paragraph-100", children: a })
2049
+ children: /* @__PURE__ */ f(Ht, { variant: "paragraph-100", children: a })
2009
2050
  }
2010
2051
  ),
2011
- /* @__PURE__ */ d("div", { children: r }),
2012
- !p && /* @__PURE__ */ d(ct, { actions: t, notification: f })
2052
+ /* @__PURE__ */ f("div", { children: r }),
2053
+ !d && /* @__PURE__ */ f(it, { actions: t, notification: p })
2013
2054
  ] }) })
2014
2055
  ] })
2015
2056
  ] }),
2016
- p && /* @__PURE__ */ d(ct, { actions: t, notification: f })
2057
+ d && /* @__PURE__ */ f(it, { actions: t, notification: p })
2017
2058
  ]
2018
2059
  }
2019
2060
  )
2020
2061
  ] });
2021
2062
  }
2022
- ), st = ({
2063
+ ), at = ({
2023
2064
  ["aria-label"]: e,
2024
2065
  hasImage: t,
2025
2066
  scrollbarWidth: r,
2026
2067
  ["data-testid"]: o
2027
- }) => /* @__PURE__ */ d(In, { asChild: !0, children: /* @__PURE__ */ d(
2028
- Ut,
2068
+ }) => /* @__PURE__ */ f(Ln, { asChild: !0, children: /* @__PURE__ */ f(
2069
+ Bt,
2029
2070
  {
2030
2071
  variant: t ? "primary" : "tertiary-purple",
2031
2072
  negative: t,
@@ -2035,9 +2076,9 @@ const Io = /* @__PURE__ */ To(Mo), Lo = "_fadeIn_4aird_1", Fo = {
2035
2076
  className: O(`${N}__close-button`),
2036
2077
  style: { right: `calc(var(--purpur-spacing-100) + ${r || 0}px)` },
2037
2078
  "data-testid": o,
2038
- children: /* @__PURE__ */ d(zt, {})
2079
+ children: /* @__PURE__ */ f(Vt, {})
2039
2080
  }
2040
- ) }), ct = ({
2081
+ ) }), it = ({
2041
2082
  actions: e,
2042
2083
  notification: t
2043
2084
  }) => {
@@ -2045,23 +2086,23 @@ const Io = /* @__PURE__ */ To(Mo), Lo = "_fadeIn_4aird_1", Fo = {
2045
2086
  return we(() => {
2046
2087
  var o, a;
2047
2088
  t && ((a = (o = r == null ? void 0 : r.current) == null ? void 0 : o.scrollIntoView) == null || a.call(o, !1));
2048
- }, [t]), e ? /* @__PURE__ */ T("div", { className: O(`${N}__actions`), children: [
2049
- /* @__PURE__ */ d("div", { className: O(`${N}__actions-buttons`), "data-testid": "modal actions", children: e }),
2050
- t && /* @__PURE__ */ d("div", { className: O(`${N}__notification`), ref: r, children: t }),
2051
- /* @__PURE__ */ d("span", { className: O(`${N}__actions-separator`) })
2089
+ }, [t]), e ? /* @__PURE__ */ $("div", { className: O(`${N}__actions`), children: [
2090
+ /* @__PURE__ */ f("div", { className: O(`${N}__actions-buttons`), "data-testid": "modal actions", children: e }),
2091
+ t && /* @__PURE__ */ f("div", { className: O(`${N}__notification`), ref: r, children: t }),
2092
+ /* @__PURE__ */ f("span", { className: O(`${N}__actions-separator`) })
2052
2093
  ] }) : null;
2053
- }, Wo = Pe(
2054
- ({ children: e, ...t }, r) => /* @__PURE__ */ d(An, { asChild: !0, ref: r, ...t, children: e })
2055
- ), Te = ({
2094
+ }, Uo = Ce(
2095
+ ({ children: e, ...t }, r) => /* @__PURE__ */ f(Dn, { asChild: !0, ref: r, ...t, children: e })
2096
+ ), Re = ({
2056
2097
  ["data-testid"]: e,
2057
2098
  children: t,
2058
2099
  open: r,
2059
2100
  onOpenChange: o
2060
- }) => /* @__PURE__ */ d(xn, { open: r, onOpenChange: o, "data-testid": e, children: t });
2061
- Te.Trigger = Wo;
2062
- Te.Content = ko;
2063
- Te.displayName = "Modal";
2101
+ }) => /* @__PURE__ */ f(An, { open: r, onOpenChange: o, "data-testid": e, children: t });
2102
+ Re.Trigger = Uo;
2103
+ Re.Content = jo;
2104
+ Re.displayName = "Modal";
2064
2105
  export {
2065
- Te as Modal
2106
+ Re as Modal
2066
2107
  };
2067
2108
  //# sourceMappingURL=modal.es.js.map