@sps-woodland/modal 8.51.2 → 8.52.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,21 +1,1932 @@
1
- import { Modal as r } from "@sps-woodland/core/modal";
2
- export * from "@sps-woodland/core/modal";
3
- import { code as e } from "@spscommerce/utils";
4
- import * as o from "react";
5
- const a = {
6
- description: () => /* @__PURE__ */ o.createElement("p", null, "Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),
7
- components: [r],
1
+ import { Metadata as tt, cl as Me, combineEventHandlers as We, useChildTestIdAttrBuilder as Ct, selectChildren as Bt, modChildren as Ot, Icon as Rt, contentOf as ge } from "@sps-woodland/core";
2
+ import { Button as ot } from "@sps-woodland/buttons";
3
+ import * as c from "react";
4
+ import M, { useState as re, useRef as y, useCallback as x, useContext as J, useEffect as D, useReducer as Dt, useMemo as Y, createContext as It } from "react";
5
+ import { useWoodlandLanguage as At } from "@spscommerce/i18n";
6
+ import Wt from "react-dom";
7
+ import { code as w } from "@spscommerce/utils";
8
+ const N = typeof document < "u" ? M.useLayoutEffect : () => {
9
+ };
10
+ function Vt(e) {
11
+ let [t, o] = re(e), n = y(t), r = y(null), a = y(() => {
12
+ if (!r.current) return;
13
+ let l = r.current.next();
14
+ if (l.done) {
15
+ r.current = null;
16
+ return;
17
+ }
18
+ n.current === l.value ? a.current() : o(l.value);
19
+ });
20
+ N(() => {
21
+ n.current = t, r.current && a.current();
22
+ });
23
+ let i = x((l) => {
24
+ r.current = l(n.current), a.current();
25
+ }, [
26
+ a
27
+ ]);
28
+ return [
29
+ t,
30
+ i
31
+ ];
32
+ }
33
+ const ue = {
34
+ prefix: String(Math.round(Math.random() * 1e10)),
35
+ current: 0
36
+ }, nt = /* @__PURE__ */ M.createContext(ue), Ht = /* @__PURE__ */ M.createContext(!1);
37
+ let zt = !!(typeof window < "u" && window.document && window.document.createElement), ve = /* @__PURE__ */ new WeakMap();
38
+ function Kt(e = !1) {
39
+ let t = J(nt), o = y(null);
40
+ if (o.current === null && !e) {
41
+ var n, r;
42
+ let a = (r = M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || r === void 0 || (n = r.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
43
+ if (a) {
44
+ let i = ve.get(a);
45
+ i == null ? ve.set(a, {
46
+ id: t.current,
47
+ state: a.memoizedState
48
+ }) : a.memoizedState !== i.state && (t.current = i.id, ve.delete(a));
49
+ }
50
+ o.current = ++t.current;
51
+ }
52
+ return o.current;
53
+ }
54
+ function qt(e) {
55
+ let t = J(nt);
56
+ t === ue && !zt && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
57
+ let o = Kt(!!e), n = t === ue && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
58
+ return e || `${n}-${o}`;
59
+ }
60
+ function jt(e) {
61
+ let t = M.useId(), [o] = re(rt()), n = o || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ue.prefix}`;
62
+ return e || `${n}-${t}`;
63
+ }
64
+ const Ut = typeof M.useId == "function" ? jt : qt;
65
+ function Gt() {
66
+ return !1;
67
+ }
68
+ function Jt() {
69
+ return !0;
70
+ }
71
+ function Xt(e) {
72
+ return () => {
73
+ };
74
+ }
75
+ function rt() {
76
+ return typeof M.useSyncExternalStore == "function" ? M.useSyncExternalStore(Xt, Gt, Jt) : J(Ht);
77
+ }
78
+ let Qt = !!(typeof window < "u" && window.document && window.document.createElement), U = /* @__PURE__ */ new Map(), Q;
79
+ typeof FinalizationRegistry < "u" && (Q = new FinalizationRegistry((e) => {
80
+ U.delete(e);
81
+ }));
82
+ function at(e) {
83
+ let [t, o] = re(e), n = y(null), r = Ut(t), a = y(null);
84
+ if (Q && Q.register(a, r), Qt) {
85
+ const i = U.get(r);
86
+ i && !i.includes(n) ? i.push(n) : U.set(r, [
87
+ n
88
+ ]);
89
+ }
90
+ return N(() => {
91
+ let i = r;
92
+ return () => {
93
+ Q && Q.unregister(a), U.delete(i);
94
+ };
95
+ }, [
96
+ r
97
+ ]), D(() => {
98
+ let i = n.current;
99
+ return i && o(i), () => {
100
+ i && (n.current = null);
101
+ };
102
+ }), r;
103
+ }
104
+ function Zt(e, t) {
105
+ if (e === t) return e;
106
+ let o = U.get(e);
107
+ if (o)
108
+ return o.forEach((r) => r.current = t), t;
109
+ let n = U.get(t);
110
+ return n ? (n.forEach((r) => r.current = e), e) : t;
111
+ }
112
+ function Yt(e = []) {
113
+ let t = at(), [o, n] = Vt(t), r = x(() => {
114
+ n(function* () {
115
+ yield t, yield document.getElementById(t) ? t : void 0;
116
+ });
117
+ }, [
118
+ t,
119
+ n
120
+ ]);
121
+ return N(r, [
122
+ t,
123
+ r,
124
+ ...e
125
+ ]), o;
126
+ }
127
+ function Fe(...e) {
128
+ return (...t) => {
129
+ for (let o of e) typeof o == "function" && o(...t);
130
+ };
131
+ }
132
+ const P = (e) => {
133
+ var t;
134
+ return (t = e?.ownerDocument) !== null && t !== void 0 ? t : document;
135
+ }, G = (e) => e && "window" in e && e.window === e ? e : P(e).defaultView || window;
136
+ function eo(e) {
137
+ return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
138
+ }
139
+ function to(e) {
140
+ return eo(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
141
+ }
142
+ let oo = !1;
143
+ function A() {
144
+ return oo;
145
+ }
146
+ function B(e, t) {
147
+ if (!A()) return t && e ? e.contains(t) : !1;
148
+ if (!e || !t) return !1;
149
+ let o = t;
150
+ for (; o !== null; ) {
151
+ if (o === e) return !0;
152
+ o.tagName === "SLOT" && o.assignedSlot ? o = o.assignedSlot.parentNode : to(o) ? o = o.host : o = o.parentNode;
153
+ }
154
+ return !1;
155
+ }
156
+ const S = (e = document) => {
157
+ var t;
158
+ if (!A()) return e.activeElement;
159
+ let o = e.activeElement;
160
+ for (; o && "shadowRoot" in o && (!((t = o.shadowRoot) === null || t === void 0) && t.activeElement); ) o = o.shadowRoot.activeElement;
161
+ return o;
162
+ };
163
+ function k(e) {
164
+ if (A() && e.target instanceof Element && e.target.shadowRoot) {
165
+ var t, o;
166
+ if ("composedPath" in e) return (t = e.composedPath()[0]) !== null && t !== void 0 ? t : null;
167
+ if ("composedPath" in e.nativeEvent) return (o = e.nativeEvent.composedPath()[0]) !== null && o !== void 0 ? o : null;
168
+ }
169
+ return e.target;
170
+ }
171
+ class no {
172
+ get currentNode() {
173
+ return this._currentNode;
174
+ }
175
+ set currentNode(t) {
176
+ if (!B(this.root, t)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
177
+ const o = [];
178
+ let n = t, r = t;
179
+ for (this._currentNode = t; n && n !== this.root; ) if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
180
+ const i = n, l = this._doc.createTreeWalker(i, this.whatToShow, {
181
+ acceptNode: this._acceptNode
182
+ });
183
+ o.push(l), l.currentNode = r, this._currentSetFor.add(l), n = r = i.host;
184
+ } else n = n.parentNode;
185
+ const a = this._doc.createTreeWalker(this.root, this.whatToShow, {
186
+ acceptNode: this._acceptNode
187
+ });
188
+ o.push(a), a.currentNode = r, this._currentSetFor.add(a), this._walkerStack = o;
189
+ }
190
+ get doc() {
191
+ return this._doc;
192
+ }
193
+ firstChild() {
194
+ let t = this.currentNode, o = this.nextNode();
195
+ return B(t, o) ? (o && (this.currentNode = o), o) : (this.currentNode = t, null);
196
+ }
197
+ lastChild() {
198
+ let o = this._walkerStack[0].lastChild();
199
+ return o && (this.currentNode = o), o;
200
+ }
201
+ nextNode() {
202
+ const t = this._walkerStack[0].nextNode();
203
+ if (t) {
204
+ if (t.shadowRoot) {
205
+ var o;
206
+ let r;
207
+ if (typeof this.filter == "function" ? r = this.filter(t) : !((o = this.filter) === null || o === void 0) && o.acceptNode && (r = this.filter.acceptNode(t)), r === NodeFilter.FILTER_ACCEPT)
208
+ return this.currentNode = t, t;
209
+ let a = this.nextNode();
210
+ return a && (this.currentNode = a), a;
211
+ }
212
+ return t && (this.currentNode = t), t;
213
+ } else if (this._walkerStack.length > 1) {
214
+ this._walkerStack.shift();
215
+ let n = this.nextNode();
216
+ return n && (this.currentNode = n), n;
217
+ } else return null;
218
+ }
219
+ previousNode() {
220
+ const t = this._walkerStack[0];
221
+ if (t.currentNode === t.root) {
222
+ if (this._currentSetFor.has(t))
223
+ if (this._currentSetFor.delete(t), this._walkerStack.length > 1) {
224
+ this._walkerStack.shift();
225
+ let r = this.previousNode();
226
+ return r && (this.currentNode = r), r;
227
+ } else return null;
228
+ return null;
229
+ }
230
+ const o = t.previousNode();
231
+ if (o) {
232
+ if (o.shadowRoot) {
233
+ var n;
234
+ let a;
235
+ if (typeof this.filter == "function" ? a = this.filter(o) : !((n = this.filter) === null || n === void 0) && n.acceptNode && (a = this.filter.acceptNode(o)), a === NodeFilter.FILTER_ACCEPT)
236
+ return o && (this.currentNode = o), o;
237
+ let i = this.lastChild();
238
+ return i && (this.currentNode = i), i;
239
+ }
240
+ return o && (this.currentNode = o), o;
241
+ } else if (this._walkerStack.length > 1) {
242
+ this._walkerStack.shift();
243
+ let r = this.previousNode();
244
+ return r && (this.currentNode = r), r;
245
+ } else return null;
246
+ }
247
+ /**
248
+ * @deprecated
249
+ */
250
+ nextSibling() {
251
+ return null;
252
+ }
253
+ /**
254
+ * @deprecated
255
+ */
256
+ previousSibling() {
257
+ return null;
258
+ }
259
+ /**
260
+ * @deprecated
261
+ */
262
+ parentNode() {
263
+ return null;
264
+ }
265
+ constructor(t, o, n, r) {
266
+ this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (i) => {
267
+ if (i.nodeType === Node.ELEMENT_NODE) {
268
+ const s = i.shadowRoot;
269
+ if (s) {
270
+ const u = this._doc.createTreeWalker(s, this.whatToShow, {
271
+ acceptNode: this._acceptNode
272
+ });
273
+ return this._walkerStack.unshift(u), NodeFilter.FILTER_ACCEPT;
274
+ } else {
275
+ var l;
276
+ if (typeof this.filter == "function") return this.filter(i);
277
+ if (!((l = this.filter) === null || l === void 0) && l.acceptNode) return this.filter.acceptNode(i);
278
+ if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
279
+ }
280
+ }
281
+ return NodeFilter.FILTER_SKIP;
282
+ }, this._doc = t, this.root = o, this.filter = r ?? null, this.whatToShow = n ?? NodeFilter.SHOW_ALL, this._currentNode = o, this._walkerStack.unshift(t.createTreeWalker(o, n, this._acceptNode));
283
+ const a = o.shadowRoot;
284
+ if (a) {
285
+ const i = this._doc.createTreeWalker(a, this.whatToShow, {
286
+ acceptNode: this._acceptNode
287
+ });
288
+ this._walkerStack.unshift(i);
289
+ }
290
+ }
291
+ }
292
+ function it(e, t, o, n) {
293
+ return A() ? new no(e, t, o, n) : e.createTreeWalker(t, o, n);
294
+ }
295
+ function ro(...e) {
296
+ return e.length === 1 && e[0] ? e[0] : (t) => {
297
+ let o = !1;
298
+ const n = e.map((r) => {
299
+ const a = Ve(r, t);
300
+ return o || (o = typeof a == "function"), a;
301
+ });
302
+ if (o) return () => {
303
+ n.forEach((r, a) => {
304
+ typeof r == "function" ? r() : Ve(e[a], null);
305
+ });
306
+ };
307
+ };
308
+ }
309
+ function Ve(e, t) {
310
+ if (typeof e == "function") return e(t);
311
+ e != null && (e.current = t);
312
+ }
313
+ function lt(e) {
314
+ var t, o, n = "";
315
+ if (typeof e == "string" || typeof e == "number") n += e;
316
+ else if (typeof e == "object") if (Array.isArray(e)) {
317
+ var r = e.length;
318
+ for (t = 0; t < r; t++) e[t] && (o = lt(e[t])) && (n && (n += " "), n += o);
319
+ } else for (o in e) e[o] && (n && (n += " "), n += o);
320
+ return n;
321
+ }
322
+ function ao() {
323
+ for (var e, t, o = 0, n = "", r = arguments.length; o < r; o++) (e = arguments[o]) && (t = lt(e)) && (n && (n += " "), n += t);
324
+ return n;
325
+ }
326
+ function io(...e) {
327
+ let t = {
328
+ ...e[0]
329
+ };
330
+ for (let o = 1; o < e.length; o++) {
331
+ let n = e[o];
332
+ for (let r in n) {
333
+ let a = t[r], i = n[r];
334
+ typeof a == "function" && typeof i == "function" && // This is a lot faster than a regex.
335
+ r[0] === "o" && r[1] === "n" && r.charCodeAt(2) >= /* 'A' */
336
+ 65 && r.charCodeAt(2) <= /* 'Z' */
337
+ 90 ? t[r] = Fe(a, i) : (r === "className" || r === "UNSAFE_className") && typeof a == "string" && typeof i == "string" ? t[r] = ao(a, i) : r === "id" && a && i ? t.id = Zt(a, i) : r === "ref" && a && i ? t.ref = ro(a, i) : t[r] = i !== void 0 ? i : a;
338
+ }
339
+ }
340
+ return t;
341
+ }
342
+ const lo = /* @__PURE__ */ new Set([
343
+ "id"
344
+ ]), so = /* @__PURE__ */ new Set([
345
+ "aria-label",
346
+ "aria-labelledby",
347
+ "aria-describedby",
348
+ "aria-details"
349
+ ]), uo = /* @__PURE__ */ new Set([
350
+ "href",
351
+ "hrefLang",
352
+ "target",
353
+ "rel",
354
+ "download",
355
+ "ping",
356
+ "referrerPolicy"
357
+ ]), co = /* @__PURE__ */ new Set([
358
+ "dir",
359
+ "lang",
360
+ "hidden",
361
+ "inert",
362
+ "translate"
363
+ ]), He = /* @__PURE__ */ new Set([
364
+ "onClick",
365
+ "onAuxClick",
366
+ "onContextMenu",
367
+ "onDoubleClick",
368
+ "onMouseDown",
369
+ "onMouseEnter",
370
+ "onMouseLeave",
371
+ "onMouseMove",
372
+ "onMouseOut",
373
+ "onMouseOver",
374
+ "onMouseUp",
375
+ "onTouchCancel",
376
+ "onTouchEnd",
377
+ "onTouchMove",
378
+ "onTouchStart",
379
+ "onPointerDown",
380
+ "onPointerMove",
381
+ "onPointerUp",
382
+ "onPointerCancel",
383
+ "onPointerEnter",
384
+ "onPointerLeave",
385
+ "onPointerOver",
386
+ "onPointerOut",
387
+ "onGotPointerCapture",
388
+ "onLostPointerCapture",
389
+ "onScroll",
390
+ "onWheel",
391
+ "onAnimationStart",
392
+ "onAnimationEnd",
393
+ "onAnimationIteration",
394
+ "onTransitionCancel",
395
+ "onTransitionEnd",
396
+ "onTransitionRun",
397
+ "onTransitionStart"
398
+ ]), fo = /^(data-.*)$/;
399
+ function mo(e, t = {}) {
400
+ let { labelable: o, isLink: n, global: r, events: a = r, propNames: i } = t, l = {};
401
+ for (const s in e) Object.prototype.hasOwnProperty.call(e, s) && (lo.has(s) || o && so.has(s) || n && uo.has(s) || r && co.has(s) || a && (He.has(s) || s.endsWith("Capture") && He.has(s.slice(0, -7))) || i?.has(s) || fo.test(s)) && (l[s] = e[s]);
402
+ return l;
403
+ }
404
+ function ye(e) {
405
+ if (po()) e.focus({
406
+ preventScroll: !0
407
+ });
408
+ else {
409
+ let t = bo(e);
410
+ e.focus(), go(t);
411
+ }
412
+ }
413
+ let ie = null;
414
+ function po() {
415
+ if (ie == null) {
416
+ ie = !1;
417
+ try {
418
+ document.createElement("div").focus({
419
+ get preventScroll() {
420
+ return ie = !0, !0;
421
+ }
422
+ });
423
+ } catch {
424
+ }
425
+ }
426
+ return ie;
427
+ }
428
+ function bo(e) {
429
+ let t = e.parentNode, o = [], n = document.scrollingElement || document.documentElement;
430
+ for (; t instanceof HTMLElement && t !== n; )
431
+ (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && o.push({
432
+ element: t,
433
+ scrollTop: t.scrollTop,
434
+ scrollLeft: t.scrollLeft
435
+ }), t = t.parentNode;
436
+ return n instanceof HTMLElement && o.push({
437
+ element: n,
438
+ scrollTop: n.scrollTop,
439
+ scrollLeft: n.scrollLeft
440
+ }), o;
441
+ }
442
+ function go(e) {
443
+ for (let { element: t, scrollTop: o, scrollLeft: n } of e)
444
+ t.scrollTop = o, t.scrollLeft = n;
445
+ }
446
+ function me(e) {
447
+ var t;
448
+ if (typeof window > "u" || window.navigator == null) return !1;
449
+ let o = (t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands;
450
+ return Array.isArray(o) && o.some((n) => e.test(n.brand)) || e.test(window.navigator.userAgent);
451
+ }
452
+ function Ce(e) {
453
+ var t;
454
+ 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;
455
+ }
456
+ function V(e) {
457
+ if (process.env.NODE_ENV === "test") return e;
458
+ let t = null;
459
+ return () => (t == null && (t = e()), t);
460
+ }
461
+ const oe = V(function() {
462
+ return Ce(/^Mac/i);
463
+ }), vo = V(function() {
464
+ return Ce(/^iPhone/i);
465
+ }), st = V(function() {
466
+ return Ce(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
467
+ oe() && navigator.maxTouchPoints > 1;
468
+ }), dt = V(function() {
469
+ return vo() || st();
470
+ });
471
+ V(function() {
472
+ return oe() || dt();
473
+ });
474
+ const ho = V(function() {
475
+ return me(/AppleWebKit/i) && !ut();
476
+ }), ut = V(function() {
477
+ return me(/Chrome/i);
478
+ }), ct = V(function() {
479
+ return me(/Android/i);
480
+ }), $o = V(function() {
481
+ return me(/Firefox/i);
482
+ });
483
+ function ne(e, t, o = !0) {
484
+ var n, r;
485
+ let { metaKey: a, ctrlKey: i, altKey: l, shiftKey: s } = t;
486
+ $o() && (!((r = window.event) === null || r === void 0 || (n = r.type) === null || n === void 0) && n.startsWith("key")) && e.target === "_blank" && (oe() ? a = !0 : i = !0);
487
+ let u = ho() && oe() && !st() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
488
+ keyIdentifier: "Enter",
489
+ metaKey: a,
490
+ ctrlKey: i,
491
+ altKey: l,
492
+ shiftKey: s
493
+ }) : new MouseEvent("click", {
494
+ metaKey: a,
495
+ ctrlKey: i,
496
+ altKey: l,
497
+ shiftKey: s,
498
+ detail: 1,
499
+ bubbles: !0,
500
+ cancelable: !0
501
+ });
502
+ ne.isOpening = o, ye(e), e.dispatchEvent(u), ne.isOpening = !1;
503
+ }
504
+ ne.isOpening = !1;
505
+ let H = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Set();
506
+ function ze() {
507
+ if (typeof window > "u") return;
508
+ function e(n) {
509
+ return "propertyName" in n;
510
+ }
511
+ let t = (n) => {
512
+ let r = k(n);
513
+ if (!e(n) || !r) return;
514
+ let a = H.get(r);
515
+ a || (a = /* @__PURE__ */ new Set(), H.set(r, a), r.addEventListener("transitioncancel", o, {
516
+ once: !0
517
+ })), a.add(n.propertyName);
518
+ }, o = (n) => {
519
+ let r = k(n);
520
+ if (!e(n) || !r) return;
521
+ let a = H.get(r);
522
+ if (a && (a.delete(n.propertyName), a.size === 0 && (r.removeEventListener("transitioncancel", o), H.delete(r)), H.size === 0)) {
523
+ for (let i of ke) i();
524
+ ke.clear();
525
+ }
526
+ };
527
+ document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", o);
528
+ }
529
+ typeof document < "u" && (document.readyState !== "loading" ? ze() : document.addEventListener("DOMContentLoaded", ze));
530
+ function wo() {
531
+ for (const [e] of H)
532
+ "isConnected" in e && !e.isConnected && H.delete(e);
533
+ }
534
+ function Eo(e) {
535
+ requestAnimationFrame(() => {
536
+ wo(), H.size === 0 ? e() : ke.add(e);
537
+ });
538
+ }
539
+ function _o() {
540
+ let e = y(/* @__PURE__ */ new Map()), t = x((r, a, i, l) => {
541
+ let s = l?.once ? (...u) => {
542
+ e.current.delete(i), i(...u);
543
+ } : i;
544
+ e.current.set(i, {
545
+ type: a,
546
+ eventTarget: r,
547
+ fn: s,
548
+ options: l
549
+ }), r.addEventListener(a, s, l);
550
+ }, []), o = x((r, a, i, l) => {
551
+ var s;
552
+ let u = ((s = e.current.get(i)) === null || s === void 0 ? void 0 : s.fn) || i;
553
+ r.removeEventListener(a, u, l), e.current.delete(i);
554
+ }, []), n = x(() => {
555
+ e.current.forEach((r, a) => {
556
+ o(r.eventTarget, r.type, a, r.options);
557
+ });
558
+ }, [
559
+ o
560
+ ]);
561
+ return D(() => n, [
562
+ n
563
+ ]), {
564
+ addGlobalListener: t,
565
+ removeGlobalListener: o,
566
+ removeAllGlobalListeners: n
567
+ };
568
+ }
569
+ var he;
570
+ const Mo = (he = M.useInsertionEffect) !== null && he !== void 0 ? he : N;
571
+ function Ke(e) {
572
+ const t = y(null);
573
+ return Mo(() => {
574
+ t.current = e;
575
+ }, [
576
+ e
577
+ ]), x((...o) => {
578
+ const n = t.current;
579
+ return n?.(...o);
580
+ }, []);
581
+ }
582
+ function Te(e, t) {
583
+ if (!e) return !1;
584
+ let o = window.getComputedStyle(e), n = document.scrollingElement || document.documentElement, r = /(auto|scroll)/.test(o.overflow + o.overflowX + o.overflowY);
585
+ return e === n && o.overflow !== "hidden" && (r = !0), r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
586
+ }
587
+ function ft(e, t) {
588
+ let o = e;
589
+ for (Te(o, t) && (o = o.parentElement); o && !Te(o, t); ) o = o.parentElement;
590
+ return o || document.scrollingElement || document.documentElement;
591
+ }
592
+ const yo = /* @__PURE__ */ new Set([
593
+ "checkbox",
594
+ "radio",
595
+ "range",
596
+ "color",
597
+ "file",
598
+ "image",
599
+ "button",
600
+ "submit",
601
+ "reset"
602
+ ]);
603
+ function $e(e) {
604
+ return e instanceof HTMLInputElement && !yo.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
605
+ }
606
+ function ko(e) {
607
+ return e.pointerType === "" && e.isTrusted ? !0 : ct() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
608
+ }
609
+ const To = typeof Element < "u" && "checkVisibility" in Element.prototype;
610
+ function Po(e) {
611
+ const t = G(e);
612
+ if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
613
+ let { display: o, visibility: n } = e.style, r = o !== "none" && n !== "hidden" && n !== "collapse";
614
+ if (r) {
615
+ const { getComputedStyle: a } = e.ownerDocument.defaultView;
616
+ let { display: i, visibility: l } = a(e);
617
+ r = i !== "none" && l !== "hidden" && l !== "collapse";
618
+ }
619
+ return r;
620
+ }
621
+ function No(e, t) {
622
+ return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
623
+ !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
624
+ }
625
+ function Be(e, t) {
626
+ return To ? e.checkVisibility({
627
+ visibilityProperty: !0
628
+ }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && Po(e) && No(e, t) && (!e.parentElement || Be(e.parentElement, e));
629
+ }
630
+ const Oe = [
631
+ "input:not([disabled]):not([type=hidden])",
632
+ "select:not([disabled])",
633
+ "textarea:not([disabled])",
634
+ "button:not([disabled])",
635
+ "a[href]",
636
+ "area[href]",
637
+ "summary",
638
+ "iframe",
639
+ "object",
640
+ "embed",
641
+ "audio[controls]",
642
+ "video[controls]",
643
+ '[contenteditable]:not([contenteditable^="false"])',
644
+ "permission"
645
+ ], Lo = Oe.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
646
+ Oe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
647
+ const So = Oe.join(':not([hidden]):not([tabindex="-1"]),');
648
+ function xo(e) {
649
+ return e.matches(Lo) && Be(e) && !mt(e);
650
+ }
651
+ function Fo(e) {
652
+ return e.matches(So) && Be(e) && !mt(e);
653
+ }
654
+ function mt(e) {
655
+ let t = e;
656
+ for (; t != null; ) {
657
+ if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
658
+ t = t.parentElement;
659
+ }
660
+ return !1;
661
+ }
662
+ var we;
663
+ const Co = typeof document < "u" ? (we = M.useInsertionEffect) !== null && we !== void 0 ? we : M.useLayoutEffect : () => {
664
+ };
665
+ function Bo(e, t, o) {
666
+ let [n, r] = re(e || t), a = y(n), i = y(e !== void 0), l = e !== void 0;
667
+ D(() => {
668
+ let d = i.current;
669
+ d !== l && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${d ? "controlled" : "uncontrolled"} to ${l ? "controlled" : "uncontrolled"}.`), i.current = l;
670
+ }, [
671
+ l
672
+ ]);
673
+ let s = l ? e : n;
674
+ Co(() => {
675
+ a.current = s;
676
+ });
677
+ let [, u] = Dt(() => ({}), {}), f = x((d, ...m) => {
678
+ let p = typeof d == "function" ? d(a.current) : d;
679
+ Object.is(a.current, p) || (a.current = p, r(p), u(), o?.(p, ...m));
680
+ }, [
681
+ o
682
+ ]);
683
+ return [
684
+ s,
685
+ f
686
+ ];
687
+ }
688
+ function pt(e) {
689
+ let t = e;
690
+ return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
691
+ }, t;
692
+ }
693
+ function Oo(e, t) {
694
+ Object.defineProperty(e, "target", {
695
+ value: t
696
+ }), Object.defineProperty(e, "currentTarget", {
697
+ value: t
698
+ });
699
+ }
700
+ function Ro(e) {
701
+ let t = y({
702
+ isFocused: !1,
703
+ observer: null
704
+ });
705
+ return N(() => {
706
+ const o = t.current;
707
+ return () => {
708
+ o.observer && (o.observer.disconnect(), o.observer = null);
709
+ };
710
+ }, []), x((o) => {
711
+ let n = k(o);
712
+ if (n instanceof HTMLButtonElement || n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement) {
713
+ t.current.isFocused = !0;
714
+ let r = n, a = (i) => {
715
+ if (t.current.isFocused = !1, r.disabled) {
716
+ let l = pt(i);
717
+ e?.(l);
718
+ }
719
+ t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
720
+ };
721
+ r.addEventListener("focusout", a, {
722
+ once: !0
723
+ }), t.current.observer = new MutationObserver(() => {
724
+ if (t.current.isFocused && r.disabled) {
725
+ var i;
726
+ (i = t.current.observer) === null || i === void 0 || i.disconnect();
727
+ let l = r === S() ? null : S();
728
+ r.dispatchEvent(new FocusEvent("blur", {
729
+ relatedTarget: l
730
+ })), r.dispatchEvent(new FocusEvent("focusout", {
731
+ bubbles: !0,
732
+ relatedTarget: l
733
+ }));
734
+ }
735
+ }), t.current.observer.observe(r, {
736
+ attributes: !0,
737
+ attributeFilter: [
738
+ "disabled"
739
+ ]
740
+ });
741
+ }
742
+ }, [
743
+ e
744
+ ]);
745
+ }
746
+ let Do = !1;
747
+ const bt = M.createContext({
748
+ register: () => {
749
+ }
750
+ });
751
+ bt.displayName = "PressResponderContext";
752
+ let ae = null;
753
+ const Io = /* @__PURE__ */ new Set();
754
+ let ee = /* @__PURE__ */ new Map(), j = !1, Pe = !1;
755
+ function Re(e, t) {
756
+ for (let o of Io) o(e, t);
757
+ }
758
+ function Ao(e) {
759
+ return !(e.metaKey || !oe() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
760
+ }
761
+ function ce(e) {
762
+ j = !0, !ne.isOpening && Ao(e) && (ae = "keyboard", Re("keyboard", e));
763
+ }
764
+ function C(e) {
765
+ ae = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (j = !0, Re("pointer", e));
766
+ }
767
+ function gt(e) {
768
+ !ne.isOpening && ko(e) && (j = !0, ae = "virtual");
769
+ }
770
+ function vt(e) {
771
+ k(e) === window || k(e) === document || Do || !e.isTrusted || (!j && !Pe && (ae = "virtual", Re("virtual", e)), j = !1, Pe = !1);
772
+ }
773
+ function ht() {
774
+ j = !1, Pe = !0;
775
+ }
776
+ function qe(e) {
777
+ if (typeof window > "u" || typeof document > "u" || ee.get(G(e))) return;
778
+ const t = G(e), o = P(e);
779
+ let n = t.HTMLElement.prototype.focus;
780
+ t.HTMLElement.prototype.focus = function() {
781
+ j = !0, n.apply(this, arguments);
782
+ }, o.addEventListener("keydown", ce, !0), o.addEventListener("keyup", ce, !0), o.addEventListener("click", gt, !0), t.addEventListener("focus", vt, !0), t.addEventListener("blur", ht, !1), typeof PointerEvent < "u" ? (o.addEventListener("pointerdown", C, !0), o.addEventListener("pointermove", C, !0), o.addEventListener("pointerup", C, !0)) : process.env.NODE_ENV === "test" && (o.addEventListener("mousedown", C, !0), o.addEventListener("mousemove", C, !0), o.addEventListener("mouseup", C, !0)), t.addEventListener("beforeunload", () => {
783
+ $t(e);
784
+ }, {
785
+ once: !0
786
+ }), ee.set(t, {
787
+ focus: n
788
+ });
789
+ }
790
+ const $t = (e, t) => {
791
+ const o = G(e), n = P(e);
792
+ t && n.removeEventListener("DOMContentLoaded", t), ee.has(o) && (o.HTMLElement.prototype.focus = ee.get(o).focus, n.removeEventListener("keydown", ce, !0), n.removeEventListener("keyup", ce, !0), n.removeEventListener("click", gt, !0), o.removeEventListener("focus", vt, !0), o.removeEventListener("blur", ht, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", C, !0), n.removeEventListener("pointermove", C, !0), n.removeEventListener("pointerup", C, !0)) : process.env.NODE_ENV === "test" && (n.removeEventListener("mousedown", C, !0), n.removeEventListener("mousemove", C, !0), n.removeEventListener("mouseup", C, !0)), ee.delete(o));
793
+ };
794
+ function Wo(e) {
795
+ const t = P(e);
796
+ let o;
797
+ return t.readyState !== "loading" ? qe(e) : (o = () => {
798
+ qe(e);
799
+ }, t.addEventListener("DOMContentLoaded", o)), () => $t(e, o);
800
+ }
801
+ typeof document < "u" && Wo();
802
+ function wt() {
803
+ return ae;
804
+ }
805
+ function Ne(e) {
806
+ if (!e.isConnected) return;
807
+ const t = P(e);
808
+ if (wt() === "virtual") {
809
+ let o = S(t);
810
+ Eo(() => {
811
+ const n = S(t);
812
+ (n === o || n === t.body) && e.isConnected && ye(e);
813
+ });
814
+ } else ye(e);
815
+ }
816
+ function Vo({ children: e }) {
817
+ let t = Y(() => ({
818
+ register: () => {
819
+ }
820
+ }), []);
821
+ return /* @__PURE__ */ M.createElement(bt.Provider, {
822
+ value: t
823
+ }, e);
824
+ }
825
+ function Ho(e) {
826
+ let { isDisabled: t, onBlurWithin: o, onFocusWithin: n, onFocusWithinChange: r } = e, a = y({
827
+ isFocusWithin: !1
828
+ }), { addGlobalListener: i, removeAllGlobalListeners: l } = _o(), s = x((d) => {
829
+ B(d.currentTarget, k(d)) && a.current.isFocusWithin && !B(d.currentTarget, d.relatedTarget) && (a.current.isFocusWithin = !1, l(), o && o(d), r && r(!1));
830
+ }, [
831
+ o,
832
+ r,
833
+ a,
834
+ l
835
+ ]), u = Ro(s), f = x((d) => {
836
+ if (!B(d.currentTarget, k(d))) return;
837
+ let m = k(d);
838
+ const p = P(m), v = S(p);
839
+ if (!a.current.isFocusWithin && v === m) {
840
+ n && n(d), r && r(!0), a.current.isFocusWithin = !0, u(d);
841
+ let g = d.currentTarget;
842
+ i(p, "focus", (L) => {
843
+ let b = k(L);
844
+ if (a.current.isFocusWithin && !B(g, b)) {
845
+ let h = new p.defaultView.FocusEvent("blur", {
846
+ relatedTarget: b
847
+ });
848
+ Oo(h, g);
849
+ let $ = pt(h);
850
+ s($);
851
+ }
852
+ }, {
853
+ capture: !0
854
+ });
855
+ }
856
+ }, [
857
+ n,
858
+ r,
859
+ u,
860
+ i,
861
+ s
862
+ ]);
863
+ return t ? {
864
+ focusWithinProps: {
865
+ // These cannot be null, that would conflict in mergeProps
866
+ onFocus: void 0,
867
+ onBlur: void 0
868
+ }
869
+ } : {
870
+ focusWithinProps: {
871
+ onFocus: f,
872
+ onBlur: s
873
+ }
874
+ };
875
+ }
876
+ function zo(e) {
877
+ let { ref: t, onInteractOutside: o, isDisabled: n, onInteractOutsideStart: r } = e, a = y({
878
+ isPointerDown: !1,
879
+ ignoreEmulatedMouseEvents: !1
880
+ }), i = Ke((s) => {
881
+ o && le(s, t) && (r && r(s), a.current.isPointerDown = !0);
882
+ }), l = Ke((s) => {
883
+ o && o(s);
884
+ });
885
+ D(() => {
886
+ let s = a.current;
887
+ if (n) return;
888
+ const u = t.current, f = P(u);
889
+ if (typeof PointerEvent < "u") {
890
+ let d = (m) => {
891
+ s.isPointerDown && le(m, t) && l(m), s.isPointerDown = !1;
892
+ };
893
+ return f.addEventListener("pointerdown", i, !0), f.addEventListener("click", d, !0), () => {
894
+ f.removeEventListener("pointerdown", i, !0), f.removeEventListener("click", d, !0);
895
+ };
896
+ } else if (process.env.NODE_ENV === "test") {
897
+ let d = (p) => {
898
+ s.ignoreEmulatedMouseEvents ? s.ignoreEmulatedMouseEvents = !1 : s.isPointerDown && le(p, t) && l(p), s.isPointerDown = !1;
899
+ }, m = (p) => {
900
+ s.ignoreEmulatedMouseEvents = !0, s.isPointerDown && le(p, t) && l(p), s.isPointerDown = !1;
901
+ };
902
+ return f.addEventListener("mousedown", i, !0), f.addEventListener("mouseup", d, !0), f.addEventListener("touchstart", i, !0), f.addEventListener("touchend", m, !0), () => {
903
+ f.removeEventListener("mousedown", i, !0), f.removeEventListener("mouseup", d, !0), f.removeEventListener("touchstart", i, !0), f.removeEventListener("touchend", m, !0);
904
+ };
905
+ }
906
+ }, [
907
+ t,
908
+ n
909
+ ]);
910
+ }
911
+ function le(e, t) {
912
+ if (e.button > 0) return !1;
913
+ let o = k(e);
914
+ if (o) {
915
+ const n = o.ownerDocument;
916
+ if (!n || !B(n.documentElement, o) || o.closest("[data-react-aria-top-layer]")) return !1;
917
+ }
918
+ return t.current ? !e.composedPath().includes(t.current) : !1;
919
+ }
920
+ const je = /* @__PURE__ */ M.createContext(null), Le = "react-aria-focus-scope-restore";
921
+ let _ = null;
922
+ function Ko(e) {
923
+ let { children: t, contain: o, restoreFocus: n, autoFocus: r } = e, a = y(null), i = y(null), l = y([]), { parentNode: s } = J(je) || {}, u = Y(() => new xe({
924
+ scopeRef: l
925
+ }), [
926
+ l
927
+ ]);
928
+ N(() => {
929
+ let m = s || T.root;
930
+ if (T.getTreeNode(m.scopeRef) && _ && !fe(_, m.scopeRef)) {
931
+ let p = T.getTreeNode(_);
932
+ p && (m = p);
933
+ }
934
+ m.addChild(u), T.addNode(u);
935
+ }, [
936
+ u,
937
+ s
938
+ ]), N(() => {
939
+ let m = T.getTreeNode(l);
940
+ m && (m.contain = !!o);
941
+ }, [
942
+ o
943
+ ]), N(() => {
944
+ var m;
945
+ let p = (m = a.current) === null || m === void 0 ? void 0 : m.nextSibling, v = [], g = (L) => L.stopPropagation();
946
+ for (; p && p !== i.current; )
947
+ v.push(p), p.addEventListener(Le, g), p = p.nextSibling;
948
+ return l.current = v, () => {
949
+ for (let L of v) L.removeEventListener(Le, g);
950
+ };
951
+ }, [
952
+ t
953
+ ]), Qo(l, n, o), Go(l, o), Zo(l, n, o), Xo(l, r), D(() => {
954
+ const m = S(P(l.current ? l.current[0] : void 0));
955
+ let p = null;
956
+ if (O(m, l.current)) {
957
+ for (let v of T.traverse()) v.scopeRef && O(m, v.scopeRef.current) && (p = v);
958
+ p === T.getTreeNode(l) && (_ = p.scopeRef);
959
+ }
960
+ }, [
961
+ l
962
+ ]), N(() => () => {
963
+ var m, p, v;
964
+ let g = (v = (p = T.getTreeNode(l)) === null || p === void 0 || (m = p.parent) === null || m === void 0 ? void 0 : m.scopeRef) !== null && v !== void 0 ? v : null;
965
+ (l === _ || fe(l, _)) && (!g || T.getTreeNode(g)) && (_ = g), T.removeTreeNode(l);
966
+ }, [
967
+ l
968
+ ]);
969
+ let f = Y(() => qo(l), []), d = Y(() => ({
970
+ focusManager: f,
971
+ parentNode: u
972
+ }), [
973
+ u,
974
+ f
975
+ ]);
976
+ return /* @__PURE__ */ M.createElement(je.Provider, {
977
+ value: d
978
+ }, /* @__PURE__ */ M.createElement("span", {
979
+ "data-focus-scope-start": !0,
980
+ hidden: !0,
981
+ ref: a
982
+ }), t, /* @__PURE__ */ M.createElement("span", {
983
+ "data-focus-scope-end": !0,
984
+ hidden: !0,
985
+ ref: i
986
+ }));
987
+ }
988
+ function qo(e) {
989
+ return {
990
+ focusNext(t = {}) {
991
+ let o = e.current, { from: n, tabbable: r, wrap: a, accept: i } = t;
992
+ var l;
993
+ let s = n || S(P((l = o[0]) !== null && l !== void 0 ? l : void 0)), u = o[0].previousElementSibling, f = q(o), d = K(f, {
994
+ tabbable: r,
995
+ accept: i
996
+ }, o);
997
+ d.currentNode = O(s, o) ? s : u;
998
+ let m = d.nextNode();
999
+ return !m && a && (d.currentNode = u, m = d.nextNode()), m && W(m, !0), m;
1000
+ },
1001
+ focusPrevious(t = {}) {
1002
+ let o = e.current, { from: n, tabbable: r, wrap: a, accept: i } = t;
1003
+ var l;
1004
+ let s = n || S(P((l = o[0]) !== null && l !== void 0 ? l : void 0)), u = o[o.length - 1].nextElementSibling, f = q(o), d = K(f, {
1005
+ tabbable: r,
1006
+ accept: i
1007
+ }, o);
1008
+ d.currentNode = O(s, o) ? s : u;
1009
+ let m = d.previousNode();
1010
+ return !m && a && (d.currentNode = u, m = d.previousNode()), m && W(m, !0), m;
1011
+ },
1012
+ focusFirst(t = {}) {
1013
+ let o = e.current, { tabbable: n, accept: r } = t, a = q(o), i = K(a, {
1014
+ tabbable: n,
1015
+ accept: r
1016
+ }, o);
1017
+ i.currentNode = o[0].previousElementSibling;
1018
+ let l = i.nextNode();
1019
+ return l && W(l, !0), l;
1020
+ },
1021
+ focusLast(t = {}) {
1022
+ let o = e.current, { tabbable: n, accept: r } = t, a = q(o), i = K(a, {
1023
+ tabbable: n,
1024
+ accept: r
1025
+ }, o);
1026
+ i.currentNode = o[o.length - 1].nextElementSibling;
1027
+ let l = i.previousNode();
1028
+ return l && W(l, !0), l;
1029
+ }
1030
+ };
1031
+ }
1032
+ function q(e) {
1033
+ return e[0].parentElement;
1034
+ }
1035
+ function Z(e) {
1036
+ let t = T.getTreeNode(_);
1037
+ for (; t && t.scopeRef !== e; ) {
1038
+ if (t.contain) return !1;
1039
+ t = t.parent;
1040
+ }
1041
+ return !0;
1042
+ }
1043
+ function jo(e) {
1044
+ if (!e.form)
1045
+ return Array.from(P(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((n) => !n.form);
1046
+ const t = e.form.elements.namedItem(e.name);
1047
+ let o = G(e);
1048
+ return t instanceof o.RadioNodeList ? Array.from(t).filter((n) => n instanceof o.HTMLInputElement) : t instanceof o.HTMLInputElement ? [
1049
+ t
1050
+ ] : [];
1051
+ }
1052
+ function Uo(e) {
1053
+ if (e.checked) return !0;
1054
+ const t = jo(e);
1055
+ return t.length > 0 && !t.some((o) => o.checked);
1056
+ }
1057
+ function Go(e, t) {
1058
+ let o = y(void 0), n = y(void 0);
1059
+ N(() => {
1060
+ let r = e.current;
1061
+ if (!t) {
1062
+ n.current && (cancelAnimationFrame(n.current), n.current = void 0);
1063
+ return;
1064
+ }
1065
+ const a = P(r ? r[0] : void 0);
1066
+ let i = (u) => {
1067
+ if (u.key !== "Tab" || u.altKey || u.ctrlKey || u.metaKey || !Z(e) || u.isComposing) return;
1068
+ let f = S(a), d = e.current;
1069
+ if (!d || !O(f, d)) return;
1070
+ let m = q(d), p = K(m, {
1071
+ tabbable: !0
1072
+ }, d);
1073
+ if (!f) return;
1074
+ p.currentNode = f;
1075
+ let v = u.shiftKey ? p.previousNode() : p.nextNode();
1076
+ v || (p.currentNode = u.shiftKey ? d[d.length - 1].nextElementSibling : d[0].previousElementSibling, v = u.shiftKey ? p.previousNode() : p.nextNode()), u.preventDefault(), v && W(v, !0);
1077
+ }, l = (u) => {
1078
+ (!_ || fe(_, e)) && O(k(u), e.current) ? (_ = e, o.current = k(u)) : Z(e) && !z(k(u), e) ? o.current ? o.current.focus() : _ && _.current && Se(_.current) : Z(e) && (o.current = k(u));
1079
+ }, s = (u) => {
1080
+ n.current && cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
1081
+ let f = wt(), d = (f === "virtual" || f === null) && ct() && ut(), m = S(a);
1082
+ if (!d && m && Z(e) && !z(m, e)) {
1083
+ _ = e;
1084
+ let v = k(u);
1085
+ if (v && v.isConnected) {
1086
+ var p;
1087
+ o.current = v, (p = o.current) === null || p === void 0 || p.focus();
1088
+ } else _.current && Se(_.current);
1089
+ }
1090
+ });
1091
+ };
1092
+ return a.addEventListener("keydown", i, !1), a.addEventListener("focusin", l, !1), r?.forEach((u) => u.addEventListener("focusin", l, !1)), r?.forEach((u) => u.addEventListener("focusout", s, !1)), () => {
1093
+ a.removeEventListener("keydown", i, !1), a.removeEventListener("focusin", l, !1), r?.forEach((u) => u.removeEventListener("focusin", l, !1)), r?.forEach((u) => u.removeEventListener("focusout", s, !1));
1094
+ };
1095
+ }, [
1096
+ e,
1097
+ t
1098
+ ]), N(() => () => {
1099
+ n.current && cancelAnimationFrame(n.current);
1100
+ }, [
1101
+ n
1102
+ ]);
1103
+ }
1104
+ function Et(e) {
1105
+ return z(e);
1106
+ }
1107
+ function O(e, t) {
1108
+ return !e || !t ? !1 : t.some((o) => B(o, e));
1109
+ }
1110
+ function z(e, t = null) {
1111
+ if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
1112
+ for (let { scopeRef: o } of T.traverse(T.getTreeNode(t)))
1113
+ if (o && O(e, o.current)) return !0;
1114
+ return !1;
1115
+ }
1116
+ function Jo(e) {
1117
+ return z(e, _);
1118
+ }
1119
+ function fe(e, t) {
1120
+ var o;
1121
+ let n = (o = T.getTreeNode(t)) === null || o === void 0 ? void 0 : o.parent;
1122
+ for (; n; ) {
1123
+ if (n.scopeRef === e) return !0;
1124
+ n = n.parent;
1125
+ }
1126
+ return !1;
1127
+ }
1128
+ function W(e, t = !1) {
1129
+ if (e != null && !t) try {
1130
+ Ne(e);
1131
+ } catch {
1132
+ }
1133
+ else if (e != null) try {
1134
+ e.focus();
1135
+ } catch {
1136
+ }
1137
+ }
1138
+ function _t(e, t = !0) {
1139
+ let o = e[0].previousElementSibling, n = q(e), r = K(n, {
1140
+ tabbable: t
1141
+ }, e);
1142
+ r.currentNode = o;
1143
+ let a = r.nextNode();
1144
+ return t && !a && (n = q(e), r = K(n, {
1145
+ tabbable: !1
1146
+ }, e), r.currentNode = o, a = r.nextNode()), a;
1147
+ }
1148
+ function Se(e, t = !0) {
1149
+ W(_t(e, t));
1150
+ }
1151
+ function Xo(e, t) {
1152
+ const o = M.useRef(t);
1153
+ D(() => {
1154
+ if (o.current) {
1155
+ _ = e;
1156
+ const n = P(e.current ? e.current[0] : void 0);
1157
+ !O(S(n), _.current) && e.current && Se(e.current);
1158
+ }
1159
+ o.current = !1;
1160
+ }, [
1161
+ e
1162
+ ]);
1163
+ }
1164
+ function Qo(e, t, o) {
1165
+ N(() => {
1166
+ if (t || o) return;
1167
+ let n = e.current;
1168
+ const r = P(n ? n[0] : void 0);
1169
+ let a = (i) => {
1170
+ let l = k(i);
1171
+ O(l, e.current) ? _ = e : Et(l) || (_ = null);
1172
+ };
1173
+ return r.addEventListener("focusin", a, !1), n?.forEach((i) => i.addEventListener("focusin", a, !1)), () => {
1174
+ r.removeEventListener("focusin", a, !1), n?.forEach((i) => i.removeEventListener("focusin", a, !1));
1175
+ };
1176
+ }, [
1177
+ e,
1178
+ t,
1179
+ o
1180
+ ]);
1181
+ }
1182
+ function Ue(e) {
1183
+ let t = T.getTreeNode(_);
1184
+ for (; t && t.scopeRef !== e; ) {
1185
+ if (t.nodeToRestore) return !1;
1186
+ t = t.parent;
1187
+ }
1188
+ return t?.scopeRef === e;
1189
+ }
1190
+ function Zo(e, t, o) {
1191
+ const n = y(typeof document < "u" ? S(P(e.current ? e.current[0] : void 0)) : null);
1192
+ N(() => {
1193
+ let r = e.current;
1194
+ const a = P(r ? r[0] : void 0);
1195
+ if (!t || o) return;
1196
+ let i = () => {
1197
+ (!_ || fe(_, e)) && O(S(a), e.current) && (_ = e);
1198
+ };
1199
+ return a.addEventListener("focusin", i, !1), r?.forEach((l) => l.addEventListener("focusin", i, !1)), () => {
1200
+ a.removeEventListener("focusin", i, !1), r?.forEach((l) => l.removeEventListener("focusin", i, !1));
1201
+ };
1202
+ }, [
1203
+ e,
1204
+ o
1205
+ ]), N(() => {
1206
+ const r = P(e.current ? e.current[0] : void 0);
1207
+ if (!t) return;
1208
+ let a = (i) => {
1209
+ if (i.key !== "Tab" || i.altKey || i.ctrlKey || i.metaKey || !Z(e) || i.isComposing) return;
1210
+ let l = r.activeElement;
1211
+ if (!z(l, e) || !Ue(e)) return;
1212
+ let s = T.getTreeNode(e);
1213
+ if (!s) return;
1214
+ let u = s.nodeToRestore, f = K(r.body, {
1215
+ tabbable: !0
1216
+ });
1217
+ f.currentNode = l;
1218
+ let d = i.shiftKey ? f.previousNode() : f.nextNode();
1219
+ if ((!u || !u.isConnected || u === r.body) && (u = void 0, s.nodeToRestore = void 0), (!d || !z(d, e)) && u) {
1220
+ f.currentNode = u;
1221
+ do
1222
+ d = i.shiftKey ? f.previousNode() : f.nextNode();
1223
+ while (z(d, e));
1224
+ i.preventDefault(), i.stopPropagation(), d ? W(d, !0) : Et(u) ? W(u, !0) : l.blur();
1225
+ }
1226
+ };
1227
+ return o || r.addEventListener("keydown", a, !0), () => {
1228
+ o || r.removeEventListener("keydown", a, !0);
1229
+ };
1230
+ }, [
1231
+ e,
1232
+ t,
1233
+ o
1234
+ ]), N(() => {
1235
+ const r = P(e.current ? e.current[0] : void 0);
1236
+ if (!t) return;
1237
+ let a = T.getTreeNode(e);
1238
+ if (a) {
1239
+ var i;
1240
+ return a.nodeToRestore = (i = n.current) !== null && i !== void 0 ? i : void 0, () => {
1241
+ let l = T.getTreeNode(e);
1242
+ if (!l) return;
1243
+ let s = l.nodeToRestore, u = S(r);
1244
+ if (t && s && (u && z(u, e) || u === r.body && Ue(e))) {
1245
+ let f = T.clone();
1246
+ requestAnimationFrame(() => {
1247
+ if (r.activeElement === r.body) {
1248
+ let d = f.getTreeNode(e);
1249
+ for (; d; ) {
1250
+ if (d.nodeToRestore && d.nodeToRestore.isConnected) {
1251
+ Ge(d.nodeToRestore);
1252
+ return;
1253
+ }
1254
+ d = d.parent;
1255
+ }
1256
+ for (d = f.getTreeNode(e); d; ) {
1257
+ if (d.scopeRef && d.scopeRef.current && T.getTreeNode(d.scopeRef)) {
1258
+ let m = _t(d.scopeRef.current, !0);
1259
+ Ge(m);
1260
+ return;
1261
+ }
1262
+ d = d.parent;
1263
+ }
1264
+ }
1265
+ });
1266
+ }
1267
+ };
1268
+ }
1269
+ }, [
1270
+ e,
1271
+ t
1272
+ ]);
1273
+ }
1274
+ function Ge(e) {
1275
+ e.dispatchEvent(new CustomEvent(Le, {
1276
+ bubbles: !0,
1277
+ cancelable: !0
1278
+ })) && W(e);
1279
+ }
1280
+ function K(e, t, o) {
1281
+ let n = t?.tabbable ? Fo : xo, r = e?.nodeType === Node.ELEMENT_NODE ? e : null, a = P(r), i = it(a, e || a, NodeFilter.SHOW_ELEMENT, {
1282
+ acceptNode(l) {
1283
+ return B(t?.from, l) || t?.tabbable && l.tagName === "INPUT" && l.getAttribute("type") === "radio" && (!Uo(l) || i.currentNode.tagName === "INPUT" && i.currentNode.type === "radio" && i.currentNode.name === l.name) ? NodeFilter.FILTER_REJECT : n(l) && (!o || O(l, o)) && (!t?.accept || t.accept(l)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1284
+ }
1285
+ });
1286
+ return t?.from && (i.currentNode = t.from), i;
1287
+ }
1288
+ class De {
1289
+ get size() {
1290
+ return this.fastMap.size;
1291
+ }
1292
+ getTreeNode(t) {
1293
+ return this.fastMap.get(t);
1294
+ }
1295
+ addTreeNode(t, o, n) {
1296
+ let r = this.fastMap.get(o ?? null);
1297
+ if (!r) return;
1298
+ let a = new xe({
1299
+ scopeRef: t
1300
+ });
1301
+ r.addChild(a), a.parent = r, this.fastMap.set(t, a), n && (a.nodeToRestore = n);
1302
+ }
1303
+ addNode(t) {
1304
+ this.fastMap.set(t.scopeRef, t);
1305
+ }
1306
+ removeTreeNode(t) {
1307
+ if (t === null) return;
1308
+ let o = this.fastMap.get(t);
1309
+ if (!o) return;
1310
+ let n = o.parent;
1311
+ for (let a of this.traverse()) a !== o && o.nodeToRestore && a.nodeToRestore && o.scopeRef && o.scopeRef.current && O(a.nodeToRestore, o.scopeRef.current) && (a.nodeToRestore = o.nodeToRestore);
1312
+ let r = o.children;
1313
+ n && (n.removeChild(o), r.size > 0 && r.forEach((a) => n && n.addChild(a))), this.fastMap.delete(o.scopeRef);
1314
+ }
1315
+ // Pre Order Depth First
1316
+ *traverse(t = this.root) {
1317
+ if (t.scopeRef != null && (yield t), t.children.size > 0) for (let o of t.children) yield* this.traverse(o);
1318
+ }
1319
+ clone() {
1320
+ var t;
1321
+ let o = new De();
1322
+ var n;
1323
+ for (let r of this.traverse()) o.addTreeNode(r.scopeRef, (n = (t = r.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && n !== void 0 ? n : null, r.nodeToRestore);
1324
+ return o;
1325
+ }
1326
+ constructor() {
1327
+ this.fastMap = /* @__PURE__ */ new Map(), this.root = new xe({
1328
+ scopeRef: null
1329
+ }), this.fastMap.set(null, this.root);
1330
+ }
1331
+ }
1332
+ class xe {
1333
+ addChild(t) {
1334
+ this.children.add(t), t.parent = this;
1335
+ }
1336
+ removeChild(t) {
1337
+ this.children.delete(t), t.parent = void 0;
1338
+ }
1339
+ constructor(t) {
1340
+ this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
1341
+ }
1342
+ }
1343
+ let T = new De();
1344
+ const Yo = /* @__PURE__ */ new WeakMap(), R = [];
1345
+ function en(e, t) {
1346
+ let { onClose: o, shouldCloseOnBlur: n, isOpen: r, isDismissable: a = !1, isKeyboardDismissDisabled: i = !1, shouldCloseOnInteractOutside: l } = e, s = y(void 0);
1347
+ D(() => {
1348
+ if (r && !R.includes(t))
1349
+ return R.push(t), () => {
1350
+ let g = R.indexOf(t);
1351
+ g >= 0 && R.splice(g, 1);
1352
+ };
1353
+ }, [
1354
+ r,
1355
+ t
1356
+ ]);
1357
+ let u = () => {
1358
+ R[R.length - 1] === t && o && o();
1359
+ }, f = (g) => {
1360
+ const L = R[R.length - 1];
1361
+ s.current = L, (!l || l(k(g))) && L === t && (g.stopPropagation(), g.preventDefault());
1362
+ }, d = (g) => {
1363
+ (!l || l(k(g))) && (R[R.length - 1] === t && (g.stopPropagation(), g.preventDefault()), s.current === t && u()), s.current = void 0;
1364
+ }, m = (g) => {
1365
+ g.key === "Escape" && !i && !g.nativeEvent.isComposing && (g.stopPropagation(), g.preventDefault(), u());
1366
+ };
1367
+ zo({
1368
+ ref: t,
1369
+ onInteractOutside: a && r ? d : void 0,
1370
+ onInteractOutsideStart: f
1371
+ });
1372
+ let { focusWithinProps: p } = Ho({
1373
+ isDisabled: !n,
1374
+ onBlurWithin: (g) => {
1375
+ !g.relatedTarget || Jo(g.relatedTarget) || (!l || l(g.relatedTarget)) && o?.();
1376
+ }
1377
+ }), v = (g) => {
1378
+ k(g) === g.currentTarget && g.preventDefault();
1379
+ };
1380
+ return {
1381
+ overlayProps: {
1382
+ onKeyDown: m,
1383
+ ...p
1384
+ },
1385
+ underlayProps: {
1386
+ onPointerDown: v
1387
+ }
1388
+ };
1389
+ }
1390
+ function tn(e, t, o) {
1391
+ let { isOpen: n } = t;
1392
+ D(() => {
1393
+ o && o.current && Yo.set(o.current, t.close);
1394
+ });
1395
+ let r, a = at();
1396
+ return {
1397
+ triggerProps: {
1398
+ "aria-haspopup": r,
1399
+ "aria-expanded": n,
1400
+ "aria-controls": n ? a : void 0,
1401
+ onPress: t.toggle
1402
+ },
1403
+ overlayProps: {
1404
+ id: a
1405
+ }
1406
+ };
1407
+ }
1408
+ const te = typeof document < "u" && window.visualViewport;
1409
+ let se = 0, Ee;
1410
+ function on(e = {}) {
1411
+ let { isDisabled: t } = e;
1412
+ N(() => {
1413
+ if (!t)
1414
+ return se++, se === 1 && (dt() ? Ee = rn() : Ee = nn()), () => {
1415
+ se--, se === 0 && Ee();
1416
+ };
1417
+ }, [
1418
+ t
1419
+ ]);
1420
+ }
1421
+ function nn() {
1422
+ let e = window.innerWidth - document.documentElement.clientWidth;
1423
+ return Fe(e > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
1424
+ ("scrollbarGutter" in document.documentElement.style ? de(document.documentElement, "scrollbarGutter", "stable") : de(document.documentElement, "paddingRight", `${e}px`)), de(document.documentElement, "overflow", "hidden"));
1425
+ }
1426
+ function rn() {
1427
+ let e = de(document.documentElement, "overflow", "hidden"), t, o = !1, n = (u) => {
1428
+ let f = k(u);
1429
+ t = Te(f) ? f : ft(f, !0), o = !1;
1430
+ let d = f.ownerDocument.defaultView.getSelection();
1431
+ d && !d.isCollapsed && d.containsNode(f, !0) && (o = !0), u.composedPath().some((m) => m instanceof HTMLInputElement && m.type === "range") && (o = !0), "selectionStart" in f && "selectionEnd" in f && f.selectionStart < f.selectionEnd && f.ownerDocument.activeElement === f && (o = !0);
1432
+ }, r = document.createElement("style");
1433
+ r.textContent = `
1434
+ @layer {
1435
+ * {
1436
+ overscroll-behavior: contain;
1437
+ }
1438
+ }`.trim(), document.head.prepend(r);
1439
+ let a = (u) => {
1440
+ if (!(u.touches.length === 2 || o)) {
1441
+ if (!t || t === document.documentElement || t === document.body) {
1442
+ u.preventDefault();
1443
+ return;
1444
+ }
1445
+ t.scrollHeight === t.clientHeight && t.scrollWidth === t.clientWidth && u.preventDefault();
1446
+ }
1447
+ }, i = (u) => {
1448
+ let f = k(u), d = u.relatedTarget;
1449
+ if (d && $e(d))
1450
+ d.focus({
1451
+ preventScroll: !0
1452
+ }), Je(d, $e(f));
1453
+ else if (!d) {
1454
+ var m;
1455
+ let p = (m = f.parentElement) === null || m === void 0 ? void 0 : m.closest("[tabindex]");
1456
+ p?.focus({
1457
+ preventScroll: !0
1458
+ });
1459
+ }
1460
+ }, l = HTMLElement.prototype.focus;
1461
+ HTMLElement.prototype.focus = function(u) {
1462
+ let f = S(), d = f != null && $e(f);
1463
+ l.call(this, {
1464
+ ...u,
1465
+ preventScroll: !0
1466
+ }), (!u || !u.preventScroll) && Je(this, d);
1467
+ };
1468
+ let s = Fe(_e(document, "touchstart", n, {
1469
+ passive: !1,
1470
+ capture: !0
1471
+ }), _e(document, "touchmove", a, {
1472
+ passive: !1,
1473
+ capture: !0
1474
+ }), _e(document, "blur", i, !0));
1475
+ return () => {
1476
+ e(), s(), r.remove(), HTMLElement.prototype.focus = l;
1477
+ };
1478
+ }
1479
+ function de(e, t, o) {
1480
+ let n = e.style[t];
1481
+ return e.style[t] = o, () => {
1482
+ e.style[t] = n;
1483
+ };
1484
+ }
1485
+ function _e(e, t, o, n) {
1486
+ return e.addEventListener(t, o, n), () => {
1487
+ e.removeEventListener(t, o, n);
1488
+ };
1489
+ }
1490
+ function Je(e, t) {
1491
+ t || !te ? Xe(e) : te.addEventListener("resize", () => Xe(e), {
1492
+ once: !0
1493
+ });
1494
+ }
1495
+ function Xe(e) {
1496
+ let t = document.scrollingElement || document.documentElement, o = e;
1497
+ for (; o && o !== t; ) {
1498
+ let n = ft(o);
1499
+ if (n !== document.documentElement && n !== document.body && n !== o) {
1500
+ let r = n.getBoundingClientRect(), a = o.getBoundingClientRect();
1501
+ if (a.top < r.top || a.bottom > r.top + o.clientHeight) {
1502
+ let i = r.bottom;
1503
+ te && (i = Math.min(i, te.offsetTop + te.height));
1504
+ let l = a.top - r.top - ((i - r.top) / 2 - a.height / 2);
1505
+ n.scrollTo({
1506
+ // Clamp to the valid range to prevent over-scrolling.
1507
+ top: Math.max(0, Math.min(n.scrollHeight - n.clientHeight, n.scrollTop + l)),
1508
+ behavior: "smooth"
1509
+ });
1510
+ }
1511
+ }
1512
+ o = n.parentElement;
1513
+ }
1514
+ }
1515
+ const an = /* @__PURE__ */ It({});
1516
+ function ln() {
1517
+ var e;
1518
+ return (e = J(an)) !== null && e !== void 0 ? e : {};
1519
+ }
1520
+ const sn = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
1521
+ let X = /* @__PURE__ */ new WeakMap(), F = [];
1522
+ function dn(e, t) {
1523
+ let o = G(e?.[0]), n = t instanceof o.Element ? {
1524
+ root: t
1525
+ } : t;
1526
+ var r;
1527
+ let a = (r = n?.root) !== null && r !== void 0 ? r : document.body, i = n?.shouldUseInert && sn, l = new Set(e), s = /* @__PURE__ */ new Set(), u = (b) => i && b instanceof o.HTMLElement ? b.inert : b.getAttribute("aria-hidden") === "true", f = (b, h) => {
1528
+ i && b instanceof o.HTMLElement ? b.inert = h : h ? b.setAttribute("aria-hidden", "true") : (b.removeAttribute("aria-hidden"), b instanceof o.HTMLElement && (b.inert = !1));
1529
+ }, d = /* @__PURE__ */ new Set();
1530
+ if (A())
1531
+ for (let b of e) {
1532
+ let h = b;
1533
+ for (; h && h !== a; ) {
1534
+ let $ = h.getRootNode();
1535
+ "shadowRoot" in $ && d.add($.shadowRoot), h = $.parentNode;
1536
+ }
1537
+ }
1538
+ let m = (b) => {
1539
+ for (let E of b.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) l.add(E);
1540
+ let h = (E) => {
1541
+ if (s.has(E) || l.has(E) || E.parentElement && s.has(E.parentElement) && E.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
1542
+ for (let pe of l)
1543
+ if (B(E, pe)) return NodeFilter.FILTER_SKIP;
1544
+ return NodeFilter.FILTER_ACCEPT;
1545
+ }, $ = it(P(b), b, NodeFilter.SHOW_ELEMENT, {
1546
+ acceptNode: h
1547
+ }), I = h(b);
1548
+ if (I === NodeFilter.FILTER_ACCEPT && p(b), I !== NodeFilter.FILTER_REJECT) {
1549
+ let E = $.nextNode();
1550
+ for (; E != null; )
1551
+ p(E), E = $.nextNode();
1552
+ }
1553
+ }, p = (b) => {
1554
+ var h;
1555
+ let $ = (h = X.get(b)) !== null && h !== void 0 ? h : 0;
1556
+ u(b) && $ === 0 || ($ === 0 && f(b, !0), s.add(b), X.set(b, $ + 1));
1557
+ };
1558
+ F.length && F[F.length - 1].disconnect(), m(a);
1559
+ let v = new MutationObserver((b) => {
1560
+ for (let h of b)
1561
+ if (h.type === "childList") {
1562
+ if (h.target.isConnected && ![
1563
+ ...l,
1564
+ ...s
1565
+ ].some(($) => B($, h.target))) for (let $ of h.addedNodes)
1566
+ ($ instanceof HTMLElement || $ instanceof SVGElement) && ($.dataset.liveAnnouncer === "true" || $.dataset.reactAriaTopLayer === "true") ? l.add($) : $ instanceof Element && m($);
1567
+ if (A()) {
1568
+ for (let $ of d) if (!$.isConnected) {
1569
+ v.disconnect();
1570
+ break;
1571
+ }
1572
+ }
1573
+ }
1574
+ });
1575
+ v.observe(a, {
1576
+ childList: !0,
1577
+ subtree: !0
1578
+ });
1579
+ let g = /* @__PURE__ */ new Set();
1580
+ if (A()) for (let b of d) {
1581
+ let h = new MutationObserver(($) => {
1582
+ for (let I of $)
1583
+ if (I.type === "childList") {
1584
+ if (I.target.isConnected && ![
1585
+ ...l,
1586
+ ...s
1587
+ ].some((E) => B(E, I.target))) for (let E of I.addedNodes)
1588
+ (E instanceof HTMLElement || E instanceof SVGElement) && (E.dataset.liveAnnouncer === "true" || E.dataset.reactAriaTopLayer === "true") ? l.add(E) : E instanceof Element && m(E);
1589
+ if (A()) {
1590
+ for (let E of d) if (!E.isConnected) {
1591
+ v.disconnect();
1592
+ break;
1593
+ }
1594
+ }
1595
+ }
1596
+ });
1597
+ h.observe(b, {
1598
+ childList: !0,
1599
+ subtree: !0
1600
+ }), g.add(h);
1601
+ }
1602
+ let L = {
1603
+ visibleNodes: l,
1604
+ hiddenNodes: s,
1605
+ observe() {
1606
+ v.observe(a, {
1607
+ childList: !0,
1608
+ subtree: !0
1609
+ });
1610
+ },
1611
+ disconnect() {
1612
+ v.disconnect();
1613
+ }
1614
+ };
1615
+ return F.push(L), () => {
1616
+ if (v.disconnect(), A()) for (let b of g) b.disconnect();
1617
+ for (let b of s) {
1618
+ let h = X.get(b);
1619
+ h != null && (h === 1 ? (f(b, !1), X.delete(b)) : X.set(b, h - 1));
1620
+ }
1621
+ L === F[F.length - 1] ? (F.pop(), F.length && F[F.length - 1].observe()) : F.splice(F.indexOf(L), 1);
1622
+ };
1623
+ }
1624
+ const Mt = /* @__PURE__ */ M.createContext(null);
1625
+ function un(e) {
1626
+ let t = rt(), { portalContainer: o = t ? null : document.body, isExiting: n } = e, [r, a] = re(!1), i = Y(() => ({
1627
+ contain: r,
1628
+ setContain: a
1629
+ }), [
1630
+ r,
1631
+ a
1632
+ ]), { getContainer: l } = ln();
1633
+ if (!e.portalContainer && l && (o = l()), !o) return null;
1634
+ let s = e.children;
1635
+ return e.disableFocusManagement || (s = /* @__PURE__ */ M.createElement(Ko, {
1636
+ restoreFocus: !0,
1637
+ contain: (e.shouldContainFocus || r) && !n
1638
+ }, s)), s = /* @__PURE__ */ M.createElement(Mt.Provider, {
1639
+ value: i
1640
+ }, /* @__PURE__ */ M.createElement(Vo, null, s)), /* @__PURE__ */ Wt.createPortal(s, o);
1641
+ }
1642
+ function yt() {
1643
+ let e = J(Mt), t = e?.setContain;
1644
+ N(() => {
1645
+ t?.(!0);
1646
+ }, [
1647
+ t
1648
+ ]);
1649
+ }
1650
+ function cn(e, t, o) {
1651
+ let { overlayProps: n, underlayProps: r } = en({
1652
+ ...e,
1653
+ isOpen: t.isOpen,
1654
+ onClose: t.close
1655
+ }, o);
1656
+ return on({
1657
+ isDisabled: !t.isOpen
1658
+ }), yt(), D(() => {
1659
+ if (t.isOpen && o.current) return dn([
1660
+ o.current
1661
+ ], {
1662
+ shouldUseInert: !0
1663
+ });
1664
+ }, [
1665
+ t.isOpen,
1666
+ o
1667
+ ]), {
1668
+ modalProps: io(n),
1669
+ underlayProps: r
1670
+ };
1671
+ }
1672
+ function fn(e, t) {
1673
+ let { role: o = "dialog" } = e, n = Yt();
1674
+ n = e["aria-label"] ? void 0 : n;
1675
+ let r = y(!1);
1676
+ return D(() => {
1677
+ if (t.current && !t.current.contains(document.activeElement)) {
1678
+ Ne(t.current);
1679
+ let a = setTimeout(() => {
1680
+ document.activeElement === t.current && (r.current = !0, t.current && (t.current.blur(), Ne(t.current)), r.current = !1);
1681
+ }, 500);
1682
+ return () => {
1683
+ clearTimeout(a);
1684
+ };
1685
+ }
1686
+ }, [
1687
+ t
1688
+ ]), yt(), {
1689
+ dialogProps: {
1690
+ ...mo(e, {
1691
+ labelable: !0
1692
+ }),
1693
+ role: o,
1694
+ tabIndex: -1,
1695
+ "aria-labelledby": e["aria-labelledby"] || n,
1696
+ // Prevent blur events from reaching useOverlay, which may cause
1697
+ // popovers to close. Since focus is contained within the dialog,
1698
+ // we don't want this to occur due to the above useEffect.
1699
+ onBlur: (a) => {
1700
+ r.current && a.stopPropagation();
1701
+ }
1702
+ },
1703
+ titleProps: {
1704
+ id: n
1705
+ }
1706
+ };
1707
+ }
1708
+ function mn(e, t, o) {
1709
+ return t in e ? Object.defineProperty(e, t, {
1710
+ value: o,
1711
+ enumerable: !0,
1712
+ configurable: !0,
1713
+ writable: !0
1714
+ }) : e[t] = o, e;
1715
+ }
1716
+ function Qe(e, t) {
1717
+ var o = Object.keys(e);
1718
+ if (Object.getOwnPropertySymbols) {
1719
+ var n = Object.getOwnPropertySymbols(e);
1720
+ t && (n = n.filter(function(r) {
1721
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
1722
+ })), o.push.apply(o, n);
1723
+ }
1724
+ return o;
1725
+ }
1726
+ function Ze(e) {
1727
+ for (var t = 1; t < arguments.length; t++) {
1728
+ var o = arguments[t] != null ? arguments[t] : {};
1729
+ t % 2 ? Qe(Object(o), !0).forEach(function(n) {
1730
+ mn(e, n, o[n]);
1731
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : Qe(Object(o)).forEach(function(n) {
1732
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(o, n));
1733
+ });
1734
+ }
1735
+ return e;
1736
+ }
1737
+ var pn = (e, t, o) => {
1738
+ for (var n of Object.keys(e)) {
1739
+ var r;
1740
+ if (e[n] !== ((r = t[n]) !== null && r !== void 0 ? r : o[n]))
1741
+ return !1;
1742
+ }
1743
+ return !0;
1744
+ }, kt = (e) => (t) => {
1745
+ var o = e.defaultClassName, n = Ze(Ze({}, e.defaultVariants), t);
1746
+ for (var r in n) {
1747
+ var a, i = (a = n[r]) !== null && a !== void 0 ? a : e.defaultVariants[r];
1748
+ if (i != null) {
1749
+ var l = i;
1750
+ typeof l == "boolean" && (l = l === !0 ? "true" : "false");
1751
+ var s = (
1752
+ // @ts-expect-error
1753
+ e.variantClassNames[r][l]
1754
+ );
1755
+ s && (o += " " + s);
1756
+ }
1757
+ }
1758
+ for (var [u, f] of e.compoundVariants)
1759
+ pn(u, n, e.defaultVariants) && (o += " " + f);
1760
+ return o;
1761
+ }, bn = kt({ defaultClassName: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto20", variantClassNames: { kind: { informational: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto21", delete: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto22", failure: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto23", success: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto24", warning: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto25", successWithFailures: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto26", form: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto27" }, size: { sm: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto28", md: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto29", lg: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2a", xl: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2b" }, fullHeight: { true: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2c", false: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2d" } }, defaultVariants: {}, compoundVariants: [] }), gn = kt({ defaultClassName: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2e", variantClassNames: { kind: { form: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2f", delete: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2g", failure: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2h", informational: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2i", success: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2j", warning: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2k", successWithFailures: "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2l" } }, defaultVariants: {}, compoundVariants: [] }), vn = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2m", hn = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2n", $n = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2o", Tt = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2p", wn = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2q", En = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2r", _n = "pkg_sps-woodland_modal__version_8_52_0__hash_3moto2s";
1762
+ function Pt({
1763
+ children: e,
1764
+ className: t = "",
1765
+ ...o
1766
+ }) {
1767
+ return /* @__PURE__ */ c.createElement("div", { className: Me(Tt, t), ...o }, e);
1768
+ }
1769
+ tt.set(Pt, { name: "ModalFooter" });
1770
+ function Ye({
1771
+ dismissableValue: e,
1772
+ handleClose: t
1773
+ }) {
1774
+ return e ? /* @__PURE__ */ c.createElement(
1775
+ ot,
1776
+ {
1777
+ "aria-label": "Close",
1778
+ onClick: t,
1779
+ kind: "icon",
1780
+ icon: "x",
1781
+ className: wn
1782
+ }
1783
+ ) : null;
1784
+ }
1785
+ const et = Object.freeze({
1786
+ form: "pencil",
1787
+ delete: "trash",
1788
+ failure: "status-error",
1789
+ informational: "info-circle",
1790
+ success: "status-ok",
1791
+ successWithFailures: "status-warning",
1792
+ warning: "status-warning"
1793
+ });
1794
+ function Mn({
1795
+ children: e,
1796
+ className: t,
1797
+ "data-testid": o,
1798
+ kind: n = "informational",
1799
+ onBlur: r,
1800
+ onFocus: a,
1801
+ overlayProps: i,
1802
+ size: l = "sm",
1803
+ state: s,
1804
+ title: u,
1805
+ dismissible: f,
1806
+ dismissable: d = !0,
1807
+ onClose: m,
1808
+ fullHeight: p = !1,
1809
+ ...v
1810
+ }) {
1811
+ const g = f ?? d, L = c.useRef(null), { modalProps: b, underlayProps: h } = cn(
1812
+ {
1813
+ isKeyboardDismissDisabled: !g,
1814
+ ...v
1815
+ },
1816
+ s,
1817
+ L
1818
+ ), { dialogProps: $, titleProps: I } = fn(v, L), E = We(b.onFocus, $.onFocus, a), pe = We(b.onBlur, $.onBlur, r), { t: Lt } = At(), St = Ct({ "data-testid": o }), [be, xt] = Bt(
1819
+ e,
1820
+ [{ type: Pt }]
1821
+ ), Ie = c.useCallback(() => {
1822
+ m && typeof m == "function" && m(), s.close();
1823
+ }, [m, s.close]), Ft = Ot(xt, (Ae) => Ae.type === Ye ? [{ className: Me(Ae.props.classname, En) }] : []);
1824
+ return /* @__PURE__ */ c.createElement(un, null, /* @__PURE__ */ c.createElement(
1825
+ "div",
1826
+ {
1827
+ className: _n,
1828
+ "data-react-aria-top-layer": "true",
1829
+ ...h,
1830
+ ...v
1831
+ },
1832
+ /* @__PURE__ */ c.createElement(
1833
+ "div",
1834
+ {
1835
+ ...b,
1836
+ ...$,
1837
+ ...i,
1838
+ onFocus: E,
1839
+ onBlur: pe,
1840
+ ...St("dialog"),
1841
+ ref: L,
1842
+ className: Me(bn({ kind: n, size: l, fullHeight: p }), t)
1843
+ },
1844
+ /* @__PURE__ */ c.createElement("div", { ...I, className: gn({ kind: n }) }, n && /* @__PURE__ */ c.createElement(
1845
+ Rt,
1846
+ {
1847
+ icon: et[n] || et.informational,
1848
+ className: hn
1849
+ }
1850
+ ), /* @__PURE__ */ c.createElement("div", { className: vn }, ge(u, s.close)), /* @__PURE__ */ c.createElement(Ye, { dismissableValue: g, handleClose: Ie })),
1851
+ /* @__PURE__ */ c.createElement("div", { className: $n }, ge(Ft, s.close)),
1852
+ be && be.length > 0 ? /* @__PURE__ */ c.createElement(c.Fragment, null, ge(be, s.close)) : /* @__PURE__ */ c.createElement("div", { className: Tt }, /* @__PURE__ */ c.createElement(ot, { kind: "key", onClick: Ie }, Lt("modal.defaultButtonLabel", { defaultValue: "Okay" })))
1853
+ )
1854
+ ));
1855
+ }
1856
+ function Nt(e) {
1857
+ return e.state.isOpen ? /* @__PURE__ */ c.createElement(Mn, { ...e }, e.children) : /* @__PURE__ */ c.createElement(c.Fragment, null);
1858
+ }
1859
+ tt.set(Nt, {
1860
+ name: "Modal",
1861
+ props: {
1862
+ dismissable: { type: "boolean", default: "true" },
1863
+ fullHeight: { type: "boolean", default: "false" },
1864
+ kind: { type: "ModalKind", default: "informational" },
1865
+ onBlur: { type: "() => void" },
1866
+ onClose: { type: "() => void" },
1867
+ onFocus: { type: "() => void" },
1868
+ size: { type: "ModalSize", default: "sm" },
1869
+ title: { type: "string" }
1870
+ }
1871
+ });
1872
+ function yn(e) {
1873
+ let [t, o] = Bo(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
1874
+ const n = x(() => {
1875
+ o(!0);
1876
+ }, [
1877
+ o
1878
+ ]), r = x(() => {
1879
+ o(!1);
1880
+ }, [
1881
+ o
1882
+ ]), a = x(() => {
1883
+ o(!t);
1884
+ }, [
1885
+ o,
1886
+ t
1887
+ ]);
1888
+ return {
1889
+ isOpen: t,
1890
+ setOpen: o,
1891
+ open: n,
1892
+ close: r,
1893
+ toggle: a
1894
+ };
1895
+ }
1896
+ function Fn(e = {}) {
1897
+ const t = yn(e), o = y(null), { triggerProps: n, overlayProps: r } = tn(
1898
+ {},
1899
+ t,
1900
+ o
1901
+ ), {
1902
+ onPress: a,
1903
+ ...i
1904
+ } = n;
1905
+ return {
1906
+ triggerProps: {
1907
+ ...i,
1908
+ // Forward event to onPress (types differ but handler doesn't inspect event)
1909
+ onClick: a ? (l) => a(l) : void 0,
1910
+ ref: o
1911
+ },
1912
+ modalState: t,
1913
+ modalProps: { overlayProps: r, state: t }
1914
+ };
1915
+ }
1916
+ const kn = {
1917
+ description: () => /* @__PURE__ */ c.createElement("p", null, "Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),
1918
+ components: [Nt],
8
1919
  examples: {
9
1920
  general: {
10
1921
  label: "Usage",
11
- description: ({ NavigateTo: t }) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h5", null, "Use a Modal:"), /* @__PURE__ */ o.createElement("ul", null, /* @__PURE__ */ o.createElement("li", null, "When the user needs to confirm a basic decision, such as deleting a record."), /* @__PURE__ */ o.createElement("li", null, "When important information needs to be displayed to the user before continuing."), /* @__PURE__ */ o.createElement("li", null, "When a simple selection, such as a single form input, is required before proceeding.")), /* @__PURE__ */ o.createElement("h5", null, "Avoid a Modal:"), /* @__PURE__ */ o.createElement("ul", null, /* @__PURE__ */ o.createElement("li", null, "When a complex form is required. Use a ", /* @__PURE__ */ o.createElement(t, { to: "focused-task" }, "Focused Task View"), " instead."), /* @__PURE__ */ o.createElement("li", null, "When sharing non-critical or tertiary information. Use a ", /* @__PURE__ */ o.createElement(t, { to: "growlers" }, "Growler"), " instead.")))
1922
+ description: ({ NavigateTo: e }) => /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("h5", null, "Use a Modal:"), /* @__PURE__ */ c.createElement("ul", null, /* @__PURE__ */ c.createElement("li", null, "When the user needs to confirm a basic decision, such as deleting a record."), /* @__PURE__ */ c.createElement("li", null, "When important information needs to be displayed to the user before continuing."), /* @__PURE__ */ c.createElement("li", null, "When a simple selection, such as a single form input, is required before proceeding.")), /* @__PURE__ */ c.createElement("h5", null, "Avoid a Modal:"), /* @__PURE__ */ c.createElement("ul", null, /* @__PURE__ */ c.createElement("li", null, "When a complex form is required. Use a ", /* @__PURE__ */ c.createElement(e, { to: "focused-task" }, "Focused Task View"), " instead."), /* @__PURE__ */ c.createElement("li", null, "When sharing non-critical or tertiary information. Use a ", /* @__PURE__ */ c.createElement(e, { to: "growlers" }, "Growler"), " instead.")))
12
1923
  },
13
1924
  implementation: {
14
1925
  label: "Close Button",
15
- description: () => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h5", null, "Close Button and Modal dismissiability"), /* @__PURE__ */ o.createElement("p", null, "Remove the Close Button in the upper right of the Modal if the user must choose the course of action before proceeding."), /* @__PURE__ */ o.createElement("p", null, "The close button is included by default and omitted when the prop ", /* @__PURE__ */ o.createElement("code", null, "dismissable"), " is set to ", /* @__PURE__ */ o.createElement("strong", null, "false"), "."), /* @__PURE__ */ o.createElement("p", null, "Setting the ", /* @__PURE__ */ o.createElement("code", null, "dismissable"), " prop to false also prevents dismissing the modal by clicking outside of the modal or by using the", " ", /* @__PURE__ */ o.createElement("strong", null, "escape"), " key.")),
1926
+ description: () => /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("h5", null, "Close Button and Modal dismissiability"), /* @__PURE__ */ c.createElement("p", null, "Remove the Close Button in the upper right of the Modal if the user must choose the course of action before proceeding."), /* @__PURE__ */ c.createElement("p", null, "The close button is included by default and omitted when the prop ", /* @__PURE__ */ c.createElement("code", null, "dismissable"), " is set to ", /* @__PURE__ */ c.createElement("strong", null, "false"), "."), /* @__PURE__ */ c.createElement("p", null, "Setting the ", /* @__PURE__ */ c.createElement("code", null, "dismissable"), " prop to false also prevents dismissing the modal by clicking outside of the modal or by using the", " ", /* @__PURE__ */ c.createElement("strong", null, "escape"), " key.")),
16
1927
  examples: {
17
1928
  basic: {
18
- react: e`
1929
+ react: w`
19
1930
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
20
1931
  import { sprinkles } from "@sps-woodland/tokens";
21
1932
  import { Button } from "@sps-woodland/buttons";
@@ -64,7 +1975,7 @@ const a = {
64
1975
  },
65
1976
  hooks: {
66
1977
  label: "Using Hooks",
67
- description: () => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h5", null, "Using the hook"), /* @__PURE__ */ o.createElement("p", null, "To use any modals, you must call the ", /* @__PURE__ */ o.createElement("code", null, "useModal"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ o.createElement("dl", null, /* @__PURE__ */ o.createElement("dt", null, /* @__PURE__ */ o.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ o.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ o.createElement("dt", null, /* @__PURE__ */ o.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ o.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ o.createElement("dt", null, /* @__PURE__ */ o.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ o.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ o.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ o.createElement("h5", null, "Modal Props, Modal State, and Trigger Props"), /* @__PURE__ */ o.createElement("p", null, "The ", /* @__PURE__ */ o.createElement("code", null, "useModal"), " returns an object with ", /* @__PURE__ */ o.createElement("code", null, "modalProps"), ", ", /* @__PURE__ */ o.createElement("code", null, "modalState"), " and ", /* @__PURE__ */ o.createElement("code", null, "triggerProps")), /* @__PURE__ */ o.createElement("p", null, "The ", /* @__PURE__ */ o.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the modal."), /* @__PURE__ */ o.createElement("p", null, "The ", /* @__PURE__ */ o.createElement("code", null, "modalState"), " object (which is also included in ", /* @__PURE__ */ o.createElement("code", null, "modalProps"), ") allows programmatic access to the state of the modal. This includes a read only ", /* @__PURE__ */ o.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ o.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ o.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ o.createElement("code", null, "close()"), " method which closes the overlay and a ", /* @__PURE__ */ o.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ o.createElement("p", null, "The ", /* @__PURE__ */ o.createElement("code", null, "modalProps"), " should be spread on the actual ", /* @__PURE__ */ o.createElement("code", null, "Modal"), " component."), /* @__PURE__ */ o.createElement("p", null, "Please refer to the examples to see its implementation"))
1978
+ description: () => /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("h5", null, "Using the hook"), /* @__PURE__ */ c.createElement("p", null, "To use any modals, you must call the ", /* @__PURE__ */ c.createElement("code", null, "useModal"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ c.createElement("dl", null, /* @__PURE__ */ c.createElement("dt", null, /* @__PURE__ */ c.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ c.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ c.createElement("dt", null, /* @__PURE__ */ c.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ c.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ c.createElement("dt", null, /* @__PURE__ */ c.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ c.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ c.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ c.createElement("h5", null, "Modal Props, Modal State, and Trigger Props"), /* @__PURE__ */ c.createElement("p", null, "The ", /* @__PURE__ */ c.createElement("code", null, "useModal"), " returns an object with ", /* @__PURE__ */ c.createElement("code", null, "modalProps"), ", ", /* @__PURE__ */ c.createElement("code", null, "modalState"), " and ", /* @__PURE__ */ c.createElement("code", null, "triggerProps")), /* @__PURE__ */ c.createElement("p", null, "The ", /* @__PURE__ */ c.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the modal."), /* @__PURE__ */ c.createElement("p", null, "The ", /* @__PURE__ */ c.createElement("code", null, "modalState"), " object (which is also included in ", /* @__PURE__ */ c.createElement("code", null, "modalProps"), ") allows programmatic access to the state of the modal. This includes a read only ", /* @__PURE__ */ c.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ c.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ c.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ c.createElement("code", null, "close()"), " method which closes the overlay and a ", /* @__PURE__ */ c.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ c.createElement("p", null, "The ", /* @__PURE__ */ c.createElement("code", null, "modalProps"), " should be spread on the actual ", /* @__PURE__ */ c.createElement("code", null, "Modal"), " component."), /* @__PURE__ */ c.createElement("p", null, "Please refer to the examples to see its implementation"))
68
1979
  },
69
1980
  informational: {
70
1981
  label: "Informational",
@@ -73,7 +1984,7 @@ const a = {
73
1984
  examples: {
74
1985
  small: {
75
1986
  description: "Small",
76
- react: e`
1987
+ react: w`
77
1988
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
78
1989
  import { sprinkles } from "@sps-woodland/tokens";
79
1990
  import { Button } from "@sps-woodland/buttons";
@@ -102,7 +2013,7 @@ const a = {
102
2013
  },
103
2014
  medium: {
104
2015
  description: "Medium",
105
- react: e`
2016
+ react: w`
106
2017
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
107
2018
  import { sprinkles } from "@sps-woodland/tokens";
108
2019
  import { Button } from "@sps-woodland/buttons";
@@ -128,7 +2039,7 @@ const a = {
128
2039
  },
129
2040
  large: {
130
2041
  description: "Large",
131
- react: e`
2042
+ react: w`
132
2043
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
133
2044
  import { sprinkles } from "@sps-woodland/tokens";
134
2045
  import { Button } from "@sps-woodland/buttons";
@@ -154,7 +2065,7 @@ const a = {
154
2065
  },
155
2066
  xlarge: {
156
2067
  description: "Extra Large",
157
- react: e`
2068
+ react: w`
158
2069
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
159
2070
  import { sprinkles } from "@sps-woodland/tokens";
160
2071
  import { Button } from "@sps-woodland/buttons";
@@ -187,7 +2098,7 @@ const a = {
187
2098
  examples: {
188
2099
  small: {
189
2100
  description: "Small",
190
- react: e`
2101
+ react: w`
191
2102
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
192
2103
  import { sprinkles } from "@sps-woodland/tokens";
193
2104
  import { Button } from "@sps-woodland/buttons";
@@ -209,7 +2120,7 @@ const a = {
209
2120
  },
210
2121
  medium: {
211
2122
  description: "Medium",
212
- react: e`
2123
+ react: w`
213
2124
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
214
2125
  import { sprinkles } from "@sps-woodland/tokens";
215
2126
  import { Button } from "@sps-woodland/buttons";
@@ -230,7 +2141,7 @@ const a = {
230
2141
  },
231
2142
  large: {
232
2143
  description: "Large",
233
- react: e`
2144
+ react: w`
234
2145
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
235
2146
  import { sprinkles } from "@sps-woodland/tokens";
236
2147
  import { Button } from "@sps-woodland/buttons";
@@ -252,7 +2163,7 @@ const a = {
252
2163
  },
253
2164
  xlarge: {
254
2165
  description: "Extra Large",
255
- react: e`
2166
+ react: w`
256
2167
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
257
2168
  import { sprinkles } from "@sps-woodland/tokens";
258
2169
  import { Button } from "@sps-woodland/buttons";
@@ -279,7 +2190,7 @@ const a = {
279
2190
  examples: {
280
2191
  small: {
281
2192
  description: "Small",
282
- react: e`
2193
+ react: w`
283
2194
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
284
2195
  import { sprinkles } from "@sps-woodland/tokens";
285
2196
  import { Button } from "@sps-woodland/buttons";
@@ -301,7 +2212,7 @@ const a = {
301
2212
  },
302
2213
  medium: {
303
2214
  description: "Medium",
304
- react: e`
2215
+ react: w`
305
2216
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
306
2217
  import { sprinkles } from "@sps-woodland/tokens";
307
2218
  import { Button } from "@sps-woodland/buttons";
@@ -322,7 +2233,7 @@ const a = {
322
2233
  },
323
2234
  large: {
324
2235
  description: "Large",
325
- react: e`
2236
+ react: w`
326
2237
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
327
2238
  import { sprinkles } from "@sps-woodland/tokens";
328
2239
  import { Button } from "@sps-woodland/buttons";
@@ -344,7 +2255,7 @@ const a = {
344
2255
  },
345
2256
  xlarge: {
346
2257
  description: "Extra Large",
347
- react: e`
2258
+ react: w`
348
2259
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
349
2260
  import { sprinkles } from "@sps-woodland/tokens";
350
2261
  import { Button } from "@sps-woodland/buttons";
@@ -371,7 +2282,7 @@ const a = {
371
2282
  examples: {
372
2283
  small: {
373
2284
  description: "Small",
374
- react: e`
2285
+ react: w`
375
2286
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
376
2287
  import { sprinkles } from "@sps-woodland/tokens";
377
2288
  import { Button } from "@sps-woodland/buttons";
@@ -393,7 +2304,7 @@ const a = {
393
2304
  },
394
2305
  medium: {
395
2306
  description: "Medium",
396
- react: e`
2307
+ react: w`
397
2308
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
398
2309
  import { sprinkles } from "@sps-woodland/tokens";
399
2310
  import { Button } from "@sps-woodland/buttons";
@@ -414,7 +2325,7 @@ const a = {
414
2325
  },
415
2326
  large: {
416
2327
  description: "Large",
417
- react: e`
2328
+ react: w`
418
2329
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
419
2330
  import { sprinkles } from "@sps-woodland/tokens";
420
2331
  import { Button } from "@sps-woodland/buttons";
@@ -436,7 +2347,7 @@ const a = {
436
2347
  },
437
2348
  xlarge: {
438
2349
  description: "Extra Large",
439
- react: e`
2350
+ react: w`
440
2351
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
441
2352
  import { sprinkles } from "@sps-woodland/tokens";
442
2353
  import { Button } from "@sps-woodland/buttons";
@@ -463,7 +2374,7 @@ const a = {
463
2374
  examples: {
464
2375
  small: {
465
2376
  description: "Small",
466
- react: e`
2377
+ react: w`
467
2378
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
468
2379
  import { sprinkles } from "@sps-woodland/tokens";
469
2380
  import { Button } from "@sps-woodland/buttons";
@@ -485,7 +2396,7 @@ const a = {
485
2396
  },
486
2397
  medium: {
487
2398
  description: "Medium",
488
- react: e`
2399
+ react: w`
489
2400
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
490
2401
  import { sprinkles } from "@sps-woodland/tokens";
491
2402
  import { Button } from "@sps-woodland/buttons";
@@ -506,7 +2417,7 @@ const a = {
506
2417
  },
507
2418
  large: {
508
2419
  description: "Large",
509
- react: e`
2420
+ react: w`
510
2421
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
511
2422
  import { sprinkles } from "@sps-woodland/tokens";
512
2423
  import { Button } from "@sps-woodland/buttons";
@@ -528,7 +2439,7 @@ const a = {
528
2439
  },
529
2440
  xlarge: {
530
2441
  description: "Extra Large",
531
- react: e`
2442
+ react: w`
532
2443
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
533
2444
  import { sprinkles } from "@sps-woodland/tokens";
534
2445
  import { Button } from "@sps-woodland/buttons";
@@ -555,7 +2466,7 @@ const a = {
555
2466
  examples: {
556
2467
  small: {
557
2468
  description: "Small",
558
- react: e`
2469
+ react: w`
559
2470
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
560
2471
  import { sprinkles } from "@sps-woodland/tokens";
561
2472
  import { Button } from "@sps-woodland/buttons";
@@ -582,7 +2493,7 @@ const a = {
582
2493
  },
583
2494
  medium: {
584
2495
  description: "Medium",
585
- react: e`
2496
+ react: w`
586
2497
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
587
2498
  import { sprinkles } from "@sps-woodland/tokens";
588
2499
  import { Button } from "@sps-woodland/buttons";
@@ -607,7 +2518,7 @@ const a = {
607
2518
  },
608
2519
  large: {
609
2520
  description: "Large",
610
- react: e`
2521
+ react: w`
611
2522
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
612
2523
  import { sprinkles } from "@sps-woodland/tokens";
613
2524
  import { Button } from "@sps-woodland/buttons";
@@ -629,7 +2540,7 @@ const a = {
629
2540
  },
630
2541
  xlarge: {
631
2542
  description: "Extra Large",
632
- react: e`
2543
+ react: w`
633
2544
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
634
2545
  import { sprinkles } from "@sps-woodland/tokens";
635
2546
  import { Button } from "@sps-woodland/buttons";
@@ -656,7 +2567,7 @@ const a = {
656
2567
  examples: {
657
2568
  small: {
658
2569
  description: "Small",
659
- react: e`
2570
+ react: w`
660
2571
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
661
2572
  import { sprinkles } from "@sps-woodland/tokens";
662
2573
  import { Button } from "@sps-woodland/buttons";
@@ -678,7 +2589,7 @@ const a = {
678
2589
  },
679
2590
  medium: {
680
2591
  description: "Medium",
681
- react: e`
2592
+ react: w`
682
2593
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
683
2594
  import { sprinkles } from "@sps-woodland/tokens";
684
2595
  import { Button } from "@sps-woodland/buttons";
@@ -699,7 +2610,7 @@ const a = {
699
2610
  },
700
2611
  large: {
701
2612
  description: "Large",
702
- react: e`
2613
+ react: w`
703
2614
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
704
2615
  import { sprinkles } from "@sps-woodland/tokens";
705
2616
  import { Button } from "@sps-woodland/buttons";
@@ -721,7 +2632,7 @@ const a = {
721
2632
  },
722
2633
  xlarge: {
723
2634
  description: "Extra Large",
724
- react: e`
2635
+ react: w`
725
2636
  import { Modal, ModalFooter, useModal } from "@sps-woodland/modal";
726
2637
  import { sprinkles } from "@sps-woodland/tokens";
727
2638
  import { Button } from "@sps-woodland/buttons";
@@ -743,9 +2654,13 @@ const a = {
743
2654
  }
744
2655
  }
745
2656
  }
746
- }, d = {
747
- Modals: a
2657
+ }, Cn = {
2658
+ Modals: kn
748
2659
  };
749
2660
  export {
750
- d as MANIFEST
2661
+ Cn as MANIFEST,
2662
+ Nt as Modal,
2663
+ Pt as ModalFooter,
2664
+ et as ModalIcons,
2665
+ Fn as useModal
751
2666
  };