react-luminus-components 1.2.33 → 1.2.35

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 (40) hide show
  1. package/dist/.vite/manifest.json +59 -61
  2. package/dist/EventType-Dodj1wMo.cjs +1 -0
  3. package/dist/EventType-SEEDuisM.js +636 -0
  4. package/dist/SimpleTooltip-MhGCEWts.js +5 -0
  5. package/dist/{SimpleTooltip-CjMfPKvQ.cjs → SimpleTooltip-OE_cbcNU.cjs} +1 -1
  6. package/dist/{UserAvatarToggle-BWDRIIXE.js → UserAvatarToggle-CH7OqxNp.js} +2104 -2001
  7. package/dist/UserAvatarToggle-rzyVxLmG.cjs +253 -0
  8. package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +4 -1
  9. package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +11 -0
  10. package/dist/contexts.cjs.js +1 -1
  11. package/dist/contexts.es.js +205 -776
  12. package/dist/dateUtils-CWKBTsx7.cjs +1 -0
  13. package/dist/dateUtils-Crak7ii9.js +131 -0
  14. package/dist/hooks.cjs.js +1 -1
  15. package/dist/hooks.es.js +19 -18
  16. package/dist/layout.cjs.js +1 -1
  17. package/dist/layout.es.js +42 -42
  18. package/dist/main.cjs.js +1 -1
  19. package/dist/main.es.js +1258 -1303
  20. package/dist/models/texts/HomeDashboardTexts.d.ts +1 -0
  21. package/dist/style.css +1 -1
  22. package/dist/{textUtils-BLtD0zaS.js → textUtils-BbxuIsKq.js} +2 -2
  23. package/dist/{useConfirm-QOAtP0re.cjs → useConfirm-9zGqmWEb.cjs} +1 -1
  24. package/dist/{useConfirm-CKDkB8lL.js → useConfirm-B3BI8PzR.js} +11 -11
  25. package/dist/{useKeyPress-DuxmarzT.js → useKeyPress-CwWcvmEW.js} +2 -2
  26. package/dist/usePermissions-CO93mmCn.cjs +1 -0
  27. package/dist/usePermissions-DVO-znuB.js +13 -0
  28. package/dist/utils/hookForm/hookFormUtils.d.ts +2 -0
  29. package/dist/utils/index.d.ts +1 -0
  30. package/dist/utils.cjs.js +1 -1
  31. package/dist/utils.es.js +13 -136
  32. package/package.json +1 -1
  33. package/dist/EventType-D1zXMD8A.js +0 -63
  34. package/dist/EventType-DO8vvA6X.cjs +0 -1
  35. package/dist/SimpleTooltip-cMiObSvf.js +0 -5
  36. package/dist/Typography-B12JkmMC.js +0 -36
  37. package/dist/Typography-Plu1Wa0_.cjs +0 -1
  38. package/dist/UserAvatarToggle-DEb7Klk7.cjs +0 -253
  39. package/dist/usePermissions-Cg_BMKPX.js +0 -12
  40. package/dist/usePermissions-zYTcBjf7.cjs +0 -1
