@inertiaui/modal-react 0.17.0 → 0.18.1

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.
@@ -1,12 +1,13 @@
1
- var en = Object.defineProperty;
2
- var tn = (t, e, r) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var oe = (t, e, r) => tn(t, typeof e != "symbol" ? e + "" : e, r);
4
- import * as _e from "react";
5
- import J, { createContext as Je, useState as z, useEffect as X, useContext as Pe, useRef as q, createElement as Ve, useMemo as ve, forwardRef as Tt, useImperativeHandle as er, useLayoutEffect as rn, useCallback as ue, Fragment as we, isValidElement as nn, cloneElement as an } from "react";
6
- import He from "axios";
7
- import { router as Ie, usePage as sn } from "@inertiajs/react";
8
- import { mergeDataIntoQueryString as ln } from "@inertiajs/core";
9
- const ke = {
1
+ var Ut = Object.defineProperty;
2
+ var Bt = (t, e, n) => e in t ? Ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var q = (t, e, n) => Bt(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import * as pe from "react";
5
+ import B, { createContext as Ie, useState as $, useEffect as D, useContext as de, useRef as j, createElement as Ne, useMemo as Y, forwardRef as Ze, useImperativeHandle as ct, useLayoutEffect as Ht, useCallback as V, Fragment as ae, isValidElement as Kt, cloneElement as _t } from "react";
6
+ import { jsx as C, jsxs as le, Fragment as Ye } from "react/jsx-runtime";
7
+ import Te from "axios";
8
+ import { router as ve, usePage as qt } from "@inertiajs/react";
9
+ import { mergeDataIntoQueryString as Xt } from "@inertiajs/core";
10
+ const fe = {
10
11
  type: "modal",
11
12
  navigate: !1,
12
13
  modal: {
@@ -26,816 +27,188 @@ const ke = {
26
27
  position: "right"
27
28
  }
28
29
  };
29
- class on {
30
+ class Vt {
30
31
  constructor() {
31
32
  this.config = {}, this.reset();
32
33
  }
33
34
  reset() {
34
- this.config = JSON.parse(JSON.stringify(ke));
35
+ this.config = JSON.parse(JSON.stringify(fe));
35
36
  }
36
- put(e, r) {
37
+ put(e, n) {
37
38
  if (typeof e == "object") {
38
39
  this.config = {
39
- type: e.type ?? ke.type,
40
- navigate: e.navigate ?? ke.navigate,
41
- modal: { ...ke.modal, ...e.modal ?? {} },
42
- slideover: { ...ke.slideover, ...e.slideover ?? {} }
40
+ type: e.type ?? fe.type,
41
+ navigate: e.navigate ?? fe.navigate,
42
+ modal: { ...fe.modal, ...e.modal ?? {} },
43
+ slideover: { ...fe.slideover, ...e.slideover ?? {} }
43
44
  };
44
45
  return;
45
46
  }
46
- const n = e.split(".");
47
- let s = this.config;
48
- for (let l = 0; l < n.length - 1; l++)
49
- s = s[n[l]] = s[n[l]] || {};
50
- s[n[n.length - 1]] = r;
47
+ const r = e.split(".");
48
+ let i = this.config;
49
+ for (let l = 0; l < r.length - 1; l++)
50
+ i = i[r[l]] = i[r[l]] || {};
51
+ i[r[r.length - 1]] = n;
51
52
  }
52
53
  get(e) {
53
54
  if (typeof e > "u")
54
55
  return this.config;
55
- const r = e.split(".");
56
- let n = this.config;
57
- for (const s of r) {
58
- if (n[s] === void 0)
56
+ const n = e.split(".");
57
+ let r = this.config;
58
+ for (const i of n) {
59
+ if (r[i] === void 0)
59
60
  return null;
60
- n = n[s];
61
+ r = r[i];
61
62
  }
62
- return n;
63
- }
64
- }
65
- const Ze = new on(), Ca = () => Ze.reset(), ka = (t, e) => Ze.put(t, e), Rt = (t) => Ze.get(t), Re = (t, e) => Ze.get(t ? `slideover.${e}` : `modal.${e}`);
66
- var mt = { exports: {} }, Fe = {};
67
- /**
68
- * @license React
69
- * react-jsx-runtime.production.min.js
70
- *
71
- * Copyright (c) Facebook, Inc. and its affiliates.
72
- *
73
- * This source code is licensed under the MIT license found in the
74
- * LICENSE file in the root directory of this source tree.
75
- */
76
- var Kt;
77
- function un() {
78
- if (Kt) return Fe;
79
- Kt = 1;
80
- var t = J, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
81
- function i(m, o, g) {
82
- var y, w = {}, P = null, S = null;
83
- g !== void 0 && (P = "" + g), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (S = o.ref);
84
- for (y in o) n.call(o, y) && !l.hasOwnProperty(y) && (w[y] = o[y]);
85
- if (m && m.defaultProps) for (y in o = m.defaultProps, o) w[y] === void 0 && (w[y] = o[y]);
86
- return { $$typeof: e, type: m, key: P, ref: S, props: w, _owner: s.current };
63
+ return r;
87
64
  }
88
- return Fe.Fragment = r, Fe.jsx = i, Fe.jsxs = i, Fe;
89
65
  }
90
- var Ne = {};
91
- /**
92
- * @license React
93
- * react-jsx-runtime.development.js
94
- *
95
- * Copyright (c) Facebook, Inc. and its affiliates.
96
- *
97
- * This source code is licensed under the MIT license found in the
98
- * LICENSE file in the root directory of this source tree.
99
- */
100
- var Vt;
101
- function cn() {
102
- return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
103
- var t = J, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), m = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), p = Symbol.iterator, E = "@@iterator";
104
- function d(a) {
105
- if (a === null || typeof a != "object")
106
- return null;
107
- var h = p && a[p] || a[E];
108
- return typeof h == "function" ? h : null;
109
- }
110
- var f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
111
- function v(a) {
112
- {
113
- for (var h = arguments.length, x = new Array(h > 1 ? h - 1 : 0), C = 1; C < h; C++)
114
- x[C - 1] = arguments[C];
115
- R("error", a, x);
116
- }
117
- }
118
- function R(a, h, x) {
119
- {
120
- var C = f.ReactDebugCurrentFrame, M = C.getStackAddendum();
121
- M !== "" && (h += "%s", x = x.concat([M]));
122
- var $ = x.map(function(A) {
123
- return String(A);
124
- });
125
- $.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, $);
126
- }
127
- }
128
- var O = !1, b = !1, D = !1, B = !1, Z = !1, ee;
129
- ee = Symbol.for("react.module.reference");
130
- function Y(a) {
131
- return !!(typeof a == "string" || typeof a == "function" || a === n || a === l || Z || a === s || a === g || a === y || B || a === S || O || b || D || typeof a == "object" && a !== null && (a.$$typeof === P || a.$$typeof === w || a.$$typeof === i || a.$$typeof === m || a.$$typeof === o || // This needs to include all possible module reference object
132
- // types supported by any Flight configuration anywhere since
133
- // we don't know which Flight build this will end up being used
134
- // with.
135
- a.$$typeof === ee || a.getModuleId !== void 0));
136
- }
137
- function G(a, h, x) {
138
- var C = a.displayName;
139
- if (C)
140
- return C;
141
- var M = h.displayName || h.name || "";
142
- return M !== "" ? x + "(" + M + ")" : x;
143
- }
144
- function j(a) {
145
- return a.displayName || "Context";
146
- }
147
- function u(a) {
148
- if (a == null)
149
- return null;
150
- if (typeof a.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
151
- return a.displayName || a.name || null;
152
- if (typeof a == "string")
153
- return a;
154
- switch (a) {
155
- case n:
156
- return "Fragment";
157
- case r:
158
- return "Portal";
159
- case l:
160
- return "Profiler";
161
- case s:
162
- return "StrictMode";
163
- case g:
164
- return "Suspense";
165
- case y:
166
- return "SuspenseList";
167
- }
168
- if (typeof a == "object")
169
- switch (a.$$typeof) {
170
- case m:
171
- var h = a;
172
- return j(h) + ".Consumer";
173
- case i:
174
- var x = a;
175
- return j(x._context) + ".Provider";
176
- case o:
177
- return G(a, a.render, "ForwardRef");
178
- case w:
179
- var C = a.displayName || null;
180
- return C !== null ? C : u(a.type) || "Memo";
181
- case P: {
182
- var M = a, $ = M._payload, A = M._init;
183
- try {
184
- return u(A($));
185
- } catch {
186
- return null;
187
- }
188
- }
189
- }
190
- return null;
191
- }
192
- var c = Object.assign, T = 0, I, _, L, k, W, U, ae;
193
- function K() {
194
- }
195
- K.__reactDisabledLog = !0;
196
- function ie() {
197
- {
198
- if (T === 0) {
199
- I = console.log, _ = console.info, L = console.warn, k = console.error, W = console.group, U = console.groupCollapsed, ae = console.groupEnd;
200
- var a = {
201
- configurable: !0,
202
- enumerable: !0,
203
- value: K,
204
- writable: !0
205
- };
206
- Object.defineProperties(console, {
207
- info: a,
208
- log: a,
209
- warn: a,
210
- error: a,
211
- group: a,
212
- groupCollapsed: a,
213
- groupEnd: a
214
- });
215
- }
216
- T++;
217
- }
218
- }
219
- function re() {
220
- {
221
- if (T--, T === 0) {
222
- var a = {
223
- configurable: !0,
224
- enumerable: !0,
225
- writable: !0
226
- };
227
- Object.defineProperties(console, {
228
- log: c({}, a, {
229
- value: I
230
- }),
231
- info: c({}, a, {
232
- value: _
233
- }),
234
- warn: c({}, a, {
235
- value: L
236
- }),
237
- error: c({}, a, {
238
- value: k
239
- }),
240
- group: c({}, a, {
241
- value: W
242
- }),
243
- groupCollapsed: c({}, a, {
244
- value: U
245
- }),
246
- groupEnd: c({}, a, {
247
- value: ae
248
- })
249
- });
250
- }
251
- T < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
252
- }
253
- }
254
- var fe = f.ReactCurrentDispatcher, le;
255
- function ne(a, h, x) {
256
- {
257
- if (le === void 0)
258
- try {
259
- throw Error();
260
- } catch (M) {
261
- var C = M.stack.trim().match(/\n( *(at )?)/);
262
- le = C && C[1] || "";
263
- }
264
- return `
265
- ` + le + a;
266
- }
267
- }
268
- var ce = !1, Le;
269
- {
270
- var kr = typeof WeakMap == "function" ? WeakMap : Map;
271
- Le = new kr();
272
- }
273
- function Ct(a, h) {
274
- if (!a || ce)
275
- return "";
276
- {
277
- var x = Le.get(a);
278
- if (x !== void 0)
279
- return x;
280
- }
281
- var C;
282
- ce = !0;
283
- var M = Error.prepareStackTrace;
284
- Error.prepareStackTrace = void 0;
285
- var $;
286
- $ = fe.current, fe.current = null, ie();
287
- try {
288
- if (h) {
289
- var A = function() {
290
- throw Error();
291
- };
292
- if (Object.defineProperty(A.prototype, "props", {
293
- set: function() {
294
- throw Error();
295
- }
296
- }), typeof Reflect == "object" && Reflect.construct) {
297
- try {
298
- Reflect.construct(A, []);
299
- } catch (te) {
300
- C = te;
301
- }
302
- Reflect.construct(a, [], A);
303
- } else {
304
- try {
305
- A.call();
306
- } catch (te) {
307
- C = te;
308
- }
309
- a.call(A.prototype);
310
- }
311
- } else {
312
- try {
313
- throw Error();
314
- } catch (te) {
315
- C = te;
316
- }
317
- a();
318
- }
319
- } catch (te) {
320
- if (te && C && typeof te.stack == "string") {
321
- for (var N = te.stack.split(`
322
- `), Q = C.stack.split(`
323
- `), V = N.length - 1, H = Q.length - 1; V >= 1 && H >= 0 && N[V] !== Q[H]; )
324
- H--;
325
- for (; V >= 1 && H >= 0; V--, H--)
326
- if (N[V] !== Q[H]) {
327
- if (V !== 1 || H !== 1)
328
- do
329
- if (V--, H--, H < 0 || N[V] !== Q[H]) {
330
- var se = `
331
- ` + N[V].replace(" at new ", " at ");
332
- return a.displayName && se.includes("<anonymous>") && (se = se.replace("<anonymous>", a.displayName)), typeof a == "function" && Le.set(a, se), se;
333
- }
334
- while (V >= 1 && H >= 0);
335
- break;
336
- }
337
- }
338
- } finally {
339
- ce = !1, fe.current = $, re(), Error.prepareStackTrace = M;
340
- }
341
- var Te = a ? a.displayName || a.name : "", me = Te ? ne(Te) : "";
342
- return typeof a == "function" && Le.set(a, me), me;
343
- }
344
- function Fr(a, h, x) {
345
- return Ct(a, !1);
346
- }
347
- function Nr(a) {
348
- var h = a.prototype;
349
- return !!(h && h.isReactComponent);
350
- }
351
- function $e(a, h, x) {
352
- if (a == null)
353
- return "";
354
- if (typeof a == "function")
355
- return Ct(a, Nr(a));
356
- if (typeof a == "string")
357
- return ne(a);
358
- switch (a) {
359
- case g:
360
- return ne("Suspense");
361
- case y:
362
- return ne("SuspenseList");
363
- }
364
- if (typeof a == "object")
365
- switch (a.$$typeof) {
366
- case o:
367
- return Fr(a.render);
368
- case w:
369
- return $e(a.type, h, x);
370
- case P: {
371
- var C = a, M = C._payload, $ = C._init;
372
- try {
373
- return $e($(M), h, x);
374
- } catch {
375
- }
376
- }
377
- }
378
- return "";
379
- }
380
- var Ce = Object.prototype.hasOwnProperty, kt = {}, Ft = f.ReactDebugCurrentFrame;
381
- function We(a) {
382
- if (a) {
383
- var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
384
- Ft.setExtraStackFrame(x);
385
- } else
386
- Ft.setExtraStackFrame(null);
387
- }
388
- function jr(a, h, x, C, M) {
389
- {
390
- var $ = Function.call.bind(Ce);
391
- for (var A in a)
392
- if ($(a, A)) {
393
- var N = void 0;
394
- try {
395
- if (typeof a[A] != "function") {
396
- var Q = Error((C || "React class") + ": " + x + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
397
- throw Q.name = "Invariant Violation", Q;
398
- }
399
- N = a[A](h, A, C, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
- } catch (V) {
401
- N = V;
402
- }
403
- N && !(N instanceof Error) && (We(M), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", x, A, typeof N), We(null)), N instanceof Error && !(N.message in kt) && (kt[N.message] = !0, We(M), v("Failed %s type: %s", x, N.message), We(null));
404
- }
405
- }
406
- }
407
- var Ar = Array.isArray;
408
- function lt(a) {
409
- return Ar(a);
410
- }
411
- function Ir(a) {
412
- {
413
- var h = typeof Symbol == "function" && Symbol.toStringTag, x = h && a[Symbol.toStringTag] || a.constructor.name || "Object";
414
- return x;
415
- }
416
- }
417
- function _r(a) {
418
- try {
419
- return Nt(a), !1;
420
- } catch {
421
- return !0;
422
- }
423
- }
424
- function Nt(a) {
425
- return "" + a;
426
- }
427
- function jt(a) {
428
- if (_r(a))
429
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ir(a)), Nt(a);
430
- }
431
- var At = f.ReactCurrentOwner, Dr = {
432
- key: !0,
433
- ref: !0,
434
- __self: !0,
435
- __source: !0
436
- }, It, _t;
437
- function Mr(a) {
438
- if (Ce.call(a, "ref")) {
439
- var h = Object.getOwnPropertyDescriptor(a, "ref").get;
440
- if (h && h.isReactWarning)
441
- return !1;
442
- }
443
- return a.ref !== void 0;
444
- }
445
- function Lr(a) {
446
- if (Ce.call(a, "key")) {
447
- var h = Object.getOwnPropertyDescriptor(a, "key").get;
448
- if (h && h.isReactWarning)
449
- return !1;
450
- }
451
- return a.key !== void 0;
452
- }
453
- function $r(a, h) {
454
- typeof a.ref == "string" && At.current;
455
- }
456
- function Wr(a, h) {
457
- {
458
- var x = function() {
459
- It || (It = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
460
- };
461
- x.isReactWarning = !0, Object.defineProperty(a, "key", {
462
- get: x,
463
- configurable: !0
464
- });
465
- }
466
- }
467
- function Ur(a, h) {
468
- {
469
- var x = function() {
470
- _t || (_t = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
471
- };
472
- x.isReactWarning = !0, Object.defineProperty(a, "ref", {
473
- get: x,
474
- configurable: !0
475
- });
476
- }
477
- }
478
- var Br = function(a, h, x, C, M, $, A) {
479
- var N = {
480
- // This tag allows us to uniquely identify this as a React Element
481
- $$typeof: e,
482
- // Built-in properties that belong on the element
483
- type: a,
484
- key: h,
485
- ref: x,
486
- props: A,
487
- // Record the component responsible for creating this element.
488
- _owner: $
489
- };
490
- return N._store = {}, Object.defineProperty(N._store, "validated", {
491
- configurable: !1,
492
- enumerable: !1,
493
- writable: !0,
494
- value: !1
495
- }), Object.defineProperty(N, "_self", {
496
- configurable: !1,
497
- enumerable: !1,
498
- writable: !1,
499
- value: C
500
- }), Object.defineProperty(N, "_source", {
501
- configurable: !1,
502
- enumerable: !1,
503
- writable: !1,
504
- value: M
505
- }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
506
- };
507
- function Kr(a, h, x, C, M) {
508
- {
509
- var $, A = {}, N = null, Q = null;
510
- x !== void 0 && (jt(x), N = "" + x), Lr(h) && (jt(h.key), N = "" + h.key), Mr(h) && (Q = h.ref, $r(h, M));
511
- for ($ in h)
512
- Ce.call(h, $) && !Dr.hasOwnProperty($) && (A[$] = h[$]);
513
- if (a && a.defaultProps) {
514
- var V = a.defaultProps;
515
- for ($ in V)
516
- A[$] === void 0 && (A[$] = V[$]);
517
- }
518
- if (N || Q) {
519
- var H = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
520
- N && Wr(A, H), Q && Ur(A, H);
521
- }
522
- return Br(a, N, Q, M, C, At.current, A);
523
- }
524
- }
525
- var ot = f.ReactCurrentOwner, Dt = f.ReactDebugCurrentFrame;
526
- function Ee(a) {
527
- if (a) {
528
- var h = a._owner, x = $e(a.type, a._source, h ? h.type : null);
529
- Dt.setExtraStackFrame(x);
530
- } else
531
- Dt.setExtraStackFrame(null);
532
- }
533
- var ut;
534
- ut = !1;
535
- function ct(a) {
536
- return typeof a == "object" && a !== null && a.$$typeof === e;
537
- }
538
- function Mt() {
539
- {
540
- if (ot.current) {
541
- var a = u(ot.current.type);
542
- if (a)
543
- return `
544
-
545
- Check the render method of \`` + a + "`.";
546
- }
547
- return "";
548
- }
549
- }
550
- function Vr(a) {
551
- return "";
552
- }
553
- var Lt = {};
554
- function Hr(a) {
555
- {
556
- var h = Mt();
557
- if (!h) {
558
- var x = typeof a == "string" ? a : a.displayName || a.name;
559
- x && (h = `
560
-
561
- Check the top-level render call using <` + x + ">.");
562
- }
563
- return h;
564
- }
565
- }
566
- function $t(a, h) {
567
- {
568
- if (!a._store || a._store.validated || a.key != null)
569
- return;
570
- a._store.validated = !0;
571
- var x = Hr(h);
572
- if (Lt[x])
573
- return;
574
- Lt[x] = !0;
575
- var C = "";
576
- a && a._owner && a._owner !== ot.current && (C = " It was passed a child from " + u(a._owner.type) + "."), Ee(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, C), Ee(null);
577
- }
578
- }
579
- function Wt(a, h) {
580
- {
581
- if (typeof a != "object")
582
- return;
583
- if (lt(a))
584
- for (var x = 0; x < a.length; x++) {
585
- var C = a[x];
586
- ct(C) && $t(C, h);
587
- }
588
- else if (ct(a))
589
- a._store && (a._store.validated = !0);
590
- else if (a) {
591
- var M = d(a);
592
- if (typeof M == "function" && M !== a.entries)
593
- for (var $ = M.call(a), A; !(A = $.next()).done; )
594
- ct(A.value) && $t(A.value, h);
595
- }
596
- }
597
- }
598
- function Yr(a) {
599
- {
600
- var h = a.type;
601
- if (h == null || typeof h == "string")
602
- return;
603
- var x;
604
- if (typeof h == "function")
605
- x = h.propTypes;
606
- else if (typeof h == "object" && (h.$$typeof === o || // Note: Memo only checks outer props here.
607
- // Inner props are checked in the reconciler.
608
- h.$$typeof === w))
609
- x = h.propTypes;
610
- else
611
- return;
612
- if (x) {
613
- var C = u(h);
614
- jr(x, a.props, "prop", C, a);
615
- } else if (h.PropTypes !== void 0 && !ut) {
616
- ut = !0;
617
- var M = u(h);
618
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
619
- }
620
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
621
- }
622
- }
623
- function qr(a) {
624
- {
625
- for (var h = Object.keys(a.props), x = 0; x < h.length; x++) {
626
- var C = h[x];
627
- if (C !== "children" && C !== "key") {
628
- Ee(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Ee(null);
629
- break;
630
- }
631
- }
632
- a.ref !== null && (Ee(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), Ee(null));
633
- }
634
- }
635
- var Ut = {};
636
- function Bt(a, h, x, C, M, $) {
637
- {
638
- var A = Y(a);
639
- if (!A) {
640
- var N = "";
641
- (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
642
- var Q = Vr();
643
- Q ? N += Q : N += Mt();
644
- var V;
645
- a === null ? V = "null" : lt(a) ? V = "array" : a !== void 0 && a.$$typeof === e ? (V = "<" + (u(a.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : V = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, N);
646
- }
647
- var H = Kr(a, h, x, M, $);
648
- if (H == null)
649
- return H;
650
- if (A) {
651
- var se = h.children;
652
- if (se !== void 0)
653
- if (C)
654
- if (lt(se)) {
655
- for (var Te = 0; Te < se.length; Te++)
656
- Wt(se[Te], a);
657
- Object.freeze && Object.freeze(se);
658
- } else
659
- v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
660
- else
661
- Wt(se, a);
662
- }
663
- if (Ce.call(h, "key")) {
664
- var me = u(a), te = Object.keys(h).filter(function(Qr) {
665
- return Qr !== "key";
666
- }), dt = te.length > 0 ? "{key: someKey, " + te.join(": ..., ") + ": ...}" : "{key: someKey}";
667
- if (!Ut[me + dt]) {
668
- var Zr = te.length > 0 ? "{" + te.join(": ..., ") + ": ...}" : "{}";
669
- v(`A props object containing a "key" prop is being spread into JSX:
670
- let props = %s;
671
- <%s {...props} />
672
- React keys must be passed directly to JSX without using spread:
673
- let props = %s;
674
- <%s key={someKey} {...props} />`, dt, me, Zr, me), Ut[me + dt] = !0;
675
- }
676
- }
677
- return a === n ? qr(H) : Yr(H), H;
678
- }
679
- }
680
- function Xr(a, h, x) {
681
- return Bt(a, h, x, !0);
682
- }
683
- function zr(a, h, x) {
684
- return Bt(a, h, x, !1);
685
- }
686
- var Gr = zr, Jr = Xr;
687
- Ne.Fragment = n, Ne.jsx = Gr, Ne.jsxs = Jr;
688
- }()), Ne;
689
- }
690
- process.env.NODE_ENV === "production" ? mt.exports = un() : mt.exports = cn();
691
- var F = mt.exports;
692
- const Ht = {
66
+ const Pe = new Vt(), mr = () => Pe.reset(), hr = (t, e) => Pe.put(t, e), Je = (t) => Pe.get(t), se = (t, e) => Pe.get(t ? `slideover.${e}` : `modal.${e}`), nt = {
693
67
  modifiedElements: [],
694
68
  bodyState: {
695
69
  hasOverflowHidden: !1,
696
- hasPointerEventsNone: !1,
697
70
  originalPaddingRight: ""
698
71
  },
699
72
  prepare() {
700
73
  const t = window.innerWidth - document.documentElement.clientWidth;
701
74
  this.bodyState.originalPaddingRight = document.body.style.paddingRight;
702
75
  const e = parseInt(window.getComputedStyle(document.body).paddingRight, 10);
703
- document.body.style.paddingRight = `${e + t}px`, document.body.classList.contains("overflow-hidden") || (document.body.classList.add("overflow-hidden"), this.bodyState.hasOverflowHidden = !0), document.body.classList.contains("pointer-events-none") || (document.body.classList.add("pointer-events-none"), this.bodyState.hasPointerEventsNone = !0), Array.from(document.body.children).forEach((r) => {
704
- !r.classList.contains("im-dialog") && r.getAttribute("aria-hidden") !== "true" && (r.setAttribute("aria-hidden", "true"), this.modifiedElements.push(r));
76
+ document.body.style.paddingRight = `${e + t}px`, document.body.classList.contains("overflow-hidden") || (document.body.classList.add("overflow-hidden"), this.bodyState.hasOverflowHidden = !0), Array.from(document.body.children).forEach((n) => {
77
+ !n.classList.contains("im-dialog") && n.getAttribute("aria-hidden") !== "true" && (n.setAttribute("aria-hidden", "true"), this.modifiedElements.push(n));
705
78
  });
706
79
  },
707
80
  cleanup() {
708
- this.bodyState.hasOverflowHidden && (document.body.classList.remove("overflow-hidden"), this.bodyState.hasOverflowHidden = !1), this.bodyState.hasPointerEventsNone && (document.body.classList.remove("pointer-events-none"), this.bodyState.hasPointerEventsNone = !1), document.body.style.paddingRight = this.bodyState.originalPaddingRight, this.bodyState.originalPaddingRight = "", this.modifiedElements.forEach((t) => {
81
+ this.bodyState.hasOverflowHidden && (document.body.classList.remove("overflow-hidden"), this.bodyState.hasOverflowHidden = !1), document.body.style.paddingRight = this.bodyState.originalPaddingRight, this.bodyState.originalPaddingRight = "", this.modifiedElements.forEach((t) => {
709
82
  t.removeAttribute("aria-hidden");
710
83
  }), this.modifiedElements = [];
711
84
  }
712
85
  };
713
- function ft(t = "inertiaui_modal_") {
86
+ function Ue(t = "inertiaui_modal_") {
714
87
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `${t}${crypto.randomUUID()}` : `${t}${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
715
88
  }
716
- function dn(t, e) {
717
- return Array.isArray(t) ? t.filter((r) => !e.includes(r)) : Object.keys(t).reduce((r, n) => (e.includes(n) || (r[n] = t[n]), r), {});
89
+ function zt(t, e) {
90
+ return Array.isArray(t) ? t.filter((n) => !e.includes(n)) : Object.keys(t).reduce((n, r) => (e.includes(r) || (n[r] = t[r]), n), {});
718
91
  }
719
- function tr(t, e) {
720
- return Array.isArray(t) ? t.filter((r) => e.includes(r)) : e.reduce((r, n) => (n in t && (r[n] = t[n]), r), {});
92
+ function ft(t, e) {
93
+ return Array.isArray(t) ? t.filter((n) => e.includes(n)) : e.reduce((n, r) => (r in t && (n[r] = t[r]), n), {});
721
94
  }
722
- function fn(t) {
723
- return Array.isArray(t) ? t.filter((e) => e !== null) : Object.keys(t).reduce((e, r) => (r in t && t[r] !== null && (e[r] = t[r]), e), {});
95
+ function Gt(t) {
96
+ return Array.isArray(t) ? t.filter((e) => e !== null) : Object.keys(t).reduce((e, n) => (n in t && t[n] !== null && (e[n] = t[n]), e), {});
724
97
  }
725
- function vn(t, e = 3, r = 10) {
726
- return new Promise((n, s) => {
98
+ function Zt(t, e = 3, n = 10) {
99
+ return new Promise((r, i) => {
727
100
  const l = t();
728
101
  if (l) {
729
- n(l);
102
+ r(l);
730
103
  return;
731
104
  }
732
- let i = e * 1e3 / r;
105
+ let a = e * 1e3 / n;
733
106
  const m = setInterval(() => {
734
- const o = t();
735
- o && (clearInterval(m), n(o)), --i <= 0 && (clearInterval(m), s(new Error("Condition not met in time")));
736
- }, r);
107
+ const s = t();
108
+ s && (clearInterval(m), r(s)), --a <= 0 && (clearInterval(m), i(new Error("Condition not met in time")));
109
+ }, n);
737
110
  });
738
111
  }
739
- function je(t) {
740
- return t ? (t = t.replace(/_/g, "-"), t = t.replace(/-+/g, "-"), /[A-Z]/.test(t) ? (t = t.replace(/\s+/g, "").replace(/_/g, "").replace(/(?:^|\s|-)+([A-Za-z])/g, (e, r) => r.toUpperCase()), t = t.replace(/(.)(?=[A-Z])/g, "$1-"), t.toLowerCase()) : t) : "";
112
+ function me(t) {
113
+ return t ? (t = t.replace(/_/g, "-"), t = t.replace(/-+/g, "-"), /[A-Z]/.test(t) ? (t = t.replace(/\s+/g, "").replace(/_/g, "").replace(/(?:^|\s|-)+([A-Za-z])/g, (e, n) => n.toUpperCase()), t = t.replace(/(.)(?=[A-Z])/g, "$1-"), t.toLowerCase()) : t) : "";
741
114
  }
742
- const Qe = Je(null);
743
- Qe.displayName = "ModalStackContext";
744
- let rr = null, nr = null, De = null, bt = null, gt = [], Se = {};
745
- const pn = ({ children: t }) => {
746
- const [e, r] = z([]), [n, s] = z({}), l = (E) => {
747
- r((d) => {
748
- const f = E([...d]), v = (R) => {
749
- var O;
750
- return f.length < 2 ? !0 : ((O = f.map((b) => ({ id: b.id, shouldRender: b.shouldRender })).reverse().find((b) => b.shouldRender)) == null ? void 0 : O.id) === R;
115
+ const Re = Ie(null);
116
+ Re.displayName = "ModalStackContext";
117
+ let mt = null, ht = null, be = null, _e = null, qe = [], oe = {};
118
+ const Yt = ({ children: t }) => {
119
+ const [e, n] = $([]), [r, i] = $({}), l = (g) => {
120
+ n((d) => {
121
+ const f = g([...d]), h = (y) => {
122
+ var N;
123
+ return f.length < 2 ? !0 : ((N = f.map((v) => ({ id: v.id, shouldRender: v.shouldRender })).reverse().find((v) => v.shouldRender)) == null ? void 0 : N.id) === y;
751
124
  };
752
- return f.forEach((R, O) => {
753
- f[O].onTopOfStack = v(R.id), f[O].getParentModal = () => O < 1 ? null : f.slice(0, O).reverse().find((b) => b.isOpen), f[O].getChildModal = () => O === f.length - 1 ? null : f.slice(O + 1).find((b) => b.isOpen);
125
+ return f.forEach((y, N) => {
126
+ f[N].onTopOfStack = h(y.id), f[N].getParentModal = () => N < 1 ? null : f.slice(0, N).reverse().find((v) => v.isOpen), f[N].getChildModal = () => N === f.length - 1 ? null : f.slice(N + 1).find((v) => v.isOpen);
754
127
  }), f;
755
128
  });
756
129
  };
757
- X(() => {
758
- gt = e;
130
+ D(() => {
131
+ qe = e;
759
132
  }, [e]);
760
- class i {
761
- constructor(d, f, v, R, O) {
762
- oe(this, "show", () => {
133
+ class a {
134
+ constructor(d, f, h, y, N) {
135
+ q(this, "show", () => {
763
136
  l(
764
137
  (d) => d.map((f) => (f.id === this.id && !f.isOpen && (f.isOpen = !0, f.shouldRender = !0), f))
765
138
  );
766
139
  });
767
- oe(this, "setOpen", (d) => {
140
+ q(this, "setOpen", (d) => {
768
141
  d ? this.show() : this.close();
769
142
  });
770
- oe(this, "close", () => {
143
+ q(this, "close", () => {
771
144
  l(
772
145
  (d) => d.map((f) => {
773
- var v;
774
- return f.id === this.id && f.isOpen && (Object.keys(f.listeners).forEach((R) => {
775
- f.off(R);
776
- }), f.isOpen = !1, (v = f.onCloseCallback) == null || v.call(f)), f;
146
+ var h;
147
+ return f.id === this.id && f.isOpen && (Object.keys(f.listeners).forEach((y) => {
148
+ f.off(y);
149
+ }), f.isOpen = !1, (h = f.onCloseCallback) == null || h.call(f)), f;
777
150
  })
778
151
  );
779
152
  });
780
- oe(this, "afterLeave", () => {
153
+ q(this, "afterLeave", () => {
781
154
  this.isOpen || l((d) => {
782
- const f = d.map((v) => {
783
- var R;
784
- return v.id === this.id && !v.isOpen && (v.shouldRender = !1, (R = v.afterLeaveCallback) == null || R.call(v), v.afterLeaveCallback = null), v;
155
+ const f = d.map((h) => {
156
+ var y;
157
+ return h.id === this.id && !h.isOpen && (h.shouldRender = !1, (y = h.afterLeaveCallback) == null || y.call(h), h.afterLeaveCallback = null), h;
785
158
  });
786
159
  return this.index === 0 ? [] : f;
787
160
  });
788
161
  });
789
- oe(this, "on", (d, f) => {
790
- d = je(d), this.listeners[d] = this.listeners[d] ?? [], this.listeners[d].push(f);
162
+ q(this, "on", (d, f) => {
163
+ d = me(d), this.listeners[d] = this.listeners[d] ?? [], this.listeners[d].push(f);
791
164
  });
792
- oe(this, "off", (d, f) => {
793
- var v;
794
- d = je(d), f ? this.listeners[d] = ((v = this.listeners[d]) == null ? void 0 : v.filter((R) => R !== f)) ?? [] : delete this.listeners[d];
165
+ q(this, "off", (d, f) => {
166
+ var h;
167
+ d = me(d), f ? this.listeners[d] = ((h = this.listeners[d]) == null ? void 0 : h.filter((y) => y !== f)) ?? [] : delete this.listeners[d];
795
168
  });
796
- oe(this, "emit", (d, ...f) => {
797
- var v;
798
- (v = this.listeners[je(d)]) == null || v.forEach((R) => R(...f));
169
+ q(this, "emit", (d, ...f) => {
170
+ var h;
171
+ (h = this.listeners[me(d)]) == null || h.forEach((y) => y(...f));
799
172
  });
800
- oe(this, "registerEventListenersFromProps", (d) => {
173
+ q(this, "registerEventListenersFromProps", (d) => {
801
174
  const f = [];
802
- return Object.keys(d).filter((v) => v.startsWith("on")).forEach((v) => {
803
- const R = je(v).replace(/^on-/, "");
804
- this.on(R, d[v]), f.push(() => this.off(R, d[v]));
805
- }), () => f.forEach((v) => v());
175
+ return Object.keys(d).filter((h) => h.startsWith("on")).forEach((h) => {
176
+ const y = me(h).replace(/^on-/, "");
177
+ this.on(y, d[h]), f.push(() => this.off(y, d[h]));
178
+ }), () => f.forEach((h) => h());
806
179
  });
807
- oe(this, "reload", (d = {}) => {
808
- var v;
180
+ q(this, "reload", (d = {}) => {
181
+ var h;
809
182
  let f = Object.keys(this.response.props);
810
- d.only && (f = tr(f, d.only)), d.except && (f = dn(f, d.except)), (v = this.response) != null && v.url && He.get(this.response.url, {
183
+ d.only && (f = ft(f, d.only)), d.except && (f = zt(f, d.except)), (h = this.response) != null && h.url && Te.get(this.response.url, {
811
184
  headers: {
812
185
  Accept: "text/html, application/xhtml+xml",
813
186
  "X-Inertia": !0,
814
187
  "X-Inertia-Partial-Component": this.response.component,
815
188
  "X-Inertia-Version": this.response.version,
816
189
  "X-Inertia-Partial-Data": f.join(","),
817
- "X-InertiaUI-Modal": ft(),
190
+ "X-InertiaUI-Modal": Ue(),
818
191
  "X-InertiaUI-Modal-Use-Router": 0,
819
- "X-InertiaUI-Modal-Base-Url": De
192
+ "X-InertiaUI-Modal-Base-Url": be
820
193
  }
821
- }).then((R) => {
822
- this.updateProps(R.data.props);
194
+ }).then((y) => {
195
+ this.updateProps(y.data.props);
823
196
  });
824
197
  });
825
- oe(this, "updateProps", (d) => {
198
+ q(this, "updateProps", (d) => {
826
199
  Object.assign(this.props, d), l((f) => f);
827
200
  });
828
- if (this.id = f.id ?? ft(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = d, this.props = f.props, this.response = f, this.config = v ?? {}, this.onCloseCallback = R, this.afterLeaveCallback = O, Se[this.id]) {
201
+ if (this.id = f.id ?? Ue(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = d, this.props = f.props, this.response = f, this.config = h ?? {}, this.onCloseCallback = y, this.afterLeaveCallback = N, oe[this.id]) {
829
202
  this.config = {
830
203
  ...this.config,
831
- ...Se[this.id].config ?? {}
204
+ ...oe[this.id].config ?? {}
832
205
  };
833
- const b = Se[this.id].onClose, D = Se[this.id].onAfterLeave;
834
- b && (this.onCloseCallback = R ? () => {
835
- R(), b();
836
- } : b), D && (this.afterLeaveCallback = O ? () => {
837
- O(), D();
838
- } : D), delete Se[this.id];
206
+ const v = oe[this.id].onClose, I = oe[this.id].onAfterLeave;
207
+ v && (this.onCloseCallback = y ? () => {
208
+ y(), v();
209
+ } : v), I && (this.afterLeaveCallback = N ? () => {
210
+ N(), I();
211
+ } : I), delete oe[this.id];
839
212
  }
840
213
  this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0;
841
214
  }
@@ -843,18 +216,18 @@ const pn = ({ children: t }) => {
843
216
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `inertiaui_modal_${crypto.randomUUID()}` : `inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`;
844
217
  }
845
218
  }
846
- const m = (E, d = {}, f = null, v = null) => nr(E.component).then((R) => o(R, E, d, f, v)), o = (E, d, f, v, R) => {
847
- const O = new i(E, d, f, v, R);
848
- return O.index = e.length, l((b) => [...b, O]), O.show(), O;
219
+ const m = (g, d = {}, f = null, h = null) => ht(g.component).then((y) => s(y, g, d, f, h)), s = (g, d, f, h, y) => {
220
+ const N = new a(g, d, f, h, y);
221
+ return N.index = e.length, l((v) => [...v, N]), N.show(), N;
849
222
  };
850
- function g(E, d, f, v) {
851
- if (!n[E])
852
- throw new Error(`The local modal "${E}" has not been registered.`);
853
- const R = o(null, {}, d, f, v);
854
- return R.name = E, n[E].callback(R), R;
223
+ function p(g, d, f, h) {
224
+ if (!r[g])
225
+ throw new Error(`The local modal "${g}" has not been registered.`);
226
+ const y = s(null, {}, d, f, h);
227
+ return y.name = g, r[g].callback(y), y;
855
228
  }
856
- const y = (E, d = {}) => w(
857
- E,
229
+ const b = (g, d = {}) => w(
230
+ g,
858
231
  d.method ?? "get",
859
232
  d.data ?? {},
860
233
  d.headers ?? {},
@@ -862,289 +235,282 @@ const pn = ({ children: t }) => {
862
235
  d.onClose,
863
236
  d.onAfterLeave,
864
237
  d.queryStringArrayFormat ?? "brackets",
865
- d.navigate ?? Rt("navigate")
238
+ d.navigate ?? Je("navigate")
866
239
  ).then((f) => {
867
- const v = d.listeners ?? {};
868
- return Object.keys(v).forEach((R) => {
869
- const O = je(R);
870
- f.on(O, v[R]);
240
+ const h = d.listeners ?? {};
241
+ return Object.keys(h).forEach((y) => {
242
+ const N = me(y);
243
+ f.on(N, h[y]);
871
244
  }), f;
872
- }), w = (E, d, f = {}, v = {}, R = {}, O = null, b = null, D = "brackets", B = !1) => {
873
- const Z = ft();
874
- return new Promise((ee, Y) => {
875
- if (E.startsWith("#")) {
876
- ee(g(E.substring(1), R, O, b));
245
+ }), w = (g, d, f = {}, h = {}, y = {}, N = null, v = null, I = "brackets", A = !1) => {
246
+ const H = Ue();
247
+ return new Promise((K, W) => {
248
+ if (g.startsWith("#")) {
249
+ K(p(g.substring(1), y, N, v));
877
250
  return;
878
251
  }
879
- const [G, j] = ln(d, E || "", f, D);
880
- let u = B && e.length === 0;
881
- if (e.length === 0 && (De = typeof window < "u" ? window.location.href : ""), v = {
882
- ...v,
252
+ const [U, O] = Xt(d, g || "", f, I);
253
+ let o = A && e.length === 0;
254
+ if (e.length === 0 && (be = typeof window < "u" ? window.location.href : ""), h = {
255
+ ...h,
883
256
  Accept: "text/html, application/xhtml+xml",
884
257
  "X-Requested-With": "XMLHttpRequest",
885
258
  "X-Inertia": !0,
886
- "X-Inertia-Version": rr,
887
- "X-InertiaUI-Modal": Z,
888
- "X-InertiaUI-Modal-Use-Router": u ? 1 : 0,
889
- "X-InertiaUI-Modal-Base-Url": De
890
- }, u)
891
- return bt = null, Se[Z] = {
892
- config: R,
893
- onClose: O,
894
- onAfterLeave: b
895
- }, Ie.visit(G, {
259
+ "X-Inertia-Version": mt,
260
+ "X-InertiaUI-Modal": H,
261
+ "X-InertiaUI-Modal-Use-Router": o ? 1 : 0,
262
+ "X-InertiaUI-Modal-Base-Url": be
263
+ }, o)
264
+ return _e = null, oe[H] = {
265
+ config: y,
266
+ onClose: N,
267
+ onAfterLeave: v
268
+ }, ve.visit(U, {
896
269
  method: d,
897
- data: j,
898
- headers: v,
270
+ data: O,
271
+ headers: h,
899
272
  preserveScroll: !0,
900
273
  preserveState: !0,
901
- onError: Y,
274
+ onError: W,
902
275
  onFinish: () => {
903
- vn(() => bt).then(ee);
276
+ Zt(() => _e).then(K);
904
277
  }
905
278
  });
906
- He({
907
- url: G,
279
+ Te({
280
+ url: U,
908
281
  method: d,
909
- data: j,
910
- headers: v
911
- }).then((c) => ee(m(c.data, R, O, b))).catch((c) => {
912
- Y(c);
282
+ data: O,
283
+ headers: h
284
+ }).then((u) => K(m(u.data, y, N, v))).catch((u) => {
285
+ W(u);
913
286
  });
914
287
  });
915
- }, p = {
288
+ }, c = {
916
289
  stack: e,
917
- localModals: n,
918
- push: o,
290
+ localModals: r,
291
+ push: s,
919
292
  pushFromResponseData: m,
920
293
  closeAll: () => {
921
- gt.reverse().forEach((E) => E.close());
294
+ qe.reverse().forEach((g) => g.close());
922
295
  },
923
296
  reset: () => l(() => []),
924
297
  visit: w,
925
- visitModal: y,
926
- registerLocalModal: (E, d) => {
927
- s((f) => ({
298
+ visitModal: b,
299
+ registerLocalModal: (g, d) => {
300
+ i((f) => ({
928
301
  ...f,
929
- [E]: { name: E, callback: d }
302
+ [g]: { name: g, callback: d }
930
303
  }));
931
304
  },
932
- removeLocalModal: (E) => {
933
- s((d) => {
305
+ removeLocalModal: (g) => {
306
+ i((d) => {
934
307
  const f = { ...d };
935
- return delete f[E], f;
308
+ return delete f[g], f;
936
309
  });
937
310
  }
938
311
  };
939
- return /* @__PURE__ */ F.jsx(Qe.Provider, { value: p, children: t });
940
- }, et = () => {
941
- const t = Pe(Qe);
312
+ return /* @__PURE__ */ C(Re.Provider, { value: c, children: t });
313
+ }, Ae = () => {
314
+ const t = de(Re);
942
315
  if (t === null)
943
316
  throw new Error("useModalStack must be used within a ModalStackProvider");
944
317
  return t;
945
- }, Yt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], hn = (t) => {
946
- t.initialPage && (rr = t.initialPage.version), t.resolveComponent && (nr = t.resolveComponent);
947
- }, Fa = (t, e) => {
948
- hn(e);
949
- const r = ({ Component: n, props: s, key: l }) => {
950
- const i = () => {
951
- const m = Ve(n, { key: l, ...s });
952
- return typeof n.layout == "function" ? n.layout(m) : Array.isArray(n.layout) ? n.layout.concat(m).reverse().reduce((g, y) => Ve(y, s, g)) : m;
953
- };
954
- return /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
955
- i(),
956
- /* @__PURE__ */ F.jsx(mn, {})
957
- ] });
958
- };
959
- return /* @__PURE__ */ F.jsx(pn, { children: /* @__PURE__ */ F.jsx(t, { ...e, children: r }) });
960
- }, mn = ({ children: t }) => {
318
+ }, rt = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Jt = (t) => {
319
+ t.initialPage && (mt = t.initialPage.version), t.resolveComponent && (ht = t.resolveComponent);
320
+ }, vr = (t, e) => (Jt(e), /* @__PURE__ */ C(Yt, { children: /* @__PURE__ */ C(t, { ...e, children: ({ Component: r, props: i, key: l }) => /* @__PURE__ */ le(Ye, { children: [
321
+ (() => {
322
+ const m = Ne(r, { key: l, ...i });
323
+ return typeof r.layout == "function" ? r.layout(m) : Array.isArray(r.layout) ? r.layout.concat(m).reverse().reduce((p, b) => Ne(b, i, p)) : m;
324
+ })(),
325
+ /* @__PURE__ */ C(Qt, {})
326
+ ] }) }) })), Qt = ({ children: t }) => {
961
327
  var m;
962
- const e = Pe(Qe);
963
- let r = !1, n = !1;
964
- X(() => Ie.on("start", () => r = !0), []), X(() => Ie.on("finish", () => r = !1), []), X(
965
- () => Ie.on("navigate", function(o) {
966
- const g = o.detail.page.props._inertiaui_modal;
967
- if (!g) {
968
- n && e.closeAll();
328
+ const e = de(Re);
329
+ let n = !1, r = !1;
330
+ D(() => ve.on("start", () => n = !0), []), D(() => ve.on("finish", () => n = !1), []), D(
331
+ () => ve.on("navigate", function(s) {
332
+ const p = s.detail.page.props._inertiaui_modal;
333
+ if (!p) {
334
+ r && e.closeAll();
969
335
  return;
970
336
  }
971
- n = g, De = g.baseUrl, e.pushFromResponseData(g, {}, () => {
972
- if (!g.baseUrl) {
337
+ r = p, be = p.baseUrl, e.pushFromResponseData(p, {}, () => {
338
+ if (!p.baseUrl) {
973
339
  console.error("No base url in modal response data so cannot navigate back");
974
340
  return;
975
341
  }
976
- !r && window.location.href !== g.baseUrl && Ie.visit(g.baseUrl, {
342
+ !n && window.location.href !== p.baseUrl && ve.visit(p.baseUrl, {
977
343
  preserveScroll: !0,
978
344
  preserveState: !0
979
345
  });
980
- }).then((y) => {
981
- bt = y;
346
+ }).then((b) => {
347
+ _e = b;
982
348
  });
983
349
  }),
984
350
  []
985
351
  );
986
- const s = (o) => (gt.length && (o.headers["X-InertiaUI-Modal-Base-Url"] = De), o);
987
- X(() => (He.interceptors.request.use(s), () => He.interceptors.request.eject(s)), []);
988
- const l = sn(), i = q();
989
- return X(() => {
990
- var y, w;
991
- const o = (y = l.props) == null ? void 0 : y._inertiaui_modal, g = i.current;
992
- i.current = o, o && g && o.component === g.component && o.url === g.url && ((w = e.stack[0]) == null || w.updateProps(o.props ?? {}));
993
- }, [(m = l.props) == null ? void 0 : m._inertiaui_modal]), /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
352
+ const i = (s) => (qe.length && (s.headers["X-InertiaUI-Modal-Base-Url"] = be), s);
353
+ D(() => (Te.interceptors.request.use(i), () => Te.interceptors.request.eject(i)), []);
354
+ const l = qt(), a = j();
355
+ return D(() => {
356
+ var b, w;
357
+ const s = (b = l.props) == null ? void 0 : b._inertiaui_modal, p = a.current;
358
+ a.current = s, s && p && s.component === p.component && s.url === p.url && ((w = e.stack[0]) == null || w.updateProps(s.props ?? {}));
359
+ }, [(m = l.props) == null ? void 0 : m._inertiaui_modal]), /* @__PURE__ */ le(Ye, { children: [
994
360
  t,
995
- e.stack.length > 0 && /* @__PURE__ */ F.jsx(ir, { index: 0 })
361
+ e.stack.length > 0 && /* @__PURE__ */ C(pt, { index: 0 })
996
362
  ] });
997
- }, St = J.createContext(null);
998
- St.displayName = "ModalIndexContext";
999
- const ar = () => {
1000
- const t = J.useContext(St);
363
+ }, Qe = B.createContext(null);
364
+ Qe.displayName = "ModalIndexContext";
365
+ const vt = () => {
366
+ const t = B.useContext(Qe);
1001
367
  if (t === void 0)
1002
368
  throw new Error("useModalIndex must be used within a ModalIndexProvider");
1003
369
  return t;
1004
- }, ir = ({ index: t }) => {
1005
- const { stack: e } = et(), r = ve(() => e[t], [e, t]);
1006
- return (r == null ? void 0 : r.component) && /* @__PURE__ */ F.jsx(St.Provider, { value: t, children: /* @__PURE__ */ F.jsx(
1007
- r.component,
370
+ }, pt = ({ index: t }) => {
371
+ const { stack: e } = Ae(), n = Y(() => e[t], [e, t]);
372
+ return (n == null ? void 0 : n.component) && /* @__PURE__ */ C(Qe.Provider, { value: t, children: /* @__PURE__ */ C(
373
+ n.component,
1008
374
  {
1009
- ...r.props,
1010
- onModalEvent: (...n) => r.emit(...n)
375
+ ...n.props,
376
+ onModalEvent: (...r) => n.emit(...r)
1011
377
  }
1012
378
  ) });
1013
- }, sr = Tt(({ name: t, children: e, onFocus: r = null, onBlur: n = null, onClose: s = null, onSuccess: l = null, ...i }, m) => {
1014
- const o = ar(), { stack: g, registerLocalModal: y, removeLocalModal: w } = et(), [P, S] = z(null), p = ve(() => t ? P : g[o], [t, P, o, g]), E = ve(() => {
1015
- var b;
1016
- return (b = g.find((D) => D.shouldRender && D.index > (p == null ? void 0 : p.index))) == null ? void 0 : b.index;
1017
- }, [o, g]), d = ve(() => (p == null ? void 0 : p.config.slideover) ?? i.slideover ?? Rt("type") === "slideover", [i.slideover]), f = ve(
379
+ }, bt = Ze(({ name: t, children: e, onFocus: n = null, onBlur: r = null, onClose: i = null, onSuccess: l = null, ...a }, m) => {
380
+ const s = vt(), { stack: p, registerLocalModal: b, removeLocalModal: w } = Ae(), [T, E] = $(null), c = Y(() => t ? T : p[s], [t, T, s, p]), g = Y(() => {
381
+ var v;
382
+ return (v = p.find((I) => I.shouldRender && I.index > (c == null ? void 0 : c.index))) == null ? void 0 : v.index;
383
+ }, [s, p]), d = Y(() => (c == null ? void 0 : c.config.slideover) ?? a.slideover ?? Je("type") === "slideover", [a.slideover]), f = Y(
1018
384
  () => ({
1019
385
  slideover: d,
1020
- closeButton: i.closeButton ?? Re(d, "closeButton"),
1021
- closeExplicitly: i.closeExplicitly ?? Re(d, "closeExplicitly"),
1022
- maxWidth: i.maxWidth ?? Re(d, "maxWidth"),
1023
- paddingClasses: i.paddingClasses ?? Re(d, "paddingClasses"),
1024
- panelClasses: i.panelClasses ?? Re(d, "panelClasses"),
1025
- position: i.position ?? Re(d, "position"),
1026
- ...p == null ? void 0 : p.config
386
+ closeButton: a.closeButton ?? se(d, "closeButton"),
387
+ closeExplicitly: a.closeExplicitly ?? se(d, "closeExplicitly"),
388
+ maxWidth: a.maxWidth ?? se(d, "maxWidth"),
389
+ paddingClasses: a.paddingClasses ?? se(d, "paddingClasses"),
390
+ panelClasses: a.panelClasses ?? se(d, "panelClasses"),
391
+ position: a.position ?? se(d, "position"),
392
+ ...c == null ? void 0 : c.config
1027
393
  }),
1028
- [i, p == null ? void 0 : p.config]
394
+ [a, c == null ? void 0 : c.config]
1029
395
  );
1030
- X(() => {
396
+ D(() => {
1031
397
  if (t) {
1032
- let b = null;
1033
- return y(t, (D) => {
1034
- b = D.registerEventListenersFromProps(i), S(D);
398
+ let v = null;
399
+ return b(t, (I) => {
400
+ v = I.registerEventListenersFromProps(a), E(I);
1035
401
  }), () => {
1036
- b == null || b(), b = null, w(t);
402
+ v == null || v(), v = null, w(t);
1037
403
  };
1038
404
  }
1039
- return p.registerEventListenersFromProps(i);
405
+ return c.registerEventListenersFromProps(a);
1040
406
  }, [t]);
1041
- const v = q(p);
1042
- X(() => {
1043
- v.current = p;
1044
- }, [p]), X(() => {
1045
- p !== null && (p.isOpen ? l == null || l() : s == null || s());
1046
- }, [p == null ? void 0 : p.isOpen]);
1047
- const [R, O] = z(!1);
1048
- return X(() => {
1049
- R && p !== null && p.isOpen && (p.onTopOfStack ? r == null || r() : n == null || n()), O(!0);
1050
- }, [p == null ? void 0 : p.onTopOfStack]), er(
407
+ const h = j(c);
408
+ D(() => {
409
+ h.current = c;
410
+ }, [c]), D(() => {
411
+ c !== null && (c.isOpen ? l == null || l() : i == null || i());
412
+ }, [c == null ? void 0 : c.isOpen]);
413
+ const [y, N] = $(!1);
414
+ return D(() => {
415
+ y && c !== null && c.isOpen && (c.onTopOfStack ? n == null || n() : r == null || r()), N(!0);
416
+ }, [c == null ? void 0 : c.onTopOfStack]), ct(
1051
417
  m,
1052
418
  () => ({
1053
419
  afterLeave: () => {
1054
- var b;
1055
- return (b = v.current) == null ? void 0 : b.afterLeave();
420
+ var v;
421
+ return (v = h.current) == null ? void 0 : v.afterLeave();
1056
422
  },
1057
423
  close: () => {
1058
- var b;
1059
- return (b = v.current) == null ? void 0 : b.close();
424
+ var v;
425
+ return (v = h.current) == null ? void 0 : v.close();
1060
426
  },
1061
- emit: (...b) => {
1062
- var D;
1063
- return (D = v.current) == null ? void 0 : D.emit(...b);
427
+ emit: (...v) => {
428
+ var I;
429
+ return (I = h.current) == null ? void 0 : I.emit(...v);
1064
430
  },
1065
431
  getChildModal: () => {
1066
- var b;
1067
- return (b = v.current) == null ? void 0 : b.getChildModal();
432
+ var v;
433
+ return (v = h.current) == null ? void 0 : v.getChildModal();
1068
434
  },
1069
435
  getParentModal: () => {
1070
- var b;
1071
- return (b = v.current) == null ? void 0 : b.getParentModal();
436
+ var v;
437
+ return (v = h.current) == null ? void 0 : v.getParentModal();
1072
438
  },
1073
- reload: (...b) => {
1074
- var D;
1075
- return (D = v.current) == null ? void 0 : D.reload(...b);
439
+ reload: (...v) => {
440
+ var I;
441
+ return (I = h.current) == null ? void 0 : I.reload(...v);
1076
442
  },
1077
443
  setOpen: () => {
1078
- var b;
1079
- return (b = v.current) == null ? void 0 : b.setOpen();
444
+ var v;
445
+ return (v = h.current) == null ? void 0 : v.setOpen();
1080
446
  },
1081
447
  get id() {
1082
- var b;
1083
- return (b = v.current) == null ? void 0 : b.id;
448
+ var v;
449
+ return (v = h.current) == null ? void 0 : v.id;
1084
450
  },
1085
451
  get index() {
1086
- var b;
1087
- return (b = v.current) == null ? void 0 : b.index;
452
+ var v;
453
+ return (v = h.current) == null ? void 0 : v.index;
1088
454
  },
1089
455
  get isOpen() {
1090
- var b;
1091
- return (b = v.current) == null ? void 0 : b.isOpen;
456
+ var v;
457
+ return (v = h.current) == null ? void 0 : v.isOpen;
1092
458
  },
1093
459
  get config() {
1094
- var b;
1095
- return (b = v.current) == null ? void 0 : b.config;
460
+ var v;
461
+ return (v = h.current) == null ? void 0 : v.config;
1096
462
  },
1097
463
  get modalContext() {
1098
- return v.current;
464
+ return h.current;
1099
465
  },
1100
466
  get onTopOfStack() {
1101
- var b;
1102
- return (b = v.current) == null ? void 0 : b.onTopOfStack;
467
+ var v;
468
+ return (v = h.current) == null ? void 0 : v.onTopOfStack;
1103
469
  },
1104
470
  get shouldRender() {
1105
- var b;
1106
- return (b = v.current) == null ? void 0 : b.shouldRender;
471
+ var v;
472
+ return (v = h.current) == null ? void 0 : v.shouldRender;
1107
473
  }
1108
474
  }),
1109
- [p]
1110
- ), (p == null ? void 0 : p.shouldRender) && /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
475
+ [c]
476
+ ), (c == null ? void 0 : c.shouldRender) && /* @__PURE__ */ le(Ye, { children: [
1111
477
  typeof e == "function" ? e({
1112
- afterLeave: p.afterLeave,
1113
- close: p.close,
478
+ afterLeave: c.afterLeave,
479
+ close: c.close,
1114
480
  config: f,
1115
- emit: p.emit,
1116
- getChildModal: p.getChildModal,
1117
- getParentModal: p.getParentModal,
1118
- id: p.id,
1119
- index: p.index,
1120
- isOpen: p.isOpen,
1121
- modalContext: p,
1122
- onTopOfStack: p.onTopOfStack,
1123
- reload: p.reload,
1124
- setOpen: p.setOpen,
1125
- shouldRender: p.shouldRender
481
+ emit: c.emit,
482
+ getChildModal: c.getChildModal,
483
+ getParentModal: c.getParentModal,
484
+ id: c.id,
485
+ index: c.index,
486
+ isOpen: c.isOpen,
487
+ modalContext: c,
488
+ onTopOfStack: c.onTopOfStack,
489
+ reload: c.reload,
490
+ setOpen: c.setOpen,
491
+ shouldRender: c.shouldRender
1126
492
  }) : e,
1127
- E && /* @__PURE__ */ F.jsx(ir, { index: E })
493
+ g && /* @__PURE__ */ C(pt, { index: g })
1128
494
  ] });
1129
495
  });
1130
- sr.displayName = "HeadlessModal";
1131
- function lr(t) {
1132
- var e, r, n = "";
1133
- if (typeof t == "string" || typeof t == "number") n += t;
496
+ bt.displayName = "HeadlessModal";
497
+ function gt(t) {
498
+ var e, n, r = "";
499
+ if (typeof t == "string" || typeof t == "number") r += t;
1134
500
  else if (typeof t == "object") if (Array.isArray(t)) {
1135
- var s = t.length;
1136
- for (e = 0; e < s; e++) t[e] && (r = lr(t[e])) && (n && (n += " "), n += r);
1137
- } else for (r in t) t[r] && (n && (n += " "), n += r);
1138
- return n;
501
+ var i = t.length;
502
+ for (e = 0; e < i; e++) t[e] && (n = gt(t[e])) && (r && (r += " "), r += n);
503
+ } else for (n in t) t[n] && (r && (r += " "), r += n);
504
+ return r;
1139
505
  }
1140
- function Ye() {
1141
- for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = lr(t)) && (n && (n += " "), n += e);
1142
- return n;
506
+ function Se() {
507
+ for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = gt(t)) && (r && (r += " "), r += e);
508
+ return r;
1143
509
  }
1144
- var bn = Object.defineProperty, gn = (t, e, r) => e in t ? bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, vt = (t, e, r) => (gn(t, typeof e != "symbol" ? e + "" : e, r), r);
1145
- let yn = class {
510
+ var en = Object.defineProperty, tn = (t, e, n) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Be = (t, e, n) => (tn(t, typeof e != "symbol" ? e + "" : e, n), n);
511
+ let nn = class {
1146
512
  constructor() {
1147
- vt(this, "current", this.detect()), vt(this, "handoffState", "pending"), vt(this, "currentId", 0);
513
+ Be(this, "current", this.detect()), Be(this, "handoffState", "pending"), Be(this, "currentId", 0);
1148
514
  }
1149
515
  set(e) {
1150
516
  this.current !== e && (this.handoffState = "pending", this.currentId = 0, this.current = e);
@@ -1170,596 +536,596 @@ let yn = class {
1170
536
  get isHandoffComplete() {
1171
537
  return this.handoffState === "complete";
1172
538
  }
1173
- }, Ke = new yn();
1174
- function wn(t) {
539
+ }, Ee = new nn();
540
+ function rn(t) {
1175
541
  typeof queueMicrotask == "function" ? queueMicrotask(t) : Promise.resolve().then(t).catch((e) => setTimeout(() => {
1176
542
  throw e;
1177
543
  }));
1178
544
  }
1179
- function tt() {
1180
- let t = [], e = { addEventListener(r, n, s, l) {
1181
- return r.addEventListener(n, s, l), e.add(() => r.removeEventListener(n, s, l));
1182
- }, requestAnimationFrame(...r) {
1183
- let n = requestAnimationFrame(...r);
1184
- return e.add(() => cancelAnimationFrame(n));
1185
- }, nextFrame(...r) {
1186
- return e.requestAnimationFrame(() => e.requestAnimationFrame(...r));
1187
- }, setTimeout(...r) {
1188
- let n = setTimeout(...r);
1189
- return e.add(() => clearTimeout(n));
1190
- }, microTask(...r) {
1191
- let n = { current: !0 };
1192
- return wn(() => {
1193
- n.current && r[0]();
545
+ function Me() {
546
+ let t = [], e = { addEventListener(n, r, i, l) {
547
+ return n.addEventListener(r, i, l), e.add(() => n.removeEventListener(r, i, l));
548
+ }, requestAnimationFrame(...n) {
549
+ let r = requestAnimationFrame(...n);
550
+ return e.add(() => cancelAnimationFrame(r));
551
+ }, nextFrame(...n) {
552
+ return e.requestAnimationFrame(() => e.requestAnimationFrame(...n));
553
+ }, setTimeout(...n) {
554
+ let r = setTimeout(...n);
555
+ return e.add(() => clearTimeout(r));
556
+ }, microTask(...n) {
557
+ let r = { current: !0 };
558
+ return rn(() => {
559
+ r.current && n[0]();
1194
560
  }), e.add(() => {
1195
- n.current = !1;
561
+ r.current = !1;
1196
562
  });
1197
- }, style(r, n, s) {
1198
- let l = r.style.getPropertyValue(n);
1199
- return Object.assign(r.style, { [n]: s }), this.add(() => {
1200
- Object.assign(r.style, { [n]: l });
563
+ }, style(n, r, i) {
564
+ let l = n.style.getPropertyValue(r);
565
+ return Object.assign(n.style, { [r]: i }), this.add(() => {
566
+ Object.assign(n.style, { [r]: l });
1201
567
  });
1202
- }, group(r) {
1203
- let n = tt();
1204
- return r(n), this.add(() => n.dispose());
1205
- }, add(r) {
1206
- return t.includes(r) || t.push(r), () => {
1207
- let n = t.indexOf(r);
1208
- if (n >= 0) for (let s of t.splice(n, 1)) s();
568
+ }, group(n) {
569
+ let r = Me();
570
+ return n(r), this.add(() => r.dispose());
571
+ }, add(n) {
572
+ return t.includes(n) || t.push(n), () => {
573
+ let r = t.indexOf(n);
574
+ if (r >= 0) for (let i of t.splice(r, 1)) i();
1209
575
  };
1210
576
  }, dispose() {
1211
- for (let r of t.splice(0)) r();
577
+ for (let n of t.splice(0)) n();
1212
578
  } };
1213
579
  return e;
1214
580
  }
1215
- function or() {
1216
- let [t] = z(tt);
1217
- return X(() => () => t.dispose(), [t]), t;
581
+ function yt() {
582
+ let [t] = $(Me);
583
+ return D(() => () => t.dispose(), [t]), t;
1218
584
  }
1219
- let he = (t, e) => {
1220
- Ke.isServer ? X(t, e) : rn(t, e);
585
+ let Q = (t, e) => {
586
+ Ee.isServer ? D(t, e) : Ht(t, e);
1221
587
  };
1222
- function ur(t) {
1223
- let e = q(t);
1224
- return he(() => {
588
+ function wt(t) {
589
+ let e = j(t);
590
+ return Q(() => {
1225
591
  e.current = t;
1226
592
  }, [t]), e;
1227
593
  }
1228
- let de = function(t) {
1229
- let e = ur(t);
1230
- return J.useCallback((...r) => e.current(...r), [e]);
594
+ let G = function(t) {
595
+ let e = wt(t);
596
+ return B.useCallback((...n) => e.current(...n), [e]);
1231
597
  };
1232
- function yt(...t) {
598
+ function Xe(...t) {
1233
599
  return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" ");
1234
600
  }
1235
- function rt(t, e, ...r) {
601
+ function Le(t, e, ...n) {
1236
602
  if (t in e) {
1237
- let s = e[t];
1238
- return typeof s == "function" ? s(...r) : s;
603
+ let i = e[t];
604
+ return typeof i == "function" ? i(...n) : i;
1239
605
  }
1240
- let n = new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((s) => `"${s}"`).join(", ")}.`);
1241
- throw Error.captureStackTrace && Error.captureStackTrace(n, rt), n;
606
+ let r = new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((i) => `"${i}"`).join(", ")}.`);
607
+ throw Error.captureStackTrace && Error.captureStackTrace(r, Le), r;
1242
608
  }
1243
- var cr = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(cr || {}), pe = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(pe || {});
1244
- function dr() {
1245
- let t = En();
1246
- return ue((e) => xn({ mergeRefs: t, ...e }), [t]);
609
+ var xt = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(xt || {}), J = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(J || {});
610
+ function Et() {
611
+ let t = ln();
612
+ return V((e) => an({ mergeRefs: t, ...e }), [t]);
1247
613
  }
1248
- function xn({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: s, visible: l = !0, name: i, mergeRefs: m }) {
1249
- m = m ?? Tn;
1250
- let o = fr(e, t);
1251
- if (l) return Ue(o, r, n, i, m);
1252
- let g = s ?? 0;
1253
- if (g & 2) {
1254
- let { static: y = !1, ...w } = o;
1255
- if (y) return Ue(w, r, n, i, m);
614
+ function an({ ourProps: t, theirProps: e, slot: n, defaultTag: r, features: i, visible: l = !0, name: a, mergeRefs: m }) {
615
+ m = m ?? sn;
616
+ let s = Nt(e, t);
617
+ if (l) return we(s, n, r, a, m);
618
+ let p = i ?? 0;
619
+ if (p & 2) {
620
+ let { static: b = !1, ...w } = s;
621
+ if (b) return we(w, n, r, a, m);
1256
622
  }
1257
- if (g & 1) {
1258
- let { unmount: y = !0, ...w } = o;
1259
- return rt(y ? 0 : 1, { 0() {
623
+ if (p & 1) {
624
+ let { unmount: b = !0, ...w } = s;
625
+ return Le(b ? 0 : 1, { 0() {
1260
626
  return null;
1261
627
  }, 1() {
1262
- return Ue({ ...w, hidden: !0, style: { display: "none" } }, r, n, i, m);
628
+ return we({ ...w, hidden: !0, style: { display: "none" } }, n, r, a, m);
1263
629
  } });
1264
630
  }
1265
- return Ue(o, r, n, i, m);
631
+ return we(s, n, r, a, m);
1266
632
  }
1267
- function Ue(t, e = {}, r, n, s) {
1268
- let { as: l = r, children: i, refName: m = "ref", ...o } = pt(t, ["unmount", "static"]), g = t.ref !== void 0 ? { [m]: t.ref } : {}, y = typeof i == "function" ? i(e) : i;
1269
- "className" in o && o.className && typeof o.className == "function" && (o.className = o.className(e)), o["aria-labelledby"] && o["aria-labelledby"] === o.id && (o["aria-labelledby"] = void 0);
633
+ function we(t, e = {}, n, r, i) {
634
+ let { as: l = n, children: a, refName: m = "ref", ...s } = He(t, ["unmount", "static"]), p = t.ref !== void 0 ? { [m]: t.ref } : {}, b = typeof a == "function" ? a(e) : a;
635
+ "className" in s && s.className && typeof s.className == "function" && (s.className = s.className(e)), s["aria-labelledby"] && s["aria-labelledby"] === s.id && (s["aria-labelledby"] = void 0);
1270
636
  let w = {};
1271
637
  if (e) {
1272
- let P = !1, S = [];
1273
- for (let [p, E] of Object.entries(e)) typeof E == "boolean" && (P = !0), E === !0 && S.push(p.replace(/([A-Z])/g, (d) => `-${d.toLowerCase()}`));
1274
- if (P) {
1275
- w["data-headlessui-state"] = S.join(" ");
1276
- for (let p of S) w[`data-${p}`] = "";
638
+ let T = !1, E = [];
639
+ for (let [c, g] of Object.entries(e)) typeof g == "boolean" && (T = !0), g === !0 && E.push(c.replace(/([A-Z])/g, (d) => `-${d.toLowerCase()}`));
640
+ if (T) {
641
+ w["data-headlessui-state"] = E.join(" ");
642
+ for (let c of E) w[`data-${c}`] = "";
1277
643
  }
1278
644
  }
1279
- if (l === we && (Object.keys(be(o)).length > 0 || Object.keys(be(w)).length > 0)) if (!nn(y) || Array.isArray(y) && y.length > 1) {
1280
- if (Object.keys(be(o)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${n} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(be(o)).concat(Object.keys(be(w))).map((P) => ` - ${P}`).join(`
1281
- `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((P) => ` - ${P}`).join(`
645
+ if (l === ae && (Object.keys(te(s)).length > 0 || Object.keys(te(w)).length > 0)) if (!Kt(b) || Array.isArray(b) && b.length > 1) {
646
+ if (Object.keys(te(s)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(te(s)).concat(Object.keys(te(w))).map((T) => ` - ${T}`).join(`
647
+ `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((T) => ` - ${T}`).join(`
1282
648
  `)].join(`
1283
649
  `));
1284
650
  } else {
1285
- let P = y.props, S = P == null ? void 0 : P.className, p = typeof S == "function" ? (...f) => yt(S(...f), o.className) : yt(S, o.className), E = p ? { className: p } : {}, d = fr(y.props, be(pt(o, ["ref"])));
651
+ let T = b.props, E = T == null ? void 0 : T.className, c = typeof E == "function" ? (...f) => Xe(E(...f), s.className) : Xe(E, s.className), g = c ? { className: c } : {}, d = Nt(b.props, te(He(s, ["ref"])));
1286
652
  for (let f in w) f in d && delete w[f];
1287
- return an(y, Object.assign({}, d, w, g, { ref: s(Rn(y), g.ref) }, E));
653
+ return _t(b, Object.assign({}, d, w, p, { ref: i(on(b), p.ref) }, g));
1288
654
  }
1289
- return Ve(l, Object.assign({}, pt(o, ["ref"]), l !== we && g, l !== we && w), y);
655
+ return Ne(l, Object.assign({}, He(s, ["ref"]), l !== ae && p, l !== ae && w), b);
1290
656
  }
1291
- function En() {
1292
- let t = q([]), e = ue((r) => {
1293
- for (let n of t.current) n != null && (typeof n == "function" ? n(r) : n.current = r);
657
+ function ln() {
658
+ let t = j([]), e = V((n) => {
659
+ for (let r of t.current) r != null && (typeof r == "function" ? r(n) : r.current = n);
1294
660
  }, []);
1295
- return (...r) => {
1296
- if (!r.every((n) => n == null)) return t.current = r, e;
661
+ return (...n) => {
662
+ if (!n.every((r) => r == null)) return t.current = n, e;
1297
663
  };
1298
664
  }
1299
- function Tn(...t) {
665
+ function sn(...t) {
1300
666
  return t.every((e) => e == null) ? void 0 : (e) => {
1301
- for (let r of t) r != null && (typeof r == "function" ? r(e) : r.current = e);
667
+ for (let n of t) n != null && (typeof n == "function" ? n(e) : n.current = e);
1302
668
  };
1303
669
  }
1304
- function fr(...t) {
670
+ function Nt(...t) {
1305
671
  if (t.length === 0) return {};
1306
672
  if (t.length === 1) return t[0];
1307
- let e = {}, r = {};
1308
- for (let n of t) for (let s in n) s.startsWith("on") && typeof n[s] == "function" ? (r[s] != null || (r[s] = []), r[s].push(n[s])) : e[s] = n[s];
1309
- if (e.disabled || e["aria-disabled"]) for (let n in r) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n) && (r[n] = [(s) => {
673
+ let e = {}, n = {};
674
+ for (let r of t) for (let i in r) i.startsWith("on") && typeof r[i] == "function" ? (n[i] != null || (n[i] = []), n[i].push(r[i])) : e[i] = r[i];
675
+ if (e.disabled || e["aria-disabled"]) for (let r in n) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r) && (n[r] = [(i) => {
1310
676
  var l;
1311
- return (l = s == null ? void 0 : s.preventDefault) == null ? void 0 : l.call(s);
677
+ return (l = i == null ? void 0 : i.preventDefault) == null ? void 0 : l.call(i);
1312
678
  }]);
1313
- for (let n in r) Object.assign(e, { [n](s, ...l) {
1314
- let i = r[n];
1315
- for (let m of i) {
1316
- if ((s instanceof Event || (s == null ? void 0 : s.nativeEvent) instanceof Event) && s.defaultPrevented) return;
1317
- m(s, ...l);
679
+ for (let r in n) Object.assign(e, { [r](i, ...l) {
680
+ let a = n[r];
681
+ for (let m of a) {
682
+ if ((i instanceof Event || (i == null ? void 0 : i.nativeEvent) instanceof Event) && i.defaultPrevented) return;
683
+ m(i, ...l);
1318
684
  }
1319
685
  } });
1320
686
  return e;
1321
687
  }
1322
- function Ot(t) {
688
+ function et(t) {
1323
689
  var e;
1324
- return Object.assign(Tt(t), { displayName: (e = t.displayName) != null ? e : t.name });
690
+ return Object.assign(Ze(t), { displayName: (e = t.displayName) != null ? e : t.name });
1325
691
  }
1326
- function be(t) {
692
+ function te(t) {
1327
693
  let e = Object.assign({}, t);
1328
- for (let r in e) e[r] === void 0 && delete e[r];
694
+ for (let n in e) e[n] === void 0 && delete e[n];
1329
695
  return e;
1330
696
  }
1331
- function pt(t, e = []) {
1332
- let r = Object.assign({}, t);
1333
- for (let n of e) n in r && delete r[n];
1334
- return r;
697
+ function He(t, e = []) {
698
+ let n = Object.assign({}, t);
699
+ for (let r of e) r in n && delete n[r];
700
+ return n;
1335
701
  }
1336
- function Rn(t) {
1337
- return J.version.split(".")[0] >= "19" ? t.props.ref : t.ref;
702
+ function on(t) {
703
+ return B.version.split(".")[0] >= "19" ? t.props.ref : t.ref;
1338
704
  }
1339
- let Sn = Symbol();
1340
- function vr(...t) {
1341
- let e = q(t);
1342
- X(() => {
705
+ let un = Symbol();
706
+ function Tt(...t) {
707
+ let e = j(t);
708
+ D(() => {
1343
709
  e.current = t;
1344
710
  }, [t]);
1345
- let r = de((n) => {
1346
- for (let s of e.current) s != null && (typeof s == "function" ? s(n) : s.current = n);
711
+ let n = G((r) => {
712
+ for (let i of e.current) i != null && (typeof i == "function" ? i(r) : i.current = r);
1347
713
  });
1348
- return t.every((n) => n == null || (n == null ? void 0 : n[Sn])) ? void 0 : r;
714
+ return t.every((r) => r == null || (r == null ? void 0 : r[un])) ? void 0 : n;
1349
715
  }
1350
- function On(t = 0) {
1351
- let [e, r] = z(t), n = ue((o) => r(o), [e]), s = ue((o) => r((g) => g | o), [e]), l = ue((o) => (e & o) === o, [e]), i = ue((o) => r((g) => g & ~o), [r]), m = ue((o) => r((g) => g ^ o), [r]);
1352
- return { flags: e, setFlag: n, addFlag: s, hasFlag: l, removeFlag: i, toggleFlag: m };
716
+ function dn(t = 0) {
717
+ let [e, n] = $(t), r = V((s) => n(s), [e]), i = V((s) => n((p) => p | s), [e]), l = V((s) => (e & s) === s, [e]), a = V((s) => n((p) => p & ~s), [n]), m = V((s) => n((p) => p ^ s), [n]);
718
+ return { flags: e, setFlag: r, addFlag: i, hasFlag: l, removeFlag: a, toggleFlag: m };
1353
719
  }
1354
- var qt, Xt;
1355
- typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((qt = process == null ? void 0 : process.env) == null ? void 0 : qt.NODE_ENV) === "test" && typeof ((Xt = Element == null ? void 0 : Element.prototype) == null ? void 0 : Xt.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
720
+ var at, it;
721
+ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((at = process == null ? void 0 : process.env) == null ? void 0 : at.NODE_ENV) === "test" && typeof ((it = Element == null ? void 0 : Element.prototype) == null ? void 0 : it.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
1356
722
  return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
1357
723
  `)), [];
1358
724
  });
1359
- var Pn = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(Pn || {});
1360
- function Cn(t) {
725
+ var cn = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(cn || {});
726
+ function fn(t) {
1361
727
  let e = {};
1362
- for (let r in t) t[r] === !0 && (e[`data-${r}`] = "");
728
+ for (let n in t) t[n] === !0 && (e[`data-${n}`] = "");
1363
729
  return e;
1364
730
  }
1365
- function kn(t, e, r, n) {
1366
- let [s, l] = z(r), { hasFlag: i, addFlag: m, removeFlag: o } = On(t && s ? 3 : 0), g = q(!1), y = q(!1), w = or();
1367
- return he(() => {
1368
- var P;
731
+ function mn(t, e, n, r) {
732
+ let [i, l] = $(n), { hasFlag: a, addFlag: m, removeFlag: s } = dn(t && i ? 3 : 0), p = j(!1), b = j(!1), w = yt();
733
+ return Q(() => {
734
+ var T;
1369
735
  if (t) {
1370
- if (r && l(!0), !e) {
1371
- r && m(3);
736
+ if (n && l(!0), !e) {
737
+ n && m(3);
1372
738
  return;
1373
739
  }
1374
- return (P = n == null ? void 0 : n.start) == null || P.call(n, r), Fn(e, { inFlight: g, prepare() {
1375
- y.current ? y.current = !1 : y.current = g.current, g.current = !0, !y.current && (r ? (m(3), o(4)) : (m(4), o(2)));
740
+ return (T = r == null ? void 0 : r.start) == null || T.call(r, n), hn(e, { inFlight: p, prepare() {
741
+ b.current ? b.current = !1 : b.current = p.current, p.current = !0, !b.current && (n ? (m(3), s(4)) : (m(4), s(2)));
1376
742
  }, run() {
1377
- y.current ? r ? (o(3), m(4)) : (o(4), m(3)) : r ? o(1) : m(1);
743
+ b.current ? n ? (s(3), m(4)) : (s(4), m(3)) : n ? s(1) : m(1);
1378
744
  }, done() {
1379
- var S;
1380
- y.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (g.current = !1, o(7), r || l(!1), (S = n == null ? void 0 : n.end) == null || S.call(n, r));
745
+ var E;
746
+ b.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (p.current = !1, s(7), n || l(!1), (E = r == null ? void 0 : r.end) == null || E.call(r, n));
1381
747
  } });
1382
748
  }
1383
- }, [t, r, e, w]), t ? [s, { closed: i(1), enter: i(2), leave: i(4), transition: i(2) || i(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
749
+ }, [t, n, e, w]), t ? [i, { closed: a(1), enter: a(2), leave: a(4), transition: a(2) || a(4) }] : [n, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
1384
750
  }
1385
- function Fn(t, { prepare: e, run: r, done: n, inFlight: s }) {
1386
- let l = tt();
1387
- return jn(t, { prepare: e, inFlight: s }), l.nextFrame(() => {
1388
- r(), l.requestAnimationFrame(() => {
1389
- l.add(Nn(t, n));
751
+ function hn(t, { prepare: e, run: n, done: r, inFlight: i }) {
752
+ let l = Me();
753
+ return pn(t, { prepare: e, inFlight: i }), l.nextFrame(() => {
754
+ n(), l.requestAnimationFrame(() => {
755
+ l.add(vn(t, r));
1390
756
  });
1391
757
  }), l.dispose;
1392
758
  }
1393
- function Nn(t, e) {
1394
- var r, n;
1395
- let s = tt();
1396
- if (!t) return s.dispose;
759
+ function vn(t, e) {
760
+ var n, r;
761
+ let i = Me();
762
+ if (!t) return i.dispose;
1397
763
  let l = !1;
1398
- s.add(() => {
764
+ i.add(() => {
1399
765
  l = !0;
1400
766
  });
1401
- let i = (n = (r = t.getAnimations) == null ? void 0 : r.call(t).filter((m) => m instanceof CSSTransition)) != null ? n : [];
1402
- return i.length === 0 ? (e(), s.dispose) : (Promise.allSettled(i.map((m) => m.finished)).then(() => {
767
+ let a = (r = (n = t.getAnimations) == null ? void 0 : n.call(t).filter((m) => m instanceof CSSTransition)) != null ? r : [];
768
+ return a.length === 0 ? (e(), i.dispose) : (Promise.allSettled(a.map((m) => m.finished)).then(() => {
1403
769
  l || e();
1404
- }), s.dispose);
770
+ }), i.dispose);
1405
771
  }
1406
- function jn(t, { inFlight: e, prepare: r }) {
772
+ function pn(t, { inFlight: e, prepare: n }) {
1407
773
  if (e != null && e.current) {
1408
- r();
774
+ n();
1409
775
  return;
1410
776
  }
1411
- let n = t.style.transition;
1412
- t.style.transition = "none", r(), t.offsetHeight, t.style.transition = n;
777
+ let r = t.style.transition;
778
+ t.style.transition = "none", n(), t.offsetHeight, t.style.transition = r;
1413
779
  }
1414
780
  /*!
1415
781
  * tabbable 6.2.0
1416
782
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1417
783
  */
1418
- var pr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], qe = /* @__PURE__ */ pr.join(","), hr = typeof Element > "u", xe = hr ? function() {
1419
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Xe = !hr && Element.prototype.getRootNode ? function(t) {
784
+ var St = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Oe = /* @__PURE__ */ St.join(","), Ot = typeof Element > "u", ie = Ot ? function() {
785
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Fe = !Ot && Element.prototype.getRootNode ? function(t) {
1420
786
  var e;
1421
787
  return t == null || (e = t.getRootNode) === null || e === void 0 ? void 0 : e.call(t);
1422
788
  } : function(t) {
1423
789
  return t == null ? void 0 : t.ownerDocument;
1424
- }, ze = function t(e, r) {
1425
- var n;
1426
- r === void 0 && (r = !0);
1427
- var s = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "inert"), l = s === "" || s === "true", i = l || r && e && t(e.parentNode);
1428
- return i;
1429
- }, An = function(e) {
1430
- var r, n = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "contenteditable");
1431
- return n === "" || n === "true";
1432
- }, mr = function(e, r, n) {
1433
- if (ze(e))
790
+ }, ke = function t(e, n) {
791
+ var r;
792
+ n === void 0 && (n = !0);
793
+ var i = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "inert"), l = i === "" || i === "true", a = l || n && e && t(e.parentNode);
794
+ return a;
795
+ }, bn = function(e) {
796
+ var n, r = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "contenteditable");
797
+ return r === "" || r === "true";
798
+ }, Ft = function(e, n, r) {
799
+ if (ke(e))
1434
800
  return [];
1435
- var s = Array.prototype.slice.apply(e.querySelectorAll(qe));
1436
- return r && xe.call(e, qe) && s.unshift(e), s = s.filter(n), s;
1437
- }, br = function t(e, r, n) {
1438
- for (var s = [], l = Array.from(e); l.length; ) {
1439
- var i = l.shift();
1440
- if (!ze(i, !1))
1441
- if (i.tagName === "SLOT") {
1442
- var m = i.assignedElements(), o = m.length ? m : i.children, g = t(o, !0, n);
1443
- n.flatten ? s.push.apply(s, g) : s.push({
1444
- scopeParent: i,
1445
- candidates: g
801
+ var i = Array.prototype.slice.apply(e.querySelectorAll(Oe));
802
+ return n && ie.call(e, Oe) && i.unshift(e), i = i.filter(r), i;
803
+ }, kt = function t(e, n, r) {
804
+ for (var i = [], l = Array.from(e); l.length; ) {
805
+ var a = l.shift();
806
+ if (!ke(a, !1))
807
+ if (a.tagName === "SLOT") {
808
+ var m = a.assignedElements(), s = m.length ? m : a.children, p = t(s, !0, r);
809
+ r.flatten ? i.push.apply(i, p) : i.push({
810
+ scopeParent: a,
811
+ candidates: p
1446
812
  });
1447
813
  } else {
1448
- var y = xe.call(i, qe);
1449
- y && n.filter(i) && (r || !e.includes(i)) && s.push(i);
1450
- var w = i.shadowRoot || // check for an undisclosed shadow
1451
- typeof n.getShadowRoot == "function" && n.getShadowRoot(i), P = !ze(w, !1) && (!n.shadowRootFilter || n.shadowRootFilter(i));
1452
- if (w && P) {
1453
- var S = t(w === !0 ? i.children : w.children, !0, n);
1454
- n.flatten ? s.push.apply(s, S) : s.push({
1455
- scopeParent: i,
1456
- candidates: S
814
+ var b = ie.call(a, Oe);
815
+ b && r.filter(a) && (n || !e.includes(a)) && i.push(a);
816
+ var w = a.shadowRoot || // check for an undisclosed shadow
817
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(a), T = !ke(w, !1) && (!r.shadowRootFilter || r.shadowRootFilter(a));
818
+ if (w && T) {
819
+ var E = t(w === !0 ? a.children : w.children, !0, r);
820
+ r.flatten ? i.push.apply(i, E) : i.push({
821
+ scopeParent: a,
822
+ candidates: E
1457
823
  });
1458
824
  } else
1459
- l.unshift.apply(l, i.children);
825
+ l.unshift.apply(l, a.children);
1460
826
  }
1461
827
  }
1462
- return s;
1463
- }, gr = function(e) {
828
+ return i;
829
+ }, Ct = function(e) {
1464
830
  return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
1465
- }, ge = function(e) {
831
+ }, ne = function(e) {
1466
832
  if (!e)
1467
833
  throw new Error("No node provided");
1468
- return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || An(e)) && !gr(e) ? 0 : e.tabIndex;
1469
- }, In = function(e, r) {
1470
- var n = ge(e);
1471
- return n < 0 && r && !gr(e) ? 0 : n;
1472
- }, _n = function(e, r) {
1473
- return e.tabIndex === r.tabIndex ? e.documentOrder - r.documentOrder : e.tabIndex - r.tabIndex;
1474
- }, yr = function(e) {
834
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || bn(e)) && !Ct(e) ? 0 : e.tabIndex;
835
+ }, gn = function(e, n) {
836
+ var r = ne(e);
837
+ return r < 0 && n && !Ct(e) ? 0 : r;
838
+ }, yn = function(e, n) {
839
+ return e.tabIndex === n.tabIndex ? e.documentOrder - n.documentOrder : e.tabIndex - n.tabIndex;
840
+ }, It = function(e) {
1475
841
  return e.tagName === "INPUT";
1476
- }, Dn = function(e) {
1477
- return yr(e) && e.type === "hidden";
1478
- }, Mn = function(e) {
1479
- var r = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(n) {
1480
- return n.tagName === "SUMMARY";
842
+ }, wn = function(e) {
843
+ return It(e) && e.type === "hidden";
844
+ }, xn = function(e) {
845
+ var n = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(r) {
846
+ return r.tagName === "SUMMARY";
1481
847
  });
1482
- return r;
1483
- }, Ln = function(e, r) {
1484
- for (var n = 0; n < e.length; n++)
1485
- if (e[n].checked && e[n].form === r)
1486
- return e[n];
1487
- }, $n = function(e) {
848
+ return n;
849
+ }, En = function(e, n) {
850
+ for (var r = 0; r < e.length; r++)
851
+ if (e[r].checked && e[r].form === n)
852
+ return e[r];
853
+ }, Nn = function(e) {
1488
854
  if (!e.name)
1489
855
  return !0;
1490
- var r = e.form || Xe(e), n = function(m) {
1491
- return r.querySelectorAll('input[type="radio"][name="' + m + '"]');
1492
- }, s;
856
+ var n = e.form || Fe(e), r = function(m) {
857
+ return n.querySelectorAll('input[type="radio"][name="' + m + '"]');
858
+ }, i;
1493
859
  if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
1494
- s = n(window.CSS.escape(e.name));
860
+ i = r(window.CSS.escape(e.name));
1495
861
  else
1496
862
  try {
1497
- s = n(e.name);
1498
- } catch (i) {
1499
- return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
863
+ i = r(e.name);
864
+ } catch (a) {
865
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1;
1500
866
  }
1501
- var l = Ln(s, e.form);
867
+ var l = En(i, e.form);
1502
868
  return !l || l === e;
1503
- }, Wn = function(e) {
1504
- return yr(e) && e.type === "radio";
1505
- }, Un = function(e) {
1506
- return Wn(e) && !$n(e);
1507
- }, Bn = function(e) {
1508
- var r, n = e && Xe(e), s = (r = n) === null || r === void 0 ? void 0 : r.host, l = !1;
1509
- if (n && n !== e) {
1510
- var i, m, o;
1511
- for (l = !!((i = s) !== null && i !== void 0 && (m = i.ownerDocument) !== null && m !== void 0 && m.contains(s) || e != null && (o = e.ownerDocument) !== null && o !== void 0 && o.contains(e)); !l && s; ) {
1512
- var g, y, w;
1513
- n = Xe(s), s = (g = n) === null || g === void 0 ? void 0 : g.host, l = !!((y = s) !== null && y !== void 0 && (w = y.ownerDocument) !== null && w !== void 0 && w.contains(s));
869
+ }, Tn = function(e) {
870
+ return It(e) && e.type === "radio";
871
+ }, Sn = function(e) {
872
+ return Tn(e) && !Nn(e);
873
+ }, On = function(e) {
874
+ var n, r = e && Fe(e), i = (n = r) === null || n === void 0 ? void 0 : n.host, l = !1;
875
+ if (r && r !== e) {
876
+ var a, m, s;
877
+ for (l = !!((a = i) !== null && a !== void 0 && (m = a.ownerDocument) !== null && m !== void 0 && m.contains(i) || e != null && (s = e.ownerDocument) !== null && s !== void 0 && s.contains(e)); !l && i; ) {
878
+ var p, b, w;
879
+ r = Fe(i), i = (p = r) === null || p === void 0 ? void 0 : p.host, l = !!((b = i) !== null && b !== void 0 && (w = b.ownerDocument) !== null && w !== void 0 && w.contains(i));
1514
880
  }
1515
881
  }
1516
882
  return l;
1517
- }, zt = function(e) {
1518
- var r = e.getBoundingClientRect(), n = r.width, s = r.height;
1519
- return n === 0 && s === 0;
1520
- }, Kn = function(e, r) {
1521
- var n = r.displayCheck, s = r.getShadowRoot;
883
+ }, lt = function(e) {
884
+ var n = e.getBoundingClientRect(), r = n.width, i = n.height;
885
+ return r === 0 && i === 0;
886
+ }, Fn = function(e, n) {
887
+ var r = n.displayCheck, i = n.getShadowRoot;
1522
888
  if (getComputedStyle(e).visibility === "hidden")
1523
889
  return !0;
1524
- var l = xe.call(e, "details>summary:first-of-type"), i = l ? e.parentElement : e;
1525
- if (xe.call(i, "details:not([open]) *"))
890
+ var l = ie.call(e, "details>summary:first-of-type"), a = l ? e.parentElement : e;
891
+ if (ie.call(a, "details:not([open]) *"))
1526
892
  return !0;
1527
- if (!n || n === "full" || n === "legacy-full") {
1528
- if (typeof s == "function") {
893
+ if (!r || r === "full" || r === "legacy-full") {
894
+ if (typeof i == "function") {
1529
895
  for (var m = e; e; ) {
1530
- var o = e.parentElement, g = Xe(e);
1531
- if (o && !o.shadowRoot && s(o) === !0)
1532
- return zt(e);
1533
- e.assignedSlot ? e = e.assignedSlot : !o && g !== e.ownerDocument ? e = g.host : e = o;
896
+ var s = e.parentElement, p = Fe(e);
897
+ if (s && !s.shadowRoot && i(s) === !0)
898
+ return lt(e);
899
+ e.assignedSlot ? e = e.assignedSlot : !s && p !== e.ownerDocument ? e = p.host : e = s;
1534
900
  }
1535
901
  e = m;
1536
902
  }
1537
- if (Bn(e))
903
+ if (On(e))
1538
904
  return !e.getClientRects().length;
1539
- if (n !== "legacy-full")
905
+ if (r !== "legacy-full")
1540
906
  return !0;
1541
- } else if (n === "non-zero-area")
1542
- return zt(e);
907
+ } else if (r === "non-zero-area")
908
+ return lt(e);
1543
909
  return !1;
1544
- }, Vn = function(e) {
910
+ }, kn = function(e) {
1545
911
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
1546
- for (var r = e.parentElement; r; ) {
1547
- if (r.tagName === "FIELDSET" && r.disabled) {
1548
- for (var n = 0; n < r.children.length; n++) {
1549
- var s = r.children.item(n);
1550
- if (s.tagName === "LEGEND")
1551
- return xe.call(r, "fieldset[disabled] *") ? !0 : !s.contains(e);
912
+ for (var n = e.parentElement; n; ) {
913
+ if (n.tagName === "FIELDSET" && n.disabled) {
914
+ for (var r = 0; r < n.children.length; r++) {
915
+ var i = n.children.item(r);
916
+ if (i.tagName === "LEGEND")
917
+ return ie.call(n, "fieldset[disabled] *") ? !0 : !i.contains(e);
1552
918
  }
1553
919
  return !0;
1554
920
  }
1555
- r = r.parentElement;
921
+ n = n.parentElement;
1556
922
  }
1557
923
  return !1;
1558
- }, Ge = function(e, r) {
1559
- return !(r.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
924
+ }, Ce = function(e, n) {
925
+ return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
1560
926
  // because we're limited in the type of selectors we can use in JSDom (see related
1561
927
  // note related to `candidateSelectors`)
1562
- ze(r) || Dn(r) || Kn(r, e) || // For a details element with a summary, the summary element gets the focus
1563
- Mn(r) || Vn(r));
1564
- }, wt = function(e, r) {
1565
- return !(Un(r) || ge(r) < 0 || !Ge(e, r));
1566
- }, Hn = function(e) {
1567
- var r = parseInt(e.getAttribute("tabindex"), 10);
1568
- return !!(isNaN(r) || r >= 0);
1569
- }, Yn = function t(e) {
1570
- var r = [], n = [];
1571
- return e.forEach(function(s, l) {
1572
- var i = !!s.scopeParent, m = i ? s.scopeParent : s, o = In(m, i), g = i ? t(s.candidates) : m;
1573
- o === 0 ? i ? r.push.apply(r, g) : r.push(m) : n.push({
928
+ ke(n) || wn(n) || Fn(n, e) || // For a details element with a summary, the summary element gets the focus
929
+ xn(n) || kn(n));
930
+ }, Ve = function(e, n) {
931
+ return !(Sn(n) || ne(n) < 0 || !Ce(e, n));
932
+ }, Cn = function(e) {
933
+ var n = parseInt(e.getAttribute("tabindex"), 10);
934
+ return !!(isNaN(n) || n >= 0);
935
+ }, In = function t(e) {
936
+ var n = [], r = [];
937
+ return e.forEach(function(i, l) {
938
+ var a = !!i.scopeParent, m = a ? i.scopeParent : i, s = gn(m, a), p = a ? t(i.candidates) : m;
939
+ s === 0 ? a ? n.push.apply(n, p) : n.push(m) : r.push({
1574
940
  documentOrder: l,
1575
- tabIndex: o,
1576
- item: s,
1577
- isScope: i,
1578
- content: g
941
+ tabIndex: s,
942
+ item: i,
943
+ isScope: a,
944
+ content: p
1579
945
  });
1580
- }), n.sort(_n).reduce(function(s, l) {
1581
- return l.isScope ? s.push.apply(s, l.content) : s.push(l.content), s;
1582
- }, []).concat(r);
1583
- }, qn = function(e, r) {
1584
- r = r || {};
1585
- var n;
1586
- return r.getShadowRoot ? n = br([e], r.includeContainer, {
1587
- filter: wt.bind(null, r),
946
+ }), r.sort(yn).reduce(function(i, l) {
947
+ return l.isScope ? i.push.apply(i, l.content) : i.push(l.content), i;
948
+ }, []).concat(n);
949
+ }, Pn = function(e, n) {
950
+ n = n || {};
951
+ var r;
952
+ return n.getShadowRoot ? r = kt([e], n.includeContainer, {
953
+ filter: Ve.bind(null, n),
1588
954
  flatten: !1,
1589
- getShadowRoot: r.getShadowRoot,
1590
- shadowRootFilter: Hn
1591
- }) : n = mr(e, r.includeContainer, wt.bind(null, r)), Yn(n);
1592
- }, Xn = function(e, r) {
1593
- r = r || {};
1594
- var n;
1595
- return r.getShadowRoot ? n = br([e], r.includeContainer, {
1596
- filter: Ge.bind(null, r),
955
+ getShadowRoot: n.getShadowRoot,
956
+ shadowRootFilter: Cn
957
+ }) : r = Ft(e, n.includeContainer, Ve.bind(null, n)), In(r);
958
+ }, Rn = function(e, n) {
959
+ n = n || {};
960
+ var r;
961
+ return n.getShadowRoot ? r = kt([e], n.includeContainer, {
962
+ filter: Ce.bind(null, n),
1597
963
  flatten: !0,
1598
- getShadowRoot: r.getShadowRoot
1599
- }) : n = mr(e, r.includeContainer, Ge.bind(null, r)), n;
1600
- }, Oe = function(e, r) {
1601
- if (r = r || {}, !e)
964
+ getShadowRoot: n.getShadowRoot
965
+ }) : r = Ft(e, n.includeContainer, Ce.bind(null, n)), r;
966
+ }, ue = function(e, n) {
967
+ if (n = n || {}, !e)
1602
968
  throw new Error("No node provided");
1603
- return xe.call(e, qe) === !1 ? !1 : wt(r, e);
1604
- }, zn = /* @__PURE__ */ pr.concat("iframe").join(","), ht = function(e, r) {
1605
- if (r = r || {}, !e)
969
+ return ie.call(e, Oe) === !1 ? !1 : Ve(n, e);
970
+ }, An = /* @__PURE__ */ St.concat("iframe").join(","), Ke = function(e, n) {
971
+ if (n = n || {}, !e)
1606
972
  throw new Error("No node provided");
1607
- return xe.call(e, zn) === !1 ? !1 : Ge(r, e);
973
+ return ie.call(e, An) === !1 ? !1 : Ce(n, e);
1608
974
  };
1609
- let Pt = Je(null);
1610
- Pt.displayName = "OpenClosedContext";
1611
- var ye = ((t) => (t[t.Open = 1] = "Open", t[t.Closed = 2] = "Closed", t[t.Closing = 4] = "Closing", t[t.Opening = 8] = "Opening", t))(ye || {});
1612
- function wr() {
1613
- return Pe(Pt);
975
+ let tt = Ie(null);
976
+ tt.displayName = "OpenClosedContext";
977
+ var re = ((t) => (t[t.Open = 1] = "Open", t[t.Closed = 2] = "Closed", t[t.Closing = 4] = "Closing", t[t.Opening = 8] = "Opening", t))(re || {});
978
+ function Pt() {
979
+ return de(tt);
1614
980
  }
1615
- function Gn({ value: t, children: e }) {
1616
- return J.createElement(Pt.Provider, { value: t }, e);
981
+ function Mn({ value: t, children: e }) {
982
+ return B.createElement(tt.Provider, { value: t }, e);
1617
983
  }
1618
- function Jn() {
984
+ function Ln() {
1619
985
  let t = typeof document > "u";
1620
- return "useSyncExternalStore" in _e ? ((e) => e.useSyncExternalStore)(_e)(() => () => {
986
+ return "useSyncExternalStore" in pe ? ((e) => e.useSyncExternalStore)(pe)(() => () => {
1621
987
  }, () => !1, () => !t) : !1;
1622
988
  }
1623
- function xr() {
1624
- let t = Jn(), [e, r] = _e.useState(Ke.isHandoffComplete);
1625
- return e && Ke.isHandoffComplete === !1 && r(!1), _e.useEffect(() => {
1626
- e !== !0 && r(!0);
1627
- }, [e]), _e.useEffect(() => Ke.handoff(), []), t ? !1 : e;
989
+ function Rt() {
990
+ let t = Ln(), [e, n] = pe.useState(Ee.isHandoffComplete);
991
+ return e && Ee.isHandoffComplete === !1 && n(!1), pe.useEffect(() => {
992
+ e !== !0 && n(!0);
993
+ }, [e]), pe.useEffect(() => Ee.handoff(), []), t ? !1 : e;
1628
994
  }
1629
- function Zn() {
1630
- let t = q(!1);
1631
- return he(() => (t.current = !0, () => {
995
+ function jn() {
996
+ let t = j(!1);
997
+ return Q(() => (t.current = !0, () => {
1632
998
  t.current = !1;
1633
999
  }), []), t;
1634
1000
  }
1635
- function Er(t) {
1001
+ function At(t) {
1636
1002
  var e;
1637
- return !!(t.enter || t.enterFrom || t.enterTo || t.leave || t.leaveFrom || t.leaveTo) || ((e = t.as) != null ? e : Rr) !== we || J.Children.count(t.children) === 1;
1003
+ return !!(t.enter || t.enterFrom || t.enterTo || t.leave || t.leaveFrom || t.leaveTo) || ((e = t.as) != null ? e : Lt) !== ae || B.Children.count(t.children) === 1;
1638
1004
  }
1639
- let nt = Je(null);
1640
- nt.displayName = "TransitionContext";
1641
- var Qn = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(Qn || {});
1642
- function ea() {
1643
- let t = Pe(nt);
1005
+ let je = Ie(null);
1006
+ je.displayName = "TransitionContext";
1007
+ var Dn = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(Dn || {});
1008
+ function $n() {
1009
+ let t = de(je);
1644
1010
  if (t === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
1645
1011
  return t;
1646
1012
  }
1647
- function ta() {
1648
- let t = Pe(at);
1013
+ function Wn() {
1014
+ let t = de(De);
1649
1015
  if (t === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
1650
1016
  return t;
1651
1017
  }
1652
- let at = Je(null);
1653
- at.displayName = "NestingContext";
1654
- function it(t) {
1655
- return "children" in t ? it(t.children) : t.current.filter(({ el: e }) => e.current !== null).filter(({ state: e }) => e === "visible").length > 0;
1018
+ let De = Ie(null);
1019
+ De.displayName = "NestingContext";
1020
+ function $e(t) {
1021
+ return "children" in t ? $e(t.children) : t.current.filter(({ el: e }) => e.current !== null).filter(({ state: e }) => e === "visible").length > 0;
1656
1022
  }
1657
- function Tr(t, e) {
1658
- let r = ur(t), n = q([]), s = Zn(), l = or(), i = de((S, p = pe.Hidden) => {
1659
- let E = n.current.findIndex(({ el: d }) => d === S);
1660
- E !== -1 && (rt(p, { [pe.Unmount]() {
1661
- n.current.splice(E, 1);
1662
- }, [pe.Hidden]() {
1663
- n.current[E].state = "hidden";
1023
+ function Mt(t, e) {
1024
+ let n = wt(t), r = j([]), i = jn(), l = yt(), a = G((E, c = J.Hidden) => {
1025
+ let g = r.current.findIndex(({ el: d }) => d === E);
1026
+ g !== -1 && (Le(c, { [J.Unmount]() {
1027
+ r.current.splice(g, 1);
1028
+ }, [J.Hidden]() {
1029
+ r.current[g].state = "hidden";
1664
1030
  } }), l.microTask(() => {
1665
1031
  var d;
1666
- !it(n) && s.current && ((d = r.current) == null || d.call(r));
1032
+ !$e(r) && i.current && ((d = n.current) == null || d.call(n));
1667
1033
  }));
1668
- }), m = de((S) => {
1669
- let p = n.current.find(({ el: E }) => E === S);
1670
- return p ? p.state !== "visible" && (p.state = "visible") : n.current.push({ el: S, state: "visible" }), () => i(S, pe.Unmount);
1671
- }), o = q([]), g = q(Promise.resolve()), y = q({ enter: [], leave: [] }), w = de((S, p, E) => {
1672
- o.current.splice(0), e && (e.chains.current[p] = e.chains.current[p].filter(([d]) => d !== S)), e == null || e.chains.current[p].push([S, new Promise((d) => {
1673
- o.current.push(d);
1674
- })]), e == null || e.chains.current[p].push([S, new Promise((d) => {
1675
- Promise.all(y.current[p].map(([f, v]) => v)).then(() => d());
1676
- })]), p === "enter" ? g.current = g.current.then(() => e == null ? void 0 : e.wait.current).then(() => E(p)) : E(p);
1677
- }), P = de((S, p, E) => {
1678
- Promise.all(y.current[p].splice(0).map(([d, f]) => f)).then(() => {
1034
+ }), m = G((E) => {
1035
+ let c = r.current.find(({ el: g }) => g === E);
1036
+ return c ? c.state !== "visible" && (c.state = "visible") : r.current.push({ el: E, state: "visible" }), () => a(E, J.Unmount);
1037
+ }), s = j([]), p = j(Promise.resolve()), b = j({ enter: [], leave: [] }), w = G((E, c, g) => {
1038
+ s.current.splice(0), e && (e.chains.current[c] = e.chains.current[c].filter(([d]) => d !== E)), e == null || e.chains.current[c].push([E, new Promise((d) => {
1039
+ s.current.push(d);
1040
+ })]), e == null || e.chains.current[c].push([E, new Promise((d) => {
1041
+ Promise.all(b.current[c].map(([f, h]) => h)).then(() => d());
1042
+ })]), c === "enter" ? p.current = p.current.then(() => e == null ? void 0 : e.wait.current).then(() => g(c)) : g(c);
1043
+ }), T = G((E, c, g) => {
1044
+ Promise.all(b.current[c].splice(0).map(([d, f]) => f)).then(() => {
1679
1045
  var d;
1680
- (d = o.current.shift()) == null || d();
1681
- }).then(() => E(p));
1046
+ (d = s.current.shift()) == null || d();
1047
+ }).then(() => g(c));
1682
1048
  });
1683
- return ve(() => ({ children: n, register: m, unregister: i, onStart: w, onStop: P, wait: g, chains: y }), [m, i, n, w, P, y, g]);
1049
+ return Y(() => ({ children: r, register: m, unregister: a, onStart: w, onStop: T, wait: p, chains: b }), [m, a, r, w, T, b, p]);
1684
1050
  }
1685
- let Rr = we, Sr = cr.RenderStrategy;
1686
- function ra(t, e) {
1687
- var r, n;
1688
- let { transition: s = !0, beforeEnter: l, afterEnter: i, beforeLeave: m, afterLeave: o, enter: g, enterFrom: y, enterTo: w, entered: P, leave: S, leaveFrom: p, leaveTo: E, ...d } = t, [f, v] = z(null), R = q(null), O = Er(t), b = vr(...O ? [R, e, v] : e === null ? [] : [e]), D = (r = d.unmount) == null || r ? pe.Unmount : pe.Hidden, { show: B, appear: Z, initial: ee } = ea(), [Y, G] = z(B ? "visible" : "hidden"), j = ta(), { register: u, unregister: c } = j;
1689
- he(() => u(R), [u, R]), he(() => {
1690
- if (D === pe.Hidden && R.current) {
1691
- if (B && Y !== "visible") {
1692
- G("visible");
1051
+ let Lt = ae, jt = xt.RenderStrategy;
1052
+ function Un(t, e) {
1053
+ var n, r;
1054
+ let { transition: i = !0, beforeEnter: l, afterEnter: a, beforeLeave: m, afterLeave: s, enter: p, enterFrom: b, enterTo: w, entered: T, leave: E, leaveFrom: c, leaveTo: g, ...d } = t, [f, h] = $(null), y = j(null), N = At(t), v = Tt(...N ? [y, e, h] : e === null ? [] : [e]), I = (n = d.unmount) == null || n ? J.Unmount : J.Hidden, { show: A, appear: H, initial: K } = $n(), [W, U] = $(A ? "visible" : "hidden"), O = Wn(), { register: o, unregister: u } = O;
1055
+ Q(() => o(y), [o, y]), Q(() => {
1056
+ if (I === J.Hidden && y.current) {
1057
+ if (A && W !== "visible") {
1058
+ U("visible");
1693
1059
  return;
1694
1060
  }
1695
- return rt(Y, { hidden: () => c(R), visible: () => u(R) });
1696
- }
1697
- }, [Y, R, u, c, B, D]);
1698
- let T = xr();
1699
- he(() => {
1700
- if (O && T && Y === "visible" && R.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
1701
- }, [R, Y, T, O]);
1702
- let I = ee && !Z, _ = Z && B && ee, L = q(!1), k = Tr(() => {
1703
- L.current || (G("hidden"), c(R));
1704
- }, j), W = de((le) => {
1705
- L.current = !0;
1706
- let ne = le ? "enter" : "leave";
1707
- k.onStart(R, ne, (ce) => {
1061
+ return Le(W, { hidden: () => u(y), visible: () => o(y) });
1062
+ }
1063
+ }, [W, y, o, u, A, I]);
1064
+ let x = Rt();
1065
+ Q(() => {
1066
+ if (N && x && W === "visible" && y.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
1067
+ }, [y, W, x, N]);
1068
+ let F = K && !H, k = H && A && K, P = j(!1), S = Mt(() => {
1069
+ P.current || (U("hidden"), u(y));
1070
+ }, O), R = G((ee) => {
1071
+ P.current = !0;
1072
+ let Z = ee ? "enter" : "leave";
1073
+ S.onStart(y, Z, (ce) => {
1708
1074
  ce === "enter" ? l == null || l() : ce === "leave" && (m == null || m());
1709
1075
  });
1710
- }), U = de((le) => {
1711
- let ne = le ? "enter" : "leave";
1712
- L.current = !1, k.onStop(R, ne, (ce) => {
1713
- ce === "enter" ? i == null || i() : ce === "leave" && (o == null || o());
1714
- }), ne === "leave" && !it(k) && (G("hidden"), c(R));
1076
+ }), M = G((ee) => {
1077
+ let Z = ee ? "enter" : "leave";
1078
+ P.current = !1, S.onStop(y, Z, (ce) => {
1079
+ ce === "enter" ? a == null || a() : ce === "leave" && (s == null || s());
1080
+ }), Z === "leave" && !$e(S) && (U("hidden"), u(y));
1715
1081
  });
1716
- X(() => {
1717
- O && s || (W(B), U(B));
1718
- }, [B, O, s]);
1719
- let ae = !(!s || !O || !T || I), [, K] = kn(ae, f, B, { start: W, end: U }), ie = be({ ref: b, className: ((n = yt(d.className, _ && g, _ && y, K.enter && g, K.enter && K.closed && y, K.enter && !K.closed && w, K.leave && S, K.leave && !K.closed && p, K.leave && K.closed && E, !K.transition && B && P)) == null ? void 0 : n.trim()) || void 0, ...Cn(K) }), re = 0;
1720
- Y === "visible" && (re |= ye.Open), Y === "hidden" && (re |= ye.Closed), K.enter && (re |= ye.Opening), K.leave && (re |= ye.Closing);
1721
- let fe = dr();
1722
- return J.createElement(at.Provider, { value: k }, J.createElement(Gn, { value: re }, fe({ ourProps: ie, theirProps: d, defaultTag: Rr, features: Sr, visible: Y === "visible", name: "Transition.Child" })));
1082
+ D(() => {
1083
+ N && i || (R(A), M(A));
1084
+ }, [A, N, i]);
1085
+ let z = !(!i || !N || !x || F), [, L] = mn(z, f, A, { start: R, end: M }), X = te({ ref: v, className: ((r = Xe(d.className, k && p, k && b, L.enter && p, L.enter && L.closed && b, L.enter && !L.closed && w, L.leave && E, L.leave && !L.closed && c, L.leave && L.closed && g, !L.transition && A && T)) == null ? void 0 : r.trim()) || void 0, ...fn(L) }), _ = 0;
1086
+ W === "visible" && (_ |= re.Open), W === "hidden" && (_ |= re.Closed), L.enter && (_ |= re.Opening), L.leave && (_ |= re.Closing);
1087
+ let ye = Et();
1088
+ return B.createElement(De.Provider, { value: S }, B.createElement(Mn, { value: _ }, ye({ ourProps: X, theirProps: d, defaultTag: Lt, features: jt, visible: W === "visible", name: "Transition.Child" })));
1723
1089
  }
1724
- function na(t, e) {
1725
- let { show: r, appear: n = !1, unmount: s = !0, ...l } = t, i = q(null), m = Er(t), o = vr(...m ? [i, e] : e === null ? [] : [e]);
1726
- xr();
1727
- let g = wr();
1728
- if (r === void 0 && g !== null && (r = (g & ye.Open) === ye.Open), r === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1729
- let [y, w] = z(r ? "visible" : "hidden"), P = Tr(() => {
1730
- r || w("hidden");
1731
- }), [S, p] = z(!0), E = q([r]);
1732
- he(() => {
1733
- S !== !1 && E.current[E.current.length - 1] !== r && (E.current.push(r), p(!1));
1734
- }, [E, r]);
1735
- let d = ve(() => ({ show: r, appear: n, initial: S }), [r, n, S]);
1736
- he(() => {
1737
- r ? w("visible") : !it(P) && i.current !== null && w("hidden");
1738
- }, [r, P]);
1739
- let f = { unmount: s }, v = de(() => {
1740
- var b;
1741
- S && p(!1), (b = t.beforeEnter) == null || b.call(t);
1742
- }), R = de(() => {
1743
- var b;
1744
- S && p(!1), (b = t.beforeLeave) == null || b.call(t);
1745
- }), O = dr();
1746
- return J.createElement(at.Provider, { value: P }, J.createElement(nt.Provider, { value: d }, O({ ourProps: { ...f, as: we, children: J.createElement(Or, { ref: o, ...f, ...l, beforeEnter: v, beforeLeave: R }) }, theirProps: {}, defaultTag: we, features: Sr, visible: y === "visible", name: "Transition" })));
1090
+ function Bn(t, e) {
1091
+ let { show: n, appear: r = !1, unmount: i = !0, ...l } = t, a = j(null), m = At(t), s = Tt(...m ? [a, e] : e === null ? [] : [e]);
1092
+ Rt();
1093
+ let p = Pt();
1094
+ if (n === void 0 && p !== null && (n = (p & re.Open) === re.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
1095
+ let [b, w] = $(n ? "visible" : "hidden"), T = Mt(() => {
1096
+ n || w("hidden");
1097
+ }), [E, c] = $(!0), g = j([n]);
1098
+ Q(() => {
1099
+ E !== !1 && g.current[g.current.length - 1] !== n && (g.current.push(n), c(!1));
1100
+ }, [g, n]);
1101
+ let d = Y(() => ({ show: n, appear: r, initial: E }), [n, r, E]);
1102
+ Q(() => {
1103
+ n ? w("visible") : !$e(T) && a.current !== null && w("hidden");
1104
+ }, [n, T]);
1105
+ let f = { unmount: i }, h = G(() => {
1106
+ var v;
1107
+ E && c(!1), (v = t.beforeEnter) == null || v.call(t);
1108
+ }), y = G(() => {
1109
+ var v;
1110
+ E && c(!1), (v = t.beforeLeave) == null || v.call(t);
1111
+ }), N = Et();
1112
+ return B.createElement(De.Provider, { value: T }, B.createElement(je.Provider, { value: d }, N({ ourProps: { ...f, as: ae, children: B.createElement(Dt, { ref: s, ...f, ...l, beforeEnter: h, beforeLeave: y }) }, theirProps: {}, defaultTag: ae, features: jt, visible: b === "visible", name: "Transition" })));
1747
1113
  }
1748
- function aa(t, e) {
1749
- let r = Pe(nt) !== null, n = wr() !== null;
1750
- return J.createElement(J.Fragment, null, !r && n ? J.createElement(xt, { ref: e, ...t }) : J.createElement(Or, { ref: e, ...t }));
1114
+ function Hn(t, e) {
1115
+ let n = de(je) !== null, r = Pt() !== null;
1116
+ return B.createElement(B.Fragment, null, !n && r ? B.createElement(ze, { ref: e, ...t }) : B.createElement(Dt, { ref: e, ...t }));
1751
1117
  }
1752
- let xt = Ot(na), Or = Ot(ra), st = Ot(aa), ia = Object.assign(xt, { Child: st, Root: xt });
1753
- function Pr({ onClick: t }) {
1754
- return /* @__PURE__ */ F.jsxs(
1118
+ let ze = et(Bn), Dt = et(Un), We = et(Hn), Kn = Object.assign(ze, { Child: We, Root: ze });
1119
+ function $t({ onClick: t }) {
1120
+ return /* @__PURE__ */ le(
1755
1121
  "button",
1756
1122
  {
1757
1123
  type: "button",
1758
1124
  className: "im-close-button text-gray-400 hover:text-gray-500",
1759
1125
  onClick: t,
1760
1126
  children: [
1761
- /* @__PURE__ */ F.jsx("span", { className: "sr-only", children: "Close" }),
1762
- /* @__PURE__ */ F.jsx(
1127
+ /* @__PURE__ */ C("span", { className: "sr-only", children: "Close" }),
1128
+ /* @__PURE__ */ C(
1763
1129
  "svg",
1764
1130
  {
1765
1131
  className: "size-6",
@@ -1769,7 +1135,7 @@ function Pr({ onClick: t }) {
1769
1135
  strokeWidth: "2",
1770
1136
  stroke: "currentColor",
1771
1137
  "aria-hidden": "true",
1772
- children: /* @__PURE__ */ F.jsx(
1138
+ children: /* @__PURE__ */ C(
1773
1139
  "path",
1774
1140
  {
1775
1141
  strokeLinecap: "round",
@@ -1784,116 +1150,116 @@ function Pr({ onClick: t }) {
1784
1150
  );
1785
1151
  }
1786
1152
  /*!
1787
- * focus-trap 7.6.2
1153
+ * focus-trap 7.6.4
1788
1154
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
1789
1155
  */
1790
- function Et(t, e) {
1156
+ function Ge(t, e) {
1791
1157
  (e == null || e > t.length) && (e = t.length);
1792
- for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1793
- return n;
1158
+ for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
1159
+ return r;
1794
1160
  }
1795
- function sa(t) {
1796
- if (Array.isArray(t)) return Et(t);
1161
+ function _n(t) {
1162
+ if (Array.isArray(t)) return Ge(t);
1797
1163
  }
1798
- function la(t, e, r) {
1799
- return (e = fa(e)) in t ? Object.defineProperty(t, e, {
1800
- value: r,
1164
+ function qn(t, e, n) {
1165
+ return (e = Zn(e)) in t ? Object.defineProperty(t, e, {
1166
+ value: n,
1801
1167
  enumerable: !0,
1802
1168
  configurable: !0,
1803
1169
  writable: !0
1804
- }) : t[e] = r, t;
1170
+ }) : t[e] = n, t;
1805
1171
  }
1806
- function oa(t) {
1172
+ function Xn(t) {
1807
1173
  if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
1808
1174
  }
1809
- function ua() {
1175
+ function Vn() {
1810
1176
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1811
1177
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1812
1178
  }
1813
- function Gt(t, e) {
1814
- var r = Object.keys(t);
1179
+ function st(t, e) {
1180
+ var n = Object.keys(t);
1815
1181
  if (Object.getOwnPropertySymbols) {
1816
- var n = Object.getOwnPropertySymbols(t);
1817
- e && (n = n.filter(function(s) {
1818
- return Object.getOwnPropertyDescriptor(t, s).enumerable;
1819
- })), r.push.apply(r, n);
1182
+ var r = Object.getOwnPropertySymbols(t);
1183
+ e && (r = r.filter(function(i) {
1184
+ return Object.getOwnPropertyDescriptor(t, i).enumerable;
1185
+ })), n.push.apply(n, r);
1820
1186
  }
1821
- return r;
1187
+ return n;
1822
1188
  }
1823
- function Jt(t) {
1189
+ function ot(t) {
1824
1190
  for (var e = 1; e < arguments.length; e++) {
1825
- var r = arguments[e] != null ? arguments[e] : {};
1826
- e % 2 ? Gt(Object(r), !0).forEach(function(n) {
1827
- la(t, n, r[n]);
1828
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Gt(Object(r)).forEach(function(n) {
1829
- Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
1191
+ var n = arguments[e] != null ? arguments[e] : {};
1192
+ e % 2 ? st(Object(n), !0).forEach(function(r) {
1193
+ qn(t, r, n[r]);
1194
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : st(Object(n)).forEach(function(r) {
1195
+ Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
1830
1196
  });
1831
1197
  }
1832
1198
  return t;
1833
1199
  }
1834
- function ca(t) {
1835
- return sa(t) || oa(t) || va(t) || ua();
1200
+ function zn(t) {
1201
+ return _n(t) || Xn(t) || Yn(t) || Vn();
1836
1202
  }
1837
- function da(t, e) {
1203
+ function Gn(t, e) {
1838
1204
  if (typeof t != "object" || !t) return t;
1839
- var r = t[Symbol.toPrimitive];
1840
- if (r !== void 0) {
1841
- var n = r.call(t, e || "default");
1842
- if (typeof n != "object") return n;
1205
+ var n = t[Symbol.toPrimitive];
1206
+ if (n !== void 0) {
1207
+ var r = n.call(t, e || "default");
1208
+ if (typeof r != "object") return r;
1843
1209
  throw new TypeError("@@toPrimitive must return a primitive value.");
1844
1210
  }
1845
1211
  return (e === "string" ? String : Number)(t);
1846
1212
  }
1847
- function fa(t) {
1848
- var e = da(t, "string");
1213
+ function Zn(t) {
1214
+ var e = Gn(t, "string");
1849
1215
  return typeof e == "symbol" ? e : e + "";
1850
1216
  }
1851
- function va(t, e) {
1217
+ function Yn(t, e) {
1852
1218
  if (t) {
1853
- if (typeof t == "string") return Et(t, e);
1854
- var r = {}.toString.call(t).slice(8, -1);
1855
- return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Et(t, e) : void 0;
1219
+ if (typeof t == "string") return Ge(t, e);
1220
+ var n = {}.toString.call(t).slice(8, -1);
1221
+ return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ge(t, e) : void 0;
1856
1222
  }
1857
1223
  }
1858
- var Zt = {
1859
- activateTrap: function(e, r) {
1224
+ var ut = {
1225
+ activateTrap: function(e, n) {
1860
1226
  if (e.length > 0) {
1861
- var n = e[e.length - 1];
1862
- n !== r && n.pause();
1227
+ var r = e[e.length - 1];
1228
+ r !== n && r._setPausedState(!0);
1863
1229
  }
1864
- var s = e.indexOf(r);
1865
- s === -1 || e.splice(s, 1), e.push(r);
1230
+ var i = e.indexOf(n);
1231
+ i === -1 || e.splice(i, 1), e.push(n);
1866
1232
  },
1867
- deactivateTrap: function(e, r) {
1868
- var n = e.indexOf(r);
1869
- n !== -1 && e.splice(n, 1), e.length > 0 && e[e.length - 1].unpause();
1233
+ deactivateTrap: function(e, n) {
1234
+ var r = e.indexOf(n);
1235
+ r !== -1 && e.splice(r, 1), e.length > 0 && !e[e.length - 1]._isManuallyPaused() && e[e.length - 1]._setPausedState(!1);
1870
1236
  }
1871
- }, pa = function(e) {
1237
+ }, Jn = function(e) {
1872
1238
  return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
1873
- }, ha = function(e) {
1239
+ }, Qn = function(e) {
1874
1240
  return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
1875
- }, Me = function(e) {
1241
+ }, ge = function(e) {
1876
1242
  return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
1877
- }, ma = function(e) {
1878
- return Me(e) && !e.shiftKey;
1879
- }, ba = function(e) {
1880
- return Me(e) && e.shiftKey;
1881
- }, Qt = function(e) {
1243
+ }, er = function(e) {
1244
+ return ge(e) && !e.shiftKey;
1245
+ }, tr = function(e) {
1246
+ return ge(e) && e.shiftKey;
1247
+ }, dt = function(e) {
1882
1248
  return setTimeout(e, 0);
1883
- }, Ae = function(e) {
1884
- for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
1885
- n[s - 1] = arguments[s];
1886
- return typeof e == "function" ? e.apply(void 0, n) : e;
1887
- }, Be = function(e) {
1249
+ }, he = function(e) {
1250
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)
1251
+ r[i - 1] = arguments[i];
1252
+ return typeof e == "function" ? e.apply(void 0, r) : e;
1253
+ }, xe = function(e) {
1888
1254
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
1889
- }, ga = [], ya = function(e, r) {
1890
- var n = (r == null ? void 0 : r.document) || document, s = (r == null ? void 0 : r.trapStack) || ga, l = Jt({
1255
+ }, nr = [], rr = function(e, n) {
1256
+ var r = (n == null ? void 0 : n.document) || document, i = (n == null ? void 0 : n.trapStack) || nr, l = ot({
1891
1257
  returnFocusOnDeactivate: !0,
1892
1258
  escapeDeactivates: !0,
1893
1259
  delayInitialFocus: !0,
1894
- isKeyForward: ma,
1895
- isKeyBackward: ba
1896
- }, r), i = {
1260
+ isKeyForward: er,
1261
+ isKeyBackward: tr
1262
+ }, n), a = {
1897
1263
  // containers given to createFocusTrap()
1898
1264
  // @type {Array<HTMLElement>}
1899
1265
  containers: [],
@@ -1924,79 +1290,80 @@ var Zt = {
1924
1290
  mostRecentlyFocusedNode: null,
1925
1291
  active: !1,
1926
1292
  paused: !1,
1293
+ manuallyPaused: !1,
1927
1294
  // timer ID for when delayInitialFocus is true and initial focus in this trap
1928
1295
  // has been delayed during activation
1929
1296
  delayInitialFocusTimer: void 0,
1930
1297
  // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
1931
1298
  recentNavEvent: void 0
1932
- }, m, o = function(u, c, T) {
1933
- return u && u[c] !== void 0 ? u[c] : l[T || c];
1934
- }, g = function(u, c) {
1935
- var T = typeof (c == null ? void 0 : c.composedPath) == "function" ? c.composedPath() : void 0;
1936
- return i.containerGroups.findIndex(function(I) {
1937
- var _ = I.container, L = I.tabbableNodes;
1938
- return _.contains(u) || // fall back to explicit tabbable search which will take into consideration any
1299
+ }, m, s = function(o, u, x) {
1300
+ return o && o[u] !== void 0 ? o[u] : l[x || u];
1301
+ }, p = function(o, u) {
1302
+ var x = typeof (u == null ? void 0 : u.composedPath) == "function" ? u.composedPath() : void 0;
1303
+ return a.containerGroups.findIndex(function(F) {
1304
+ var k = F.container, P = F.tabbableNodes;
1305
+ return k.contains(o) || // fall back to explicit tabbable search which will take into consideration any
1939
1306
  // web components if the `tabbableOptions.getShadowRoot` option was used for
1940
1307
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
1941
1308
  // look inside web components even if open)
1942
- (T == null ? void 0 : T.includes(_)) || L.find(function(k) {
1943
- return k === u;
1309
+ (x == null ? void 0 : x.includes(k)) || P.find(function(S) {
1310
+ return S === o;
1944
1311
  });
1945
1312
  });
1946
- }, y = function(u) {
1947
- var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, T = c.hasFallback, I = T === void 0 ? !1 : T, _ = c.params, L = _ === void 0 ? [] : _, k = l[u];
1948
- if (typeof k == "function" && (k = k.apply(void 0, ca(L))), k === !0 && (k = void 0), !k) {
1949
- if (k === void 0 || k === !1)
1950
- return k;
1951
- throw new Error("`".concat(u, "` was specified but was not a node, or did not return a node"));
1952
- }
1953
- var W = k;
1954
- if (typeof k == "string") {
1313
+ }, b = function(o) {
1314
+ var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, x = u.hasFallback, F = x === void 0 ? !1 : x, k = u.params, P = k === void 0 ? [] : k, S = l[o];
1315
+ if (typeof S == "function" && (S = S.apply(void 0, zn(P))), S === !0 && (S = void 0), !S) {
1316
+ if (S === void 0 || S === !1)
1317
+ return S;
1318
+ throw new Error("`".concat(o, "` was specified but was not a node, or did not return a node"));
1319
+ }
1320
+ var R = S;
1321
+ if (typeof S == "string") {
1955
1322
  try {
1956
- W = n.querySelector(k);
1957
- } catch (U) {
1958
- throw new Error("`".concat(u, '` appears to be an invalid selector; error="').concat(U.message, '"'));
1323
+ R = r.querySelector(S);
1324
+ } catch (M) {
1325
+ throw new Error("`".concat(o, '` appears to be an invalid selector; error="').concat(M.message, '"'));
1959
1326
  }
1960
- if (!W && !I)
1961
- throw new Error("`".concat(u, "` as selector refers to no known node"));
1327
+ if (!R && !F)
1328
+ throw new Error("`".concat(o, "` as selector refers to no known node"));
1962
1329
  }
1963
- return W;
1330
+ return R;
1964
1331
  }, w = function() {
1965
- var u = y("initialFocus", {
1332
+ var o = b("initialFocus", {
1966
1333
  hasFallback: !0
1967
1334
  });
1968
- if (u === !1)
1335
+ if (o === !1)
1969
1336
  return !1;
1970
- if (u === void 0 || u && !ht(u, l.tabbableOptions))
1971
- if (g(n.activeElement) >= 0)
1972
- u = n.activeElement;
1337
+ if (o === void 0 || o && !Ke(o, l.tabbableOptions))
1338
+ if (p(r.activeElement) >= 0)
1339
+ o = r.activeElement;
1973
1340
  else {
1974
- var c = i.tabbableGroups[0], T = c && c.firstTabbableNode;
1975
- u = T || y("fallbackFocus");
1341
+ var u = a.tabbableGroups[0], x = u && u.firstTabbableNode;
1342
+ o = x || b("fallbackFocus");
1976
1343
  }
1977
- else u === null && (u = y("fallbackFocus"));
1978
- if (!u)
1344
+ else o === null && (o = b("fallbackFocus"));
1345
+ if (!o)
1979
1346
  throw new Error("Your focus-trap needs to have at least one focusable element");
1980
- return u;
1981
- }, P = function() {
1982
- if (i.containerGroups = i.containers.map(function(u) {
1983
- var c = qn(u, l.tabbableOptions), T = Xn(u, l.tabbableOptions), I = c.length > 0 ? c[0] : void 0, _ = c.length > 0 ? c[c.length - 1] : void 0, L = T.find(function(U) {
1984
- return Oe(U);
1985
- }), k = T.slice().reverse().find(function(U) {
1986
- return Oe(U);
1987
- }), W = !!c.find(function(U) {
1988
- return ge(U) > 0;
1347
+ return o;
1348
+ }, T = function() {
1349
+ if (a.containerGroups = a.containers.map(function(o) {
1350
+ var u = Pn(o, l.tabbableOptions), x = Rn(o, l.tabbableOptions), F = u.length > 0 ? u[0] : void 0, k = u.length > 0 ? u[u.length - 1] : void 0, P = x.find(function(M) {
1351
+ return ue(M);
1352
+ }), S = x.slice().reverse().find(function(M) {
1353
+ return ue(M);
1354
+ }), R = !!u.find(function(M) {
1355
+ return ne(M) > 0;
1989
1356
  });
1990
1357
  return {
1991
- container: u,
1992
- tabbableNodes: c,
1993
- focusableNodes: T,
1358
+ container: o,
1359
+ tabbableNodes: u,
1360
+ focusableNodes: x,
1994
1361
  /** True if at least one node with positive `tabindex` was found in this container. */
1995
- posTabIndexesFound: W,
1362
+ posTabIndexesFound: R,
1996
1363
  /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
1997
- firstTabbableNode: I,
1364
+ firstTabbableNode: F,
1998
1365
  /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
1999
- lastTabbableNode: _,
1366
+ lastTabbableNode: k,
2000
1367
  // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
2001
1368
  // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
2002
1369
  // because that API doesn't work with Shadow DOM as well as it should (@see
@@ -2005,9 +1372,9 @@ var Zt = {
2005
1372
  // "close enough most of the time" alternative for positive tabindexes which should generally
2006
1373
  // be avoided anyway...
2007
1374
  /** First tabbable node in container, __DOM__ order; `undefined` if none. */
2008
- firstDomTabbableNode: L,
1375
+ firstDomTabbableNode: P,
2009
1376
  /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
2010
- lastDomTabbableNode: k,
1377
+ lastDomTabbableNode: S,
2011
1378
  /**
2012
1379
  * Finds the __tabbable__ node that follows the given node in the specified direction,
2013
1380
  * in this container, if any.
@@ -2016,76 +1383,76 @@ var Zt = {
2016
1383
  * in reverse.
2017
1384
  * @returns {HTMLElement|undefined} The next tabbable node, if any.
2018
1385
  */
2019
- nextTabbableNode: function(ae) {
2020
- var K = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ie = c.indexOf(ae);
2021
- return ie < 0 ? K ? T.slice(T.indexOf(ae) + 1).find(function(re) {
2022
- return Oe(re);
2023
- }) : T.slice(0, T.indexOf(ae)).reverse().find(function(re) {
2024
- return Oe(re);
2025
- }) : c[ie + (K ? 1 : -1)];
1386
+ nextTabbableNode: function(z) {
1387
+ var L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, X = u.indexOf(z);
1388
+ return X < 0 ? L ? x.slice(x.indexOf(z) + 1).find(function(_) {
1389
+ return ue(_);
1390
+ }) : x.slice(0, x.indexOf(z)).reverse().find(function(_) {
1391
+ return ue(_);
1392
+ }) : u[X + (L ? 1 : -1)];
2026
1393
  }
2027
1394
  };
2028
- }), i.tabbableGroups = i.containerGroups.filter(function(u) {
2029
- return u.tabbableNodes.length > 0;
2030
- }), i.tabbableGroups.length <= 0 && !y("fallbackFocus"))
1395
+ }), a.tabbableGroups = a.containerGroups.filter(function(o) {
1396
+ return o.tabbableNodes.length > 0;
1397
+ }), a.tabbableGroups.length <= 0 && !b("fallbackFocus"))
2031
1398
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
2032
- if (i.containerGroups.find(function(u) {
2033
- return u.posTabIndexesFound;
2034
- }) && i.containerGroups.length > 1)
1399
+ if (a.containerGroups.find(function(o) {
1400
+ return o.posTabIndexesFound;
1401
+ }) && a.containerGroups.length > 1)
2035
1402
  throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
2036
- }, S = function(u) {
2037
- var c = u.activeElement;
2038
- if (c)
2039
- return c.shadowRoot && c.shadowRoot.activeElement !== null ? S(c.shadowRoot) : c;
2040
- }, p = function(u) {
2041
- if (u !== !1 && u !== S(document)) {
2042
- if (!u || !u.focus) {
2043
- p(w());
1403
+ }, E = function(o) {
1404
+ var u = o.activeElement;
1405
+ if (u)
1406
+ return u.shadowRoot && u.shadowRoot.activeElement !== null ? E(u.shadowRoot) : u;
1407
+ }, c = function(o) {
1408
+ if (o !== !1 && o !== E(document)) {
1409
+ if (!o || !o.focus) {
1410
+ c(w());
2044
1411
  return;
2045
1412
  }
2046
- u.focus({
1413
+ o.focus({
2047
1414
  preventScroll: !!l.preventScroll
2048
- }), i.mostRecentlyFocusedNode = u, pa(u) && u.select();
1415
+ }), a.mostRecentlyFocusedNode = o, Jn(o) && o.select();
2049
1416
  }
2050
- }, E = function(u) {
2051
- var c = y("setReturnFocus", {
2052
- params: [u]
1417
+ }, g = function(o) {
1418
+ var u = b("setReturnFocus", {
1419
+ params: [o]
2053
1420
  });
2054
- return c || (c === !1 ? !1 : u);
2055
- }, d = function(u) {
2056
- var c = u.target, T = u.event, I = u.isBackward, _ = I === void 0 ? !1 : I;
2057
- c = c || Be(T), P();
2058
- var L = null;
2059
- if (i.tabbableGroups.length > 0) {
2060
- var k = g(c, T), W = k >= 0 ? i.containerGroups[k] : void 0;
2061
- if (k < 0)
2062
- _ ? L = i.tabbableGroups[i.tabbableGroups.length - 1].lastTabbableNode : L = i.tabbableGroups[0].firstTabbableNode;
2063
- else if (_) {
2064
- var U = i.tabbableGroups.findIndex(function(le) {
2065
- var ne = le.firstTabbableNode;
2066
- return c === ne;
1421
+ return u || (u === !1 ? !1 : o);
1422
+ }, d = function(o) {
1423
+ var u = o.target, x = o.event, F = o.isBackward, k = F === void 0 ? !1 : F;
1424
+ u = u || xe(x), T();
1425
+ var P = null;
1426
+ if (a.tabbableGroups.length > 0) {
1427
+ var S = p(u, x), R = S >= 0 ? a.containerGroups[S] : void 0;
1428
+ if (S < 0)
1429
+ k ? P = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : P = a.tabbableGroups[0].firstTabbableNode;
1430
+ else if (k) {
1431
+ var M = a.tabbableGroups.findIndex(function(ee) {
1432
+ var Z = ee.firstTabbableNode;
1433
+ return u === Z;
2067
1434
  });
2068
- if (U < 0 && (W.container === c || ht(c, l.tabbableOptions) && !Oe(c, l.tabbableOptions) && !W.nextTabbableNode(c, !1)) && (U = k), U >= 0) {
2069
- var ae = U === 0 ? i.tabbableGroups.length - 1 : U - 1, K = i.tabbableGroups[ae];
2070
- L = ge(c) >= 0 ? K.lastTabbableNode : K.lastDomTabbableNode;
2071
- } else Me(T) || (L = W.nextTabbableNode(c, !1));
1435
+ if (M < 0 && (R.container === u || Ke(u, l.tabbableOptions) && !ue(u, l.tabbableOptions) && !R.nextTabbableNode(u, !1)) && (M = S), M >= 0) {
1436
+ var z = M === 0 ? a.tabbableGroups.length - 1 : M - 1, L = a.tabbableGroups[z];
1437
+ P = ne(u) >= 0 ? L.lastTabbableNode : L.lastDomTabbableNode;
1438
+ } else ge(x) || (P = R.nextTabbableNode(u, !1));
2072
1439
  } else {
2073
- var ie = i.tabbableGroups.findIndex(function(le) {
2074
- var ne = le.lastTabbableNode;
2075
- return c === ne;
1440
+ var X = a.tabbableGroups.findIndex(function(ee) {
1441
+ var Z = ee.lastTabbableNode;
1442
+ return u === Z;
2076
1443
  });
2077
- if (ie < 0 && (W.container === c || ht(c, l.tabbableOptions) && !Oe(c, l.tabbableOptions) && !W.nextTabbableNode(c)) && (ie = k), ie >= 0) {
2078
- var re = ie === i.tabbableGroups.length - 1 ? 0 : ie + 1, fe = i.tabbableGroups[re];
2079
- L = ge(c) >= 0 ? fe.firstTabbableNode : fe.firstDomTabbableNode;
2080
- } else Me(T) || (L = W.nextTabbableNode(c));
1444
+ if (X < 0 && (R.container === u || Ke(u, l.tabbableOptions) && !ue(u, l.tabbableOptions) && !R.nextTabbableNode(u)) && (X = S), X >= 0) {
1445
+ var _ = X === a.tabbableGroups.length - 1 ? 0 : X + 1, ye = a.tabbableGroups[_];
1446
+ P = ne(u) >= 0 ? ye.firstTabbableNode : ye.firstDomTabbableNode;
1447
+ } else ge(x) || (P = R.nextTabbableNode(u));
2081
1448
  }
2082
1449
  } else
2083
- L = y("fallbackFocus");
2084
- return L;
2085
- }, f = function(u) {
2086
- var c = Be(u);
2087
- if (!(g(c, u) >= 0)) {
2088
- if (Ae(l.clickOutsideDeactivates, u)) {
1450
+ P = b("fallbackFocus");
1451
+ return P;
1452
+ }, f = function(o) {
1453
+ var u = xe(o);
1454
+ if (!(p(u, o) >= 0)) {
1455
+ if (he(l.clickOutsideDeactivates, o)) {
2089
1456
  m.deactivate({
2090
1457
  // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
2091
1458
  // which will result in the outside click setting focus to the node
@@ -2097,86 +1464,86 @@ var Zt = {
2097
1464
  });
2098
1465
  return;
2099
1466
  }
2100
- Ae(l.allowOutsideClick, u) || u.preventDefault();
1467
+ he(l.allowOutsideClick, o) || o.preventDefault();
2101
1468
  }
2102
- }, v = function(u) {
2103
- var c = Be(u), T = g(c, u) >= 0;
2104
- if (T || c instanceof Document)
2105
- T && (i.mostRecentlyFocusedNode = c);
1469
+ }, h = function(o) {
1470
+ var u = xe(o), x = p(u, o) >= 0;
1471
+ if (x || u instanceof Document)
1472
+ x && (a.mostRecentlyFocusedNode = u);
2106
1473
  else {
2107
- u.stopImmediatePropagation();
2108
- var I, _ = !0;
2109
- if (i.mostRecentlyFocusedNode)
2110
- if (ge(i.mostRecentlyFocusedNode) > 0) {
2111
- var L = g(i.mostRecentlyFocusedNode), k = i.containerGroups[L].tabbableNodes;
2112
- if (k.length > 0) {
2113
- var W = k.findIndex(function(U) {
2114
- return U === i.mostRecentlyFocusedNode;
1474
+ o.stopImmediatePropagation();
1475
+ var F, k = !0;
1476
+ if (a.mostRecentlyFocusedNode)
1477
+ if (ne(a.mostRecentlyFocusedNode) > 0) {
1478
+ var P = p(a.mostRecentlyFocusedNode), S = a.containerGroups[P].tabbableNodes;
1479
+ if (S.length > 0) {
1480
+ var R = S.findIndex(function(M) {
1481
+ return M === a.mostRecentlyFocusedNode;
2115
1482
  });
2116
- W >= 0 && (l.isKeyForward(i.recentNavEvent) ? W + 1 < k.length && (I = k[W + 1], _ = !1) : W - 1 >= 0 && (I = k[W - 1], _ = !1));
1483
+ R >= 0 && (l.isKeyForward(a.recentNavEvent) ? R + 1 < S.length && (F = S[R + 1], k = !1) : R - 1 >= 0 && (F = S[R - 1], k = !1));
2117
1484
  }
2118
1485
  } else
2119
- i.containerGroups.some(function(U) {
2120
- return U.tabbableNodes.some(function(ae) {
2121
- return ge(ae) > 0;
1486
+ a.containerGroups.some(function(M) {
1487
+ return M.tabbableNodes.some(function(z) {
1488
+ return ne(z) > 0;
2122
1489
  });
2123
- }) || (_ = !1);
1490
+ }) || (k = !1);
2124
1491
  else
2125
- _ = !1;
2126
- _ && (I = d({
1492
+ k = !1;
1493
+ k && (F = d({
2127
1494
  // move FROM the MRU node, not event-related node (which will be the node that is
2128
1495
  // outside the trap causing the focus escape we're trying to fix)
2129
- target: i.mostRecentlyFocusedNode,
2130
- isBackward: l.isKeyBackward(i.recentNavEvent)
2131
- })), p(I || i.mostRecentlyFocusedNode || w());
2132
- }
2133
- i.recentNavEvent = void 0;
2134
- }, R = function(u) {
2135
- var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2136
- i.recentNavEvent = u;
2137
- var T = d({
2138
- event: u,
2139
- isBackward: c
1496
+ target: a.mostRecentlyFocusedNode,
1497
+ isBackward: l.isKeyBackward(a.recentNavEvent)
1498
+ })), c(F || a.mostRecentlyFocusedNode || w());
1499
+ }
1500
+ a.recentNavEvent = void 0;
1501
+ }, y = function(o) {
1502
+ var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1503
+ a.recentNavEvent = o;
1504
+ var x = d({
1505
+ event: o,
1506
+ isBackward: u
2140
1507
  });
2141
- T && (Me(u) && u.preventDefault(), p(T));
2142
- }, O = function(u) {
2143
- (l.isKeyForward(u) || l.isKeyBackward(u)) && R(u, l.isKeyBackward(u));
2144
- }, b = function(u) {
2145
- ha(u) && Ae(l.escapeDeactivates, u) !== !1 && (u.preventDefault(), m.deactivate());
2146
- }, D = function(u) {
2147
- var c = Be(u);
2148
- g(c, u) >= 0 || Ae(l.clickOutsideDeactivates, u) || Ae(l.allowOutsideClick, u) || (u.preventDefault(), u.stopImmediatePropagation());
2149
- }, B = function() {
2150
- if (i.active)
2151
- return Zt.activateTrap(s, m), i.delayInitialFocusTimer = l.delayInitialFocus ? Qt(function() {
2152
- p(w());
2153
- }) : p(w()), n.addEventListener("focusin", v, !0), n.addEventListener("mousedown", f, {
1508
+ x && (ge(o) && o.preventDefault(), c(x));
1509
+ }, N = function(o) {
1510
+ (l.isKeyForward(o) || l.isKeyBackward(o)) && y(o, l.isKeyBackward(o));
1511
+ }, v = function(o) {
1512
+ Qn(o) && he(l.escapeDeactivates, o) !== !1 && (o.preventDefault(), m.deactivate());
1513
+ }, I = function(o) {
1514
+ var u = xe(o);
1515
+ p(u, o) >= 0 || he(l.clickOutsideDeactivates, o) || he(l.allowOutsideClick, o) || (o.preventDefault(), o.stopImmediatePropagation());
1516
+ }, A = function() {
1517
+ if (a.active)
1518
+ return ut.activateTrap(i, m), a.delayInitialFocusTimer = l.delayInitialFocus ? dt(function() {
1519
+ c(w());
1520
+ }) : c(w()), r.addEventListener("focusin", h, !0), r.addEventListener("mousedown", f, {
2154
1521
  capture: !0,
2155
1522
  passive: !1
2156
- }), n.addEventListener("touchstart", f, {
1523
+ }), r.addEventListener("touchstart", f, {
2157
1524
  capture: !0,
2158
1525
  passive: !1
2159
- }), n.addEventListener("click", D, {
1526
+ }), r.addEventListener("click", I, {
2160
1527
  capture: !0,
2161
1528
  passive: !1
2162
- }), n.addEventListener("keydown", O, {
1529
+ }), r.addEventListener("keydown", N, {
2163
1530
  capture: !0,
2164
1531
  passive: !1
2165
- }), n.addEventListener("keydown", b), m;
2166
- }, Z = function() {
2167
- if (i.active)
2168
- return n.removeEventListener("focusin", v, !0), n.removeEventListener("mousedown", f, !0), n.removeEventListener("touchstart", f, !0), n.removeEventListener("click", D, !0), n.removeEventListener("keydown", O, !0), n.removeEventListener("keydown", b), m;
2169
- }, ee = function(u) {
2170
- var c = u.some(function(T) {
2171
- var I = Array.from(T.removedNodes);
2172
- return I.some(function(_) {
2173
- return _ === i.mostRecentlyFocusedNode;
1532
+ }), r.addEventListener("keydown", v), m;
1533
+ }, H = function() {
1534
+ if (a.active)
1535
+ return r.removeEventListener("focusin", h, !0), r.removeEventListener("mousedown", f, !0), r.removeEventListener("touchstart", f, !0), r.removeEventListener("click", I, !0), r.removeEventListener("keydown", N, !0), r.removeEventListener("keydown", v), m;
1536
+ }, K = function(o) {
1537
+ var u = o.some(function(x) {
1538
+ var F = Array.from(x.removedNodes);
1539
+ return F.some(function(k) {
1540
+ return k === a.mostRecentlyFocusedNode;
2174
1541
  });
2175
1542
  });
2176
- c && p(w());
2177
- }, Y = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ee) : void 0, G = function() {
2178
- Y && (Y.disconnect(), i.active && !i.paused && i.containers.map(function(u) {
2179
- Y.observe(u, {
1543
+ u && c(w());
1544
+ }, W = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(K) : void 0, U = function() {
1545
+ W && (W.disconnect(), a.active && !a.paused && a.containers.map(function(o) {
1546
+ W.observe(o, {
2180
1547
  subtree: !0,
2181
1548
  childList: !0
2182
1549
  });
@@ -2184,85 +1551,99 @@ var Zt = {
2184
1551
  };
2185
1552
  return m = {
2186
1553
  get active() {
2187
- return i.active;
1554
+ return a.active;
2188
1555
  },
2189
1556
  get paused() {
2190
- return i.paused;
1557
+ return a.paused;
2191
1558
  },
2192
- activate: function(u) {
2193
- if (i.active)
1559
+ activate: function(o) {
1560
+ if (a.active)
2194
1561
  return this;
2195
- var c = o(u, "onActivate"), T = o(u, "onPostActivate"), I = o(u, "checkCanFocusTrap");
2196
- I || P(), i.active = !0, i.paused = !1, i.nodeFocusedBeforeActivation = n.activeElement, c == null || c();
2197
- var _ = function() {
2198
- I && P(), B(), G(), T == null || T();
1562
+ var u = s(o, "onActivate"), x = s(o, "onPostActivate"), F = s(o, "checkCanFocusTrap");
1563
+ F || T(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = r.activeElement, u == null || u();
1564
+ var k = function() {
1565
+ F && T(), A(), U(), x == null || x();
2199
1566
  };
2200
- return I ? (I(i.containers.concat()).then(_, _), this) : (_(), this);
1567
+ return F ? (F(a.containers.concat()).then(k, k), this) : (k(), this);
2201
1568
  },
2202
- deactivate: function(u) {
2203
- if (!i.active)
1569
+ deactivate: function(o) {
1570
+ if (!a.active)
2204
1571
  return this;
2205
- var c = Jt({
1572
+ var u = ot({
2206
1573
  onDeactivate: l.onDeactivate,
2207
1574
  onPostDeactivate: l.onPostDeactivate,
2208
1575
  checkCanReturnFocus: l.checkCanReturnFocus
2209
- }, u);
2210
- clearTimeout(i.delayInitialFocusTimer), i.delayInitialFocusTimer = void 0, Z(), i.active = !1, i.paused = !1, G(), Zt.deactivateTrap(s, m);
2211
- var T = o(c, "onDeactivate"), I = o(c, "onPostDeactivate"), _ = o(c, "checkCanReturnFocus"), L = o(c, "returnFocus", "returnFocusOnDeactivate");
2212
- T == null || T();
2213
- var k = function() {
2214
- Qt(function() {
2215
- L && p(E(i.nodeFocusedBeforeActivation)), I == null || I();
1576
+ }, o);
1577
+ clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, H(), a.active = !1, a.paused = !1, U(), ut.deactivateTrap(i, m);
1578
+ var x = s(u, "onDeactivate"), F = s(u, "onPostDeactivate"), k = s(u, "checkCanReturnFocus"), P = s(u, "returnFocus", "returnFocusOnDeactivate");
1579
+ x == null || x();
1580
+ var S = function() {
1581
+ dt(function() {
1582
+ P && c(g(a.nodeFocusedBeforeActivation)), F == null || F();
2216
1583
  });
2217
1584
  };
2218
- return L && _ ? (_(E(i.nodeFocusedBeforeActivation)).then(k, k), this) : (k(), this);
1585
+ return P && k ? (k(g(a.nodeFocusedBeforeActivation)).then(S, S), this) : (S(), this);
2219
1586
  },
2220
- pause: function(u) {
2221
- if (i.paused || !i.active)
2222
- return this;
2223
- var c = o(u, "onPause"), T = o(u, "onPostPause");
2224
- return i.paused = !0, c == null || c(), Z(), G(), T == null || T(), this;
1587
+ pause: function(o) {
1588
+ return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, o)) : this;
2225
1589
  },
2226
- unpause: function(u) {
2227
- if (!i.paused || !i.active)
2228
- return this;
2229
- var c = o(u, "onUnpause"), T = o(u, "onPostUnpause");
2230
- return i.paused = !1, c == null || c(), P(), B(), G(), T == null || T(), this;
1590
+ unpause: function(o) {
1591
+ return a.active ? (a.manuallyPaused = !1, i[i.length - 1] !== this ? this : this._setPausedState(!1, o)) : this;
1592
+ },
1593
+ updateContainerElements: function(o) {
1594
+ var u = [].concat(o).filter(Boolean);
1595
+ return a.containers = u.map(function(x) {
1596
+ return typeof x == "string" ? r.querySelector(x) : x;
1597
+ }), a.active && T(), U(), this;
1598
+ }
1599
+ }, Object.defineProperties(m, {
1600
+ _isManuallyPaused: {
1601
+ value: function() {
1602
+ return a.manuallyPaused;
1603
+ }
2231
1604
  },
2232
- updateContainerElements: function(u) {
2233
- var c = [].concat(u).filter(Boolean);
2234
- return i.containers = c.map(function(T) {
2235
- return typeof T == "string" ? n.querySelector(T) : T;
2236
- }), i.active && P(), G(), this;
1605
+ _setPausedState: {
1606
+ value: function(o, u) {
1607
+ if (a.paused === o)
1608
+ return this;
1609
+ if (a.paused = o, o) {
1610
+ var x = s(u, "onPause"), F = s(u, "onPostPause");
1611
+ x == null || x(), H(), U(), F == null || F();
1612
+ } else {
1613
+ var k = s(u, "onUnpause"), P = s(u, "onPostUnpause");
1614
+ k == null || k(), T(), A(), U(), P == null || P();
1615
+ }
1616
+ return this;
1617
+ }
2237
1618
  }
2238
- }, m.updateContainerElements(e), m;
1619
+ }), m.updateContainerElements(e), m;
2239
1620
  };
2240
- function Cr(t, e, r) {
2241
- let n = null;
2242
- return t && (n = ya(t, {
1621
+ function Wt(t, e, n) {
1622
+ let r = null;
1623
+ return t && (r = rr(t, {
2243
1624
  clickOutsideDeactivates: !e,
2244
1625
  escapeDeactivates: !e,
2245
- onDeactivate: () => r == null ? void 0 : r(),
1626
+ onDeactivate: () => n == null ? void 0 : n(),
2246
1627
  fallbackFocus: () => t
2247
- }), n.activate()), { deactivate: () => {
2248
- n == null || n.deactivate(), n = null;
1628
+ }), r.activate()), { deactivate: () => {
1629
+ r == null || r.deactivate(), r = null;
2249
1630
  }, wrapper: t };
2250
1631
  }
2251
- const wa = ({ modalContext: t, config: e, children: r }) => {
2252
- const [n, s] = z(!1), l = q(null), [i, m] = z(null);
2253
- function o() {
2254
- m(Cr(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), s(!0);
1632
+ const ar = ({ modalContext: t, config: e, children: n }) => {
1633
+ const [r, i] = $(!1), l = j(null), [a, m] = $(null);
1634
+ function s() {
1635
+ m(Wt(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), i(!0);
2255
1636
  }
2256
- return X(() => () => i == null ? void 0 : i.deactivate(), [i]), /* @__PURE__ */ F.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ F.jsx(
1637
+ return D(() => () => a == null ? void 0 : a.deactivate(), [a]), /* @__PURE__ */ C("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ C(
2257
1638
  "div",
2258
1639
  {
2259
- className: Ye("im-modal-positioner flex min-h-full justify-center", {
1640
+ className: Se("im-modal-positioner flex min-h-full justify-center", {
2260
1641
  "items-start": e.position === "top",
2261
1642
  "items-center": e.position === "center",
2262
1643
  "items-end": e.position === "bottom"
2263
1644
  }),
2264
- children: /* @__PURE__ */ F.jsx(
2265
- st,
1645
+ children: /* @__PURE__ */ C(
1646
+ We,
2266
1647
  {
2267
1648
  as: "div",
2268
1649
  ref: l,
@@ -2270,32 +1651,28 @@ const wa = ({ modalContext: t, config: e, children: r }) => {
2270
1651
  enterTo: "opacity-100 translate-y-0 sm:scale-100",
2271
1652
  leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
2272
1653
  leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
2273
- afterEnter: o,
1654
+ afterEnter: s,
2274
1655
  afterLeave: t.afterLeave,
2275
- className: Ye(
2276
- "im-modal-wrapper pointer-events-auto w-full transition duration-300 ease-in-out",
2277
- t.onTopOfStack ? "" : "blur-sm",
2278
- {
2279
- "sm:max-w-sm": e.maxWidth === "sm",
2280
- "sm:max-w-md": e.maxWidth === "md",
2281
- "sm:max-w-md md:max-w-lg": e.maxWidth === "lg",
2282
- "sm:max-w-md md:max-w-xl": e.maxWidth === "xl",
2283
- "sm:max-w-md md:max-w-xl lg:max-w-2xl": e.maxWidth === "2xl",
2284
- "sm:max-w-md md:max-w-xl lg:max-w-3xl": e.maxWidth === "3xl",
2285
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": e.maxWidth === "4xl",
2286
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": e.maxWidth === "5xl",
2287
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": e.maxWidth === "6xl",
2288
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
2289
- }
2290
- ),
2291
- children: /* @__PURE__ */ F.jsxs(
1656
+ className: Se("im-modal-wrapper w-full transition duration-300 ease-in-out", t.onTopOfStack ? "" : "blur-sm", {
1657
+ "sm:max-w-sm": e.maxWidth === "sm",
1658
+ "sm:max-w-md": e.maxWidth === "md",
1659
+ "sm:max-w-md md:max-w-lg": e.maxWidth === "lg",
1660
+ "sm:max-w-md md:max-w-xl": e.maxWidth === "xl",
1661
+ "sm:max-w-md md:max-w-xl lg:max-w-2xl": e.maxWidth === "2xl",
1662
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl": e.maxWidth === "3xl",
1663
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": e.maxWidth === "4xl",
1664
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": e.maxWidth === "5xl",
1665
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": e.maxWidth === "6xl",
1666
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
1667
+ }),
1668
+ children: /* @__PURE__ */ le(
2292
1669
  "div",
2293
1670
  {
2294
1671
  className: `im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,
2295
- "data-inertiaui-modal-entered": n,
1672
+ "data-inertiaui-modal-entered": r,
2296
1673
  children: [
2297
- e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Pr, { onClick: t.close }) }),
2298
- typeof r == "function" ? r({ modalContext: t, config: e }) : r
1674
+ e.closeButton && /* @__PURE__ */ C("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ C($t, { onClick: t.close }) }),
1675
+ typeof n == "function" ? n({ modalContext: t, config: e }) : n
2299
1676
  ]
2300
1677
  }
2301
1678
  )
@@ -2303,20 +1680,20 @@ const wa = ({ modalContext: t, config: e, children: r }) => {
2303
1680
  )
2304
1681
  }
2305
1682
  ) });
2306
- }, xa = ({ modalContext: t, config: e, children: r }) => {
2307
- const [n, s] = z(!1), l = q(null), [i, m] = z(null);
2308
- function o() {
2309
- m(Cr(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), s(!0);
1683
+ }, ir = ({ modalContext: t, config: e, children: n }) => {
1684
+ const [r, i] = $(!1), l = j(null), [a, m] = $(null);
1685
+ function s() {
1686
+ m(Wt(l.current, e == null ? void 0 : e.closeExplicitly, () => t.close())), i(!0);
2310
1687
  }
2311
- return X(() => () => i == null ? void 0 : i.deactivate(), [i]), /* @__PURE__ */ F.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ F.jsx(
1688
+ return D(() => () => a == null ? void 0 : a.deactivate(), [a]), /* @__PURE__ */ C("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ C(
2312
1689
  "div",
2313
1690
  {
2314
- className: Ye("im-slideover-positioner flex min-h-full items-center", {
1691
+ className: Se("im-slideover-positioner flex min-h-full items-center", {
2315
1692
  "justify-start rtl:justify-end": (e == null ? void 0 : e.position) === "left",
2316
1693
  "justify-end rtl:justify-start": (e == null ? void 0 : e.position) === "right"
2317
1694
  }),
2318
- children: /* @__PURE__ */ F.jsx(
2319
- st,
1695
+ children: /* @__PURE__ */ C(
1696
+ We,
2320
1697
  {
2321
1698
  as: "div",
2322
1699
  ref: l,
@@ -2324,32 +1701,28 @@ const wa = ({ modalContext: t, config: e, children: r }) => {
2324
1701
  enterTo: "opacity-100 translate-x-0",
2325
1702
  leaveFrom: "opacity-100 translate-x-0",
2326
1703
  leaveTo: `opacity-0 ${e.position === "left" ? "-translate-x-full" : "translate-x-full"}`,
2327
- afterEnter: o,
1704
+ afterEnter: s,
2328
1705
  afterLeave: t.afterLeave,
2329
- className: Ye(
2330
- "im-slideover-wrapper pointer-events-auto w-full transition duration-300 ease-in-out",
2331
- t.onTopOfStack ? "" : "blur-sm",
2332
- {
2333
- "sm:max-w-sm": e.maxWidth === "sm",
2334
- "sm:max-w-md": e.maxWidth === "md",
2335
- "sm:max-w-md md:max-w-lg": e.maxWidth === "lg",
2336
- "sm:max-w-md md:max-w-xl": e.maxWidth === "xl",
2337
- "sm:max-w-md md:max-w-xl lg:max-w-2xl": e.maxWidth === "2xl",
2338
- "sm:max-w-md md:max-w-xl lg:max-w-3xl": e.maxWidth === "3xl",
2339
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": e.maxWidth === "4xl",
2340
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": e.maxWidth === "5xl",
2341
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": e.maxWidth === "6xl",
2342
- "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
2343
- }
2344
- ),
2345
- children: /* @__PURE__ */ F.jsxs(
1706
+ className: Se("im-slideover-wrapper w-full transition duration-300 ease-in-out", t.onTopOfStack ? "" : "blur-sm", {
1707
+ "sm:max-w-sm": e.maxWidth === "sm",
1708
+ "sm:max-w-md": e.maxWidth === "md",
1709
+ "sm:max-w-md md:max-w-lg": e.maxWidth === "lg",
1710
+ "sm:max-w-md md:max-w-xl": e.maxWidth === "xl",
1711
+ "sm:max-w-md md:max-w-xl lg:max-w-2xl": e.maxWidth === "2xl",
1712
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl": e.maxWidth === "3xl",
1713
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": e.maxWidth === "4xl",
1714
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": e.maxWidth === "5xl",
1715
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": e.maxWidth === "6xl",
1716
+ "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": e.maxWidth === "7xl"
1717
+ }),
1718
+ children: /* @__PURE__ */ le(
2346
1719
  "div",
2347
1720
  {
2348
1721
  className: `im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,
2349
- "data-inertiaui-modal-entered": n,
1722
+ "data-inertiaui-modal-entered": r,
2350
1723
  children: [
2351
- e.closeButton && /* @__PURE__ */ F.jsx("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ F.jsx(Pr, { onClick: t.close }) }),
2352
- typeof r == "function" ? r({ modalContext: t, config: e }) : r
1724
+ e.closeButton && /* @__PURE__ */ C("div", { className: "absolute right-0 top-0 pr-3 pt-3", children: /* @__PURE__ */ C($t, { onClick: t.close }) }),
1725
+ typeof n == "function" ? n({ modalContext: t, config: e }) : n
2353
1726
  ]
2354
1727
  }
2355
1728
  )
@@ -2357,52 +1730,52 @@ const wa = ({ modalContext: t, config: e, children: r }) => {
2357
1730
  )
2358
1731
  }
2359
1732
  ) });
2360
- }, Ea = Tt(({ name: t, children: e, onFocus: r = null, onBlur: n = null, onClose: s = null, onSuccess: l = null, onAfterLeave: i = null, ...m }, o) => {
2361
- const g = (w) => typeof e == "function" ? e(w) : e, y = q(null);
2362
- return X(() => {
1733
+ }, lr = Ze(({ name: t, children: e, onFocus: n = null, onBlur: r = null, onClose: i = null, onSuccess: l = null, onAfterLeave: a = null, ...m }, s) => {
1734
+ const p = (w) => typeof e == "function" ? e(w) : e, b = j(null);
1735
+ return D(() => {
2363
1736
  var w;
2364
- if (((w = y == null ? void 0 : y.current) == null ? void 0 : w.index) === 0)
2365
- return Ht.prepare(), () => Ht.cleanup();
2366
- }, [y]), er(o, () => y.current, [y]), /* @__PURE__ */ F.jsx(
2367
- sr,
1737
+ if (((w = b == null ? void 0 : b.current) == null ? void 0 : w.index) === 0)
1738
+ return nt.prepare(), () => nt.cleanup();
1739
+ }, [b]), ct(s, () => b.current, [b]), /* @__PURE__ */ C(
1740
+ bt,
2368
1741
  {
2369
- ref: y,
1742
+ ref: b,
2370
1743
  name: t,
2371
- onFocus: r,
2372
- onBlur: n,
2373
- onClose: s,
1744
+ onFocus: n,
1745
+ onBlur: r,
1746
+ onClose: i,
2374
1747
  onSuccess: l,
2375
1748
  ...m,
2376
1749
  children: ({
2377
1750
  afterLeave: w,
2378
- close: P,
2379
- config: S,
2380
- emit: p,
2381
- getChildModal: E,
1751
+ close: T,
1752
+ config: E,
1753
+ emit: c,
1754
+ getChildModal: g,
2382
1755
  getParentModal: d,
2383
1756
  id: f,
2384
- index: v,
2385
- isOpen: R,
2386
- modalContext: O,
2387
- onTopOfStack: b,
2388
- reload: D,
2389
- setOpen: B,
2390
- shouldRender: Z
2391
- }) => /* @__PURE__ */ F.jsx(
2392
- ia,
1757
+ index: h,
1758
+ isOpen: y,
1759
+ modalContext: N,
1760
+ onTopOfStack: v,
1761
+ reload: I,
1762
+ setOpen: A,
1763
+ shouldRender: H
1764
+ }) => /* @__PURE__ */ C(
1765
+ Kn,
2393
1766
  {
2394
1767
  appear: !0,
2395
- show: R ?? !1,
2396
- afterLeave: i,
2397
- children: /* @__PURE__ */ F.jsxs(
1768
+ show: y ?? !1,
1769
+ afterLeave: a,
1770
+ children: /* @__PURE__ */ le(
2398
1771
  "div",
2399
1772
  {
2400
1773
  className: "im-dialog relative z-20",
2401
1774
  "data-inertiaui-modal-id": f,
2402
- "data-inertiaui-modal-index": v,
1775
+ "data-inertiaui-modal-index": h,
2403
1776
  children: [
2404
- v === 0 ? /* @__PURE__ */ F.jsx(
2405
- st,
1777
+ h === 0 ? /* @__PURE__ */ C(
1778
+ We,
2406
1779
  {
2407
1780
  enter: "transition transform ease-in-out duration-300",
2408
1781
  enterFrom: "opacity-0",
@@ -2410,58 +1783,58 @@ const wa = ({ modalContext: t, config: e, children: r }) => {
2410
1783
  leave: "transition transform ease-in-out duration-300",
2411
1784
  leaveFrom: "opacity-100",
2412
1785
  leaveTo: "opacity-0",
2413
- children: b ? /* @__PURE__ */ F.jsx(
1786
+ children: v ? /* @__PURE__ */ C(
2414
1787
  "div",
2415
1788
  {
2416
1789
  className: "im-backdrop fixed inset-0 z-30 bg-black/75",
2417
1790
  "aria-hidden": "true"
2418
1791
  }
2419
- ) : /* @__PURE__ */ F.jsx("div", {})
1792
+ ) : /* @__PURE__ */ C("div", {})
2420
1793
  }
2421
1794
  ) : null,
2422
- v > 0 && b ? /* @__PURE__ */ F.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
2423
- S.slideover ? /* @__PURE__ */ F.jsx(
2424
- xa,
1795
+ h > 0 && v ? /* @__PURE__ */ C("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null,
1796
+ E.slideover ? /* @__PURE__ */ C(
1797
+ ir,
2425
1798
  {
2426
- modalContext: O,
2427
- config: S,
2428
- children: g({
1799
+ modalContext: N,
1800
+ config: E,
1801
+ children: p({
2429
1802
  afterLeave: w,
2430
- close: P,
2431
- config: S,
2432
- emit: p,
2433
- getChildModal: E,
1803
+ close: T,
1804
+ config: E,
1805
+ emit: c,
1806
+ getChildModal: g,
2434
1807
  getParentModal: d,
2435
1808
  id: f,
2436
- index: v,
2437
- isOpen: R,
2438
- modalContext: O,
2439
- onTopOfStack: b,
2440
- reload: D,
2441
- setOpen: B,
2442
- shouldRender: Z
1809
+ index: h,
1810
+ isOpen: y,
1811
+ modalContext: N,
1812
+ onTopOfStack: v,
1813
+ reload: I,
1814
+ setOpen: A,
1815
+ shouldRender: H
2443
1816
  })
2444
1817
  }
2445
- ) : /* @__PURE__ */ F.jsx(
2446
- wa,
1818
+ ) : /* @__PURE__ */ C(
1819
+ ar,
2447
1820
  {
2448
- modalContext: O,
2449
- config: S,
2450
- children: g({
1821
+ modalContext: N,
1822
+ config: E,
1823
+ children: p({
2451
1824
  afterLeave: w,
2452
- close: P,
2453
- config: S,
2454
- emit: p,
2455
- getChildModal: E,
1825
+ close: T,
1826
+ config: E,
1827
+ emit: c,
1828
+ getChildModal: g,
2456
1829
  getParentModal: d,
2457
1830
  id: f,
2458
- index: v,
2459
- isOpen: R,
2460
- modalContext: O,
2461
- onTopOfStack: b,
2462
- reload: D,
2463
- setOpen: B,
2464
- shouldRender: Z
1831
+ index: h,
1832
+ isOpen: y,
1833
+ modalContext: N,
1834
+ onTopOfStack: v,
1835
+ reload: I,
1836
+ setOpen: A,
1837
+ shouldRender: H
2465
1838
  })
2466
1839
  }
2467
1840
  )
@@ -2473,84 +1846,84 @@ const wa = ({ modalContext: t, config: e, children: r }) => {
2473
1846
  }
2474
1847
  );
2475
1848
  });
2476
- Ea.displayName = "Modal";
2477
- const ja = ({
1849
+ lr.displayName = "Modal";
1850
+ const br = ({
2478
1851
  href: t,
2479
1852
  method: e = "get",
2480
- data: r = {},
2481
- as: n = "a",
2482
- headers: s = {},
1853
+ data: n = {},
1854
+ as: r = "a",
1855
+ headers: i = {},
2483
1856
  queryStringArrayFormat: l = "brackets",
2484
- onAfterLeave: i = null,
1857
+ onAfterLeave: a = null,
2485
1858
  onBlur: m = null,
2486
- onClose: o = null,
2487
- onError: g = null,
2488
- onFocus: y = null,
1859
+ onClose: s = null,
1860
+ onError: p = null,
1861
+ onFocus: b = null,
2489
1862
  onStart: w = null,
2490
- onSuccess: P = null,
2491
- navigate: S = null,
2492
- children: p,
2493
- ...E
1863
+ onSuccess: T = null,
1864
+ navigate: E = null,
1865
+ children: c,
1866
+ ...g
2494
1867
  }) => {
2495
- const [d, f] = z(!1), [v, R] = z(null), { stack: O, visit: b } = et(), D = ve(() => S ?? Rt("navigate"), [S]), B = {}, Z = {};
2496
- Object.keys(E).forEach((c) => {
2497
- Yt.includes(c) || (c.startsWith("on") && typeof E[c] == "function" ? c.toLowerCase() in window ? B[c] = E[c] : Z[c] = E[c] : B[c] = E[c]);
1868
+ const [d, f] = $(!1), [h, y] = $(null), { stack: N, visit: v } = Ae(), I = Y(() => E ?? Je("navigate"), [E]), A = {}, H = {};
1869
+ Object.keys(g).forEach((u) => {
1870
+ rt.includes(u) || (u.startsWith("on") && typeof g[u] == "function" ? u.toLowerCase() in window ? A[u] = g[u] : H[u] = g[u] : A[u] = g[u]);
2498
1871
  });
2499
- const [ee, Y] = z(!1);
2500
- X(() => {
2501
- v && (v.onTopOfStack && ee ? y == null || y() : !v.onTopOfStack && !ee && (m == null || m()), Y(!v.onTopOfStack));
2502
- }, [O]);
2503
- const G = ue(() => {
2504
- o == null || o();
2505
- }, [o]), j = ue(() => {
2506
- R(null), i == null || i();
2507
- }, [i]), u = ue(
2508
- (c) => {
2509
- c == null || c.preventDefault(), !d && (t.startsWith("#") || (f(!0), w == null || w()), b(
1872
+ const [K, W] = $(!1);
1873
+ D(() => {
1874
+ h && (h.onTopOfStack && K ? b == null || b() : !h.onTopOfStack && !K && (m == null || m()), W(!h.onTopOfStack));
1875
+ }, [N]);
1876
+ const U = V(() => {
1877
+ s == null || s();
1878
+ }, [s]), O = V(() => {
1879
+ y(null), a == null || a();
1880
+ }, [a]), o = V(
1881
+ (u) => {
1882
+ u == null || u.preventDefault(), !d && (t.startsWith("#") || (f(!0), w == null || w()), v(
2510
1883
  t,
2511
1884
  e,
2512
- r,
2513
- s,
2514
- fn(tr(E, Yt)),
2515
- () => G(O.length),
2516
- j,
1885
+ n,
1886
+ i,
1887
+ Gt(ft(g, rt)),
1888
+ () => U(N.length),
1889
+ O,
2517
1890
  l,
2518
- D
2519
- ).then((T) => {
2520
- R(T), T.registerEventListenersFromProps(Z), P == null || P();
2521
- }).catch((T) => {
2522
- console.error(T), g == null || g(T);
1891
+ I
1892
+ ).then((x) => {
1893
+ y(x), x.registerEventListenersFromProps(H), T == null || T();
1894
+ }).catch((x) => {
1895
+ console.error(x), p == null || p(x);
2523
1896
  }).finally(() => f(!1)));
2524
1897
  },
2525
- [t, e, r, s, l, E, G, j]
1898
+ [t, e, n, i, l, g, U, O]
2526
1899
  );
2527
- return /* @__PURE__ */ F.jsx(
2528
- n,
1900
+ return /* @__PURE__ */ C(
1901
+ r,
2529
1902
  {
2530
- ...B,
1903
+ ...A,
2531
1904
  href: t,
2532
- onClick: u,
2533
- children: typeof p == "function" ? p({ loading: d }) : p
1905
+ onClick: o,
1906
+ children: typeof c == "function" ? c({ loading: d }) : c
2534
1907
  }
2535
1908
  );
2536
1909
  };
2537
- function Aa() {
2538
- return et().stack[ar()] ?? null;
1910
+ function gr() {
1911
+ return Ae().stack[vt()] ?? null;
2539
1912
  }
2540
- const Ia = (t) => (e) => (e.default.layout = (r) => Ve(t, {}, r), e);
1913
+ const yr = (t) => (e) => (e.default.layout = (n) => Ne(t, {}, n), e);
2541
1914
  export {
2542
- sr as HeadlessModal,
2543
- Ea as Modal,
2544
- ja as ModalLink,
2545
- mn as ModalRoot,
2546
- pn as ModalStackProvider,
2547
- Rt as getConfig,
2548
- hn as initFromPageProps,
2549
- ka as putConfig,
2550
- Fa as renderApp,
2551
- Ca as resetConfig,
2552
- Ia as setPageLayout,
2553
- Aa as useModal,
2554
- ar as useModalIndex,
2555
- et as useModalStack
1915
+ bt as HeadlessModal,
1916
+ lr as Modal,
1917
+ br as ModalLink,
1918
+ Qt as ModalRoot,
1919
+ Yt as ModalStackProvider,
1920
+ Je as getConfig,
1921
+ Jt as initFromPageProps,
1922
+ hr as putConfig,
1923
+ vr as renderApp,
1924
+ mr as resetConfig,
1925
+ yr as setPageLayout,
1926
+ gr as useModal,
1927
+ vt as useModalIndex,
1928
+ Ae as useModalStack
2556
1929
  };