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