react-luminus-components 2.0.33 → 2.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +313 -307
- package/package.json +1 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as re, bR as Oe, c as N, bS as He, R as
|
|
1
|
+
import { t as re, bR as Oe, c as N, bS as He, R as ae, an as Ue, bT as De, a5 as H, ak as We, S as ie, bU as je, ar as Fe, ap as Be, bd as pe, by as Re, bf as J, aq as ze, bV as Ge, aF as we, bW as Ve, bX as Xe, bY as L, bZ as Ke, b_ as U, b$ as l, c0 as _e, c1 as Le, c2 as V, c3 as E, c4 as q, c5 as ce, c6 as Ie, c7 as Je, c8 as Se, c9 as Qe, ca as Ye, cb as qe, cc as Ze, cd as be, ce as G, cf as Me, cg as Ce, ch as et, ci as fe, cj as $e, ao as tt, b8 as nt, a6 as ot } from "./nivo-bar-wBsr2P1t.js";
|
|
2
2
|
import { ck as gn, ah as pn } from "./nivo-bar-wBsr2P1t.js";
|
|
3
3
|
import { jsxs as I, jsx as y } from "react/jsx-runtime";
|
|
4
4
|
import { useState as R, useContext as z, useEffect as B, useRef as Q, useMemo as F, useCallback as Y, useSyncExternalStore as st } from "react";
|
|
5
5
|
import { EventType as ge, InteractionStatus as ye, InteractionRequiredAuthError as rt } from "@azure/msal-browser";
|
|
6
|
-
import { useMsal as it, MsalProvider as
|
|
6
|
+
import { useMsal as it, MsalProvider as ct } from "@azure/msal-react";
|
|
7
7
|
import "react-router";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "react-flexmonster";
|
|
11
|
-
import { L as
|
|
11
|
+
import { L as at, b as lt } from "./FormDisabledProvider-CknAF8EI.js";
|
|
12
12
|
import { F as mn } from "./FormDisabledProvider-CknAF8EI.js";
|
|
13
13
|
import { a as ht, u as ut } from "./useLocalStorageState-DBd2vOH1.js";
|
|
14
14
|
import { u as dt } from "./useIsBrowserOnline-RAirIO4c.js";
|
|
@@ -32,37 +32,37 @@ function _t() {
|
|
|
32
32
|
const mt = (t) => {
|
|
33
33
|
const e = N.c(10), {
|
|
34
34
|
children: n
|
|
35
|
-
} = t, [s, o] = R(!1), [i, r] = R(""), [
|
|
35
|
+
} = t, [s, o] = R(!1), [i, r] = R(""), [c, a] = R(void 0);
|
|
36
36
|
let h;
|
|
37
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = (
|
|
38
|
-
o(!0), r(
|
|
37
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = (S, g) => {
|
|
38
|
+
o(!0), r(S), a(g);
|
|
39
39
|
}, e[0] = h) : h = e[0];
|
|
40
40
|
const u = h;
|
|
41
|
-
let
|
|
42
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
41
|
+
let m;
|
|
42
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
43
43
|
o(!1);
|
|
44
|
-
}, e[1] =
|
|
45
|
-
const f =
|
|
46
|
-
let
|
|
47
|
-
e[2] !== s || e[3] !== i || e[4] !==
|
|
44
|
+
}, e[1] = m) : m = e[1];
|
|
45
|
+
const f = m;
|
|
46
|
+
let p;
|
|
47
|
+
e[2] !== s || e[3] !== i || e[4] !== c ? (p = {
|
|
48
48
|
show: s,
|
|
49
49
|
text: i,
|
|
50
50
|
showConfirm: u,
|
|
51
51
|
hideConfirm: f,
|
|
52
|
-
textSm:
|
|
53
|
-
}, e[2] = s, e[3] = i, e[4] =
|
|
54
|
-
const
|
|
55
|
-
let
|
|
56
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
52
|
+
textSm: c
|
|
53
|
+
}, e[2] = s, e[3] = i, e[4] = c, e[5] = p) : p = e[5];
|
|
54
|
+
const w = p;
|
|
55
|
+
let b;
|
|
56
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ y(Bt, {}), e[6] = b) : b = e[6];
|
|
57
57
|
let d;
|
|
58
|
-
return e[7] !== n || e[8] !==
|
|
59
|
-
|
|
58
|
+
return e[7] !== n || e[8] !== w ? (d = /* @__PURE__ */ I(He.Provider, { value: w, children: [
|
|
59
|
+
b,
|
|
60
60
|
n
|
|
61
|
-
] }), e[7] = n, e[8] =
|
|
61
|
+
] }), e[7] = n, e[8] = w, e[9] = d) : d = e[9], d;
|
|
62
62
|
}, wt = () => {
|
|
63
63
|
const t = N.c(43), {
|
|
64
64
|
texts: e
|
|
65
|
-
} = z(
|
|
65
|
+
} = z(ae), {
|
|
66
66
|
confirm: n
|
|
67
67
|
} = e, {
|
|
68
68
|
isShown: s,
|
|
@@ -70,46 +70,46 @@ const mt = (t) => {
|
|
|
70
70
|
onFinish: i
|
|
71
71
|
} = Ue(), {
|
|
72
72
|
options: r
|
|
73
|
-
} = z(De), [
|
|
73
|
+
} = z(De), [c, a] = R(r.defaultValue ?? "");
|
|
74
74
|
let h;
|
|
75
75
|
t[0] !== i ? (h = () => {
|
|
76
76
|
i(null);
|
|
77
77
|
}, t[0] = i, t[1] = h) : h = t[1];
|
|
78
78
|
const u = h;
|
|
79
|
-
let _;
|
|
80
|
-
t[2] !== i || t[3] !== r.required || t[4] !== a ? (_ = (j) => {
|
|
81
|
-
j.preventDefault(), !(r.required && !a) && (i(a), c(""));
|
|
82
|
-
}, t[2] = i, t[3] = r.required, t[4] = a, t[5] = _) : _ = t[5];
|
|
83
|
-
const f = _;
|
|
84
|
-
let g;
|
|
85
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (g = (j) => c(j.currentTarget.value), t[6] = g) : g = t[6];
|
|
86
79
|
let m;
|
|
87
|
-
t[
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
t[2] !== i || t[3] !== r.required || t[4] !== c ? (m = (j) => {
|
|
81
|
+
j.preventDefault(), !(r.required && !c) && (i(c), a(""));
|
|
82
|
+
}, t[2] = i, t[3] = r.required, t[4] = c, t[5] = m) : m = t[5];
|
|
83
|
+
const f = m;
|
|
84
|
+
let p;
|
|
85
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (p = (j) => a(j.currentTarget.value), t[6] = p) : p = t[6];
|
|
86
|
+
let w;
|
|
87
|
+
t[7] !== c ? (w = {
|
|
88
|
+
value: c,
|
|
89
|
+
onChange: p,
|
|
90
90
|
className: "w-100",
|
|
91
91
|
autoFocus: !0,
|
|
92
92
|
tabIndex: 0
|
|
93
|
-
}, t[7] =
|
|
94
|
-
const
|
|
95
|
-
let d,
|
|
93
|
+
}, t[7] = c, t[8] = w) : w = t[8];
|
|
94
|
+
const b = w;
|
|
95
|
+
let d, S;
|
|
96
96
|
t[9] !== s || t[10] !== r.defaultValue ? (d = () => {
|
|
97
|
-
s === !0 &&
|
|
98
|
-
},
|
|
99
|
-
let
|
|
100
|
-
t[13] !== o ? (
|
|
97
|
+
s === !0 && a(r.defaultValue ?? "");
|
|
98
|
+
}, S = [s, r.defaultValue], t[9] = s, t[10] = r.defaultValue, t[11] = d, t[12] = S) : (d = t[11], S = t[12]), B(d, S);
|
|
99
|
+
let g;
|
|
100
|
+
t[13] !== o ? (g = /* @__PURE__ */ y(H.Header, { className: "justify-content-center", children: /* @__PURE__ */ y(H.Title, { children: o }) }), t[13] = o, t[14] = g) : g = t[14];
|
|
101
101
|
let C;
|
|
102
|
-
t[15] !==
|
|
103
|
-
let
|
|
104
|
-
t[18] !==
|
|
102
|
+
t[15] !== b || t[16] !== r.input ? (C = r.input === "textarea" ? /* @__PURE__ */ y("textarea", { ...b, rows: 5 }) : void 0, t[15] = b, t[16] = r.input, t[17] = C) : C = t[17];
|
|
103
|
+
let _;
|
|
104
|
+
t[18] !== b || t[19] !== r.input || t[20] !== r.type ? (_ = r.input === "input" ? /* @__PURE__ */ y(We, { ...b, type: r.type }) : void 0, t[18] = b, t[19] = r.input, t[20] = r.type, t[21] = _) : _ = t[21];
|
|
105
105
|
let v;
|
|
106
|
-
t[22] !== C || t[23] !==
|
|
106
|
+
t[22] !== C || t[23] !== _ ? (v = /* @__PURE__ */ I(H.Body, { children: [
|
|
107
107
|
C,
|
|
108
|
-
|
|
109
|
-
] }), t[22] = C, t[23] =
|
|
108
|
+
_
|
|
109
|
+
] }), t[22] = C, t[23] = _, t[24] = v) : v = t[24];
|
|
110
110
|
let k;
|
|
111
111
|
t[25] !== n.cancel || t[26] !== u ? (k = /* @__PURE__ */ y(ie, { variant: "outlined", color: "secondary", onClick: u, className: "flex-grow-1", children: n.cancel }), t[25] = n.cancel, t[26] = u, t[27] = k) : k = t[27];
|
|
112
|
-
const W = r.required && !
|
|
112
|
+
const W = r.required && !c;
|
|
113
113
|
let P;
|
|
114
114
|
t[28] !== n.confirm || t[29] !== W ? (P = /* @__PURE__ */ y(ie, { color: "primary", disabled: W, type: "submit", className: "flex-grow-1", children: n.confirm }), t[28] = n.confirm, t[29] = W, t[30] = P) : P = t[30];
|
|
115
115
|
let M;
|
|
@@ -123,10 +123,10 @@ const mt = (t) => {
|
|
|
123
123
|
M
|
|
124
124
|
] }), t[34] = f, t[35] = v, t[36] = M, t[37] = x) : x = t[37];
|
|
125
125
|
let O;
|
|
126
|
-
return t[38] !== s || t[39] !== u || t[40] !== x || t[41] !==
|
|
127
|
-
|
|
126
|
+
return t[38] !== s || t[39] !== u || t[40] !== x || t[41] !== g ? (O = /* @__PURE__ */ I(H, { show: s, size: "sm", centered: !0, onHide: u, children: [
|
|
127
|
+
g,
|
|
128
128
|
x
|
|
129
|
-
] }), t[38] = s, t[39] = u, t[40] = x, t[41] =
|
|
129
|
+
] }), t[38] = s, t[39] = u, t[40] = x, t[41] = g, t[42] = O) : O = t[42], O;
|
|
130
130
|
};
|
|
131
131
|
function St(t) {
|
|
132
132
|
return t.stopPropagation();
|
|
@@ -135,40 +135,40 @@ const bt = (t) => {
|
|
|
135
135
|
const e = N.c(11), {
|
|
136
136
|
children: n
|
|
137
137
|
} = t, [s, o] = R(!1), [i, r] = R("");
|
|
138
|
-
let
|
|
139
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
138
|
+
let c;
|
|
139
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = {
|
|
140
140
|
input: "textarea",
|
|
141
141
|
type: "text"
|
|
142
|
-
}, e[0] =
|
|
143
|
-
const [
|
|
144
|
-
let
|
|
145
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
142
|
+
}, e[0] = c) : c = e[0];
|
|
143
|
+
const [a, h] = R(c), u = Q(Ct);
|
|
144
|
+
let m;
|
|
145
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (m = (C) => {
|
|
146
146
|
r(C), o(!0);
|
|
147
|
-
}, e[1] =
|
|
148
|
-
const f =
|
|
149
|
-
let
|
|
150
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
147
|
+
}, e[1] = m) : m = e[1];
|
|
148
|
+
const f = m;
|
|
149
|
+
let p;
|
|
150
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (p = () => {
|
|
151
151
|
o(!1);
|
|
152
|
-
}, e[2] =
|
|
153
|
-
const
|
|
154
|
-
let
|
|
155
|
-
e[3] !== s || e[4] !==
|
|
152
|
+
}, e[2] = p) : p = e[2];
|
|
153
|
+
const w = p;
|
|
154
|
+
let b;
|
|
155
|
+
e[3] !== s || e[4] !== a || e[5] !== i ? (b = {
|
|
156
156
|
isShown: s,
|
|
157
157
|
text: i,
|
|
158
158
|
showPrompt: f,
|
|
159
|
-
hidePrompt:
|
|
159
|
+
hidePrompt: w,
|
|
160
160
|
resolveRef: u,
|
|
161
|
-
options:
|
|
161
|
+
options: a,
|
|
162
162
|
setOptions: h
|
|
163
|
-
}, e[3] = s, e[4] =
|
|
164
|
-
const d =
|
|
165
|
-
let
|
|
166
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
167
|
-
let
|
|
168
|
-
return e[8] !== n || e[9] !== d ? (
|
|
163
|
+
}, e[3] = s, e[4] = a, e[5] = i, e[6] = b) : b = e[6];
|
|
164
|
+
const d = b;
|
|
165
|
+
let S;
|
|
166
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ y(wt, {}), e[7] = S) : S = e[7];
|
|
167
|
+
let g;
|
|
168
|
+
return e[8] !== n || e[9] !== d ? (g = /* @__PURE__ */ I(De.Provider, { value: d, children: [
|
|
169
169
|
n,
|
|
170
|
-
|
|
171
|
-
] }), e[8] = n, e[9] = d, e[10] =
|
|
170
|
+
S
|
|
171
|
+
] }), e[8] = n, e[9] = d, e[10] = g) : g = e[10], g;
|
|
172
172
|
};
|
|
173
173
|
function Ct() {
|
|
174
174
|
}
|
|
@@ -179,30 +179,30 @@ const nn = (t) => {
|
|
|
179
179
|
language: o,
|
|
180
180
|
texts: i,
|
|
181
181
|
ProjectIconComponent: r,
|
|
182
|
-
localizationContext:
|
|
183
|
-
chartColorPalette:
|
|
182
|
+
localizationContext: c,
|
|
183
|
+
chartColorPalette: a,
|
|
184
184
|
children: h
|
|
185
185
|
} = t;
|
|
186
186
|
let u;
|
|
187
|
-
e[0] !== r || e[1] !== s || e[2] !==
|
|
187
|
+
e[0] !== r || e[1] !== s || e[2] !== a || e[3] !== n || e[4] !== o || e[5] !== c || e[6] !== i ? (u = {
|
|
188
188
|
axiosOptions: s,
|
|
189
189
|
cookieDomain: n,
|
|
190
190
|
language: o,
|
|
191
191
|
texts: i,
|
|
192
192
|
ProjectIconComponent: r,
|
|
193
|
-
localizationContext:
|
|
194
|
-
chartColorPalette:
|
|
195
|
-
}, e[0] = r, e[1] = s, e[2] =
|
|
196
|
-
const
|
|
193
|
+
localizationContext: c,
|
|
194
|
+
chartColorPalette: a
|
|
195
|
+
}, e[0] = r, e[1] = s, e[2] = a, e[3] = n, e[4] = o, e[5] = c, e[6] = i, e[7] = u) : u = e[7];
|
|
196
|
+
const m = u;
|
|
197
197
|
let f;
|
|
198
198
|
e[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ y(je, {}), e[8] = f) : f = e[8];
|
|
199
|
-
let
|
|
200
|
-
e[9] !== h ? (
|
|
199
|
+
let p;
|
|
200
|
+
e[9] !== h ? (p = /* @__PURE__ */ y(mt, { children: /* @__PURE__ */ I(bt, { children: [
|
|
201
201
|
f,
|
|
202
202
|
h
|
|
203
|
-
] }) }), e[9] = h, e[10] =
|
|
204
|
-
let
|
|
205
|
-
return e[11] !==
|
|
203
|
+
] }) }), e[9] = h, e[10] = p) : p = e[10];
|
|
204
|
+
let w;
|
|
205
|
+
return e[11] !== m || e[12] !== p ? (w = /* @__PURE__ */ y(ae.Provider, { value: m, children: p }), e[11] = m, e[12] = p, e[13] = w) : w = e[13], w;
|
|
206
206
|
}, on = (t) => {
|
|
207
207
|
const e = N.c(15), {
|
|
208
208
|
children: n
|
|
@@ -210,30 +210,30 @@ const nn = (t) => {
|
|
|
210
210
|
let i;
|
|
211
211
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ new Set(), e[0] = i) : i = e[0];
|
|
212
212
|
const [r] = R(i);
|
|
213
|
-
let
|
|
214
|
-
e[1] !== r ? (
|
|
215
|
-
r.add(
|
|
216
|
-
}, e[1] = r, e[2] =
|
|
217
|
-
const
|
|
213
|
+
let c;
|
|
214
|
+
e[1] !== r ? (c = (b) => {
|
|
215
|
+
r.add(b), o(!0);
|
|
216
|
+
}, e[1] = r, e[2] = c) : c = e[2];
|
|
217
|
+
const a = c;
|
|
218
218
|
let h;
|
|
219
|
-
e[3] !== r ? (h = (
|
|
220
|
-
r.delete(
|
|
219
|
+
e[3] !== r ? (h = (b) => {
|
|
220
|
+
r.delete(b), r.size === 0 && o(!1);
|
|
221
221
|
}, e[3] = r, e[4] = h) : h = e[4];
|
|
222
222
|
const u = h;
|
|
223
|
-
let
|
|
224
|
-
e[5] !== s || e[6] !==
|
|
223
|
+
let m;
|
|
224
|
+
e[5] !== s || e[6] !== a || e[7] !== u ? (m = {
|
|
225
225
|
isLoading: s,
|
|
226
|
-
startLoading:
|
|
226
|
+
startLoading: a,
|
|
227
227
|
stopLoading: u
|
|
228
|
-
}, e[5] = s, e[6] =
|
|
229
|
-
const f =
|
|
230
|
-
let
|
|
231
|
-
e[9] !== s ? (
|
|
232
|
-
let
|
|
233
|
-
return e[11] !== n || e[12] !== f || e[13] !==
|
|
234
|
-
|
|
228
|
+
}, e[5] = s, e[6] = a, e[7] = u, e[8] = m) : m = e[8];
|
|
229
|
+
const f = m;
|
|
230
|
+
let p;
|
|
231
|
+
e[9] !== s ? (p = s && /* @__PURE__ */ y(at, {}), e[9] = s, e[10] = p) : p = e[10];
|
|
232
|
+
let w;
|
|
233
|
+
return e[11] !== n || e[12] !== f || e[13] !== p ? (w = /* @__PURE__ */ I(Fe.Provider, { value: f, children: [
|
|
234
|
+
p,
|
|
235
235
|
n
|
|
236
|
-
] }), e[11] = n, e[12] = f, e[13] =
|
|
236
|
+
] }), e[11] = n, e[12] = f, e[13] = p, e[14] = w) : w = e[14], w;
|
|
237
237
|
}, sn = (t) => {
|
|
238
238
|
const e = N.c(39), {
|
|
239
239
|
children: n
|
|
@@ -242,20 +242,20 @@ const nn = (t) => {
|
|
|
242
242
|
getToken: i
|
|
243
243
|
} = z(pe), {
|
|
244
244
|
delegation: r,
|
|
245
|
-
setDelegation:
|
|
246
|
-
setAvailableDelegations:
|
|
245
|
+
setDelegation: c,
|
|
246
|
+
setAvailableDelegations: a,
|
|
247
247
|
refreshAvailableDelegations: h
|
|
248
|
-
} = z(Re), [u,
|
|
248
|
+
} = z(Re), [u, m] = R(null);
|
|
249
249
|
let f;
|
|
250
250
|
e[0] !== i ? (f = async () => {
|
|
251
251
|
const A = await i();
|
|
252
|
-
A &&
|
|
252
|
+
A && m(A.token);
|
|
253
253
|
}, e[0] = i, e[1] = f) : f = e[1];
|
|
254
|
-
const
|
|
255
|
-
let
|
|
256
|
-
e[2] !==
|
|
257
|
-
|
|
258
|
-
},
|
|
254
|
+
const p = f;
|
|
255
|
+
let w, b;
|
|
256
|
+
e[2] !== p ? (w = () => {
|
|
257
|
+
p();
|
|
258
|
+
}, b = [p], e[2] = p, e[3] = w, e[4] = b) : (w = e[3], b = e[4]), B(w, b);
|
|
259
259
|
let d;
|
|
260
260
|
if (e[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
261
261
|
e: {
|
|
@@ -269,13 +269,13 @@ const nn = (t) => {
|
|
|
269
269
|
e[5] = d;
|
|
270
270
|
} else
|
|
271
271
|
d = e[5];
|
|
272
|
-
const
|
|
273
|
-
let
|
|
274
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
275
|
-
state:
|
|
276
|
-
user:
|
|
277
|
-
}, e[6] =
|
|
278
|
-
const [C,
|
|
272
|
+
const S = d;
|
|
273
|
+
let g;
|
|
274
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
275
|
+
state: S ? J.LOGGED_IN : J.LOGGED_OUT,
|
|
276
|
+
user: S
|
|
277
|
+
}, e[6] = g) : g = e[6];
|
|
278
|
+
const [C, _] = R(g);
|
|
279
279
|
let v;
|
|
280
280
|
e[7] !== s ? (v = async (A) => {
|
|
281
281
|
let $ = null;
|
|
@@ -291,24 +291,24 @@ const nn = (t) => {
|
|
|
291
291
|
}, e[7] = s, e[8] = v) : v = e[8];
|
|
292
292
|
const k = v;
|
|
293
293
|
let W;
|
|
294
|
-
e[9] !==
|
|
295
|
-
localStorage.removeItem("user"),
|
|
294
|
+
e[9] !== a || e[10] !== c ? (W = () => {
|
|
295
|
+
localStorage.removeItem("user"), _({
|
|
296
296
|
state: J.LOGGED_OUT,
|
|
297
297
|
user: null
|
|
298
|
-
}),
|
|
299
|
-
}, e[9] =
|
|
298
|
+
}), c(null), a(null);
|
|
299
|
+
}, e[9] = a, e[10] = c, e[11] = W) : W = e[11];
|
|
300
300
|
const P = W;
|
|
301
301
|
let M;
|
|
302
302
|
e[12] !== k || e[13] !== h ? (M = async (A) => {
|
|
303
|
-
|
|
303
|
+
_({
|
|
304
304
|
state: J.LOGGING_IN,
|
|
305
305
|
user: null
|
|
306
306
|
});
|
|
307
307
|
const $ = await k(A);
|
|
308
|
-
return $ ? (
|
|
308
|
+
return $ ? (_({
|
|
309
309
|
state: J.LOGGED_IN,
|
|
310
310
|
user: $
|
|
311
|
-
}), localStorage.setItem("user", JSON.stringify($)), await h(), !0) : (
|
|
311
|
+
}), localStorage.setItem("user", JSON.stringify($)), await h(), !0) : (_({
|
|
312
312
|
state: J.LOGIN_FAILED,
|
|
313
313
|
user: null
|
|
314
314
|
}), !1);
|
|
@@ -320,7 +320,7 @@ const nn = (t) => {
|
|
|
320
320
|
const A = o.addEventCallback(($) => {
|
|
321
321
|
if ($.eventType === ge.LOGIN_SUCCESS && $.payload) {
|
|
322
322
|
const de = $.payload;
|
|
323
|
-
|
|
323
|
+
m(de.accessToken);
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
326
|
return () => {
|
|
@@ -332,11 +332,11 @@ const nn = (t) => {
|
|
|
332
332
|
let j;
|
|
333
333
|
e[17] !== x || e[18] !== P || e[19] !== o ? (j = [o, x, P], e[17] = x, e[18] = P, e[19] = o, e[20] = j) : j = e[20], B(O, j);
|
|
334
334
|
let Z;
|
|
335
|
-
e[21] !== x || e[22] !== P || e[23] !==
|
|
335
|
+
e[21] !== x || e[22] !== P || e[23] !== c ? (Z = async (A) => {
|
|
336
336
|
A && await x(A).catch(() => {
|
|
337
|
-
P(),
|
|
337
|
+
P(), c(null);
|
|
338
338
|
});
|
|
339
|
-
}, e[21] = x, e[22] = P, e[23] =
|
|
339
|
+
}, e[21] = x, e[22] = P, e[23] = c, e[24] = Z) : Z = e[24];
|
|
340
340
|
const K = Z;
|
|
341
341
|
let ee;
|
|
342
342
|
e[25] !== u || e[26] !== K ? (ee = () => {
|
|
@@ -385,7 +385,7 @@ const ve = () => {
|
|
|
385
385
|
inProgress: e
|
|
386
386
|
} = it(), {
|
|
387
387
|
cookieDomain: n
|
|
388
|
-
} = z(
|
|
388
|
+
} = z(ae), [, s] = Ge(["Authorization"]), o = F(
|
|
389
389
|
() => t.useMsal ? t.msalInstance : null,
|
|
390
390
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
391
391
|
[t.useMsal, t.useMsal ? t.msalInstance : null]
|
|
@@ -397,7 +397,7 @@ const ve = () => {
|
|
|
397
397
|
() => t.useMsal ? t.msalExtraScopes : [],
|
|
398
398
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
399
399
|
[t.useMsal, t.useMsal ? t.msalExtraScopes : null]
|
|
400
|
-
),
|
|
400
|
+
), c = Q(null), a = Q(!1), h = Y(() => {
|
|
401
401
|
const d = localStorage.getItem("token");
|
|
402
402
|
return d ? {
|
|
403
403
|
token: d,
|
|
@@ -406,10 +406,10 @@ const ve = () => {
|
|
|
406
406
|
}, []), u = Y(async () => {
|
|
407
407
|
if (console.log("getTokenMsal"), o == null)
|
|
408
408
|
throw console.log("getTokenMsal throwing error because msalInstance is null"), new Error("getTokenMsal: msalInstance is null");
|
|
409
|
-
if (
|
|
410
|
-
return console.log("getTokenMsal returning tokenRequestPromise.current",
|
|
411
|
-
const d = new Promise((
|
|
412
|
-
const C = (
|
|
409
|
+
if (c.current)
|
|
410
|
+
return console.log("getTokenMsal returning tokenRequestPromise.current", c.current), c.current;
|
|
411
|
+
const d = new Promise((S, g) => {
|
|
412
|
+
const C = (_) => {
|
|
413
413
|
const v = vt(o);
|
|
414
414
|
if (!v) {
|
|
415
415
|
console.log("getTokenMsal no account found. Redirecting to login"), o == null || o.loginRedirect({
|
|
@@ -423,7 +423,7 @@ const ve = () => {
|
|
|
423
423
|
account: v,
|
|
424
424
|
redirectUri: t.useMsal ? t.msalSilentRedirectUri : void 0
|
|
425
425
|
}).then((k) => {
|
|
426
|
-
|
|
426
|
+
_(), S({
|
|
427
427
|
token: k.accessToken,
|
|
428
428
|
expiresOn: k.expiresOn ?? new Date(Date.now())
|
|
429
429
|
});
|
|
@@ -431,53 +431,53 @@ const ve = () => {
|
|
|
431
431
|
console.error("Error acquiring token", k), k instanceof rt && (console.log("Silent token acquisition failed. Acquiring token using redirect"), o == null || o.acquireTokenRedirect({
|
|
432
432
|
scopes: i,
|
|
433
433
|
extraScopesToConsent: r
|
|
434
|
-
}),
|
|
434
|
+
}), _(), S(null)), _(), g(k);
|
|
435
435
|
}).finally(() => {
|
|
436
|
-
|
|
436
|
+
_(), g(new Error("No access token returned from handleRedirectPromise"));
|
|
437
437
|
});
|
|
438
438
|
};
|
|
439
439
|
if (e !== ye.None) {
|
|
440
|
-
console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None", e),
|
|
440
|
+
console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None", e), g(new Error("Authentication in progress"));
|
|
441
441
|
return;
|
|
442
442
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}) : o.handleRedirectPromise().then((
|
|
446
|
-
if (console.log("getTokenMsal tokenResponse",
|
|
443
|
+
a.current ? C(() => {
|
|
444
|
+
c.current = null;
|
|
445
|
+
}) : o.handleRedirectPromise().then((_) => {
|
|
446
|
+
if (console.log("getTokenMsal tokenResponse", _), !(_ != null && _.accessToken)) {
|
|
447
447
|
C(() => {
|
|
448
|
-
|
|
448
|
+
c.current = null, a.current = !0;
|
|
449
449
|
});
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
|
-
|
|
453
|
-
token:
|
|
454
|
-
expiresOn:
|
|
452
|
+
c.current = null, a.current = !0, S({
|
|
453
|
+
token: _.accessToken,
|
|
454
|
+
expiresOn: _.expiresOn ?? new Date(Date.now())
|
|
455
455
|
});
|
|
456
456
|
});
|
|
457
457
|
});
|
|
458
|
-
return
|
|
459
|
-
}, [e, r, o, i, t.msalSilentRedirectUri, t.useMsal]),
|
|
458
|
+
return c.current = d, d;
|
|
459
|
+
}, [e, r, o, i, t.msalSilentRedirectUri, t.useMsal]), m = Y(async () => t.useMsal ? u() : h(), [h, u, t.useMsal]), f = Y((d) => t.useMsal ? () => {
|
|
460
460
|
} : (window.addEventListener("storage", d), window.addEventListener("dev-auth-change", d), () => {
|
|
461
461
|
window.removeEventListener("storage", d), window.removeEventListener("dev-auth-change", d);
|
|
462
|
-
}), [t.useMsal]),
|
|
462
|
+
}), [t.useMsal]), p = st(f, () => localStorage.getItem("token") !== null ? "AUTH_OK" : "NO_AUTH"), w = F(() => {
|
|
463
463
|
var d;
|
|
464
|
-
return t.useMsal ? e !== ye.None ? "AUTH_IN_PROGRESS" : (o == null ? void 0 : o.getActiveAccount()) ?? ((d = o == null ? void 0 : o.getAllAccounts()) == null ? void 0 : d[0]) ?? null ? "AUTH_OK" : "NO_AUTH" :
|
|
465
|
-
}, [
|
|
464
|
+
return t.useMsal ? e !== ye.None ? "AUTH_IN_PROGRESS" : (o == null ? void 0 : o.getActiveAccount()) ?? ((d = o == null ? void 0 : o.getAllAccounts()) == null ? void 0 : d[0]) ?? null ? "AUTH_OK" : "NO_AUTH" : p;
|
|
465
|
+
}, [p, e, o, t.useMsal]), b = F(() => ({
|
|
466
466
|
useMsal: t.useMsal ?? !1,
|
|
467
467
|
msalInstance: o,
|
|
468
468
|
msalScopes: i,
|
|
469
469
|
msalExtraScopes: r,
|
|
470
|
-
getToken:
|
|
471
|
-
authState:
|
|
472
|
-
}), [t.useMsal, o, i, r,
|
|
470
|
+
getToken: m,
|
|
471
|
+
authState: w
|
|
472
|
+
}), [t.useMsal, o, i, r, m, w]);
|
|
473
473
|
return B(() => {
|
|
474
474
|
if (t.useMsal && o) {
|
|
475
|
-
const d = o.addEventCallback((
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
475
|
+
const d = o.addEventCallback((S) => {
|
|
476
|
+
if (S.eventType === ge.LOGIN_SUCCESS || S.eventType === ge.ACQUIRE_TOKEN_SUCCESS && S.payload) {
|
|
477
|
+
const g = S.payload, C = g.account;
|
|
478
478
|
o.setActiveAccount(C);
|
|
479
|
-
const
|
|
480
|
-
s("Authorization",
|
|
479
|
+
const _ = g.accessToken, v = g.expiresOn;
|
|
480
|
+
s("Authorization", _, {
|
|
481
481
|
path: "/",
|
|
482
482
|
secure: !0,
|
|
483
483
|
sameSite: "none",
|
|
@@ -485,7 +485,7 @@ const ve = () => {
|
|
|
485
485
|
expires: v ?? void 0
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
|
-
|
|
488
|
+
S.error && console.error("AuthProvider MSAL Error", S);
|
|
489
489
|
});
|
|
490
490
|
return () => {
|
|
491
491
|
d && o.removeEventCallback(d);
|
|
@@ -493,16 +493,16 @@ const ve = () => {
|
|
|
493
493
|
}
|
|
494
494
|
return () => {
|
|
495
495
|
};
|
|
496
|
-
}, [t.useMsal, o, s, n]), /* @__PURE__ */ y(pe.Provider, { value:
|
|
497
|
-
},
|
|
496
|
+
}, [t.useMsal, o, s, n]), /* @__PURE__ */ y(pe.Provider, { value: b, children: t.useMsal ? /* @__PURE__ */ y(ct, { instance: t.msalInstance, children: window.location.pathname === "/blank" ? /* @__PURE__ */ y(ve, {}) : t.children }) : window.location.pathname === "/blank" ? /* @__PURE__ */ y(ve, {}) : t.children });
|
|
497
|
+
}, cn = (t) => {
|
|
498
498
|
const e = N.c(18), {
|
|
499
499
|
children: n,
|
|
500
500
|
relativeEndpoint: s
|
|
501
501
|
} = t, [o, i, r] = ht("user-delegation", null);
|
|
502
|
-
let
|
|
502
|
+
let c;
|
|
503
503
|
e: {
|
|
504
504
|
if (!o) {
|
|
505
|
-
|
|
505
|
+
c = null;
|
|
506
506
|
break e;
|
|
507
507
|
}
|
|
508
508
|
const v = o.from ? we(o.from) : _t(), k = o.to ? we(o.to) : gt();
|
|
@@ -510,12 +510,12 @@ const ve = () => {
|
|
|
510
510
|
start: v,
|
|
511
511
|
end: k
|
|
512
512
|
})) {
|
|
513
|
-
i(null),
|
|
513
|
+
i(null), c = null;
|
|
514
514
|
break e;
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
c = o;
|
|
517
517
|
}
|
|
518
|
-
const
|
|
518
|
+
const a = c;
|
|
519
519
|
let h;
|
|
520
520
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
521
521
|
nullStateBeforeLoad: !1,
|
|
@@ -523,18 +523,18 @@ const ve = () => {
|
|
|
523
523
|
}, e[0] = h) : h = e[0];
|
|
524
524
|
const {
|
|
525
525
|
data: u,
|
|
526
|
-
setData:
|
|
526
|
+
setData: m,
|
|
527
527
|
reloadData: f
|
|
528
|
-
} = ut(s, h),
|
|
529
|
-
let
|
|
530
|
-
e[1] !== f ? (
|
|
528
|
+
} = ut(s, h), p = Q(null);
|
|
529
|
+
let w, b;
|
|
530
|
+
e[1] !== f ? (w = () => {
|
|
531
531
|
const v = () => {
|
|
532
|
-
f(),
|
|
532
|
+
f(), p.current = window.setTimeout(v, Ve() + 5e3);
|
|
533
533
|
};
|
|
534
534
|
return v(), () => {
|
|
535
|
-
|
|
535
|
+
p.current !== null && window.clearTimeout(p.current);
|
|
536
536
|
};
|
|
537
|
-
},
|
|
537
|
+
}, b = [f], e[1] = f, e[2] = w, e[3] = b) : (w = e[2], b = e[3]), B(w, b);
|
|
538
538
|
let d;
|
|
539
539
|
e[4] !== r ? (d = () => {
|
|
540
540
|
const v = () => {
|
|
@@ -544,20 +544,20 @@ const ve = () => {
|
|
|
544
544
|
window.removeEventListener("focus", v);
|
|
545
545
|
};
|
|
546
546
|
}, e[4] = r, e[5] = d) : d = e[5];
|
|
547
|
-
let
|
|
548
|
-
e[6] !== r || e[7] !== f ? (
|
|
549
|
-
let
|
|
550
|
-
e[9] !== u || e[10] !== f || e[11] !==
|
|
551
|
-
delegation:
|
|
547
|
+
let S;
|
|
548
|
+
e[6] !== r || e[7] !== f ? (S = [r, f], e[6] = r, e[7] = f, e[8] = S) : S = e[8], B(d, S);
|
|
549
|
+
let g;
|
|
550
|
+
e[9] !== u || e[10] !== f || e[11] !== m || e[12] !== i || e[13] !== a ? (g = {
|
|
551
|
+
delegation: a,
|
|
552
552
|
setDelegation: i,
|
|
553
553
|
availableDelegations: u,
|
|
554
|
-
setAvailableDelegations:
|
|
554
|
+
setAvailableDelegations: m,
|
|
555
555
|
refreshAvailableDelegations: f
|
|
556
|
-
}, e[9] = u, e[10] = f, e[11] =
|
|
557
|
-
const C =
|
|
558
|
-
let
|
|
559
|
-
return e[15] !== n || e[16] !== C ? (
|
|
560
|
-
}, ke = (t, e) => t ? `${t} | ${e}` : e,
|
|
556
|
+
}, e[9] = u, e[10] = f, e[11] = m, e[12] = i, e[13] = a, e[14] = g) : g = e[14];
|
|
557
|
+
const C = g;
|
|
558
|
+
let _;
|
|
559
|
+
return e[15] !== n || e[16] !== C ? (_ = /* @__PURE__ */ y(Re.Provider, { value: C, children: n }), e[15] = n, e[16] = C, e[17] = _) : _ = e[17], _;
|
|
560
|
+
}, ke = (t, e) => t ? `${t} | ${e}` : e, an = (t) => {
|
|
561
561
|
const e = N.c(18), {
|
|
562
562
|
defaultHelmet: n,
|
|
563
563
|
children: s,
|
|
@@ -565,35 +565,35 @@ const ve = () => {
|
|
|
565
565
|
} = t, i = o ?? "";
|
|
566
566
|
let r;
|
|
567
567
|
e[0] !== n || e[1] !== i ? (r = ke(i, n), e[0] = n, e[1] = i, e[2] = r) : r = e[2];
|
|
568
|
-
let
|
|
569
|
-
e[3] !== r ? (
|
|
570
|
-
const [
|
|
568
|
+
let c;
|
|
569
|
+
e[3] !== r ? (c = [r], e[3] = r, e[4] = c) : c = e[4];
|
|
570
|
+
const [a, h] = R(c);
|
|
571
571
|
let u;
|
|
572
|
-
e[5] !== o ? (u = (
|
|
573
|
-
h((v) => [...v, ke(o ?? "",
|
|
572
|
+
e[5] !== o ? (u = (_) => {
|
|
573
|
+
h((v) => [...v, ke(o ?? "", _)]);
|
|
574
574
|
}, e[5] = o, e[6] = u) : u = e[6];
|
|
575
|
-
const
|
|
575
|
+
const m = u;
|
|
576
576
|
let f;
|
|
577
577
|
e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
578
578
|
h(kt);
|
|
579
579
|
}, e[7] = f) : f = e[7];
|
|
580
|
-
const
|
|
581
|
-
let
|
|
582
|
-
e[8] !==
|
|
583
|
-
const
|
|
580
|
+
const p = f;
|
|
581
|
+
let w;
|
|
582
|
+
e[8] !== a ? (w = a.at(-1) ?? "", e[8] = a, e[9] = w) : w = e[9];
|
|
583
|
+
const b = w;
|
|
584
584
|
let d;
|
|
585
|
-
e[10] !==
|
|
586
|
-
addHelmet:
|
|
587
|
-
removeHelmet:
|
|
588
|
-
}, e[10] =
|
|
589
|
-
const
|
|
590
|
-
let
|
|
591
|
-
e[12] !==
|
|
585
|
+
e[10] !== m ? (d = {
|
|
586
|
+
addHelmet: m,
|
|
587
|
+
removeHelmet: p
|
|
588
|
+
}, e[10] = m, e[11] = d) : d = e[11];
|
|
589
|
+
const S = d;
|
|
590
|
+
let g;
|
|
591
|
+
e[12] !== b ? (g = /* @__PURE__ */ y("title", { children: b }), e[12] = b, e[13] = g) : g = e[13];
|
|
592
592
|
let C;
|
|
593
|
-
return e[14] !== s || e[15] !==
|
|
594
|
-
|
|
593
|
+
return e[14] !== s || e[15] !== S || e[16] !== g ? (C = /* @__PURE__ */ I(Xe.Provider, { value: S, children: [
|
|
594
|
+
g,
|
|
595
595
|
s
|
|
596
|
-
] }), e[14] = s, e[15] =
|
|
596
|
+
] }), e[14] = s, e[15] = S, e[16] = g, e[17] = C) : C = e[17], C;
|
|
597
597
|
};
|
|
598
598
|
function kt(t) {
|
|
599
599
|
return t.length > 1 ? t.slice(0, -1) : t;
|
|
@@ -663,10 +663,10 @@ class Tt extends le {
|
|
|
663
663
|
});
|
|
664
664
|
let o = null;
|
|
665
665
|
if (e.timeout) {
|
|
666
|
-
const
|
|
666
|
+
const a = e.timeout;
|
|
667
667
|
o = setTimeout(() => {
|
|
668
668
|
n.abort(), this._logger.log(l.Warning, "Timeout from HTTP request."), s = new _e();
|
|
669
|
-
},
|
|
669
|
+
}, a);
|
|
670
670
|
}
|
|
671
671
|
e.content === "" && (e.content = void 0), e.content && (e.headers = e.headers || {}, Le(e.content) ? e.headers["Content-Type"] = "application/octet-stream" : e.headers["Content-Type"] = "text/plain;charset=UTF-8");
|
|
672
672
|
let i;
|
|
@@ -684,17 +684,17 @@ class Tt extends le {
|
|
|
684
684
|
redirect: "follow",
|
|
685
685
|
signal: n.signal
|
|
686
686
|
});
|
|
687
|
-
} catch (
|
|
688
|
-
throw s || (this._logger.log(l.Warning, `Error from HTTP request. ${
|
|
687
|
+
} catch (a) {
|
|
688
|
+
throw s || (this._logger.log(l.Warning, `Error from HTTP request. ${a}.`), a);
|
|
689
689
|
} finally {
|
|
690
690
|
o && clearTimeout(o), e.abortSignal && (e.abortSignal.onabort = null);
|
|
691
691
|
}
|
|
692
692
|
if (!i.ok) {
|
|
693
|
-
const
|
|
694
|
-
throw new V(
|
|
693
|
+
const a = await Te(i, "text");
|
|
694
|
+
throw new V(a || i.statusText, i.status);
|
|
695
695
|
}
|
|
696
|
-
const
|
|
697
|
-
return new Ne(i.status, i.statusText,
|
|
696
|
+
const c = await Te(i, e.responseType);
|
|
697
|
+
return new Ne(i.status, i.statusText, c);
|
|
698
698
|
}
|
|
699
699
|
getCookieString(e) {
|
|
700
700
|
let n = "";
|
|
@@ -832,10 +832,10 @@ class Pe {
|
|
|
832
832
|
withCredentials: this._options.withCredentials
|
|
833
833
|
};
|
|
834
834
|
n === D.Binary && (r.responseType = "arraybuffer");
|
|
835
|
-
const
|
|
836
|
-
this._logger.log(l.Trace, `(LongPolling transport) polling: ${
|
|
837
|
-
const
|
|
838
|
-
|
|
835
|
+
const c = `${e}&_=${Date.now()}`;
|
|
836
|
+
this._logger.log(l.Trace, `(LongPolling transport) polling: ${c}.`);
|
|
837
|
+
const a = await this._httpClient.get(c, r);
|
|
838
|
+
a.statusCode !== 200 ? (this._logger.log(l.Error, `(LongPolling transport) Unexpected response code: ${a.statusCode}.`), this._closeError = new V(a.statusText || "", a.statusCode), this._running = !1) : this._running = !0, this._receiving = this._poll(this._url, r);
|
|
839
839
|
}
|
|
840
840
|
async _poll(e, n) {
|
|
841
841
|
try {
|
|
@@ -844,7 +844,7 @@ class Pe {
|
|
|
844
844
|
const s = `${e}&_=${Date.now()}`;
|
|
845
845
|
this._logger.log(l.Trace, `(LongPolling transport) polling: ${s}.`);
|
|
846
846
|
const o = await this._httpClient.get(s, n);
|
|
847
|
-
o.statusCode === 204 ? (this._logger.log(l.Information, "(LongPolling transport) Poll terminated by server."), this._running = !1) : o.statusCode !== 200 ? (this._logger.log(l.Error, `(LongPolling transport) Unexpected response code: ${o.statusCode}.`), this._closeError = new V(o.statusText || "", o.statusCode), this._running = !1) : o.content ? (this._logger.log(l.Trace, `(LongPolling transport) data received. ${
|
|
847
|
+
o.statusCode === 204 ? (this._logger.log(l.Information, "(LongPolling transport) Poll terminated by server."), this._running = !1) : o.statusCode !== 200 ? (this._logger.log(l.Error, `(LongPolling transport) Unexpected response code: ${o.statusCode}.`), this._closeError = new V(o.statusText || "", o.statusCode), this._running = !1) : o.content ? (this._logger.log(l.Trace, `(LongPolling transport) data received. ${ce(o.content, this._options.logMessageContent)}.`), this.onreceive && this.onreceive(o.content)) : this._logger.log(l.Trace, "(LongPolling transport) Poll timed out, reissuing.");
|
|
848
848
|
} catch (s) {
|
|
849
849
|
this._running ? s instanceof _e ? this._logger.log(l.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this._closeError = s, this._running = !1) : this._logger.log(l.Trace, `(LongPolling transport) Poll errored after shutdown: ${s.message}`);
|
|
850
850
|
}
|
|
@@ -899,27 +899,27 @@ class Rt {
|
|
|
899
899
|
if (L.isBrowser || L.isWebWorker)
|
|
900
900
|
r = new this._options.EventSource(e, { withCredentials: this._options.withCredentials });
|
|
901
901
|
else {
|
|
902
|
-
const
|
|
903
|
-
|
|
902
|
+
const c = this._httpClient.getCookieString(e), a = {};
|
|
903
|
+
a.Cookie = c;
|
|
904
904
|
const [h, u] = q();
|
|
905
|
-
|
|
905
|
+
a[h] = u, r = new this._options.EventSource(e, { withCredentials: this._options.withCredentials, headers: { ...a, ...this._options.headers } });
|
|
906
906
|
}
|
|
907
907
|
try {
|
|
908
|
-
r.onmessage = (
|
|
908
|
+
r.onmessage = (c) => {
|
|
909
909
|
if (this.onreceive)
|
|
910
910
|
try {
|
|
911
|
-
this._logger.log(l.Trace, `(SSE transport) data received. ${
|
|
912
|
-
} catch (
|
|
913
|
-
this._close(
|
|
911
|
+
this._logger.log(l.Trace, `(SSE transport) data received. ${ce(c.data, this._options.logMessageContent)}.`), this.onreceive(c.data);
|
|
912
|
+
} catch (a) {
|
|
913
|
+
this._close(a);
|
|
914
914
|
return;
|
|
915
915
|
}
|
|
916
|
-
}, r.onerror = (
|
|
916
|
+
}, r.onerror = (c) => {
|
|
917
917
|
i ? this._close() : o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."));
|
|
918
918
|
}, r.onopen = () => {
|
|
919
919
|
this._logger.log(l.Information, `SSE connected to ${this._url}`), this._eventSource = r, i = !0, s();
|
|
920
920
|
};
|
|
921
|
-
} catch (
|
|
922
|
-
o(
|
|
921
|
+
} catch (c) {
|
|
922
|
+
o(c);
|
|
923
923
|
return;
|
|
924
924
|
}
|
|
925
925
|
});
|
|
@@ -944,22 +944,22 @@ class Lt {
|
|
|
944
944
|
return this._accessTokenFactory && (s = await this._accessTokenFactory()), new Promise((o, i) => {
|
|
945
945
|
e = e.replace(/^http/, "ws");
|
|
946
946
|
let r;
|
|
947
|
-
const
|
|
948
|
-
let
|
|
947
|
+
const c = this._httpClient.getCookieString(e);
|
|
948
|
+
let a = !1;
|
|
949
949
|
if (L.isNode || L.isReactNative) {
|
|
950
|
-
const h = {}, [u,
|
|
951
|
-
h[u] =
|
|
950
|
+
const h = {}, [u, m] = q();
|
|
951
|
+
h[u] = m, s && (h[X.Authorization] = `Bearer ${s}`), c && (h[X.Cookie] = c), r = new this._webSocketConstructor(e, void 0, {
|
|
952
952
|
headers: { ...h, ...this._headers }
|
|
953
953
|
});
|
|
954
954
|
} else
|
|
955
955
|
s && (e += (e.indexOf("?") < 0 ? "?" : "&") + `access_token=${encodeURIComponent(s)}`);
|
|
956
956
|
r || (r = new this._webSocketConstructor(e)), n === D.Binary && (r.binaryType = "arraybuffer"), r.onopen = (h) => {
|
|
957
|
-
this._logger.log(l.Information, `WebSocket connected to ${e}.`), this._webSocket = r,
|
|
957
|
+
this._logger.log(l.Information, `WebSocket connected to ${e}.`), this._webSocket = r, a = !0, o();
|
|
958
958
|
}, r.onerror = (h) => {
|
|
959
959
|
let u = null;
|
|
960
960
|
typeof ErrorEvent < "u" && h instanceof ErrorEvent ? u = h.error : u = "There was an error with the transport", this._logger.log(l.Information, `(WebSockets transport) ${u}.`);
|
|
961
961
|
}, r.onmessage = (h) => {
|
|
962
|
-
if (this._logger.log(l.Trace, `(WebSockets transport) data received. ${
|
|
962
|
+
if (this._logger.log(l.Trace, `(WebSockets transport) data received. ${ce(h.data, this._logMessageContent)}.`), this.onreceive)
|
|
963
963
|
try {
|
|
964
964
|
this.onreceive(h.data);
|
|
965
965
|
} catch (u) {
|
|
@@ -967,7 +967,7 @@ class Lt {
|
|
|
967
967
|
return;
|
|
968
968
|
}
|
|
969
969
|
}, r.onclose = (h) => {
|
|
970
|
-
if (
|
|
970
|
+
if (a)
|
|
971
971
|
this._close(h);
|
|
972
972
|
else {
|
|
973
973
|
let u = null;
|
|
@@ -977,7 +977,7 @@ class Lt {
|
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
979
|
send(e) {
|
|
980
|
-
return this._webSocket && this._webSocket.readyState === this._webSocketConstructor.OPEN ? (this._logger.log(l.Trace, `(WebSockets transport) sending data. ${
|
|
980
|
+
return this._webSocket && this._webSocket.readyState === this._webSocketConstructor.OPEN ? (this._logger.log(l.Trace, `(WebSockets transport) sending data. ${ce(e, this._logMessageContent)}.`), this._webSocket.send(e), Promise.resolve()) : Promise.reject("WebSocket is not in the OPEN state");
|
|
981
981
|
}
|
|
982
982
|
stop() {
|
|
983
983
|
return this._webSocket && this._close(void 0), Promise.resolve();
|
|
@@ -1095,11 +1095,11 @@ class It {
|
|
|
1095
1095
|
});
|
|
1096
1096
|
if (r.statusCode !== 200)
|
|
1097
1097
|
return Promise.reject(new Error(`Unexpected status code returned from negotiate '${r.statusCode}'`));
|
|
1098
|
-
const
|
|
1099
|
-
return (!
|
|
1098
|
+
const c = JSON.parse(r.content);
|
|
1099
|
+
return (!c.negotiateVersion || c.negotiateVersion < 1) && (c.connectionToken = c.connectionId), c.useStatefulReconnect && this._options._useStatefulReconnect !== !0 ? Promise.reject(new Se("Client didn't negotiate Stateful Reconnect but the server did.")) : c;
|
|
1100
1100
|
} catch (r) {
|
|
1101
|
-
let
|
|
1102
|
-
return r instanceof V && r.statusCode === 404 && (
|
|
1101
|
+
let c = "Failed to complete negotiation with the server: " + r;
|
|
1102
|
+
return r instanceof V && r.statusCode === 404 && (c = c + " Either this is not a SignalR endpoint or there is a proxy blocking the connection."), this._logger.log(l.Error, c), Promise.reject(new Se(c));
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
_createConnectUrl(e, n) {
|
|
@@ -1111,26 +1111,26 @@ class It {
|
|
|
1111
1111
|
this._logger.log(l.Debug, "Connection was provided an instance of ITransport, using that directly."), this.transport = n, await this._startTransport(i, o), this.connectionId = s.connectionId;
|
|
1112
1112
|
return;
|
|
1113
1113
|
}
|
|
1114
|
-
const r = [],
|
|
1115
|
-
let
|
|
1116
|
-
for (const h of
|
|
1117
|
-
const u = this._resolveTransportOrError(h, n, o, (
|
|
1114
|
+
const r = [], c = s.availableTransports || [];
|
|
1115
|
+
let a = s;
|
|
1116
|
+
for (const h of c) {
|
|
1117
|
+
const u = this._resolveTransportOrError(h, n, o, (a == null ? void 0 : a.useStatefulReconnect) === !0);
|
|
1118
1118
|
if (u instanceof Error)
|
|
1119
1119
|
r.push(`${h.transport} failed:`), r.push(u);
|
|
1120
1120
|
else if (this._isITransport(u)) {
|
|
1121
|
-
if (this.transport = u, !
|
|
1121
|
+
if (this.transport = u, !a) {
|
|
1122
1122
|
try {
|
|
1123
|
-
|
|
1124
|
-
} catch (
|
|
1125
|
-
return Promise.reject(
|
|
1123
|
+
a = await this._getNegotiationResponse(e);
|
|
1124
|
+
} catch (m) {
|
|
1125
|
+
return Promise.reject(m);
|
|
1126
1126
|
}
|
|
1127
|
-
i = this._createConnectUrl(e,
|
|
1127
|
+
i = this._createConnectUrl(e, a.connectionToken);
|
|
1128
1128
|
}
|
|
1129
1129
|
try {
|
|
1130
|
-
await this._startTransport(i, o), this.connectionId =
|
|
1130
|
+
await this._startTransport(i, o), this.connectionId = a.connectionId;
|
|
1131
1131
|
return;
|
|
1132
|
-
} catch (
|
|
1133
|
-
if (this._logger.log(l.Error, `Failed to start the transport '${h.transport}': ${
|
|
1132
|
+
} catch (m) {
|
|
1133
|
+
if (this._logger.log(l.Error, `Failed to start the transport '${h.transport}': ${m}`), a = void 0, r.push(new Qe(`${h.transport} failed: ${m}`, T[h.transport])), this._connectionState !== "Connecting") {
|
|
1134
1134
|
const f = "Failed to select transport before stop() was called.";
|
|
1135
1135
|
return this._logger.log(l.Debug, f), Promise.reject(new U(f));
|
|
1136
1136
|
}
|
|
@@ -1176,14 +1176,14 @@ class It {
|
|
|
1176
1176
|
if (i == null)
|
|
1177
1177
|
return this._logger.log(l.Debug, `Skipping transport '${e.transport}' because it is not supported by this client.`), new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);
|
|
1178
1178
|
if (Mt(n, i))
|
|
1179
|
-
if (e.transferFormats.map((
|
|
1179
|
+
if (e.transferFormats.map((c) => D[c]).indexOf(s) >= 0) {
|
|
1180
1180
|
if (i === T.WebSockets && !this._options.WebSocket || i === T.ServerSentEvents && !this._options.EventSource)
|
|
1181
1181
|
return this._logger.log(l.Debug, `Skipping transport '${T[i]}' because it is not supported in your environment.'`), new qe(`'${T[i]}' is not supported in your environment.`, i);
|
|
1182
1182
|
this._logger.log(l.Debug, `Selecting transport '${T[i]}'.`);
|
|
1183
1183
|
try {
|
|
1184
1184
|
return this.features.reconnect = i === T.WebSockets ? o : void 0, this._constructTransport(i);
|
|
1185
|
-
} catch (
|
|
1186
|
-
return
|
|
1185
|
+
} catch (c) {
|
|
1186
|
+
return c;
|
|
1187
1187
|
}
|
|
1188
1188
|
} else
|
|
1189
1189
|
return this._logger.log(l.Debug, `Skipping transport '${T[i]}' because it does not support the requested transfer format '${D[s]}'.`), new Error(`'${T[i]}' does not support ${D[s]}.`);
|
|
@@ -1453,50 +1453,56 @@ const jt = 10 * 1e3, Ft = 15 * 1e3, hn = ({
|
|
|
1453
1453
|
const {
|
|
1454
1454
|
authState: s,
|
|
1455
1455
|
getToken: o
|
|
1456
|
-
} = z(pe), i = dt(), [r,
|
|
1457
|
-
|
|
1456
|
+
} = z(pe), i = dt(), [r, c] = R(fe.Disconnected), [a, h] = R(!1), u = Q(null), m = Q(o);
|
|
1457
|
+
m.current = o;
|
|
1458
1458
|
const f = Y(() => {
|
|
1459
1459
|
var d;
|
|
1460
|
-
return
|
|
1460
|
+
return c(((d = u.current) == null ? void 0 : d.state) ?? fe.Disconnected);
|
|
1461
1461
|
}, []);
|
|
1462
1462
|
B(() => {
|
|
1463
1463
|
if (s !== "AUTH_OK" || !i)
|
|
1464
1464
|
return;
|
|
1465
|
-
let d = !1,
|
|
1466
|
-
const
|
|
1467
|
-
accessTokenFactory: () =>
|
|
1465
|
+
let d = !1, S = null;
|
|
1466
|
+
const g = new Ut().withUrl(`${e}/${n}`, {
|
|
1467
|
+
accessTokenFactory: () => m.current().then((_) => (_ == null ? void 0 : _.token) ?? "")
|
|
1468
1468
|
}).withAutomaticReconnect({
|
|
1469
|
-
nextRetryDelayInMilliseconds: (
|
|
1469
|
+
nextRetryDelayInMilliseconds: (_) => Math.min(1e3 * 2 ** _.previousRetryCount, Ft)
|
|
1470
1470
|
}).build();
|
|
1471
|
-
u.current =
|
|
1472
|
-
console.log("Server says:",
|
|
1473
|
-
}),
|
|
1474
|
-
d || (console.log("Reconnecting...",
|
|
1475
|
-
}),
|
|
1471
|
+
u.current = g, g.on("Connected", (_) => {
|
|
1472
|
+
console.log("Server says:", _);
|
|
1473
|
+
}), g.onreconnecting((_) => {
|
|
1474
|
+
d || (console.log("Reconnecting...", _), f(), h(!0));
|
|
1475
|
+
}), g.onreconnected(() => {
|
|
1476
1476
|
d || (console.log("Reconnected"), f(), h(!1));
|
|
1477
|
-
}),
|
|
1478
|
-
d || (console.log("Connection closed",
|
|
1477
|
+
}), g.onclose((_) => {
|
|
1478
|
+
d || (console.log("Connection closed", _), f(), h(!0));
|
|
1479
1479
|
});
|
|
1480
1480
|
const C = () => {
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1481
|
+
S !== null && window.clearTimeout(S), g.start().then(() => {
|
|
1482
|
+
if (d) {
|
|
1483
|
+
g.stop().catch((_) => {
|
|
1484
|
+
console.log("Error stopping connection:", _);
|
|
1485
|
+
});
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
console.log("Connection started"), f(), h(!1);
|
|
1489
|
+
}).catch((_) => {
|
|
1490
|
+
d || (console.log("Error starting connection:", _), f(), h(!0), S = window.setTimeout(C, jt));
|
|
1485
1491
|
});
|
|
1486
1492
|
};
|
|
1487
1493
|
return C(), () => {
|
|
1488
|
-
d = !0,
|
|
1489
|
-
console.log("Error stopping connection:",
|
|
1494
|
+
d = !0, S !== null && window.clearTimeout(S), u.current = null, g.stop().catch((_) => {
|
|
1495
|
+
console.log("Error stopping connection:", _);
|
|
1490
1496
|
});
|
|
1491
1497
|
};
|
|
1492
1498
|
}, [e, s, n, f, i]);
|
|
1493
|
-
const
|
|
1494
|
-
isAlive:
|
|
1495
|
-
shouldBeAlive:
|
|
1499
|
+
const p = F(() => r === fe.Connected, [r]), w = F(() => s === "AUTH_OK", [s]), b = F(() => ({
|
|
1500
|
+
isAlive: p,
|
|
1501
|
+
shouldBeAlive: w,
|
|
1496
1502
|
connectionState: r,
|
|
1497
|
-
hasLastConnectionEnded:
|
|
1498
|
-
}), [
|
|
1499
|
-
return /* @__PURE__ */ y($e.Provider, { value:
|
|
1503
|
+
hasLastConnectionEnded: a
|
|
1504
|
+
}), [p, w, r, a]);
|
|
1505
|
+
return /* @__PURE__ */ y($e.Provider, { value: b, children: t });
|
|
1500
1506
|
}, un = () => {
|
|
1501
1507
|
const t = z($e);
|
|
1502
1508
|
if (!t)
|
|
@@ -1505,46 +1511,46 @@ const jt = 10 * 1e3, Ft = 15 * 1e3, hn = ({
|
|
|
1505
1511
|
}, Ae = 50, Bt = () => {
|
|
1506
1512
|
const t = N.c(22), {
|
|
1507
1513
|
texts: e
|
|
1508
|
-
} = z(
|
|
1514
|
+
} = z(ae), {
|
|
1509
1515
|
confirm: n
|
|
1510
1516
|
} = e, {
|
|
1511
1517
|
onConfirm: s,
|
|
1512
1518
|
onCancel: o,
|
|
1513
1519
|
text: i,
|
|
1514
1520
|
show: r,
|
|
1515
|
-
textSm:
|
|
1516
|
-
} = tt(),
|
|
1521
|
+
textSm: c
|
|
1522
|
+
} = tt(), a = c === void 0 ? i.length > Ae : c, h = i.length > Ae;
|
|
1517
1523
|
let u;
|
|
1518
|
-
t[0] !== o || t[1] !== s || t[2] !== r ? (u = (
|
|
1524
|
+
t[0] !== o || t[1] !== s || t[2] !== r ? (u = (g) => {
|
|
1519
1525
|
if (r)
|
|
1520
|
-
e: switch (
|
|
1526
|
+
e: switch (g.key) {
|
|
1521
1527
|
case "Enter": {
|
|
1522
|
-
|
|
1528
|
+
g.preventDefault(), g.stopPropagation(), s();
|
|
1523
1529
|
break e;
|
|
1524
1530
|
}
|
|
1525
1531
|
case "Escape": {
|
|
1526
|
-
|
|
1532
|
+
g.preventDefault(), g.stopPropagation(), o();
|
|
1527
1533
|
break e;
|
|
1528
1534
|
}
|
|
1529
1535
|
}
|
|
1530
1536
|
}, t[0] = o, t[1] = s, t[2] = r, t[3] = u) : u = t[3], nt(u);
|
|
1531
1537
|
const f = h ? void 0 : "sm";
|
|
1532
|
-
let
|
|
1533
|
-
t[4] !==
|
|
1534
|
-
let
|
|
1535
|
-
t[7] !== n.no || t[8] !== o ? (
|
|
1536
|
-
let S;
|
|
1537
|
-
t[10] !== n.yes || t[11] !== s ? (S = /* @__PURE__ */ y(ie, { type: "button", color: "primary", onClick: s, className: "w-100 ml", children: n.yes }), t[10] = n.yes, t[11] = s, t[12] = S) : S = t[12];
|
|
1538
|
-
let d;
|
|
1539
|
-
t[13] !== m || t[14] !== S ? (d = /* @__PURE__ */ y(H.Body, { children: /* @__PURE__ */ I("div", { className: "w-100 d-flex gap-5", children: [
|
|
1540
|
-
m,
|
|
1541
|
-
S
|
|
1542
|
-
] }) }), t[13] = m, t[14] = S, t[15] = d) : d = t[15];
|
|
1538
|
+
let p;
|
|
1539
|
+
t[4] !== a || t[5] !== i ? (p = /* @__PURE__ */ y(H.Header, { className: "justify-content-center", children: a ? /* @__PURE__ */ y(ot, { variant: "body", children: i }) : /* @__PURE__ */ y(H.Title, { children: i }) }), t[4] = a, t[5] = i, t[6] = p) : p = t[6];
|
|
1540
|
+
let w;
|
|
1541
|
+
t[7] !== n.no || t[8] !== o ? (w = /* @__PURE__ */ y(ie, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: o, children: n.no }), t[7] = n.no, t[8] = o, t[9] = w) : w = t[9];
|
|
1543
1542
|
let b;
|
|
1544
|
-
|
|
1545
|
-
|
|
1543
|
+
t[10] !== n.yes || t[11] !== s ? (b = /* @__PURE__ */ y(ie, { type: "button", color: "primary", onClick: s, className: "w-100 ml", children: n.yes }), t[10] = n.yes, t[11] = s, t[12] = b) : b = t[12];
|
|
1544
|
+
let d;
|
|
1545
|
+
t[13] !== w || t[14] !== b ? (d = /* @__PURE__ */ y(H.Body, { children: /* @__PURE__ */ I("div", { className: "w-100 d-flex gap-5", children: [
|
|
1546
|
+
w,
|
|
1547
|
+
b
|
|
1548
|
+
] }) }), t[13] = w, t[14] = b, t[15] = d) : d = t[15];
|
|
1549
|
+
let S;
|
|
1550
|
+
return t[16] !== o || t[17] !== r || t[18] !== f || t[19] !== p || t[20] !== d ? (S = /* @__PURE__ */ I(H, { show: r, size: f, centered: !0, onHide: o, children: [
|
|
1551
|
+
p,
|
|
1546
1552
|
d
|
|
1547
|
-
] }), t[16] = o, t[17] = r, t[18] = f, t[19] =
|
|
1553
|
+
] }), t[16] = o, t[17] = r, t[18] = f, t[19] = p, t[20] = d, t[21] = S) : S = t[21], S;
|
|
1548
1554
|
};
|
|
1549
1555
|
export {
|
|
1550
1556
|
$e as ApiWebSocketContext,
|
|
@@ -1552,14 +1558,14 @@ export {
|
|
|
1552
1558
|
pe as AuthContext,
|
|
1553
1559
|
rn as AuthProvider,
|
|
1554
1560
|
Re as DelegationContext,
|
|
1555
|
-
|
|
1561
|
+
cn as DelegationProvider,
|
|
1556
1562
|
gn as FormDisabledContext,
|
|
1557
1563
|
mn as FormDisabledProvider,
|
|
1558
1564
|
Xe as HelmetContext,
|
|
1559
|
-
|
|
1565
|
+
an as HelmetProvider,
|
|
1560
1566
|
Fe as LoadingContext,
|
|
1561
1567
|
on as LoadingProvider,
|
|
1562
|
-
|
|
1568
|
+
ae as LuminusComponentsContext,
|
|
1563
1569
|
nn as LuminusComponentsProvider,
|
|
1564
1570
|
ze as UserContext,
|
|
1565
1571
|
sn as UserProvider,
|