@variamosple/variamos-components 0.0.23 → 0.1.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.
Files changed (34) hide show
  1. package/dist/Components/AuthWrapper/index.js +18 -38
  2. package/dist/Components/ConfirmationModal/index.d.ts +1 -1
  3. package/dist/Components/ConfirmationModal/index.js +19 -280
  4. package/dist/Components/Footer/index.js +6 -6
  5. package/dist/Components/Header/BugFormModal.d.ts +14 -0
  6. package/dist/Components/Header/BugFormModal.js +100 -0
  7. package/dist/Components/Header/HeaderOptions.js +85 -31
  8. package/dist/Components/Header/MenuItem.js +19 -20
  9. package/dist/Components/Header/SubHeader.js +35 -9
  10. package/dist/Components/Header/index.js +24 -25
  11. package/dist/Components/NotAuthorized/index.js +10 -11
  12. package/dist/Components/Paginator/index.js +56 -128
  13. package/dist/Components/ProtectedRoute/index.js +10 -10
  14. package/dist/Context/AnalyticsContext.js +7 -7
  15. package/dist/Context/MenuContext.js +16 -16
  16. package/dist/Context/SessionContext.js +35 -35
  17. package/dist/HOC/WithPageVisit.d.ts +1 -1
  18. package/dist/HOC/WithPageVisit.js +6 -6
  19. package/dist/assets/index.css +1 -1
  20. package/package.json +10 -7
  21. package/dist/AbstractModalHeader-UzCRSxIO.js +0 -1690
  22. package/dist/Anchor-DJG5WYYF.js +0 -40
  23. package/dist/Button-DWo2Fl71.js +0 -78
  24. package/dist/Button-GQJKgb76.js +0 -33
  25. package/dist/Container-BLjzOisH.js +0 -22
  26. package/dist/Nav-CdxSljzW.js +0 -144
  27. package/dist/NavDropdown-AuV3RgfC.js +0 -1764
  28. package/dist/NavLink-ebvp1HCw.js +0 -173
  29. package/dist/SubHeader-gTVD9DIX.js +0 -481
  30. package/dist/ThemeProvider-Q3gZ4GF2.js +0 -72
  31. package/dist/jsx-runtime-Drh4NO5G.js +0 -633
  32. package/dist/useEventCallback-Bfo0-hwZ.js +0 -16
  33. package/dist/useMergedRefs-BpAaCckn.js +0 -16
  34. package/dist/useWindow-rGE2GXIv.js +0 -118
