@sps-woodland/focused-task 8.24.0 → 8.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { Metadata as Le, cl as Y, combineEventHandlers as $e, useChildTestIdAttrBuilder as nt, selectChildren as rt, contentOf as he } from "@sps-woodland/core";
2
- import { Button as ot } from "@sps-woodland/buttons";
3
- import * as p from "react";
4
- import h, { useRef as w, useCallback as S, useState as z, useContext as W, useEffect as P, useMemo as K, createContext as at } from "react";
5
- import it from "react-dom";
6
- import { code as ge } from "@spscommerce/utils";
7
- const g = typeof document < "u" ? h.useLayoutEffect : () => {
1
+ import { Metadata as Le, cl as X, combineEventHandlers as $e, useChildTestIdAttrBuilder as Ze, selectChildren as et, contentOf as he } from "@sps-woodland/core";
2
+ import { Button as tt } from "@sps-woodland/buttons";
3
+ import * as f from "react";
4
+ import h, { useRef as y, useCallback as S, useState as j, useContext as A, useEffect as P, useMemo as H, createContext as nt } from "react";
5
+ import rt from "react-dom";
6
+ import { code as Ee } from "@spscommerce/utils";
7
+ const E = typeof document < "u" ? h.useLayoutEffect : () => {
8
8
  };
9
- function q(e) {
10
- const t = w(null);
11
- return g(() => {
9
+ function K(e) {
10
+ const t = y(null);
11
+ return E(() => {
12
12
  t.current = e;
13
13
  }, [
14
14
  e
@@ -17,8 +17,8 @@ function q(e) {
17
17
  return r == null ? void 0 : r(...n);
18
18
  }, []);
19
19
  }
20
- function lt(e) {
21
- let [t, n] = z(e), r = w(null), o = q(() => {
20
+ function ot(e) {
21
+ let [t, n] = j(e), r = y(null), o = K(() => {
22
22
  if (!r.current) return;
23
23
  let a = r.current.next();
24
24
  if (a.done) {
@@ -27,10 +27,10 @@ function lt(e) {
27
27
  }
28
28
  t === a.value ? o() : n(a.value);
29
29
  });
30
- g(() => {
30
+ E(() => {
31
31
  r.current && o();
32
32
  });
33
- let i = q((a) => {
33
+ let i = K((a) => {
34
34
  r.current = a(t), o();
35
35
  });
36
36
  return [
@@ -38,13 +38,13 @@ function lt(e) {
38
38
  i
39
39
  ];
40
40
  }
41
- const Q = {
41
+ const Y = {
42
42
  prefix: String(Math.round(Math.random() * 1e10)),
43
43
  current: 0
44
- }, Ce = /* @__PURE__ */ h.createContext(Q), st = /* @__PURE__ */ h.createContext(!1);
45
- let ut = !!(typeof window < "u" && window.document && window.document.createElement), oe = /* @__PURE__ */ new WeakMap();
46
- function ct(e = !1) {
47
- let t = W(Ce), n = w(null);
44
+ }, Ce = /* @__PURE__ */ h.createContext(Y), at = /* @__PURE__ */ h.createContext(!1);
45
+ let it = !!(typeof window < "u" && window.document && window.document.createElement), oe = /* @__PURE__ */ new WeakMap();
46
+ function lt(e = !1) {
47
+ let t = A(Ce), n = y(null);
48
48
  if (n.current === null && !e) {
49
49
  var r, o;
50
50
  let i = (o = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
@@ -59,41 +59,41 @@ function ct(e = !1) {
59
59
  }
60
60
  return n.current;
61
61
  }
62
- function dt(e) {
63
- let t = W(Ce);
64
- t === Q && !ut && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
65
- let n = ct(!!e), r = t === Q && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
62
+ function st(e) {
63
+ let t = A(Ce);
64
+ t === Y && !it && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
65
+ let n = lt(!!e), r = t === Y && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
66
66
  return e || `${r}-${n}`;
67
67
  }
68
- function ft(e) {
69
- let t = h.useId(), [n] = z(_e()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Q.prefix}`;
68
+ function ct(e) {
69
+ let t = h.useId(), [n] = j(_e()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Y.prefix}`;
70
70
  return e || `${r}-${t}`;
71
71
  }
72
- const pt = typeof h.useId == "function" ? ft : dt;
73
- function bt() {
72
+ const ut = typeof h.useId == "function" ? ct : st;
73
+ function dt() {
74
74
  return !1;
75
75
  }
76
- function mt() {
76
+ function ft() {
77
77
  return !0;
78
78
  }
79
- function vt(e) {
79
+ function pt(e) {
80
80
  return () => {
81
81
  };
82
82
  }
83
83
  function _e() {
84
- return typeof h.useSyncExternalStore == "function" ? h.useSyncExternalStore(vt, bt, mt) : W(st);
84
+ return typeof h.useSyncExternalStore == "function" ? h.useSyncExternalStore(pt, dt, ft) : A(at);
85
85
  }
86
- let $t = !!(typeof window < "u" && window.document && window.document.createElement), L = /* @__PURE__ */ new Map();
86
+ let vt = !!(typeof window < "u" && window.document && window.document.createElement), L = /* @__PURE__ */ new Map();
87
87
  function Oe(e) {
88
- let [t, n] = z(e), r = w(null), o = pt(t), i = S((a) => {
88
+ let [t, n] = j(e), r = y(null), o = ut(t), i = S((a) => {
89
89
  r.current = a;
90
90
  }, []);
91
- return $t && (L.has(o) && !L.get(o).includes(i) ? L.set(o, [
91
+ return vt && (L.has(o) && !L.get(o).includes(i) ? L.set(o, [
92
92
  ...L.get(o),
93
93
  i
94
94
  ]) : L.set(o, [
95
95
  i
96
- ])), g(() => {
96
+ ])), E(() => {
97
97
  let a = o;
98
98
  return () => {
99
99
  L.delete(a);
@@ -105,7 +105,7 @@ function Oe(e) {
105
105
  a && (r.current = null, n(a));
106
106
  }), o;
107
107
  }
108
- function ht(e, t) {
108
+ function bt(e, t) {
109
109
  if (e === t) return e;
110
110
  let n = L.get(e);
111
111
  if (n)
@@ -113,8 +113,8 @@ function ht(e, t) {
113
113
  let r = L.get(t);
114
114
  return r ? (r.forEach((o) => o(e)), e) : t;
115
115
  }
116
- function gt(e = []) {
117
- let t = Oe(), [n, r] = lt(t), o = S(() => {
116
+ function mt(e = []) {
117
+ let t = Oe(), [n, r] = ot(t), o = S(() => {
118
118
  r(function* () {
119
119
  yield t, yield document.getElementById(t) ? t : void 0;
120
120
  });
@@ -122,21 +122,21 @@ function gt(e = []) {
122
122
  t,
123
123
  r
124
124
  ]);
125
- return g(o, [
125
+ return E(o, [
126
126
  t,
127
127
  o,
128
128
  ...e
129
129
  ]), n;
130
130
  }
131
- function Z(...e) {
131
+ function Q(...e) {
132
132
  return (...t) => {
133
133
  for (let n of e) typeof n == "function" && n(...t);
134
134
  };
135
135
  }
136
- const E = (e) => {
136
+ const g = (e) => {
137
137
  var t;
138
138
  return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
139
- }, ee = (e) => e && "window" in e && e.window === e ? e : E(e).defaultView || window;
139
+ }, Z = (e) => e && "window" in e && e.window === e ? e : g(e).defaultView || window;
140
140
  function Me(e) {
141
141
  var t, n, r = "";
142
142
  if (typeof e == "string" || typeof e == "number") r += e;
@@ -146,11 +146,11 @@ function Me(e) {
146
146
  } else for (n in e) e[n] && (r && (r += " "), r += n);
147
147
  return r;
148
148
  }
149
- function Et() {
149
+ function $t() {
150
150
  for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Me(e)) && (r && (r += " "), r += t);
151
151
  return r;
152
152
  }
153
- function wt(...e) {
153
+ function ht(...e) {
154
154
  let t = {
155
155
  ...e[0]
156
156
  };
@@ -161,19 +161,19 @@ function wt(...e) {
161
161
  typeof i == "function" && typeof a == "function" && // This is a lot faster than a regex.
162
162
  o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= /* 'A' */
163
163
  65 && o.charCodeAt(2) <= /* 'Z' */
164
- 90 ? t[o] = Z(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = Et(i, a) : o === "id" && i && a ? t.id = ht(i, a) : t[o] = a !== void 0 ? a : i;
164
+ 90 ? t[o] = Q(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = $t(i, a) : o === "id" && i && a ? t.id = bt(i, a) : t[o] = a !== void 0 ? a : i;
165
165
  }
166
166
  }
167
167
  return t;
168
168
  }
169
- const yt = /* @__PURE__ */ new Set([
169
+ const Et = /* @__PURE__ */ new Set([
170
170
  "id"
171
- ]), Tt = /* @__PURE__ */ new Set([
171
+ ]), gt = /* @__PURE__ */ new Set([
172
172
  "aria-label",
173
173
  "aria-labelledby",
174
174
  "aria-describedby",
175
175
  "aria-details"
176
- ]), xt = /* @__PURE__ */ new Set([
176
+ ]), wt = /* @__PURE__ */ new Set([
177
177
  "href",
178
178
  "hrefLang",
179
179
  "target",
@@ -181,37 +181,37 @@ const yt = /* @__PURE__ */ new Set([
181
181
  "download",
182
182
  "ping",
183
183
  "referrerPolicy"
184
- ]), kt = /^(data-.*)$/;
185
- function St(e, t = {}) {
184
+ ]), yt = /^(data-.*)$/;
185
+ function Tt(e, t = {}) {
186
186
  let { labelable: n, isLink: r, propNames: o } = t, i = {};
187
- for (const a in e) Object.prototype.hasOwnProperty.call(e, a) && (yt.has(a) || n && Tt.has(a) || r && xt.has(a) || o != null && o.has(a) || kt.test(a)) && (i[a] = e[a]);
187
+ for (const a in e) Object.prototype.hasOwnProperty.call(e, a) && (Et.has(a) || n && gt.has(a) || r && wt.has(a) || o != null && o.has(a) || yt.test(a)) && (i[a] = e[a]);
188
188
  return i;
189
189
  }
190
- function Ee(e) {
191
- if (Nt()) e.focus({
190
+ function ge(e) {
191
+ if (xt()) e.focus({
192
192
  preventScroll: !0
193
193
  });
194
194
  else {
195
- let t = Ft(e);
196
- e.focus(), Pt(t);
195
+ let t = kt(e);
196
+ e.focus(), St(t);
197
197
  }
198
198
  }
199
- let G = null;
200
- function Nt() {
201
- if (G == null) {
202
- G = !1;
199
+ let U = null;
200
+ function xt() {
201
+ if (U == null) {
202
+ U = !1;
203
203
  try {
204
204
  document.createElement("div").focus({
205
205
  get preventScroll() {
206
- return G = !0, !0;
206
+ return U = !0, !0;
207
207
  }
208
208
  });
209
209
  } catch {
210
210
  }
211
211
  }
212
- return G;
212
+ return U;
213
213
  }
214
- function Ft(e) {
214
+ function kt(e) {
215
215
  let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
216
216
  for (; t instanceof HTMLElement && t !== r; )
217
217
  (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
@@ -225,11 +225,11 @@ function Ft(e) {
225
225
  scrollLeft: r.scrollLeft
226
226
  }), n;
227
227
  }
228
- function Pt(e) {
228
+ function St(e) {
229
229
  for (let { element: t, scrollTop: n, scrollLeft: r } of e)
230
230
  t.scrollTop = n, t.scrollLeft = r;
231
231
  }
232
- function De(e) {
232
+ function Nt(e) {
233
233
  var t;
234
234
  return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((n) => e.test(n.brand))) || e.test(window.navigator.userAgent);
235
235
  }
@@ -237,25 +237,23 @@ function pe(e) {
237
237
  var t;
238
238
  return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
239
239
  }
240
- function I(e) {
240
+ function q(e) {
241
241
  let t = null;
242
242
  return () => (t == null && (t = e()), t);
243
243
  }
244
- const Ae = I(function() {
244
+ const De = q(function() {
245
245
  return pe(/^Mac/i);
246
- }), Lt = I(function() {
246
+ }), Ft = q(function() {
247
247
  return pe(/^iPhone/i);
248
- }), Ct = I(function() {
248
+ }), Pt = q(function() {
249
249
  return pe(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
250
- Ae() && navigator.maxTouchPoints > 1;
251
- }), _t = I(function() {
252
- return Lt() || Ct();
253
- }), Ot = I(function() {
254
- return De(/Chrome/i);
255
- }), We = I(function() {
256
- return De(/Android/i);
250
+ De() && navigator.maxTouchPoints > 1;
251
+ }), Lt = q(function() {
252
+ return Ft() || Pt();
253
+ }), Ct = q(function() {
254
+ return Nt(/Android/i);
257
255
  });
258
- let D = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new Set();
256
+ let M = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new Set();
259
257
  function we() {
260
258
  if (typeof window > "u") return;
261
259
  function e(r) {
@@ -263,14 +261,14 @@ function we() {
263
261
  }
264
262
  let t = (r) => {
265
263
  if (!e(r) || !r.target) return;
266
- let o = D.get(r.target);
267
- o || (o = /* @__PURE__ */ new Set(), D.set(r.target, o), r.target.addEventListener("transitioncancel", n, {
264
+ let o = M.get(r.target);
265
+ o || (o = /* @__PURE__ */ new Set(), M.set(r.target, o), r.target.addEventListener("transitioncancel", n, {
268
266
  once: !0
269
267
  })), o.add(r.propertyName);
270
268
  }, n = (r) => {
271
269
  if (!e(r) || !r.target) return;
272
- let o = D.get(r.target);
273
- if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), D.delete(r.target)), D.size === 0)) {
270
+ let o = M.get(r.target);
271
+ if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), M.delete(r.target)), M.size === 0)) {
274
272
  for (let i of le) i();
275
273
  le.clear();
276
274
  }
@@ -278,65 +276,64 @@ function we() {
278
276
  document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
279
277
  }
280
278
  typeof document < "u" && (document.readyState !== "loading" ? we() : document.addEventListener("DOMContentLoaded", we));
281
- function Mt(e) {
279
+ function _t(e) {
282
280
  requestAnimationFrame(() => {
283
- D.size === 0 ? e() : le.add(e);
281
+ M.size === 0 ? e() : le.add(e);
284
282
  });
285
283
  }
286
284
  function ye(e, t) {
287
- if (!e) return !1;
288
285
  let n = window.getComputedStyle(e), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
289
286
  return r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
290
287
  }
291
- function Ie(e, t) {
288
+ function Ae(e, t) {
292
289
  let n = e;
293
290
  for (ye(n, t) && (n = n.parentElement); n && !ye(n, t); ) n = n.parentElement;
294
291
  return n || document.scrollingElement || document.documentElement;
295
292
  }
296
- function Dt(e) {
297
- return e.mozInputSource === 0 && e.isTrusted ? !0 : We() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
293
+ function Ot(e) {
294
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Ct() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
298
295
  }
299
- function At(e, t, n) {
300
- let [r, o] = z(e || t), i = w(e !== void 0), a = e !== void 0;
296
+ function Mt(e, t, n) {
297
+ let [r, o] = j(e || t), i = y(e !== void 0), a = e !== void 0;
301
298
  P(() => {
302
299
  let l = i.current;
303
300
  l !== a && console.warn(`WARN: A component changed from ${l ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}.`), i.current = a;
304
301
  }, [
305
302
  a
306
303
  ]);
307
- let s = a ? e : r, c = S((l, ...u) => {
308
- let d = (f, ...m) => {
309
- n && (Object.is(s, f) || n(f, ...m)), a || (s = f);
304
+ let c = a ? e : r, u = S((l, ...s) => {
305
+ let d = (p, ...b) => {
306
+ n && (Object.is(c, p) || n(p, ...b)), a || (c = p);
310
307
  };
311
- typeof l == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), o((m, ...b) => {
312
- let k = l(a ? s : m, ...b);
313
- return d(k, ...u), a ? m : k;
314
- })) : (a || o(l), d(l, ...u));
308
+ typeof l == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), o((b, ...v) => {
309
+ let k = l(a ? c : b, ...v);
310
+ return d(k, ...s), a ? b : k;
311
+ })) : (a || o(l), d(l, ...s));
315
312
  }, [
316
313
  a,
317
- s,
314
+ c,
318
315
  n
319
316
  ]);
320
317
  return [
321
- s,
322
- c
318
+ c,
319
+ u
323
320
  ];
324
321
  }
325
- const Re = h.createContext({
322
+ const We = h.createContext({
326
323
  register: () => {
327
324
  }
328
325
  });
329
- Re.displayName = "PressResponderContext";
330
- function Wt({ children: e }) {
331
- let t = K(() => ({
326
+ We.displayName = "PressResponderContext";
327
+ function Dt({ children: e }) {
328
+ let t = H(() => ({
332
329
  register: () => {
333
330
  }
334
331
  }), []);
335
- return /* @__PURE__ */ h.createElement(Re.Provider, {
332
+ return /* @__PURE__ */ h.createElement(We.Provider, {
336
333
  value: t
337
334
  }, e);
338
335
  }
339
- class It {
336
+ class At {
340
337
  isDefaultPrevented() {
341
338
  return this.nativeEvent.defaultPrevented;
342
339
  }
@@ -355,25 +352,25 @@ class It {
355
352
  this.nativeEvent = n, this.target = n.target, this.currentTarget = n.currentTarget, this.relatedTarget = n.relatedTarget, this.bubbles = n.bubbles, this.cancelable = n.cancelable, this.defaultPrevented = n.defaultPrevented, this.eventPhase = n.eventPhase, this.isTrusted = n.isTrusted, this.timeStamp = n.timeStamp, this.type = t;
356
353
  }
357
354
  }
358
- function Rt(e) {
359
- let t = w({
355
+ function Wt(e) {
356
+ let t = y({
360
357
  isFocused: !1,
361
358
  observer: null
362
359
  });
363
- g(() => {
360
+ E(() => {
364
361
  const r = t.current;
365
362
  return () => {
366
363
  r.observer && (r.observer.disconnect(), r.observer = null);
367
364
  };
368
365
  }, []);
369
- let n = q((r) => {
366
+ let n = K((r) => {
370
367
  e == null || e(r);
371
368
  });
372
369
  return S((r) => {
373
370
  if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
374
371
  t.current.isFocused = !0;
375
372
  let o = r.target, i = (a) => {
376
- t.current.isFocused = !1, o.disabled && n(new It("blur", a)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
373
+ t.current.isFocused = !1, o.disabled && n(new At("blur", a)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
377
374
  };
378
375
  o.addEventListener("focusout", i, {
379
376
  once: !0
@@ -381,12 +378,12 @@ function Rt(e) {
381
378
  if (t.current.isFocused && o.disabled) {
382
379
  var a;
383
380
  (a = t.current.observer) === null || a === void 0 || a.disconnect();
384
- let s = o === document.activeElement ? null : document.activeElement;
381
+ let c = o === document.activeElement ? null : document.activeElement;
385
382
  o.dispatchEvent(new FocusEvent("blur", {
386
- relatedTarget: s
383
+ relatedTarget: c
387
384
  })), o.dispatchEvent(new FocusEvent("focusout", {
388
385
  bubbles: !0,
389
- relatedTarget: s
386
+ relatedTarget: c
390
387
  }));
391
388
  }
392
389
  }), t.current.observer.observe(o, {
@@ -400,59 +397,59 @@ function Rt(e) {
400
397
  n
401
398
  ]);
402
399
  }
403
- let U = null, Bt = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Map(), M = !1, se = !1;
404
- function be(e, t) {
405
- for (let n of Bt) n(e, t);
400
+ let z = null, It = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Map(), O = !1, se = !1;
401
+ function ve(e, t) {
402
+ for (let n of It) n(e, t);
406
403
  }
407
- function Ht(e) {
408
- return !(e.metaKey || !Ae() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
404
+ function Bt(e) {
405
+ return !(e.metaKey || !De() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
409
406
  }
410
- function te(e) {
411
- M = !0, Ht(e) && (U = "keyboard", be("keyboard", e));
407
+ function ee(e) {
408
+ O = !0, Bt(e) && (z = "keyboard", ve("keyboard", e));
412
409
  }
413
- function T(e) {
414
- U = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (M = !0, be("pointer", e));
410
+ function x(e) {
411
+ z = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (O = !0, ve("pointer", e));
415
412
  }
416
- function Be(e) {
417
- Dt(e) && (M = !0, U = "virtual");
413
+ function Ie(e) {
414
+ Ot(e) && (O = !0, z = "virtual");
418
415
  }
419
- function He(e) {
420
- e.target === window || e.target === document || (!M && !se && (U = "virtual", be("virtual", e)), M = !1, se = !1);
416
+ function Be(e) {
417
+ e.target === window || e.target === document || (!O && !se && (z = "virtual", ve("virtual", e)), O = !1, se = !1);
421
418
  }
422
- function Ve() {
423
- M = !1, se = !0;
419
+ function Re() {
420
+ O = !1, se = !0;
424
421
  }
425
422
  function Te(e) {
426
- if (typeof window > "u" || j.get(ee(e))) return;
427
- const t = ee(e), n = E(e);
423
+ if (typeof window > "u" || V.get(Z(e))) return;
424
+ const t = Z(e), n = g(e);
428
425
  let r = t.HTMLElement.prototype.focus;
429
426
  t.HTMLElement.prototype.focus = function() {
430
- M = !0, r.apply(this, arguments);
431
- }, n.addEventListener("keydown", te, !0), n.addEventListener("keyup", te, !0), n.addEventListener("click", Be, !0), t.addEventListener("focus", He, !0), t.addEventListener("blur", Ve, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", T, !0), n.addEventListener("pointermove", T, !0), n.addEventListener("pointerup", T, !0)) : (n.addEventListener("mousedown", T, !0), n.addEventListener("mousemove", T, !0), n.addEventListener("mouseup", T, !0)), t.addEventListener("beforeunload", () => {
432
- Ke(e);
427
+ O = !0, r.apply(this, arguments);
428
+ }, n.addEventListener("keydown", ee, !0), n.addEventListener("keyup", ee, !0), n.addEventListener("click", Ie, !0), t.addEventListener("focus", Be, !0), t.addEventListener("blur", Re, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", x, !0), n.addEventListener("pointermove", x, !0), n.addEventListener("pointerup", x, !0)) : (n.addEventListener("mousedown", x, !0), n.addEventListener("mousemove", x, !0), n.addEventListener("mouseup", x, !0)), t.addEventListener("beforeunload", () => {
429
+ He(e);
433
430
  }, {
434
431
  once: !0
435
- }), j.set(t, {
432
+ }), V.set(t, {
436
433
  focus: r
437
434
  });
438
435
  }
439
- const Ke = (e, t) => {
440
- const n = ee(e), r = E(e);
441
- t && r.removeEventListener("DOMContentLoaded", t), j.has(n) && (n.HTMLElement.prototype.focus = j.get(n).focus, r.removeEventListener("keydown", te, !0), r.removeEventListener("keyup", te, !0), r.removeEventListener("click", Be, !0), n.removeEventListener("focus", He, !0), n.removeEventListener("blur", Ve, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", T, !0), r.removeEventListener("pointermove", T, !0), r.removeEventListener("pointerup", T, !0)) : (r.removeEventListener("mousedown", T, !0), r.removeEventListener("mousemove", T, !0), r.removeEventListener("mouseup", T, !0)), j.delete(n));
436
+ const He = (e, t) => {
437
+ const n = Z(e), r = g(e);
438
+ t && r.removeEventListener("DOMContentLoaded", t), V.has(n) && (n.HTMLElement.prototype.focus = V.get(n).focus, r.removeEventListener("keydown", ee, !0), r.removeEventListener("keyup", ee, !0), r.removeEventListener("click", Ie, !0), n.removeEventListener("focus", Be, !0), n.removeEventListener("blur", Re, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", x, !0), r.removeEventListener("pointermove", x, !0), r.removeEventListener("pointerup", x, !0)) : (r.removeEventListener("mousedown", x, !0), r.removeEventListener("mousemove", x, !0), r.removeEventListener("mouseup", x, !0)), V.delete(n));
442
439
  };
443
- function Vt(e) {
444
- const t = E(e);
440
+ function Rt(e) {
441
+ const t = g(e);
445
442
  let n;
446
443
  return t.readyState !== "loading" ? Te(e) : (n = () => {
447
444
  Te(e);
448
- }, t.addEventListener("DOMContentLoaded", n)), () => Ke(e, n);
445
+ }, t.addEventListener("DOMContentLoaded", n)), () => He(e, n);
449
446
  }
450
- typeof document < "u" && Vt();
451
- function je() {
452
- return U;
447
+ typeof document < "u" && Rt();
448
+ function Ht() {
449
+ return z;
453
450
  }
454
- function Kt(e) {
455
- let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = w({
451
+ function Vt(e) {
452
+ let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = y({
456
453
  isFocusWithin: !1
457
454
  }), a = S((l) => {
458
455
  i.current.isFocusWithin && !l.currentTarget.contains(l.relatedTarget) && (i.current.isFocusWithin = !1, n && n(l), o && o(!1));
@@ -460,12 +457,12 @@ function Kt(e) {
460
457
  n,
461
458
  o,
462
459
  i
463
- ]), s = Rt(a), c = S((l) => {
464
- !i.current.isFocusWithin && document.activeElement === l.target && (r && r(l), o && o(!0), i.current.isFocusWithin = !0, s(l));
460
+ ]), c = Wt(a), u = S((l) => {
461
+ !i.current.isFocusWithin && document.activeElement === l.target && (r && r(l), o && o(!0), i.current.isFocusWithin = !0, c(l));
465
462
  }, [
466
463
  r,
467
464
  o,
468
- s
465
+ c
469
466
  ]);
470
467
  return t ? {
471
468
  focusWithinProps: {
@@ -475,49 +472,49 @@ function Kt(e) {
475
472
  }
476
473
  } : {
477
474
  focusWithinProps: {
478
- onFocus: c,
475
+ onFocus: u,
479
476
  onBlur: a
480
477
  }
481
478
  };
482
479
  }
483
- function jt(e) {
484
- let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, i = w({
480
+ function Kt(e) {
481
+ let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, i = y({
485
482
  isPointerDown: !1,
486
483
  ignoreEmulatedMouseEvents: !1
487
- }), a = q((c) => {
488
- n && J(c, t) && (o && o(c), i.current.isPointerDown = !0);
489
- }), s = q((c) => {
490
- n && n(c);
484
+ }), a = K((u) => {
485
+ n && G(u, t) && (o && o(u), i.current.isPointerDown = !0);
486
+ }), c = K((u) => {
487
+ n && n(u);
491
488
  });
492
489
  P(() => {
493
- let c = i.current;
490
+ let u = i.current;
494
491
  if (r) return;
495
- const l = t.current, u = E(l);
492
+ const l = t.current, s = g(l);
496
493
  if (typeof PointerEvent < "u") {
497
- let d = (f) => {
498
- c.isPointerDown && J(f, t) && s(f), c.isPointerDown = !1;
494
+ let d = (p) => {
495
+ u.isPointerDown && G(p, t) && c(p), u.isPointerDown = !1;
499
496
  };
500
- return u.addEventListener("pointerdown", a, !0), u.addEventListener("pointerup", d, !0), () => {
501
- u.removeEventListener("pointerdown", a, !0), u.removeEventListener("pointerup", d, !0);
497
+ return s.addEventListener("pointerdown", a, !0), s.addEventListener("pointerup", d, !0), () => {
498
+ s.removeEventListener("pointerdown", a, !0), s.removeEventListener("pointerup", d, !0);
502
499
  };
503
500
  } else {
504
- let d = (m) => {
505
- c.ignoreEmulatedMouseEvents ? c.ignoreEmulatedMouseEvents = !1 : c.isPointerDown && J(m, t) && s(m), c.isPointerDown = !1;
506
- }, f = (m) => {
507
- c.ignoreEmulatedMouseEvents = !0, c.isPointerDown && J(m, t) && s(m), c.isPointerDown = !1;
501
+ let d = (b) => {
502
+ u.ignoreEmulatedMouseEvents ? u.ignoreEmulatedMouseEvents = !1 : u.isPointerDown && G(b, t) && c(b), u.isPointerDown = !1;
503
+ }, p = (b) => {
504
+ u.ignoreEmulatedMouseEvents = !0, u.isPointerDown && G(b, t) && c(b), u.isPointerDown = !1;
508
505
  };
509
- return u.addEventListener("mousedown", a, !0), u.addEventListener("mouseup", d, !0), u.addEventListener("touchstart", a, !0), u.addEventListener("touchend", f, !0), () => {
510
- u.removeEventListener("mousedown", a, !0), u.removeEventListener("mouseup", d, !0), u.removeEventListener("touchstart", a, !0), u.removeEventListener("touchend", f, !0);
506
+ return s.addEventListener("mousedown", a, !0), s.addEventListener("mouseup", d, !0), s.addEventListener("touchstart", a, !0), s.addEventListener("touchend", p, !0), () => {
507
+ s.removeEventListener("mousedown", a, !0), s.removeEventListener("mouseup", d, !0), s.removeEventListener("touchstart", a, !0), s.removeEventListener("touchend", p, !0);
511
508
  };
512
509
  }
513
510
  }, [
514
511
  t,
515
512
  r,
516
513
  a,
517
- s
514
+ c
518
515
  ]);
519
516
  }
520
- function J(e, t) {
517
+ function G(e, t) {
521
518
  if (e.button > 0) return !1;
522
519
  if (e.target) {
523
520
  const n = e.target.ownerDocument;
@@ -525,88 +522,88 @@ function J(e, t) {
525
522
  }
526
523
  return t.current && !t.current.contains(e.target);
527
524
  }
528
- function ue(e) {
529
- const t = E(e);
530
- if (je() === "virtual") {
525
+ function ce(e) {
526
+ const t = g(e);
527
+ if (Ht() === "virtual") {
531
528
  let n = t.activeElement;
532
- Mt(() => {
533
- t.activeElement === n && e.isConnected && Ee(e);
529
+ _t(() => {
530
+ t.activeElement === n && e.isConnected && ge(e);
534
531
  });
535
- } else Ee(e);
532
+ } else ge(e);
536
533
  }
537
- function qt(e) {
538
- const t = ee(e);
534
+ function jt(e) {
535
+ const t = Z(e);
539
536
  if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
540
537
  let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
541
538
  if (o) {
542
539
  const { getComputedStyle: i } = e.ownerDocument.defaultView;
543
- let { display: a, visibility: s } = i(e);
544
- o = a !== "none" && s !== "hidden" && s !== "collapse";
540
+ let { display: a, visibility: c } = i(e);
541
+ o = a !== "none" && c !== "hidden" && c !== "collapse";
545
542
  }
546
543
  return o;
547
544
  }
548
- function zt(e, t) {
545
+ function qt(e, t) {
549
546
  return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
550
547
  !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
551
548
  }
552
- function qe(e, t) {
553
- return e.nodeName !== "#comment" && qt(e) && zt(e, t) && (!e.parentElement || qe(e.parentElement, e));
549
+ function Ve(e, t) {
550
+ return e.nodeName !== "#comment" && jt(e) && qt(e, t) && (!e.parentElement || Ve(e.parentElement, e));
554
551
  }
555
- const xe = /* @__PURE__ */ h.createContext(null), ce = "react-aria-focus-scope-restore";
556
- let v = null;
557
- function Ut(e) {
558
- let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = w(null), a = w(null), s = w([]), { parentNode: c } = W(xe) || {}, l = K(() => new fe({
559
- scopeRef: s
552
+ const xe = /* @__PURE__ */ h.createContext(null), ue = "react-aria-focus-scope-restore";
553
+ let m = null;
554
+ function zt(e) {
555
+ let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = y(null), a = y(null), c = y([]), { parentNode: u } = A(xe) || {}, l = H(() => new fe({
556
+ scopeRef: c
560
557
  }), [
561
- s
558
+ c
562
559
  ]);
563
- g(() => {
564
- let f = c || $.root;
565
- if ($.getTreeNode(f.scopeRef) && v && !ne(v, f.scopeRef)) {
566
- let m = $.getTreeNode(v);
567
- m && (f = m);
560
+ E(() => {
561
+ let p = u || $.root;
562
+ if ($.getTreeNode(p.scopeRef) && m && !ne(m, p.scopeRef)) {
563
+ let b = $.getTreeNode(m);
564
+ b && (p = b);
568
565
  }
569
- f.addChild(l), $.addNode(l);
566
+ p.addChild(l), $.addNode(l);
570
567
  }, [
571
568
  l,
572
- c
573
- ]), g(() => {
574
- let f = $.getTreeNode(s);
575
- f && (f.contain = !!n);
569
+ u
570
+ ]), E(() => {
571
+ let p = $.getTreeNode(c);
572
+ p && (p.contain = !!n);
576
573
  }, [
577
574
  n
578
- ]), g(() => {
579
- var f;
580
- let m = (f = i.current) === null || f === void 0 ? void 0 : f.nextSibling, b = [], k = (R) => R.stopPropagation();
581
- for (; m && m !== a.current; )
582
- b.push(m), m.addEventListener(ce, k), m = m.nextSibling;
583
- return s.current = b, () => {
584
- for (let R of b) R.removeEventListener(ce, k);
575
+ ]), E(() => {
576
+ var p;
577
+ let b = (p = i.current) === null || p === void 0 ? void 0 : p.nextSibling, v = [], k = (W) => W.stopPropagation();
578
+ for (; b && b !== a.current; )
579
+ v.push(b), b.addEventListener(ue, k), b = b.nextSibling;
580
+ return c.current = v, () => {
581
+ for (let W of v) W.removeEventListener(ue, k);
585
582
  };
586
583
  }, [
587
584
  t
588
- ]), en(s, r, n), Yt(s, n), tn(s, r, n), Zt(s, o), P(() => {
589
- const f = E(s.current ? s.current[0] : void 0).activeElement;
590
- let m = null;
591
- if (x(f, s.current)) {
592
- for (let b of $.traverse()) b.scopeRef && x(f, b.scopeRef.current) && (m = b);
593
- m === $.getTreeNode(s) && (v = m.scopeRef);
585
+ ]), Zt(c, r, n), Xt(c, n), tn(c, r, n), Qt(c, o), P(() => {
586
+ const p = g(c.current ? c.current[0] : void 0).activeElement;
587
+ let b = null;
588
+ if (w(p, c.current)) {
589
+ for (let v of $.traverse()) v.scopeRef && w(p, v.scopeRef.current) && (b = v);
590
+ b === $.getTreeNode(c) && (m = b.scopeRef);
594
591
  }
595
592
  }, [
596
- s
597
- ]), g(() => () => {
598
- var f, m, b;
599
- let k = (b = (m = $.getTreeNode(s)) === null || m === void 0 || (f = m.parent) === null || f === void 0 ? void 0 : f.scopeRef) !== null && b !== void 0 ? b : null;
600
- (s === v || ne(s, v)) && (!k || $.getTreeNode(k)) && (v = k), $.removeTreeNode(s);
593
+ c
594
+ ]), E(() => () => {
595
+ var p, b, v;
596
+ let k = (v = (b = $.getTreeNode(c)) === null || b === void 0 || (p = b.parent) === null || p === void 0 ? void 0 : p.scopeRef) !== null && v !== void 0 ? v : null;
597
+ (c === m || ne(c, m)) && (!k || $.getTreeNode(k)) && (m = k), $.removeTreeNode(c);
601
598
  }, [
602
- s
599
+ c
603
600
  ]);
604
- let u = K(() => Gt(s), []), d = K(() => ({
605
- focusManager: u,
601
+ let s = H(() => Ut(c), []), d = H(() => ({
602
+ focusManager: s,
606
603
  parentNode: l
607
604
  }), [
608
605
  l,
609
- u
606
+ s
610
607
  ]);
611
608
  return /* @__PURE__ */ h.createElement(xe.Provider, {
612
609
  value: d
@@ -620,47 +617,47 @@ function Ut(e) {
620
617
  ref: a
621
618
  }));
622
619
  }
623
- function Gt(e) {
620
+ function Ut(e) {
624
621
  return {
625
622
  focusNext(t = {}) {
626
- let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, s = r || E(n[0]).activeElement, c = n[0].previousElementSibling, l = O(n), u = _(l, {
623
+ let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, c = r || g(n[0]).activeElement, u = n[0].previousElementSibling, l = _(n), s = C(l, {
627
624
  tabbable: o,
628
625
  accept: a
629
626
  }, n);
630
- u.currentNode = x(s, n) ? s : c;
631
- let d = u.nextNode();
632
- return !d && i && (u.currentNode = c, d = u.nextNode()), d && F(d, !0), d;
627
+ s.currentNode = w(c, n) ? c : u;
628
+ let d = s.nextNode();
629
+ return !d && i && (s.currentNode = u, d = s.nextNode()), d && F(d, !0), d;
633
630
  },
634
631
  focusPrevious(t = {}) {
635
- let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, s = r || E(n[0]).activeElement, c = n[n.length - 1].nextElementSibling, l = O(n), u = _(l, {
632
+ let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, c = r || g(n[0]).activeElement, u = n[n.length - 1].nextElementSibling, l = _(n), s = C(l, {
636
633
  tabbable: o,
637
634
  accept: a
638
635
  }, n);
639
- u.currentNode = x(s, n) ? s : c;
640
- let d = u.previousNode();
641
- return !d && i && (u.currentNode = c, d = u.previousNode()), d && F(d, !0), d;
636
+ s.currentNode = w(c, n) ? c : u;
637
+ let d = s.previousNode();
638
+ return !d && i && (s.currentNode = u, d = s.previousNode()), d && F(d, !0), d;
642
639
  },
643
640
  focusFirst(t = {}) {
644
- let n = e.current, { tabbable: r, accept: o } = t, i = O(n), a = _(i, {
641
+ let n = e.current, { tabbable: r, accept: o } = t, i = _(n), a = C(i, {
645
642
  tabbable: r,
646
643
  accept: o
647
644
  }, n);
648
645
  a.currentNode = n[0].previousElementSibling;
649
- let s = a.nextNode();
650
- return s && F(s, !0), s;
646
+ let c = a.nextNode();
647
+ return c && F(c, !0), c;
651
648
  },
652
649
  focusLast(t = {}) {
653
- let n = e.current, { tabbable: r, accept: o } = t, i = O(n), a = _(i, {
650
+ let n = e.current, { tabbable: r, accept: o } = t, i = _(n), a = C(i, {
654
651
  tabbable: r,
655
652
  accept: o
656
653
  }, n);
657
654
  a.currentNode = n[n.length - 1].nextElementSibling;
658
- let s = a.previousNode();
659
- return s && F(s, !0), s;
655
+ let c = a.previousNode();
656
+ return c && F(c, !0), c;
660
657
  }
661
658
  };
662
659
  }
663
- const me = [
660
+ const be = [
664
661
  "input:not([disabled]):not([type=hidden])",
665
662
  "select:not([disabled])",
666
663
  "textarea:not([disabled])",
@@ -673,79 +670,78 @@ const me = [
673
670
  "embed",
674
671
  "audio[controls]",
675
672
  "video[controls]",
676
- '[contenteditable]:not([contenteditable^="false"])'
677
- ], Jt = me.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
678
- me.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
679
- const Xt = me.join(':not([hidden]):not([tabindex="-1"]),');
680
- function O(e) {
673
+ "[contenteditable]"
674
+ ], Gt = be.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
675
+ be.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
676
+ const Jt = be.join(':not([hidden]):not([tabindex="-1"]),');
677
+ function _(e) {
681
678
  return e[0].parentElement;
682
679
  }
683
- function V(e) {
684
- let t = $.getTreeNode(v);
680
+ function R(e) {
681
+ let t = $.getTreeNode(m);
685
682
  for (; t && t.scopeRef !== e; ) {
686
683
  if (t.contain) return !1;
687
684
  t = t.parent;
688
685
  }
689
686
  return !0;
690
687
  }
691
- function Yt(e, t) {
692
- let n = w(void 0), r = w(void 0);
693
- g(() => {
688
+ function Xt(e, t) {
689
+ let n = y(void 0), r = y(void 0);
690
+ E(() => {
694
691
  let o = e.current;
695
692
  if (!t) {
696
693
  r.current && (cancelAnimationFrame(r.current), r.current = void 0);
697
694
  return;
698
695
  }
699
- const i = E(o ? o[0] : void 0);
696
+ const i = g(o ? o[0] : void 0);
700
697
  let a = (l) => {
701
- if (l.key !== "Tab" || l.altKey || l.ctrlKey || l.metaKey || !V(e) || l.isComposing) return;
702
- let u = i.activeElement, d = e.current;
703
- if (!d || !x(u, d)) return;
704
- let f = O(d), m = _(f, {
698
+ if (l.key !== "Tab" || l.altKey || l.ctrlKey || l.metaKey || !R(e) || l.isComposing) return;
699
+ let s = i.activeElement, d = e.current;
700
+ if (!d || !w(s, d)) return;
701
+ let p = _(d), b = C(p, {
705
702
  tabbable: !0
706
703
  }, d);
707
- if (!u) return;
708
- m.currentNode = u;
709
- let b = l.shiftKey ? m.previousNode() : m.nextNode();
710
- b || (m.currentNode = l.shiftKey ? d[d.length - 1].nextElementSibling : d[0].previousElementSibling, b = l.shiftKey ? m.previousNode() : m.nextNode()), l.preventDefault(), b && F(b, !0);
711
- }, s = (l) => {
712
- (!v || ne(v, e)) && x(l.target, e.current) ? (v = e, n.current = l.target) : V(e) && !C(l.target, e) ? n.current ? n.current.focus() : v && v.current && de(v.current) : V(e) && (n.current = l.target);
704
+ if (!s) return;
705
+ b.currentNode = s;
706
+ let v = l.shiftKey ? b.previousNode() : b.nextNode();
707
+ v || (b.currentNode = l.shiftKey ? d[d.length - 1].nextElementSibling : d[0].previousElementSibling, v = l.shiftKey ? b.previousNode() : b.nextNode()), l.preventDefault(), v && F(v, !0);
713
708
  }, c = (l) => {
709
+ (!m || ne(m, e)) && w(l.target, e.current) ? (m = e, n.current = l.target) : R(e) && !te(l.target, e) ? n.current ? n.current.focus() : m && m.current && de(m.current) : R(e) && (n.current = l.target);
710
+ }, u = (l) => {
714
711
  r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
715
- let u = je();
716
- if (!((u === "virtual" || u === null) && We() && Ot()) && i.activeElement && V(e) && !C(i.activeElement, e))
717
- if (v = e, i.body.contains(l.target)) {
718
- var f;
719
- n.current = l.target, (f = n.current) === null || f === void 0 || f.focus();
720
- } else v.current && de(v.current);
712
+ if (i.activeElement && R(e) && !te(i.activeElement, e))
713
+ if (m = e, i.body.contains(l.target)) {
714
+ var s;
715
+ n.current = l.target, (s = n.current) === null || s === void 0 || s.focus();
716
+ } else m.current && de(m.current);
721
717
  });
722
718
  };
723
- return i.addEventListener("keydown", a, !1), i.addEventListener("focusin", s, !1), o == null || o.forEach((l) => l.addEventListener("focusin", s, !1)), o == null || o.forEach((l) => l.addEventListener("focusout", c, !1)), () => {
724
- i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin", s, !1), o == null || o.forEach((l) => l.removeEventListener("focusin", s, !1)), o == null || o.forEach((l) => l.removeEventListener("focusout", c, !1));
719
+ return i.addEventListener("keydown", a, !1), i.addEventListener("focusin", c, !1), o == null || o.forEach((l) => l.addEventListener("focusin", c, !1)), o == null || o.forEach((l) => l.addEventListener("focusout", u, !1)), () => {
720
+ i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin", c, !1), o == null || o.forEach((l) => l.removeEventListener("focusin", c, !1)), o == null || o.forEach((l) => l.removeEventListener("focusout", u, !1));
725
721
  };
726
722
  }, [
727
723
  e,
728
724
  t
729
- ]), g(() => () => {
725
+ ]), E(() => () => {
730
726
  r.current && cancelAnimationFrame(r.current);
731
727
  }, [
732
728
  r
733
729
  ]);
734
730
  }
735
- function ze(e) {
736
- return C(e);
731
+ function Ke(e) {
732
+ return te(e);
737
733
  }
738
- function x(e, t) {
734
+ function w(e, t) {
739
735
  return !e || !t ? !1 : t.some((n) => n.contains(e));
740
736
  }
741
- function C(e, t = null) {
737
+ function te(e, t = null) {
742
738
  if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
743
739
  for (let { scopeRef: n } of $.traverse($.getTreeNode(t)))
744
- if (n && x(e, n.current)) return !0;
740
+ if (n && w(e, n.current)) return !0;
745
741
  return !1;
746
742
  }
747
- function Qt(e) {
748
- return C(e, v);
743
+ function Yt(e) {
744
+ return te(e, m);
749
745
  }
750
746
  function ne(e, t) {
751
747
  var n;
@@ -758,7 +754,7 @@ function ne(e, t) {
758
754
  }
759
755
  function F(e, t = !1) {
760
756
  if (e != null && !t) try {
761
- ue(e);
757
+ ce(e);
762
758
  } catch {
763
759
  }
764
760
  else if (e != null) try {
@@ -766,40 +762,40 @@ function F(e, t = !1) {
766
762
  } catch {
767
763
  }
768
764
  }
769
- function Ue(e, t = !0) {
770
- let n = e[0].previousElementSibling, r = O(e), o = _(r, {
765
+ function je(e, t = !0) {
766
+ let n = e[0].previousElementSibling, r = _(e), o = C(r, {
771
767
  tabbable: t
772
768
  }, e);
773
769
  o.currentNode = n;
774
770
  let i = o.nextNode();
775
- return t && !i && (r = O(e), o = _(r, {
771
+ return t && !i && (r = _(e), o = C(r, {
776
772
  tabbable: !1
777
773
  }, e), o.currentNode = n, i = o.nextNode()), i;
778
774
  }
779
775
  function de(e, t = !0) {
780
- F(Ue(e, t));
776
+ F(je(e, t));
781
777
  }
782
- function Zt(e, t) {
778
+ function Qt(e, t) {
783
779
  const n = h.useRef(t);
784
780
  P(() => {
785
781
  if (n.current) {
786
- v = e;
787
- const r = E(e.current ? e.current[0] : void 0);
788
- !x(r.activeElement, v.current) && e.current && de(e.current);
782
+ m = e;
783
+ const r = g(e.current ? e.current[0] : void 0);
784
+ !w(r.activeElement, m.current) && e.current && de(e.current);
789
785
  }
790
786
  n.current = !1;
791
787
  }, [
792
788
  e
793
789
  ]);
794
790
  }
795
- function en(e, t, n) {
796
- g(() => {
791
+ function Zt(e, t, n) {
792
+ E(() => {
797
793
  if (t || n) return;
798
794
  let r = e.current;
799
- const o = E(r ? r[0] : void 0);
795
+ const o = g(r ? r[0] : void 0);
800
796
  let i = (a) => {
801
- let s = a.target;
802
- x(s, e.current) ? v = e : ze(s) || (v = null);
797
+ let c = a.target;
798
+ w(c, e.current) ? m = e : Ke(c) || (m = null);
803
799
  };
804
800
  return o.addEventListener("focusin", i, !1), r == null || r.forEach((a) => a.addEventListener("focusin", i, !1)), () => {
805
801
  o.removeEventListener("focusin", i, !1), r == null || r.forEach((a) => a.removeEventListener("focusin", i, !1));
@@ -810,8 +806,8 @@ function en(e, t, n) {
810
806
  n
811
807
  ]);
812
808
  }
813
- function ke(e) {
814
- let t = $.getTreeNode(v);
809
+ function en(e) {
810
+ let t = $.getTreeNode(m);
815
811
  for (; t && t.scopeRef !== e; ) {
816
812
  if (t.nodeToRestore) return !1;
817
813
  t = t.parent;
@@ -819,40 +815,40 @@ function ke(e) {
819
815
  return (t == null ? void 0 : t.scopeRef) === e;
820
816
  }
821
817
  function tn(e, t, n) {
822
- const r = w(typeof document < "u" ? E(e.current ? e.current[0] : void 0).activeElement : null);
823
- g(() => {
818
+ const r = y(typeof document < "u" ? g(e.current ? e.current[0] : void 0).activeElement : null);
819
+ E(() => {
824
820
  let o = e.current;
825
- const i = E(o ? o[0] : void 0);
821
+ const i = g(o ? o[0] : void 0);
826
822
  if (!t || n) return;
827
823
  let a = () => {
828
- (!v || ne(v, e)) && x(i.activeElement, e.current) && (v = e);
824
+ (!m || ne(m, e)) && w(i.activeElement, e.current) && (m = e);
829
825
  };
830
- return i.addEventListener("focusin", a, !1), o == null || o.forEach((s) => s.addEventListener("focusin", a, !1)), () => {
831
- i.removeEventListener("focusin", a, !1), o == null || o.forEach((s) => s.removeEventListener("focusin", a, !1));
826
+ return i.addEventListener("focusin", a, !1), o == null || o.forEach((c) => c.addEventListener("focusin", a, !1)), () => {
827
+ i.removeEventListener("focusin", a, !1), o == null || o.forEach((c) => c.removeEventListener("focusin", a, !1));
832
828
  };
833
829
  }, [
834
830
  e,
835
831
  n
836
- ]), g(() => {
837
- const o = E(e.current ? e.current[0] : void 0);
832
+ ]), E(() => {
833
+ const o = g(e.current ? e.current[0] : void 0);
838
834
  if (!t) return;
839
835
  let i = (a) => {
840
- if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !V(e) || a.isComposing) return;
841
- let s = o.activeElement;
842
- if (!C(s, e) || !ke(e)) return;
843
- let c = $.getTreeNode(e);
844
- if (!c) return;
845
- let l = c.nodeToRestore, u = _(o.body, {
836
+ if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !R(e) || a.isComposing) return;
837
+ let c = o.activeElement;
838
+ if (!w(c, e.current)) return;
839
+ let u = $.getTreeNode(e);
840
+ if (!u) return;
841
+ let l = u.nodeToRestore, s = C(o.body, {
846
842
  tabbable: !0
847
843
  });
848
- u.currentNode = s;
849
- let d = a.shiftKey ? u.previousNode() : u.nextNode();
850
- if ((!l || !o.body.contains(l) || l === o.body) && (l = void 0, c.nodeToRestore = void 0), (!d || !C(d, e)) && l) {
851
- u.currentNode = l;
844
+ s.currentNode = c;
845
+ let d = a.shiftKey ? s.previousNode() : s.nextNode();
846
+ if ((!l || !o.body.contains(l) || l === o.body) && (l = void 0, u.nodeToRestore = void 0), (!d || !w(d, e.current)) && l) {
847
+ s.currentNode = l;
852
848
  do
853
- d = a.shiftKey ? u.previousNode() : u.nextNode();
854
- while (C(d, e));
855
- a.preventDefault(), a.stopPropagation(), d ? F(d, !0) : ze(l) ? F(l, !0) : s.blur();
849
+ d = a.shiftKey ? s.previousNode() : s.nextNode();
850
+ while (w(d, e.current));
851
+ a.preventDefault(), a.stopPropagation(), d ? F(d, !0) : Ke(l) ? F(l, !0) : c.blur();
856
852
  }
857
853
  };
858
854
  return n || o.addEventListener("keydown", i, !0), () => {
@@ -862,35 +858,36 @@ function tn(e, t, n) {
862
858
  e,
863
859
  t,
864
860
  n
865
- ]), g(() => {
866
- const o = E(e.current ? e.current[0] : void 0);
861
+ ]), E(() => {
862
+ const o = g(e.current ? e.current[0] : void 0);
867
863
  if (!t) return;
868
864
  let i = $.getTreeNode(e);
869
865
  if (i) {
870
866
  var a;
871
867
  return i.nodeToRestore = (a = r.current) !== null && a !== void 0 ? a : void 0, () => {
872
- let s = $.getTreeNode(e);
873
- if (!s) return;
874
- let c = s.nodeToRestore;
875
- if (t && c && (o.activeElement && C(o.activeElement, e) || o.activeElement === o.body && ke(e))) {
868
+ let c = $.getTreeNode(e);
869
+ if (!c) return;
870
+ let u = c.nodeToRestore;
871
+ if (t && u && // eslint-disable-next-line react-hooks/exhaustive-deps
872
+ (w(o.activeElement, e.current) || o.activeElement === o.body && en(e))) {
876
873
  let l = $.clone();
877
874
  requestAnimationFrame(() => {
878
875
  if (o.activeElement === o.body) {
879
- let u = l.getTreeNode(e);
880
- for (; u; ) {
881
- if (u.nodeToRestore && u.nodeToRestore.isConnected) {
882
- Se(u.nodeToRestore);
876
+ let s = l.getTreeNode(e);
877
+ for (; s; ) {
878
+ if (s.nodeToRestore && s.nodeToRestore.isConnected) {
879
+ ke(s.nodeToRestore);
883
880
  return;
884
881
  }
885
- u = u.parent;
882
+ s = s.parent;
886
883
  }
887
- for (u = l.getTreeNode(e); u; ) {
888
- if (u.scopeRef && u.scopeRef.current && $.getTreeNode(u.scopeRef)) {
889
- let d = Ue(u.scopeRef.current, !0);
890
- Se(d);
884
+ for (s = l.getTreeNode(e); s; ) {
885
+ if (s.scopeRef && s.scopeRef.current && $.getTreeNode(s.scopeRef)) {
886
+ let d = je(s.scopeRef.current, !0);
887
+ ke(d);
891
888
  return;
892
889
  }
893
- u = u.parent;
890
+ s = s.parent;
894
891
  }
895
892
  }
896
893
  });
@@ -902,22 +899,22 @@ function tn(e, t, n) {
902
899
  t
903
900
  ]);
904
901
  }
905
- function Se(e) {
906
- e.dispatchEvent(new CustomEvent(ce, {
902
+ function ke(e) {
903
+ e.dispatchEvent(new CustomEvent(ue, {
907
904
  bubbles: !0,
908
905
  cancelable: !0
909
906
  })) && F(e);
910
907
  }
911
- function _(e, t, n) {
912
- let r = t != null && t.tabbable ? Xt : Jt, o = E(e).createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
908
+ function C(e, t, n) {
909
+ let r = t != null && t.tabbable ? Jt : Gt, o = g(e).createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
913
910
  acceptNode(i) {
914
911
  var a;
915
- return !(t == null || (a = t.from) === null || a === void 0) && a.contains(i) ? NodeFilter.FILTER_REJECT : i.matches(r) && qe(i) && (!n || x(i, n)) && (!(t != null && t.accept) || t.accept(i)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
912
+ return !(t == null || (a = t.from) === null || a === void 0) && a.contains(i) ? NodeFilter.FILTER_REJECT : i.matches(r) && Ve(i) && (!n || w(i, n)) && (!(t != null && t.accept) || t.accept(i)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
916
913
  }
917
914
  });
918
915
  return t != null && t.from && (o.currentNode = t.from), o;
919
916
  }
920
- class ve {
917
+ class me {
921
918
  get size() {
922
919
  return this.fastMap.size;
923
920
  }
@@ -940,7 +937,7 @@ class ve {
940
937
  let n = this.fastMap.get(t);
941
938
  if (!n) return;
942
939
  let r = n.parent;
943
- for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && x(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
940
+ for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && w(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
944
941
  let o = n.children;
945
942
  r && (r.removeChild(n), o.size > 0 && o.forEach((i) => r && r.addChild(i))), this.fastMap.delete(n.scopeRef);
946
943
  }
@@ -950,7 +947,7 @@ class ve {
950
947
  }
951
948
  clone() {
952
949
  var t;
953
- let n = new ve();
950
+ let n = new me();
954
951
  var r;
955
952
  for (let o of this.traverse()) n.addTreeNode(o.scopeRef, (r = (t = o.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && r !== void 0 ? r : null, o.nodeToRestore);
956
953
  return n;
@@ -972,64 +969,66 @@ class fe {
972
969
  this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
973
970
  }
974
971
  }
975
- let $ = new ve();
972
+ let $ = new me();
976
973
  const nn = /* @__PURE__ */ new WeakMap(), N = [];
977
974
  function rn(e, t) {
978
- let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: s } = e;
975
+ let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: c } = e;
979
976
  P(() => (o && N.push(t), () => {
980
- let b = N.indexOf(t);
981
- b >= 0 && N.splice(b, 1);
977
+ let v = N.indexOf(t);
978
+ v >= 0 && N.splice(v, 1);
982
979
  }), [
983
980
  o,
984
981
  t
985
982
  ]);
986
- let c = () => {
983
+ let u = () => {
987
984
  N[N.length - 1] === t && n && n();
988
- }, l = (b) => {
989
- (!s || s(b.target)) && N[N.length - 1] === t && (b.stopPropagation(), b.preventDefault());
990
- }, u = (b) => {
991
- (!s || s(b.target)) && (N[N.length - 1] === t && (b.stopPropagation(), b.preventDefault()), c());
992
- }, d = (b) => {
993
- b.key === "Escape" && !a && !b.nativeEvent.isComposing && (b.stopPropagation(), b.preventDefault(), c());
985
+ }, l = (v) => {
986
+ (!c || c(v.target)) && N[N.length - 1] === t && (v.stopPropagation(), v.preventDefault());
987
+ }, s = (v) => {
988
+ (!c || c(v.target)) && (N[N.length - 1] === t && (v.stopPropagation(), v.preventDefault()), u());
989
+ }, d = (v) => {
990
+ v.key === "Escape" && !a && !v.nativeEvent.isComposing && (v.stopPropagation(), v.preventDefault(), u());
994
991
  };
995
- jt({
992
+ Kt({
996
993
  ref: t,
997
- onInteractOutside: i && o ? u : void 0,
994
+ onInteractOutside: i && o ? s : null,
998
995
  onInteractOutsideStart: l
999
996
  });
1000
- let { focusWithinProps: f } = Kt({
997
+ let { focusWithinProps: p } = Vt({
1001
998
  isDisabled: !r,
1002
- onBlurWithin: (b) => {
1003
- !b.relatedTarget || Qt(b.relatedTarget) || (!s || s(b.relatedTarget)) && (n == null || n());
999
+ onBlurWithin: (v) => {
1000
+ !v.relatedTarget || Yt(v.relatedTarget) || (!c || c(v.relatedTarget)) && n();
1004
1001
  }
1005
- }), m = (b) => {
1006
- b.target === b.currentTarget && b.preventDefault();
1002
+ }), b = (v) => {
1003
+ v.target === v.currentTarget && v.preventDefault();
1007
1004
  };
1008
1005
  return {
1009
1006
  overlayProps: {
1010
1007
  onKeyDown: d,
1011
- ...f
1008
+ ...p
1012
1009
  },
1013
1010
  underlayProps: {
1014
- onPointerDown: m
1011
+ onPointerDown: b
1015
1012
  }
1016
1013
  };
1017
1014
  }
1018
1015
  function on(e, t, n) {
1019
- let { isOpen: r } = t;
1016
+ let { type: r } = e, { isOpen: o } = t;
1020
1017
  P(() => {
1021
1018
  n && n.current && nn.set(n.current, t.close);
1022
1019
  });
1023
- let o, i = Oe();
1020
+ let i;
1021
+ r === "menu" ? i = !0 : r === "listbox" && (i = "listbox");
1022
+ let a = Oe();
1024
1023
  return {
1025
1024
  triggerProps: {
1026
- "aria-haspopup": o,
1027
- "aria-expanded": r,
1028
- "aria-controls": r ? i : void 0,
1025
+ "aria-haspopup": i,
1026
+ "aria-expanded": o,
1027
+ "aria-controls": o ? a : null,
1029
1028
  onPress: t.toggle
1030
1029
  },
1031
1030
  overlayProps: {
1032
- id: i
1031
+ id: a
1033
1032
  }
1034
1033
  };
1035
1034
  }
@@ -1044,127 +1043,130 @@ const ae = typeof document < "u" && window.visualViewport, an = /* @__PURE__ */
1044
1043
  "submit",
1045
1044
  "reset"
1046
1045
  ]);
1047
- let X = 0, ie;
1046
+ let J = 0, ie;
1048
1047
  function ln(e = {}) {
1049
1048
  let { isDisabled: t } = e;
1050
- g(() => {
1049
+ E(() => {
1051
1050
  if (!t)
1052
- return X++, X === 1 && (_t() ? ie = un() : ie = sn()), () => {
1053
- X--, X === 0 && ie();
1051
+ return J++, J === 1 && (Lt() ? ie = cn() : ie = sn()), () => {
1052
+ J--, J === 0 && ie();
1054
1053
  };
1055
1054
  }, [
1056
1055
  t
1057
1056
  ]);
1058
1057
  }
1059
1058
  function sn() {
1060
- return Z(A(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), A(document.documentElement, "overflow", "hidden"));
1059
+ return Q(D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"));
1061
1060
  }
1062
- function un() {
1061
+ function cn() {
1063
1062
  let e, t, n = (l) => {
1064
- e = Ie(l.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = A(e, "overscrollBehavior", "contain"));
1063
+ e = Ae(l.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = D(e, "overscrollBehavior", "contain"));
1065
1064
  }, r = (l) => {
1066
1065
  if (!e || e === document.documentElement || e === document.body) {
1067
1066
  l.preventDefault();
1068
1067
  return;
1069
1068
  }
1070
1069
  e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && l.preventDefault();
1071
- }, o = () => {
1072
- t && t();
1070
+ }, o = (l) => {
1071
+ let s = l.target;
1072
+ Ne(s) && s !== document.activeElement && (l.preventDefault(), c(), s.style.transform = "translateY(-2000px)", s.focus(), requestAnimationFrame(() => {
1073
+ s.style.transform = "";
1074
+ })), t && t();
1073
1075
  }, i = (l) => {
1074
- let u = l.target;
1075
- cn(u) && (s(), u.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1076
- u.style.transform = "", ae && (ae.height < window.innerHeight ? requestAnimationFrame(() => {
1077
- Ne(u);
1078
- }) : ae.addEventListener("resize", () => Ne(u), {
1076
+ let s = l.target;
1077
+ Ne(s) && (c(), s.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1078
+ s.style.transform = "", ae && (ae.height < window.innerHeight ? requestAnimationFrame(() => {
1079
+ Se(s);
1080
+ }) : ae.addEventListener("resize", () => Se(s), {
1079
1081
  once: !0
1080
1082
  }));
1081
1083
  }));
1082
- }, a = null, s = () => {
1084
+ }, a = null, c = () => {
1083
1085
  if (a) return;
1084
1086
  let l = () => {
1085
1087
  window.scrollTo(0, 0);
1086
- }, u = window.pageXOffset, d = window.pageYOffset;
1087
- a = Z(B(window, "scroll", l), A(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), A(document.documentElement, "overflow", "hidden"), A(document.body, "marginTop", `-${d}px`), () => {
1088
- window.scrollTo(u, d);
1088
+ }, s = window.pageXOffset, d = window.pageYOffset;
1089
+ a = Q(I(window, "scroll", l), D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"), D(document.body, "marginTop", `-${d}px`), () => {
1090
+ window.scrollTo(s, d);
1089
1091
  }), window.scrollTo(0, 0);
1090
- }, c = Z(B(document, "touchstart", n, {
1092
+ }, u = Q(I(document, "touchstart", n, {
1091
1093
  passive: !1,
1092
1094
  capture: !0
1093
- }), B(document, "touchmove", r, {
1095
+ }), I(document, "touchmove", r, {
1094
1096
  passive: !1,
1095
1097
  capture: !0
1096
- }), B(document, "touchend", o, {
1098
+ }), I(document, "touchend", o, {
1097
1099
  passive: !1,
1098
1100
  capture: !0
1099
- }), B(document, "focus", i, !0));
1101
+ }), I(document, "focus", i, !0));
1100
1102
  return () => {
1101
- t == null || t(), a == null || a(), c();
1103
+ t == null || t(), a == null || a(), u();
1102
1104
  };
1103
1105
  }
1104
- function A(e, t, n) {
1106
+ function D(e, t, n) {
1105
1107
  let r = e.style[t];
1106
1108
  return e.style[t] = n, () => {
1107
1109
  e.style[t] = r;
1108
1110
  };
1109
1111
  }
1110
- function B(e, t, n, r) {
1112
+ function I(e, t, n, r) {
1111
1113
  return e.addEventListener(t, n, r), () => {
1112
1114
  e.removeEventListener(t, n, r);
1113
1115
  };
1114
1116
  }
1115
- function Ne(e) {
1116
- let t = document.scrollingElement || document.documentElement, n = e;
1117
- for (; n && n !== t; ) {
1118
- let r = Ie(n);
1119
- if (r !== document.documentElement && r !== document.body && r !== n) {
1120
- let o = r.getBoundingClientRect().top, i = n.getBoundingClientRect().top;
1121
- i > o + n.clientHeight && (r.scrollTop += i - o);
1117
+ function Se(e) {
1118
+ let t = document.scrollingElement || document.documentElement;
1119
+ for (; e && e !== t; ) {
1120
+ let n = Ae(e);
1121
+ if (n !== document.documentElement && n !== document.body && n !== e) {
1122
+ let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top;
1123
+ o > r + e.clientHeight && (n.scrollTop += o - r);
1122
1124
  }
1123
- n = r.parentElement;
1125
+ e = n.parentElement;
1124
1126
  }
1125
1127
  }
1126
- function cn(e) {
1128
+ function Ne(e) {
1127
1129
  return e instanceof HTMLInputElement && !an.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1128
1130
  }
1129
- let H = /* @__PURE__ */ new WeakMap(), y = [];
1130
- function dn(e, t = document.body) {
1131
- let n = new Set(e), r = /* @__PURE__ */ new Set(), o = (c) => {
1132
- for (let f of c.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) n.add(f);
1133
- let l = (f) => {
1134
- if (n.has(f) || f.parentElement && r.has(f.parentElement) && f.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
1135
- for (let m of n)
1136
- if (f.contains(m)) return NodeFilter.FILTER_SKIP;
1131
+ let B = /* @__PURE__ */ new WeakMap(), T = [];
1132
+ function un(e, t = document.body) {
1133
+ let n = new Set(e), r = /* @__PURE__ */ new Set(), o = (u) => {
1134
+ for (let p of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) n.add(p);
1135
+ let l = (p) => {
1136
+ if (n.has(p) || r.has(p.parentElement) && p.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
1137
+ for (let b of n)
1138
+ if (p.contains(b)) return NodeFilter.FILTER_SKIP;
1137
1139
  return NodeFilter.FILTER_ACCEPT;
1138
- }, u = document.createTreeWalker(c, NodeFilter.SHOW_ELEMENT, {
1140
+ }, s = document.createTreeWalker(u, NodeFilter.SHOW_ELEMENT, {
1139
1141
  acceptNode: l
1140
- }), d = l(c);
1141
- if (d === NodeFilter.FILTER_ACCEPT && i(c), d !== NodeFilter.FILTER_REJECT) {
1142
- let f = u.nextNode();
1143
- for (; f != null; )
1144
- i(f), f = u.nextNode();
1142
+ }), d = l(u);
1143
+ if (d === NodeFilter.FILTER_ACCEPT && i(u), d !== NodeFilter.FILTER_REJECT) {
1144
+ let p = s.nextNode();
1145
+ for (; p != null; )
1146
+ i(p), p = s.nextNode();
1145
1147
  }
1146
- }, i = (c) => {
1148
+ }, i = (u) => {
1147
1149
  var l;
1148
- let u = (l = H.get(c)) !== null && l !== void 0 ? l : 0;
1149
- c.getAttribute("aria-hidden") === "true" && u === 0 || (u === 0 && c.setAttribute("aria-hidden", "true"), r.add(c), H.set(c, u + 1));
1150
+ let s = (l = B.get(u)) !== null && l !== void 0 ? l : 0;
1151
+ u.getAttribute("aria-hidden") === "true" && s === 0 || (s === 0 && u.setAttribute("aria-hidden", "true"), r.add(u), B.set(u, s + 1));
1150
1152
  };
1151
- y.length && y[y.length - 1].disconnect(), o(t);
1152
- let a = new MutationObserver((c) => {
1153
- for (let l of c)
1153
+ T.length && T[T.length - 1].disconnect(), o(t);
1154
+ let a = new MutationObserver((u) => {
1155
+ for (let l of u)
1154
1156
  if (!(l.type !== "childList" || l.addedNodes.length === 0) && ![
1155
1157
  ...n,
1156
1158
  ...r
1157
- ].some((u) => u.contains(l.target))) {
1158
- for (let u of l.removedNodes) u instanceof Element && (n.delete(u), r.delete(u));
1159
- for (let u of l.addedNodes)
1160
- (u instanceof HTMLElement || u instanceof SVGElement) && (u.dataset.liveAnnouncer === "true" || u.dataset.reactAriaTopLayer === "true") ? n.add(u) : u instanceof Element && o(u);
1159
+ ].some((s) => s.contains(l.target))) {
1160
+ for (let s of l.removedNodes) s instanceof Element && (n.delete(s), r.delete(s));
1161
+ for (let s of l.addedNodes)
1162
+ (s instanceof HTMLElement || s instanceof SVGElement) && (s.dataset.liveAnnouncer === "true" || s.dataset.reactAriaTopLayer === "true") ? n.add(s) : s instanceof Element && o(s);
1161
1163
  }
1162
1164
  });
1163
1165
  a.observe(t, {
1164
1166
  childList: !0,
1165
1167
  subtree: !0
1166
1168
  });
1167
- let s = {
1169
+ let c = {
1168
1170
  observe() {
1169
1171
  a.observe(t, {
1170
1172
  childList: !0,
@@ -1175,47 +1177,47 @@ function dn(e, t = document.body) {
1175
1177
  a.disconnect();
1176
1178
  }
1177
1179
  };
1178
- return y.push(s), () => {
1180
+ return T.push(c), () => {
1179
1181
  a.disconnect();
1180
- for (let c of r) {
1181
- let l = H.get(c);
1182
- l != null && (l === 1 ? (c.removeAttribute("aria-hidden"), H.delete(c)) : H.set(c, l - 1));
1182
+ for (let u of r) {
1183
+ let l = B.get(u);
1184
+ l === 1 ? (u.removeAttribute("aria-hidden"), B.delete(u)) : B.set(u, l - 1);
1183
1185
  }
1184
- s === y[y.length - 1] ? (y.pop(), y.length && y[y.length - 1].observe()) : y.splice(y.indexOf(s), 1);
1186
+ c === T[T.length - 1] ? (T.pop(), T.length && T[T.length - 1].observe()) : T.splice(T.indexOf(c), 1);
1185
1187
  };
1186
1188
  }
1187
- const fn = /* @__PURE__ */ at({});
1188
- function pn() {
1189
+ const dn = /* @__PURE__ */ nt({});
1190
+ function fn() {
1189
1191
  var e;
1190
- return (e = W(fn)) !== null && e !== void 0 ? e : {};
1192
+ return (e = A(dn)) !== null && e !== void 0 ? e : {};
1191
1193
  }
1192
- const Ge = /* @__PURE__ */ h.createContext(null);
1193
- function bn(e) {
1194
- let t = _e(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] = z(!1), a = K(() => ({
1194
+ const qe = /* @__PURE__ */ h.createContext(null);
1195
+ function pn(e) {
1196
+ let t = _e(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] = j(!1), a = H(() => ({
1195
1197
  contain: o,
1196
1198
  setContain: i
1197
1199
  }), [
1198
1200
  o,
1199
1201
  i
1200
- ]), { getContainer: s } = pn();
1201
- if (!e.portalContainer && s && (n = s()), !n) return null;
1202
- let c = e.children;
1203
- return e.disableFocusManagement || (c = /* @__PURE__ */ h.createElement(Ut, {
1202
+ ]), { getContainer: c } = fn();
1203
+ if (!e.portalContainer && c && (n = c()), !n) return null;
1204
+ let u = e.children;
1205
+ return e.disableFocusManagement || (u = /* @__PURE__ */ h.createElement(zt, {
1204
1206
  restoreFocus: !0,
1205
1207
  contain: o && !r
1206
- }, c)), c = /* @__PURE__ */ h.createElement(Ge.Provider, {
1208
+ }, u)), u = /* @__PURE__ */ h.createElement(qe.Provider, {
1207
1209
  value: a
1208
- }, /* @__PURE__ */ h.createElement(Wt, null, c)), /* @__PURE__ */ it.createPortal(c, n);
1210
+ }, /* @__PURE__ */ h.createElement(Dt, null, u)), /* @__PURE__ */ rt.createPortal(u, n);
1209
1211
  }
1210
- function Je() {
1211
- let e = W(Ge), t = e == null ? void 0 : e.setContain;
1212
- g(() => {
1212
+ function ze() {
1213
+ let e = A(qe), t = e == null ? void 0 : e.setContain;
1214
+ E(() => {
1213
1215
  t == null || t(!0);
1214
1216
  }, [
1215
1217
  t
1216
1218
  ]);
1217
1219
  }
1218
- function mn(e, t, n) {
1220
+ function vn(e, t, n) {
1219
1221
  let { overlayProps: r, underlayProps: o } = rn({
1220
1222
  ...e,
1221
1223
  isOpen: t.isOpen,
@@ -1223,27 +1225,27 @@ function mn(e, t, n) {
1223
1225
  }, n);
1224
1226
  return ln({
1225
1227
  isDisabled: !t.isOpen
1226
- }), Je(), P(() => {
1227
- if (t.isOpen && n.current) return dn([
1228
+ }), ze(), P(() => {
1229
+ if (t.isOpen) return un([
1228
1230
  n.current
1229
1231
  ]);
1230
1232
  }, [
1231
1233
  t.isOpen,
1232
1234
  n
1233
1235
  ]), {
1234
- modalProps: wt(r),
1236
+ modalProps: ht(r),
1235
1237
  underlayProps: o
1236
1238
  };
1237
1239
  }
1238
- function vn(e, t) {
1239
- let { role: n = "dialog" } = e, r = gt();
1240
+ function bn(e, t) {
1241
+ let { role: n = "dialog" } = e, r = mt();
1240
1242
  r = e["aria-label"] ? void 0 : r;
1241
- let o = w(!1);
1243
+ let o = y(!1);
1242
1244
  return P(() => {
1243
1245
  if (t.current && !t.current.contains(document.activeElement)) {
1244
- ue(t.current);
1246
+ ce(t.current);
1245
1247
  let i = setTimeout(() => {
1246
- document.activeElement === t.current && (o.current = !0, t.current && (t.current.blur(), ue(t.current)), o.current = !1);
1248
+ document.activeElement === t.current && (o.current = !0, t.current && (t.current.blur(), ce(t.current)), o.current = !1);
1247
1249
  }, 500);
1248
1250
  return () => {
1249
1251
  clearTimeout(i);
@@ -1251,9 +1253,9 @@ function vn(e, t) {
1251
1253
  }
1252
1254
  }, [
1253
1255
  t
1254
- ]), Je(), {
1256
+ ]), ze(), {
1255
1257
  dialogProps: {
1256
- ...St(e, {
1258
+ ...Tt(e, {
1257
1259
  labelable: !0
1258
1260
  }),
1259
1261
  role: n,
@@ -1271,7 +1273,7 @@ function vn(e, t) {
1271
1273
  }
1272
1274
  };
1273
1275
  }
1274
- function $n(e, t, n) {
1276
+ function mn(e, t, n) {
1275
1277
  return t in e ? Object.defineProperty(e, t, {
1276
1278
  value: n,
1277
1279
  enumerable: !0,
@@ -1293,47 +1295,47 @@ function Pe(e) {
1293
1295
  for (var t = 1; t < arguments.length; t++) {
1294
1296
  var n = arguments[t] != null ? arguments[t] : {};
1295
1297
  t % 2 ? Fe(Object(n), !0).forEach(function(r) {
1296
- $n(e, r, n[r]);
1298
+ mn(e, r, n[r]);
1297
1299
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fe(Object(n)).forEach(function(r) {
1298
1300
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
1299
1301
  });
1300
1302
  }
1301
1303
  return e;
1302
1304
  }
1303
- var hn = (e, t, n) => {
1305
+ var $n = (e, t, n) => {
1304
1306
  for (var r of Object.keys(e)) {
1305
1307
  var o;
1306
1308
  if (e[r] !== ((o = t[r]) !== null && o !== void 0 ? o : n[r]))
1307
1309
  return !1;
1308
1310
  }
1309
1311
  return !0;
1310
- }, gn = (e) => (t) => {
1312
+ }, hn = (e) => (t) => {
1311
1313
  var n = e.defaultClassName, r = Pe(Pe({}, e.defaultVariants), t);
1312
1314
  for (var o in r) {
1313
1315
  var i, a = (i = r[o]) !== null && i !== void 0 ? i : e.defaultVariants[o];
1314
1316
  if (a != null) {
1315
- var s = a;
1316
- typeof s == "boolean" && (s = s === !0 ? "true" : "false");
1317
- var c = (
1317
+ var c = a;
1318
+ typeof c == "boolean" && (c = c === !0 ? "true" : "false");
1319
+ var u = (
1318
1320
  // @ts-expect-error
1319
- e.variantClassNames[o][s]
1321
+ e.variantClassNames[o][c]
1320
1322
  );
1321
- c && (n += " " + c);
1323
+ u && (n += " " + u);
1322
1324
  }
1323
1325
  }
1324
- for (var [l, u] of e.compoundVariants)
1325
- hn(l, r, e.defaultVariants) && (n += " " + u);
1326
+ for (var [l, s] of e.compoundVariants)
1327
+ $n(l, r, e.defaultVariants) && (n += " " + s);
1326
1328
  return n;
1327
- }, En = gn({ defaultClassName: "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq2", false: "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq3" } }, defaultVariants: {}, compoundVariants: [] }), wn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq5", yn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq0", Tn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq9", xn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psqa", kn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq8", Sn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq4", Nn = "pkg_sps-woodland_focused-task__version_8_24_0__hash_1io4psq7";
1328
- function Xe({
1329
+ }, En = hn({ defaultClassName: "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq2", false: "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq3" } }, defaultVariants: {}, compoundVariants: [] }), gn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq5", wn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq0", yn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq9", Tn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psqa", xn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq8", kn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq4", Sn = "pkg_sps-woodland_focused-task__version_8_25_0__hash_1io4psq7";
1330
+ function Ue({
1329
1331
  children: e,
1330
1332
  className: t = "",
1331
1333
  ...n
1332
1334
  }) {
1333
- return /* @__PURE__ */ p.createElement("div", { className: Y(kn, t), ...n }, /* @__PURE__ */ p.createElement("div", { className: Y(Tn) }, /* @__PURE__ */ p.createElement("div", { className: Y(xn) }, e)));
1335
+ return /* @__PURE__ */ f.createElement("div", { className: X(xn, t), ...n }, /* @__PURE__ */ f.createElement("div", { className: X(yn) }, /* @__PURE__ */ f.createElement("div", { className: X(Tn) }, e)));
1334
1336
  }
1335
- Le.set(Xe, { name: "FocusedTaskActions" });
1336
- function Fn({
1337
+ Le.set(Ue, { name: "FocusedTaskActions" });
1338
+ function Nn({
1337
1339
  children: e,
1338
1340
  className: t,
1339
1341
  "data-testid": n,
@@ -1341,49 +1343,49 @@ function Fn({
1341
1343
  onFocus: o,
1342
1344
  overlayProps: i,
1343
1345
  state: a,
1344
- onClose: s,
1345
- fullWidth: c = !1,
1346
+ onClose: c,
1347
+ fullWidth: u = !1,
1346
1348
  ...l
1347
1349
  }) {
1348
- const u = p.useRef(null), { modalProps: d, underlayProps: f } = mn(
1350
+ const s = f.useRef(null), { modalProps: d, underlayProps: p } = vn(
1349
1351
  { ...l },
1350
1352
  a,
1351
- u
1352
- ), { dialogProps: m, titleProps: b } = vn(l, u), k = $e(d.onFocus, m.onFocus, o), R = $e(d.onBlur, m.onBlur, r), Qe = nt({ "data-testid": n }), [re, Ze] = rt(e, [{ type: Xe }]);
1353
- function et() {
1354
- s && typeof s == "function" && s(), a.close();
1353
+ s
1354
+ ), { dialogProps: b, titleProps: v } = bn(l, s), k = $e(d.onFocus, b.onFocus, o), W = $e(d.onBlur, b.onBlur, r), Je = Ze({ "data-testid": n }), [re, Xe] = et(e, [{ type: Ue }]);
1355
+ function Ye() {
1356
+ c && typeof c == "function" && c(), a.close();
1355
1357
  }
1356
- const tt = /* @__PURE__ */ p.createElement(
1357
- ot,
1358
+ const Qe = /* @__PURE__ */ f.createElement(
1359
+ tt,
1358
1360
  {
1359
1361
  "aria-label": "Close",
1360
- onClick: et,
1362
+ onClick: Ye,
1361
1363
  kind: "icon",
1362
1364
  icon: "x",
1363
- className: wn
1365
+ className: gn
1364
1366
  }
1365
1367
  );
1366
- return /* @__PURE__ */ p.createElement(bn, null, /* @__PURE__ */ p.createElement("div", { className: Nn, ...f, ...l }, /* @__PURE__ */ p.createElement(
1368
+ return /* @__PURE__ */ f.createElement(pn, null, /* @__PURE__ */ f.createElement("div", { className: Sn, ...p, ...l }, /* @__PURE__ */ f.createElement(
1367
1369
  "div",
1368
1370
  {
1369
1371
  ...d,
1370
- ...m,
1372
+ ...b,
1371
1373
  ...i,
1372
1374
  onFocus: k,
1373
- onBlur: R,
1374
- ...Qe("dialog"),
1375
- ref: u,
1376
- className: Y(yn, t)
1375
+ onBlur: W,
1376
+ ...Je("dialog"),
1377
+ ref: s,
1378
+ className: X(wn, t)
1377
1379
  },
1378
- /* @__PURE__ */ p.createElement("div", { ...b, className: Sn }, tt),
1379
- /* @__PURE__ */ p.createElement("div", { className: En({ fullWidth: c }) }, he(Ze, a.close)),
1380
- re && re.length > 0 && /* @__PURE__ */ p.createElement(p.Fragment, null, he(re, a.close))
1380
+ /* @__PURE__ */ f.createElement("div", { ...v, className: kn }, Qe),
1381
+ /* @__PURE__ */ f.createElement("div", { className: En({ fullWidth: u }) }, he(Xe, a.close)),
1382
+ re && re.length > 0 && /* @__PURE__ */ f.createElement(f.Fragment, null, he(re, a.close))
1381
1383
  )));
1382
1384
  }
1383
- function Ye(e) {
1384
- return e.state.isOpen ? /* @__PURE__ */ p.createElement(Fn, { ...e }, e.children) : /* @__PURE__ */ p.createElement(p.Fragment, null);
1385
+ function Ge(e) {
1386
+ return e.state.isOpen ? /* @__PURE__ */ f.createElement(Nn, { ...e }, e.children) : /* @__PURE__ */ f.createElement(f.Fragment, null);
1385
1387
  }
1386
- Le.set(Ye, {
1388
+ Le.set(Ge, {
1387
1389
  name: "FocusedTask",
1388
1390
  props: {
1389
1391
  fullWidth: { type: "boolean", default: "false" },
@@ -1392,8 +1394,8 @@ Le.set(Ye, {
1392
1394
  onFocus: { type: "() => void" }
1393
1395
  }
1394
1396
  });
1395
- function Pn(e) {
1396
- let [t, n] = At(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
1397
+ function Fn(e) {
1398
+ let [t, n] = Mt(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
1397
1399
  const r = S(() => {
1398
1400
  n(!0);
1399
1401
  }, [
@@ -1416,8 +1418,8 @@ function Pn(e) {
1416
1418
  toggle: i
1417
1419
  };
1418
1420
  }
1419
- function An(e = {}) {
1420
- const t = Pn(e), n = w(null), { triggerProps: r, overlayProps: o } = on({}, t, n), { onPress: i, ...a } = r;
1421
+ function Dn(e = {}) {
1422
+ const t = Fn(e), n = y(null), { triggerProps: r, overlayProps: o } = on({ type: "dialog" }, t, n), { onPress: i, ...a } = r;
1421
1423
  return {
1422
1424
  triggerProps: {
1423
1425
  ...a,
@@ -1428,18 +1430,18 @@ function An(e = {}) {
1428
1430
  focusedTaskProps: { overlayProps: o, state: t }
1429
1431
  };
1430
1432
  }
1431
- const Ln = {
1432
- components: [Ye],
1433
+ const Pn = {
1434
+ components: [Ge],
1433
1435
  examples: {
1434
1436
  hooks: {
1435
1437
  label: "Using the Hook",
1436
- description: () => /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("p", null, "To use the focused task component, you must call the ", /* @__PURE__ */ p.createElement("code", null, "useFocusedTask"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ p.createElement("dl", null, /* @__PURE__ */ p.createElement("dt", null, /* @__PURE__ */ p.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ p.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ p.createElement("dt", null, /* @__PURE__ */ p.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ p.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ p.createElement("dt", null, /* @__PURE__ */ p.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ p.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ p.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ p.createElement("h5", null, "Focused Task Props, Focused Task State, and Trigger Props"), /* @__PURE__ */ p.createElement("p", null, "The ", /* @__PURE__ */ p.createElement("code", null, "useFocusedTask"), " returns an object with ", /* @__PURE__ */ p.createElement("code", null, "focusedTaskProps"), ",", " ", /* @__PURE__ */ p.createElement("code", null, "focusedTaskState"), " and ", /* @__PURE__ */ p.createElement("code", null, "triggerProps")), /* @__PURE__ */ p.createElement("p", null, "The ", /* @__PURE__ */ p.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the focused task."), /* @__PURE__ */ p.createElement("p", null, "The ", /* @__PURE__ */ p.createElement("code", null, "focusedTaskState"), " object (which is also included in ", /* @__PURE__ */ p.createElement("code", null, "focusedTaskProps"), ") allows programmatic access to the state of the focused task. This includes a read only", " ", /* @__PURE__ */ p.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ p.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ p.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ p.createElement("code", null, "close()"), " method which closes the overlay and a", " ", /* @__PURE__ */ p.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ p.createElement("p", null, "The ", /* @__PURE__ */ p.createElement("code", null, "focusedTaskProps"), " should be spread on the actual ", /* @__PURE__ */ p.createElement("code", null, "FocusedTask"), " component."), /* @__PURE__ */ p.createElement("p", null, "Please refer to the examples to see its implementation"))
1438
+ description: () => /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "To use the focused task component, you must call the ", /* @__PURE__ */ f.createElement("code", null, "useFocusedTask"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ f.createElement("dl", null, /* @__PURE__ */ f.createElement("dt", null, /* @__PURE__ */ f.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ f.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ f.createElement("dt", null, /* @__PURE__ */ f.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ f.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ f.createElement("dt", null, /* @__PURE__ */ f.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ f.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ f.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ f.createElement("h5", null, "Focused Task Props, Focused Task State, and Trigger Props"), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "useFocusedTask"), " returns an object with ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskProps"), ",", " ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskState"), " and ", /* @__PURE__ */ f.createElement("code", null, "triggerProps")), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the focused task."), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskState"), " object (which is also included in ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskProps"), ") allows programmatic access to the state of the focused task. This includes a read only", " ", /* @__PURE__ */ f.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ f.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ f.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ f.createElement("code", null, "close()"), " method which closes the overlay and a", " ", /* @__PURE__ */ f.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskProps"), " should be spread on the actual ", /* @__PURE__ */ f.createElement("code", null, "FocusedTask"), " component."), /* @__PURE__ */ f.createElement("p", null, "Please refer to the examples to see its implementation"))
1437
1439
  },
1438
1440
  standard: {
1439
1441
  label: "Standard",
1440
1442
  examples: {
1441
1443
  basic: {
1442
- react: ge`
1444
+ react: Ee`
1443
1445
  import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
1444
1446
  import { Button } from "@sps-woodland/buttons";
1445
1447
  import { Card } from "@sps-woodland/cards";
@@ -1485,7 +1487,7 @@ const Ln = {
1485
1487
  label: "Fill Width",
1486
1488
  examples: {
1487
1489
  basic: {
1488
- react: ge`
1490
+ react: Ee`
1489
1491
  import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
1490
1492
  import { Button } from "@sps-woodland/buttons";
1491
1493
  import { Card } from "@sps-woodland/cards";
@@ -1529,12 +1531,12 @@ const Ln = {
1529
1531
  }
1530
1532
  }
1531
1533
  }
1532
- }, Wn = {
1533
- "Focused Task": Ln
1534
+ }, An = {
1535
+ "Focused Task": Pn
1534
1536
  };
1535
1537
  export {
1536
- Ye as FocusedTask,
1537
- Xe as FocusedTaskActions,
1538
- Wn as MANIFEST,
1539
- An as useFocusedTask
1538
+ Ge as FocusedTask,
1539
+ Ue as FocusedTaskActions,
1540
+ An as MANIFEST,
1541
+ Dn as useFocusedTask
1540
1542
  };