@pittorica/dialog-react 0.25.0 → 0.26.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/Dialog.d.ts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +636 -595
- package/package.json +10 -9
- package/dist/Dialog.stories.d.ts +0 -8
- package/dist/Dialog.stories.d.ts.map +0 -1
- package/dist/Dialog.test.d.ts +0 -5
- package/dist/Dialog.test.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as q, jsxs as ht, Fragment as gt } from "react/jsx-runtime";
|
|
2
2
|
import * as ir from "react";
|
|
3
|
-
import
|
|
4
|
-
import { createPortal as
|
|
5
|
-
function
|
|
3
|
+
import X, { useState as fe, createContext as _r, forwardRef as Rr, useRef as we, useCallback as pe, useEffect as Se, useMemo as Et, Fragment as Tt, PureComponent as xt, useId as ur, useLayoutEffect as Ot, use as wt } from "react";
|
|
4
|
+
import { createPortal as St } from "react-dom";
|
|
5
|
+
function Pt(e, r) {
|
|
6
6
|
if (e == null) return {};
|
|
7
7
|
var t = {};
|
|
8
8
|
for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
|
|
@@ -11,19 +11,19 @@ function St(e, r) {
|
|
|
11
11
|
}
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function me() {
|
|
15
|
+
return me = Object.assign ? Object.assign.bind() : function(e) {
|
|
16
16
|
for (var r = 1; r < arguments.length; r++) {
|
|
17
17
|
var t = arguments[r];
|
|
18
18
|
for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
|
-
},
|
|
21
|
+
}, me.apply(null, arguments);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function _t(e) {
|
|
24
24
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var xe = { exports: {} }, Oe = { exports: {} }, N = {};
|
|
27
27
|
/** @license React v16.13.1
|
|
28
28
|
* react-is.production.min.js
|
|
29
29
|
*
|
|
@@ -33,22 +33,22 @@ var ke = { exports: {} }, xe = { exports: {} }, N = {};
|
|
|
33
33
|
* LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
35
|
var cr;
|
|
36
|
-
function
|
|
36
|
+
function Rt() {
|
|
37
37
|
if (cr) return N;
|
|
38
38
|
cr = 1;
|
|
39
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110,
|
|
39
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, m = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
|
|
40
40
|
function T(s) {
|
|
41
41
|
if (typeof s == "object" && s !== null) {
|
|
42
42
|
var k = s.$$typeof;
|
|
43
43
|
switch (k) {
|
|
44
44
|
case r:
|
|
45
45
|
switch (s = s.type, s) {
|
|
46
|
-
case
|
|
46
|
+
case m:
|
|
47
47
|
case f:
|
|
48
48
|
case n:
|
|
49
49
|
case a:
|
|
50
50
|
case o:
|
|
51
|
-
case
|
|
51
|
+
case d:
|
|
52
52
|
return s;
|
|
53
53
|
default:
|
|
54
54
|
switch (s = s && s.$$typeof, s) {
|
|
@@ -67,12 +67,12 @@ function _t() {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function F(s) {
|
|
71
71
|
return T(s) === f;
|
|
72
72
|
}
|
|
73
|
-
return N.AsyncMode =
|
|
74
|
-
return
|
|
75
|
-
}, N.isConcurrentMode =
|
|
73
|
+
return N.AsyncMode = m, N.ConcurrentMode = f, N.ContextConsumer = u, N.ContextProvider = i, N.Element = r, N.ForwardRef = v, N.Fragment = n, N.Lazy = E, N.Memo = g, N.Portal = t, N.Profiler = a, N.StrictMode = o, N.Suspense = d, N.isAsyncMode = function(s) {
|
|
74
|
+
return F(s) || T(s) === m;
|
|
75
|
+
}, N.isConcurrentMode = F, N.isContextConsumer = function(s) {
|
|
76
76
|
return T(s) === u;
|
|
77
77
|
}, N.isContextProvider = function(s) {
|
|
78
78
|
return T(s) === i;
|
|
@@ -93,9 +93,9 @@ function _t() {
|
|
|
93
93
|
}, N.isStrictMode = function(s) {
|
|
94
94
|
return T(s) === o;
|
|
95
95
|
}, N.isSuspense = function(s) {
|
|
96
|
-
return T(s) ===
|
|
96
|
+
return T(s) === d;
|
|
97
97
|
}, N.isValidElementType = function(s) {
|
|
98
|
-
return typeof s == "string" || typeof s == "function" || s === n || s === f || s === a || s === o || s ===
|
|
98
|
+
return typeof s == "string" || typeof s == "function" || s === n || s === f || s === a || s === o || s === d || s === p || typeof s == "object" && s !== null && (s.$$typeof === E || s.$$typeof === g || s.$$typeof === i || s.$$typeof === u || s.$$typeof === v || s.$$typeof === w || s.$$typeof === $ || s.$$typeof === O || s.$$typeof === b);
|
|
99
99
|
}, N.typeOf = T, N;
|
|
100
100
|
}
|
|
101
101
|
var D = {};
|
|
@@ -109,25 +109,25 @@ var D = {};
|
|
|
109
109
|
*/
|
|
110
110
|
var sr;
|
|
111
111
|
function Ft() {
|
|
112
|
-
return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
113
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110,
|
|
114
|
-
function T(
|
|
115
|
-
return typeof
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
function
|
|
119
|
-
if (typeof
|
|
120
|
-
var
|
|
121
|
-
switch (
|
|
112
|
+
return sr || (sr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
113
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, m = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
|
|
114
|
+
function T(l) {
|
|
115
|
+
return typeof l == "string" || typeof l == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
116
|
+
l === n || l === f || l === a || l === o || l === d || l === p || typeof l == "object" && l !== null && (l.$$typeof === E || l.$$typeof === g || l.$$typeof === i || l.$$typeof === u || l.$$typeof === v || l.$$typeof === w || l.$$typeof === $ || l.$$typeof === O || l.$$typeof === b);
|
|
117
|
+
}
|
|
118
|
+
function F(l) {
|
|
119
|
+
if (typeof l == "object" && l !== null) {
|
|
120
|
+
var U = l.$$typeof;
|
|
121
|
+
switch (U) {
|
|
122
122
|
case r:
|
|
123
|
-
var ue =
|
|
123
|
+
var ue = l.type;
|
|
124
124
|
switch (ue) {
|
|
125
|
-
case
|
|
125
|
+
case m:
|
|
126
126
|
case f:
|
|
127
127
|
case n:
|
|
128
128
|
case a:
|
|
129
129
|
case o:
|
|
130
|
-
case
|
|
130
|
+
case d:
|
|
131
131
|
return ue;
|
|
132
132
|
default:
|
|
133
133
|
var Te = ue && ue.$$typeof;
|
|
@@ -139,69 +139,69 @@ function Ft() {
|
|
|
139
139
|
case i:
|
|
140
140
|
return Te;
|
|
141
141
|
default:
|
|
142
|
-
return
|
|
142
|
+
return U;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
case t:
|
|
146
|
-
return
|
|
146
|
+
return U;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
var s =
|
|
151
|
-
function ie(
|
|
152
|
-
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), c(
|
|
150
|
+
var s = m, k = f, Y = u, z = i, H = r, h = v, V = n, ne = E, Z = g, J = t, oe = a, B = o, K = d, ae = !1;
|
|
151
|
+
function ie(l) {
|
|
152
|
+
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), c(l) || F(l) === m;
|
|
153
153
|
}
|
|
154
|
-
function c(
|
|
155
|
-
return
|
|
154
|
+
function c(l) {
|
|
155
|
+
return F(l) === f;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function y(l) {
|
|
158
|
+
return F(l) === u;
|
|
159
159
|
}
|
|
160
|
-
function P(
|
|
161
|
-
return
|
|
160
|
+
function P(l) {
|
|
161
|
+
return F(l) === i;
|
|
162
162
|
}
|
|
163
|
-
function S(
|
|
164
|
-
return typeof
|
|
163
|
+
function S(l) {
|
|
164
|
+
return typeof l == "object" && l !== null && l.$$typeof === r;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return
|
|
166
|
+
function x(l) {
|
|
167
|
+
return F(l) === v;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
return
|
|
169
|
+
function A(l) {
|
|
170
|
+
return F(l) === n;
|
|
171
171
|
}
|
|
172
|
-
function _(
|
|
173
|
-
return
|
|
172
|
+
function _(l) {
|
|
173
|
+
return F(l) === E;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function R(l) {
|
|
176
|
+
return F(l) === g;
|
|
177
177
|
}
|
|
178
|
-
function I(
|
|
179
|
-
return
|
|
178
|
+
function I(l) {
|
|
179
|
+
return F(l) === t;
|
|
180
180
|
}
|
|
181
|
-
function M(
|
|
182
|
-
return
|
|
181
|
+
function M(l) {
|
|
182
|
+
return F(l) === a;
|
|
183
183
|
}
|
|
184
|
-
function C(
|
|
185
|
-
return
|
|
184
|
+
function C(l) {
|
|
185
|
+
return F(l) === o;
|
|
186
186
|
}
|
|
187
|
-
function L(
|
|
188
|
-
return
|
|
187
|
+
function L(l) {
|
|
188
|
+
return F(l) === d;
|
|
189
189
|
}
|
|
190
|
-
D.AsyncMode = s, D.ConcurrentMode = k, D.ContextConsumer =
|
|
191
|
-
}()), D;
|
|
190
|
+
D.AsyncMode = s, D.ConcurrentMode = k, D.ContextConsumer = Y, D.ContextProvider = z, D.Element = H, D.ForwardRef = h, D.Fragment = V, D.Lazy = ne, D.Memo = Z, D.Portal = J, D.Profiler = oe, D.StrictMode = B, D.Suspense = K, D.isAsyncMode = ie, D.isConcurrentMode = c, D.isContextConsumer = y, D.isContextProvider = P, D.isElement = S, D.isForwardRef = x, D.isFragment = A, D.isLazy = _, D.isMemo = R, D.isPortal = I, D.isProfiler = M, D.isStrictMode = C, D.isSuspense = L, D.isValidElementType = T, D.typeOf = F;
|
|
191
|
+
})()), D;
|
|
192
192
|
}
|
|
193
193
|
var fr;
|
|
194
194
|
function Fr() {
|
|
195
|
-
return fr || (fr = 1, process.env.NODE_ENV === "production" ?
|
|
195
|
+
return fr || (fr = 1, process.env.NODE_ENV === "production" ? Oe.exports = Rt() : Oe.exports = Ft()), Oe.exports;
|
|
196
196
|
}
|
|
197
197
|
/*
|
|
198
198
|
object-assign
|
|
199
199
|
(c) Sindre Sorhus
|
|
200
200
|
@license MIT
|
|
201
201
|
*/
|
|
202
|
-
var
|
|
202
|
+
var Re, dr;
|
|
203
203
|
function At() {
|
|
204
|
-
if (dr) return
|
|
204
|
+
if (dr) return Re;
|
|
205
205
|
dr = 1;
|
|
206
206
|
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
207
207
|
function n(a) {
|
|
@@ -218,10 +218,10 @@ function At() {
|
|
|
218
218
|
return !1;
|
|
219
219
|
for (var i = {}, u = 0; u < 10; u++)
|
|
220
220
|
i["_" + String.fromCharCode(u)] = u;
|
|
221
|
-
var
|
|
221
|
+
var m = Object.getOwnPropertyNames(i).map(function(v) {
|
|
222
222
|
return i[v];
|
|
223
223
|
});
|
|
224
|
-
if (
|
|
224
|
+
if (m.join("") !== "0123456789")
|
|
225
225
|
return !1;
|
|
226
226
|
var f = {};
|
|
227
227
|
return "abcdefghijklmnopqrst".split("").forEach(function(v) {
|
|
@@ -231,19 +231,19 @@ function At() {
|
|
|
231
231
|
return !1;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
return
|
|
235
|
-
for (var u,
|
|
234
|
+
return Re = o() ? Object.assign : function(a, i) {
|
|
235
|
+
for (var u, m = n(a), f, v = 1; v < arguments.length; v++) {
|
|
236
236
|
u = Object(arguments[v]);
|
|
237
|
-
for (var
|
|
238
|
-
r.call(u,
|
|
237
|
+
for (var d in u)
|
|
238
|
+
r.call(u, d) && (m[d] = u[d]);
|
|
239
239
|
if (e) {
|
|
240
240
|
f = e(u);
|
|
241
241
|
for (var p = 0; p < f.length; p++)
|
|
242
|
-
t.call(u, f[p]) && (
|
|
242
|
+
t.call(u, f[p]) && (m[f[p]] = u[f[p]]);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
return
|
|
246
|
-
},
|
|
245
|
+
return m;
|
|
246
|
+
}, Re;
|
|
247
247
|
}
|
|
248
248
|
var Fe, lr;
|
|
249
249
|
function ze() {
|
|
@@ -256,14 +256,14 @@ var Ae, vr;
|
|
|
256
256
|
function Ar() {
|
|
257
257
|
return vr || (vr = 1, Ae = Function.call.bind(Object.prototype.hasOwnProperty)), Ae;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
if (pr) return
|
|
259
|
+
var Ie, pr;
|
|
260
|
+
function It() {
|
|
261
|
+
if (pr) return Ie;
|
|
262
262
|
pr = 1;
|
|
263
263
|
var e = function() {
|
|
264
264
|
};
|
|
265
265
|
if (process.env.NODE_ENV !== "production") {
|
|
266
|
-
var r = ze(), t = {}, n = Ar();
|
|
266
|
+
var r = /* @__PURE__ */ ze(), t = {}, n = /* @__PURE__ */ Ar();
|
|
267
267
|
e = function(a) {
|
|
268
268
|
var i = "Warning: " + a;
|
|
269
269
|
typeof console < "u" && console.error(i);
|
|
@@ -273,29 +273,29 @@ function Rt() {
|
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function o(a, i, u,
|
|
276
|
+
function o(a, i, u, m, f) {
|
|
277
277
|
if (process.env.NODE_ENV !== "production") {
|
|
278
278
|
for (var v in a)
|
|
279
279
|
if (n(a, v)) {
|
|
280
|
-
var
|
|
280
|
+
var d;
|
|
281
281
|
try {
|
|
282
282
|
if (typeof a[v] != "function") {
|
|
283
283
|
var p = Error(
|
|
284
|
-
(
|
|
284
|
+
(m || "React class") + ": " + u + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
285
285
|
);
|
|
286
286
|
throw p.name = "Invariant Violation", p;
|
|
287
287
|
}
|
|
288
|
-
|
|
288
|
+
d = a[v](i, v, m, u, null, r);
|
|
289
289
|
} catch (E) {
|
|
290
|
-
|
|
290
|
+
d = E;
|
|
291
291
|
}
|
|
292
|
-
if (
|
|
293
|
-
(
|
|
294
|
-
),
|
|
295
|
-
t[
|
|
292
|
+
if (d && !(d instanceof Error) && e(
|
|
293
|
+
(m || "React class") + ": type specification of " + u + " `" + v + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof d + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
294
|
+
), d instanceof Error && !(d.message in t)) {
|
|
295
|
+
t[d.message] = !0;
|
|
296
296
|
var g = f ? f() : "";
|
|
297
297
|
e(
|
|
298
|
-
"Failed " + u + " type: " +
|
|
298
|
+
"Failed " + u + " type: " + d.message + (g ?? "")
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
@@ -303,31 +303,31 @@ function Rt() {
|
|
|
303
303
|
}
|
|
304
304
|
return o.resetWarningCache = function() {
|
|
305
305
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
306
|
-
},
|
|
306
|
+
}, Ie = o, Ie;
|
|
307
307
|
}
|
|
308
|
-
var
|
|
309
|
-
function
|
|
310
|
-
if (
|
|
311
|
-
|
|
312
|
-
var e = Fr(), r = At(), t = ze(), n = Ar(), o =
|
|
308
|
+
var Ce, yr;
|
|
309
|
+
function Ct() {
|
|
310
|
+
if (yr) return Ce;
|
|
311
|
+
yr = 1;
|
|
312
|
+
var e = Fr(), r = At(), t = /* @__PURE__ */ ze(), n = /* @__PURE__ */ Ar(), o = /* @__PURE__ */ It(), a = function() {
|
|
313
313
|
};
|
|
314
314
|
process.env.NODE_ENV !== "production" && (a = function(u) {
|
|
315
|
-
var
|
|
316
|
-
typeof console < "u" && console.error(
|
|
315
|
+
var m = "Warning: " + u;
|
|
316
|
+
typeof console < "u" && console.error(m);
|
|
317
317
|
try {
|
|
318
|
-
throw new Error(
|
|
318
|
+
throw new Error(m);
|
|
319
319
|
} catch {
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
function i() {
|
|
323
323
|
return null;
|
|
324
324
|
}
|
|
325
|
-
return
|
|
325
|
+
return Ce = function(u, m) {
|
|
326
326
|
var f = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
|
|
327
|
-
function
|
|
328
|
-
var
|
|
329
|
-
if (typeof
|
|
330
|
-
return
|
|
327
|
+
function d(c) {
|
|
328
|
+
var y = c && (f && c[f] || c[v]);
|
|
329
|
+
if (typeof y == "function")
|
|
330
|
+
return y;
|
|
331
331
|
}
|
|
332
332
|
var p = "<<anonymous>>", g = {
|
|
333
333
|
array: $("array"),
|
|
@@ -338,223 +338,223 @@ function It() {
|
|
|
338
338
|
object: $("object"),
|
|
339
339
|
string: $("string"),
|
|
340
340
|
symbol: $("symbol"),
|
|
341
|
-
any:
|
|
341
|
+
any: O(),
|
|
342
342
|
arrayOf: T,
|
|
343
|
-
element:
|
|
343
|
+
element: F(),
|
|
344
344
|
elementType: s(),
|
|
345
345
|
instanceOf: k,
|
|
346
|
-
node:
|
|
346
|
+
node: h(),
|
|
347
347
|
objectOf: z,
|
|
348
|
-
oneOf:
|
|
349
|
-
oneOfType:
|
|
348
|
+
oneOf: Y,
|
|
349
|
+
oneOfType: H,
|
|
350
350
|
shape: ne,
|
|
351
|
-
exact:
|
|
351
|
+
exact: Z
|
|
352
352
|
};
|
|
353
|
-
function E(c,
|
|
354
|
-
return c ===
|
|
353
|
+
function E(c, y) {
|
|
354
|
+
return c === y ? c !== 0 || 1 / c === 1 / y : c !== c && y !== y;
|
|
355
355
|
}
|
|
356
|
-
function b(c,
|
|
357
|
-
this.message = c, this.data =
|
|
356
|
+
function b(c, y) {
|
|
357
|
+
this.message = c, this.data = y && typeof y == "object" ? y : {}, this.stack = "";
|
|
358
358
|
}
|
|
359
359
|
b.prototype = Error.prototype;
|
|
360
360
|
function w(c) {
|
|
361
361
|
if (process.env.NODE_ENV !== "production")
|
|
362
|
-
var
|
|
363
|
-
function S(
|
|
364
|
-
if (I = I || p, C = C ||
|
|
365
|
-
if (
|
|
366
|
-
var
|
|
362
|
+
var y = {}, P = 0;
|
|
363
|
+
function S(A, _, R, I, M, C, L) {
|
|
364
|
+
if (I = I || p, C = C || R, L !== t) {
|
|
365
|
+
if (m) {
|
|
366
|
+
var l = new Error(
|
|
367
367
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
368
368
|
);
|
|
369
|
-
throw
|
|
369
|
+
throw l.name = "Invariant Violation", l;
|
|
370
370
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
371
|
-
var
|
|
372
|
-
!
|
|
371
|
+
var U = I + ":" + R;
|
|
372
|
+
!y[U] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
373
373
|
P < 3 && (a(
|
|
374
374
|
"You are manually calling a React.PropTypes validation function for the `" + C + "` prop on `" + I + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
375
|
-
),
|
|
375
|
+
), y[U] = !0, P++);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
return _[
|
|
378
|
+
return _[R] == null ? A ? _[R] === null ? new b("The " + M + " `" + C + "` is marked as required " + ("in `" + I + "`, but its value is `null`.")) : new b("The " + M + " `" + C + "` is marked as required in " + ("`" + I + "`, but its value is `undefined`.")) : null : c(_, R, I, M, C);
|
|
379
379
|
}
|
|
380
|
-
var
|
|
381
|
-
return
|
|
380
|
+
var x = S.bind(null, !1);
|
|
381
|
+
return x.isRequired = S.bind(null, !0), x;
|
|
382
382
|
}
|
|
383
383
|
function $(c) {
|
|
384
|
-
function
|
|
385
|
-
var I = P[S], M =
|
|
384
|
+
function y(P, S, x, A, _, R) {
|
|
385
|
+
var I = P[S], M = B(I);
|
|
386
386
|
if (M !== c) {
|
|
387
|
-
var C =
|
|
387
|
+
var C = K(I);
|
|
388
388
|
return new b(
|
|
389
|
-
"Invalid " +
|
|
389
|
+
"Invalid " + A + " `" + _ + "` of type " + ("`" + C + "` supplied to `" + x + "`, expected ") + ("`" + c + "`."),
|
|
390
390
|
{ expectedType: c }
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
393
|
return null;
|
|
394
394
|
}
|
|
395
|
-
return w(
|
|
395
|
+
return w(y);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function O() {
|
|
398
398
|
return w(i);
|
|
399
399
|
}
|
|
400
400
|
function T(c) {
|
|
401
|
-
function
|
|
401
|
+
function y(P, S, x, A, _) {
|
|
402
402
|
if (typeof c != "function")
|
|
403
|
-
return new b("Property `" + _ + "` of component `" +
|
|
404
|
-
var
|
|
405
|
-
if (!Array.isArray(
|
|
406
|
-
var I =
|
|
407
|
-
return new b("Invalid " +
|
|
403
|
+
return new b("Property `" + _ + "` of component `" + x + "` has invalid PropType notation inside arrayOf.");
|
|
404
|
+
var R = P[S];
|
|
405
|
+
if (!Array.isArray(R)) {
|
|
406
|
+
var I = B(R);
|
|
407
|
+
return new b("Invalid " + A + " `" + _ + "` of type " + ("`" + I + "` supplied to `" + x + "`, expected an array."));
|
|
408
408
|
}
|
|
409
|
-
for (var M = 0; M <
|
|
410
|
-
var C = c(
|
|
409
|
+
for (var M = 0; M < R.length; M++) {
|
|
410
|
+
var C = c(R, M, x, A, _ + "[" + M + "]", t);
|
|
411
411
|
if (C instanceof Error)
|
|
412
412
|
return C;
|
|
413
413
|
}
|
|
414
414
|
return null;
|
|
415
415
|
}
|
|
416
|
-
return w(
|
|
416
|
+
return w(y);
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
function c(
|
|
420
|
-
var _ =
|
|
418
|
+
function F() {
|
|
419
|
+
function c(y, P, S, x, A) {
|
|
420
|
+
var _ = y[P];
|
|
421
421
|
if (!u(_)) {
|
|
422
|
-
var
|
|
423
|
-
return new b("Invalid " +
|
|
422
|
+
var R = B(_);
|
|
423
|
+
return new b("Invalid " + x + " `" + A + "` of type " + ("`" + R + "` supplied to `" + S + "`, expected a single ReactElement."));
|
|
424
424
|
}
|
|
425
425
|
return null;
|
|
426
426
|
}
|
|
427
427
|
return w(c);
|
|
428
428
|
}
|
|
429
429
|
function s() {
|
|
430
|
-
function c(
|
|
431
|
-
var _ =
|
|
430
|
+
function c(y, P, S, x, A) {
|
|
431
|
+
var _ = y[P];
|
|
432
432
|
if (!e.isValidElementType(_)) {
|
|
433
|
-
var
|
|
434
|
-
return new b("Invalid " +
|
|
433
|
+
var R = B(_);
|
|
434
|
+
return new b("Invalid " + x + " `" + A + "` of type " + ("`" + R + "` supplied to `" + S + "`, expected a single ReactElement type."));
|
|
435
435
|
}
|
|
436
436
|
return null;
|
|
437
437
|
}
|
|
438
438
|
return w(c);
|
|
439
439
|
}
|
|
440
440
|
function k(c) {
|
|
441
|
-
function
|
|
441
|
+
function y(P, S, x, A, _) {
|
|
442
442
|
if (!(P[S] instanceof c)) {
|
|
443
|
-
var
|
|
444
|
-
return new b("Invalid " +
|
|
443
|
+
var R = c.name || p, I = ie(P[S]);
|
|
444
|
+
return new b("Invalid " + A + " `" + _ + "` of type " + ("`" + I + "` supplied to `" + x + "`, expected ") + ("instance of `" + R + "`."));
|
|
445
445
|
}
|
|
446
446
|
return null;
|
|
447
447
|
}
|
|
448
|
-
return w(
|
|
448
|
+
return w(y);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Y(c) {
|
|
451
451
|
if (!Array.isArray(c))
|
|
452
452
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
453
453
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
454
454
|
) : a("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
455
|
-
function
|
|
456
|
-
for (var
|
|
457
|
-
if (E(
|
|
455
|
+
function y(P, S, x, A, _) {
|
|
456
|
+
for (var R = P[S], I = 0; I < c.length; I++)
|
|
457
|
+
if (E(R, c[I]))
|
|
458
458
|
return null;
|
|
459
|
-
var M = JSON.stringify(c, function(L,
|
|
460
|
-
var
|
|
461
|
-
return
|
|
459
|
+
var M = JSON.stringify(c, function(L, l) {
|
|
460
|
+
var U = K(l);
|
|
461
|
+
return U === "symbol" ? String(l) : l;
|
|
462
462
|
});
|
|
463
|
-
return new b("Invalid " +
|
|
463
|
+
return new b("Invalid " + A + " `" + _ + "` of value `" + String(R) + "` " + ("supplied to `" + x + "`, expected one of " + M + "."));
|
|
464
464
|
}
|
|
465
|
-
return w(
|
|
465
|
+
return w(y);
|
|
466
466
|
}
|
|
467
467
|
function z(c) {
|
|
468
|
-
function
|
|
468
|
+
function y(P, S, x, A, _) {
|
|
469
469
|
if (typeof c != "function")
|
|
470
|
-
return new b("Property `" + _ + "` of component `" +
|
|
471
|
-
var
|
|
470
|
+
return new b("Property `" + _ + "` of component `" + x + "` has invalid PropType notation inside objectOf.");
|
|
471
|
+
var R = P[S], I = B(R);
|
|
472
472
|
if (I !== "object")
|
|
473
|
-
return new b("Invalid " +
|
|
474
|
-
for (var M in
|
|
475
|
-
if (n(
|
|
476
|
-
var C = c(
|
|
473
|
+
return new b("Invalid " + A + " `" + _ + "` of type " + ("`" + I + "` supplied to `" + x + "`, expected an object."));
|
|
474
|
+
for (var M in R)
|
|
475
|
+
if (n(R, M)) {
|
|
476
|
+
var C = c(R, M, x, A, _ + "." + M, t);
|
|
477
477
|
if (C instanceof Error)
|
|
478
478
|
return C;
|
|
479
479
|
}
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
|
-
return w(
|
|
482
|
+
return w(y);
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function H(c) {
|
|
485
485
|
if (!Array.isArray(c))
|
|
486
486
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), i;
|
|
487
|
-
for (var
|
|
488
|
-
var P = c[
|
|
487
|
+
for (var y = 0; y < c.length; y++) {
|
|
488
|
+
var P = c[y];
|
|
489
489
|
if (typeof P != "function")
|
|
490
490
|
return a(
|
|
491
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(P) + " at index " +
|
|
491
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(P) + " at index " + y + "."
|
|
492
492
|
), i;
|
|
493
493
|
}
|
|
494
|
-
function S(
|
|
494
|
+
function S(x, A, _, R, I) {
|
|
495
495
|
for (var M = [], C = 0; C < c.length; C++) {
|
|
496
|
-
var L = c[C],
|
|
497
|
-
if (
|
|
496
|
+
var L = c[C], l = L(x, A, _, R, I, t);
|
|
497
|
+
if (l == null)
|
|
498
498
|
return null;
|
|
499
|
-
|
|
499
|
+
l.data && n(l.data, "expectedType") && M.push(l.data.expectedType);
|
|
500
500
|
}
|
|
501
|
-
var
|
|
502
|
-
return new b("Invalid " +
|
|
501
|
+
var U = M.length > 0 ? ", expected one of type [" + M.join(", ") + "]" : "";
|
|
502
|
+
return new b("Invalid " + R + " `" + I + "` supplied to " + ("`" + _ + "`" + U + "."));
|
|
503
503
|
}
|
|
504
504
|
return w(S);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
function c(
|
|
508
|
-
return
|
|
506
|
+
function h() {
|
|
507
|
+
function c(y, P, S, x, A) {
|
|
508
|
+
return J(y[P]) ? null : new b("Invalid " + x + " `" + A + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
|
|
509
509
|
}
|
|
510
510
|
return w(c);
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function V(c, y, P, S, x) {
|
|
513
513
|
return new b(
|
|
514
|
-
(c || "React class") + ": " +
|
|
514
|
+
(c || "React class") + ": " + y + " type `" + P + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + x + "`."
|
|
515
515
|
);
|
|
516
516
|
}
|
|
517
517
|
function ne(c) {
|
|
518
|
-
function
|
|
519
|
-
var
|
|
518
|
+
function y(P, S, x, A, _) {
|
|
519
|
+
var R = P[S], I = B(R);
|
|
520
520
|
if (I !== "object")
|
|
521
|
-
return new b("Invalid " +
|
|
521
|
+
return new b("Invalid " + A + " `" + _ + "` of type `" + I + "` " + ("supplied to `" + x + "`, expected `object`."));
|
|
522
522
|
for (var M in c) {
|
|
523
523
|
var C = c[M];
|
|
524
524
|
if (typeof C != "function")
|
|
525
|
-
return
|
|
526
|
-
var L = C(
|
|
525
|
+
return V(x, A, _, M, K(C));
|
|
526
|
+
var L = C(R, M, x, A, _ + "." + M, t);
|
|
527
527
|
if (L)
|
|
528
528
|
return L;
|
|
529
529
|
}
|
|
530
530
|
return null;
|
|
531
531
|
}
|
|
532
|
-
return w(
|
|
532
|
+
return w(y);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
function
|
|
536
|
-
var
|
|
534
|
+
function Z(c) {
|
|
535
|
+
function y(P, S, x, A, _) {
|
|
536
|
+
var R = P[S], I = B(R);
|
|
537
537
|
if (I !== "object")
|
|
538
|
-
return new b("Invalid " +
|
|
538
|
+
return new b("Invalid " + A + " `" + _ + "` of type `" + I + "` " + ("supplied to `" + x + "`, expected `object`."));
|
|
539
539
|
var M = r({}, P[S], c);
|
|
540
540
|
for (var C in M) {
|
|
541
541
|
var L = c[C];
|
|
542
542
|
if (n(c, C) && typeof L != "function")
|
|
543
|
-
return
|
|
543
|
+
return V(x, A, _, C, K(L));
|
|
544
544
|
if (!L)
|
|
545
545
|
return new b(
|
|
546
|
-
"Invalid " +
|
|
546
|
+
"Invalid " + A + " `" + _ + "` key `" + C + "` supplied to `" + x + "`.\nBad object: " + JSON.stringify(P[S], null, " ") + `
|
|
547
547
|
Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
548
548
|
);
|
|
549
|
-
var
|
|
550
|
-
if (
|
|
551
|
-
return
|
|
549
|
+
var l = L(R, C, x, A, _ + "." + C, t);
|
|
550
|
+
if (l)
|
|
551
|
+
return l;
|
|
552
552
|
}
|
|
553
553
|
return null;
|
|
554
554
|
}
|
|
555
|
-
return w(
|
|
555
|
+
return w(y);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function J(c) {
|
|
558
558
|
switch (typeof c) {
|
|
559
559
|
case "number":
|
|
560
560
|
case "string":
|
|
@@ -564,20 +564,20 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
564
564
|
return !c;
|
|
565
565
|
case "object":
|
|
566
566
|
if (Array.isArray(c))
|
|
567
|
-
return c.every(
|
|
567
|
+
return c.every(J);
|
|
568
568
|
if (c === null || u(c))
|
|
569
569
|
return !0;
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
var P =
|
|
573
|
-
if (
|
|
570
|
+
var y = d(c);
|
|
571
|
+
if (y) {
|
|
572
|
+
var P = y.call(c), S;
|
|
573
|
+
if (y !== c.entries) {
|
|
574
574
|
for (; !(S = P.next()).done; )
|
|
575
|
-
if (!
|
|
575
|
+
if (!J(S.value))
|
|
576
576
|
return !1;
|
|
577
577
|
} else
|
|
578
578
|
for (; !(S = P.next()).done; ) {
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
579
|
+
var x = S.value;
|
|
580
|
+
if (x && !J(x[1]))
|
|
581
581
|
return !1;
|
|
582
582
|
}
|
|
583
583
|
} else
|
|
@@ -587,57 +587,57 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
587
587
|
return !1;
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
function oe(c,
|
|
591
|
-
return c === "symbol" ? !0 :
|
|
590
|
+
function oe(c, y) {
|
|
591
|
+
return c === "symbol" ? !0 : y ? y["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && y instanceof Symbol : !1;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
var
|
|
595
|
-
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" : oe(
|
|
593
|
+
function B(c) {
|
|
594
|
+
var y = typeof c;
|
|
595
|
+
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" : oe(y, c) ? "symbol" : y;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function K(c) {
|
|
598
598
|
if (typeof c > "u" || c === null)
|
|
599
599
|
return "" + c;
|
|
600
|
-
var
|
|
601
|
-
if (
|
|
600
|
+
var y = B(c);
|
|
601
|
+
if (y === "object") {
|
|
602
602
|
if (c instanceof Date)
|
|
603
603
|
return "date";
|
|
604
604
|
if (c instanceof RegExp)
|
|
605
605
|
return "regexp";
|
|
606
606
|
}
|
|
607
|
-
return
|
|
607
|
+
return y;
|
|
608
608
|
}
|
|
609
609
|
function ae(c) {
|
|
610
|
-
var
|
|
611
|
-
switch (
|
|
610
|
+
var y = K(c);
|
|
611
|
+
switch (y) {
|
|
612
612
|
case "array":
|
|
613
613
|
case "object":
|
|
614
|
-
return "an " +
|
|
614
|
+
return "an " + y;
|
|
615
615
|
case "boolean":
|
|
616
616
|
case "date":
|
|
617
617
|
case "regexp":
|
|
618
|
-
return "a " +
|
|
618
|
+
return "a " + y;
|
|
619
619
|
default:
|
|
620
|
-
return
|
|
620
|
+
return y;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
function ie(c) {
|
|
624
624
|
return !c.constructor || !c.constructor.name ? p : c.constructor.name;
|
|
625
625
|
}
|
|
626
626
|
return g.checkPropTypes = o, g.resetWarningCache = o.resetWarningCache, g.PropTypes = g, g;
|
|
627
|
-
},
|
|
627
|
+
}, Ce;
|
|
628
628
|
}
|
|
629
|
-
var
|
|
630
|
-
function
|
|
631
|
-
if (
|
|
632
|
-
|
|
633
|
-
var e = ze();
|
|
629
|
+
var $e, mr;
|
|
630
|
+
function $t() {
|
|
631
|
+
if (mr) return $e;
|
|
632
|
+
mr = 1;
|
|
633
|
+
var e = /* @__PURE__ */ ze();
|
|
634
634
|
function r() {
|
|
635
635
|
}
|
|
636
636
|
function t() {
|
|
637
637
|
}
|
|
638
|
-
return t.resetWarningCache = r,
|
|
639
|
-
function n(i, u,
|
|
640
|
-
if (
|
|
638
|
+
return t.resetWarningCache = r, $e = function() {
|
|
639
|
+
function n(i, u, m, f, v, d) {
|
|
640
|
+
if (d !== e) {
|
|
641
641
|
var p = new Error(
|
|
642
642
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
643
643
|
);
|
|
@@ -672,17 +672,22 @@ function Ct() {
|
|
|
672
672
|
resetWarningCache: r
|
|
673
673
|
};
|
|
674
674
|
return a.PropTypes = a, a;
|
|
675
|
-
},
|
|
675
|
+
}, $e;
|
|
676
|
+
}
|
|
677
|
+
var br;
|
|
678
|
+
function Mt() {
|
|
679
|
+
if (br) return xe.exports;
|
|
680
|
+
if (br = 1, process.env.NODE_ENV !== "production") {
|
|
681
|
+
var e = Fr(), r = !0;
|
|
682
|
+
xe.exports = /* @__PURE__ */ Ct()(e.isElement, r);
|
|
683
|
+
} else
|
|
684
|
+
xe.exports = /* @__PURE__ */ $t()();
|
|
685
|
+
return xe.exports;
|
|
676
686
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
ke.exports = Ct()();
|
|
682
|
-
var j = ke.exports;
|
|
683
|
-
const Rr = /* @__PURE__ */ Pt(j);
|
|
684
|
-
var Le = "data-focus-lock", Ir = "data-focus-lock-disabled", Nt = "data-no-focus-lock", Dt = "data-autofocus-inside", jt = "data-no-autofocus";
|
|
685
|
-
function $e(e, r) {
|
|
687
|
+
var j = /* @__PURE__ */ Mt();
|
|
688
|
+
const Ir = /* @__PURE__ */ _t(j);
|
|
689
|
+
var Le = "data-focus-lock", Cr = "data-focus-lock-disabled", Nt = "data-no-focus-lock", Dt = "data-autofocus-inside", jt = "data-no-autofocus";
|
|
690
|
+
function Me(e, r) {
|
|
686
691
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
687
692
|
}
|
|
688
693
|
function kt(e, r) {
|
|
@@ -706,27 +711,27 @@ function kt(e, r) {
|
|
|
706
711
|
})[0];
|
|
707
712
|
return t.callback = r, t.facade;
|
|
708
713
|
}
|
|
709
|
-
var Lt = typeof window < "u" ? ir.useLayoutEffect : ir.useEffect,
|
|
714
|
+
var Lt = typeof window < "u" ? ir.useLayoutEffect : ir.useEffect, hr = /* @__PURE__ */ new WeakMap();
|
|
710
715
|
function Wt(e, r) {
|
|
711
716
|
var t = kt(null, function(n) {
|
|
712
717
|
return e.forEach(function(o) {
|
|
713
|
-
return
|
|
718
|
+
return Me(o, n);
|
|
714
719
|
});
|
|
715
720
|
});
|
|
716
721
|
return Lt(function() {
|
|
717
|
-
var n =
|
|
722
|
+
var n = hr.get(t);
|
|
718
723
|
if (n) {
|
|
719
724
|
var o = new Set(n), a = new Set(e), i = t.current;
|
|
720
725
|
o.forEach(function(u) {
|
|
721
|
-
a.has(u) ||
|
|
726
|
+
a.has(u) || Me(u, null);
|
|
722
727
|
}), a.forEach(function(u) {
|
|
723
|
-
o.has(u) ||
|
|
728
|
+
o.has(u) || Me(u, i);
|
|
724
729
|
});
|
|
725
730
|
}
|
|
726
|
-
|
|
731
|
+
hr.set(t, e);
|
|
727
732
|
}, [e]), t;
|
|
728
733
|
}
|
|
729
|
-
var
|
|
734
|
+
var Ne = {
|
|
730
735
|
width: "1px",
|
|
731
736
|
height: "0px",
|
|
732
737
|
padding: 0,
|
|
@@ -735,7 +740,7 @@ var Me = {
|
|
|
735
740
|
top: "1px",
|
|
736
741
|
left: "1px"
|
|
737
742
|
};
|
|
738
|
-
process.env.NODE_ENV !== "production" &&
|
|
743
|
+
process.env.NODE_ENV !== "production" && Ir.node;
|
|
739
744
|
var We = function() {
|
|
740
745
|
return We = Object.assign || function(r) {
|
|
741
746
|
for (var t, n = 1, o = arguments.length; n < o; n++) {
|
|
@@ -745,11 +750,11 @@ var We = function() {
|
|
|
745
750
|
return r;
|
|
746
751
|
}, We.apply(this, arguments);
|
|
747
752
|
};
|
|
748
|
-
function
|
|
753
|
+
function $r(e) {
|
|
749
754
|
return e;
|
|
750
755
|
}
|
|
751
|
-
function
|
|
752
|
-
r === void 0 && (r =
|
|
756
|
+
function Mr(e, r) {
|
|
757
|
+
r === void 0 && (r = $r);
|
|
753
758
|
var t = [], n = !1, o = {
|
|
754
759
|
read: function() {
|
|
755
760
|
if (n)
|
|
@@ -785,11 +790,11 @@ function $r(e, r) {
|
|
|
785
790
|
var u = t;
|
|
786
791
|
t = [], u.forEach(a), i = t;
|
|
787
792
|
}
|
|
788
|
-
var
|
|
793
|
+
var m = function() {
|
|
789
794
|
var v = i;
|
|
790
795
|
i = [], v.forEach(a);
|
|
791
796
|
}, f = function() {
|
|
792
|
-
return Promise.resolve().then(
|
|
797
|
+
return Promise.resolve().then(m);
|
|
793
798
|
};
|
|
794
799
|
f(), t = {
|
|
795
800
|
push: function(v) {
|
|
@@ -803,105 +808,105 @@ function $r(e, r) {
|
|
|
803
808
|
};
|
|
804
809
|
return o;
|
|
805
810
|
}
|
|
806
|
-
function
|
|
807
|
-
return r === void 0 && (r =
|
|
811
|
+
function Ve(e, r) {
|
|
812
|
+
return r === void 0 && (r = $r), Mr(e, r);
|
|
808
813
|
}
|
|
809
814
|
function qt(e) {
|
|
810
815
|
e === void 0 && (e = {});
|
|
811
|
-
var r =
|
|
816
|
+
var r = Mr(null);
|
|
812
817
|
return r.options = We({ async: !0, ssr: !1 }, e), r;
|
|
813
818
|
}
|
|
814
|
-
var
|
|
819
|
+
var Nr = Ve({}, function(e) {
|
|
815
820
|
var r = e.target, t = e.currentTarget;
|
|
816
821
|
return {
|
|
817
822
|
target: r,
|
|
818
823
|
currentTarget: t
|
|
819
824
|
};
|
|
820
|
-
}),
|
|
825
|
+
}), Dr = Ve(), Bt = Ve(), Ut = qt({
|
|
821
826
|
async: !0,
|
|
822
827
|
ssr: typeof document < "u"
|
|
823
|
-
}), Yt = /* @__PURE__ */
|
|
824
|
-
var n, o = fe(), a = o[0], i = o[1], u =
|
|
825
|
-
var ce =
|
|
828
|
+
}), Yt = /* @__PURE__ */ _r(void 0), zt = [], Ge = /* @__PURE__ */ Rr(function(r, t) {
|
|
829
|
+
var n, o = fe(), a = o[0], i = o[1], u = we(), m = we(!1), f = we(null), v = fe({}), d = v[1], p = r.children, g = r.disabled, E = g === void 0 ? !1 : g, b = r.noFocusGuards, w = b === void 0 ? !1 : b, $ = r.persistentFocus, O = $ === void 0 ? !1 : $, T = r.crossFrame, F = T === void 0 ? !0 : T, s = r.autoFocus, k = s === void 0 ? !0 : s, Y = r.allowTextSelection, z = r.group, H = r.className, h = r.whiteList, V = r.hasPositiveIndices, ne = r.shards, Z = ne === void 0 ? zt : ne, J = r.as, oe = J === void 0 ? "div" : J, B = r.lockProps, K = B === void 0 ? {} : B, ae = r.sideCar, ie = r.returnFocus, c = ie === void 0 ? !1 : ie, y = r.focusOptions, P = r.onActivation, S = r.onDeactivation, x = fe({}), A = x[0], _ = pe(function(Q) {
|
|
830
|
+
var ce = Q.captureFocusRestore;
|
|
826
831
|
if (!f.current) {
|
|
827
|
-
var se,
|
|
828
|
-
f.current =
|
|
832
|
+
var se, ee = (se = document) == null ? void 0 : se.activeElement;
|
|
833
|
+
f.current = ee, ee !== document.body && (f.current = ce(ee));
|
|
829
834
|
}
|
|
830
|
-
u.current && P && P(u.current),
|
|
831
|
-
}, [P]),
|
|
832
|
-
|
|
833
|
-
}, [S]), I = pe(function(
|
|
835
|
+
u.current && P && P(u.current), m.current = !0, d();
|
|
836
|
+
}, [P]), R = pe(function() {
|
|
837
|
+
m.current = !1, S && S(u.current), d();
|
|
838
|
+
}, [S]), I = pe(function(Q) {
|
|
834
839
|
var ce = f.current;
|
|
835
840
|
if (ce) {
|
|
836
|
-
var se = (typeof ce == "function" ? ce() : ce) || document.body,
|
|
837
|
-
if (
|
|
838
|
-
var ar = typeof
|
|
839
|
-
f.current = null,
|
|
841
|
+
var se = (typeof ce == "function" ? ce() : ce) || document.body, ee = typeof c == "function" ? c(se) : c;
|
|
842
|
+
if (ee) {
|
|
843
|
+
var ar = typeof ee == "object" ? ee : void 0;
|
|
844
|
+
f.current = null, Q ? Promise.resolve().then(function() {
|
|
840
845
|
return se.focus(ar);
|
|
841
846
|
}) : se.focus(ar);
|
|
842
847
|
}
|
|
843
848
|
}
|
|
844
|
-
}, [c]), M = pe(function(
|
|
845
|
-
|
|
846
|
-
}, []), C =
|
|
847
|
-
u.current !==
|
|
849
|
+
}, [c]), M = pe(function(Q) {
|
|
850
|
+
m.current && Nr.useMedium(Q);
|
|
851
|
+
}, []), C = Dr.useMedium, L = pe(function(Q) {
|
|
852
|
+
u.current !== Q && (u.current = Q, i(Q));
|
|
848
853
|
}, []);
|
|
849
|
-
process.env.NODE_ENV !== "production" && (typeof
|
|
854
|
+
process.env.NODE_ENV !== "production" && (typeof Y < "u" && console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"), Se(function() {
|
|
850
855
|
!u.current && typeof oe != "string" && console.error("FocusLock: could not obtain ref to internal node");
|
|
851
856
|
}, []));
|
|
852
|
-
var
|
|
857
|
+
var l = me((n = {}, n[Cr] = E && "disabled", n[Le] = z, n), K), U = w !== !0, ue = U && w !== "tail", Te = Wt([t, L]), bt = Et(function() {
|
|
853
858
|
return {
|
|
854
859
|
observed: u,
|
|
855
|
-
shards:
|
|
860
|
+
shards: Z,
|
|
856
861
|
enabled: !E,
|
|
857
862
|
get active() {
|
|
858
|
-
return
|
|
863
|
+
return m.current;
|
|
859
864
|
}
|
|
860
865
|
};
|
|
861
|
-
}, [E,
|
|
862
|
-
return /* @__PURE__ */
|
|
863
|
-
/* @__PURE__ */
|
|
866
|
+
}, [E, m, Z, u]);
|
|
867
|
+
return /* @__PURE__ */ X.createElement(Tt, null, U && [
|
|
868
|
+
/* @__PURE__ */ X.createElement("div", {
|
|
864
869
|
key: "guard-first",
|
|
865
870
|
"data-focus-guard": !0,
|
|
866
871
|
tabIndex: E ? -1 : 0,
|
|
867
|
-
style:
|
|
872
|
+
style: Ne
|
|
868
873
|
}),
|
|
869
|
-
|
|
874
|
+
V ? /* @__PURE__ */ X.createElement("div", {
|
|
870
875
|
key: "guard-nearest",
|
|
871
876
|
"data-focus-guard": !0,
|
|
872
877
|
tabIndex: E ? -1 : 1,
|
|
873
|
-
style:
|
|
878
|
+
style: Ne
|
|
874
879
|
}) : null
|
|
875
|
-
], !E && /* @__PURE__ */
|
|
876
|
-
id:
|
|
880
|
+
], !E && /* @__PURE__ */ X.createElement(ae, {
|
|
881
|
+
id: A,
|
|
877
882
|
sideCar: Ut,
|
|
878
883
|
observed: a,
|
|
879
884
|
disabled: E,
|
|
880
|
-
persistentFocus:
|
|
881
|
-
crossFrame:
|
|
885
|
+
persistentFocus: O,
|
|
886
|
+
crossFrame: F,
|
|
882
887
|
autoFocus: k,
|
|
883
|
-
whiteList:
|
|
884
|
-
shards:
|
|
888
|
+
whiteList: h,
|
|
889
|
+
shards: Z,
|
|
885
890
|
onActivation: _,
|
|
886
|
-
onDeactivation:
|
|
891
|
+
onDeactivation: R,
|
|
887
892
|
returnFocus: I,
|
|
888
|
-
focusOptions:
|
|
893
|
+
focusOptions: y,
|
|
889
894
|
noFocusGuards: w
|
|
890
|
-
}), /* @__PURE__ */
|
|
895
|
+
}), /* @__PURE__ */ X.createElement(oe, me({
|
|
891
896
|
ref: Te
|
|
892
|
-
},
|
|
893
|
-
className:
|
|
897
|
+
}, l, {
|
|
898
|
+
className: H,
|
|
894
899
|
onBlur: C,
|
|
895
900
|
onFocus: M
|
|
896
|
-
}), /* @__PURE__ */
|
|
897
|
-
value:
|
|
898
|
-
}, p)), ue && /* @__PURE__ */
|
|
901
|
+
}), /* @__PURE__ */ X.createElement(Yt.Provider, {
|
|
902
|
+
value: bt
|
|
903
|
+
}, p)), ue && /* @__PURE__ */ X.createElement("div", {
|
|
899
904
|
"data-focus-guard": !0,
|
|
900
905
|
tabIndex: E ? -1 : 0,
|
|
901
|
-
style:
|
|
906
|
+
style: Ne
|
|
902
907
|
}));
|
|
903
908
|
});
|
|
904
|
-
|
|
909
|
+
Ge.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
905
910
|
children: j.node,
|
|
906
911
|
disabled: j.bool,
|
|
907
912
|
returnFocus: j.oneOfType([j.bool, j.object, j.func]),
|
|
@@ -927,7 +932,7 @@ function qe(e, r) {
|
|
|
927
932
|
return t.__proto__ = n, t;
|
|
928
933
|
}, qe(e, r);
|
|
929
934
|
}
|
|
930
|
-
function
|
|
935
|
+
function Vt(e, r) {
|
|
931
936
|
e.prototype = Object.create(r.prototype), e.prototype.constructor = e, qe(e, r);
|
|
932
937
|
}
|
|
933
938
|
function be(e) {
|
|
@@ -938,7 +943,7 @@ function be(e) {
|
|
|
938
943
|
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
939
944
|
}, be(e);
|
|
940
945
|
}
|
|
941
|
-
function
|
|
946
|
+
function Gt(e, r) {
|
|
942
947
|
if (be(e) != "object" || !e) return e;
|
|
943
948
|
var t = e[Symbol.toPrimitive];
|
|
944
949
|
if (t !== void 0) {
|
|
@@ -948,12 +953,12 @@ function Ht(e, r) {
|
|
|
948
953
|
}
|
|
949
954
|
return (r === "string" ? String : Number)(e);
|
|
950
955
|
}
|
|
951
|
-
function
|
|
952
|
-
var r =
|
|
956
|
+
function Ht(e) {
|
|
957
|
+
var r = Gt(e, "string");
|
|
953
958
|
return be(r) == "symbol" ? r : r + "";
|
|
954
959
|
}
|
|
955
960
|
function Jt(e, r, t) {
|
|
956
|
-
return (r =
|
|
961
|
+
return (r = Ht(r)) in e ? Object.defineProperty(e, r, {
|
|
957
962
|
value: t,
|
|
958
963
|
enumerable: !0,
|
|
959
964
|
configurable: !0,
|
|
@@ -979,85 +984,85 @@ function Kt(e, r) {
|
|
|
979
984
|
return f.props;
|
|
980
985
|
})), r(i);
|
|
981
986
|
}
|
|
982
|
-
var
|
|
983
|
-
|
|
987
|
+
var m = /* @__PURE__ */ (function(f) {
|
|
988
|
+
Vt(v, f);
|
|
984
989
|
function v() {
|
|
985
990
|
return f.apply(this, arguments) || this;
|
|
986
991
|
}
|
|
987
992
|
v.peek = function() {
|
|
988
993
|
return i;
|
|
989
994
|
};
|
|
990
|
-
var
|
|
991
|
-
return
|
|
995
|
+
var d = v.prototype;
|
|
996
|
+
return d.componentDidMount = function() {
|
|
992
997
|
a.push(this), u();
|
|
993
|
-
},
|
|
998
|
+
}, d.componentDidUpdate = function() {
|
|
994
999
|
u();
|
|
995
|
-
},
|
|
1000
|
+
}, d.componentWillUnmount = function() {
|
|
996
1001
|
var g = a.indexOf(this);
|
|
997
1002
|
a.splice(g, 1), u();
|
|
998
|
-
},
|
|
999
|
-
return /* @__PURE__ */
|
|
1003
|
+
}, d.render = function() {
|
|
1004
|
+
return /* @__PURE__ */ X.createElement(o, this.props);
|
|
1000
1005
|
}, v;
|
|
1001
|
-
}(
|
|
1002
|
-
return Jt(
|
|
1006
|
+
})(xt);
|
|
1007
|
+
return Jt(m, "displayName", "SideEffect(" + t(o) + ")"), m;
|
|
1003
1008
|
};
|
|
1004
1009
|
}
|
|
1005
1010
|
var G = function(e) {
|
|
1006
1011
|
for (var r = Array(e.length), t = 0; t < e.length; ++t)
|
|
1007
1012
|
r[t] = e[t];
|
|
1008
1013
|
return r;
|
|
1009
|
-
},
|
|
1014
|
+
}, te = function(e) {
|
|
1010
1015
|
return Array.isArray(e) ? e : [e];
|
|
1011
|
-
},
|
|
1016
|
+
}, jr = function(e) {
|
|
1012
1017
|
return Array.isArray(e) ? e[0] : e;
|
|
1013
1018
|
}, Qt = function(e) {
|
|
1014
1019
|
if (e.nodeType !== Node.ELEMENT_NODE)
|
|
1015
1020
|
return !1;
|
|
1016
1021
|
var r = window.getComputedStyle(e, null);
|
|
1017
1022
|
return !r || !r.getPropertyValue ? !1 : r.getPropertyValue("display") === "none" || r.getPropertyValue("visibility") === "hidden";
|
|
1018
|
-
},
|
|
1023
|
+
}, kr = function(e) {
|
|
1019
1024
|
return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
|
|
1020
1025
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1021
1026
|
e.parentNode.host
|
|
1022
1027
|
) : e.parentNode;
|
|
1023
|
-
},
|
|
1028
|
+
}, Lr = function(e) {
|
|
1024
1029
|
return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
|
|
1025
1030
|
}, Xt = function(e) {
|
|
1026
1031
|
return e.hasAttribute("inert");
|
|
1027
1032
|
}, Zt = function(e, r) {
|
|
1028
|
-
return !e ||
|
|
1029
|
-
},
|
|
1033
|
+
return !e || Lr(e) || !Qt(e) && !Xt(e) && r(kr(e));
|
|
1034
|
+
}, Wr = function(e, r) {
|
|
1030
1035
|
var t = e.get(r);
|
|
1031
1036
|
if (t !== void 0)
|
|
1032
1037
|
return t;
|
|
1033
|
-
var n = Zt(r,
|
|
1038
|
+
var n = Zt(r, Wr.bind(void 0, e));
|
|
1034
1039
|
return e.set(r, n), n;
|
|
1035
1040
|
}, en = function(e, r) {
|
|
1036
|
-
return e && !
|
|
1037
|
-
},
|
|
1041
|
+
return e && !Lr(e) ? nn(e) ? r(kr(e)) : !1 : !0;
|
|
1042
|
+
}, qr = function(e, r) {
|
|
1038
1043
|
var t = e.get(r);
|
|
1039
1044
|
if (t !== void 0)
|
|
1040
1045
|
return t;
|
|
1041
|
-
var n = en(r,
|
|
1046
|
+
var n = en(r, qr.bind(void 0, e));
|
|
1042
1047
|
return e.set(r, n), n;
|
|
1043
|
-
},
|
|
1048
|
+
}, Br = function(e) {
|
|
1044
1049
|
return e.dataset;
|
|
1045
1050
|
}, rn = function(e) {
|
|
1046
1051
|
return e.tagName === "BUTTON";
|
|
1047
|
-
}, Br = function(e) {
|
|
1048
|
-
return e.tagName === "INPUT";
|
|
1049
1052
|
}, Ur = function(e) {
|
|
1050
|
-
return
|
|
1053
|
+
return e.tagName === "INPUT";
|
|
1054
|
+
}, Yr = function(e) {
|
|
1055
|
+
return Ur(e) && e.type === "radio";
|
|
1051
1056
|
}, tn = function(e) {
|
|
1052
|
-
return !((
|
|
1057
|
+
return !((Ur(e) || rn(e)) && (e.type === "hidden" || e.disabled));
|
|
1053
1058
|
}, nn = function(e) {
|
|
1054
1059
|
var r = e.getAttribute(jt);
|
|
1055
1060
|
return ![!0, "true", ""].includes(r);
|
|
1056
|
-
},
|
|
1061
|
+
}, He = function(e) {
|
|
1057
1062
|
var r;
|
|
1058
|
-
return !!(e && (!((r =
|
|
1063
|
+
return !!(e && (!((r = Br(e)) === null || r === void 0) && r.focusGuard));
|
|
1059
1064
|
}, Be = function(e) {
|
|
1060
|
-
return !
|
|
1065
|
+
return !He(e);
|
|
1061
1066
|
}, on = function(e) {
|
|
1062
1067
|
return !!e;
|
|
1063
1068
|
}, an = function(e, r) {
|
|
@@ -1100,16 +1105,16 @@ var G = function(e) {
|
|
|
1100
1105
|
"[tabindex]",
|
|
1101
1106
|
"[contenteditable]",
|
|
1102
1107
|
"[autofocus]"
|
|
1103
|
-
], Ke = cn.join(","), sn = "".concat(Ke, ", [data-focus-guard]"),
|
|
1108
|
+
], Ke = cn.join(","), sn = "".concat(Ke, ", [data-focus-guard]"), zr = function(e, r) {
|
|
1104
1109
|
return G((e.shadowRoot || e).children).reduce(function(t, n) {
|
|
1105
|
-
return t.concat(n.matches(r ? sn : Ke) ? [n] : [],
|
|
1110
|
+
return t.concat(n.matches(r ? sn : Ke) ? [n] : [], zr(n));
|
|
1106
1111
|
}, []);
|
|
1107
1112
|
}, fn = function(e, r) {
|
|
1108
1113
|
var t;
|
|
1109
1114
|
return e instanceof HTMLIFrameElement && (!((t = e.contentDocument) === null || t === void 0) && t.body) ? ve([e.contentDocument.body], r) : [e];
|
|
1110
1115
|
}, ve = function(e, r) {
|
|
1111
1116
|
return e.reduce(function(t, n) {
|
|
1112
|
-
var o, a =
|
|
1117
|
+
var o, a = zr(n, r), i = (o = []).concat.apply(o, a.map(function(u) {
|
|
1113
1118
|
return fn(u, r);
|
|
1114
1119
|
}));
|
|
1115
1120
|
return t.concat(
|
|
@@ -1130,13 +1135,13 @@ var G = function(e) {
|
|
|
1130
1135
|
}, []);
|
|
1131
1136
|
}, Qe = function(e, r) {
|
|
1132
1137
|
return G(e).filter(function(t) {
|
|
1133
|
-
return
|
|
1138
|
+
return Wr(r, t);
|
|
1134
1139
|
}).filter(function(t) {
|
|
1135
1140
|
return tn(t);
|
|
1136
1141
|
});
|
|
1137
|
-
},
|
|
1142
|
+
}, gr = function(e, r) {
|
|
1138
1143
|
return r === void 0 && (r = /* @__PURE__ */ new Map()), G(e).filter(function(t) {
|
|
1139
|
-
return
|
|
1144
|
+
return qr(r, t);
|
|
1140
1145
|
});
|
|
1141
1146
|
}, Xe = function(e, r, t) {
|
|
1142
1147
|
return Je(Qe(ve(e, t), r), !0, t);
|
|
@@ -1144,14 +1149,14 @@ var G = function(e) {
|
|
|
1144
1149
|
return Je(Qe(ve(e), r), !1);
|
|
1145
1150
|
}, ln = function(e, r) {
|
|
1146
1151
|
return Qe(dn(e), r);
|
|
1147
|
-
},
|
|
1148
|
-
return e.shadowRoot ?
|
|
1152
|
+
}, re = function(e, r) {
|
|
1153
|
+
return e.shadowRoot ? re(e.shadowRoot, r) : Object.getPrototypeOf(e).contains !== void 0 && Object.getPrototypeOf(e).contains.call(e, r) ? !0 : G(e.children).some(function(t) {
|
|
1149
1154
|
var n;
|
|
1150
1155
|
if (t instanceof HTMLIFrameElement) {
|
|
1151
1156
|
var o = (n = t.contentDocument) === null || n === void 0 ? void 0 : n.body;
|
|
1152
|
-
return o ?
|
|
1157
|
+
return o ? re(o, r) : !1;
|
|
1153
1158
|
}
|
|
1154
|
-
return
|
|
1159
|
+
return re(t, r);
|
|
1155
1160
|
});
|
|
1156
1161
|
}, vn = function(e) {
|
|
1157
1162
|
for (var r = /* @__PURE__ */ new Set(), t = e.length, n = 0; n < t; n += 1)
|
|
@@ -1162,13 +1167,13 @@ var G = function(e) {
|
|
|
1162
1167
|
return e.filter(function(i, u) {
|
|
1163
1168
|
return !r.has(u);
|
|
1164
1169
|
});
|
|
1165
|
-
},
|
|
1166
|
-
return e.parentNode ?
|
|
1170
|
+
}, Vr = function(e) {
|
|
1171
|
+
return e.parentNode ? Vr(e.parentNode) : e;
|
|
1167
1172
|
}, Ze = function(e) {
|
|
1168
|
-
var r =
|
|
1173
|
+
var r = te(e);
|
|
1169
1174
|
return r.filter(Boolean).reduce(function(t, n) {
|
|
1170
1175
|
var o = n.getAttribute(Le);
|
|
1171
|
-
return t.push.apply(t, o ? vn(G(
|
|
1176
|
+
return t.push.apply(t, o ? vn(G(Vr(n).querySelectorAll("[".concat(Le, '="').concat(o, '"]:not([').concat(Cr, '="disabled"])')))) : [n]), t;
|
|
1172
1177
|
}, []);
|
|
1173
1178
|
}, pn = function(e) {
|
|
1174
1179
|
try {
|
|
@@ -1183,30 +1188,30 @@ var G = function(e) {
|
|
|
1183
1188
|
return r.contentWindow.document;
|
|
1184
1189
|
}) ? ge(r.contentWindow.document) : r;
|
|
1185
1190
|
}
|
|
1186
|
-
}, mn = function(e, r) {
|
|
1187
|
-
return e === r;
|
|
1188
1191
|
}, yn = function(e, r) {
|
|
1192
|
+
return e === r;
|
|
1193
|
+
}, mn = function(e, r) {
|
|
1189
1194
|
return !!G(e.querySelectorAll("iframe")).some(function(t) {
|
|
1190
|
-
return
|
|
1195
|
+
return yn(t, r);
|
|
1191
1196
|
});
|
|
1192
1197
|
}, Gr = function(e, r) {
|
|
1193
|
-
return r === void 0 && (r = ge(
|
|
1194
|
-
return
|
|
1198
|
+
return r === void 0 && (r = ge(jr(e).ownerDocument)), !r || r.dataset && r.dataset.focusGuard ? !1 : Ze(e).some(function(t) {
|
|
1199
|
+
return re(t, r) || mn(t, r);
|
|
1195
1200
|
});
|
|
1196
1201
|
}, bn = function(e) {
|
|
1197
1202
|
e === void 0 && (e = document);
|
|
1198
1203
|
var r = ge(e);
|
|
1199
1204
|
return r ? G(e.querySelectorAll("[".concat(Nt, "]"))).some(function(t) {
|
|
1200
|
-
return
|
|
1205
|
+
return re(t, r);
|
|
1201
1206
|
}) : !1;
|
|
1202
1207
|
}, hn = function(e, r) {
|
|
1203
|
-
return r.filter(
|
|
1208
|
+
return r.filter(Yr).filter(function(t) {
|
|
1204
1209
|
return t.name === e.name;
|
|
1205
1210
|
}).filter(function(t) {
|
|
1206
1211
|
return t.checked;
|
|
1207
1212
|
})[0] || e;
|
|
1208
1213
|
}, er = function(e, r) {
|
|
1209
|
-
return
|
|
1214
|
+
return Yr(e) && e.name ? hn(e, r) : e;
|
|
1210
1215
|
}, gn = function(e) {
|
|
1211
1216
|
var r = /* @__PURE__ */ new Set();
|
|
1212
1217
|
return e.forEach(function(t) {
|
|
@@ -1214,46 +1219,46 @@ var G = function(e) {
|
|
|
1214
1219
|
}), e.filter(function(t) {
|
|
1215
1220
|
return r.has(t);
|
|
1216
1221
|
});
|
|
1217
|
-
},
|
|
1222
|
+
}, Er = function(e) {
|
|
1218
1223
|
return e[0] && e.length > 1 ? er(e[0], e) : e[0];
|
|
1219
|
-
},
|
|
1224
|
+
}, Tr = function(e, r) {
|
|
1220
1225
|
return e.indexOf(er(r, e));
|
|
1221
1226
|
}, Ue = "NEW_FOCUS", En = function(e, r, t, n, o) {
|
|
1222
|
-
var a = e.length, i = e[0], u = e[a - 1],
|
|
1227
|
+
var a = e.length, i = e[0], u = e[a - 1], m = He(n);
|
|
1223
1228
|
if (!(n && e.indexOf(n) >= 0)) {
|
|
1224
|
-
var f = n !== void 0 ? t.indexOf(n) : -1, v = o ? t.indexOf(o) : f,
|
|
1229
|
+
var f = n !== void 0 ? t.indexOf(n) : -1, v = o ? t.indexOf(o) : f, d = o ? e.indexOf(o) : -1;
|
|
1225
1230
|
if (f === -1)
|
|
1226
|
-
return
|
|
1227
|
-
if (
|
|
1231
|
+
return d !== -1 ? d : Ue;
|
|
1232
|
+
if (d === -1)
|
|
1228
1233
|
return Ue;
|
|
1229
|
-
var p = f - v, g = t.indexOf(i), E = t.indexOf(u), b = gn(t), w = n !== void 0 ? b.indexOf(n) : -1, $ = o ? b.indexOf(o) : w,
|
|
1234
|
+
var p = f - v, g = t.indexOf(i), E = t.indexOf(u), b = gn(t), w = n !== void 0 ? b.indexOf(n) : -1, $ = o ? b.indexOf(o) : w, O = b.filter(function(z) {
|
|
1230
1235
|
return z.tabIndex >= 0;
|
|
1231
|
-
}), T = n !== void 0 ?
|
|
1236
|
+
}), T = n !== void 0 ? O.indexOf(n) : -1, F = o ? O.indexOf(o) : T, s = T >= 0 && F >= 0 ? (
|
|
1232
1237
|
// old/new are tabbables, measure distance in tabbable space
|
|
1233
|
-
|
|
1238
|
+
F - T
|
|
1234
1239
|
) : (
|
|
1235
1240
|
// or else measure in focusable space
|
|
1236
1241
|
$ - w
|
|
1237
1242
|
);
|
|
1238
|
-
if (!p &&
|
|
1239
|
-
return
|
|
1240
|
-
var k =
|
|
1241
|
-
if (f <= g &&
|
|
1242
|
-
return
|
|
1243
|
-
if (f >= E &&
|
|
1243
|
+
if (!p && d >= 0 || r.length === 0)
|
|
1244
|
+
return d;
|
|
1245
|
+
var k = Tr(e, r[0]), Y = Tr(e, r[r.length - 1]);
|
|
1246
|
+
if (f <= g && m && Math.abs(p) > 1)
|
|
1247
|
+
return Y;
|
|
1248
|
+
if (f >= E && m && Math.abs(p) > 1)
|
|
1244
1249
|
return k;
|
|
1245
1250
|
if (p && Math.abs(s) > 1)
|
|
1246
|
-
return
|
|
1251
|
+
return d;
|
|
1247
1252
|
if (f <= g)
|
|
1248
|
-
return
|
|
1253
|
+
return Y;
|
|
1249
1254
|
if (f > E)
|
|
1250
1255
|
return k;
|
|
1251
1256
|
if (p)
|
|
1252
|
-
return Math.abs(p) > 1 ?
|
|
1257
|
+
return Math.abs(p) > 1 ? d : (a + d + p) % a;
|
|
1253
1258
|
}
|
|
1254
1259
|
}, Tn = function(e) {
|
|
1255
1260
|
return function(r) {
|
|
1256
|
-
var t, n = (t =
|
|
1261
|
+
var t, n = (t = Br(r)) === null || t === void 0 ? void 0 : t.autofocus;
|
|
1257
1262
|
return (
|
|
1258
1263
|
// @ts-expect-error
|
|
1259
1264
|
r.autofocus || //
|
|
@@ -1261,15 +1266,15 @@ var G = function(e) {
|
|
|
1261
1266
|
e.indexOf(r) >= 0
|
|
1262
1267
|
);
|
|
1263
1268
|
};
|
|
1264
|
-
},
|
|
1269
|
+
}, xr = function(e, r, t) {
|
|
1265
1270
|
var n = e.map(function(a) {
|
|
1266
1271
|
var i = a.node;
|
|
1267
1272
|
return i;
|
|
1268
|
-
}), o =
|
|
1269
|
-
return o && o.length ?
|
|
1273
|
+
}), o = gr(n.filter(Tn(t)));
|
|
1274
|
+
return o && o.length ? Er(o) : Er(gr(r));
|
|
1270
1275
|
}, Ye = function(e, r) {
|
|
1271
1276
|
return r === void 0 && (r = []), r.push(e), e.parentNode && Ye(e.parentNode.host || e.parentNode, r), r;
|
|
1272
|
-
},
|
|
1277
|
+
}, De = function(e, r) {
|
|
1273
1278
|
for (var t = Ye(e), n = Ye(r), o = 0; o < t.length; o += 1) {
|
|
1274
1279
|
var a = t[o];
|
|
1275
1280
|
if (n.indexOf(a) >= 0)
|
|
@@ -1277,14 +1282,14 @@ var G = function(e) {
|
|
|
1277
1282
|
}
|
|
1278
1283
|
return !1;
|
|
1279
1284
|
}, Hr = function(e, r, t) {
|
|
1280
|
-
var n =
|
|
1285
|
+
var n = te(e), o = te(r), a = n[0], i = !1;
|
|
1281
1286
|
return o.filter(Boolean).forEach(function(u) {
|
|
1282
|
-
i =
|
|
1283
|
-
var f =
|
|
1284
|
-
f && (!i ||
|
|
1287
|
+
i = De(i || u, u) || i, t.filter(Boolean).forEach(function(m) {
|
|
1288
|
+
var f = De(a, m);
|
|
1289
|
+
f && (!i || re(f, i) ? i = f : i = De(f, i));
|
|
1285
1290
|
});
|
|
1286
1291
|
}), i;
|
|
1287
|
-
},
|
|
1292
|
+
}, Or = function(e, r) {
|
|
1288
1293
|
return e.reduce(function(t, n) {
|
|
1289
1294
|
return t.concat(ln(n, r));
|
|
1290
1295
|
}, []);
|
|
@@ -1296,28 +1301,28 @@ var G = function(e) {
|
|
|
1296
1301
|
return t.get(n);
|
|
1297
1302
|
}).filter(on);
|
|
1298
1303
|
}, On = function(e, r) {
|
|
1299
|
-
var t = ge(
|
|
1304
|
+
var t = ge(te(e).length > 0 ? document : jr(e).ownerDocument), n = Ze(e).filter(Be), o = Hr(t || e, e, n), a = /* @__PURE__ */ new Map(), i = he(n, a), u = i.filter(function(E) {
|
|
1300
1305
|
var b = E.node;
|
|
1301
1306
|
return Be(b);
|
|
1302
1307
|
});
|
|
1303
1308
|
if (u[0]) {
|
|
1304
|
-
var
|
|
1309
|
+
var m = he([o], a).map(function(E) {
|
|
1305
1310
|
var b = E.node;
|
|
1306
1311
|
return b;
|
|
1307
|
-
}), f = xn(
|
|
1312
|
+
}), f = xn(m, u), v = f.map(function(E) {
|
|
1308
1313
|
var b = E.node;
|
|
1309
1314
|
return b;
|
|
1310
|
-
}),
|
|
1315
|
+
}), d = f.filter(function(E) {
|
|
1311
1316
|
var b = E.tabIndex;
|
|
1312
1317
|
return b >= 0;
|
|
1313
1318
|
}).map(function(E) {
|
|
1314
1319
|
var b = E.node;
|
|
1315
1320
|
return b;
|
|
1316
|
-
}), p = En(v,
|
|
1321
|
+
}), p = En(v, d, m, t, r);
|
|
1317
1322
|
if (p === Ue) {
|
|
1318
1323
|
var g = (
|
|
1319
1324
|
// first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
|
|
1320
|
-
|
|
1325
|
+
xr(i, d, Or(n, a)) || xr(i, v, Or(n, a))
|
|
1321
1326
|
);
|
|
1322
1327
|
if (g)
|
|
1323
1328
|
return { node: g };
|
|
@@ -1334,25 +1339,25 @@ var G = function(e) {
|
|
|
1334
1339
|
node: i,
|
|
1335
1340
|
index: u,
|
|
1336
1341
|
lockItem: o.indexOf(i) >= 0,
|
|
1337
|
-
guard:
|
|
1342
|
+
guard: He(i)
|
|
1338
1343
|
};
|
|
1339
1344
|
});
|
|
1340
1345
|
}, rr = function(e, r) {
|
|
1341
1346
|
e && ("focus" in e && e.focus(r), "contentWindow" in e && e.contentWindow && e.contentWindow.focus());
|
|
1342
|
-
},
|
|
1347
|
+
}, je = 0, ke = !1, Jr = function(e, r, t) {
|
|
1343
1348
|
t === void 0 && (t = {});
|
|
1344
1349
|
var n = On(e, r);
|
|
1345
|
-
if (!
|
|
1346
|
-
if (
|
|
1347
|
-
console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),
|
|
1348
|
-
|
|
1350
|
+
if (!ke && n) {
|
|
1351
|
+
if (je > 2) {
|
|
1352
|
+
console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), ke = !0, setTimeout(function() {
|
|
1353
|
+
ke = !1;
|
|
1349
1354
|
}, 1);
|
|
1350
1355
|
return;
|
|
1351
1356
|
}
|
|
1352
|
-
|
|
1357
|
+
je++, rr(n.node, t.focusOptions), je--;
|
|
1353
1358
|
}
|
|
1354
1359
|
};
|
|
1355
|
-
function
|
|
1360
|
+
function ye(e) {
|
|
1356
1361
|
if (!e)
|
|
1357
1362
|
return null;
|
|
1358
1363
|
if (typeof WeakRef > "u")
|
|
@@ -1369,23 +1374,23 @@ var Sn = function(e) {
|
|
|
1369
1374
|
return null;
|
|
1370
1375
|
for (var r = [], t = e; t && t !== document.body; )
|
|
1371
1376
|
r.push({
|
|
1372
|
-
current:
|
|
1373
|
-
parent:
|
|
1374
|
-
left:
|
|
1375
|
-
right:
|
|
1377
|
+
current: ye(t),
|
|
1378
|
+
parent: ye(t.parentElement),
|
|
1379
|
+
left: ye(t.previousElementSibling),
|
|
1380
|
+
right: ye(t.nextElementSibling)
|
|
1376
1381
|
}), t = t.parentElement;
|
|
1377
1382
|
return {
|
|
1378
|
-
element:
|
|
1383
|
+
element: ye(e),
|
|
1379
1384
|
stack: r,
|
|
1380
1385
|
ownerDocument: e.ownerDocument
|
|
1381
1386
|
};
|
|
1382
1387
|
}, Pn = function(e) {
|
|
1383
1388
|
var r, t, n, o, a;
|
|
1384
1389
|
if (e)
|
|
1385
|
-
for (var i = e.stack, u = e.ownerDocument,
|
|
1386
|
-
var
|
|
1390
|
+
for (var i = e.stack, u = e.ownerDocument, m = /* @__PURE__ */ new Map(), f = 0, v = i; f < v.length; f++) {
|
|
1391
|
+
var d = v[f], p = (r = d.parent) === null || r === void 0 ? void 0 : r.call(d);
|
|
1387
1392
|
if (p && u.contains(p)) {
|
|
1388
|
-
for (var g = (t =
|
|
1393
|
+
for (var g = (t = d.left) === null || t === void 0 ? void 0 : t.call(d), E = d.current(), b = p.contains(E) ? E : void 0, w = (n = d.right) === null || n === void 0 ? void 0 : n.call(d), $ = Xe([p], m), O = (
|
|
1389
1394
|
// that is element itself
|
|
1390
1395
|
(a = (o = b ?? // or something in it's place
|
|
1391
1396
|
(g == null ? void 0 : g.nextElementSibling)) !== null && o !== void 0 ? o : (
|
|
@@ -1395,19 +1400,19 @@ var Sn = function(e) {
|
|
|
1395
1400
|
// or somebody to the left, something?
|
|
1396
1401
|
g
|
|
1397
1402
|
)
|
|
1398
|
-
);
|
|
1399
|
-
for (var T = 0,
|
|
1400
|
-
var s =
|
|
1401
|
-
if (
|
|
1403
|
+
); O; ) {
|
|
1404
|
+
for (var T = 0, F = $; T < F.length; T++) {
|
|
1405
|
+
var s = F[T];
|
|
1406
|
+
if (O != null && O.contains(s.node))
|
|
1402
1407
|
return s.node;
|
|
1403
1408
|
}
|
|
1404
|
-
|
|
1409
|
+
O = O.nextElementSibling;
|
|
1405
1410
|
}
|
|
1406
1411
|
if ($.length)
|
|
1407
1412
|
return $[0].node;
|
|
1408
1413
|
}
|
|
1409
1414
|
}
|
|
1410
|
-
},
|
|
1415
|
+
}, Kr = function(e) {
|
|
1411
1416
|
var r = Sn(e);
|
|
1412
1417
|
return function() {
|
|
1413
1418
|
return Pn(r);
|
|
@@ -1415,9 +1420,9 @@ var Sn = function(e) {
|
|
|
1415
1420
|
}, _n = function(e, r, t) {
|
|
1416
1421
|
if (!e || !r)
|
|
1417
1422
|
return console.error("no element or scope given"), {};
|
|
1418
|
-
var n =
|
|
1423
|
+
var n = te(r);
|
|
1419
1424
|
if (n.every(function(i) {
|
|
1420
|
-
return !
|
|
1425
|
+
return !re(i, e);
|
|
1421
1426
|
}))
|
|
1422
1427
|
return console.error("Active element is not contained in the scope"), {};
|
|
1423
1428
|
var o = t ? Xe(n, /* @__PURE__ */ new Map()) : he(n, /* @__PURE__ */ new Map()), a = o.findIndex(function(i) {
|
|
@@ -1431,53 +1436,53 @@ var Sn = function(e) {
|
|
|
1431
1436
|
first: o[0],
|
|
1432
1437
|
last: o[o.length - 1]
|
|
1433
1438
|
};
|
|
1434
|
-
},
|
|
1435
|
-
var t = r ? Xe(
|
|
1439
|
+
}, Rn = function(e, r) {
|
|
1440
|
+
var t = r ? Xe(te(e), /* @__PURE__ */ new Map()) : he(te(e), /* @__PURE__ */ new Map());
|
|
1436
1441
|
return {
|
|
1437
1442
|
first: t[0],
|
|
1438
1443
|
last: t[t.length - 1]
|
|
1439
1444
|
};
|
|
1440
|
-
},
|
|
1445
|
+
}, Fn = function(e) {
|
|
1441
1446
|
return Object.assign({
|
|
1442
1447
|
scope: document.body,
|
|
1443
1448
|
cycle: !0,
|
|
1444
1449
|
onlyTabbable: !0
|
|
1445
1450
|
}, e);
|
|
1446
|
-
},
|
|
1451
|
+
}, Qr = function(e, r, t) {
|
|
1447
1452
|
r === void 0 && (r = {});
|
|
1448
|
-
var n =
|
|
1453
|
+
var n = Fn(r), o = _n(e, n.scope, n.onlyTabbable);
|
|
1449
1454
|
if (o) {
|
|
1450
1455
|
var a = t(o, n.cycle);
|
|
1451
1456
|
a && rr(a.node, n.focusOptions);
|
|
1452
1457
|
}
|
|
1453
|
-
},
|
|
1454
|
-
r === void 0 && (r = {}),
|
|
1458
|
+
}, An = function(e, r) {
|
|
1459
|
+
r === void 0 && (r = {}), Qr(e, r, function(t, n) {
|
|
1455
1460
|
var o = t.next, a = t.first;
|
|
1456
1461
|
return o || n && a;
|
|
1457
1462
|
});
|
|
1458
1463
|
}, In = function(e, r) {
|
|
1459
|
-
r === void 0 && (r = {}),
|
|
1464
|
+
r === void 0 && (r = {}), Qr(e, r, function(t, n) {
|
|
1460
1465
|
var o = t.prev, a = t.last;
|
|
1461
1466
|
return o || n && a;
|
|
1462
1467
|
});
|
|
1463
|
-
},
|
|
1464
|
-
var n, o =
|
|
1468
|
+
}, Xr = function(e, r, t) {
|
|
1469
|
+
var n, o = Rn(e, (n = r.onlyTabbable) !== null && n !== void 0 ? n : !0), a = o[t];
|
|
1465
1470
|
a && rr(a.node, r.focusOptions);
|
|
1466
1471
|
}, Cn = function(e, r) {
|
|
1467
|
-
r === void 0 && (r = {}),
|
|
1472
|
+
r === void 0 && (r = {}), Xr(e, r, "first");
|
|
1468
1473
|
}, $n = function(e, r) {
|
|
1469
|
-
r === void 0 && (r = {}),
|
|
1474
|
+
r === void 0 && (r = {}), Xr(e, r, "last");
|
|
1470
1475
|
};
|
|
1471
1476
|
function tr(e) {
|
|
1472
1477
|
setTimeout(e, 1);
|
|
1473
1478
|
}
|
|
1474
1479
|
var Mn = function(r) {
|
|
1475
1480
|
return r && "current" in r ? r.current : r;
|
|
1476
|
-
},
|
|
1481
|
+
}, Zr = function() {
|
|
1477
1482
|
return document && document.activeElement === document.body;
|
|
1478
1483
|
}, Nn = function() {
|
|
1479
|
-
return
|
|
1480
|
-
}, de = null, W = null,
|
|
1484
|
+
return Zr() || bn();
|
|
1485
|
+
}, de = null, W = null, wr = function() {
|
|
1481
1486
|
return null;
|
|
1482
1487
|
}, le = null, Ee = !1, nr = !1, Dn = function() {
|
|
1483
1488
|
return !0;
|
|
@@ -1491,7 +1496,7 @@ var Mn = function(r) {
|
|
|
1491
1496
|
}, Ln = function(r) {
|
|
1492
1497
|
return le && le.portaledElement === r;
|
|
1493
1498
|
};
|
|
1494
|
-
function
|
|
1499
|
+
function Sr(e, r, t, n) {
|
|
1495
1500
|
var o = null, a = e;
|
|
1496
1501
|
do {
|
|
1497
1502
|
var i = n[a];
|
|
@@ -1514,137 +1519,137 @@ var Wn = function(r) {
|
|
|
1514
1519
|
return t.some(function(n) {
|
|
1515
1520
|
return qn(r, n, n);
|
|
1516
1521
|
});
|
|
1517
|
-
},
|
|
1522
|
+
}, et = function(r) {
|
|
1518
1523
|
return he(r, /* @__PURE__ */ new Map());
|
|
1519
1524
|
}, Un = function(r) {
|
|
1520
|
-
return !
|
|
1525
|
+
return !et([r.parentNode]).some(function(t) {
|
|
1521
1526
|
return t.node === r;
|
|
1522
1527
|
});
|
|
1523
|
-
},
|
|
1528
|
+
}, Pe = function() {
|
|
1524
1529
|
var r = !1;
|
|
1525
1530
|
if (de) {
|
|
1526
|
-
var t = de, n = t.observed, o = t.persistentFocus, a = t.autoFocus, i = t.shards, u = t.crossFrame,
|
|
1527
|
-
if (
|
|
1528
|
-
var
|
|
1529
|
-
|
|
1531
|
+
var t = de, n = t.observed, o = t.persistentFocus, a = t.autoFocus, i = t.shards, u = t.crossFrame, m = t.focusOptions, f = t.noFocusGuards, v = n || le && le.portaledElement;
|
|
1532
|
+
if (Zr() && W && W !== document.body && (!document.body.contains(W) || Un(W))) {
|
|
1533
|
+
var d = wr();
|
|
1534
|
+
d && d.focus();
|
|
1530
1535
|
}
|
|
1531
1536
|
var p = document && document.activeElement;
|
|
1532
1537
|
if (v) {
|
|
1533
1538
|
var g = [v].concat(i.map(Mn).filter(Boolean)), E = function() {
|
|
1534
1539
|
if (!Wn(u) || !f || !W || nr)
|
|
1535
1540
|
return !1;
|
|
1536
|
-
var T =
|
|
1541
|
+
var T = et(g), F = T.findIndex(function(s) {
|
|
1537
1542
|
var k = s.node;
|
|
1538
1543
|
return k === W;
|
|
1539
1544
|
});
|
|
1540
|
-
return
|
|
1545
|
+
return F === 0 || F === T.length - 1;
|
|
1541
1546
|
};
|
|
1542
|
-
if ((!p || jn(p)) && (o || E() || !Nn() || !W && a) && (v && !(Gr(g) || p && Bn(p, g) || Ln(p)) && (document && !W && p && !a ? (p.blur && p.blur(), document.body.focus()) : (r =
|
|
1543
|
-
focusOptions:
|
|
1544
|
-
}), le = {})), W = document && document.activeElement, W !== document.body && (
|
|
1545
|
-
var b = document && document.activeElement, w = wn(g), $ = w.map(function(
|
|
1546
|
-
var T =
|
|
1547
|
+
if ((!p || jn(p)) && (o || E() || !Nn() || !W && a) && (v && !(Gr(g) || p && Bn(p, g) || Ln(p)) && (document && !W && p && !a ? (p.blur && p.blur(), document.body.focus()) : (r = Jr(g, W, {
|
|
1548
|
+
focusOptions: m
|
|
1549
|
+
}), le = {})), W = document && document.activeElement, W !== document.body && (wr = Kr(W)), Ee = !1), document && p !== document.activeElement && document.querySelector("[data-focus-auto-guard]")) {
|
|
1550
|
+
var b = document && document.activeElement, w = wn(g), $ = w.map(function(O) {
|
|
1551
|
+
var T = O.node;
|
|
1547
1552
|
return T;
|
|
1548
1553
|
}).indexOf(b);
|
|
1549
|
-
$ > -1 && (w.filter(function(
|
|
1550
|
-
var T =
|
|
1551
|
-
return T &&
|
|
1552
|
-
}).forEach(function(
|
|
1553
|
-
var T =
|
|
1554
|
+
$ > -1 && (w.filter(function(O) {
|
|
1555
|
+
var T = O.guard, F = O.node;
|
|
1556
|
+
return T && F.dataset.focusAutoGuard;
|
|
1557
|
+
}).forEach(function(O) {
|
|
1558
|
+
var T = O.node;
|
|
1554
1559
|
return T.removeAttribute("tabIndex");
|
|
1555
|
-
}),
|
|
1560
|
+
}), Sr($, w.length, 1, w), Sr($, -1, -1, w));
|
|
1556
1561
|
}
|
|
1557
1562
|
}
|
|
1558
1563
|
}
|
|
1559
1564
|
return r;
|
|
1560
|
-
},
|
|
1561
|
-
|
|
1565
|
+
}, rt = function(r) {
|
|
1566
|
+
Pe() && r && (r.stopPropagation(), r.preventDefault());
|
|
1562
1567
|
}, or = function() {
|
|
1563
|
-
return tr(
|
|
1568
|
+
return tr(Pe);
|
|
1564
1569
|
}, Yn = function(r) {
|
|
1565
1570
|
var t = r.target, n = r.currentTarget;
|
|
1566
1571
|
n.contains(t) || kn(n, t);
|
|
1567
1572
|
}, zn = function() {
|
|
1568
1573
|
return null;
|
|
1569
1574
|
};
|
|
1570
|
-
process.env.NODE_ENV !== "production" &&
|
|
1571
|
-
var
|
|
1575
|
+
process.env.NODE_ENV !== "production" && Ir.node.isRequired;
|
|
1576
|
+
var tt = function() {
|
|
1572
1577
|
nr = !0;
|
|
1573
|
-
},
|
|
1578
|
+
}, nt = function() {
|
|
1574
1579
|
nr = !1, Ee = "just", tr(function() {
|
|
1575
1580
|
Ee = "meanwhile";
|
|
1576
1581
|
});
|
|
1582
|
+
}, Vn = function() {
|
|
1583
|
+
document.addEventListener("focusin", rt), document.addEventListener("focusout", or), window.addEventListener("focus", tt), window.addEventListener("blur", nt);
|
|
1577
1584
|
}, Gn = function() {
|
|
1578
|
-
document.
|
|
1579
|
-
}, Hn = function() {
|
|
1580
|
-
document.removeEventListener("focusin", et), document.removeEventListener("focusout", or), window.removeEventListener("focus", rt), window.removeEventListener("blur", tt);
|
|
1585
|
+
document.removeEventListener("focusin", rt), document.removeEventListener("focusout", or), window.removeEventListener("focus", tt), window.removeEventListener("blur", nt);
|
|
1581
1586
|
};
|
|
1582
|
-
function
|
|
1587
|
+
function Hn(e) {
|
|
1583
1588
|
return e.filter(function(r) {
|
|
1584
1589
|
var t = r.disabled;
|
|
1585
1590
|
return !t;
|
|
1586
1591
|
});
|
|
1587
1592
|
}
|
|
1588
|
-
var
|
|
1589
|
-
moveFocusInside:
|
|
1593
|
+
var ot = {
|
|
1594
|
+
moveFocusInside: Jr,
|
|
1590
1595
|
focusInside: Gr,
|
|
1591
|
-
focusNextElement:
|
|
1596
|
+
focusNextElement: An,
|
|
1592
1597
|
focusPrevElement: In,
|
|
1593
1598
|
focusFirstElement: Cn,
|
|
1594
1599
|
focusLastElement: $n,
|
|
1595
|
-
captureFocusRestore:
|
|
1600
|
+
captureFocusRestore: Kr
|
|
1596
1601
|
};
|
|
1597
1602
|
function Jn(e) {
|
|
1598
1603
|
var r = e.slice(-1)[0];
|
|
1599
|
-
r && !de &&
|
|
1604
|
+
r && !de && Vn();
|
|
1600
1605
|
var t = de, n = t && r && r.id === t.id;
|
|
1601
1606
|
de = r, t && !n && (t.onDeactivation(), e.filter(function(o) {
|
|
1602
1607
|
var a = o.id;
|
|
1603
1608
|
return a === t.id;
|
|
1604
|
-
}).length || t.returnFocus(!r)), r ? (W = null, (!n || t.observed !== r.observed) && r.onActivation(
|
|
1609
|
+
}).length || t.returnFocus(!r)), r ? (W = null, (!n || t.observed !== r.observed) && r.onActivation(ot), Pe(), tr(Pe)) : (Gn(), W = null);
|
|
1605
1610
|
}
|
|
1606
|
-
|
|
1607
|
-
|
|
1611
|
+
Nr.assignSyncMedium(Yn);
|
|
1612
|
+
Dr.assignMedium(or);
|
|
1608
1613
|
Bt.assignMedium(function(e) {
|
|
1609
|
-
return e(
|
|
1614
|
+
return e(ot);
|
|
1610
1615
|
});
|
|
1611
|
-
const Kn = Kt(
|
|
1612
|
-
var
|
|
1613
|
-
return /* @__PURE__ */
|
|
1616
|
+
const Kn = Kt(Hn, Jn)(zn);
|
|
1617
|
+
var at = /* @__PURE__ */ Rr(function(r, t) {
|
|
1618
|
+
return /* @__PURE__ */ X.createElement(Ge, me({
|
|
1614
1619
|
sideCar: Kn,
|
|
1615
1620
|
ref: t
|
|
1616
1621
|
}, r));
|
|
1617
|
-
}),
|
|
1618
|
-
|
|
1619
|
-
var Qn =
|
|
1620
|
-
|
|
1621
|
-
function
|
|
1622
|
+
}), it = Ge.propTypes || {};
|
|
1623
|
+
it.sideCar;
|
|
1624
|
+
var Qn = Pt(it, ["sideCar"]);
|
|
1625
|
+
at.propTypes = process.env.NODE_ENV !== "production" ? Qn : {};
|
|
1626
|
+
function ut(e) {
|
|
1622
1627
|
var r, t, n = "";
|
|
1623
1628
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1624
1629
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1625
1630
|
var o = e.length;
|
|
1626
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1631
|
+
for (r = 0; r < o; r++) e[r] && (t = ut(e[r])) && (n && (n += " "), n += t);
|
|
1627
1632
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1628
1633
|
return n;
|
|
1629
1634
|
}
|
|
1630
1635
|
function Xn() {
|
|
1631
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1636
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = ut(e)) && (n && (n += " "), n += r);
|
|
1632
1637
|
return n;
|
|
1633
1638
|
}
|
|
1634
|
-
function
|
|
1639
|
+
function ct(e) {
|
|
1635
1640
|
var r, t, n = "";
|
|
1636
1641
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1637
1642
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1638
1643
|
var o = e.length;
|
|
1639
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1644
|
+
for (r = 0; r < o; r++) e[r] && (t = ct(e[r])) && (n && (n += " "), n += t);
|
|
1640
1645
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1641
1646
|
return n;
|
|
1642
1647
|
}
|
|
1643
1648
|
function Zn() {
|
|
1644
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1649
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = ct(e)) && (n && (n += " "), n += r);
|
|
1645
1650
|
return n;
|
|
1646
1651
|
}
|
|
1647
|
-
const
|
|
1652
|
+
const _e = ({
|
|
1648
1653
|
as: e,
|
|
1649
1654
|
children: r,
|
|
1650
1655
|
display: t,
|
|
@@ -1653,81 +1658,83 @@ const Pe = ({
|
|
|
1653
1658
|
mr: a,
|
|
1654
1659
|
mb: i,
|
|
1655
1660
|
ml: u,
|
|
1656
|
-
mx:
|
|
1661
|
+
mx: m,
|
|
1657
1662
|
my: f,
|
|
1658
1663
|
p: v,
|
|
1659
|
-
pt:
|
|
1664
|
+
pt: d,
|
|
1660
1665
|
pr: p,
|
|
1661
1666
|
pb: g,
|
|
1662
1667
|
pl: E,
|
|
1663
1668
|
px: b,
|
|
1664
1669
|
py: w,
|
|
1665
1670
|
width: $,
|
|
1666
|
-
height:
|
|
1671
|
+
height: O,
|
|
1667
1672
|
position: T,
|
|
1668
|
-
style:
|
|
1673
|
+
style: F,
|
|
1669
1674
|
className: s,
|
|
1670
1675
|
disabled: k,
|
|
1671
|
-
|
|
1676
|
+
required: Y,
|
|
1677
|
+
...z
|
|
1672
1678
|
}) => {
|
|
1673
|
-
const
|
|
1674
|
-
t && (h.display = t), $ && (h.width = $),
|
|
1675
|
-
const
|
|
1676
|
-
...
|
|
1679
|
+
const H = e || "div", h = {};
|
|
1680
|
+
t && (h.display = t), $ && (h.width = $), O && (h.height = O), T && (h.position = T), n && (h.margin = `var(--pittorica-space-${n})`), o && (h.marginTop = `var(--pittorica-space-${o})`), a && (h.marginRight = `var(--pittorica-space-${a})`), i && (h.marginBottom = `var(--pittorica-space-${i})`), u && (h.marginLeft = `var(--pittorica-space-${u})`), m && (h.marginLeft = `var(--pittorica-space-${m})`, h.marginRight = `var(--pittorica-space-${m})`), f && (h.marginTop = `var(--pittorica-space-${f})`, h.marginBottom = `var(--pittorica-space-${f})`), v && (h.padding = `var(--pittorica-space-${v})`), d && (h.paddingTop = `var(--pittorica-space-${d})`), p && (h.paddingRight = `var(--pittorica-space-${p})`), g && (h.paddingBottom = `var(--pittorica-space-${g})`), E && (h.paddingLeft = `var(--pittorica-space-${E})`), b && (h.paddingLeft = `var(--pittorica-space-${b})`, h.paddingRight = `var(--pittorica-space-${b})`), w && (h.paddingTop = `var(--pittorica-space-${w})`, h.paddingBottom = `var(--pittorica-space-${w})`);
|
|
1681
|
+
const V = {
|
|
1682
|
+
...F,
|
|
1677
1683
|
...h
|
|
1678
1684
|
};
|
|
1679
|
-
return /* @__PURE__ */
|
|
1680
|
-
|
|
1685
|
+
return /* @__PURE__ */ q(
|
|
1686
|
+
H,
|
|
1681
1687
|
{
|
|
1682
1688
|
className: Zn("pittorica-box", s),
|
|
1683
|
-
style:
|
|
1689
|
+
style: V,
|
|
1684
1690
|
disabled: k,
|
|
1685
|
-
|
|
1691
|
+
required: Y,
|
|
1692
|
+
...z,
|
|
1686
1693
|
children: r
|
|
1687
1694
|
}
|
|
1688
1695
|
);
|
|
1689
1696
|
};
|
|
1690
|
-
|
|
1691
|
-
function
|
|
1697
|
+
_e.displayName = "Box";
|
|
1698
|
+
function st(e) {
|
|
1692
1699
|
var r, t, n = "";
|
|
1693
1700
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1694
1701
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1695
1702
|
var o = e.length;
|
|
1696
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1703
|
+
for (r = 0; r < o; r++) e[r] && (t = st(e[r])) && (n && (n += " "), n += t);
|
|
1697
1704
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1698
1705
|
return n;
|
|
1699
1706
|
}
|
|
1700
1707
|
function eo() {
|
|
1701
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1708
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = st(e)) && (n && (n += " "), n += r);
|
|
1702
1709
|
return n;
|
|
1703
1710
|
}
|
|
1704
|
-
function
|
|
1711
|
+
function ft(e) {
|
|
1705
1712
|
var r, t, n = "";
|
|
1706
1713
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1707
1714
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1708
1715
|
var o = e.length;
|
|
1709
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1716
|
+
for (r = 0; r < o; r++) e[r] && (t = ft(e[r])) && (n && (n += " "), n += t);
|
|
1710
1717
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1711
1718
|
return n;
|
|
1712
1719
|
}
|
|
1713
|
-
function
|
|
1714
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1720
|
+
function Pr() {
|
|
1721
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = ft(e)) && (n && (n += " "), n += r);
|
|
1715
1722
|
return n;
|
|
1716
1723
|
}
|
|
1717
|
-
function
|
|
1724
|
+
function dt(e) {
|
|
1718
1725
|
var r, t, n = "";
|
|
1719
1726
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1720
1727
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1721
1728
|
var o = e.length;
|
|
1722
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1729
|
+
for (r = 0; r < o; r++) e[r] && (t = dt(e[r])) && (n && (n += " "), n += t);
|
|
1723
1730
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1724
1731
|
return n;
|
|
1725
1732
|
}
|
|
1726
1733
|
function ro() {
|
|
1727
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1734
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = dt(e)) && (n && (n += " "), n += r);
|
|
1728
1735
|
return n;
|
|
1729
1736
|
}
|
|
1730
|
-
const
|
|
1737
|
+
const lt = ({
|
|
1731
1738
|
as: e,
|
|
1732
1739
|
children: r,
|
|
1733
1740
|
display: t,
|
|
@@ -1736,42 +1743,44 @@ const dt = ({
|
|
|
1736
1743
|
mr: a,
|
|
1737
1744
|
mb: i,
|
|
1738
1745
|
ml: u,
|
|
1739
|
-
mx:
|
|
1746
|
+
mx: m,
|
|
1740
1747
|
my: f,
|
|
1741
1748
|
p: v,
|
|
1742
|
-
pt:
|
|
1749
|
+
pt: d,
|
|
1743
1750
|
pr: p,
|
|
1744
1751
|
pb: g,
|
|
1745
1752
|
pl: E,
|
|
1746
1753
|
px: b,
|
|
1747
1754
|
py: w,
|
|
1748
1755
|
width: $,
|
|
1749
|
-
height:
|
|
1756
|
+
height: O,
|
|
1750
1757
|
position: T,
|
|
1751
|
-
style:
|
|
1758
|
+
style: F,
|
|
1752
1759
|
className: s,
|
|
1753
1760
|
disabled: k,
|
|
1754
|
-
|
|
1761
|
+
required: Y,
|
|
1762
|
+
...z
|
|
1755
1763
|
}) => {
|
|
1756
|
-
const
|
|
1757
|
-
t && (h.display = t), $ && (h.width = $),
|
|
1758
|
-
const
|
|
1759
|
-
...
|
|
1764
|
+
const H = e || "div", h = {};
|
|
1765
|
+
t && (h.display = t), $ && (h.width = $), O && (h.height = O), T && (h.position = T), n && (h.margin = `var(--pittorica-space-${n})`), o && (h.marginTop = `var(--pittorica-space-${o})`), a && (h.marginRight = `var(--pittorica-space-${a})`), i && (h.marginBottom = `var(--pittorica-space-${i})`), u && (h.marginLeft = `var(--pittorica-space-${u})`), m && (h.marginLeft = `var(--pittorica-space-${m})`, h.marginRight = `var(--pittorica-space-${m})`), f && (h.marginTop = `var(--pittorica-space-${f})`, h.marginBottom = `var(--pittorica-space-${f})`), v && (h.padding = `var(--pittorica-space-${v})`), d && (h.paddingTop = `var(--pittorica-space-${d})`), p && (h.paddingRight = `var(--pittorica-space-${p})`), g && (h.paddingBottom = `var(--pittorica-space-${g})`), E && (h.paddingLeft = `var(--pittorica-space-${E})`), b && (h.paddingLeft = `var(--pittorica-space-${b})`, h.paddingRight = `var(--pittorica-space-${b})`), w && (h.paddingTop = `var(--pittorica-space-${w})`, h.paddingBottom = `var(--pittorica-space-${w})`);
|
|
1766
|
+
const V = {
|
|
1767
|
+
...F,
|
|
1760
1768
|
...h
|
|
1761
1769
|
};
|
|
1762
|
-
return /* @__PURE__ */
|
|
1763
|
-
|
|
1770
|
+
return /* @__PURE__ */ q(
|
|
1771
|
+
H,
|
|
1764
1772
|
{
|
|
1765
1773
|
className: ro("pittorica-box", s),
|
|
1766
|
-
style:
|
|
1774
|
+
style: V,
|
|
1767
1775
|
disabled: k,
|
|
1768
|
-
|
|
1776
|
+
required: Y,
|
|
1777
|
+
...z,
|
|
1769
1778
|
children: r
|
|
1770
1779
|
}
|
|
1771
1780
|
);
|
|
1772
1781
|
};
|
|
1773
|
-
|
|
1774
|
-
const
|
|
1782
|
+
lt.displayName = "Box";
|
|
1783
|
+
const vt = ({
|
|
1775
1784
|
children: e,
|
|
1776
1785
|
as: r,
|
|
1777
1786
|
size: t,
|
|
@@ -1780,10 +1789,10 @@ const lt = ({
|
|
|
1780
1789
|
truncate: a = !1,
|
|
1781
1790
|
color: i,
|
|
1782
1791
|
className: u,
|
|
1783
|
-
style:
|
|
1792
|
+
style: m,
|
|
1784
1793
|
...f
|
|
1785
1794
|
}) => {
|
|
1786
|
-
const v = r || "span",
|
|
1795
|
+
const v = r || "span", d = (i == null ? void 0 : i.startsWith("#")) || (i == null ? void 0 : i.startsWith("rgb")) || (i == null ? void 0 : i.startsWith("hsl")), p = /* @__PURE__ */ new Set([
|
|
1787
1796
|
"danger",
|
|
1788
1797
|
"success",
|
|
1789
1798
|
"error",
|
|
@@ -1797,8 +1806,8 @@ const lt = ({
|
|
|
1797
1806
|
"red"
|
|
1798
1807
|
]), g = (() => {
|
|
1799
1808
|
if (i)
|
|
1800
|
-
return i === "inherit" ? "inherit" :
|
|
1801
|
-
})(), E = t ? typeof t == "string" ? `pittorica-text--size-${t}` :
|
|
1809
|
+
return i === "inherit" ? "inherit" : d ? i : p.has(i) ? `var(--pittorica-${i}-9)` : i;
|
|
1810
|
+
})(), E = t ? typeof t == "string" ? `pittorica-text--size-${t}` : Pr({
|
|
1802
1811
|
[`pittorica-text--size-${t.initial}`]: t.initial,
|
|
1803
1812
|
[`pittorica-text--xs-size-${t.xs}`]: t.xs,
|
|
1804
1813
|
[`pittorica-text--sm-size-${t.sm}`]: t.sm,
|
|
@@ -1806,15 +1815,15 @@ const lt = ({
|
|
|
1806
1815
|
[`pittorica-text--lg-size-${t.lg}`]: t.lg,
|
|
1807
1816
|
[`pittorica-text--xl-size-${t.xl}`]: t.xl
|
|
1808
1817
|
}) : null, b = {
|
|
1809
|
-
...
|
|
1818
|
+
...m,
|
|
1810
1819
|
textAlign: o,
|
|
1811
1820
|
color: g
|
|
1812
1821
|
};
|
|
1813
|
-
return /* @__PURE__ */
|
|
1814
|
-
|
|
1822
|
+
return /* @__PURE__ */ q(
|
|
1823
|
+
lt,
|
|
1815
1824
|
{
|
|
1816
1825
|
as: v,
|
|
1817
|
-
className:
|
|
1826
|
+
className: Pr(
|
|
1818
1827
|
"pittorica-text",
|
|
1819
1828
|
E,
|
|
1820
1829
|
{ "pittorica-text--truncate": a },
|
|
@@ -1827,36 +1836,72 @@ const lt = ({
|
|
|
1827
1836
|
}
|
|
1828
1837
|
);
|
|
1829
1838
|
};
|
|
1830
|
-
|
|
1839
|
+
vt.displayName = "Text";
|
|
1831
1840
|
const to = (e, r) => r ? typeof r == "string" ? [`pittorica-heading--${e}-${r}`] : Object.entries(r).filter(([t, n]) => n !== void 0).map(
|
|
1832
1841
|
([t, n]) => t === "initial" ? `pittorica-heading--${e}-${n}` : `pittorica-heading--${t}-${e}-${n}`
|
|
1833
|
-
) : [],
|
|
1842
|
+
) : [], pt = ({
|
|
1834
1843
|
children: e,
|
|
1835
1844
|
as: r,
|
|
1836
1845
|
size: t = "6",
|
|
1837
1846
|
weight: n = "bold",
|
|
1838
|
-
|
|
1839
|
-
|
|
1847
|
+
variant: o = "classic",
|
|
1848
|
+
color: a,
|
|
1849
|
+
className: i,
|
|
1850
|
+
style: u,
|
|
1851
|
+
...m
|
|
1840
1852
|
}) => {
|
|
1841
|
-
const
|
|
1842
|
-
|
|
1843
|
-
|
|
1853
|
+
const f = to("size", t), v = r || "h1", d = a && a !== "inherit" && !a.startsWith("#") && !a.startsWith("rgb"), p = {
|
|
1854
|
+
...o === "soft" && d && {
|
|
1855
|
+
"--pittorica-source-3": `var(--pittorica-${a}-3)`,
|
|
1856
|
+
"--pittorica-source-11": `var(--pittorica-${a}-11)`
|
|
1857
|
+
},
|
|
1858
|
+
...o === "outline" && d && {
|
|
1859
|
+
"--pittorica-source-9": `var(--pittorica-${a}-9)`
|
|
1860
|
+
},
|
|
1861
|
+
...u
|
|
1862
|
+
};
|
|
1863
|
+
return /* @__PURE__ */ q(
|
|
1864
|
+
vt,
|
|
1844
1865
|
{
|
|
1845
|
-
as:
|
|
1866
|
+
as: v,
|
|
1846
1867
|
weight: n,
|
|
1847
|
-
className: eo("pittorica-heading",
|
|
1848
|
-
|
|
1868
|
+
className: eo("pittorica-heading", f, i),
|
|
1869
|
+
"data-variant": o,
|
|
1870
|
+
style: p,
|
|
1871
|
+
color: a,
|
|
1872
|
+
...m,
|
|
1849
1873
|
children: e
|
|
1850
1874
|
}
|
|
1851
1875
|
);
|
|
1852
1876
|
};
|
|
1853
|
-
|
|
1854
|
-
const
|
|
1855
|
-
|
|
1877
|
+
pt.displayName = "Heading";
|
|
1878
|
+
const no = ({
|
|
1879
|
+
children: e,
|
|
1880
|
+
sourceColor: r = "indigo",
|
|
1881
|
+
appearance: t = "light",
|
|
1882
|
+
radius: n = "medium",
|
|
1883
|
+
className: o,
|
|
1884
|
+
style: a,
|
|
1885
|
+
id: i
|
|
1886
|
+
}) => {
|
|
1887
|
+
const u = r.startsWith("#") || r.startsWith("rgb"), m = {
|
|
1888
|
+
id: i,
|
|
1889
|
+
className: ["pittorica-theme", o].filter(Boolean).join(" "),
|
|
1890
|
+
"data-source-color": u ? "custom" : r,
|
|
1891
|
+
"data-appearance": t,
|
|
1892
|
+
"data-radius": n,
|
|
1893
|
+
style: {
|
|
1894
|
+
...a,
|
|
1895
|
+
...u ? { "--pittorica-source-color": r } : {}
|
|
1896
|
+
}
|
|
1897
|
+
};
|
|
1898
|
+
return /* @__PURE__ */ q("div", { ...m, children: e });
|
|
1899
|
+
}, yt = _r(null), mt = () => {
|
|
1900
|
+
const e = wt(yt);
|
|
1856
1901
|
if (!e)
|
|
1857
1902
|
throw new Error("Dialog compound components must be used within a Dialog");
|
|
1858
1903
|
return e;
|
|
1859
|
-
},
|
|
1904
|
+
}, oo = ({
|
|
1860
1905
|
open: e,
|
|
1861
1906
|
onClose: r,
|
|
1862
1907
|
children: t,
|
|
@@ -1865,80 +1910,76 @@ const pt = Pr(null), mt = () => {
|
|
|
1865
1910
|
closeOnOverlayClick: a = !0,
|
|
1866
1911
|
closeOnEsc: i = !0,
|
|
1867
1912
|
as: u,
|
|
1868
|
-
...
|
|
1913
|
+
...m
|
|
1869
1914
|
}) => {
|
|
1870
|
-
const f = ur(), v = ur(), [
|
|
1871
|
-
return
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
}, []), we(() => {
|
|
1915
|
+
const f = ur(), v = ur(), [d, p] = fe(), g = we(null), [E, b] = fe(!1);
|
|
1916
|
+
return Se(() => {
|
|
1917
|
+
b(!0);
|
|
1918
|
+
}, []), Se(() => {
|
|
1875
1919
|
if (!e) return;
|
|
1876
|
-
const
|
|
1920
|
+
const O = (T) => {
|
|
1877
1921
|
T.key === "Escape" && i && r();
|
|
1878
1922
|
};
|
|
1879
|
-
return globalThis.addEventListener("keydown",
|
|
1880
|
-
}, [e, r, i]),
|
|
1881
|
-
if (!e) return;
|
|
1882
|
-
const
|
|
1923
|
+
return globalThis.addEventListener("keydown", O), () => globalThis.removeEventListener("keydown", O);
|
|
1924
|
+
}, [e, r, i]), Se(() => {
|
|
1925
|
+
if (typeof document > "u" || !document.body || !e) return;
|
|
1926
|
+
const O = globalThis.getComputedStyle(document.body).overflow;
|
|
1883
1927
|
return document.body.style.overflow = "hidden", () => {
|
|
1884
|
-
document.body.style.overflow =
|
|
1928
|
+
document.body.style.overflow = O;
|
|
1885
1929
|
};
|
|
1886
|
-
}, [e]),
|
|
1930
|
+
}, [e]), Ot(() => {
|
|
1887
1931
|
if (e && g.current) {
|
|
1888
|
-
const
|
|
1932
|
+
const O = g.current.closest(
|
|
1889
1933
|
".pittorica-theme"
|
|
1890
1934
|
);
|
|
1891
|
-
if (
|
|
1892
|
-
const T =
|
|
1893
|
-
|
|
1894
|
-
);
|
|
1895
|
-
return () => cancelAnimationFrame(A);
|
|
1935
|
+
if (O) {
|
|
1936
|
+
const T = O.dataset.appearance;
|
|
1937
|
+
p(T || void 0);
|
|
1896
1938
|
}
|
|
1897
1939
|
}
|
|
1898
|
-
}, [e]), !e || !E ? null : /* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
|
|
1901
|
-
/* @__PURE__ */
|
|
1940
|
+
}, [e]), !e || !E ? null : /* @__PURE__ */ ht(gt, { children: [
|
|
1941
|
+
/* @__PURE__ */ q("div", { ref: g, style: { display: "none" }, "aria-hidden": "true" }),
|
|
1942
|
+
St(
|
|
1943
|
+
/* @__PURE__ */ q(
|
|
1902
1944
|
"div",
|
|
1903
1945
|
{
|
|
1904
|
-
className: "pittorica-dialog-overlay
|
|
1946
|
+
className: "pittorica-dialog-overlay",
|
|
1905
1947
|
onClick: a ? r : void 0,
|
|
1906
|
-
"data-appearance": o ?? l,
|
|
1907
1948
|
"aria-hidden": "true",
|
|
1908
|
-
children: /* @__PURE__ */
|
|
1909
|
-
|
|
1949
|
+
children: /* @__PURE__ */ q(no, { appearance: o ?? d, children: /* @__PURE__ */ q(at, { returnFocus: !0, children: /* @__PURE__ */ q(
|
|
1950
|
+
_e,
|
|
1910
1951
|
{
|
|
1911
1952
|
as: u || "div",
|
|
1912
1953
|
className: Xn("pittorica-dialog-content", n),
|
|
1913
|
-
onClick: (
|
|
1954
|
+
onClick: (O) => O.stopPropagation(),
|
|
1914
1955
|
role: "dialog",
|
|
1915
1956
|
"aria-modal": "true",
|
|
1916
1957
|
"aria-labelledby": f,
|
|
1917
1958
|
"aria-describedby": v,
|
|
1918
|
-
...
|
|
1919
|
-
children: /* @__PURE__ */
|
|
1959
|
+
...m,
|
|
1960
|
+
children: /* @__PURE__ */ q(yt, { value: { titleId: f, descriptionId: v }, children: t })
|
|
1920
1961
|
}
|
|
1921
|
-
) })
|
|
1962
|
+
) }) })
|
|
1922
1963
|
}
|
|
1923
1964
|
),
|
|
1924
1965
|
document.body
|
|
1925
1966
|
)
|
|
1926
1967
|
] });
|
|
1927
|
-
},
|
|
1968
|
+
}, ao = ({
|
|
1928
1969
|
children: e,
|
|
1929
1970
|
id: r,
|
|
1930
1971
|
...t
|
|
1931
1972
|
}) => {
|
|
1932
1973
|
const { titleId: n } = mt();
|
|
1933
|
-
return /* @__PURE__ */
|
|
1934
|
-
},
|
|
1974
|
+
return /* @__PURE__ */ q(pt, { as: "h2", id: n, size: "6", mb: "3", ...t, children: e });
|
|
1975
|
+
}, io = ({
|
|
1935
1976
|
children: e,
|
|
1936
1977
|
id: r,
|
|
1937
1978
|
...t
|
|
1938
1979
|
}) => {
|
|
1939
1980
|
const { descriptionId: n } = mt();
|
|
1940
|
-
return /* @__PURE__ */
|
|
1941
|
-
|
|
1981
|
+
return /* @__PURE__ */ q(
|
|
1982
|
+
_e,
|
|
1942
1983
|
{
|
|
1943
1984
|
id: n,
|
|
1944
1985
|
mb: "4",
|
|
@@ -1950,11 +1991,11 @@ const pt = Pr(null), mt = () => {
|
|
|
1950
1991
|
children: e
|
|
1951
1992
|
}
|
|
1952
1993
|
);
|
|
1953
|
-
},
|
|
1994
|
+
}, uo = ({
|
|
1954
1995
|
children: e,
|
|
1955
1996
|
...r
|
|
1956
|
-
}) => /* @__PURE__ */
|
|
1957
|
-
|
|
1997
|
+
}) => /* @__PURE__ */ q(
|
|
1998
|
+
_e,
|
|
1958
1999
|
{
|
|
1959
2000
|
style: {
|
|
1960
2001
|
display: "flex",
|
|
@@ -1966,13 +2007,13 @@ const pt = Pr(null), mt = () => {
|
|
|
1966
2007
|
children: e
|
|
1967
2008
|
}
|
|
1968
2009
|
);
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
2010
|
+
oo.displayName = "Dialog";
|
|
2011
|
+
ao.displayName = "Dialog.Title";
|
|
2012
|
+
io.displayName = "Dialog.Description";
|
|
2013
|
+
uo.displayName = "Dialog.Actions";
|
|
1973
2014
|
export {
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
2015
|
+
oo as Dialog,
|
|
2016
|
+
uo as DialogActions,
|
|
2017
|
+
io as DialogDescription,
|
|
2018
|
+
ao as DialogTitle
|
|
1978
2019
|
};
|