@@ -1,721 +1,150 @@
1
- import { j as a, c as N, e as xe, f as Se, o as He, s as J, g as Ke, h as lt, i as ct, k as M, l as je, m as Le, n as $e, p as dt, r as _e, q as ut, t as K, v as ft, w as ht, x as mt, y as Be, F as Ge, z as gt, A as pt, L as ue, P as ze, C as Et, I as vt, B as yt, D as le, E, W as Ct, G as Tt, H as Pe, b as Rt, J as Ve, U as xt, K as Nt } from "./UserAvatarToggle-BWDRIIXE.js";
2
- import * as R from "react";
3
- import bt, { forwardRef as wt, useState as C, useRef as O, useImperativeHandle as St, useEffect as b, useCallback as y, useContext as H, useMemo as w, useReducer as kt } from "react";
4
- import { a as Mt, u as Ot } from "./useConfirm-CKDkB8lL.js";
5
- import { T as At } from "./Typography-B12JkmMC.js";
6
- import { d as It, u as jt, q as D, L as Lt, E as v } from "./EventType-D1zXMD8A.js";
7
- import _t from "react-dom";
8
- const Bt = (e) => /* @__PURE__ */ R.forwardRef((t, n) => /* @__PURE__ */ a.jsx("div", {
9
- ...t,
10
- ref: n,
11
- className: N(t.className, e)
12
- })), Pt = {
13
- /** An accessible label indicating the relevant information about the Close Button. */
14
- "aria-label": xe.string,
15
- /** A callback fired after the Close Button is clicked. */
16
- onClick: xe.func,
17
- /**
18
- * Render different color variant for the button.
19
- *
20
- * Omitting this will render the default dark color.
21
- */
22
- variant: xe.oneOf(["white"])
23
- }, ke = /* @__PURE__ */ R.forwardRef(({
24
- className: e,
25
- variant: t,
26
- "aria-label": n = "Close",
27
- ...o
28
- }, s) => /* @__PURE__ */ a.jsx("button", {
29
- ref: s,
30
- type: "button",
31
- className: N("btn-close", t && `btn-close-${t}`, e),
32
- "aria-label": n,
33
- ...o
34
- }));
35
- ke.displayName = "CloseButton";
36
- ke.propTypes = Pt;
37
- var ce;
38
- function Ue(e) {
39
- if ((!ce && ce !== 0 || e) && Se) {
40
- var t = document.createElement("div");
41
- t.style.position = "absolute", t.style.top = "-9999px", t.style.width = "50px", t.style.height = "50px", t.style.overflow = "scroll", document.body.appendChild(t), ce = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
42
- }
43
- return ce;
44
- }
45
- function Ne(e) {
46
- e === void 0 && (e = He());
47
- try {
48
- var t = e.activeElement;
49
- return !t || !t.nodeName ? null : t;
50
- } catch {
51
- return e.body;
52
- }
53
- }
54
- function Ut(e = document) {
55
- const t = e.defaultView;
56
- return Math.abs(t.innerWidth - e.documentElement.clientWidth);
57
- }
58
- const Fe = It("modal-open");
59
- class Me {
60
- constructor({
61
- ownerDocument: t,
62
- handleContainerOverflow: n = !0,
63
- isRTL: o = !1
64
- } = {}) {
65
- this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = t;
66
- }
67
- getScrollbarWidth() {
68
- return Ut(this.ownerDocument);
69
- }
70
- getElement() {
71
- return (this.ownerDocument || document).body;
72
- }
73
- setModalAttributes(t) {
74
- }
75
- removeModalAttributes(t) {
76
- }
77
- setContainerStyle(t) {
78
- const n = {
79
- overflow: "hidden"
80
- }, o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.getElement();
81
- t.style = {
82
- overflow: s.style.overflow,
83
- [o]: s.style[o]
84
- }, t.scrollBarWidth && (n[o] = `${parseInt(J(s, o) || "0", 10) + t.scrollBarWidth}px`), s.setAttribute(Fe, ""), J(s, n);
85
- }
86
- reset() {
87
- [...this.modals].forEach((t) => this.remove(t));
88
- }
89
- removeContainerStyle(t) {
90
- const n = this.getElement();
91
- n.removeAttribute(Fe), Object.assign(n.style, t.style);
92
- }
93
- add(t) {
94
- let n = this.modals.indexOf(t);
95
- return n !== -1 || (n = this.modals.length, this.modals.push(t), this.setModalAttributes(t), n !== 0) || (this.state = {
96
- scrollBarWidth: this.getScrollbarWidth(),
97
- style: {}
98
- }, this.handleContainerOverflow && this.setContainerStyle(this.state)), n;
99
- }
100
- remove(t) {
101
- const n = this.modals.indexOf(t);
102
- n !== -1 && (this.modals.splice(n, 1), !this.modals.length && this.handleContainerOverflow && this.removeContainerStyle(this.state), this.removeModalAttributes(t));
103
- }
104
- isTopModal(t) {
105
- return !!this.modals.length && this.modals[this.modals.length - 1] === t;
106
- }
107
- }
108
- const Ft = ["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"];
109
- function Dt(e, t) {
110
- if (e == null)
111
- return {};
112
- var n = {}, o = Object.keys(e), s, r;
113
- for (r = 0; r < o.length; r++)
114
- s = o[r], !(t.indexOf(s) >= 0) && (n[s] = e[s]);
115
- return n;
116
- }
117
- let be;
118
- function Wt(e) {
119
- return be || (be = new Me({
120
- ownerDocument: e == null ? void 0 : e.document
121
- })), be;
122
- }
123
- function Ht(e) {
124
- const t = Ke(), n = e || Wt(t), o = O({
125
- dialog: null,
126
- backdrop: null
127
- });
128
- return Object.assign(o.current, {
129
- add: () => n.add(o.current),
130
- remove: () => n.remove(o.current),
131
- isTopModal: () => n.isTopModal(o.current),
132
- setDialogRef: y((s) => {
133
- o.current.dialog = s;
134
- }, []),
135
- setBackdropRef: y((s) => {
136
- o.current.backdrop = s;
137
- }, [])
138
- });
139
- }
140
- const qe = /* @__PURE__ */ wt((e, t) => {
141
- let {
142
- show: n = !1,
143
- role: o = "dialog",
144
- className: s,
145
- style: r,
146
- children: l,
147
- backdrop: i = !0,
148
- keyboard: d = !0,
149
- onBackdropClick: h,
150
- onEscapeKeyDown: g,
151
- transition: f,
152
- runTransition: m,
153
- backdropTransition: T,
154
- runBackdropTransition: fe,
155
- autoFocus: X = !0,
156
- enforceFocus: he = !0,
157
- restoreFocus: j = !0,
158
- restoreFocusOptions: me,
159
- renderDialog: Y,
160
- renderBackdrop: ge = (u) => /* @__PURE__ */ a.jsx("div", Object.assign({}, u)),
161
- manager: pe,
162
- container: Ee,
163
- onShow: Z,
164
- onHide: $ = () => {
165
- },
166
- onExit: ve,
167
- onExited: G,
168
- onExiting: ee,
169
- onEnter: te,
170
- onEntering: ne,
171
- onEntered: oe
172
- } = e, ye = Dt(e, Ft);
173
- const S = Ke(), L = lt(Ee), p = Ht(pe), Ce = ct(), se = jt(n), [A, _] = C(!n), x = O(null);
174
- St(t, () => p, [p]), Se && !se && n && (x.current = Ne(S == null ? void 0 : S.document)), n && A && _(!1);
175
- const k = M(() => {
176
- if (p.add(), B.current = je(document, "keydown", Re), V.current = je(
177
- document,
178
- "focus",
179
- // the timeout is necessary b/c this will run before the new modal is mounted
180
- // and so steals focus from it
181
- () => setTimeout(Te),
182
- !0
183
- ), Z && Z(), X) {
184
- var u, ie;
185
- const Q = Ne((u = (ie = p.dialog) == null ? void 0 : ie.ownerDocument) != null ? u : S == null ? void 0 : S.document);
186
- p.dialog && Q && !Le(p.dialog, Q) && (x.current = Q, p.dialog.focus());
187
- }
188
- }), z = M(() => {
189
- if (p.remove(), B.current == null || B.current(), V.current == null || V.current(), j) {
190
- var u;
191
- (u = x.current) == null || u.focus == null || u.focus(me), x.current = null;
192
- }
193
- });
194
- b(() => {
195
- !n || !L || k();
196
- }, [
197
- n,
198
- L,
199
- /* should never change: */
200
- k
201
- ]), b(() => {
202
- A && z();
203
- }, [A, z]), $e(() => {
204
- z();
205
- });
206
- const Te = M(() => {
207
- if (!he || !Ce() || !p.isTopModal())
208
- return;
209
- const u = Ne(S == null ? void 0 : S.document);
210
- p.dialog && u && !Le(p.dialog, u) && p.dialog.focus();
211
- }), re = M((u) => {
212
- u.target === u.currentTarget && (h == null || h(u), i === !0 && $());
213
- }), Re = M((u) => {
214
- d && dt(u) && p.isTopModal() && (g == null || g(u), u.defaultPrevented || $());
215
- }), V = O(), B = O(), ae = (...u) => {
216
- _(!0), G == null || G(...u);
217
- };
218
- if (!L)
219
- return null;
220
- const P = Object.assign({
221
- role: o,
222
- ref: p.setDialogRef,
223
- // apparently only works on the dialog role element
224
- "aria-modal": o === "dialog" ? !0 : void 0
225
- }, ye, {
226
- style: r,
227
- className: s,
228
- tabIndex: -1
229
- });
230
- let q = Y ? Y(P) : /* @__PURE__ */ a.jsx("div", Object.assign({}, P, {
231
- children: /* @__PURE__ */ R.cloneElement(l, {
232
- role: "document"
233
- })
234
- }));
235
- q = _e(f, m, {
236
- unmountOnExit: !0,
237
- mountOnEnter: !0,
238
- appear: !0,
239
- in: !!n,
240
- onExit: ve,
241
- onExiting: ee,
242
- onExited: ae,
243
- onEnter: te,
244
- onEntering: ne,
245
- onEntered: oe,
246
- children: q
247
- });
248
- let U = null;
249
- return i && (U = ge({
250
- ref: p.setBackdropRef,
251
- onClick: re
252
- }), U = _e(T, fe, {
253
- in: !!n,
254
- appear: !0,
255
- mountOnEnter: !0,
256
- unmountOnExit: !0,
257
- children: U
258
- })), /* @__PURE__ */ a.jsx(a.Fragment, {
259
- children: /* @__PURE__ */ _t.createPortal(/* @__PURE__ */ a.jsxs(a.Fragment, {
260
- children: [U, q]
261
- }), L)
262
- });
263
- });
264
- qe.displayName = "Modal";
265
- const Kt = Object.assign(qe, {
266
- Manager: Me
267
- });
268
- function $t(e, t) {
269
- e.classList ? e.classList.add(t) : ut(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
270
- }
271
- function De(e, t) {
272
- return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
273
- }
274
- function Gt(e, t) {
275
- e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = De(e.className, t) : e.setAttribute("class", De(e.className && e.className.baseVal || "", t));
276
- }
277
- const W = {
278
- FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
279
- STICKY_CONTENT: ".sticky-top",
280
- NAVBAR_TOGGLER: ".navbar-toggler"
281
- };
282
- class zt extends Me {
283
- adjustAndStore(t, n, o) {
284
- const s = n.style[t];
285
- n.dataset[t] = s, J(n, {
286
- [t]: `${parseFloat(J(n, t)) + o}px`
287
- });
288
- }
289
- restore(t, n) {
290
- const o = n.dataset[t];
291
- o !== void 0 && (delete n.dataset[t], J(n, {
292
- [t]: o
293
- }));
294
- }
295
- setContainerStyle(t) {
296
- super.setContainerStyle(t);
297
- const n = this.getElement();
298
- if ($t(n, "modal-open"), !t.scrollBarWidth)
299
- return;
300
- const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
301
- D(n, W.FIXED_CONTENT).forEach((r) => this.adjustAndStore(o, r, t.scrollBarWidth)), D(n, W.STICKY_CONTENT).forEach((r) => this.adjustAndStore(s, r, -t.scrollBarWidth)), D(n, W.NAVBAR_TOGGLER).forEach((r) => this.adjustAndStore(s, r, t.scrollBarWidth));
302
- }
303
- removeContainerStyle(t) {
304
- super.removeContainerStyle(t);
305
- const n = this.getElement();
306
- Gt(n, "modal-open");
307
- const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
308
- D(n, W.FIXED_CONTENT).forEach((r) => this.restore(o, r)), D(n, W.STICKY_CONTENT).forEach((r) => this.restore(s, r)), D(n, W.NAVBAR_TOGGLER).forEach((r) => this.restore(s, r));
309
- }
310
- }
311
- let we;
312
- function Vt(e) {
313
- return we || (we = new zt(e)), we;
314
- }
315
- const Qe = /* @__PURE__ */ R.forwardRef(({
316
- className: e,
317
- bsPrefix: t,
318
- as: n = "div",
319
- ...o
320
- }, s) => (t = K(t, "modal-body"), /* @__PURE__ */ a.jsx(n, {
321
- ref: s,
322
- className: N(e, t),
323
- ...o
324
- })));
325
- Qe.displayName = "ModalBody";
326
- const Je = /* @__PURE__ */ R.createContext({
327
- // eslint-disable-next-line @typescript-eslint/no-empty-function
328
- onHide() {
329
- }
330
- }), Oe = /* @__PURE__ */ R.forwardRef(({
331
- bsPrefix: e,
332
- className: t,
333
- contentClassName: n,
334
- centered: o,
335
- size: s,
336
- fullscreen: r,
337
- children: l,
338
- scrollable: i,
339
- ...d
340
- }, h) => {
341
- e = K(e, "modal");
342
- const g = `${e}-dialog`, f = typeof r == "string" ? `${e}-fullscreen-${r}` : `${e}-fullscreen`;
343
- return /* @__PURE__ */ a.jsx("div", {
344
- ...d,
345
- ref: h,
346
- className: N(g, t, s && `${e}-${s}`, o && `${g}-centered`, i && `${g}-scrollable`, r && f),
347
- children: /* @__PURE__ */ a.jsx("div", {
348
- className: N(`${e}-content`, n),
349
- children: l
350
- })
351
- });
352
- });
353
- Oe.displayName = "ModalDialog";
354
- const Xe = /* @__PURE__ */ R.forwardRef(({
355
- className: e,
356
- bsPrefix: t,
357
- as: n = "div",
358
- ...o
359
- }, s) => (t = K(t, "modal-footer"), /* @__PURE__ */ a.jsx(n, {
360
- ref: s,
361
- className: N(e, t),
362
- ...o
363
- })));
364
- Xe.displayName = "ModalFooter";
365
- const qt = /* @__PURE__ */ R.forwardRef(({
366
- closeLabel: e = "Close",
367
- closeVariant: t,
368
- closeButton: n = !1,
369
- onHide: o,
370
- children: s,
371
- ...r
372
- }, l) => {
373
- const i = H(Je), d = M(() => {
374
- i == null || i.onHide(), o == null || o();
375
- });
376
- return /* @__PURE__ */ a.jsxs("div", {
377
- ref: l,
378
- ...r,
379
- children: [s, n && /* @__PURE__ */ a.jsx(ke, {
380
- "aria-label": e,
381
- variant: t,
382
- onClick: d
383
- })]
384
- });
385
- }), Ye = /* @__PURE__ */ R.forwardRef(({
386
- bsPrefix: e,
387
- className: t,
388
- closeLabel: n = "Close",
389
- closeButton: o = !1,
390
- ...s
391
- }, r) => (e = K(e, "modal-header"), /* @__PURE__ */ a.jsx(qt, {
392
- ref: r,
393
- ...s,
394
- className: N(t, e),
395
- closeLabel: n,
396
- closeButton: o
397
- })));
398
- Ye.displayName = "ModalHeader";
399
- const Qt = Bt("h4"), Ze = /* @__PURE__ */ R.forwardRef(({
400
- className: e,
401
- bsPrefix: t,
402
- as: n = Qt,
403
- ...o
404
- }, s) => (t = K(t, "modal-title"), /* @__PURE__ */ a.jsx(n, {
405
- ref: s,
406
- className: N(e, t),
407
- ...o
408
- })));
409
- Ze.displayName = "ModalTitle";
410
- function Jt(e) {
411
- return /* @__PURE__ */ a.jsx(Ge, {
412
- ...e,
413
- timeout: null
414
- });
415
- }
416
- function Xt(e) {
417
- return /* @__PURE__ */ a.jsx(Ge, {
418
- ...e,
419
- timeout: null
420
- });
421
- }
422
- const et = /* @__PURE__ */ R.forwardRef(({
423
- bsPrefix: e,
424
- className: t,
425
- style: n,
426
- dialogClassName: o,
427
- contentClassName: s,
428
- children: r,
429
- dialogAs: l = Oe,
430
- "data-bs-theme": i,
431
- "aria-labelledby": d,
432
- "aria-describedby": h,
433
- "aria-label": g,
434
- /* BaseModal props */
435
- show: f = !1,
436
- animation: m = !0,
437
- backdrop: T = !0,
438
- keyboard: fe = !0,
439
- onEscapeKeyDown: X,
440
- onShow: he,
441
- onHide: j,
442
- container: me,
443
- autoFocus: Y = !0,
444
- enforceFocus: ge = !0,
445
- restoreFocus: pe = !0,
446
- restoreFocusOptions: Ee,
447
- onEntered: Z,
448
- onExit: $,
449
- onExiting: ve,
450
- onEnter: G,
451
- onEntering: ee,
452
- onExited: te,
453
- backdropClassName: ne,
454
- manager: oe,
455
- ...ye
456
- }, S) => {
457
- const [L, p] = C({}), [Ce, se] = C(!1), A = O(!1), _ = O(!1), x = O(null), [k, z] = ft(), Te = ht(S, z), re = M(j), Re = mt();
458
- e = K(e, "modal");
459
- const V = w(() => ({
460
- onHide: re
461
- }), [re]);
462
- function B() {
463
- return oe || Vt({
464
- isRTL: Re
465
- });
466
- }
467
- function ae(c) {
468
- if (!Se)
469
- return;
470
- const F = B().getScrollbarWidth() > 0, Ie = c.scrollHeight > He(c).documentElement.clientHeight;
471
- p({
472
- paddingRight: F && !Ie ? Ue() : void 0,
473
- paddingLeft: !F && Ie ? Ue() : void 0
474
- });
475
- }
476
- const P = M(() => {
477
- k && ae(k.dialog);
478
- });
479
- $e(() => {
480
- Be(window, "resize", P), x.current == null || x.current();
481
- });
482
- const q = () => {
483
- A.current = !0;
484
- }, U = (c) => {
485
- A.current && k && c.target === k.dialog && (_.current = !0), A.current = !1;
486
- }, u = () => {
487
- se(!0), x.current = pt(k.dialog, () => {
488
- se(!1);
489
- });
490
- }, ie = (c) => {
491
- c.target === c.currentTarget && u();
492
- }, Q = (c) => {
493
- if (T === "static") {
494
- ie(c);
495
- return;
496
- }
497
- if (_.current || c.target !== c.currentTarget) {
498
- _.current = !1;
499
- return;
500
- }
501
- j == null || j();
502
- }, tt = (c) => {
503
- fe ? X == null || X(c) : (c.preventDefault(), T === "static" && u());
504
- }, nt = (c, F) => {
505
- c && ae(c), G == null || G(c, F);
506
- }, ot = (c) => {
507
- x.current == null || x.current(), $ == null || $(c);
508
- }, st = (c, F) => {
509
- ee == null || ee(c, F), gt(window, "resize", P);
510
- }, rt = (c) => {
511
- c && (c.style.display = ""), te == null || te(c), Be(window, "resize", P);
512
- }, at = y((c) => /* @__PURE__ */ a.jsx("div", {
513
- ...c,
514
- className: N(`${e}-backdrop`, ne, !m && "show")
515
- }), [m, ne, e]), Ae = {
516
- ...n,
517
- ...L
518
- };
519
- Ae.display = "block";
520
- const it = (c) => /* @__PURE__ */ a.jsx("div", {
521
- role: "dialog",
522
- ...c,
523
- style: Ae,
524
- className: N(t, e, Ce && `${e}-static`, !m && "show"),
525
- onClick: T ? Q : void 0,
526
- onMouseUp: U,
527
- "data-bs-theme": i,
528
- "aria-label": g,
529
- "aria-labelledby": d,
530
- "aria-describedby": h,
531
- children: /* @__PURE__ */ a.jsx(l, {
532
- ...ye,
533
- onMouseDown: q,
534
- className: o,
535
- contentClassName: s,
536
- children: r
537
- })
538
- });
539
- return /* @__PURE__ */ a.jsx(Je.Provider, {
540
- value: V,
541
- children: /* @__PURE__ */ a.jsx(Kt, {
542
- show: f,
543
- ref: Te,
544
- backdrop: T,
545
- container: me,
546
- keyboard: !0,
547
- autoFocus: Y,
548
- enforceFocus: ge,
549
- restoreFocus: pe,
550
- restoreFocusOptions: Ee,
551
- onEscapeKeyDown: tt,
552
- onShow: he,
553
- onHide: j,
554
- onEnter: nt,
555
- onEntering: st,
556
- onEntered: Z,
557
- onExit: ot,
558
- onExiting: ve,
559
- onExited: rt,
560
- manager: B(),
561
- transition: m ? Jt : void 0,
562
- backdropTransition: m ? Xt : void 0,
563
- renderBackdrop: at,
564
- renderDialog: it
565
- })
566
- });
567
- });
568
- et.displayName = "Modal";
569
- const I = Object.assign(et, {
570
- Body: Qe,
571
- Header: Ye,
572
- Title: Ze,
573
- Footer: Xe,
574
- Dialog: Oe,
575
- TRANSITION_DURATION: 300,
576
- BACKDROP_TRANSITION_DURATION: 150
577
- }), Yt = () => {
578
- const { confirmTexts: e } = H(ue), { isShown: t, text: n, onFinish: o } = Mt(), { options: s } = H(ze), [r, l] = C(s.defaultValue ?? ""), i = y(() => {
579
- o(null);
580
- }, [o]), d = y(() => {
581
- o(r);
582
- }, [o, r]);
583
- b(() => {
584
- t === !0 && l(s.defaultValue ?? "");
585
- }, [t, s.defaultValue]);
586
- const h = w(() => ({
1
+ import { N as T, aj as p, j as a, ak as A, al as L, am as _, L as y, K as d, an as j, ao as O, ap as N, ab as U, ad as k, af as w, aq as M, a1 as K } from "./UserAvatarToggle-CH7OqxNp.js";
2
+ import z, { useContext as S, useState as h, useCallback as x, useEffect as v, useMemo as C, useRef as F, useReducer as G } from "react";
3
+ import { u as B, a as H } from "./useConfirm-B3BI8PzR.js";
4
+ import "react-hook-form";
5
+ import { M as P, L as D, E as m } from "./EventType-SEEDuisM.js";
6
+ const V = () => {
7
+ const { confirmTexts: e } = S(T), { isShown: s, text: t, onFinish: n } = B(), { options: o } = S(p), [r, i] = h(o.defaultValue ?? ""), c = x(() => {
8
+ n(null);
9
+ }, [n]), l = x(() => {
10
+ n(r);
11
+ }, [n, r]);
12
+ v(() => {
13
+ s === !0 && i(o.defaultValue ?? "");
14
+ }, [s, o.defaultValue]);
15
+ const f = C(() => ({
587
16
  value: r,
588
- onChange: (g) => l(g.currentTarget.value),
17
+ onChange: (g) => i(g.currentTarget.value),
589
18
  className: "w-100",
590
19
  autoFocus: !0,
591
20
  tabIndex: 0
592
21
  }), [r]);
593
- return /* @__PURE__ */ a.jsxs(I, { show: t, size: "sm", centered: !0, onHide: i, children: [
594
- /* @__PURE__ */ a.jsx(I.Header, { children: /* @__PURE__ */ a.jsx(I.Title, { children: n }) }),
595
- /* @__PURE__ */ a.jsxs(I.Body, { children: [
596
- s.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...h, rows: 5 }) : void 0,
597
- s.input === "input" ? /* @__PURE__ */ a.jsx("input", { ...h, type: s.type }) : void 0
22
+ return /* @__PURE__ */ a.jsxs(P, { show: s, size: "sm", centered: !0, onHide: c, children: [
23
+ /* @__PURE__ */ a.jsx(P.Header, { children: /* @__PURE__ */ a.jsx(P.Title, { children: t }) }),
24
+ /* @__PURE__ */ a.jsxs(P.Body, { children: [
25
+ o.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...f, rows: 5 }) : void 0,
26
+ o.input === "input" ? /* @__PURE__ */ a.jsx("input", { ...f, type: o.type }) : void 0
598
27
  ] }),
599
- /* @__PURE__ */ a.jsxs(I.Footer, { children: [
600
- /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary", onClick: i, children: e.cancel }),
601
- /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-primary ml", onClick: d, disabled: s.required && !r, children: e.confirm })
28
+ /* @__PURE__ */ a.jsxs(P.Footer, { children: [
29
+ /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary", onClick: c, children: e.cancel }),
30
+ /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-primary ml", onClick: l, disabled: o.required && !r, children: e.confirm })
602
31
  ] })
603
32
  ] });
604
- }, Zt = ({ children: e }) => {
605
- const [t, n] = C(!1), [o, s] = C(""), [r, l] = C({ input: "textarea", type: "text" }), i = O(() => {
606
- }), d = y((f) => {
607
- s(f), n(!0);
608
- }, []), h = y(() => {
609
- n(!1);
610
- }, []), g = w(() => ({
611
- isShown: t,
612
- text: o,
613
- showPrompt: d,
614
- hidePrompt: h,
615
- resolveRef: i,
33
+ }, $ = ({ children: e }) => {
34
+ const [s, t] = h(!1), [n, o] = h(""), [r, i] = h({ input: "textarea", type: "text" }), c = F(() => {
35
+ }), l = x((u) => {
36
+ o(u), t(!0);
37
+ }, []), f = x(() => {
38
+ t(!1);
39
+ }, []), g = C(() => ({
40
+ isShown: s,
41
+ text: n,
42
+ showPrompt: l,
43
+ hidePrompt: f,
44
+ resolveRef: c,
616
45
  options: r,
617
- setOptions: l
618
- }), [t, o, d, h, r]);
619
- return /* @__PURE__ */ a.jsxs(ze.Provider, { value: g, children: [
46
+ setOptions: i
47
+ }), [s, n, l, f, r]);
48
+ return /* @__PURE__ */ a.jsxs(p.Provider, { value: g, children: [
620
49
  e,
621
- /* @__PURE__ */ a.jsx(Yt, {})
50
+ /* @__PURE__ */ a.jsx(V, {})
622
51
  ] });
623
- }, en = ({ children: e }) => {
624
- const [t, n] = C(!1), [o, s] = C(""), r = y((d) => {
625
- n(!0), s(d);
626
- }, []), l = y(() => {
627
- n(!1);
628
- }, []), i = w(() => ({ show: t, text: o, showConfirm: r, hideConfirm: l }), [t, o, r, l]);
629
- return /* @__PURE__ */ a.jsxs(Et.Provider, { value: i, children: [
630
- /* @__PURE__ */ a.jsx(rn, {}),
52
+ }, q = ({ children: e }) => {
53
+ const [s, t] = h(!1), [n, o] = h(""), r = x((l) => {
54
+ t(!0), o(l);
55
+ }, []), i = x(() => {
56
+ t(!1);
57
+ }, []), c = C(() => ({ show: s, text: n, showConfirm: r, hideConfirm: i }), [s, n, r, i]);
58
+ return /* @__PURE__ */ a.jsxs(A.Provider, { value: c, children: [
59
+ /* @__PURE__ */ a.jsx(Y, {}),
631
60
  e
632
61
  ] });
633
- }, hn = ({ cookieDomain: e, axiosInstance: t, LinkComponent: n, NavigateComponent: o, language: s, axiosTexts: r, confirmTexts: l, formValidationTexts: i, homeDashboardTexts: d, formSubmitTexts: h, appSearchTexts: g, customSelectTexts: f, children: m }) => {
634
- const T = w(() => ({
635
- axiosInstance: t,
62
+ }, oe = ({ cookieDomain: e, axiosInstance: s, LinkComponent: t, NavigateComponent: n, language: o, axiosTexts: r, confirmTexts: i, formValidationTexts: c, homeDashboardTexts: l, formSubmitTexts: f, appSearchTexts: g, customSelectTexts: u, children: E }) => {
63
+ const R = C(() => ({
64
+ axiosInstance: s,
636
65
  cookieDomain: e,
637
- LinkComponent: n,
638
- NavigateComponent: o,
639
- language: s,
66
+ LinkComponent: t,
67
+ NavigateComponent: n,
68
+ language: o,
640
69
  axiosTexts: r,
641
- confirmTexts: l,
642
- formValidationTexts: i,
643
- homeDashboardTexts: d,
644
- formSubmitTexts: h,
70
+ confirmTexts: i,
71
+ formValidationTexts: c,
72
+ homeDashboardTexts: l,
73
+ formSubmitTexts: f,
645
74
  appSearchTexts: g,
646
- customSelectTexts: f
75
+ customSelectTexts: u
647
76
  }), [
648
- t,
77
+ s,
649
78
  e,
79
+ t,
650
80
  n,
651
81
  o,
652
- s,
653
82
  r,
654
- l,
655
83
  i,
656
- d,
657
- h,
84
+ c,
85
+ l,
86
+ f,
658
87
  g,
659
- f
88
+ u
660
89
  ]);
661
- return /* @__PURE__ */ a.jsx(ue.Provider, { value: T, children: /* @__PURE__ */ a.jsx(en, { children: /* @__PURE__ */ a.jsxs(Zt, { children: [
662
- /* @__PURE__ */ a.jsx(vt, {}),
663
- m
90
+ return /* @__PURE__ */ a.jsx(T.Provider, { value: R, children: /* @__PURE__ */ a.jsx(q, { children: /* @__PURE__ */ a.jsxs($, { children: [
91
+ /* @__PURE__ */ a.jsx(L, {}),
92
+ E
664
93
  ] }) }) });
665
- }, mn = ({ children: e }) => {
666
- const [t, n] = C(!1), [o] = C(/* @__PURE__ */ new Set()), s = y((i) => {
667
- o.add(i), n(!0);
668
- }, [o]), r = y((i) => {
669
- o.delete(i), o.size === 0 && n(!1);
670
- }, [o]), l = w(() => ({ isLoading: t, startLoading: s, stopLoading: r }), [t, s, r]);
671
- return /* @__PURE__ */ a.jsxs(yt.Provider, { value: l, children: [
672
- t && /* @__PURE__ */ a.jsx(Lt, {}),
94
+ }, re = ({ children: e }) => {
95
+ const [s, t] = h(!1), [n] = h(/* @__PURE__ */ new Set()), o = x((c) => {
96
+ n.add(c), t(!0);
97
+ }, [n]), r = x((c) => {
98
+ n.delete(c), n.size === 0 && t(!1);
99
+ }, [n]), i = C(() => ({ isLoading: s, startLoading: o, stopLoading: r }), [s, o, r]);
100
+ return /* @__PURE__ */ a.jsxs(_.Provider, { value: i, children: [
101
+ s && /* @__PURE__ */ a.jsx(D, {}),
673
102
  e
674
103
  ] });
675
104
  };
676
105
  /*! @azure/msal-browser v3.14.0 2024-05-07 */
677
- class tn {
106
+ class Q {
678
107
  /**
679
108
  * Gets interaction status from event message
680
109
  * @param message
681
110
  * @param currentStatus
682
111
  */
683
- static getInteractionStatusFromEvent(t, n) {
684
- switch (t.eventType) {
685
- case v.LOGIN_START:
686
- return E.Login;
687
- case v.SSO_SILENT_START:
688
- return E.SsoSilent;
689
- case v.ACQUIRE_TOKEN_START:
690
- if (t.interactionType === le.Redirect || t.interactionType === le.Popup)
691
- return E.AcquireToken;
112
+ static getInteractionStatusFromEvent(s, t) {
113
+ switch (s.eventType) {
114
+ case m.LOGIN_START:
115
+ return d.Login;
116
+ case m.SSO_SILENT_START:
117
+ return d.SsoSilent;
118
+ case m.ACQUIRE_TOKEN_START:
119
+ if (s.interactionType === y.Redirect || s.interactionType === y.Popup)
120
+ return d.AcquireToken;
692
121
  break;
693
- case v.HANDLE_REDIRECT_START:
694
- return E.HandleRedirect;
695
- case v.LOGOUT_START:
696
- return E.Logout;
697
- case v.SSO_SILENT_SUCCESS:
698
- case v.SSO_SILENT_FAILURE:
699
- if (n && n !== E.SsoSilent)
122
+ case m.HANDLE_REDIRECT_START:
123
+ return d.HandleRedirect;
124
+ case m.LOGOUT_START:
125
+ return d.Logout;
126
+ case m.SSO_SILENT_SUCCESS:
127
+ case m.SSO_SILENT_FAILURE:
128
+ if (t && t !== d.SsoSilent)
700
129
  break;
701
- return E.None;
702
- case v.LOGOUT_END:
703
- if (n && n !== E.Logout)
130
+ return d.None;
131
+ case m.LOGOUT_END:
132
+ if (t && t !== d.Logout)
704
133
  break;
705
- return E.None;
706
- case v.HANDLE_REDIRECT_END:
707
- if (n && n !== E.HandleRedirect)
134
+ return d.None;
135
+ case m.HANDLE_REDIRECT_END:
136
+ if (t && t !== d.HandleRedirect)
708
137
  break;
709
- return E.None;
710
- case v.LOGIN_SUCCESS:
711
- case v.LOGIN_FAILURE:
712
- case v.ACQUIRE_TOKEN_SUCCESS:
713
- case v.ACQUIRE_TOKEN_FAILURE:
714
- case v.RESTORE_FROM_BFCACHE:
715
- if (t.interactionType === le.Redirect || t.interactionType === le.Popup) {
716
- if (n && n !== E.Login && n !== E.AcquireToken)
138
+ return d.None;
139
+ case m.LOGIN_SUCCESS:
140
+ case m.LOGIN_FAILURE:
141
+ case m.ACQUIRE_TOKEN_SUCCESS:
142
+ case m.ACQUIRE_TOKEN_FAILURE:
143
+ case m.RESTORE_FROM_BFCACHE:
144
+ if (s.interactionType === y.Redirect || s.interactionType === y.Popup) {
145
+ if (t && t !== d.Login && t !== d.AcquireToken)
717
146
  break;
718
- return E.None;
147
+ return d.None;
719
148
  }
720
149
  break;
721
150
  }
@@ -723,166 +152,166 @@ class tn {
723
152
  }
724
153
  }
725
154
  /*! @azure/msal-react v2.0.16 2024-05-07 */
726
- const nn = "@azure/msal-react", We = "2.0.16";
155
+ const J = "@azure/msal-react", b = "2.0.16";
727
156
  /*! @azure/msal-react v2.0.16 2024-05-07 */
728
- const de = {
157
+ const I = {
729
158
  UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
730
159
  EVENT: "EVENT"
731
- }, on = (e, t) => {
732
- const { type: n, payload: o } = t;
733
- let s = e.inProgress;
734
- switch (n) {
735
- case de.UNBLOCK_INPROGRESS:
736
- e.inProgress === E.Startup && (s = E.None, o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
160
+ }, W = (e, s) => {
161
+ const { type: t, payload: n } = s;
162
+ let o = e.inProgress;
163
+ switch (t) {
164
+ case I.UNBLOCK_INPROGRESS:
165
+ e.inProgress === d.Startup && (o = d.None, n.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
737
166
  break;
738
- case de.EVENT:
739
- const l = o.message, i = tn.getInteractionStatusFromEvent(l, e.inProgress);
740
- i && (o.logger.info(`MsalProvider - ${l.eventType} results in setting inProgress from ${e.inProgress} to ${i}`), s = i);
167
+ case I.EVENT:
168
+ const i = n.message, c = Q.getInteractionStatusFromEvent(i, e.inProgress);
169
+ c && (n.logger.info(`MsalProvider - ${i.eventType} results in setting inProgress from ${e.inProgress} to ${c}`), o = c);
741
170
  break;
742
171
  default:
743
- throw new Error(`Unknown action type: ${n}`);
172
+ throw new Error(`Unknown action type: ${t}`);
744
173
  }
745
- const r = o.instance.getAllAccounts();
746
- return s !== e.inProgress && !Pe(r, e.accounts) ? {
174
+ const r = n.instance.getAllAccounts();
175
+ return o !== e.inProgress && !N(r, e.accounts) ? {
747
176
  ...e,
748
- inProgress: s,
177
+ inProgress: o,
749
178
  accounts: r
750
- } : s !== e.inProgress ? {
179
+ } : o !== e.inProgress ? {
751
180
  ...e,
752
- inProgress: s
753
- } : Pe(r, e.accounts) ? e : {
181
+ inProgress: o
182
+ } : N(r, e.accounts) ? e : {
754
183
  ...e,
755
184
  accounts: r
756
185
  };
757
186
  };
758
- function sn({ instance: e, children: t }) {
759
- b(() => {
760
- e.initializeWrapperLibrary(Ct.React, We);
187
+ function X({ instance: e, children: s }) {
188
+ v(() => {
189
+ e.initializeWrapperLibrary(j.React, b);
761
190
  }, [e]);
762
- const n = w(() => e.getLogger().clone(nn, We), [e]), [o, s] = kt(on, void 0, () => ({
763
- inProgress: E.Startup,
191
+ const t = C(() => e.getLogger().clone(J, b), [e]), [n, o] = G(W, void 0, () => ({
192
+ inProgress: d.Startup,
764
193
  accounts: e.getAllAccounts()
765
194
  }));
766
- b(() => {
767
- const l = e.addEventCallback((i) => {
768
- s({
195
+ v(() => {
196
+ const i = e.addEventCallback((c) => {
197
+ o({
769
198
  payload: {
770
199
  instance: e,
771
- logger: n,
772
- message: i
200
+ logger: t,
201
+ message: c
773
202
  },
774
- type: de.EVENT
203
+ type: I.EVENT
775
204
  });
776
205
  });
777
- return n.verbose(`MsalProvider - Registered event callback with id: ${l}`), e.initialize().then(() => {
206
+ return t.verbose(`MsalProvider - Registered event callback with id: ${i}`), e.initialize().then(() => {
778
207
  e.handleRedirectPromise().catch(() => {
779
208
  }).finally(() => {
780
- s({
209
+ o({
781
210
  payload: {
782
211
  instance: e,
783
- logger: n
212
+ logger: t
784
213
  },
785
- type: de.UNBLOCK_INPROGRESS
214
+ type: I.UNBLOCK_INPROGRESS
786
215
  });
787
216
  });
788
217
  }).catch(() => {
789
218
  }), () => {
790
- l && (n.verbose(`MsalProvider - Removing event callback ${l}`), e.removeEventCallback(l));
219
+ i && (t.verbose(`MsalProvider - Removing event callback ${i}`), e.removeEventCallback(i));
791
220
  };
792
- }, [e, n]);
221
+ }, [e, t]);
793
222
  const r = {
794
223
  instance: e,
795
- inProgress: o.inProgress,
796
- accounts: o.accounts,
797
- logger: n
224
+ inProgress: n.inProgress,
225
+ accounts: n.accounts,
226
+ logger: t
798
227
  };
799
- return bt.createElement(Tt.Provider, { value: r }, t);
228
+ return z.createElement(O.Provider, { value: r }, s);
800
229
  }
801
- const gn = ({ children: e }) => {
802
- const t = Rt(), { msalInstance: n } = H(Ve), o = y(() => {
803
- const f = localStorage.getItem("user") ?? null;
804
- return f ? JSON.parse(f) : null;
805
- }, []), [s, r] = C(o()), l = y(async (f) => {
806
- let m = null;
807
- return await t.get("/user/detail", f ? { headers: { Authorization: `Bearer ${f}` } } : void 0).then((T) => {
808
- m = T.data;
230
+ const ae = ({ children: e }) => {
231
+ const s = U(), { msalInstance: t } = S(k), n = x(() => {
232
+ const u = localStorage.getItem("user") ?? null;
233
+ return u ? JSON.parse(u) : null;
234
+ }, []), [o, r] = h(n()), i = x(async (u) => {
235
+ let E = null;
236
+ return await s.get("/user/detail", u ? { headers: { Authorization: `Bearer ${u}` } } : void 0).then((R) => {
237
+ E = R.data;
809
238
  }).catch(() => {
810
- m = null;
811
- }), localStorage.setItem("user", JSON.stringify(m)), m;
812
- }, [t]), i = y(() => {
239
+ E = null;
240
+ }), localStorage.setItem("user", JSON.stringify(E)), E;
241
+ }, [s]), c = x(() => {
813
242
  localStorage.removeItem("user");
814
- }, []), d = y(async (f) => {
815
- const m = await l(f);
816
- return m ? (r(m), !0) : !1;
817
- }, [l]), h = y(() => {
818
- i(), r(null);
819
- }, [i]), g = w(() => ({ user: s, loginUser: d, logoutUser: h }), [s, d, h]);
820
- return b(() => {
821
- r(o());
822
- }, [o]), b(() => {
823
- if (n) {
824
- const f = n.addEventCallback((m) => {
825
- if (m.eventType === v.ACQUIRE_TOKEN_SUCCESS && m.payload) {
826
- const T = m.payload;
827
- d(T.accessToken).catch(() => h());
243
+ }, []), l = x(async (u) => {
244
+ const E = await i(u);
245
+ return E ? (r(E), !0) : !1;
246
+ }, [i]), f = x(() => {
247
+ c(), r(null);
248
+ }, [c]), g = C(() => ({ user: o, loginUser: l, logoutUser: f }), [o, l, f]);
249
+ return v(() => {
250
+ r(n());
251
+ }, [n]), v(() => {
252
+ if (t) {
253
+ const u = t.addEventCallback((E) => {
254
+ if (E.eventType === m.ACQUIRE_TOKEN_SUCCESS && E.payload) {
255
+ const R = E.payload;
256
+ l(R.accessToken).catch(() => f());
828
257
  }
829
258
  });
830
259
  return () => {
831
- f && n.removeEventCallback(f);
260
+ u && t.removeEventCallback(u);
832
261
  };
833
262
  }
834
263
  return () => {
835
264
  };
836
- }, [n, d, h]), /* @__PURE__ */ a.jsx(xt.Provider, { value: g, children: e });
837
- }, pn = ({ ...e }) => {
838
- const { cookieDomain: t } = H(ue), [, n] = Nt(["Authorization"]), [o, s] = C(null), r = w(() => ({
265
+ }, [t, l, f]), /* @__PURE__ */ a.jsx(w.Provider, { value: g, children: e });
266
+ }, ce = ({ ...e }) => {
267
+ const { cookieDomain: s } = S(T), [, t] = M(["Authorization"]), [n, o] = h(null), r = C(() => ({
839
268
  useMsal: e.useMsal ?? !1,
840
- storedToken: (o == null ? void 0 : o.token) ?? null,
269
+ storedToken: (n == null ? void 0 : n.token) ?? null,
841
270
  msalInstance: e.useMsal ? e.msalInstance ?? null : null,
842
271
  msalScopes: e.useMsal ? e.msalScopes ?? [] : []
843
- }), [e, o]);
844
- return b(() => {
272
+ }), [e, n]);
273
+ return v(() => {
845
274
  if (e.useMsal) {
846
- const l = e.msalInstance.addEventCallback((i) => {
847
- if (i.eventType === v.LOGIN_SUCCESS || i.eventType === v.ACQUIRE_TOKEN_SUCCESS && i.payload) {
848
- const d = i.payload, h = d.account;
849
- e.msalInstance.setActiveAccount(h);
850
- const g = d.accessToken, f = d.expiresOn;
851
- s({ token: g, expiresOn: f });
275
+ const i = e.msalInstance.addEventCallback((c) => {
276
+ if (c.eventType === m.LOGIN_SUCCESS || c.eventType === m.ACQUIRE_TOKEN_SUCCESS && c.payload) {
277
+ const l = c.payload, f = l.account;
278
+ e.msalInstance.setActiveAccount(f);
279
+ const g = l.accessToken, u = l.expiresOn;
280
+ o({ token: g, expiresOn: u });
852
281
  }
853
282
  });
854
283
  return () => {
855
- l && e.msalInstance.removeEventCallback(l);
284
+ i && e.msalInstance.removeEventCallback(i);
856
285
  };
857
286
  }
858
287
  return () => {
859
288
  };
860
- }, [e]), b(() => {
861
- o && n("Authorization", o.token, {
289
+ }, [e]), v(() => {
290
+ n && t("Authorization", n.token, {
862
291
  path: "/",
863
292
  secure: !0,
864
293
  sameSite: "none",
865
- domain: t,
866
- expires: o.expiresOn ?? void 0
294
+ domain: s,
295
+ expires: n.expiresOn ?? void 0
867
296
  });
868
- }, [o, t, n]), /* @__PURE__ */ a.jsx(Ve.Provider, { value: r, children: e.useMsal ? /* @__PURE__ */ a.jsx(sn, { instance: e.msalInstance, children: e.children }) : e.children });
869
- }, rn = () => {
870
- const { confirmTexts: e } = H(ue), { onConfirm: t, onCancel: n, text: o, show: s } = Ot();
871
- return /* @__PURE__ */ a.jsx(I, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ a.jsxs(I.Body, { children: [
872
- /* @__PURE__ */ a.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ a.jsx(At, { variant: "h6", children: o }) }),
297
+ }, [n, s, t]), /* @__PURE__ */ a.jsx(k.Provider, { value: r, children: e.useMsal ? /* @__PURE__ */ a.jsx(X, { instance: e.msalInstance, children: e.children }) : e.children });
298
+ }, Y = () => {
299
+ const { confirmTexts: e } = S(T), { onConfirm: s, onCancel: t, text: n, show: o } = H();
300
+ return /* @__PURE__ */ a.jsx(P, { show: o, size: "sm", centered: !0, onHide: t, children: /* @__PURE__ */ a.jsxs(P.Body, { children: [
301
+ /* @__PURE__ */ a.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ a.jsx(K, { variant: "h6", children: n }) }),
873
302
  /* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
874
- /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick: n, children: e.no }),
875
- /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-primary w-100 ml", onClick: t, children: e.yes })
303
+ /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick: t, children: e.no }),
304
+ /* @__PURE__ */ a.jsx("button", { type: "button", className: "btn btn-primary w-100 ml", onClick: s, children: e.yes })
876
305
  ] })
877
306
  ] }) });
878
307
  };
879
308
  export {
880
- Ve as AuthContext,
881
- pn as AuthProvider,
882
- yt as LoadingContext,
883
- mn as LoadingProvider,
884
- ue as LuminusComponentsContext,
885
- hn as LuminusComponentsProvider,
886
- xt as UserContext,
887
- gn as UserProvider
309
+ k as AuthContext,
310
+ ce as AuthProvider,
311
+ _ as LoadingContext,
312
+ re as LoadingProvider,
313
+ T as LuminusComponentsContext,
314
+ oe as LuminusComponentsProvider,
315
+ w as UserContext,
316
+ ae as UserProvider
888
317
  };