@@ -1,1690 +0,0 @@
1
- import * as X from "react";
2
- import ne, { useRef as G, useCallback as W, useLayoutEffect as vt, useEffect as oe, useState as ke, cloneElement as Le, forwardRef as ht, useImperativeHandle as yt, useContext as Et } from "react";
3
- import { g as mt, c as $e } from "./ThemeProvider-Q3gZ4GF2.js";
4
- import { j as B } from "./jsx-runtime-Drh4NO5G.js";
5
- import { o as We, _ as gt, l as Te, u as bt, d as Tt, f as Fe, c as ct, g as xt, h as Rt, i as Ge, q as ue, b as Ot } from "./useWindow-rGE2GXIv.js";
6
- import le from "react-dom";
7
- import { u as ee } from "./useEventCallback-Bfo0-hwZ.js";
8
- import { u as qe } from "./useMergedRefs-BpAaCckn.js";
9
- function De(e, t) {
10
- return De = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
11
- return n.__proto__ = r, n;
12
- }, De(e, t);
13
- }
14
- function St(e, t) {
15
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, De(e, t);
16
- }
17
- function Ct(e) {
18
- var t = We(e);
19
- return t && t.defaultView || window;
20
- }
21
- function wt(e, t) {
22
- return Ct(e).getComputedStyle(e, t);
23
- }
24
- var Pt = /([A-Z])/g;
25
- function _t(e) {
26
- return e.replace(Pt, "-$1").toLowerCase();
27
- }
28
- var At = /^ms-/;
29
- function me(e) {
30
- return _t(e).replace(At, "-ms-");
31
- }
32
- var Mt = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
33
- function jt(e) {
34
- return !!(e && Mt.test(e));
35
- }
36
- function re(e, t) {
37
- var n = "", r = "";
38
- if (typeof t == "string")
39
- return e.style.getPropertyValue(me(t)) || wt(e).getPropertyValue(me(t));
40
- Object.keys(t).forEach(function(i) {
41
- var o = t[i];
42
- !o && o !== 0 ? e.style.removeProperty(me(i)) : jt(i) ? r += i + "(" + o + ") " : n += me(i) + ": " + o + ";";
43
- }), r && (n += "transform: " + r + ";"), e.style.cssText += ";" + n;
44
- }
45
- var ge = { exports: {} }, be = { exports: {} }, w = {};
46
- /** @license React v16.13.1
47
- * react-is.production.min.js
48
- *
49
- * Copyright (c) Facebook, Inc. and its affiliates.
50
- *
51
- * This source code is licensed under the MIT license found in the
52
- * LICENSE file in the root directory of this source tree.
53
- */
54
- var ze;
55
- function Nt() {
56
- if (ze) return w;
57
- ze = 1;
58
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, M = e ? Symbol.for("react.memo") : 60115, j = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, I = e ? Symbol.for("react.fundamental") : 60117, L = e ? Symbol.for("react.responder") : 60118, V = e ? Symbol.for("react.scope") : 60119;
59
- function N(c) {
60
- if (typeof c == "object" && c !== null) {
61
- var F = c.$$typeof;
62
- switch (F) {
63
- case t:
64
- switch (c = c.type, c) {
65
- case d:
66
- case p:
67
- case r:
68
- case o:
69
- case i:
70
- case y:
71
- return c;
72
- default:
73
- switch (c = c && c.$$typeof, c) {
74
- case u:
75
- case v:
76
- case j:
77
- case M:
78
- case s:
79
- return c;
80
- default:
81
- return F;
82
- }
83
- }
84
- case n:
85
- return F;
86
- }
87
- }
88
- }
89
- function A(c) {
90
- return N(c) === p;
91
- }
92
- return w.AsyncMode = d, w.ConcurrentMode = p, w.ContextConsumer = u, w.ContextProvider = s, w.Element = t, w.ForwardRef = v, w.Fragment = r, w.Lazy = j, w.Memo = M, w.Portal = n, w.Profiler = o, w.StrictMode = i, w.Suspense = y, w.isAsyncMode = function(c) {
93
- return A(c) || N(c) === d;
94
- }, w.isConcurrentMode = A, w.isContextConsumer = function(c) {
95
- return N(c) === u;
96
- }, w.isContextProvider = function(c) {
97
- return N(c) === s;
98
- }, w.isElement = function(c) {
99
- return typeof c == "object" && c !== null && c.$$typeof === t;
100
- }, w.isForwardRef = function(c) {
101
- return N(c) === v;
102
- }, w.isFragment = function(c) {
103
- return N(c) === r;
104
- }, w.isLazy = function(c) {
105
- return N(c) === j;
106
- }, w.isMemo = function(c) {
107
- return N(c) === M;
108
- }, w.isPortal = function(c) {
109
- return N(c) === n;
110
- }, w.isProfiler = function(c) {
111
- return N(c) === o;
112
- }, w.isStrictMode = function(c) {
113
- return N(c) === i;
114
- }, w.isSuspense = function(c) {
115
- return N(c) === y;
116
- }, w.isValidElementType = function(c) {
117
- return typeof c == "string" || typeof c == "function" || c === r || c === p || c === o || c === i || c === y || c === S || typeof c == "object" && c !== null && (c.$$typeof === j || c.$$typeof === M || c.$$typeof === s || c.$$typeof === u || c.$$typeof === v || c.$$typeof === I || c.$$typeof === L || c.$$typeof === V || c.$$typeof === _);
118
- }, w.typeOf = N, w;
119
- }
120
- var P = {};
121
- /** @license React v16.13.1
122
- * react-is.development.js
123
- *
124
- * Copyright (c) Facebook, Inc. and its affiliates.
125
- *
126
- * This source code is licensed under the MIT license found in the
127
- * LICENSE file in the root directory of this source tree.
128
- */
129
- var He;
130
- function Dt() {
131
- return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
132
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, M = e ? Symbol.for("react.memo") : 60115, j = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, I = e ? Symbol.for("react.fundamental") : 60117, L = e ? Symbol.for("react.responder") : 60118, V = e ? Symbol.for("react.scope") : 60119;
133
- function N(f) {
134
- return typeof f == "string" || typeof f == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
135
- f === r || f === p || f === o || f === i || f === y || f === S || typeof f == "object" && f !== null && (f.$$typeof === j || f.$$typeof === M || f.$$typeof === s || f.$$typeof === u || f.$$typeof === v || f.$$typeof === I || f.$$typeof === L || f.$$typeof === V || f.$$typeof === _);
136
- }
137
- function A(f) {
138
- if (typeof f == "object" && f !== null) {
139
- var Y = f.$$typeof;
140
- switch (Y) {
141
- case t:
142
- var H = f.type;
143
- switch (H) {
144
- case d:
145
- case p:
146
- case r:
147
- case o:
148
- case i:
149
- case y:
150
- return H;
151
- default:
152
- var D = H && H.$$typeof;
153
- switch (D) {
154
- case u:
155
- case v:
156
- case j:
157
- case M:
158
- case s:
159
- return D;
160
- default:
161
- return Y;
162
- }
163
- }
164
- case n:
165
- return Y;
166
- }
167
- }
168
- }
169
- var c = d, F = p, z = u, ie = s, de = t, ae = v, se = r, pe = j, ve = M, J = n, he = o, $ = i, U = y, k = !1;
170
- function ye(f) {
171
- return k || (k = !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.")), a(f) || A(f) === d;
172
- }
173
- function a(f) {
174
- return A(f) === p;
175
- }
176
- function l(f) {
177
- return A(f) === u;
178
- }
179
- function b(f) {
180
- return A(f) === s;
181
- }
182
- function E(f) {
183
- return typeof f == "object" && f !== null && f.$$typeof === t;
184
- }
185
- function h(f) {
186
- return A(f) === v;
187
- }
188
- function x(f) {
189
- return A(f) === r;
190
- }
191
- function g(f) {
192
- return A(f) === j;
193
- }
194
- function T(f) {
195
- return A(f) === M;
196
- }
197
- function O(f) {
198
- return A(f) === n;
199
- }
200
- function C(f) {
201
- return A(f) === o;
202
- }
203
- function R(f) {
204
- return A(f) === i;
205
- }
206
- function q(f) {
207
- return A(f) === y;
208
- }
209
- P.AsyncMode = c, P.ConcurrentMode = F, P.ContextConsumer = z, P.ContextProvider = ie, P.Element = de, P.ForwardRef = ae, P.Fragment = se, P.Lazy = pe, P.Memo = ve, P.Portal = J, P.Profiler = he, P.StrictMode = $, P.Suspense = U, P.isAsyncMode = ye, P.isConcurrentMode = a, P.isContextConsumer = l, P.isContextProvider = b, P.isElement = E, P.isForwardRef = h, P.isFragment = x, P.isLazy = g, P.isMemo = T, P.isPortal = O, P.isProfiler = C, P.isStrictMode = R, P.isSuspense = q, P.isValidElementType = N, P.typeOf = A;
210
- }()), P;
211
- }
212
- var Xe;
213
- function ft() {
214
- return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? be.exports = Nt() : be.exports = Dt()), be.exports;
215
- }
216
- /*
217
- object-assign
218
- (c) Sindre Sorhus
219
- @license MIT
220
- */
221
- var Oe, Ke;
222
- function It() {
223
- if (Ke) return Oe;
224
- Ke = 1;
225
- var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
226
- function r(o) {
227
- if (o == null)
228
- throw new TypeError("Object.assign cannot be called with null or undefined");
229
- return Object(o);
230
- }
231
- function i() {
232
- try {
233
- if (!Object.assign)
234
- return !1;
235
- var o = new String("abc");
236
- if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
237
- return !1;
238
- for (var s = {}, u = 0; u < 10; u++)
239
- s["_" + String.fromCharCode(u)] = u;
240
- var d = Object.getOwnPropertyNames(s).map(function(v) {
241
- return s[v];
242
- });
243
- if (d.join("") !== "0123456789")
244
- return !1;
245
- var p = {};
246
- return "abcdefghijklmnopqrst".split("").forEach(function(v) {
247
- p[v] = v;
248
- }), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
249
- } catch {
250
- return !1;
251
- }
252
- }
253
- return Oe = i() ? Object.assign : function(o, s) {
254
- for (var u, d = r(o), p, v = 1; v < arguments.length; v++) {
255
- u = Object(arguments[v]);
256
- for (var y in u)
257
- t.call(u, y) && (d[y] = u[y]);
258
- if (e) {
259
- p = e(u);
260
- for (var S = 0; S < p.length; S++)
261
- n.call(u, p[S]) && (d[p[S]] = u[p[S]]);
262
- }
263
- }
264
- return d;
265
- }, Oe;
266
- }
267
- var Se, Je;
268
- function Be() {
269
- if (Je) return Se;
270
- Je = 1;
271
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
272
- return Se = e, Se;
273
- }
274
- var Ce, Ze;
275
- function lt() {
276
- return Ze || (Ze = 1, Ce = Function.call.bind(Object.prototype.hasOwnProperty)), Ce;
277
- }
278
- var we, Qe;
279
- function kt() {
280
- if (Qe) return we;
281
- Qe = 1;
282
- var e = function() {
283
- };
284
- if (process.env.NODE_ENV !== "production") {
285
- var t = /* @__PURE__ */ Be(), n = {}, r = /* @__PURE__ */ lt();
286
- e = function(o) {
287
- var s = "Warning: " + o;
288
- typeof console < "u" && console.error(s);
289
- try {
290
- throw new Error(s);
291
- } catch {
292
- }
293
- };
294
- }
295
- function i(o, s, u, d, p) {
296
- if (process.env.NODE_ENV !== "production") {
297
- for (var v in o)
298
- if (r(o, v)) {
299
- var y;
300
- try {
301
- if (typeof o[v] != "function") {
302
- var S = Error(
303
- (d || "React class") + ": " + u + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
304
- );
305
- throw S.name = "Invariant Violation", S;
306
- }
307
- y = o[v](s, v, d, u, null, t);
308
- } catch (j) {
309
- y = j;
310
- }
311
- if (y && !(y instanceof Error) && e(
312
- (d || "React class") + ": type specification of " + u + " `" + v + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof y + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
313
- ), y instanceof Error && !(y.message in n)) {
314
- n[y.message] = !0;
315
- var M = p ? p() : "";
316
- e(
317
- "Failed " + u + " type: " + y.message + (M ?? "")
318
- );
319
- }
320
- }
321
- }
322
- }
323
- return i.resetWarningCache = function() {
324
- process.env.NODE_ENV !== "production" && (n = {});
325
- }, we = i, we;
326
- }
327
- var Pe, et;
328
- function Lt() {
329
- if (et) return Pe;
330
- et = 1;
331
- var e = ft(), t = It(), n = /* @__PURE__ */ Be(), r = /* @__PURE__ */ lt(), i = /* @__PURE__ */ kt(), o = function() {
332
- };
333
- process.env.NODE_ENV !== "production" && (o = function(u) {
334
- var d = "Warning: " + u;
335
- typeof console < "u" && console.error(d);
336
- try {
337
- throw new Error(d);
338
- } catch {
339
- }
340
- });
341
- function s() {
342
- return null;
343
- }
344
- return Pe = function(u, d) {
345
- var p = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
346
- function y(a) {
347
- var l = a && (p && a[p] || a[v]);
348
- if (typeof l == "function")
349
- return l;
350
- }
351
- var S = "<<anonymous>>", M = {
352
- array: L("array"),
353
- bigint: L("bigint"),
354
- bool: L("boolean"),
355
- func: L("function"),
356
- number: L("number"),
357
- object: L("object"),
358
- string: L("string"),
359
- symbol: L("symbol"),
360
- any: V(),
361
- arrayOf: N,
362
- element: A(),
363
- elementType: c(),
364
- instanceOf: F,
365
- node: ae(),
366
- objectOf: ie,
367
- oneOf: z,
368
- oneOfType: de,
369
- shape: pe,
370
- exact: ve
371
- };
372
- function j(a, l) {
373
- return a === l ? a !== 0 || 1 / a === 1 / l : a !== a && l !== l;
374
- }
375
- function _(a, l) {
376
- this.message = a, this.data = l && typeof l == "object" ? l : {}, this.stack = "";
377
- }
378
- _.prototype = Error.prototype;
379
- function I(a) {
380
- if (process.env.NODE_ENV !== "production")
381
- var l = {}, b = 0;
382
- function E(x, g, T, O, C, R, q) {
383
- if (O = O || S, R = R || T, q !== n) {
384
- if (d) {
385
- var f = new Error(
386
- "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"
387
- );
388
- throw f.name = "Invariant Violation", f;
389
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
390
- var Y = O + ":" + T;
391
- !l[Y] && // Avoid spamming the console because they are often not actionable except for lib authors
392
- b < 3 && (o(
393
- "You are manually calling a React.PropTypes validation function for the `" + R + "` prop on `" + O + "`. 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."
394
- ), l[Y] = !0, b++);
395
- }
396
- }
397
- return g[T] == null ? x ? g[T] === null ? new _("The " + C + " `" + R + "` is marked as required " + ("in `" + O + "`, but its value is `null`.")) : new _("The " + C + " `" + R + "` is marked as required in " + ("`" + O + "`, but its value is `undefined`.")) : null : a(g, T, O, C, R);
398
- }
399
- var h = E.bind(null, !1);
400
- return h.isRequired = E.bind(null, !0), h;
401
- }
402
- function L(a) {
403
- function l(b, E, h, x, g, T) {
404
- var O = b[E], C = $(O);
405
- if (C !== a) {
406
- var R = U(O);
407
- return new _(
408
- "Invalid " + x + " `" + g + "` of type " + ("`" + R + "` supplied to `" + h + "`, expected ") + ("`" + a + "`."),
409
- { expectedType: a }
410
- );
411
- }
412
- return null;
413
- }
414
- return I(l);
415
- }
416
- function V() {
417
- return I(s);
418
- }
419
- function N(a) {
420
- function l(b, E, h, x, g) {
421
- if (typeof a != "function")
422
- return new _("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
423
- var T = b[E];
424
- if (!Array.isArray(T)) {
425
- var O = $(T);
426
- return new _("Invalid " + x + " `" + g + "` of type " + ("`" + O + "` supplied to `" + h + "`, expected an array."));
427
- }
428
- for (var C = 0; C < T.length; C++) {
429
- var R = a(T, C, h, x, g + "[" + C + "]", n);
430
- if (R instanceof Error)
431
- return R;
432
- }
433
- return null;
434
- }
435
- return I(l);
436
- }
437
- function A() {
438
- function a(l, b, E, h, x) {
439
- var g = l[b];
440
- if (!u(g)) {
441
- var T = $(g);
442
- return new _("Invalid " + h + " `" + x + "` of type " + ("`" + T + "` supplied to `" + E + "`, expected a single ReactElement."));
443
- }
444
- return null;
445
- }
446
- return I(a);
447
- }
448
- function c() {
449
- function a(l, b, E, h, x) {
450
- var g = l[b];
451
- if (!e.isValidElementType(g)) {
452
- var T = $(g);
453
- return new _("Invalid " + h + " `" + x + "` of type " + ("`" + T + "` supplied to `" + E + "`, expected a single ReactElement type."));
454
- }
455
- return null;
456
- }
457
- return I(a);
458
- }
459
- function F(a) {
460
- function l(b, E, h, x, g) {
461
- if (!(b[E] instanceof a)) {
462
- var T = a.name || S, O = ye(b[E]);
463
- return new _("Invalid " + x + " `" + g + "` of type " + ("`" + O + "` supplied to `" + h + "`, expected ") + ("instance of `" + T + "`."));
464
- }
465
- return null;
466
- }
467
- return I(l);
468
- }
469
- function z(a) {
470
- if (!Array.isArray(a))
471
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
472
- "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])."
473
- ) : o("Invalid argument supplied to oneOf, expected an array.")), s;
474
- function l(b, E, h, x, g) {
475
- for (var T = b[E], O = 0; O < a.length; O++)
476
- if (j(T, a[O]))
477
- return null;
478
- var C = JSON.stringify(a, function(q, f) {
479
- var Y = U(f);
480
- return Y === "symbol" ? String(f) : f;
481
- });
482
- return new _("Invalid " + x + " `" + g + "` of value `" + String(T) + "` " + ("supplied to `" + h + "`, expected one of " + C + "."));
483
- }
484
- return I(l);
485
- }
486
- function ie(a) {
487
- function l(b, E, h, x, g) {
488
- if (typeof a != "function")
489
- return new _("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
490
- var T = b[E], O = $(T);
491
- if (O !== "object")
492
- return new _("Invalid " + x + " `" + g + "` of type " + ("`" + O + "` supplied to `" + h + "`, expected an object."));
493
- for (var C in T)
494
- if (r(T, C)) {
495
- var R = a(T, C, h, x, g + "." + C, n);
496
- if (R instanceof Error)
497
- return R;
498
- }
499
- return null;
500
- }
501
- return I(l);
502
- }
503
- function de(a) {
504
- if (!Array.isArray(a))
505
- return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
506
- for (var l = 0; l < a.length; l++) {
507
- var b = a[l];
508
- if (typeof b != "function")
509
- return o(
510
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + k(b) + " at index " + l + "."
511
- ), s;
512
- }
513
- function E(h, x, g, T, O) {
514
- for (var C = [], R = 0; R < a.length; R++) {
515
- var q = a[R], f = q(h, x, g, T, O, n);
516
- if (f == null)
517
- return null;
518
- f.data && r(f.data, "expectedType") && C.push(f.data.expectedType);
519
- }
520
- var Y = C.length > 0 ? ", expected one of type [" + C.join(", ") + "]" : "";
521
- return new _("Invalid " + T + " `" + O + "` supplied to " + ("`" + g + "`" + Y + "."));
522
- }
523
- return I(E);
524
- }
525
- function ae() {
526
- function a(l, b, E, h, x) {
527
- return J(l[b]) ? null : new _("Invalid " + h + " `" + x + "` supplied to " + ("`" + E + "`, expected a ReactNode."));
528
- }
529
- return I(a);
530
- }
531
- function se(a, l, b, E, h) {
532
- return new _(
533
- (a || "React class") + ": " + l + " type `" + b + "." + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
534
- );
535
- }
536
- function pe(a) {
537
- function l(b, E, h, x, g) {
538
- var T = b[E], O = $(T);
539
- if (O !== "object")
540
- return new _("Invalid " + x + " `" + g + "` of type `" + O + "` " + ("supplied to `" + h + "`, expected `object`."));
541
- for (var C in a) {
542
- var R = a[C];
543
- if (typeof R != "function")
544
- return se(h, x, g, C, U(R));
545
- var q = R(T, C, h, x, g + "." + C, n);
546
- if (q)
547
- return q;
548
- }
549
- return null;
550
- }
551
- return I(l);
552
- }
553
- function ve(a) {
554
- function l(b, E, h, x, g) {
555
- var T = b[E], O = $(T);
556
- if (O !== "object")
557
- return new _("Invalid " + x + " `" + g + "` of type `" + O + "` " + ("supplied to `" + h + "`, expected `object`."));
558
- var C = t({}, b[E], a);
559
- for (var R in C) {
560
- var q = a[R];
561
- if (r(a, R) && typeof q != "function")
562
- return se(h, x, g, R, U(q));
563
- if (!q)
564
- return new _(
565
- "Invalid " + x + " `" + g + "` key `" + R + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(b[E], null, " ") + `
566
- Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
567
- );
568
- var f = q(T, R, h, x, g + "." + R, n);
569
- if (f)
570
- return f;
571
- }
572
- return null;
573
- }
574
- return I(l);
575
- }
576
- function J(a) {
577
- switch (typeof a) {
578
- case "number":
579
- case "string":
580
- case "undefined":
581
- return !0;
582
- case "boolean":
583
- return !a;
584
- case "object":
585
- if (Array.isArray(a))
586
- return a.every(J);
587
- if (a === null || u(a))
588
- return !0;
589
- var l = y(a);
590
- if (l) {
591
- var b = l.call(a), E;
592
- if (l !== a.entries) {
593
- for (; !(E = b.next()).done; )
594
- if (!J(E.value))
595
- return !1;
596
- } else
597
- for (; !(E = b.next()).done; ) {
598
- var h = E.value;
599
- if (h && !J(h[1]))
600
- return !1;
601
- }
602
- } else
603
- return !1;
604
- return !0;
605
- default:
606
- return !1;
607
- }
608
- }
609
- function he(a, l) {
610
- return a === "symbol" ? !0 : l ? l["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && l instanceof Symbol : !1;
611
- }
612
- function $(a) {
613
- var l = typeof a;
614
- return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : he(l, a) ? "symbol" : l;
615
- }
616
- function U(a) {
617
- if (typeof a > "u" || a === null)
618
- return "" + a;
619
- var l = $(a);
620
- if (l === "object") {
621
- if (a instanceof Date)
622
- return "date";
623
- if (a instanceof RegExp)
624
- return "regexp";
625
- }
626
- return l;
627
- }
628
- function k(a) {
629
- var l = U(a);
630
- switch (l) {
631
- case "array":
632
- case "object":
633
- return "an " + l;
634
- case "boolean":
635
- case "date":
636
- case "regexp":
637
- return "a " + l;
638
- default:
639
- return l;
640
- }
641
- }
642
- function ye(a) {
643
- return !a.constructor || !a.constructor.name ? S : a.constructor.name;
644
- }
645
- return M.checkPropTypes = i, M.resetWarningCache = i.resetWarningCache, M.PropTypes = M, M;
646
- }, Pe;
647
- }
648
- var _e, tt;
649
- function $t() {
650
- if (tt) return _e;
651
- tt = 1;
652
- var e = /* @__PURE__ */ Be();
653
- function t() {
654
- }
655
- function n() {
656
- }
657
- return n.resetWarningCache = t, _e = function() {
658
- function r(s, u, d, p, v, y) {
659
- if (y !== e) {
660
- var S = new Error(
661
- "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"
662
- );
663
- throw S.name = "Invariant Violation", S;
664
- }
665
- }
666
- r.isRequired = r;
667
- function i() {
668
- return r;
669
- }
670
- var o = {
671
- array: r,
672
- bigint: r,
673
- bool: r,
674
- func: r,
675
- number: r,
676
- object: r,
677
- string: r,
678
- symbol: r,
679
- any: r,
680
- arrayOf: i,
681
- element: r,
682
- elementType: r,
683
- instanceOf: i,
684
- node: r,
685
- objectOf: i,
686
- oneOf: i,
687
- oneOfType: i,
688
- shape: i,
689
- exact: i,
690
- checkPropTypes: n,
691
- resetWarningCache: t
692
- };
693
- return o.PropTypes = o, o;
694
- }, _e;
695
- }
696
- var nt;
697
- function Wt() {
698
- if (nt) return ge.exports;
699
- if (nt = 1, process.env.NODE_ENV !== "production") {
700
- var e = ft(), t = !0;
701
- ge.exports = /* @__PURE__ */ Lt()(e.isElement, t);
702
- } else
703
- ge.exports = /* @__PURE__ */ $t()();
704
- return ge.exports;
705
- }
706
- var Ft = /* @__PURE__ */ Wt();
707
- const m = /* @__PURE__ */ mt(Ft), rt = {
708
- disabled: !1
709
- };
710
- var qt = process.env.NODE_ENV !== "production" ? m.oneOfType([m.number, m.shape({
711
- enter: m.number,
712
- exit: m.number,
713
- appear: m.number
714
- }).isRequired]) : null;
715
- process.env.NODE_ENV !== "production" && m.oneOfType([m.string, m.shape({
716
- enter: m.string,
717
- exit: m.string,
718
- active: m.string
719
- }), m.shape({
720
- enter: m.string,
721
- enterDone: m.string,
722
- enterActive: m.string,
723
- exit: m.string,
724
- exitDone: m.string,
725
- exitActive: m.string
726
- })]);
727
- const dt = ne.createContext(null);
728
- var Bt = function(t) {
729
- return t.scrollTop;
730
- }, Ee = "unmounted", Q = "exited", Z = "entering", te = "entered", Ie = "exiting", K = /* @__PURE__ */ function(e) {
731
- St(t, e);
732
- function t(r, i) {
733
- var o;
734
- o = e.call(this, r, i) || this;
735
- var s = i, u = s && !s.isMounting ? r.enter : r.appear, d;
736
- return o.appearStatus = null, r.in ? u ? (d = Q, o.appearStatus = Z) : d = te : r.unmountOnExit || r.mountOnEnter ? d = Ee : d = Q, o.state = {
737
- status: d
738
- }, o.nextCallback = null, o;
739
- }
740
- t.getDerivedStateFromProps = function(i, o) {
741
- var s = i.in;
742
- return s && o.status === Ee ? {
743
- status: Q
744
- } : null;
745
- };
746
- var n = t.prototype;
747
- return n.componentDidMount = function() {
748
- this.updateStatus(!0, this.appearStatus);
749
- }, n.componentDidUpdate = function(i) {
750
- var o = null;
751
- if (i !== this.props) {
752
- var s = this.state.status;
753
- this.props.in ? s !== Z && s !== te && (o = Z) : (s === Z || s === te) && (o = Ie);
754
- }
755
- this.updateStatus(!1, o);
756
- }, n.componentWillUnmount = function() {
757
- this.cancelNextCallback();
758
- }, n.getTimeouts = function() {
759
- var i = this.props.timeout, o, s, u;
760
- return o = s = u = i, i != null && typeof i != "number" && (o = i.exit, s = i.enter, u = i.appear !== void 0 ? i.appear : s), {
761
- exit: o,
762
- enter: s,
763
- appear: u
764
- };
765
- }, n.updateStatus = function(i, o) {
766
- if (i === void 0 && (i = !1), o !== null)
767
- if (this.cancelNextCallback(), o === Z) {
768
- if (this.props.unmountOnExit || this.props.mountOnEnter) {
769
- var s = this.props.nodeRef ? this.props.nodeRef.current : le.findDOMNode(this);
770
- s && Bt(s);
771
- }
772
- this.performEnter(i);
773
- } else
774
- this.performExit();
775
- else this.props.unmountOnExit && this.state.status === Q && this.setState({
776
- status: Ee
777
- });
778
- }, n.performEnter = function(i) {
779
- var o = this, s = this.props.enter, u = this.context ? this.context.isMounting : i, d = this.props.nodeRef ? [u] : [le.findDOMNode(this), u], p = d[0], v = d[1], y = this.getTimeouts(), S = u ? y.appear : y.enter;
780
- if (!i && !s || rt.disabled) {
781
- this.safeSetState({
782
- status: te
783
- }, function() {
784
- o.props.onEntered(p);
785
- });
786
- return;
787
- }
788
- this.props.onEnter(p, v), this.safeSetState({
789
- status: Z
790
- }, function() {
791
- o.props.onEntering(p, v), o.onTransitionEnd(S, function() {
792
- o.safeSetState({
793
- status: te
794
- }, function() {
795
- o.props.onEntered(p, v);
796
- });
797
- });
798
- });
799
- }, n.performExit = function() {
800
- var i = this, o = this.props.exit, s = this.getTimeouts(), u = this.props.nodeRef ? void 0 : le.findDOMNode(this);
801
- if (!o || rt.disabled) {
802
- this.safeSetState({
803
- status: Q
804
- }, function() {
805
- i.props.onExited(u);
806
- });
807
- return;
808
- }
809
- this.props.onExit(u), this.safeSetState({
810
- status: Ie
811
- }, function() {
812
- i.props.onExiting(u), i.onTransitionEnd(s.exit, function() {
813
- i.safeSetState({
814
- status: Q
815
- }, function() {
816
- i.props.onExited(u);
817
- });
818
- });
819
- });
820
- }, n.cancelNextCallback = function() {
821
- this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
822
- }, n.safeSetState = function(i, o) {
823
- o = this.setNextCallback(o), this.setState(i, o);
824
- }, n.setNextCallback = function(i) {
825
- var o = this, s = !0;
826
- return this.nextCallback = function(u) {
827
- s && (s = !1, o.nextCallback = null, i(u));
828
- }, this.nextCallback.cancel = function() {
829
- s = !1;
830
- }, this.nextCallback;
831
- }, n.onTransitionEnd = function(i, o) {
832
- this.setNextCallback(o);
833
- var s = this.props.nodeRef ? this.props.nodeRef.current : le.findDOMNode(this), u = i == null && !this.props.addEndListener;
834
- if (!s || u) {
835
- setTimeout(this.nextCallback, 0);
836
- return;
837
- }
838
- if (this.props.addEndListener) {
839
- var d = this.props.nodeRef ? [this.nextCallback] : [s, this.nextCallback], p = d[0], v = d[1];
840
- this.props.addEndListener(p, v);
841
- }
842
- i != null && setTimeout(this.nextCallback, i);
843
- }, n.render = function() {
844
- var i = this.state.status;
845
- if (i === Ee)
846
- return null;
847
- var o = this.props, s = o.children;
848
- o.in, o.mountOnEnter, o.unmountOnExit, o.appear, o.enter, o.exit, o.timeout, o.addEndListener, o.onEnter, o.onEntering, o.onEntered, o.onExit, o.onExiting, o.onExited, o.nodeRef;
849
- var u = gt(o, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
850
- return (
851
- // allows for nested Transitions
852
- /* @__PURE__ */ ne.createElement(dt.Provider, {
853
- value: null
854
- }, typeof s == "function" ? s(i, u) : ne.cloneElement(ne.Children.only(s), u))
855
- );
856
- }, t;
857
- }(ne.Component);
858
- K.contextType = dt;
859
- K.propTypes = process.env.NODE_ENV !== "production" ? {
860
- /**
861
- * A React reference to DOM element that need to transition:
862
- * https://stackoverflow.com/a/51127130/4671932
863
- *
864
- * - When `nodeRef` prop is used, `node` is not passed to callback functions
865
- * (e.g. `onEnter`) because user already has direct access to the node.
866
- * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
867
- * `nodeRef` need to be provided to `Transition` with changed `key` prop
868
- * (see
869
- * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
870
- */
871
- nodeRef: m.shape({
872
- current: typeof Element > "u" ? m.any : function(e, t, n, r, i, o) {
873
- var s = e[t];
874
- return m.instanceOf(s && "ownerDocument" in s ? s.ownerDocument.defaultView.Element : Element)(e, t, n, r, i, o);
875
- }
876
- }),
877
- /**
878
- * A `function` child can be used instead of a React element. This function is
879
- * called with the current transition status (`'entering'`, `'entered'`,
880
- * `'exiting'`, `'exited'`), which can be used to apply context
881
- * specific props to a component.
882
- *
883
- * ```jsx
884
- * <Transition in={this.state.in} timeout={150}>
885
- * {state => (
886
- * <MyComponent className={`fade fade-${state}`} />
887
- * )}
888
- * </Transition>
889
- * ```
890
- */
891
- children: m.oneOfType([m.func.isRequired, m.element.isRequired]).isRequired,
892
- /**
893
- * Show the component; triggers the enter or exit states
894
- */
895
- in: m.bool,
896
- /**
897
- * By default the child component is mounted immediately along with
898
- * the parent `Transition` component. If you want to "lazy mount" the component on the
899
- * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
900
- * mounted, even on "exited", unless you also specify `unmountOnExit`.
901
- */
902
- mountOnEnter: m.bool,
903
- /**
904
- * By default the child component stays mounted after it reaches the `'exited'` state.
905
- * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
906
- */
907
- unmountOnExit: m.bool,
908
- /**
909
- * By default the child component does not perform the enter transition when
910
- * it first mounts, regardless of the value of `in`. If you want this
911
- * behavior, set both `appear` and `in` to `true`.
912
- *
913
- * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
914
- * > only adds an additional enter transition. However, in the
915
- * > `<CSSTransition>` component that first enter transition does result in
916
- * > additional `.appear-*` classes, that way you can choose to style it
917
- * > differently.
918
- */
919
- appear: m.bool,
920
- /**
921
- * Enable or disable enter transitions.
922
- */
923
- enter: m.bool,
924
- /**
925
- * Enable or disable exit transitions.
926
- */
927
- exit: m.bool,
928
- /**
929
- * The duration of the transition, in milliseconds.
930
- * Required unless `addEndListener` is provided.
931
- *
932
- * You may specify a single timeout for all transitions:
933
- *
934
- * ```jsx
935
- * timeout={500}
936
- * ```
937
- *
938
- * or individually:
939
- *
940
- * ```jsx
941
- * timeout={{
942
- * appear: 500,
943
- * enter: 300,
944
- * exit: 500,
945
- * }}
946
- * ```
947
- *
948
- * - `appear` defaults to the value of `enter`
949
- * - `enter` defaults to `0`
950
- * - `exit` defaults to `0`
951
- *
952
- * @type {number | { enter?: number, exit?: number, appear?: number }}
953
- */
954
- timeout: function(t) {
955
- var n = qt;
956
- t.addEndListener || (n = n.isRequired);
957
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
958
- i[o - 1] = arguments[o];
959
- return n.apply(void 0, [t].concat(i));
960
- },
961
- /**
962
- * Add a custom transition end trigger. Called with the transitioning
963
- * DOM node and a `done` callback. Allows for more fine grained transition end
964
- * logic. Timeouts are still used as a fallback if provided.
965
- *
966
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
967
- *
968
- * ```jsx
969
- * addEndListener={(node, done) => {
970
- * // use the css transitionend event to mark the finish of a transition
971
- * node.addEventListener('transitionend', done, false);
972
- * }}
973
- * ```
974
- */
975
- addEndListener: m.func,
976
- /**
977
- * Callback fired before the "entering" status is applied. An extra parameter
978
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
979
- *
980
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
981
- *
982
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
983
- */
984
- onEnter: m.func,
985
- /**
986
- * Callback fired after the "entering" status is applied. An extra parameter
987
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
988
- *
989
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
990
- *
991
- * @type Function(node: HtmlElement, isAppearing: bool)
992
- */
993
- onEntering: m.func,
994
- /**
995
- * Callback fired after the "entered" status is applied. An extra parameter
996
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
997
- *
998
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
999
- *
1000
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
1001
- */
1002
- onEntered: m.func,
1003
- /**
1004
- * Callback fired before the "exiting" status is applied.
1005
- *
1006
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1007
- *
1008
- * @type Function(node: HtmlElement) -> void
1009
- */
1010
- onExit: m.func,
1011
- /**
1012
- * Callback fired after the "exiting" status is applied.
1013
- *
1014
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
1015
- *
1016
- * @type Function(node: HtmlElement) -> void
1017
- */
1018
- onExiting: m.func,
1019
- /**
1020
- * Callback fired after the "exited" status is applied.
1021
- *
1022
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
1023
- *
1024
- * @type Function(node: HtmlElement) -> void
1025
- */
1026
- onExited: m.func
1027
- } : {};
1028
- function ce() {
1029
- }
1030
- K.defaultProps = {
1031
- in: !1,
1032
- mountOnEnter: !1,
1033
- unmountOnExit: !1,
1034
- appear: !1,
1035
- enter: !0,
1036
- exit: !0,
1037
- onEnter: ce,
1038
- onEntering: ce,
1039
- onEntered: ce,
1040
- onExit: ce,
1041
- onExiting: ce,
1042
- onExited: ce
1043
- };
1044
- K.UNMOUNTED = Ee;
1045
- K.EXITED = Q;
1046
- K.ENTERING = Z;
1047
- K.ENTERED = te;
1048
- K.EXITING = Ie;
1049
- function Yt(e) {
1050
- return e.code === "Escape" || e.keyCode === 27;
1051
- }
1052
- function Ut() {
1053
- const e = X.version.split(".");
1054
- return {
1055
- major: +e[0],
1056
- minor: +e[1],
1057
- patch: +e[2]
1058
- };
1059
- }
1060
- function xe(e) {
1061
- if (!e || typeof e == "function")
1062
- return null;
1063
- const {
1064
- major: t
1065
- } = Ut();
1066
- return t >= 19 ? e.props.ref : e.ref;
1067
- }
1068
- function Vt(e, t, n, r) {
1069
- if (r === void 0 && (r = !0), e) {
1070
- var i = document.createEvent("HTMLEvents");
1071
- i.initEvent(t, n, r), e.dispatchEvent(i);
1072
- }
1073
- }
1074
- function Gt(e) {
1075
- var t = re(e, "transitionDuration") || "", n = t.indexOf("ms") === -1 ? 1e3 : 1;
1076
- return parseFloat(t) * n;
1077
- }
1078
- function zt(e, t, n) {
1079
- n === void 0 && (n = 5);
1080
- var r = !1, i = setTimeout(function() {
1081
- r || Vt(e, "transitionend", !0);
1082
- }, t + n), o = Te(e, "transitionend", function() {
1083
- r = !0;
1084
- }, {
1085
- once: !0
1086
- });
1087
- return function() {
1088
- clearTimeout(i), o();
1089
- };
1090
- }
1091
- function Ht(e, t, n, r) {
1092
- n == null && (n = Gt(e) || 0);
1093
- var i = zt(e, n, r), o = Te(e, "transitionend", t);
1094
- return function() {
1095
- i(), o();
1096
- };
1097
- }
1098
- function ot(e, t) {
1099
- const n = re(e, t) || "", r = n.indexOf("ms") === -1 ? 1e3 : 1;
1100
- return parseFloat(n) * r;
1101
- }
1102
- function Xt(e, t) {
1103
- const n = ot(e, "transitionDuration"), r = ot(e, "transitionDelay"), i = Ht(e, (o) => {
1104
- o.target === e && (i(), t(o));
1105
- }, n + r);
1106
- }
1107
- function Kt(e) {
1108
- e.offsetHeight;
1109
- }
1110
- function Jt(e) {
1111
- return e && "setState" in e ? le.findDOMNode(e) : e ?? null;
1112
- }
1113
- const Zt = /* @__PURE__ */ ne.forwardRef(({
1114
- onEnter: e,
1115
- onEntering: t,
1116
- onEntered: n,
1117
- onExit: r,
1118
- onExiting: i,
1119
- onExited: o,
1120
- addEndListener: s,
1121
- children: u,
1122
- childRef: d,
1123
- ...p
1124
- }, v) => {
1125
- const y = G(null), S = bt(y, d), M = (F) => {
1126
- S(Jt(F));
1127
- }, j = (F) => (z) => {
1128
- F && y.current && F(y.current, z);
1129
- }, _ = W(j(e), [e]), I = W(j(t), [t]), L = W(j(n), [n]), V = W(j(r), [r]), N = W(j(i), [i]), A = W(j(o), [o]), c = W(j(s), [s]);
1130
- return /* @__PURE__ */ B.jsx(K, {
1131
- ref: v,
1132
- ...p,
1133
- onEnter: _,
1134
- onEntered: L,
1135
- onEntering: I,
1136
- onExit: V,
1137
- onExited: A,
1138
- onExiting: N,
1139
- addEndListener: c,
1140
- nodeRef: y,
1141
- children: typeof u == "function" ? (F, z) => (
1142
- // TODO: Types for RTG missing innerProps, so need to cast.
1143
- u(F, {
1144
- ...z,
1145
- ref: M
1146
- })
1147
- ) : /* @__PURE__ */ ne.cloneElement(u, {
1148
- ref: M
1149
- })
1150
- });
1151
- }), Dn = (e) => /* @__PURE__ */ X.forwardRef((t, n) => /* @__PURE__ */ B.jsx("div", {
1152
- ...t,
1153
- ref: n,
1154
- className: $e(t.className, e)
1155
- })), Qt = typeof global < "u" && // @ts-ignore
1156
- global.navigator && // @ts-ignore
1157
- global.navigator.product === "ReactNative", en = typeof document < "u", it = en || Qt ? vt : oe, tn = {
1158
- [Z]: "show",
1159
- [te]: "show"
1160
- }, nn = /* @__PURE__ */ X.forwardRef(({
1161
- className: e,
1162
- children: t,
1163
- transitionClasses: n = {},
1164
- onEnter: r,
1165
- ...i
1166
- }, o) => {
1167
- const s = {
1168
- in: !1,
1169
- timeout: 300,
1170
- mountOnEnter: !1,
1171
- unmountOnExit: !1,
1172
- appear: !1,
1173
- ...i
1174
- }, u = W((d, p) => {
1175
- Kt(d), r == null || r(d, p);
1176
- }, [r]);
1177
- return /* @__PURE__ */ B.jsx(Zt, {
1178
- ref: o,
1179
- addEndListener: Xt,
1180
- ...s,
1181
- onEnter: u,
1182
- childRef: xe(t),
1183
- children: (d, p) => /* @__PURE__ */ X.cloneElement(t, {
1184
- ...p,
1185
- className: $e("fade", e, t.props.className, tn[d], n[d])
1186
- })
1187
- });
1188
- });
1189
- nn.displayName = "Fade";
1190
- const rn = {
1191
- /** An accessible label indicating the relevant information about the Close Button. */
1192
- "aria-label": m.string,
1193
- /** A callback fired after the Close Button is clicked. */
1194
- onClick: m.func,
1195
- /**
1196
- * Render different color variant for the button.
1197
- *
1198
- * Omitting this will render the default dark color.
1199
- */
1200
- variant: m.oneOf(["white"])
1201
- }, Ye = /* @__PURE__ */ X.forwardRef(({
1202
- className: e,
1203
- variant: t,
1204
- "aria-label": n = "Close",
1205
- ...r
1206
- }, i) => /* @__PURE__ */ B.jsx("button", {
1207
- ref: i,
1208
- type: "button",
1209
- className: $e("btn-close", t && `btn-close-${t}`, e),
1210
- "aria-label": n,
1211
- ...r
1212
- }));
1213
- Ye.displayName = "CloseButton";
1214
- Ye.propTypes = rn;
1215
- function Ae(e) {
1216
- e === void 0 && (e = We());
1217
- try {
1218
- var t = e.activeElement;
1219
- return !t || !t.nodeName ? null : t;
1220
- } catch {
1221
- return e.body;
1222
- }
1223
- }
1224
- function on(e) {
1225
- const t = G(e);
1226
- return t.current = e, t;
1227
- }
1228
- function an(e) {
1229
- const t = on(e);
1230
- oe(() => () => t.current(), []);
1231
- }
1232
- function sn(e = document) {
1233
- const t = e.defaultView;
1234
- return Math.abs(t.innerWidth - e.documentElement.clientWidth);
1235
- }
1236
- const at = Tt("modal-open");
1237
- class Ue {
1238
- constructor({
1239
- ownerDocument: t,
1240
- handleContainerOverflow: n = !0,
1241
- isRTL: r = !1
1242
- } = {}) {
1243
- this.handleContainerOverflow = n, this.isRTL = r, this.modals = [], this.ownerDocument = t;
1244
- }
1245
- getScrollbarWidth() {
1246
- return sn(this.ownerDocument);
1247
- }
1248
- getElement() {
1249
- return (this.ownerDocument || document).body;
1250
- }
1251
- setModalAttributes(t) {
1252
- }
1253
- removeModalAttributes(t) {
1254
- }
1255
- setContainerStyle(t) {
1256
- const n = {
1257
- overflow: "hidden"
1258
- }, r = this.isRTL ? "paddingLeft" : "paddingRight", i = this.getElement();
1259
- t.style = {
1260
- overflow: i.style.overflow,
1261
- [r]: i.style[r]
1262
- }, t.scrollBarWidth && (n[r] = `${parseInt(re(i, r) || "0", 10) + t.scrollBarWidth}px`), i.setAttribute(at, ""), re(i, n);
1263
- }
1264
- reset() {
1265
- [...this.modals].forEach((t) => this.remove(t));
1266
- }
1267
- removeContainerStyle(t) {
1268
- const n = this.getElement();
1269
- n.removeAttribute(at), Object.assign(n.style, t.style);
1270
- }
1271
- add(t) {
1272
- let n = this.modals.indexOf(t);
1273
- return n !== -1 || (n = this.modals.length, this.modals.push(t), this.setModalAttributes(t), n !== 0) || (this.state = {
1274
- scrollBarWidth: this.getScrollbarWidth(),
1275
- style: {}
1276
- }, this.handleContainerOverflow && this.setContainerStyle(this.state)), n;
1277
- }
1278
- remove(t) {
1279
- const n = this.modals.indexOf(t);
1280
- n !== -1 && (this.modals.splice(n, 1), !this.modals.length && this.handleContainerOverflow && this.removeContainerStyle(this.state), this.removeModalAttributes(t));
1281
- }
1282
- isTopModal(t) {
1283
- return !!this.modals.length && this.modals[this.modals.length - 1] === t;
1284
- }
1285
- }
1286
- const Me = (e, t) => ct ? e == null ? (t || We()).body : (typeof e == "function" && (e = e()), e && "current" in e && (e = e.current), e && ("nodeType" in e || e.getBoundingClientRect) ? e : null) : null;
1287
- function un(e, t) {
1288
- const n = Fe(), [r, i] = ke(() => Me(e, n == null ? void 0 : n.document));
1289
- if (!r) {
1290
- const o = Me(e);
1291
- o && i(o);
1292
- }
1293
- return oe(() => {
1294
- }, [t, r]), oe(() => {
1295
- const o = Me(e);
1296
- o !== r && i(o);
1297
- }, [e, r]), r;
1298
- }
1299
- function cn({
1300
- children: e,
1301
- in: t,
1302
- onExited: n,
1303
- mountOnEnter: r,
1304
- unmountOnExit: i
1305
- }) {
1306
- const o = G(null), s = G(t), u = ee(n);
1307
- oe(() => {
1308
- t ? s.current = !0 : u(o.current);
1309
- }, [t, u]);
1310
- const d = qe(o, xe(e)), p = /* @__PURE__ */ Le(e, {
1311
- ref: d
1312
- });
1313
- return t ? p : i || !s.current && r ? null : p;
1314
- }
1315
- const fn = ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "addEndListener", "children"];
1316
- function ln(e, t) {
1317
- if (e == null) return {};
1318
- var n = {};
1319
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
1320
- if (t.indexOf(r) >= 0) continue;
1321
- n[r] = e[r];
1322
- }
1323
- return n;
1324
- }
1325
- function dn(e) {
1326
- let {
1327
- onEnter: t,
1328
- onEntering: n,
1329
- onEntered: r,
1330
- onExit: i,
1331
- onExiting: o,
1332
- onExited: s,
1333
- addEndListener: u,
1334
- children: d
1335
- } = e, p = ln(e, fn);
1336
- const v = G(null), y = qe(v, xe(d)), S = (A) => (c) => {
1337
- A && v.current && A(v.current, c);
1338
- }, M = W(S(t), [t]), j = W(S(n), [n]), _ = W(S(r), [r]), I = W(S(i), [i]), L = W(S(o), [o]), V = W(S(s), [s]), N = W(S(u), [u]);
1339
- return Object.assign({}, p, {
1340
- nodeRef: v
1341
- }, t && {
1342
- onEnter: M
1343
- }, n && {
1344
- onEntering: j
1345
- }, r && {
1346
- onEntered: _
1347
- }, i && {
1348
- onExit: I
1349
- }, o && {
1350
- onExiting: L
1351
- }, s && {
1352
- onExited: V
1353
- }, u && {
1354
- addEndListener: N
1355
- }, {
1356
- children: typeof d == "function" ? (A, c) => (
1357
- // TODO: Types for RTG missing innerProps, so need to cast.
1358
- d(A, Object.assign({}, c, {
1359
- ref: y
1360
- }))
1361
- ) : /* @__PURE__ */ Le(d, {
1362
- ref: y
1363
- })
1364
- });
1365
- }
1366
- const pn = ["component"];
1367
- function vn(e, t) {
1368
- if (e == null) return {};
1369
- var n = {};
1370
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
1371
- if (t.indexOf(r) >= 0) continue;
1372
- n[r] = e[r];
1373
- }
1374
- return n;
1375
- }
1376
- const hn = /* @__PURE__ */ X.forwardRef((e, t) => {
1377
- let {
1378
- component: n
1379
- } = e, r = vn(e, pn);
1380
- const i = dn(r);
1381
- return /* @__PURE__ */ B.jsx(n, Object.assign({
1382
- ref: t
1383
- }, i));
1384
- });
1385
- function yn({
1386
- in: e,
1387
- onTransition: t
1388
- }) {
1389
- const n = G(null), r = G(!0), i = ee(t);
1390
- return it(() => {
1391
- if (!n.current)
1392
- return;
1393
- let o = !1;
1394
- return i({
1395
- in: e,
1396
- element: n.current,
1397
- initial: r.current,
1398
- isStale: () => o
1399
- }), () => {
1400
- o = !0;
1401
- };
1402
- }, [e, i]), it(() => (r.current = !1, () => {
1403
- r.current = !0;
1404
- }), []), n;
1405
- }
1406
- function En({
1407
- children: e,
1408
- in: t,
1409
- onExited: n,
1410
- onEntered: r,
1411
- transition: i
1412
- }) {
1413
- const [o, s] = ke(!t);
1414
- t && o && s(!1);
1415
- const u = yn({
1416
- in: !!t,
1417
- onTransition: (p) => {
1418
- const v = () => {
1419
- p.isStale() || (p.in ? r == null || r(p.element, p.initial) : (s(!0), n == null || n(p.element)));
1420
- };
1421
- Promise.resolve(i(p)).then(v, (y) => {
1422
- throw p.in || s(!0), y;
1423
- });
1424
- }
1425
- }), d = qe(u, xe(e));
1426
- return o && !t ? null : /* @__PURE__ */ Le(e, {
1427
- ref: d
1428
- });
1429
- }
1430
- function st(e, t, n) {
1431
- return e ? /* @__PURE__ */ B.jsx(hn, Object.assign({}, n, {
1432
- component: e
1433
- })) : t ? /* @__PURE__ */ B.jsx(En, Object.assign({}, n, {
1434
- transition: t
1435
- })) : /* @__PURE__ */ B.jsx(cn, Object.assign({}, n));
1436
- }
1437
- const mn = ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "runTransition", "backdropTransition", "runBackdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"];
1438
- function gn(e, t) {
1439
- if (e == null) return {};
1440
- var n = {};
1441
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
1442
- if (t.indexOf(r) >= 0) continue;
1443
- n[r] = e[r];
1444
- }
1445
- return n;
1446
- }
1447
- let je;
1448
- function bn(e) {
1449
- return je || (je = new Ue({
1450
- ownerDocument: e == null ? void 0 : e.document
1451
- })), je;
1452
- }
1453
- function Tn(e) {
1454
- const t = Fe(), n = e || bn(t), r = G({
1455
- dialog: null,
1456
- backdrop: null
1457
- });
1458
- return Object.assign(r.current, {
1459
- add: () => n.add(r.current),
1460
- remove: () => n.remove(r.current),
1461
- isTopModal: () => n.isTopModal(r.current),
1462
- setDialogRef: W((i) => {
1463
- r.current.dialog = i;
1464
- }, []),
1465
- setBackdropRef: W((i) => {
1466
- r.current.backdrop = i;
1467
- }, [])
1468
- });
1469
- }
1470
- const pt = /* @__PURE__ */ ht((e, t) => {
1471
- let {
1472
- show: n = !1,
1473
- role: r = "dialog",
1474
- className: i,
1475
- style: o,
1476
- children: s,
1477
- backdrop: u = !0,
1478
- keyboard: d = !0,
1479
- onBackdropClick: p,
1480
- onEscapeKeyDown: v,
1481
- transition: y,
1482
- runTransition: S,
1483
- backdropTransition: M,
1484
- runBackdropTransition: j,
1485
- autoFocus: _ = !0,
1486
- enforceFocus: I = !0,
1487
- restoreFocus: L = !0,
1488
- restoreFocusOptions: V,
1489
- renderDialog: N,
1490
- renderBackdrop: A = (D) => /* @__PURE__ */ B.jsx("div", Object.assign({}, D)),
1491
- manager: c,
1492
- container: F,
1493
- onShow: z,
1494
- onHide: ie = () => {
1495
- },
1496
- onExit: de,
1497
- onExited: ae,
1498
- onExiting: se,
1499
- onEnter: pe,
1500
- onEntering: ve,
1501
- onEntered: J
1502
- } = e, he = gn(e, mn);
1503
- const $ = Fe(), U = un(F), k = Tn(c), ye = xt(), a = Rt(n), [l, b] = ke(!n), E = G(null);
1504
- yt(t, () => k, [k]), ct && !a && n && (E.current = Ae($ == null ? void 0 : $.document)), n && l && b(!1);
1505
- const h = ee(() => {
1506
- if (k.add(), R.current = Te(document, "keydown", O), C.current = Te(
1507
- document,
1508
- "focus",
1509
- // the timeout is necessary b/c this will run before the new modal is mounted
1510
- // and so steals focus from it
1511
- () => setTimeout(g),
1512
- !0
1513
- ), z && z(), _) {
1514
- var D, Ve;
1515
- const Re = Ae((D = (Ve = k.dialog) == null ? void 0 : Ve.ownerDocument) != null ? D : $ == null ? void 0 : $.document);
1516
- k.dialog && Re && !Ge(k.dialog, Re) && (E.current = Re, k.dialog.focus());
1517
- }
1518
- }), x = ee(() => {
1519
- if (k.remove(), R.current == null || R.current(), C.current == null || C.current(), L) {
1520
- var D;
1521
- (D = E.current) == null || D.focus == null || D.focus(V), E.current = null;
1522
- }
1523
- });
1524
- oe(() => {
1525
- !n || !U || h();
1526
- }, [
1527
- n,
1528
- U,
1529
- /* should never change: */
1530
- h
1531
- ]), oe(() => {
1532
- l && x();
1533
- }, [l, x]), an(() => {
1534
- x();
1535
- });
1536
- const g = ee(() => {
1537
- if (!I || !ye() || !k.isTopModal())
1538
- return;
1539
- const D = Ae($ == null ? void 0 : $.document);
1540
- k.dialog && D && !Ge(k.dialog, D) && k.dialog.focus();
1541
- }), T = ee((D) => {
1542
- D.target === D.currentTarget && (p == null || p(D), u === !0 && ie());
1543
- }), O = ee((D) => {
1544
- d && Yt(D) && k.isTopModal() && (v == null || v(D), D.defaultPrevented || ie());
1545
- }), C = G(), R = G(), q = (...D) => {
1546
- b(!0), ae == null || ae(...D);
1547
- };
1548
- if (!U)
1549
- return null;
1550
- const f = Object.assign({
1551
- role: r,
1552
- ref: k.setDialogRef,
1553
- // apparently only works on the dialog role element
1554
- "aria-modal": r === "dialog" ? !0 : void 0
1555
- }, he, {
1556
- style: o,
1557
- className: i,
1558
- tabIndex: -1
1559
- });
1560
- let Y = N ? N(f) : /* @__PURE__ */ B.jsx("div", Object.assign({}, f, {
1561
- children: /* @__PURE__ */ X.cloneElement(s, {
1562
- role: "document"
1563
- })
1564
- }));
1565
- Y = st(y, S, {
1566
- unmountOnExit: !0,
1567
- mountOnEnter: !0,
1568
- appear: !0,
1569
- in: !!n,
1570
- onExit: de,
1571
- onExiting: se,
1572
- onExited: q,
1573
- onEnter: pe,
1574
- onEntering: ve,
1575
- onEntered: J,
1576
- children: Y
1577
- });
1578
- let H = null;
1579
- return u && (H = A({
1580
- ref: k.setBackdropRef,
1581
- onClick: T
1582
- }), H = st(M, j, {
1583
- in: !!n,
1584
- appear: !0,
1585
- mountOnEnter: !0,
1586
- unmountOnExit: !0,
1587
- children: H
1588
- })), /* @__PURE__ */ B.jsx(B.Fragment, {
1589
- children: /* @__PURE__ */ le.createPortal(/* @__PURE__ */ B.jsxs(B.Fragment, {
1590
- children: [H, Y]
1591
- }), U)
1592
- });
1593
- });
1594
- pt.displayName = "Modal";
1595
- const In = Object.assign(pt, {
1596
- Manager: Ue
1597
- });
1598
- function xn(e, t) {
1599
- return e.classList ? e.classList.contains(t) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + t + " ") !== -1;
1600
- }
1601
- function Rn(e, t) {
1602
- e.classList ? e.classList.add(t) : xn(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
1603
- }
1604
- function ut(e, t) {
1605
- return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
1606
- }
1607
- function On(e, t) {
1608
- e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = ut(e.className, t) : e.setAttribute("class", ut(e.className && e.className.baseVal || "", t));
1609
- }
1610
- const fe = {
1611
- FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
1612
- STICKY_CONTENT: ".sticky-top",
1613
- NAVBAR_TOGGLER: ".navbar-toggler"
1614
- };
1615
- class Sn extends Ue {
1616
- adjustAndStore(t, n, r) {
1617
- const i = n.style[t];
1618
- n.dataset[t] = i, re(n, {
1619
- [t]: `${parseFloat(re(n, t)) + r}px`
1620
- });
1621
- }
1622
- restore(t, n) {
1623
- const r = n.dataset[t];
1624
- r !== void 0 && (delete n.dataset[t], re(n, {
1625
- [t]: r
1626
- }));
1627
- }
1628
- setContainerStyle(t) {
1629
- super.setContainerStyle(t);
1630
- const n = this.getElement();
1631
- if (Rn(n, "modal-open"), !t.scrollBarWidth) return;
1632
- const r = this.isRTL ? "paddingLeft" : "paddingRight", i = this.isRTL ? "marginLeft" : "marginRight";
1633
- ue(n, fe.FIXED_CONTENT).forEach((o) => this.adjustAndStore(r, o, t.scrollBarWidth)), ue(n, fe.STICKY_CONTENT).forEach((o) => this.adjustAndStore(i, o, -t.scrollBarWidth)), ue(n, fe.NAVBAR_TOGGLER).forEach((o) => this.adjustAndStore(i, o, t.scrollBarWidth));
1634
- }
1635
- removeContainerStyle(t) {
1636
- super.removeContainerStyle(t);
1637
- const n = this.getElement();
1638
- On(n, "modal-open");
1639
- const r = this.isRTL ? "paddingLeft" : "paddingRight", i = this.isRTL ? "marginLeft" : "marginRight";
1640
- ue(n, fe.FIXED_CONTENT).forEach((o) => this.restore(r, o)), ue(n, fe.STICKY_CONTENT).forEach((o) => this.restore(i, o)), ue(n, fe.NAVBAR_TOGGLER).forEach((o) => this.restore(i, o));
1641
- }
1642
- }
1643
- let Ne;
1644
- function kn(e) {
1645
- return Ne || (Ne = new Sn(e)), Ne;
1646
- }
1647
- const Cn = /* @__PURE__ */ X.createContext({
1648
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1649
- onHide() {
1650
- }
1651
- }), Ln = /* @__PURE__ */ X.forwardRef(({
1652
- closeLabel: e = "Close",
1653
- closeVariant: t,
1654
- closeButton: n = !1,
1655
- onHide: r,
1656
- children: i,
1657
- ...o
1658
- }, s) => {
1659
- const u = Et(Cn), d = Ot(() => {
1660
- u == null || u.onHide(), r == null || r();
1661
- });
1662
- return /* @__PURE__ */ B.jsxs("div", {
1663
- ref: s,
1664
- ...o,
1665
- children: [i, n && /* @__PURE__ */ B.jsx(Ye, {
1666
- "aria-label": e,
1667
- variant: t,
1668
- onClick: d
1669
- })]
1670
- });
1671
- });
1672
- export {
1673
- Ln as A,
1674
- In as B,
1675
- te as E,
1676
- nn as F,
1677
- Cn as M,
1678
- Zt as T,
1679
- xe as a,
1680
- Xt as b,
1681
- Kt as c,
1682
- Dn as d,
1683
- Z as e,
1684
- Ie as f,
1685
- kn as g,
1686
- Q as h,
1687
- Sn as i,
1688
- re as s,
1689
- Ht as t
1690
- };