@texonom/nreact 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1366 +1 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "../objectSpread2-DfFXoz5f.js";
2
- import * as s from "react";
3
- import * as c from "react-dom";
4
- //#region builtin:esm-external-require-react
5
- var l = /* @__PURE__ */ i(((e, t) => {
6
- n(), t.exports = Object.prototype.hasOwnProperty.call(s, "module.exports") ? s["module.exports"] : o({}, s);
7
- })), u = /* @__PURE__ */ i(((e, t) => {
8
- n(), t.exports = Object.prototype.hasOwnProperty.call(c, "module.exports") ? c["module.exports"] : o({}, c);
9
- })), d = /* @__PURE__ */ i(((e) => {
10
- var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
11
- function b(e) {
12
- if (typeof e == "object" && e) {
13
- var t = e.$$typeof;
14
- switch (t) {
15
- case n: switch (e = e.type, e) {
16
- case l:
17
- case u:
18
- case i:
19
- case o:
20
- case a:
21
- case f: return e;
22
- default: switch (e = e && e.$$typeof, e) {
23
- case c:
24
- case d:
25
- case h:
26
- case m:
27
- case s: return e;
28
- default: return t;
29
- }
30
- }
31
- case r: return t;
32
- }
33
- }
34
- }
35
- function x(e) {
36
- return b(e) === u;
37
- }
38
- e.AsyncMode = l, e.ConcurrentMode = u, e.ContextConsumer = c, e.ContextProvider = s, e.Element = n, e.ForwardRef = d, e.Fragment = i, e.Lazy = h, e.Memo = m, e.Portal = r, e.Profiler = o, e.StrictMode = a, e.Suspense = f, e.isAsyncMode = function(e) {
39
- return x(e) || b(e) === l;
40
- }, e.isConcurrentMode = x, e.isContextConsumer = function(e) {
41
- return b(e) === c;
42
- }, e.isContextProvider = function(e) {
43
- return b(e) === s;
44
- }, e.isElement = function(e) {
45
- return typeof e == "object" && !!e && e.$$typeof === n;
46
- }, e.isForwardRef = function(e) {
47
- return b(e) === d;
48
- }, e.isFragment = function(e) {
49
- return b(e) === i;
50
- }, e.isLazy = function(e) {
51
- return b(e) === h;
52
- }, e.isMemo = function(e) {
53
- return b(e) === m;
54
- }, e.isPortal = function(e) {
55
- return b(e) === r;
56
- }, e.isProfiler = function(e) {
57
- return b(e) === o;
58
- }, e.isStrictMode = function(e) {
59
- return b(e) === a;
60
- }, e.isSuspense = function(e) {
61
- return b(e) === f;
62
- }, e.isValidElementType = function(e) {
63
- return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
64
- }, e.typeOf = b;
65
- })), f = /* @__PURE__ */ i(((e) => {
66
- process.env.NODE_ENV !== "production" && (function() {
67
- var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
68
- function b(e) {
69
- return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
70
- }
71
- function x(e) {
72
- if (typeof e == "object" && e) {
73
- var t = e.$$typeof;
74
- switch (t) {
75
- case n:
76
- var p = e.type;
77
- switch (p) {
78
- case l:
79
- case u:
80
- case i:
81
- case o:
82
- case a:
83
- case f: return p;
84
- default:
85
- var g = p && p.$$typeof;
86
- switch (g) {
87
- case c:
88
- case d:
89
- case h:
90
- case m:
91
- case s: return g;
92
- default: return t;
93
- }
94
- }
95
- case r: return t;
96
- }
97
- }
98
- }
99
- var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
100
- function I(e) {
101
- return F || (F = !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.")), L(e) || x(e) === l;
102
- }
103
- function L(e) {
104
- return x(e) === u;
105
- }
106
- function R(e) {
107
- return x(e) === c;
108
- }
109
- function z(e) {
110
- return x(e) === s;
111
- }
112
- function B(e) {
113
- return typeof e == "object" && !!e && e.$$typeof === n;
114
- }
115
- function V(e) {
116
- return x(e) === d;
117
- }
118
- function H(e) {
119
- return x(e) === i;
120
- }
121
- function U(e) {
122
- return x(e) === h;
123
- }
124
- function W(e) {
125
- return x(e) === m;
126
- }
127
- function G(e) {
128
- return x(e) === r;
129
- }
130
- function K(e) {
131
- return x(e) === o;
132
- }
133
- function q(e) {
134
- return x(e) === a;
135
- }
136
- function J(e) {
137
- return x(e) === f;
138
- }
139
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = B, e.isForwardRef = V, e.isFragment = H, e.isLazy = U, e.isMemo = W, e.isPortal = G, e.isProfiler = K, e.isStrictMode = q, e.isSuspense = J, e.isValidElementType = b, e.typeOf = x;
140
- })();
141
- })), p = /* @__PURE__ */ i(((e, t) => {
142
- t.exports = process.env.NODE_ENV === "production" ? d() : f();
143
- })), m = /* @__PURE__ */ i(((e, t) => {
144
- var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
145
- function a(e) {
146
- if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
147
- return Object(e);
148
- }
149
- function o() {
150
- try {
151
- if (!Object.assign) return !1;
152
- var e = /* @__PURE__ */ new String("abc");
153
- if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") return !1;
154
- for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n;
155
- if (Object.getOwnPropertyNames(t).map(function(e) {
156
- return t[e];
157
- }).join("") !== "0123456789") return !1;
158
- var r = {};
159
- return "abcdefghijklmnopqrst".split("").forEach(function(e) {
160
- r[e] = e;
161
- }), Object.keys(Object.assign({}, r)).join("") === "abcdefghijklmnopqrst";
162
- } catch (e) {
163
- return !1;
164
- }
165
- }
166
- t.exports = o() ? Object.assign : function(e, t) {
167
- for (var o, s = a(e), c, l = 1; l < arguments.length; l++) {
168
- for (var u in o = Object(arguments[l]), o) r.call(o, u) && (s[u] = o[u]);
169
- if (n) {
170
- c = n(o);
171
- for (var d = 0; d < c.length; d++) i.call(o, c[d]) && (s[c[d]] = o[c[d]]);
172
- }
173
- }
174
- return s;
175
- };
176
- })), h = /* @__PURE__ */ i(((e, t) => {
177
- t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
178
- })), g = /* @__PURE__ */ i(((e, t) => {
179
- t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
180
- })), _ = /* @__PURE__ */ i(((e, t) => {
181
- var n = function() {};
182
- if (process.env.NODE_ENV !== "production") {
183
- var r = h(), i = {}, a = g();
184
- n = function(e) {
185
- var t = "Warning: " + e;
186
- typeof console < "u" && console.error(t);
187
- try {
188
- throw Error(t);
189
- } catch (e) {}
190
- };
191
- }
192
- function o(e, t, o, s, c) {
193
- if (process.env.NODE_ENV !== "production") {
194
- for (var l in e) if (a(e, l)) {
195
- var u;
196
- try {
197
- if (typeof e[l] != "function") {
198
- var d = Error((s || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
199
- throw d.name = "Invariant Violation", d;
200
- }
201
- u = e[l](t, l, s, o, null, r);
202
- } catch (e) {
203
- u = e;
204
- }
205
- if (u && !(u instanceof Error) && n((s || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."), u instanceof Error && !(u.message in i)) {
206
- i[u.message] = !0;
207
- var f = c ? c() : "";
208
- n("Failed " + o + " type: " + u.message + (f == null ? "" : f));
209
- }
210
- }
211
- }
212
- }
213
- o.resetWarningCache = function() {
214
- process.env.NODE_ENV !== "production" && (i = {});
215
- }, t.exports = o;
216
- })), v = /* @__PURE__ */ i(((e, t) => {
217
- var n = p(), r = m(), i = h(), a = g(), o = _(), s = function() {};
218
- process.env.NODE_ENV !== "production" && (s = function(e) {
219
- var t = "Warning: " + e;
220
- typeof console < "u" && console.error(t);
221
- try {
222
- throw Error(t);
223
- } catch (e) {}
224
- });
225
- function c() {
226
- return null;
227
- }
228
- t.exports = function(e, t) {
229
- var l = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
230
- function d(e) {
231
- var t = e && (l && e[l] || e[u]);
232
- if (typeof t == "function") return t;
233
- }
234
- var f = "<<anonymous>>", p = {
235
- array: _("array"),
236
- bigint: _("bigint"),
237
- bool: _("boolean"),
238
- func: _("function"),
239
- number: _("number"),
240
- object: _("object"),
241
- string: _("string"),
242
- symbol: _("symbol"),
243
- any: v(),
244
- arrayOf: y,
245
- element: b(),
246
- elementType: x(),
247
- instanceOf: S,
248
- node: E(),
249
- objectOf: w,
250
- oneOf: C,
251
- oneOfType: T,
252
- shape: O,
253
- exact: k
254
- };
255
- function m(e, t) {
256
- return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
257
- }
258
- function h(e, t) {
259
- this.message = e, this.data = t && typeof t == "object" ? t : {}, this.stack = "";
260
- }
261
- h.prototype = Error.prototype;
262
- function g(e) {
263
- if (process.env.NODE_ENV !== "production") var n = {}, r = 0;
264
- function a(a, o, c, l, u, d, p) {
265
- if (l = l || f, d = d || c, p !== i) {
266
- if (t) {
267
- var m = /* @__PURE__ */ Error("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");
268
- throw m.name = "Invariant Violation", m;
269
- }
270
- if (process.env.NODE_ENV !== "production" && typeof console < "u") {
271
- var g = l + ":" + c;
272
- !n[g] && r < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + d + "` prop on `" + l + "`. 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."), n[g] = !0, r++);
273
- }
274
- }
275
- return o[c] == null ? a ? o[c] === null ? new h("The " + u + " `" + d + "` is marked as required " + ("in `" + l + "`, but its value is `null`.")) : new h("The " + u + " `" + d + "` is marked as required in " + ("`" + l + "`, but its value is `undefined`.")) : null : e(o, c, l, u, d);
276
- }
277
- var o = a.bind(null, !1);
278
- return o.isRequired = a.bind(null, !0), o;
279
- }
280
- function _(e) {
281
- function t(t, n, r, i, a, o) {
282
- var s = t[n];
283
- if (M(s) !== e) {
284
- var c = N(s);
285
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected ") + ("`" + e + "`."), { expectedType: e });
286
- }
287
- return null;
288
- }
289
- return g(t);
290
- }
291
- function v() {
292
- return g(c);
293
- }
294
- function y(e) {
295
- function t(t, n, r, a, o) {
296
- if (typeof e != "function") return new h("Property `" + o + "` of component `" + r + "` has invalid PropType notation inside arrayOf.");
297
- var s = t[n];
298
- if (!Array.isArray(s)) {
299
- var c = M(s);
300
- return new h("Invalid " + a + " `" + o + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected an array."));
301
- }
302
- for (var l = 0; l < s.length; l++) {
303
- var u = e(s, l, r, a, o + "[" + l + "]", i);
304
- if (u instanceof Error) return u;
305
- }
306
- return null;
307
- }
308
- return g(t);
309
- }
310
- function b() {
311
- function t(t, n, r, i, a) {
312
- var o = t[n];
313
- if (!e(o)) {
314
- var s = M(o);
315
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement."));
316
- }
317
- return null;
318
- }
319
- return g(t);
320
- }
321
- function x() {
322
- function e(e, t, r, i, a) {
323
- var o = e[t];
324
- if (!n.isValidElementType(o)) {
325
- var s = M(o);
326
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement type."));
327
- }
328
- return null;
329
- }
330
- return g(e);
331
- }
332
- function S(e) {
333
- function t(t, n, r, i, a) {
334
- if (!(t[n] instanceof e)) {
335
- var o = e.name || f, s = F(t[n]);
336
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected ") + ("instance of `" + o + "`."));
337
- }
338
- return null;
339
- }
340
- return g(t);
341
- }
342
- function C(e) {
343
- if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s("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]).") : s("Invalid argument supplied to oneOf, expected an array.")), c;
344
- function t(t, n, r, i, a) {
345
- for (var o = t[n], s = 0; s < e.length; s++) if (m(o, e[s])) return null;
346
- var c = JSON.stringify(e, function(e, t) {
347
- return N(t) === "symbol" ? String(t) : t;
348
- });
349
- return new h("Invalid " + i + " `" + a + "` of value `" + String(o) + "` " + ("supplied to `" + r + "`, expected one of " + c + "."));
350
- }
351
- return g(t);
352
- }
353
- function w(e) {
354
- function t(t, n, r, o, s) {
355
- if (typeof e != "function") return new h("Property `" + s + "` of component `" + r + "` has invalid PropType notation inside objectOf.");
356
- var c = t[n], l = M(c);
357
- if (l !== "object") return new h("Invalid " + o + " `" + s + "` of type " + ("`" + l + "` supplied to `" + r + "`, expected an object."));
358
- for (var u in c) if (a(c, u)) {
359
- var d = e(c, u, r, o, s + "." + u, i);
360
- if (d instanceof Error) return d;
361
- }
362
- return null;
363
- }
364
- return g(t);
365
- }
366
- function T(e) {
367
- if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), c;
368
- for (var t = 0; t < e.length; t++) {
369
- var n = e[t];
370
- if (typeof n != "function") return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + P(n) + " at index " + t + "."), c;
371
- }
372
- function r(t, n, r, o, s) {
373
- for (var c = [], l = 0; l < e.length; l++) {
374
- var u = e[l], d = u(t, n, r, o, s, i);
375
- if (d == null) return null;
376
- d.data && a(d.data, "expectedType") && c.push(d.data.expectedType);
377
- }
378
- var f = c.length > 0 ? ", expected one of type [" + c.join(", ") + "]" : "";
379
- return new h("Invalid " + o + " `" + s + "` supplied to " + ("`" + r + "`" + f + "."));
380
- }
381
- return g(r);
382
- }
383
- function E() {
384
- function e(e, t, n, r, i) {
385
- return A(e[t]) ? null : new h("Invalid " + r + " `" + i + "` supplied to " + ("`" + n + "`, expected a ReactNode."));
386
- }
387
- return g(e);
388
- }
389
- function D(e, t, n, r, i) {
390
- return new h((e || "React class") + ": " + t + " type `" + n + "." + r + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`.");
391
- }
392
- function O(e) {
393
- function t(t, n, r, a, o) {
394
- var s = t[n], c = M(s);
395
- if (c !== "object") return new h("Invalid " + a + " `" + o + "` of type `" + c + "` " + ("supplied to `" + r + "`, expected `object`."));
396
- for (var l in e) {
397
- var u = e[l];
398
- if (typeof u != "function") return D(r, a, o, l, N(u));
399
- var d = u(s, l, r, a, o + "." + l, i);
400
- if (d) return d;
401
- }
402
- return null;
403
- }
404
- return g(t);
405
- }
406
- function k(e) {
407
- function t(t, n, o, s, c) {
408
- var l = t[n], u = M(l);
409
- if (u !== "object") return new h("Invalid " + s + " `" + c + "` of type `" + u + "` " + ("supplied to `" + o + "`, expected `object`."));
410
- for (var d in r({}, t[n], e)) {
411
- var f = e[d];
412
- if (a(e, d) && typeof f != "function") return D(o, s, c, d, N(f));
413
- if (!f) return new h("Invalid " + s + " `" + c + "` key `" + d + "` supplied to `" + o + "`.\nBad object: " + JSON.stringify(t[n], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e), null, " "));
414
- var p = f(l, d, o, s, c + "." + d, i);
415
- if (p) return p;
416
- }
417
- return null;
418
- }
419
- return g(t);
420
- }
421
- function A(t) {
422
- switch (typeof t) {
423
- case "number":
424
- case "string":
425
- case "undefined": return !0;
426
- case "boolean": return !t;
427
- case "object":
428
- if (Array.isArray(t)) return t.every(A);
429
- if (t === null || e(t)) return !0;
430
- var n = d(t);
431
- if (n) {
432
- var r = n.call(t), i;
433
- if (n !== t.entries) {
434
- for (; !(i = r.next()).done;) if (!A(i.value)) return !1;
435
- } else for (; !(i = r.next()).done;) {
436
- var a = i.value;
437
- if (a && !A(a[1])) return !1;
438
- }
439
- } else return !1;
440
- return !0;
441
- default: return !1;
442
- }
443
- }
444
- function j(e, t) {
445
- return e === "symbol" ? !0 : t ? t["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && t instanceof Symbol : !1;
446
- }
447
- function M(e) {
448
- var t = typeof e;
449
- return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : j(t, e) ? "symbol" : t;
450
- }
451
- function N(e) {
452
- if (e == null) return "" + e;
453
- var t = M(e);
454
- if (t === "object") {
455
- if (e instanceof Date) return "date";
456
- if (e instanceof RegExp) return "regexp";
457
- }
458
- return t;
459
- }
460
- function P(e) {
461
- var t = N(e);
462
- switch (t) {
463
- case "array":
464
- case "object": return "an " + t;
465
- case "boolean":
466
- case "date":
467
- case "regexp": return "a " + t;
468
- default: return t;
469
- }
470
- }
471
- function F(e) {
472
- return !e.constructor || !e.constructor.name ? f : e.constructor.name;
473
- }
474
- return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
475
- };
476
- })), y = /* @__PURE__ */ i(((e, t) => {
477
- var n = h();
478
- function r() {}
479
- function i() {}
480
- i.resetWarningCache = r, t.exports = function() {
481
- function e(e, t, r, i, a, o) {
482
- if (o !== n) {
483
- var s = /* @__PURE__ */ Error("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");
484
- throw s.name = "Invariant Violation", s;
485
- }
486
- }
487
- e.isRequired = e;
488
- function t() {
489
- return e;
490
- }
491
- var a = {
492
- array: e,
493
- bigint: e,
494
- bool: e,
495
- func: e,
496
- number: e,
497
- object: e,
498
- string: e,
499
- symbol: e,
500
- any: e,
501
- arrayOf: t,
502
- element: e,
503
- elementType: e,
504
- instanceOf: t,
505
- node: e,
506
- objectOf: t,
507
- oneOf: t,
508
- oneOfType: t,
509
- shape: t,
510
- exact: t,
511
- checkPropTypes: i,
512
- resetWarningCache: r
513
- };
514
- return a.PropTypes = a, a;
515
- };
516
- })), b = /* @__PURE__ */ i(((e, t) => {
517
- if (process.env.NODE_ENV !== "production") {
518
- var n = p();
519
- t.exports = v()(n.isElement, !0);
520
- } else t.exports = y()();
521
- })), x = /* @__PURE__ */ i(((e, t) => {
522
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = u;
523
- var n = "none", r = "contents", i = /^(input|select|textarea|button|object|iframe)$/;
524
- function a(e, t) {
525
- return t.getPropertyValue("overflow") !== "visible" || e.scrollWidth <= 0 && e.scrollHeight <= 0;
526
- }
527
- function o(e) {
528
- var t = e.offsetWidth <= 0 && e.offsetHeight <= 0;
529
- if (t && !e.innerHTML) return !0;
530
- try {
531
- var i = window.getComputedStyle(e), o = i.getPropertyValue("display");
532
- return t ? o !== r && a(e, i) : o === n;
533
- } catch (e) {
534
- return console.warn("Failed to inspect element style"), !1;
535
- }
536
- }
537
- function s(e) {
538
- for (var t = e, n = e.getRootNode && e.getRootNode(); t && t !== document.body;) {
539
- if (n && t === n && (t = n.host.parentNode), o(t)) return !1;
540
- t = t.parentNode;
541
- }
542
- return !0;
543
- }
544
- function c(e, t) {
545
- var n = e.nodeName.toLowerCase();
546
- return (i.test(n) && !e.disabled || n === "a" && e.href || t) && s(e);
547
- }
548
- function l(e) {
549
- var t = e.getAttribute("tabindex");
550
- t === null && (t = void 0);
551
- var n = isNaN(t);
552
- return (n || t >= 0) && c(e, !n);
553
- }
554
- function u(e) {
555
- return [].slice.call(e.querySelectorAll("*"), 0).reduce(function(e, t) {
556
- return e.concat(t.shadowRoot ? u(t.shadowRoot) : [t]);
557
- }, []).filter(l);
558
- }
559
- t.exports = e.default;
560
- })), S = /* @__PURE__ */ i(((e) => {
561
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = o, e.log = s, e.handleBlur = c, e.handleFocus = l, e.markForFocusLater = u, e.returnFocus = d, e.popWithoutFocus = f, e.setupScopedFocus = p, e.teardownScopedFocus = m;
562
- var t = n(x());
563
- function n(e) {
564
- return e && e.__esModule ? e : { default: e };
565
- }
566
- var r = [], i = null, a = !1;
567
- /* istanbul ignore next */
568
- function o() {
569
- r = [];
570
- }
571
- /* istanbul ignore next */
572
- function s() {
573
- process.env.NODE_ENV !== "production" && (console.log("focusManager ----------"), r.forEach(function(e) {
574
- var t = e || {};
575
- console.log(t.nodeName, t.className, t.id);
576
- }), console.log("end focusManager ----------"));
577
- }
578
- function c() {
579
- a = !0;
580
- }
581
- function l() {
582
- if (a) {
583
- if (a = !1, !i) return;
584
- setTimeout(function() {
585
- i.contains(document.activeElement) || ((0, t.default)(i)[0] || i).focus();
586
- }, 0);
587
- }
588
- }
589
- function u() {
590
- r.push(document.activeElement);
591
- }
592
- function d() {
593
- var e = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], t = null;
594
- try {
595
- r.length !== 0 && (t = r.pop(), t.focus({ preventScroll: e }));
596
- return;
597
- } catch (e) {
598
- console.warn([
599
- "You tried to return focus to",
600
- t,
601
- "but it is not in the DOM anymore"
602
- ].join(" "));
603
- }
604
- }
605
- function f() {
606
- r.length > 0 && r.pop();
607
- }
608
- function p(e) {
609
- i = e, window.addEventListener ? (window.addEventListener("blur", c, !1), document.addEventListener("focus", l, !0)) : (window.attachEvent("onBlur", c), document.attachEvent("onFocus", l));
610
- }
611
- function m() {
612
- i = null, window.addEventListener ? (window.removeEventListener("blur", c), document.removeEventListener("focus", l)) : (window.detachEvent("onBlur", c), document.detachEvent("onFocus", l));
613
- }
614
- })), C = /* @__PURE__ */ i(((e, t) => {
615
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
616
- var n = r(x());
617
- function r(e) {
618
- return e && e.__esModule ? e : { default: e };
619
- }
620
- function i() {
621
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
622
- return e.activeElement.shadowRoot ? i(e.activeElement.shadowRoot) : e.activeElement;
623
- }
624
- function a(e, t) {
625
- var r = (0, n.default)(e);
626
- if (!r.length) t.preventDefault();
627
- else {
628
- var a = void 0, o = t.shiftKey, s = r[0], c = r[r.length - 1], l = i();
629
- if (e === l) {
630
- if (!o) return;
631
- a = c;
632
- }
633
- if (c === l && !o && (a = s), s === l && o && (a = c), a) t.preventDefault(), a.focus();
634
- else {
635
- var u = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);
636
- if (u != null && u[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null) {
637
- var d = r.indexOf(l);
638
- d > -1 && (d += o ? -1 : 1), a = r[d], a === void 0 ? (t.preventDefault(), a = o ? c : s, a.focus()) : (t.preventDefault(), a.focus());
639
- }
640
- }
641
- }
642
- }
643
- t.exports = e.default;
644
- })), w = /* @__PURE__ */ i(((e, t) => {
645
- var n = process.env.NODE_ENV !== "production", r = function() {};
646
- if (n) {
647
- var i = function(e, t) {
648
- var n = arguments.length;
649
- t = Array(n > 1 ? n - 1 : 0);
650
- for (var r = 1; r < n; r++) t[r - 1] = arguments[r];
651
- var i = 0, a = "Warning: " + e.replace(/%s/g, function() {
652
- return t[i++];
653
- });
654
- typeof console < "u" && console.error(a);
655
- try {
656
- throw Error(a);
657
- } catch (e) {}
658
- };
659
- r = function(e, t, n) {
660
- var r = arguments.length;
661
- n = Array(r > 2 ? r - 2 : 0);
662
- for (var a = 2; a < r; a++) n[a - 2] = arguments[a];
663
- if (t === void 0) throw Error("`warning(condition, format, ...args)` requires a warning message argument");
664
- e || i.apply(null, [t].concat(n));
665
- };
666
- }
667
- t.exports = r;
668
- })), T = /* @__PURE__ */ i(((e, t) => {
669
- (function() {
670
- var e = !!(typeof window < "u" && window.document && window.document.createElement), n = {
671
- canUseDOM: e,
672
- canUseWorkers: typeof Worker < "u",
673
- canUseEventListeners: e && !!(window.addEventListener || window.attachEvent),
674
- canUseViewport: e && !!window.screen
675
- };
676
- typeof define == "function" && typeof define.amd == "object" && define.amd ? define(function() {
677
- return n;
678
- }) : t !== void 0 && t.exports ? t.exports = n : window.ExecutionEnvironment = n;
679
- })();
680
- })), E = /* @__PURE__ */ i(((e) => {
681
- Object.defineProperty(e, "__esModule", { value: !0 }), e.canUseDOM = e.SafeNodeList = e.SafeHTMLCollection = void 0;
682
- var t = n(T());
683
- function n(e) {
684
- return e && e.__esModule ? e : { default: e };
685
- }
686
- var r = t.default, i = r.canUseDOM ? window.HTMLElement : {};
687
- e.SafeHTMLCollection = r.canUseDOM ? window.HTMLCollection : {}, e.SafeNodeList = r.canUseDOM ? window.NodeList : {}, e.canUseDOM = r.canUseDOM, e.default = i;
688
- })), D = /* @__PURE__ */ i(((e) => {
689
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = a, e.log = o, e.assertNodeList = s, e.setElement = c, e.validateElement = l, e.hide = u, e.show = d, e.documentNotReadyOrSSRTesting = f;
690
- var t = r(w()), n = E();
691
- function r(e) {
692
- return e && e.__esModule ? e : { default: e };
693
- }
694
- var i = null;
695
- /* istanbul ignore next */
696
- function a() {
697
- i && (i.removeAttribute ? i.removeAttribute("aria-hidden") : i.length == null ? document.querySelectorAll(i).forEach(function(e) {
698
- return e.removeAttribute("aria-hidden");
699
- }) : i.forEach(function(e) {
700
- return e.removeAttribute("aria-hidden");
701
- })), i = null;
702
- }
703
- /* istanbul ignore next */
704
- function o() {
705
- if (process.env.NODE_ENV !== "production") {
706
- var e = i || {};
707
- console.log("ariaAppHider ----------"), console.log(e.nodeName, e.className, e.id), console.log("end ariaAppHider ----------");
708
- }
709
- }
710
- function s(e, t) {
711
- if (!e || !e.length) throw Error("react-modal: No elements were found for selector " + t + ".");
712
- }
713
- function c(e) {
714
- var t = e;
715
- if (typeof t == "string" && n.canUseDOM) {
716
- var r = document.querySelectorAll(t);
717
- s(r, t), t = r;
718
- }
719
- return i = t || i, i;
720
- }
721
- function l(e) {
722
- var n = e || i;
723
- return n ? Array.isArray(n) || n instanceof HTMLCollection || n instanceof NodeList ? n : [n] : ((0, t.default)(!1, [
724
- "react-modal: App element is not defined.",
725
- "Please use `Modal.setAppElement(el)` or set `appElement={el}`.",
726
- "This is needed so screen readers don't see main content",
727
- "when modal is opened. It is not recommended, but you can opt-out",
728
- "by setting `ariaHideApp={false}`."
729
- ].join(" ")), []);
730
- }
731
- function u(e) {
732
- var t = !0, n = !1, r = void 0;
733
- try {
734
- for (var i = l(e)[Symbol.iterator](), a; !(t = (a = i.next()).done); t = !0) a.value.setAttribute("aria-hidden", "true");
735
- } catch (e) {
736
- n = !0, r = e;
737
- } finally {
738
- try {
739
- !t && i.return && i.return();
740
- } finally {
741
- if (n) throw r;
742
- }
743
- }
744
- }
745
- function d(e) {
746
- var t = !0, n = !1, r = void 0;
747
- try {
748
- for (var i = l(e)[Symbol.iterator](), a; !(t = (a = i.next()).done); t = !0) a.value.removeAttribute("aria-hidden");
749
- } catch (e) {
750
- n = !0, r = e;
751
- } finally {
752
- try {
753
- !t && i.return && i.return();
754
- } finally {
755
- if (n) throw r;
756
- }
757
- }
758
- }
759
- function f() {
760
- i = null;
761
- }
762
- })), O = /* @__PURE__ */ i(((e) => {
763
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = i, e.log = a;
764
- var t = {}, n = {};
765
- /* istanbul ignore next */
766
- function r(e, t) {
767
- e.classList.remove(t);
768
- }
769
- /* istanbul ignore next */
770
- function i() {
771
- var e = document.getElementsByTagName("html")[0];
772
- for (var i in t) r(e, t[i]);
773
- var a = document.body;
774
- for (var o in n) r(a, n[o]);
775
- t = {}, n = {};
776
- }
777
- /* istanbul ignore next */
778
- function a() {
779
- if (process.env.NODE_ENV !== "production") {
780
- var e = document.getElementsByTagName("html")[0].className, r = "Show tracked classes:\n\n";
781
- for (var i in r += "<html /> (" + e + "):\n ", t) r += " " + i + " " + t[i] + "\n ";
782
- for (var a in e = document.body.className, r += "\n\ndoc.body (" + e + "):\n ", n) r += " " + a + " " + n[a] + "\n ";
783
- r += "\n", console.log(r);
784
- }
785
- }
786
- var o = function(e, t) {
787
- return e[t] || (e[t] = 0), e[t] += 1, t;
788
- }, s = function(e, t) {
789
- return e[t] && --e[t], t;
790
- }, c = function(e, t, n) {
791
- n.forEach(function(n) {
792
- o(t, n), e.add(n);
793
- });
794
- }, l = function(e, t, n) {
795
- n.forEach(function(n) {
796
- s(t, n), t[n] === 0 && e.remove(n);
797
- });
798
- };
799
- e.add = function(e, r) {
800
- return c(e.classList, e.nodeName.toLowerCase() == "html" ? t : n, r.split(" "));
801
- }, e.remove = function(e, r) {
802
- return l(e.classList, e.nodeName.toLowerCase() == "html" ? t : n, r.split(" "));
803
- };
804
- })), k = /* @__PURE__ */ i(((e) => {
805
- Object.defineProperty(e, "__esModule", { value: !0 }), e.log = i, e.resetState = a;
806
- function t(e, t) {
807
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
808
- }
809
- var n = function e() {
810
- var n = this;
811
- t(this, e), this.register = function(e) {
812
- n.openInstances.indexOf(e) === -1 ? (n.openInstances.push(e), n.emit("register")) : process.env.NODE_ENV !== "production" && console.warn("React-Modal: Cannot register modal instance that's already open");
813
- }, this.deregister = function(e) {
814
- var t = n.openInstances.indexOf(e);
815
- t === -1 ? process.env.NODE_ENV !== "production" && console.warn("React-Modal: Unable to deregister " + e + " as it was never registered") : (n.openInstances.splice(t, 1), n.emit("deregister"));
816
- }, this.subscribe = function(e) {
817
- n.subscribers.push(e);
818
- }, this.emit = function(e) {
819
- n.subscribers.forEach(function(t) {
820
- return t(e, n.openInstances.slice());
821
- });
822
- }, this.openInstances = [], this.subscribers = [];
823
- }, r = new n();
824
- /* istanbul ignore next */
825
- function i() {
826
- console.log("portalOpenInstances ----------"), console.log(r.openInstances.length), r.openInstances.forEach(function(e) {
827
- return console.log(e);
828
- }), console.log("end portalOpenInstances ----------");
829
- }
830
- /* istanbul ignore next */
831
- function a() {
832
- r = new n();
833
- }
834
- e.default = r;
835
- })), A = /* @__PURE__ */ i(((e) => {
836
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = o, e.log = s;
837
- var t = n(k());
838
- function n(e) {
839
- return e && e.__esModule ? e : { default: e };
840
- }
841
- var r = void 0, i = void 0, a = [];
842
- /* istanbul ignore next */
843
- function o() {
844
- for (var e = [r, i], t = 0; t < e.length; t++) {
845
- var n = e[t];
846
- n && n.parentNode && n.parentNode.removeChild(n);
847
- }
848
- r = i = null, a = [];
849
- }
850
- /* istanbul ignore next */
851
- function s() {
852
- console.log("bodyTrap ----------"), console.log(a.length);
853
- for (var e = [r, i], t = 0; t < e.length; t++) {
854
- var n = e[t] || {};
855
- console.log(n.nodeName, n.className, n.id);
856
- }
857
- console.log("edn bodyTrap ----------");
858
- }
859
- function c() {
860
- a.length === 0 ? process.env.NODE_ENV !== "production" && console.warn("React-Modal: Open instances > 0 expected") : a[a.length - 1].focusContent();
861
- }
862
- function l(e, t) {
863
- !r && !i && (r = document.createElement("div"), r.setAttribute("data-react-modal-body-trap", ""), r.style.position = "absolute", r.style.opacity = "0", r.setAttribute("tabindex", "0"), r.addEventListener("focus", c), i = r.cloneNode(), i.addEventListener("focus", c)), a = t, a.length > 0 ? (document.body.firstChild !== r && document.body.insertBefore(r, document.body.firstChild), document.body.lastChild !== i && document.body.appendChild(i)) : (r.parentElement && r.parentElement.removeChild(r), i.parentElement && i.parentElement.removeChild(i));
864
- }
865
- t.default.subscribe(l);
866
- })), j = /* @__PURE__ */ i(((e, t) => {
867
- Object.defineProperty(e, "__esModule", { value: !0 });
868
- var n = Object.assign || function(e) {
869
- for (var t = 1; t < arguments.length; t++) {
870
- var n = arguments[t];
871
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
872
- }
873
- return e;
874
- }, r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
875
- return typeof e;
876
- } : function(e) {
877
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
878
- }, i = function() {
879
- function e(e, t) {
880
- for (var n = 0; n < t.length; n++) {
881
- var r = t[n];
882
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
883
- }
884
- }
885
- return function(t, n, r) {
886
- return n && e(t.prototype, n), r && e(t, r), t;
887
- };
888
- }(), a = l(), o = g(b()), s = h(S()), c = g(C()), u = h(D()), d = h(O()), f = E(), p = g(f), m = g(k());
889
- A();
890
- function h(e) {
891
- if (e && e.__esModule) return e;
892
- var t = {};
893
- if (e != null) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
894
- return t.default = e, t;
895
- }
896
- function g(e) {
897
- return e && e.__esModule ? e : { default: e };
898
- }
899
- function _(e, t) {
900
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
901
- }
902
- function v(e, t) {
903
- if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
904
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
905
- }
906
- function y(e, t) {
907
- if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function, not " + typeof t);
908
- e.prototype = Object.create(t && t.prototype, { constructor: {
909
- value: e,
910
- enumerable: !1,
911
- writable: !0,
912
- configurable: !0
913
- } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
914
- }
915
- var x = {
916
- overlay: "ReactModal__Overlay",
917
- content: "ReactModal__Content"
918
- }, w = function(e) {
919
- return e.code === "Tab" || e.keyCode === 9;
920
- }, T = function(e) {
921
- return e.code === "Escape" || e.keyCode === 27;
922
- }, j = 0, M = function(e) {
923
- y(t, e);
924
- function t(e) {
925
- _(this, t);
926
- var n = v(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
927
- return n.setOverlayRef = function(e) {
928
- n.overlay = e, n.props.overlayRef && n.props.overlayRef(e);
929
- }, n.setContentRef = function(e) {
930
- n.content = e, n.props.contentRef && n.props.contentRef(e);
931
- }, n.afterClose = function() {
932
- var e = n.props, t = e.appElement, r = e.ariaHideApp, i = e.htmlOpenClassName, a = e.bodyOpenClassName, o = e.parentSelector, c = o && o().ownerDocument || document;
933
- a && d.remove(c.body, a), i && d.remove(c.getElementsByTagName("html")[0], i), r && j > 0 && (--j, j === 0 && u.show(t)), n.props.shouldFocusAfterRender && (n.props.shouldReturnFocusAfterClose ? (s.returnFocus(n.props.preventScroll), s.teardownScopedFocus()) : s.popWithoutFocus()), n.props.onAfterClose && n.props.onAfterClose(), m.default.deregister(n);
934
- }, n.open = function() {
935
- n.beforeOpen(), n.state.afterOpen && n.state.beforeClose ? (clearTimeout(n.closeTimer), n.setState({ beforeClose: !1 })) : (n.props.shouldFocusAfterRender && (s.setupScopedFocus(n.node), s.markForFocusLater()), n.setState({ isOpen: !0 }, function() {
936
- n.openAnimationFrame = requestAnimationFrame(function() {
937
- n.setState({ afterOpen: !0 }), n.props.isOpen && n.props.onAfterOpen && n.props.onAfterOpen({
938
- overlayEl: n.overlay,
939
- contentEl: n.content
940
- });
941
- });
942
- }));
943
- }, n.close = function() {
944
- n.props.closeTimeoutMS > 0 ? n.closeWithTimeout() : n.closeWithoutTimeout();
945
- }, n.focusContent = function() {
946
- return n.content && !n.contentHasFocus() && n.content.focus({ preventScroll: !0 });
947
- }, n.closeWithTimeout = function() {
948
- var e = Date.now() + n.props.closeTimeoutMS;
949
- n.setState({
950
- beforeClose: !0,
951
- closesAt: e
952
- }, function() {
953
- n.closeTimer = setTimeout(n.closeWithoutTimeout, n.state.closesAt - Date.now());
954
- });
955
- }, n.closeWithoutTimeout = function() {
956
- n.setState({
957
- beforeClose: !1,
958
- isOpen: !1,
959
- afterOpen: !1,
960
- closesAt: null
961
- }, n.afterClose);
962
- }, n.handleKeyDown = function(e) {
963
- w(e) && (0, c.default)(n.content, e), n.props.shouldCloseOnEsc && T(e) && (e.stopPropagation(), n.requestClose(e));
964
- }, n.handleOverlayOnClick = function(e) {
965
- n.shouldClose === null && (n.shouldClose = !0), n.shouldClose && n.props.shouldCloseOnOverlayClick && (n.ownerHandlesClose() ? n.requestClose(e) : n.focusContent()), n.shouldClose = null;
966
- }, n.handleContentOnMouseUp = function() {
967
- n.shouldClose = !1;
968
- }, n.handleOverlayOnMouseDown = function(e) {
969
- !n.props.shouldCloseOnOverlayClick && e.target == n.overlay && e.preventDefault();
970
- }, n.handleContentOnClick = function() {
971
- n.shouldClose = !1;
972
- }, n.handleContentOnMouseDown = function() {
973
- n.shouldClose = !1;
974
- }, n.requestClose = function(e) {
975
- return n.ownerHandlesClose() && n.props.onRequestClose(e);
976
- }, n.ownerHandlesClose = function() {
977
- return n.props.onRequestClose;
978
- }, n.shouldBeClosed = function() {
979
- return !n.state.isOpen && !n.state.beforeClose;
980
- }, n.contentHasFocus = function() {
981
- return document.activeElement === n.content || n.content.contains(document.activeElement);
982
- }, n.buildClassName = function(e, t) {
983
- var i = (t === void 0 ? "undefined" : r(t)) === "object" ? t : {
984
- base: x[e],
985
- afterOpen: x[e] + "--after-open",
986
- beforeClose: x[e] + "--before-close"
987
- }, a = i.base;
988
- return n.state.afterOpen && (a = a + " " + i.afterOpen), n.state.beforeClose && (a = a + " " + i.beforeClose), typeof t == "string" && t ? a + " " + t : a;
989
- }, n.attributesFromObject = function(e, t) {
990
- return Object.keys(t).reduce(function(n, r) {
991
- return n[e + "-" + r] = t[r], n;
992
- }, {});
993
- }, n.state = {
994
- afterOpen: !1,
995
- beforeClose: !1
996
- }, n.shouldClose = null, n.moveFromContentToOverlay = null, n;
997
- }
998
- return i(t, [
999
- {
1000
- key: "componentDidMount",
1001
- value: function() {
1002
- this.props.isOpen && this.open();
1003
- }
1004
- },
1005
- {
1006
- key: "componentDidUpdate",
1007
- value: function(e, t) {
1008
- process.env.NODE_ENV !== "production" && (e.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn("React-Modal: \"bodyOpenClassName\" prop has been modified. This may cause unexpected behavior when multiple modals are open."), e.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn("React-Modal: \"htmlOpenClassName\" prop has been modified. This may cause unexpected behavior when multiple modals are open.")), this.props.isOpen && !e.isOpen ? this.open() : !this.props.isOpen && e.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !t.isOpen && this.focusContent();
1009
- }
1010
- },
1011
- {
1012
- key: "componentWillUnmount",
1013
- value: function() {
1014
- this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
1015
- }
1016
- },
1017
- {
1018
- key: "beforeOpen",
1019
- value: function() {
1020
- var e = this.props, t = e.appElement, n = e.ariaHideApp, r = e.htmlOpenClassName, i = e.bodyOpenClassName, a = e.parentSelector, o = a && a().ownerDocument || document;
1021
- i && d.add(o.body, i), r && d.add(o.getElementsByTagName("html")[0], r), n && (j += 1, u.hide(t)), m.default.register(this);
1022
- }
1023
- },
1024
- {
1025
- key: "render",
1026
- value: function() {
1027
- var e = this.props, t = e.id, r = e.className, i = e.overlayClassName, a = e.defaultStyles, o = e.children, s = r ? {} : a.content, c = i ? {} : a.overlay;
1028
- if (this.shouldBeClosed()) return null;
1029
- var l = {
1030
- ref: this.setOverlayRef,
1031
- className: this.buildClassName("overlay", i),
1032
- style: n({}, c, this.props.style.overlay),
1033
- onClick: this.handleOverlayOnClick,
1034
- onMouseDown: this.handleOverlayOnMouseDown
1035
- }, u = n({
1036
- id: t,
1037
- ref: this.setContentRef,
1038
- style: n({}, s, this.props.style.content),
1039
- className: this.buildClassName("content", r),
1040
- tabIndex: "-1",
1041
- onKeyDown: this.handleKeyDown,
1042
- onMouseDown: this.handleContentOnMouseDown,
1043
- onMouseUp: this.handleContentOnMouseUp,
1044
- onClick: this.handleContentOnClick,
1045
- role: this.props.role,
1046
- "aria-label": this.props.contentLabel
1047
- }, this.attributesFromObject("aria", n({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), { "data-testid": this.props.testId }), d = this.props.contentElement(u, o);
1048
- return this.props.overlayElement(l, d);
1049
- }
1050
- }
1051
- ]), t;
1052
- }(a.Component);
1053
- M.defaultProps = {
1054
- style: {
1055
- overlay: {},
1056
- content: {}
1057
- },
1058
- defaultStyles: {}
1059
- }, M.propTypes = {
1060
- isOpen: o.default.bool.isRequired,
1061
- defaultStyles: o.default.shape({
1062
- content: o.default.object,
1063
- overlay: o.default.object
1064
- }),
1065
- style: o.default.shape({
1066
- content: o.default.object,
1067
- overlay: o.default.object
1068
- }),
1069
- className: o.default.oneOfType([o.default.string, o.default.object]),
1070
- overlayClassName: o.default.oneOfType([o.default.string, o.default.object]),
1071
- parentSelector: o.default.func,
1072
- bodyOpenClassName: o.default.string,
1073
- htmlOpenClassName: o.default.string,
1074
- ariaHideApp: o.default.bool,
1075
- appElement: o.default.oneOfType([
1076
- o.default.instanceOf(p.default),
1077
- o.default.instanceOf(f.SafeHTMLCollection),
1078
- o.default.instanceOf(f.SafeNodeList),
1079
- o.default.arrayOf(o.default.instanceOf(p.default))
1080
- ]),
1081
- onAfterOpen: o.default.func,
1082
- onAfterClose: o.default.func,
1083
- onRequestClose: o.default.func,
1084
- closeTimeoutMS: o.default.number,
1085
- shouldFocusAfterRender: o.default.bool,
1086
- shouldCloseOnOverlayClick: o.default.bool,
1087
- shouldReturnFocusAfterClose: o.default.bool,
1088
- preventScroll: o.default.bool,
1089
- role: o.default.string,
1090
- contentLabel: o.default.string,
1091
- aria: o.default.object,
1092
- data: o.default.object,
1093
- children: o.default.node,
1094
- shouldCloseOnEsc: o.default.bool,
1095
- overlayRef: o.default.func,
1096
- contentRef: o.default.func,
1097
- id: o.default.string,
1098
- overlayElement: o.default.func,
1099
- contentElement: o.default.func,
1100
- testId: o.default.string
1101
- }, e.default = M, t.exports = e.default;
1102
- })), M = /* @__PURE__ */ e({ polyfill: () => I });
1103
- function N() {
1104
- var e = this.constructor.getDerivedStateFromProps(this.props, this.state);
1105
- e != null && this.setState(e);
1106
- }
1107
- function P(e) {
1108
- function t(t) {
1109
- var n = this.constructor.getDerivedStateFromProps(e, t);
1110
- return n == null ? null : n;
1111
- }
1112
- this.setState(t.bind(this));
1113
- }
1114
- function F(e, t) {
1115
- try {
1116
- var n = this.props, r = this.state;
1117
- this.props = e, this.state = t, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(n, r);
1118
- } finally {
1119
- this.props = n, this.state = r;
1120
- }
1121
- }
1122
- function I(e) {
1123
- var t = e.prototype;
1124
- if (!t || !t.isReactComponent) throw Error("Can only polyfill class components");
1125
- if (typeof e.getDerivedStateFromProps != "function" && typeof t.getSnapshotBeforeUpdate != "function") return e;
1126
- var n = null, r = null, i = null;
1127
- if (typeof t.componentWillMount == "function" ? n = "componentWillMount" : typeof t.UNSAFE_componentWillMount == "function" && (n = "UNSAFE_componentWillMount"), typeof t.componentWillReceiveProps == "function" ? r = "componentWillReceiveProps" : typeof t.UNSAFE_componentWillReceiveProps == "function" && (r = "UNSAFE_componentWillReceiveProps"), typeof t.componentWillUpdate == "function" ? i = "componentWillUpdate" : typeof t.UNSAFE_componentWillUpdate == "function" && (i = "UNSAFE_componentWillUpdate"), n !== null || r !== null || i !== null) {
1128
- var a = e.displayName || e.name, o = typeof e.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
1129
- throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" + a + " uses " + o + " but also contains the following legacy lifecycles:" + (n === null ? "" : "\n " + n) + (r === null ? "" : "\n " + r) + (i === null ? "" : "\n " + i) + "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");
1130
- }
1131
- if (typeof e.getDerivedStateFromProps == "function" && (t.componentWillMount = N, t.componentWillReceiveProps = P), typeof t.getSnapshotBeforeUpdate == "function") {
1132
- if (typeof t.componentDidUpdate != "function") throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
1133
- t.componentWillUpdate = F;
1134
- var s = t.componentDidUpdate;
1135
- t.componentDidUpdate = function(e, t, n) {
1136
- var r = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : n;
1137
- s.call(this, e, t, r);
1138
- };
1139
- }
1140
- return e;
1141
- }
1142
- var L = t((() => {
1143
- N.__suppressDeprecationWarning = !0, P.__suppressDeprecationWarning = !0, F.__suppressDeprecationWarning = !0;
1144
- })), R = /* @__PURE__ */ i(((e) => {
1145
- Object.defineProperty(e, "__esModule", { value: !0 }), e.bodyOpenClassName = e.portalClassName = void 0;
1146
- var t = Object.assign || function(e) {
1147
- for (var t = 1; t < arguments.length; t++) {
1148
- var n = arguments[t];
1149
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1150
- }
1151
- return e;
1152
- }, n = function() {
1153
- function e(e, t) {
1154
- for (var n = 0; n < t.length; n++) {
1155
- var r = t[n];
1156
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1157
- }
1158
- }
1159
- return function(t, n, r) {
1160
- return n && e(t.prototype, n), r && e(t, r), t;
1161
- };
1162
- }(), i = l(), a = g(i), o = g(u()), s = g(b()), c = g(j()), d = h(D()), f = E(), p = g(f), m = (L(), r(M));
1163
- function h(e) {
1164
- if (e && e.__esModule) return e;
1165
- var t = {};
1166
- if (e != null) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
1167
- return t.default = e, t;
1168
- }
1169
- function g(e) {
1170
- return e && e.__esModule ? e : { default: e };
1171
- }
1172
- function _(e, t) {
1173
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1174
- }
1175
- function v(e, t) {
1176
- if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
1177
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
1178
- }
1179
- function y(e, t) {
1180
- if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function, not " + typeof t);
1181
- e.prototype = Object.create(t && t.prototype, { constructor: {
1182
- value: e,
1183
- enumerable: !1,
1184
- writable: !0,
1185
- configurable: !0
1186
- } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1187
- }
1188
- var x = e.portalClassName = "ReactModalPortal", S = e.bodyOpenClassName = "ReactModal__Body--open", C = f.canUseDOM && o.default.createPortal !== void 0, w = function(e) {
1189
- return document.createElement(e);
1190
- }, T = function() {
1191
- return C ? o.default.createPortal : o.default.unstable_renderSubtreeIntoContainer;
1192
- };
1193
- function O(e) {
1194
- return e();
1195
- }
1196
- var k = function(e) {
1197
- y(r, e);
1198
- function r() {
1199
- var e, n, i, s;
1200
- _(this, r);
1201
- var l = [...arguments];
1202
- return s = (n = (i = v(this, (e = r.__proto__ || Object.getPrototypeOf(r)).call.apply(e, [this].concat(l))), i), i.removePortal = function() {
1203
- !C && o.default.unmountComponentAtNode(i.node);
1204
- var e = O(i.props.parentSelector);
1205
- e && e.contains(i.node) ? e.removeChild(i.node) : console.warn("React-Modal: \"parentSelector\" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.");
1206
- }, i.portalRef = function(e) {
1207
- i.portal = e;
1208
- }, i.renderPortal = function(e) {
1209
- var n = T()(i, a.default.createElement(c.default, t({ defaultStyles: r.defaultStyles }, e)), i.node);
1210
- i.portalRef(n);
1211
- }, n), v(i, s);
1212
- }
1213
- return n(r, [
1214
- {
1215
- key: "componentDidMount",
1216
- value: function() {
1217
- f.canUseDOM && (C || (this.node = w("div")), this.node.className = this.props.portalClassName, O(this.props.parentSelector).appendChild(this.node), !C && this.renderPortal(this.props));
1218
- }
1219
- },
1220
- {
1221
- key: "getSnapshotBeforeUpdate",
1222
- value: function(e) {
1223
- return {
1224
- prevParent: O(e.parentSelector),
1225
- nextParent: O(this.props.parentSelector)
1226
- };
1227
- }
1228
- },
1229
- {
1230
- key: "componentDidUpdate",
1231
- value: function(e, t, n) {
1232
- if (f.canUseDOM) {
1233
- var r = this.props, i = r.isOpen, a = r.portalClassName;
1234
- e.portalClassName !== a && (this.node.className = a);
1235
- var o = n.prevParent, s = n.nextParent;
1236
- s !== o && (o.removeChild(this.node), s.appendChild(this.node)), (e.isOpen || i) && !C && this.renderPortal(this.props);
1237
- }
1238
- }
1239
- },
1240
- {
1241
- key: "componentWillUnmount",
1242
- value: function() {
1243
- if (f.canUseDOM && this.node && this.portal) {
1244
- var e = this.portal.state, t = Date.now(), n = e.isOpen && this.props.closeTimeoutMS && (e.closesAt || t + this.props.closeTimeoutMS);
1245
- n ? (e.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, n - t)) : this.removePortal();
1246
- }
1247
- }
1248
- },
1249
- {
1250
- key: "render",
1251
- value: function() {
1252
- return !f.canUseDOM || !C ? null : (!this.node && C && (this.node = w("div")), T()(a.default.createElement(c.default, t({
1253
- ref: this.portalRef,
1254
- defaultStyles: r.defaultStyles
1255
- }, this.props)), this.node));
1256
- }
1257
- }
1258
- ], [{
1259
- key: "setAppElement",
1260
- value: function(e) {
1261
- d.setElement(e);
1262
- }
1263
- }]), r;
1264
- }(i.Component);
1265
- k.propTypes = {
1266
- isOpen: s.default.bool.isRequired,
1267
- style: s.default.shape({
1268
- content: s.default.object,
1269
- overlay: s.default.object
1270
- }),
1271
- portalClassName: s.default.string,
1272
- bodyOpenClassName: s.default.string,
1273
- htmlOpenClassName: s.default.string,
1274
- className: s.default.oneOfType([s.default.string, s.default.shape({
1275
- base: s.default.string.isRequired,
1276
- afterOpen: s.default.string.isRequired,
1277
- beforeClose: s.default.string.isRequired
1278
- })]),
1279
- overlayClassName: s.default.oneOfType([s.default.string, s.default.shape({
1280
- base: s.default.string.isRequired,
1281
- afterOpen: s.default.string.isRequired,
1282
- beforeClose: s.default.string.isRequired
1283
- })]),
1284
- appElement: s.default.oneOfType([
1285
- s.default.instanceOf(p.default),
1286
- s.default.instanceOf(f.SafeHTMLCollection),
1287
- s.default.instanceOf(f.SafeNodeList),
1288
- s.default.arrayOf(s.default.instanceOf(p.default))
1289
- ]),
1290
- onAfterOpen: s.default.func,
1291
- onRequestClose: s.default.func,
1292
- closeTimeoutMS: s.default.number,
1293
- ariaHideApp: s.default.bool,
1294
- shouldFocusAfterRender: s.default.bool,
1295
- shouldCloseOnOverlayClick: s.default.bool,
1296
- shouldReturnFocusAfterClose: s.default.bool,
1297
- preventScroll: s.default.bool,
1298
- parentSelector: s.default.func,
1299
- aria: s.default.object,
1300
- data: s.default.object,
1301
- role: s.default.string,
1302
- contentLabel: s.default.string,
1303
- shouldCloseOnEsc: s.default.bool,
1304
- overlayRef: s.default.func,
1305
- contentRef: s.default.func,
1306
- id: s.default.string,
1307
- overlayElement: s.default.func,
1308
- contentElement: s.default.func
1309
- }, k.defaultProps = {
1310
- isOpen: !1,
1311
- portalClassName: x,
1312
- bodyOpenClassName: S,
1313
- role: "dialog",
1314
- ariaHideApp: !0,
1315
- closeTimeoutMS: 0,
1316
- shouldFocusAfterRender: !0,
1317
- shouldCloseOnEsc: !0,
1318
- shouldCloseOnOverlayClick: !0,
1319
- shouldReturnFocusAfterClose: !0,
1320
- preventScroll: !1,
1321
- parentSelector: function() {
1322
- return document.body;
1323
- },
1324
- overlayElement: function(e, t) {
1325
- return a.default.createElement("div", e, t);
1326
- },
1327
- contentElement: function(e, t) {
1328
- return a.default.createElement("div", e, t);
1329
- }
1330
- }, k.defaultStyles = {
1331
- overlay: {
1332
- position: "fixed",
1333
- top: 0,
1334
- left: 0,
1335
- right: 0,
1336
- bottom: 0,
1337
- backgroundColor: "rgba(255, 255, 255, 0.75)"
1338
- },
1339
- content: {
1340
- position: "absolute",
1341
- top: "40px",
1342
- left: "40px",
1343
- right: "40px",
1344
- bottom: "40px",
1345
- border: "1px solid #ccc",
1346
- background: "#fff",
1347
- overflow: "auto",
1348
- WebkitOverflowScrolling: "touch",
1349
- borderRadius: "4px",
1350
- outline: "none",
1351
- padding: "20px"
1352
- }
1353
- }, (0, m.polyfill)(k), process.env.NODE_ENV !== "production" && (k.setCreateHTMLElement = function(e) {
1354
- return w = e;
1355
- }), e.default = k;
1356
- })), z = (/* @__PURE__ */ a((/* @__PURE__ */ i(((e, t) => {
1357
- Object.defineProperty(e, "__esModule", { value: !0 });
1358
- var n = r(R());
1359
- function r(e) {
1360
- return e && e.__esModule ? e : { default: e };
1361
- }
1362
- e.default = n.default, t.exports = e.default;
1363
- })))(), 1)).default;
1364
- export { z as Modal };
1365
-
1366
- //# sourceMappingURL=modal.js.map
1
+ export { default as Modal } from "react-modal";