@axa-fr/react-oidc 7.7.2 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +378 -391
- package/dist/index.umd.cjs +9 -9
- package/package.json +4 -4
- package/src/FetchToken.tsx +3 -31
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ke, { useCallback as mt, useState as A, useEffect as
|
|
2
|
-
import { OidcClient as
|
|
1
|
+
import ke, { useCallback as mt, useState as A, useEffect as P } from "react";
|
|
2
|
+
import { OidcClient as f, getParseQueryStringFromLocation as Et, getPath as z, OidcLocation as $e, getFetchDefault as Tt } from "@axa-fr/oidc-client";
|
|
3
3
|
import { TokenRenewMode as nr } from "@axa-fr/oidc-client";
|
|
4
|
-
var be = { exports: {} },
|
|
4
|
+
var be = { exports: {} }, J = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.min.js
|
|
@@ -14,22 +14,22 @@ var be = { exports: {} }, G = {};
|
|
|
14
14
|
var Me;
|
|
15
15
|
function wt() {
|
|
16
16
|
if (Me)
|
|
17
|
-
return
|
|
17
|
+
return J;
|
|
18
18
|
Me = 1;
|
|
19
|
-
var o = ke, s = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty,
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
b !== void 0 && (
|
|
23
|
-
for (
|
|
24
|
-
a.call(
|
|
25
|
-
if (
|
|
26
|
-
for (
|
|
27
|
-
|
|
28
|
-
return { $$typeof: s, type:
|
|
19
|
+
var o = ke, s = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, d = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
+
function g(c, v, b) {
|
|
21
|
+
var k, w = {}, j = null, O = null;
|
|
22
|
+
b !== void 0 && (j = "" + b), v.key !== void 0 && (j = "" + v.key), v.ref !== void 0 && (O = v.ref);
|
|
23
|
+
for (k in v)
|
|
24
|
+
a.call(v, k) && !l.hasOwnProperty(k) && (w[k] = v[k]);
|
|
25
|
+
if (c && c.defaultProps)
|
|
26
|
+
for (k in v = c.defaultProps, v)
|
|
27
|
+
w[k] === void 0 && (w[k] = v[k]);
|
|
28
|
+
return { $$typeof: s, type: c, key: j, ref: O, props: w, _owner: d.current };
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return J.Fragment = r, J.jsx = g, J.jsxs = g, J;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var G = {};
|
|
33
33
|
/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-jsx-runtime.development.js
|
|
@@ -42,51 +42,51 @@ var H = {};
|
|
|
42
42
|
var Ve;
|
|
43
43
|
function Ct() {
|
|
44
44
|
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
|
|
45
|
-
var o = ke, s = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"),
|
|
46
|
-
function
|
|
45
|
+
var o = ke, s = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), c = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), H = Symbol.iterator, X = "@@iterator";
|
|
46
|
+
function Y(e) {
|
|
47
47
|
if (e === null || typeof e != "object")
|
|
48
48
|
return null;
|
|
49
|
-
var t =
|
|
49
|
+
var t = H && e[H] || e[X];
|
|
50
50
|
return typeof t == "function" ? t : null;
|
|
51
51
|
}
|
|
52
52
|
var L = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
53
53
|
function C(e) {
|
|
54
54
|
{
|
|
55
|
-
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
|
|
56
|
-
n[
|
|
55
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), u = 1; u < t; u++)
|
|
56
|
+
n[u - 1] = arguments[u];
|
|
57
57
|
ne("error", e, n);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
function ne(e, t, n) {
|
|
61
61
|
{
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
return String(
|
|
62
|
+
var u = L.ReactDebugCurrentFrame, _ = u.getStackAddendum();
|
|
63
|
+
_ !== "" && (t += "%s", n = n.concat([_]));
|
|
64
|
+
var y = n.map(function(p) {
|
|
65
|
+
return String(p);
|
|
66
66
|
});
|
|
67
|
-
|
|
67
|
+
y.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, y);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
var
|
|
70
|
+
var $ = !1, oe = !1, se = !1, ae = !1, ie = !1, F;
|
|
71
71
|
F = Symbol.for("react.module.reference");
|
|
72
72
|
function ce(e) {
|
|
73
|
-
return !!(typeof e == "string" || typeof e == "function" || e === a || e === l || ie || e ===
|
|
73
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === l || ie || e === d || e === b || e === k || ae || e === O || $ || oe || se || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === w || e.$$typeof === g || e.$$typeof === c || e.$$typeof === v || // This needs to include all possible module reference object
|
|
74
74
|
// types supported by any Flight configuration anywhere since
|
|
75
75
|
// we don't know which Flight build this will end up being used
|
|
76
76
|
// with.
|
|
77
77
|
e.$$typeof === F || e.getModuleId !== void 0));
|
|
78
78
|
}
|
|
79
79
|
function le(e, t, n) {
|
|
80
|
-
var
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
var
|
|
84
|
-
return
|
|
80
|
+
var u = e.displayName;
|
|
81
|
+
if (u)
|
|
82
|
+
return u;
|
|
83
|
+
var _ = t.displayName || t.name || "";
|
|
84
|
+
return _ !== "" ? n + "(" + _ + ")" : n;
|
|
85
85
|
}
|
|
86
86
|
function W(e) {
|
|
87
87
|
return e.displayName || "Context";
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function x(e) {
|
|
90
90
|
if (e == null)
|
|
91
91
|
return null;
|
|
92
92
|
if (typeof e.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -100,30 +100,30 @@ function Ct() {
|
|
|
100
100
|
return "Portal";
|
|
101
101
|
case l:
|
|
102
102
|
return "Profiler";
|
|
103
|
-
case
|
|
103
|
+
case d:
|
|
104
104
|
return "StrictMode";
|
|
105
105
|
case b:
|
|
106
106
|
return "Suspense";
|
|
107
|
-
case
|
|
107
|
+
case k:
|
|
108
108
|
return "SuspenseList";
|
|
109
109
|
}
|
|
110
110
|
if (typeof e == "object")
|
|
111
111
|
switch (e.$$typeof) {
|
|
112
|
-
case
|
|
112
|
+
case c:
|
|
113
113
|
var t = e;
|
|
114
114
|
return W(t) + ".Consumer";
|
|
115
|
-
case
|
|
115
|
+
case g:
|
|
116
116
|
var n = e;
|
|
117
117
|
return W(n._context) + ".Provider";
|
|
118
|
-
case
|
|
118
|
+
case v:
|
|
119
119
|
return le(e, e.render, "ForwardRef");
|
|
120
|
-
case
|
|
121
|
-
var
|
|
122
|
-
return
|
|
123
|
-
case
|
|
124
|
-
var
|
|
120
|
+
case w:
|
|
121
|
+
var u = e.displayName || null;
|
|
122
|
+
return u !== null ? u : x(e.type) || "Memo";
|
|
123
|
+
case j: {
|
|
124
|
+
var _ = e, y = _._payload, p = _._init;
|
|
125
125
|
try {
|
|
126
|
-
return
|
|
126
|
+
return x(p(y));
|
|
127
127
|
} catch {
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
@@ -131,14 +131,14 @@ function Ct() {
|
|
|
131
131
|
}
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
|
-
var
|
|
134
|
+
var U = Object.assign, N = 0, M, E, I, Ee, Te, we, Ce;
|
|
135
135
|
function Re() {
|
|
136
136
|
}
|
|
137
137
|
Re.__reactDisabledLog = !0;
|
|
138
|
-
function
|
|
138
|
+
function He() {
|
|
139
139
|
{
|
|
140
140
|
if (N === 0) {
|
|
141
|
-
M = console.log,
|
|
141
|
+
M = console.log, E = console.info, I = console.warn, Ee = console.error, Te = console.group, we = console.groupCollapsed, Ce = console.groupEnd;
|
|
142
142
|
var e = {
|
|
143
143
|
configurable: !0,
|
|
144
144
|
enumerable: !0,
|
|
@@ -167,25 +167,25 @@ function Ct() {
|
|
|
167
167
|
writable: !0
|
|
168
168
|
};
|
|
169
169
|
Object.defineProperties(console, {
|
|
170
|
-
log:
|
|
170
|
+
log: U({}, e, {
|
|
171
171
|
value: M
|
|
172
172
|
}),
|
|
173
|
-
info:
|
|
174
|
-
value:
|
|
173
|
+
info: U({}, e, {
|
|
174
|
+
value: E
|
|
175
175
|
}),
|
|
176
|
-
warn:
|
|
177
|
-
value:
|
|
176
|
+
warn: U({}, e, {
|
|
177
|
+
value: I
|
|
178
178
|
}),
|
|
179
|
-
error:
|
|
179
|
+
error: U({}, e, {
|
|
180
180
|
value: Ee
|
|
181
181
|
}),
|
|
182
|
-
group:
|
|
182
|
+
group: U({}, e, {
|
|
183
183
|
value: Te
|
|
184
184
|
}),
|
|
185
|
-
groupCollapsed:
|
|
185
|
+
groupCollapsed: U({}, e, {
|
|
186
186
|
value: we
|
|
187
187
|
}),
|
|
188
|
-
groupEnd:
|
|
188
|
+
groupEnd: U({}, e, {
|
|
189
189
|
value: Ce
|
|
190
190
|
})
|
|
191
191
|
});
|
|
@@ -199,9 +199,9 @@ function Ct() {
|
|
|
199
199
|
if (de === void 0)
|
|
200
200
|
try {
|
|
201
201
|
throw Error();
|
|
202
|
-
} catch (
|
|
203
|
-
var
|
|
204
|
-
de =
|
|
202
|
+
} catch (_) {
|
|
203
|
+
var u = _.stack.trim().match(/\n( *(at )?)/);
|
|
204
|
+
de = u && u[1] || "";
|
|
205
205
|
}
|
|
206
206
|
return `
|
|
207
207
|
` + de + e;
|
|
@@ -220,68 +220,68 @@ function Ct() {
|
|
|
220
220
|
if (n !== void 0)
|
|
221
221
|
return n;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var u;
|
|
224
224
|
fe = !0;
|
|
225
|
-
var
|
|
225
|
+
var _ = Error.prepareStackTrace;
|
|
226
226
|
Error.prepareStackTrace = void 0;
|
|
227
|
-
var
|
|
228
|
-
|
|
227
|
+
var y;
|
|
228
|
+
y = ue.current, ue.current = null, He();
|
|
229
229
|
try {
|
|
230
230
|
if (t) {
|
|
231
|
-
var
|
|
231
|
+
var p = function() {
|
|
232
232
|
throw Error();
|
|
233
233
|
};
|
|
234
|
-
if (Object.defineProperty(
|
|
234
|
+
if (Object.defineProperty(p.prototype, "props", {
|
|
235
235
|
set: function() {
|
|
236
236
|
throw Error();
|
|
237
237
|
}
|
|
238
238
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
239
239
|
try {
|
|
240
|
-
Reflect.construct(
|
|
241
|
-
} catch (
|
|
242
|
-
|
|
240
|
+
Reflect.construct(p, []);
|
|
241
|
+
} catch (D) {
|
|
242
|
+
u = D;
|
|
243
243
|
}
|
|
244
|
-
Reflect.construct(e, [],
|
|
244
|
+
Reflect.construct(e, [], p);
|
|
245
245
|
} else {
|
|
246
246
|
try {
|
|
247
|
-
|
|
248
|
-
} catch (
|
|
249
|
-
|
|
247
|
+
p.call();
|
|
248
|
+
} catch (D) {
|
|
249
|
+
u = D;
|
|
250
250
|
}
|
|
251
|
-
e.call(
|
|
251
|
+
e.call(p.prototype);
|
|
252
252
|
}
|
|
253
253
|
} else {
|
|
254
254
|
try {
|
|
255
255
|
throw Error();
|
|
256
|
-
} catch (
|
|
257
|
-
|
|
256
|
+
} catch (D) {
|
|
257
|
+
u = D;
|
|
258
258
|
}
|
|
259
259
|
e();
|
|
260
260
|
}
|
|
261
|
-
} catch (
|
|
262
|
-
if (
|
|
263
|
-
for (var
|
|
264
|
-
`),
|
|
265
|
-
`),
|
|
266
|
-
|
|
267
|
-
for (;
|
|
268
|
-
if (
|
|
269
|
-
if (
|
|
261
|
+
} catch (D) {
|
|
262
|
+
if (D && u && typeof D.stack == "string") {
|
|
263
|
+
for (var h = D.stack.split(`
|
|
264
|
+
`), R = u.stack.split(`
|
|
265
|
+
`), m = h.length - 1, T = R.length - 1; m >= 1 && T >= 0 && h[m] !== R[T]; )
|
|
266
|
+
T--;
|
|
267
|
+
for (; m >= 1 && T >= 0; m--, T--)
|
|
268
|
+
if (h[m] !== R[T]) {
|
|
269
|
+
if (m !== 1 || T !== 1)
|
|
270
270
|
do
|
|
271
|
-
if (
|
|
272
|
-
var
|
|
273
|
-
` +
|
|
274
|
-
return e.displayName &&
|
|
271
|
+
if (m--, T--, T < 0 || h[m] !== R[T]) {
|
|
272
|
+
var S = `
|
|
273
|
+
` + h[m].replace(" at new ", " at ");
|
|
274
|
+
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, S), S;
|
|
275
275
|
}
|
|
276
|
-
while (
|
|
276
|
+
while (m >= 1 && T >= 0);
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
} finally {
|
|
281
|
-
fe = !1, ue.current =
|
|
281
|
+
fe = !1, ue.current = y, Xe(), Error.prepareStackTrace = _;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
return typeof e == "function" && Z.set(e,
|
|
283
|
+
var q = e ? e.displayName || e.name : "", Ye = q ? Q(q) : "";
|
|
284
|
+
return typeof e == "function" && Z.set(e, Ye), Ye;
|
|
285
285
|
}
|
|
286
286
|
function Ze(e, t, n) {
|
|
287
287
|
return xe(e, !1);
|
|
@@ -300,49 +300,49 @@ function Ct() {
|
|
|
300
300
|
switch (e) {
|
|
301
301
|
case b:
|
|
302
302
|
return Q("Suspense");
|
|
303
|
-
case
|
|
303
|
+
case k:
|
|
304
304
|
return Q("SuspenseList");
|
|
305
305
|
}
|
|
306
306
|
if (typeof e == "object")
|
|
307
307
|
switch (e.$$typeof) {
|
|
308
|
-
case
|
|
308
|
+
case v:
|
|
309
309
|
return Ze(e.render);
|
|
310
|
-
case
|
|
310
|
+
case w:
|
|
311
311
|
return ee(e.type, t, n);
|
|
312
|
-
case
|
|
313
|
-
var
|
|
312
|
+
case j: {
|
|
313
|
+
var u = e, _ = u._payload, y = u._init;
|
|
314
314
|
try {
|
|
315
|
-
return ee(
|
|
315
|
+
return ee(y(_), t, n);
|
|
316
316
|
} catch {
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
return "";
|
|
321
321
|
}
|
|
322
|
-
var te = Object.prototype.hasOwnProperty,
|
|
322
|
+
var te = Object.prototype.hasOwnProperty, je = {}, Oe = L.ReactDebugCurrentFrame;
|
|
323
323
|
function re(e) {
|
|
324
324
|
if (e) {
|
|
325
325
|
var t = e._owner, n = ee(e.type, e._source, t ? t.type : null);
|
|
326
|
-
|
|
326
|
+
Oe.setExtraStackFrame(n);
|
|
327
327
|
} else
|
|
328
|
-
|
|
328
|
+
Oe.setExtraStackFrame(null);
|
|
329
329
|
}
|
|
330
|
-
function tt(e, t, n,
|
|
330
|
+
function tt(e, t, n, u, _) {
|
|
331
331
|
{
|
|
332
|
-
var
|
|
333
|
-
for (var
|
|
334
|
-
if (
|
|
335
|
-
var
|
|
332
|
+
var y = Function.call.bind(te);
|
|
333
|
+
for (var p in e)
|
|
334
|
+
if (y(e, p)) {
|
|
335
|
+
var h = void 0;
|
|
336
336
|
try {
|
|
337
|
-
if (typeof e[
|
|
338
|
-
var
|
|
339
|
-
throw
|
|
337
|
+
if (typeof e[p] != "function") {
|
|
338
|
+
var R = Error((u || "React class") + ": " + n + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
339
|
+
throw R.name = "Invariant Violation", R;
|
|
340
340
|
}
|
|
341
|
-
|
|
342
|
-
} catch (
|
|
343
|
-
|
|
341
|
+
h = e[p](t, p, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
342
|
+
} catch (m) {
|
|
343
|
+
h = m;
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
h && !(h instanceof Error) && (re(_), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", n, p, typeof h), re(null)), h instanceof Error && !(h.message in je) && (je[h.message] = !0, re(_), C("Failed %s type: %s", n, h.message), re(null));
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
}
|
|
@@ -358,19 +358,19 @@ function Ct() {
|
|
|
358
358
|
}
|
|
359
359
|
function ot(e) {
|
|
360
360
|
try {
|
|
361
|
-
return
|
|
361
|
+
return Se(e), !1;
|
|
362
362
|
} catch {
|
|
363
363
|
return !0;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Se(e) {
|
|
367
367
|
return "" + e;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Pe(e) {
|
|
370
370
|
if (ot(e))
|
|
371
|
-
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(e)),
|
|
371
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(e)), Se(e);
|
|
372
372
|
}
|
|
373
|
-
var
|
|
373
|
+
var B = L.ReactCurrentOwner, st = {
|
|
374
374
|
key: !0,
|
|
375
375
|
ref: !0,
|
|
376
376
|
__self: !0,
|
|
@@ -394,9 +394,9 @@ function Ct() {
|
|
|
394
394
|
return e.key !== void 0;
|
|
395
395
|
}
|
|
396
396
|
function ct(e, t) {
|
|
397
|
-
if (typeof e.ref == "string" &&
|
|
398
|
-
var n =
|
|
399
|
-
he[n] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
397
|
+
if (typeof e.ref == "string" && B.current && t && B.current.stateNode !== t) {
|
|
398
|
+
var n = x(B.current.type);
|
|
399
|
+
he[n] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(B.current.type), e.ref), he[n] = !0);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
function lt(e, t) {
|
|
@@ -421,51 +421,51 @@ function Ct() {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
var dt = function(e, t, n,
|
|
425
|
-
var
|
|
424
|
+
var dt = function(e, t, n, u, _, y, p) {
|
|
425
|
+
var h = {
|
|
426
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
427
427
|
$$typeof: s,
|
|
428
428
|
// Built-in properties that belong on the element
|
|
429
429
|
type: e,
|
|
430
430
|
key: t,
|
|
431
431
|
ref: n,
|
|
432
|
-
props:
|
|
432
|
+
props: p,
|
|
433
433
|
// Record the component responsible for creating this element.
|
|
434
|
-
_owner:
|
|
434
|
+
_owner: y
|
|
435
435
|
};
|
|
436
|
-
return
|
|
436
|
+
return h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !0,
|
|
440
440
|
value: !1
|
|
441
|
-
}), Object.defineProperty(
|
|
441
|
+
}), Object.defineProperty(h, "_self", {
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !1,
|
|
445
|
-
value:
|
|
446
|
-
}), Object.defineProperty(
|
|
445
|
+
value: u
|
|
446
|
+
}), Object.defineProperty(h, "_source", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
449
449
|
writable: !1,
|
|
450
|
-
value:
|
|
451
|
-
}), Object.freeze && (Object.freeze(
|
|
450
|
+
value: _
|
|
451
|
+
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
452
452
|
};
|
|
453
|
-
function ft(e, t, n,
|
|
453
|
+
function ft(e, t, n, u, _) {
|
|
454
454
|
{
|
|
455
|
-
var
|
|
456
|
-
n !== void 0 && (
|
|
457
|
-
for (
|
|
458
|
-
te.call(t,
|
|
455
|
+
var y, p = {}, h = null, R = null;
|
|
456
|
+
n !== void 0 && (Pe(n), h = "" + n), it(t) && (Pe(t.key), h = "" + t.key), at(t) && (R = t.ref, ct(t, _));
|
|
457
|
+
for (y in t)
|
|
458
|
+
te.call(t, y) && !st.hasOwnProperty(y) && (p[y] = t[y]);
|
|
459
459
|
if (e && e.defaultProps) {
|
|
460
|
-
var
|
|
461
|
-
for (
|
|
462
|
-
|
|
460
|
+
var m = e.defaultProps;
|
|
461
|
+
for (y in m)
|
|
462
|
+
p[y] === void 0 && (p[y] = m[y]);
|
|
463
463
|
}
|
|
464
|
-
if (
|
|
465
|
-
var
|
|
466
|
-
|
|
464
|
+
if (h || R) {
|
|
465
|
+
var T = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
466
|
+
h && lt(p, T), R && ut(p, T);
|
|
467
467
|
}
|
|
468
|
-
return dt(e,
|
|
468
|
+
return dt(e, h, R, _, u, B.current, p);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
var pe = L.ReactCurrentOwner, Ne = L.ReactDebugCurrentFrame;
|
|
@@ -481,10 +481,10 @@ function Ct() {
|
|
|
481
481
|
function ge(e) {
|
|
482
482
|
return typeof e == "object" && e !== null && e.$$typeof === s;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ie() {
|
|
485
485
|
{
|
|
486
486
|
if (pe.current) {
|
|
487
|
-
var e =
|
|
487
|
+
var e = x(pe.current.type);
|
|
488
488
|
if (e)
|
|
489
489
|
return `
|
|
490
490
|
|
|
@@ -504,10 +504,10 @@ Check your code at ` + t + ":" + n + ".";
|
|
|
504
504
|
return "";
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
var
|
|
507
|
+
var De = {};
|
|
508
508
|
function ht(e) {
|
|
509
509
|
{
|
|
510
|
-
var t =
|
|
510
|
+
var t = Ie();
|
|
511
511
|
if (!t) {
|
|
512
512
|
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
513
513
|
n && (t = `
|
|
@@ -523,11 +523,11 @@ Check the top-level render call using <` + n + ">.");
|
|
|
523
523
|
return;
|
|
524
524
|
e._store.validated = !0;
|
|
525
525
|
var n = ht(t);
|
|
526
|
-
if (
|
|
526
|
+
if (De[n])
|
|
527
527
|
return;
|
|
528
|
-
|
|
529
|
-
var
|
|
530
|
-
e && e._owner && e._owner !== pe.current && (
|
|
528
|
+
De[n] = !0;
|
|
529
|
+
var u = "";
|
|
530
|
+
e && e._owner && e._owner !== pe.current && (u = " It was passed a child from " + x(e._owner.type) + "."), V(e), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, u), V(null);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
function We(e, t) {
|
|
@@ -536,16 +536,16 @@ Check the top-level render call using <` + n + ">.");
|
|
|
536
536
|
return;
|
|
537
537
|
if (ve(e))
|
|
538
538
|
for (var n = 0; n < e.length; n++) {
|
|
539
|
-
var
|
|
540
|
-
ge(
|
|
539
|
+
var u = e[n];
|
|
540
|
+
ge(u) && Le(u, t);
|
|
541
541
|
}
|
|
542
542
|
else if (ge(e))
|
|
543
543
|
e._store && (e._store.validated = !0);
|
|
544
544
|
else if (e) {
|
|
545
|
-
var
|
|
546
|
-
if (typeof
|
|
547
|
-
for (var
|
|
548
|
-
ge(
|
|
545
|
+
var _ = Y(e);
|
|
546
|
+
if (typeof _ == "function" && _ !== e.entries)
|
|
547
|
+
for (var y = _.call(e), p; !(p = y.next()).done; )
|
|
548
|
+
ge(p.value) && Le(p.value, t);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -557,19 +557,19 @@ Check the top-level render call using <` + n + ">.");
|
|
|
557
557
|
var n;
|
|
558
558
|
if (typeof t == "function")
|
|
559
559
|
n = t.propTypes;
|
|
560
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
560
|
+
else if (typeof t == "object" && (t.$$typeof === v || // Note: Memo only checks outer props here.
|
|
561
561
|
// Inner props are checked in the reconciler.
|
|
562
|
-
t.$$typeof ===
|
|
562
|
+
t.$$typeof === w))
|
|
563
563
|
n = t.propTypes;
|
|
564
564
|
else
|
|
565
565
|
return;
|
|
566
566
|
if (n) {
|
|
567
|
-
var
|
|
568
|
-
tt(n, e.props, "prop",
|
|
567
|
+
var u = x(t);
|
|
568
|
+
tt(n, e.props, "prop", u, e);
|
|
569
569
|
} else if (t.PropTypes !== void 0 && !_e) {
|
|
570
570
|
_e = !0;
|
|
571
|
-
var
|
|
572
|
-
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
571
|
+
var _ = x(t);
|
|
572
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
|
|
573
573
|
}
|
|
574
574
|
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
575
575
|
}
|
|
@@ -577,292 +577,279 @@ Check the top-level render call using <` + n + ">.");
|
|
|
577
577
|
function _t(e) {
|
|
578
578
|
{
|
|
579
579
|
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
580
|
-
var
|
|
581
|
-
if (
|
|
582
|
-
V(e), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
580
|
+
var u = t[n];
|
|
581
|
+
if (u !== "children" && u !== "key") {
|
|
582
|
+
V(e), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), V(null);
|
|
583
583
|
break;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
e.ref !== null && (V(e), C("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function Ue(e, t, n, u, _, y) {
|
|
590
590
|
{
|
|
591
|
-
var
|
|
592
|
-
if (!
|
|
593
|
-
var
|
|
594
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
var
|
|
598
|
-
e === null ?
|
|
591
|
+
var p = ce(e);
|
|
592
|
+
if (!p) {
|
|
593
|
+
var h = "";
|
|
594
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
595
|
+
var R = vt(_);
|
|
596
|
+
R ? h += R : h += Ie();
|
|
597
|
+
var m;
|
|
598
|
+
e === null ? m = "null" : ve(e) ? m = "array" : e !== void 0 && e.$$typeof === s ? (m = "<" + (x(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : m = typeof e, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", m, h);
|
|
599
599
|
}
|
|
600
|
-
var
|
|
601
|
-
if (
|
|
602
|
-
return
|
|
603
|
-
if (
|
|
604
|
-
var
|
|
605
|
-
if (
|
|
606
|
-
if (
|
|
607
|
-
if (ve(
|
|
608
|
-
for (var
|
|
609
|
-
We(
|
|
610
|
-
Object.freeze && Object.freeze(
|
|
600
|
+
var T = ft(e, t, n, _, y);
|
|
601
|
+
if (T == null)
|
|
602
|
+
return T;
|
|
603
|
+
if (p) {
|
|
604
|
+
var S = t.children;
|
|
605
|
+
if (S !== void 0)
|
|
606
|
+
if (u)
|
|
607
|
+
if (ve(S)) {
|
|
608
|
+
for (var q = 0; q < S.length; q++)
|
|
609
|
+
We(S[q], e);
|
|
610
|
+
Object.freeze && Object.freeze(S);
|
|
611
611
|
} else
|
|
612
612
|
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
613
613
|
else
|
|
614
|
-
We(
|
|
614
|
+
We(S, e);
|
|
615
615
|
}
|
|
616
|
-
return e === a ? _t(
|
|
616
|
+
return e === a ? _t(T) : pt(T), T;
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
function gt(e, t, n) {
|
|
620
|
-
return
|
|
620
|
+
return Ue(e, t, n, !0);
|
|
621
621
|
}
|
|
622
622
|
function yt(e, t, n) {
|
|
623
|
-
return
|
|
623
|
+
return Ue(e, t, n, !1);
|
|
624
624
|
}
|
|
625
625
|
var bt = yt, kt = gt;
|
|
626
|
-
|
|
627
|
-
}()),
|
|
626
|
+
G.Fragment = a, G.jsx = bt, G.jsxs = kt;
|
|
627
|
+
}()), G;
|
|
628
628
|
}
|
|
629
629
|
process.env.NODE_ENV === "production" ? be.exports = wt() : be.exports = Ct();
|
|
630
|
-
var
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
const f = s(), b = await f.getValidTokenAsync(), g = (R = b == null ? void 0 : b.tokens) == null ? void 0 : R.accessToken;
|
|
637
|
-
if (i.has("Accept") || i.set("Accept", "application/json"), g) {
|
|
638
|
-
if (f.configuration.demonstrating_proof_of_possession) {
|
|
639
|
-
const O = await f.generateDemonstrationOfProofOfPossessionAsync(g, a.toString(), h.method);
|
|
640
|
-
i.set("Authorization", `PoP ${g}`), i.set("DPoP", O);
|
|
641
|
-
} else
|
|
642
|
-
i.set("Authorization", `Bearer ${g}`);
|
|
643
|
-
h.credentials || (h.credentials = "same-origin");
|
|
644
|
-
}
|
|
645
|
-
const m = { ...h, headers: i };
|
|
646
|
-
return await o(a, m, ...l);
|
|
647
|
-
}, Ht = (o = null, s = qe) => (r) => (a) => {
|
|
648
|
-
const { fetch: u } = xt(o || a.fetch, s);
|
|
649
|
-
return /* @__PURE__ */ c.jsx(r, { ...a, fetch: u });
|
|
650
|
-
}, xt = (o = null, s = qe) => {
|
|
651
|
-
const r = o || window.fetch, a = v.get;
|
|
630
|
+
var i = be.exports;
|
|
631
|
+
const Be = "default", Rt = (o, s) => async (...r) => await s().fetchWithTokens(o)(...r), Gt = (o = null, s = Be) => (r) => (a) => {
|
|
632
|
+
const { fetch: d } = xt(o || a.fetch, s);
|
|
633
|
+
return /* @__PURE__ */ i.jsx(r, { ...a, fetch: d });
|
|
634
|
+
}, xt = (o = null, s = Be) => {
|
|
635
|
+
const r = o || window.fetch, a = f.get;
|
|
652
636
|
return { fetch: mt(
|
|
653
|
-
(l,
|
|
637
|
+
(l, g) => {
|
|
638
|
+
const v = Rt(r, () => a(s));
|
|
639
|
+
return console.log("newFetch", l), v(l, g);
|
|
640
|
+
},
|
|
654
641
|
[r, s]
|
|
655
642
|
) };
|
|
656
|
-
}, ze = () => /* @__PURE__ */
|
|
657
|
-
/* @__PURE__ */
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
] }) }),
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
] }) }),
|
|
643
|
+
}, ze = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-authenticating", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-authenticating__container", children: [
|
|
644
|
+
/* @__PURE__ */ i.jsx("h1", { className: "oidc-authenticating__title", children: "Error authentication" }),
|
|
645
|
+
/* @__PURE__ */ i.jsx("p", { className: "oidc-authenticating__content", children: "An error occurred during authentication." })
|
|
646
|
+
] }) }), jt = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-authenticating", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-authenticating__container", children: [
|
|
647
|
+
/* @__PURE__ */ i.jsx("h1", { className: "oidc-authenticating__title", children: "Authentication in progress" }),
|
|
648
|
+
/* @__PURE__ */ i.jsx("p", { className: "oidc-authenticating__content", children: "You will be redirected to the login page." })
|
|
649
|
+
] }) }), Ot = () => Math.random().toString(36).substr(2, 6), St = (o, s) => (r, a) => {
|
|
663
650
|
if (typeof o.CustomEvent == "function")
|
|
664
651
|
return new o.CustomEvent(r, a);
|
|
665
|
-
const
|
|
666
|
-
return l.initCustomEvent(r,
|
|
667
|
-
},
|
|
668
|
-
replaceState: (a,
|
|
669
|
-
const l = r(),
|
|
670
|
-
o.history.replaceState({ key: l, state:
|
|
652
|
+
const d = a || { bubbles: !1, cancelable: !1, detail: void 0 }, l = s.createEvent("CustomEvent");
|
|
653
|
+
return l.initCustomEvent(r, d.bubbles, d.cancelable, d.detail), l.prototype = o.Event.prototype, l;
|
|
654
|
+
}, Pt = (o, s, r) => ({
|
|
655
|
+
replaceState: (a, d) => {
|
|
656
|
+
const l = r(), g = d || o.history.state;
|
|
657
|
+
o.history.replaceState({ key: l, state: g }, null, a), o.dispatchEvent(s("popstate"));
|
|
671
658
|
}
|
|
672
|
-
}), At = () =>
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
659
|
+
}), At = () => Pt(window, St(window, document), Ot), Je = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-callback", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-callback__container", children: [
|
|
660
|
+
/* @__PURE__ */ i.jsx("h1", { className: "oidc-callback__title", children: "Authentication complete" }),
|
|
661
|
+
/* @__PURE__ */ i.jsx("p", { className: "oidc-callback__content", children: "You will be redirected to your application." })
|
|
675
662
|
] }) }), Ft = ({ callBackError: o, callBackSuccess: s, configurationName: r, withCustomHistory: a }) => {
|
|
676
|
-
const [
|
|
677
|
-
|
|
678
|
-
let
|
|
663
|
+
const [d, l] = A(!1);
|
|
664
|
+
P(() => {
|
|
665
|
+
let v = !0;
|
|
679
666
|
return (async () => {
|
|
680
|
-
const
|
|
667
|
+
const k = f.get;
|
|
681
668
|
try {
|
|
682
|
-
const { callbackPath:
|
|
683
|
-
(a ? a() : At()).replaceState(
|
|
684
|
-
} catch (
|
|
685
|
-
|
|
669
|
+
const { callbackPath: w } = await k(r).loginCallbackAsync();
|
|
670
|
+
(a ? a() : At()).replaceState(w || "/");
|
|
671
|
+
} catch (w) {
|
|
672
|
+
v && (console.warn(w), l(!0));
|
|
686
673
|
}
|
|
687
674
|
})(), () => {
|
|
688
|
-
|
|
675
|
+
v = !1;
|
|
689
676
|
};
|
|
690
677
|
}, []);
|
|
691
|
-
const
|
|
692
|
-
return
|
|
693
|
-
}, Nt = () => /* @__PURE__ */
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
] }) }),
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
] }) }), Lt = ({ configurationName: o }) => (
|
|
678
|
+
const g = o || ze, c = s || Je;
|
|
679
|
+
return d ? /* @__PURE__ */ i.jsx(g, { configurationName: r }) : /* @__PURE__ */ i.jsx(c, { configurationName: r });
|
|
680
|
+
}, Nt = () => /* @__PURE__ */ i.jsx("span", { className: "oidc-loading", children: "Loading" }), It = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-serviceworker", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-serviceworker__container", children: [
|
|
681
|
+
/* @__PURE__ */ i.jsx("h1", { className: "oidc-serviceworker__title", children: "Unable to authenticate on this browser" }),
|
|
682
|
+
/* @__PURE__ */ i.jsx("p", { className: "oidc-serviceworker__content", children: "Your browser is not secure enough to make authentication work. Try updating your browser or use a newer browser." })
|
|
683
|
+
] }) }), Dt = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-session-lost", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-session-lost__container", children: [
|
|
684
|
+
/* @__PURE__ */ i.jsx("h1", { className: "oidc-session-lost__title", children: "Session timed out" }),
|
|
685
|
+
/* @__PURE__ */ i.jsx("p", { className: "oidc-session-lost__content", children: "Your session has expired. Please re-authenticate." })
|
|
686
|
+
] }) }), Lt = ({ configurationName: o }) => (P(() => {
|
|
700
687
|
(async () => {
|
|
701
|
-
const r =
|
|
688
|
+
const r = f.get;
|
|
702
689
|
r(o).silentLoginCallbackAsync();
|
|
703
690
|
})();
|
|
704
|
-
}, []), /* @__PURE__ */
|
|
705
|
-
const s = Et(window.location.href), r =
|
|
706
|
-
let
|
|
707
|
-
for (const [l,
|
|
708
|
-
l === "state" || l === "scope" || (
|
|
709
|
-
return
|
|
710
|
-
a.tokens || a.loginAsync(null,
|
|
711
|
-
}, []), /* @__PURE__ */
|
|
712
|
-
},
|
|
691
|
+
}, []), /* @__PURE__ */ i.jsx(i.Fragment, {})), Wt = ({ configurationName: o }) => {
|
|
692
|
+
const s = Et(window.location.href), r = f.get, a = r(o);
|
|
693
|
+
let d = null;
|
|
694
|
+
for (const [l, g] of Object.entries(s))
|
|
695
|
+
l === "state" || l === "scope" || (d === null && (d = {}), d[l] = g);
|
|
696
|
+
return P(() => {
|
|
697
|
+
a.tokens || a.loginAsync(null, d, !0, s.scope);
|
|
698
|
+
}, []), /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
699
|
+
}, Ut = ({
|
|
713
700
|
callbackErrorComponent: o,
|
|
714
701
|
callbackSuccessComponent: s,
|
|
715
702
|
redirect_uri: r,
|
|
716
703
|
silent_redirect_uri: a,
|
|
717
|
-
silent_login_uri:
|
|
704
|
+
silent_login_uri: d,
|
|
718
705
|
children: l,
|
|
719
|
-
configurationName:
|
|
720
|
-
withCustomHistory:
|
|
721
|
-
location:
|
|
706
|
+
configurationName: g,
|
|
707
|
+
withCustomHistory: c = null,
|
|
708
|
+
location: v
|
|
722
709
|
}) => {
|
|
723
|
-
const b = window ? z(window.location.href) : "", [
|
|
724
|
-
|
|
725
|
-
const O = () =>
|
|
710
|
+
const b = window ? z(window.location.href) : "", [k, w] = A(b);
|
|
711
|
+
P(() => {
|
|
712
|
+
const O = () => w(z(window.location.href));
|
|
726
713
|
return O(), window.addEventListener("popstate", O, !1), () => window.removeEventListener("popstate", O, !1);
|
|
727
714
|
}, []);
|
|
728
|
-
const
|
|
729
|
-
if (a &&
|
|
730
|
-
return /* @__PURE__ */
|
|
731
|
-
if (
|
|
732
|
-
return /* @__PURE__ */
|
|
733
|
-
switch (
|
|
734
|
-
case
|
|
735
|
-
return /* @__PURE__ */
|
|
715
|
+
const j = z(r);
|
|
716
|
+
if (a && k === z(a))
|
|
717
|
+
return /* @__PURE__ */ i.jsx(Lt, { configurationName: g });
|
|
718
|
+
if (d && k === z(d))
|
|
719
|
+
return /* @__PURE__ */ i.jsx(Wt, { configurationName: g });
|
|
720
|
+
switch (k) {
|
|
721
|
+
case j:
|
|
722
|
+
return /* @__PURE__ */ i.jsx(Ft, { callBackError: o, callBackSuccess: s, configurationName: g, withCustomHistory: c });
|
|
736
723
|
default:
|
|
737
|
-
return /* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: l });
|
|
738
725
|
}
|
|
739
|
-
},
|
|
740
|
-
const [a,
|
|
741
|
-
|
|
742
|
-
let
|
|
743
|
-
return
|
|
744
|
-
|
|
726
|
+
}, Yt = ke.memo(Ut), qe = { name: "", data: null }, $t = ({ loadingComponent: o, children: s, configurationName: r }) => {
|
|
727
|
+
const [a, d] = A(!0), l = f.get, g = l(r);
|
|
728
|
+
P(() => {
|
|
729
|
+
let v = !0;
|
|
730
|
+
return g && g.tryKeepExistingSessionAsync().then(() => {
|
|
731
|
+
v && d(!1);
|
|
745
732
|
}), () => {
|
|
746
|
-
|
|
733
|
+
v = !1;
|
|
747
734
|
};
|
|
748
735
|
}, [r]);
|
|
749
|
-
const
|
|
750
|
-
return /* @__PURE__ */
|
|
751
|
-
},
|
|
752
|
-
const
|
|
753
|
-
return o ? /* @__PURE__ */
|
|
754
|
-
},
|
|
736
|
+
const c = o;
|
|
737
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: a ? /* @__PURE__ */ i.jsx(c, { configurationName: r }) : /* @__PURE__ */ i.jsx(i.Fragment, { children: s }) });
|
|
738
|
+
}, K = ({ isLoading: o, loadingComponent: s, children: r, configurationName: a }) => {
|
|
739
|
+
const d = s;
|
|
740
|
+
return o ? /* @__PURE__ */ i.jsx(d, { configurationName: a, children: r }) : /* @__PURE__ */ i.jsx(i.Fragment, { children: r });
|
|
741
|
+
}, Kt = ({
|
|
755
742
|
children: o,
|
|
756
743
|
configuration: s,
|
|
757
744
|
configurationName: r = "default",
|
|
758
|
-
callbackSuccessComponent: a =
|
|
759
|
-
authenticatingComponent:
|
|
745
|
+
callbackSuccessComponent: a = Je,
|
|
746
|
+
authenticatingComponent: d = jt,
|
|
760
747
|
loadingComponent: l = Nt,
|
|
761
|
-
serviceWorkerNotSupportedComponent:
|
|
762
|
-
authenticatingErrorComponent:
|
|
763
|
-
sessionLostComponent:
|
|
748
|
+
serviceWorkerNotSupportedComponent: g = It,
|
|
749
|
+
authenticatingErrorComponent: c = ze,
|
|
750
|
+
sessionLostComponent: v = Dt,
|
|
764
751
|
onSessionLost: b = null,
|
|
765
|
-
onLogoutFromAnotherTab:
|
|
766
|
-
onLogoutFromSameTab:
|
|
767
|
-
withCustomHistory:
|
|
752
|
+
onLogoutFromAnotherTab: k = null,
|
|
753
|
+
onLogoutFromSameTab: w = null,
|
|
754
|
+
withCustomHistory: j = null,
|
|
768
755
|
onEvent: O = null,
|
|
769
|
-
getFetch:
|
|
756
|
+
getFetch: H = null,
|
|
770
757
|
location: X = null
|
|
771
758
|
}) => {
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
const M =
|
|
775
|
-
O && O(r,
|
|
759
|
+
const Y = (N = "default") => f.getOrCreate(H ?? Tt, X ?? new $e())(s, N), [L, C] = A(!0), [ne, $] = A(qe), [oe, se] = A("default");
|
|
760
|
+
P(() => {
|
|
761
|
+
const M = Y(r).subscribeEvents((E, I) => {
|
|
762
|
+
O && O(r, E, I);
|
|
776
763
|
});
|
|
777
764
|
return () => {
|
|
778
|
-
|
|
765
|
+
Y(r).removeEventSubscription(M);
|
|
779
766
|
};
|
|
780
|
-
}, [r, O]),
|
|
781
|
-
const M =
|
|
782
|
-
if (
|
|
767
|
+
}, [r, O]), P(() => {
|
|
768
|
+
const M = Y(r).subscribeEvents((E, I) => {
|
|
769
|
+
if (E === f.eventNames.refreshTokensAsync_error || E === f.eventNames.syncTokensAsync_error) {
|
|
783
770
|
if (b != null) {
|
|
784
771
|
b();
|
|
785
772
|
return;
|
|
786
773
|
}
|
|
787
|
-
|
|
788
|
-
} else if (
|
|
789
|
-
if (
|
|
790
|
-
|
|
774
|
+
$({ name: E, data: I });
|
|
775
|
+
} else if (E === f.eventNames.logout_from_another_tab) {
|
|
776
|
+
if (k != null) {
|
|
777
|
+
k();
|
|
791
778
|
return;
|
|
792
779
|
}
|
|
793
|
-
|
|
780
|
+
$({ name: E, data: I });
|
|
794
781
|
} else
|
|
795
|
-
|
|
782
|
+
E === f.eventNames.logout_from_same_tab ? w != null && w() : E === f.eventNames.loginAsync_begin || E === f.eventNames.loginCallbackAsync_end || E === f.eventNames.loginAsync_error || E === f.eventNames.loginCallbackAsync_error ? $({ name: E, data: I }) : E === f.eventNames.service_worker_not_supported_by_browser && s.service_worker_only === !0 && $({ name: E, data: I });
|
|
796
783
|
});
|
|
797
784
|
return se(r), C(!1), () => {
|
|
798
|
-
|
|
785
|
+
Y(r).removeEventSubscription(M), $(qe);
|
|
799
786
|
};
|
|
800
787
|
}, [s, r]);
|
|
801
|
-
const ae =
|
|
788
|
+
const ae = v, ie = d, F = l, ce = g, le = c, W = L || oe !== r, x = Y(r);
|
|
802
789
|
switch (ne.name) {
|
|
803
|
-
case
|
|
804
|
-
return /* @__PURE__ */
|
|
805
|
-
case
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
case
|
|
808
|
-
case
|
|
809
|
-
return /* @__PURE__ */
|
|
810
|
-
case
|
|
811
|
-
case
|
|
812
|
-
case
|
|
813
|
-
return /* @__PURE__ */
|
|
790
|
+
case f.eventNames.service_worker_not_supported_by_browser:
|
|
791
|
+
return /* @__PURE__ */ i.jsx(K, { loadingComponent: F, isLoading: W, configurationName: r, children: /* @__PURE__ */ i.jsx(ce, { configurationName: r }) });
|
|
792
|
+
case f.eventNames.loginAsync_begin:
|
|
793
|
+
return /* @__PURE__ */ i.jsx(K, { loadingComponent: F, isLoading: W, configurationName: r, children: /* @__PURE__ */ i.jsx(ie, { configurationName: r }) });
|
|
794
|
+
case f.eventNames.loginAsync_error:
|
|
795
|
+
case f.eventNames.loginCallbackAsync_error:
|
|
796
|
+
return /* @__PURE__ */ i.jsx(K, { loadingComponent: F, isLoading: W, configurationName: r, children: /* @__PURE__ */ i.jsx(le, { configurationName: r }) });
|
|
797
|
+
case f.eventNames.refreshTokensAsync_error:
|
|
798
|
+
case f.eventNames.syncTokensAsync_error:
|
|
799
|
+
case f.eventNames.logout_from_another_tab:
|
|
800
|
+
return /* @__PURE__ */ i.jsx(K, { loadingComponent: F, isLoading: W, configurationName: r, children: /* @__PURE__ */ i.jsx(ae, { configurationName: r }) });
|
|
814
801
|
default:
|
|
815
|
-
return /* @__PURE__ */
|
|
816
|
-
|
|
802
|
+
return /* @__PURE__ */ i.jsx(K, { loadingComponent: F, isLoading: W, configurationName: r, children: /* @__PURE__ */ i.jsx(
|
|
803
|
+
Yt,
|
|
817
804
|
{
|
|
818
|
-
redirect_uri:
|
|
819
|
-
silent_redirect_uri:
|
|
820
|
-
silent_login_uri:
|
|
805
|
+
redirect_uri: x.configuration.redirect_uri,
|
|
806
|
+
silent_redirect_uri: x.configuration.silent_redirect_uri,
|
|
807
|
+
silent_login_uri: x.configuration.silent_login_uri,
|
|
821
808
|
callbackSuccessComponent: a,
|
|
822
|
-
callbackErrorComponent:
|
|
823
|
-
authenticatingComponent:
|
|
809
|
+
callbackErrorComponent: c,
|
|
810
|
+
authenticatingComponent: d,
|
|
824
811
|
configurationName: r,
|
|
825
|
-
withCustomHistory:
|
|
826
|
-
location: X ?? new
|
|
827
|
-
children: /* @__PURE__ */
|
|
812
|
+
withCustomHistory: j,
|
|
813
|
+
location: X ?? new $e(),
|
|
814
|
+
children: /* @__PURE__ */ i.jsx($t, { loadingComponent: F, configurationName: r, children: o })
|
|
828
815
|
}
|
|
829
816
|
) });
|
|
830
817
|
}
|
|
831
818
|
}, Mt = ({ children: o, callbackPath: s = null, extras: r = null, configurationName: a = "default" }) => {
|
|
832
|
-
const
|
|
833
|
-
return
|
|
819
|
+
const d = f.get, l = d(a);
|
|
820
|
+
return P(() => {
|
|
834
821
|
l.tokens || l.loginAsync(s, r);
|
|
835
|
-
}, [a, s, r]), l.tokens ? /* @__PURE__ */
|
|
836
|
-
},
|
|
822
|
+
}, [a, s, r]), l.tokens ? /* @__PURE__ */ i.jsx(i.Fragment, { children: o }) : null;
|
|
823
|
+
}, Ht = (o, s = null, r = null, a = "default") => (d) => /* @__PURE__ */ i.jsx(Mt, { callbackPath: s, extras: r, configurationName: a, children: /* @__PURE__ */ i.jsx(o, { ...d }) }), me = "default", ye = (o, s) => {
|
|
837
824
|
let r = !1;
|
|
838
825
|
return o(s) && (r = o(s).tokens != null), r;
|
|
839
826
|
}, Xt = (o = me) => {
|
|
840
|
-
const s =
|
|
841
|
-
return
|
|
842
|
-
let
|
|
843
|
-
const
|
|
827
|
+
const s = f.get, [r, a] = A(ye(s, o));
|
|
828
|
+
return P(() => {
|
|
829
|
+
let c = !0;
|
|
830
|
+
const v = s(o);
|
|
844
831
|
a(ye(s, o));
|
|
845
|
-
const b =
|
|
846
|
-
(
|
|
832
|
+
const b = v.subscribeEvents((k, w) => {
|
|
833
|
+
(k === f.eventNames.logout_from_another_tab || k === f.eventNames.logout_from_same_tab || k === f.eventNames.token_aquired) && c && a(ye(s, o));
|
|
847
834
|
});
|
|
848
835
|
return () => {
|
|
849
|
-
|
|
836
|
+
c = !1, v.removeEventSubscription(b);
|
|
850
837
|
};
|
|
851
|
-
}, [o]), { login: (
|
|
852
|
-
const
|
|
838
|
+
}, [o]), { login: (c = void 0, v = null, b = !1) => s(o).loginAsync(c, v, !1, void 0, b), logout: (c = void 0, v = null) => s(o).logoutAsync(c, v), renewTokens: async (c = null) => {
|
|
839
|
+
const v = await s(o).renewTokensAsync(c);
|
|
853
840
|
return {
|
|
854
841
|
// @ts-ignore
|
|
855
|
-
accessToken:
|
|
842
|
+
accessToken: v.accessToken,
|
|
856
843
|
// @ts-ignore
|
|
857
|
-
accessTokenPayload:
|
|
844
|
+
accessTokenPayload: v.accessTokenPayload,
|
|
858
845
|
// @ts-ignore
|
|
859
|
-
idToken:
|
|
846
|
+
idToken: v.idToken,
|
|
860
847
|
// @ts-ignore
|
|
861
|
-
idTokenPayload:
|
|
848
|
+
idTokenPayload: v.idTokenPayload
|
|
862
849
|
};
|
|
863
850
|
}, isAuthenticated: r };
|
|
864
|
-
},
|
|
865
|
-
const s =
|
|
851
|
+
}, Ge = { accessToken: null, accessTokenPayload: null }, Vt = (o) => {
|
|
852
|
+
const s = f.get, r = s(o);
|
|
866
853
|
if (r.tokens) {
|
|
867
854
|
const a = r.tokens;
|
|
868
855
|
return {
|
|
@@ -870,71 +857,71 @@ const qe = "default", Rt = (o, s) => async (...r) => {
|
|
|
870
857
|
accessTokenPayload: a.accessTokenPayload
|
|
871
858
|
};
|
|
872
859
|
}
|
|
873
|
-
return
|
|
860
|
+
return Ge;
|
|
874
861
|
}, Qt = (o = me) => {
|
|
875
|
-
const s =
|
|
876
|
-
return
|
|
877
|
-
let
|
|
862
|
+
const s = f.get, [r, a] = A(Vt(o));
|
|
863
|
+
return P(() => {
|
|
864
|
+
let d = !0;
|
|
878
865
|
const l = s(o);
|
|
879
866
|
if (l.tokens) {
|
|
880
|
-
const
|
|
881
|
-
a({ accessToken:
|
|
867
|
+
const c = l.tokens;
|
|
868
|
+
a({ accessToken: c.accessToken, accessTokenPayload: c.accessTokenPayload });
|
|
882
869
|
}
|
|
883
|
-
const
|
|
884
|
-
if ((
|
|
870
|
+
const g = l.subscribeEvents((c, v) => {
|
|
871
|
+
if ((c === f.eventNames.token_renewed || c === f.eventNames.token_aquired || c === f.eventNames.logout_from_another_tab || c === f.eventNames.logout_from_same_tab || c === f.eventNames.refreshTokensAsync_error || c === f.eventNames.syncTokensAsync_error) && d) {
|
|
885
872
|
const b = l.tokens;
|
|
886
|
-
a(b != null ? { accessToken: b.accessToken, accessTokenPayload: b.accessTokenPayload } :
|
|
873
|
+
a(b != null ? { accessToken: b.accessToken, accessTokenPayload: b.accessTokenPayload } : Ge);
|
|
887
874
|
}
|
|
888
875
|
});
|
|
889
876
|
return () => {
|
|
890
|
-
|
|
877
|
+
d = !1, l.removeEventSubscription(g);
|
|
891
878
|
};
|
|
892
879
|
}, [o]), r;
|
|
893
|
-
},
|
|
894
|
-
const s =
|
|
880
|
+
}, Ke = { idToken: null, idTokenPayload: null }, qt = (o) => {
|
|
881
|
+
const s = f.get, r = s(o);
|
|
895
882
|
if (r.tokens) {
|
|
896
883
|
const a = r.tokens;
|
|
897
884
|
return { idToken: a.idToken, idTokenPayload: a.idTokenPayload };
|
|
898
885
|
}
|
|
899
|
-
return
|
|
886
|
+
return Ke;
|
|
900
887
|
}, Zt = (o = me) => {
|
|
901
|
-
const s =
|
|
902
|
-
return
|
|
903
|
-
let
|
|
888
|
+
const s = f.get, [r, a] = A(qt(o));
|
|
889
|
+
return P(() => {
|
|
890
|
+
let d = !0;
|
|
904
891
|
const l = s(o);
|
|
905
892
|
if (l.tokens) {
|
|
906
|
-
const
|
|
907
|
-
a({ idToken:
|
|
893
|
+
const c = l.tokens;
|
|
894
|
+
a({ idToken: c.idToken, idTokenPayload: c.idTokenPayload });
|
|
908
895
|
}
|
|
909
|
-
const
|
|
910
|
-
if ((
|
|
896
|
+
const g = l.subscribeEvents((c, v) => {
|
|
897
|
+
if ((c === f.eventNames.token_renewed || c === f.eventNames.token_aquired || c === f.eventNames.logout_from_another_tab || c === f.eventNames.logout_from_same_tab || c === f.eventNames.refreshTokensAsync_error || c === f.eventNames.syncTokensAsync_error) && d) {
|
|
911
898
|
const b = l.tokens;
|
|
912
|
-
a(b != null ? { idToken: b.idToken, idTokenPayload: b.idTokenPayload } :
|
|
899
|
+
a(b != null ? { idToken: b.idToken, idTokenPayload: b.idTokenPayload } : Ke);
|
|
913
900
|
}
|
|
914
901
|
});
|
|
915
902
|
return () => {
|
|
916
|
-
|
|
903
|
+
d = !1, l.removeEventSubscription(g);
|
|
917
904
|
};
|
|
918
905
|
}, [o]), r;
|
|
919
906
|
};
|
|
920
|
-
var
|
|
907
|
+
var Bt = /* @__PURE__ */ ((o) => (o.Unauthenticated = "Unauthenticated", o.Loading = "Loading user", o.Loaded = "User loaded", o.LoadingError = "Error loading user", o))(Bt || {});
|
|
921
908
|
const er = (o = "default") => {
|
|
922
909
|
const [s, r] = A({
|
|
923
910
|
user: null,
|
|
924
911
|
status: "Unauthenticated"
|
|
925
912
|
/* Unauthenticated */
|
|
926
|
-
}), [a,
|
|
927
|
-
|
|
928
|
-
let
|
|
913
|
+
}), [a, d] = A(""), l = f.get(o);
|
|
914
|
+
P(() => {
|
|
915
|
+
let c = !0;
|
|
929
916
|
if (l && l.tokens) {
|
|
930
917
|
r({
|
|
931
918
|
...s,
|
|
932
919
|
status: "Loading user"
|
|
933
920
|
/* Loading */
|
|
934
921
|
});
|
|
935
|
-
const
|
|
936
|
-
l.userInfoAsync(
|
|
937
|
-
|
|
922
|
+
const v = a !== "";
|
|
923
|
+
l.userInfoAsync(v).then((b) => {
|
|
924
|
+
c && r({
|
|
938
925
|
user: b,
|
|
939
926
|
status: "User loaded"
|
|
940
927
|
/* Loaded */
|
|
@@ -951,24 +938,24 @@ const er = (o = "default") => {
|
|
|
951
938
|
/* Unauthenticated */
|
|
952
939
|
});
|
|
953
940
|
return () => {
|
|
954
|
-
|
|
941
|
+
c = !1;
|
|
955
942
|
};
|
|
956
943
|
}, [a]);
|
|
957
|
-
const
|
|
958
|
-
|
|
944
|
+
const g = () => {
|
|
945
|
+
d(a + " ");
|
|
959
946
|
};
|
|
960
|
-
return { oidcUser: s.user, oidcUserLoadingState: s.status, reloadOidcUser:
|
|
947
|
+
return { oidcUser: s.user, oidcUserLoadingState: s.status, reloadOidcUser: g };
|
|
961
948
|
};
|
|
962
949
|
export {
|
|
963
|
-
|
|
950
|
+
Kt as OidcProvider,
|
|
964
951
|
Mt as OidcSecure,
|
|
965
|
-
|
|
952
|
+
Bt as OidcUserStatus,
|
|
966
953
|
nr as TokenRenewMode,
|
|
967
954
|
Xt as useOidc,
|
|
968
955
|
Qt as useOidcAccessToken,
|
|
969
956
|
xt as useOidcFetch,
|
|
970
957
|
Zt as useOidcIdToken,
|
|
971
958
|
er as useOidcUser,
|
|
972
|
-
|
|
973
|
-
|
|
959
|
+
Gt as withOidcFetch,
|
|
960
|
+
Ht as withOidcSecure
|
|
974
961
|
};
|