@apicurio/common-ui-components 2.0.5 → 2.0.7

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/main.js CHANGED
@@ -1,23 +1,23 @@
1
- import H, { createContext as mt, useContext as wt, useState as y, useEffect as Re, memo as Ue, forwardRef as ie, useCallback as je, useMemo as Fe } from "react";
2
- import { jsx as a, jsxs as m, Fragment as ue } from "react/jsx-runtime";
3
- import { EmptyState as re, EmptyStateVariant as vt, EmptyStateHeader as ne, EmptyStateBody as ve, Spinner as ee, Alert as St, Dropdown as yt, MenuToggle as _e, DropdownList as bt, Divider as Ve, DropdownItem as kt, Select as xe, SelectOption as Ae, TextInput as oe, Button as ae, TextArea as Tt, AboutModal as It, TextContent as Et, Text as $e, TextVariants as He, TextList as Le, TextListItem as k, Modal as Oe, Form as Ge, FormGroup as Me, Progress as Ct, EmptyStateIcon as Qe, ChipGroup as Pt, Chip as Rt, InputGroup as Xe, ButtonVariant as Ut, Pagination as xt, PaginationVariant as At, Skeleton as Ot, SearchInput as Nt, SelectList as qt, ToolbarItem as Dt, ToolbarToggleGroup as jt, ToolbarGroup as Ft, ToolbarFilter as $t } from "@patternfly/react-core";
4
- import { EllipsisVIcon as Ht, ChevronDownIcon as Lt, ChevronRightIcon as Mt, ErrorCircleOIcon as Wt, SearchIcon as Jt, FilterIcon as Ye } from "@patternfly/react-icons";
5
- import { DateTime as fe } from "luxon";
6
- import { Tr as ce, Td as Ne, Th as Kt, Table as Bt, Thead as zt, Tbody as Vt, ActionsColumn as Gt } from "@patternfly/react-table";
7
- import Qt from "use-resize-observer";
8
- const Xt = mt({
1
+ import $, { createContext as gt, useContext as ut, useState as T, useEffect as Ce, memo as Pe, forwardRef as re, useCallback as Ne, useMemo as qe } from "react";
2
+ import { jsx as a, jsxs as v, Fragment as Re } from "react/jsx-runtime";
3
+ import { useInterval as _t, Tooltip as pt, EmptyState as ne, EmptyStateVariant as ft, EmptyStateHeader as oe, EmptyStateBody as me, Spinner as ee, Alert as mt, Dropdown as wt, MenuToggle as Je, DropdownList as vt, Divider as Ke, DropdownItem as St, Select as yt, SelectOption as bt, TextInput as ae, Button as ce, TextArea as kt, AboutModal as Tt, TextContent as It, Text as De, TextVariants as Le, TextList as je, TextListItem as b, Modal as Ue, Form as Be, FormGroup as He, Progress as Et, EmptyStateIcon as ze, ChipGroup as Ct, Chip as Pt, InputGroup as Rt, ButtonVariant as Ut, Pagination as xt, PaginationVariant as At, Skeleton as Ot } from "@patternfly/react-core";
4
+ import { EllipsisVIcon as Nt, ChevronDownIcon as qt, ChevronRightIcon as Dt, ErrorCircleOIcon as Lt, SearchIcon as jt } from "@patternfly/react-icons";
5
+ import { DateTime as se } from "luxon";
6
+ import { Tr as le, Td as xe, Th as Ht, Table as $t, Thead as Mt, Tbody as Ft, ActionsColumn as Wt } from "@patternfly/react-table";
7
+ import Jt from "use-resize-observer";
8
+ const Kt = gt({
9
9
  type: "none"
10
10
  });
11
11
  class Y extends Error {
12
12
  }
13
13
  Y.prototype.name = "InvalidTokenError";
14
- function Yt(e) {
14
+ function Bt(e) {
15
15
  return decodeURIComponent(atob(e).replace(/(.)/g, (t, s) => {
16
16
  let i = s.charCodeAt(0).toString(16).toUpperCase();
17
17
  return i.length < 2 && (i = "0" + i), "%" + i;
18
18
  }));
19
19
  }
20
- function Zt(e) {
20
+ function zt(e) {
21
21
  let t = e.replace(/-/g, "+").replace(/_/g, "/");
22
22
  switch (t.length % 4) {
23
23
  case 0:
@@ -32,12 +32,12 @@ function Zt(e) {
32
32
  throw new Error("base64 string is not of the correct length");
33
33
  }
34
34
  try {
35
- return Yt(t);
35
+ return Bt(t);
36
36
  } catch {
37
37
  return atob(t);
38
38
  }
39
39
  }
40
- function es(e, t) {
40
+ function Vt(e, t) {
41
41
  if (typeof e != "string")
42
42
  throw new Y("Invalid token specified: must be a string");
43
43
  t || (t = {});
@@ -46,17 +46,17 @@ function es(e, t) {
46
46
  throw new Y(`Invalid token specified: missing part #${s + 1}`);
47
47
  let r;
48
48
  try {
49
- r = Zt(i);
50
- } catch (o) {
51
- throw new Y(`Invalid token specified: invalid base64 for part #${s + 1} (${o.message})`);
49
+ r = zt(i);
50
+ } catch (n) {
51
+ throw new Y(`Invalid token specified: invalid base64 for part #${s + 1} (${n.message})`);
52
52
  }
53
53
  try {
54
54
  return JSON.parse(r);
55
- } catch (o) {
56
- throw new Y(`Invalid token specified: invalid json for part #${s + 1} (${o.message})`);
55
+ } catch (n) {
56
+ throw new Y(`Invalid token specified: invalid json for part #${s + 1} (${n.message})`);
57
57
  }
58
58
  }
59
- var ts = {
59
+ var Gt = {
60
60
  debug: () => {
61
61
  },
62
62
  info: () => {
@@ -65,39 +65,39 @@ var ts = {
65
65
  },
66
66
  error: () => {
67
67
  }
68
- }, F, $, le = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.WARN = 2] = "WARN", e[e.INFO = 3] = "INFO", e[e.DEBUG = 4] = "DEBUG", e))(le || {});
68
+ }, j, H, de = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.WARN = 2] = "WARN", e[e.INFO = 3] = "INFO", e[e.DEBUG = 4] = "DEBUG", e))(de || {});
69
69
  ((e) => {
70
70
  function t() {
71
- F = 3, $ = ts;
71
+ j = 3, H = Gt;
72
72
  }
73
73
  e.reset = t;
74
74
  function s(r) {
75
75
  if (!(0 <= r && r <= 4))
76
76
  throw new Error("Invalid log level");
77
- F = r;
77
+ j = r;
78
78
  }
79
79
  e.setLevel = s;
80
80
  function i(r) {
81
- $ = r;
81
+ H = r;
82
82
  }
83
83
  e.setLogger = i;
84
- })(le || (le = {}));
84
+ })(de || (de = {}));
85
85
  var u = class D {
86
86
  constructor(t) {
87
87
  this._name = t;
88
88
  }
89
89
  /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
90
90
  debug(...t) {
91
- F >= 4 && $.debug(D._format(this._name, this._method), ...t);
91
+ j >= 4 && H.debug(D._format(this._name, this._method), ...t);
92
92
  }
93
93
  info(...t) {
94
- F >= 3 && $.info(D._format(this._name, this._method), ...t);
94
+ j >= 3 && H.info(D._format(this._name, this._method), ...t);
95
95
  }
96
96
  warn(...t) {
97
- F >= 2 && $.warn(D._format(this._name, this._method), ...t);
97
+ j >= 2 && H.warn(D._format(this._name, this._method), ...t);
98
98
  }
99
99
  error(...t) {
100
- F >= 1 && $.error(D._format(this._name, this._method), ...t);
100
+ j >= 1 && H.error(D._format(this._name, this._method), ...t);
101
101
  }
102
102
  /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
103
103
  throw(t) {
@@ -118,41 +118,41 @@ var u = class D {
118
118
  /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
119
119
  // helpers for static class methods
120
120
  static debug(t, ...s) {
121
- F >= 4 && $.debug(D._format(t), ...s);
121
+ j >= 4 && H.debug(D._format(t), ...s);
122
122
  }
123
123
  static info(t, ...s) {
124
- F >= 3 && $.info(D._format(t), ...s);
124
+ j >= 3 && H.info(D._format(t), ...s);
125
125
  }
126
126
  static warn(t, ...s) {
127
- F >= 2 && $.warn(D._format(t), ...s);
127
+ j >= 2 && H.warn(D._format(t), ...s);
128
128
  }
129
129
  static error(t, ...s) {
130
- F >= 1 && $.error(D._format(t), ...s);
130
+ j >= 1 && H.error(D._format(t), ...s);
131
131
  }
132
132
  /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
133
133
  };
134
- le.reset();
135
- var de = class {
134
+ de.reset();
135
+ var he = class {
136
136
  // IMPORTANT: doesn't validate the token
137
137
  static decode(e) {
138
138
  try {
139
- return es(e);
139
+ return Vt(e);
140
140
  } catch (t) {
141
141
  throw u.error("JwtUtils.decode", t), t;
142
142
  }
143
143
  }
144
144
  static async generateSignedJwt(e, t, s) {
145
- const i = C.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))), r = C.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))), o = `${i}.${r}`, n = await window.crypto.subtle.sign(
145
+ const i = C.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))), r = C.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))), n = `${i}.${r}`, o = await window.crypto.subtle.sign(
146
146
  {
147
147
  name: "ECDSA",
148
148
  hash: { name: "SHA-256" }
149
149
  },
150
150
  s,
151
- new TextEncoder().encode(o)
152
- ), c = C.encodeBase64Url(new Uint8Array(n));
153
- return `${o}.${c}`;
151
+ new TextEncoder().encode(n)
152
+ ), c = C.encodeBase64Url(new Uint8Array(o));
153
+ return `${n}.${c}`;
154
154
  }
155
- }, ss = "10000000-1000-4000-8000-100000000000", Se = (e) => btoa([...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")), Ze = class j {
155
+ }, Qt = "10000000-1000-4000-8000-100000000000", we = (e) => btoa([...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")), Ve = class L {
156
156
  static _randomWord() {
157
157
  const t = new Uint32Array(1);
158
158
  return crypto.getRandomValues(t), t[0];
@@ -161,16 +161,16 @@ var de = class {
161
161
  * Generates RFC4122 version 4 guid
162
162
  */
163
163
  static generateUUIDv4() {
164
- return ss.replace(
164
+ return Qt.replace(
165
165
  /[018]/g,
166
- (s) => (+s ^ j._randomWord() & 15 >> +s / 4).toString(16)
166
+ (s) => (+s ^ L._randomWord() & 15 >> +s / 4).toString(16)
167
167
  ).replace(/-/g, "");
168
168
  }
169
169
  /**
170
170
  * PKCE: Generate a code verifier
171
171
  */
172
172
  static generateCodeVerifier() {
173
- return j.generateUUIDv4() + j.generateUUIDv4() + j.generateUUIDv4();
173
+ return L.generateUUIDv4() + L.generateUUIDv4() + L.generateUUIDv4();
174
174
  }
175
175
  /**
176
176
  * PKCE: Generate a code challenge
@@ -180,7 +180,7 @@ var de = class {
180
180
  throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");
181
181
  try {
182
182
  const i = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", i);
183
- return Se(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
183
+ return we(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
184
184
  } catch (s) {
185
185
  throw u.error("CryptoUtils.generateCodeChallenge", s), s;
186
186
  }
@@ -190,7 +190,7 @@ var de = class {
190
190
  */
191
191
  static generateBasicAuth(t, s) {
192
192
  const r = new TextEncoder().encode([t, s].join(":"));
193
- return Se(r);
193
+ return we(r);
194
194
  }
195
195
  /**
196
196
  * Generates a hash of a string using a given algorithm
@@ -239,24 +239,24 @@ var de = class {
239
239
  default:
240
240
  throw new Error("Unknown jwk type");
241
241
  }
242
- const i = await j.hash("SHA-256", JSON.stringify(s));
243
- return j.encodeBase64Url(i);
242
+ const i = await L.hash("SHA-256", JSON.stringify(s));
243
+ return L.encodeBase64Url(i);
244
244
  }
245
245
  static async generateDPoPProof({
246
246
  url: t,
247
247
  accessToken: s,
248
248
  httpMethod: i,
249
249
  keyPair: r,
250
- nonce: o
250
+ nonce: n
251
251
  }) {
252
- let n, c;
252
+ let o, c;
253
253
  const l = {
254
254
  jti: window.crypto.randomUUID(),
255
255
  htm: i ?? "GET",
256
256
  htu: t,
257
257
  iat: Math.floor(Date.now() / 1e3)
258
258
  };
259
- s && (n = await j.hash("SHA-256", s), c = j.encodeBase64Url(n), l.ath = c), o && (l.nonce = o);
259
+ s && (o = await L.hash("SHA-256", s), c = L.encodeBase64Url(o), l.ath = c), n && (l.nonce = n);
260
260
  try {
261
261
  const d = await crypto.subtle.exportKey("jwk", r.publicKey), h = {
262
262
  alg: "ES256",
@@ -268,7 +268,7 @@ var de = class {
268
268
  y: d.y
269
269
  }
270
270
  };
271
- return await de.generateSignedJwt(h, l, r.privateKey);
271
+ return await he.generateSignedJwt(h, l, r.privateKey);
272
272
  } catch (d) {
273
273
  throw d instanceof TypeError ? new Error(`Error exporting dpop public key: ${d.message}`) : d;
274
274
  }
@@ -276,7 +276,7 @@ var de = class {
276
276
  static async generateDPoPJkt(t) {
277
277
  try {
278
278
  const s = await crypto.subtle.exportKey("jwk", t.publicKey);
279
- return await j.customCalculateJwkThumbprint(s);
279
+ return await L.customCalculateJwkThumbprint(s);
280
280
  } catch (s) {
281
281
  throw s instanceof TypeError ? new Error(`Could not retrieve dpop keys from storage: ${s.message}`) : s;
282
282
  }
@@ -292,8 +292,8 @@ var de = class {
292
292
  );
293
293
  }
294
294
  };
295
- Ze.encodeBase64Url = (e) => Se(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
296
- var C = Ze, W = class {
295
+ Ve.encodeBase64Url = (e) => we(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
296
+ var C = Ve, W = class {
297
297
  constructor(e) {
298
298
  this._name = e, this._callbacks = [], this._logger = new u(`Event('${this._name}')`);
299
299
  }
@@ -309,7 +309,7 @@ var C = Ze, W = class {
309
309
  for (const t of this._callbacks)
310
310
  await t(...e);
311
311
  }
312
- }, We = class {
312
+ }, $e = class {
313
313
  /**
314
314
  * Populates a map of window features with a placement centered in front of
315
315
  * the current window. If no explicit width is given, a default value is
@@ -322,11 +322,11 @@ var C = Ze, W = class {
322
322
  static serialize(e) {
323
323
  return Object.entries(e).filter(([, t]) => t != null).map(([t, s]) => `${t}=${typeof s != "boolean" ? s : s ? "yes" : "no"}`).join(",");
324
324
  }
325
- }, M = class se extends W {
325
+ }, F = class ie extends W {
326
326
  constructor() {
327
327
  super(...arguments), this._logger = new u(`Timer('${this._name}')`), this._timerHandle = null, this._expiration = 0, this._callback = () => {
328
- const t = this._expiration - se.getEpochTime();
329
- this._logger.debug("timer completes in", t), this._expiration <= se.getEpochTime() && (this.cancel(), super.raise());
328
+ const t = this._expiration - ie.getEpochTime();
329
+ this._logger.debug("timer completes in", t), this._expiration <= ie.getEpochTime() && (this.cancel(), super.raise());
330
330
  };
331
331
  }
332
332
  // get the time
@@ -336,7 +336,7 @@ var C = Ze, W = class {
336
336
  init(t) {
337
337
  const s = this._logger.create("init");
338
338
  t = Math.max(Math.floor(t), 1);
339
- const i = se.getEpochTime() + t;
339
+ const i = ie.getEpochTime() + t;
340
340
  if (this.expiration === i && this._timerHandle) {
341
341
  s.debug("skipping since already initialized for expiration at", this.expiration);
342
342
  return;
@@ -351,26 +351,26 @@ var C = Ze, W = class {
351
351
  cancel() {
352
352
  this._logger.create("cancel"), this._timerHandle && (clearInterval(this._timerHandle), this._timerHandle = null);
353
353
  }
354
- }, ye = class {
354
+ }, ve = class {
355
355
  static readParams(e, t = "query") {
356
356
  if (!e) throw new TypeError("Invalid URL");
357
357
  const i = new URL(e, "http://127.0.0.1")[t === "fragment" ? "hash" : "search"];
358
358
  return new URLSearchParams(i.slice(1));
359
359
  }
360
- }, be = ";", B = class extends Error {
360
+ }, Se = ";", B = class extends Error {
361
361
  constructor(e, t) {
362
362
  var s, i, r;
363
363
  if (super(e.error_description || e.error || ""), this.form = t, this.name = "ErrorResponse", !e.error)
364
364
  throw u.error("ErrorResponse", "No error passed"), new Error("No error passed");
365
365
  this.error = e.error, this.error_description = (s = e.error_description) != null ? s : null, this.error_uri = (i = e.error_uri) != null ? i : null, this.state = e.userState, this.session_state = (r = e.session_state) != null ? r : null, this.url_state = e.url_state;
366
366
  }
367
- }, qe = class extends Error {
367
+ }, Ae = class extends Error {
368
368
  constructor(e) {
369
369
  super(e), this.name = "ErrorTimeout";
370
370
  }
371
- }, is = class {
371
+ }, Xt = class {
372
372
  constructor(e) {
373
- this._logger = new u("AccessTokenEvents"), this._expiringTimer = new M("Access token expiring"), this._expiredTimer = new M("Access token expired"), this._expiringNotificationTimeInSeconds = e.expiringNotificationTimeInSeconds;
373
+ this._logger = new u("AccessTokenEvents"), this._expiringTimer = new F("Access token expiring"), this._expiredTimer = new F("Access token expired"), this._expiringNotificationTimeInSeconds = e.expiringNotificationTimeInSeconds;
374
374
  }
375
375
  load(e) {
376
376
  const t = this._logger.create("load");
@@ -413,13 +413,13 @@ var C = Ze, W = class {
413
413
  removeAccessTokenExpired(e) {
414
414
  this._expiredTimer.removeHandler(e);
415
415
  }
416
- }, rs = class {
416
+ }, Yt = class {
417
417
  constructor(e, t, s, i, r) {
418
- this._callback = e, this._client_id = t, this._intervalInSeconds = i, this._stopOnError = r, this._logger = new u("CheckSessionIFrame"), this._timer = null, this._session_state = null, this._message = (n) => {
419
- n.origin === this._frame_origin && n.source === this._frame.contentWindow && (n.data === "error" ? (this._logger.error("error message from check session op iframe"), this._stopOnError && this.stop()) : n.data === "changed" ? (this._logger.debug("changed message from check session op iframe"), this.stop(), this._callback()) : this._logger.debug(n.data + " message from check session op iframe"));
418
+ this._callback = e, this._client_id = t, this._intervalInSeconds = i, this._stopOnError = r, this._logger = new u("CheckSessionIFrame"), this._timer = null, this._session_state = null, this._message = (o) => {
419
+ o.origin === this._frame_origin && o.source === this._frame.contentWindow && (o.data === "error" ? (this._logger.error("error message from check session op iframe"), this._stopOnError && this.stop()) : o.data === "changed" ? (this._logger.debug("changed message from check session op iframe"), this.stop(), this._callback()) : this._logger.debug(o.data + " message from check session op iframe"));
420
420
  };
421
- const o = new URL(s);
422
- this._frame_origin = o.origin, this._frame = window.document.createElement("iframe"), this._frame.style.visibility = "hidden", this._frame.style.position = "fixed", this._frame.style.left = "-1000px", this._frame.style.top = "0", this._frame.width = "0", this._frame.height = "0", this._frame.src = o.href;
421
+ const n = new URL(s);
422
+ this._frame_origin = n.origin, this._frame = window.document.createElement("iframe"), this._frame.style.visibility = "hidden", this._frame.style.position = "fixed", this._frame.style.left = "-1000px", this._frame.style.top = "0", this._frame.width = "0", this._frame.height = "0", this._frame.src = n.href;
423
423
  }
424
424
  load() {
425
425
  return new Promise((e) => {
@@ -440,7 +440,7 @@ var C = Ze, W = class {
440
440
  stop() {
441
441
  this._logger.create("stop"), this._session_state = null, this._timer && (clearInterval(this._timer), this._timer = null);
442
442
  }
443
- }, et = class {
443
+ }, Ge = class {
444
444
  constructor() {
445
445
  this._logger = new u("InMemoryWebStorage"), this._data = {};
446
446
  }
@@ -462,11 +462,11 @@ var C = Ze, W = class {
462
462
  key(e) {
463
463
  return Object.getOwnPropertyNames(this._data)[e];
464
464
  }
465
- }, ke = class extends Error {
465
+ }, ye = class extends Error {
466
466
  constructor(e, t) {
467
467
  super(t), this.name = "ErrorDPoPNonce", this.nonce = e;
468
468
  }
469
- }, De = class {
469
+ }, Oe = class {
470
470
  constructor(e = [], t = null, s = {}) {
471
471
  this._jwtHandler = t, this._extraHeaders = s, this._logger = new u("JsonService"), this._contentTypes = [], this._contentTypes.push(...e, "application/json"), t && this._contentTypes.push("application/jwt");
472
472
  }
@@ -474,16 +474,16 @@ var C = Ze, W = class {
474
474
  const { timeoutInSeconds: s, ...i } = t;
475
475
  if (!s)
476
476
  return await fetch(e, i);
477
- const r = new AbortController(), o = setTimeout(() => r.abort(), s * 1e3);
477
+ const r = new AbortController(), n = setTimeout(() => r.abort(), s * 1e3);
478
478
  try {
479
479
  return await fetch(e, {
480
480
  ...t,
481
481
  signal: r.signal
482
482
  });
483
- } catch (n) {
484
- throw n instanceof DOMException && n.name === "AbortError" ? new qe("Network timed out") : n;
483
+ } catch (o) {
484
+ throw o instanceof DOMException && o.name === "AbortError" ? new Ae("Network timed out") : o;
485
485
  } finally {
486
- clearTimeout(o);
486
+ clearTimeout(n);
487
487
  }
488
488
  }
489
489
  async getJson(e, {
@@ -491,28 +491,28 @@ var C = Ze, W = class {
491
491
  credentials: s,
492
492
  timeoutInSeconds: i
493
493
  } = {}) {
494
- const r = this._logger.create("getJson"), o = {
494
+ const r = this._logger.create("getJson"), n = {
495
495
  Accept: this._contentTypes.join(", ")
496
496
  };
497
- t && (r.debug("token passed, setting Authorization header"), o.Authorization = "Bearer " + t), this.appendExtraHeaders(o);
498
- let n;
497
+ t && (r.debug("token passed, setting Authorization header"), n.Authorization = "Bearer " + t), this.appendExtraHeaders(n);
498
+ let o;
499
499
  try {
500
- r.debug("url:", e), n = await this.fetchWithTimeout(e, { method: "GET", headers: o, timeoutInSeconds: i, credentials: s });
500
+ r.debug("url:", e), o = await this.fetchWithTimeout(e, { method: "GET", headers: n, timeoutInSeconds: i, credentials: s });
501
501
  } catch (d) {
502
502
  throw r.error("Network Error"), d;
503
503
  }
504
- r.debug("HTTP response received, status", n.status);
505
- const c = n.headers.get("Content-Type");
506
- if (c && !this._contentTypes.find((d) => c.startsWith(d)) && r.throw(new Error(`Invalid response Content-Type: ${c ?? "undefined"}, from URL: ${e}`)), n.ok && this._jwtHandler && (c != null && c.startsWith("application/jwt")))
507
- return await this._jwtHandler(await n.text());
504
+ r.debug("HTTP response received, status", o.status);
505
+ const c = o.headers.get("Content-Type");
506
+ if (c && !this._contentTypes.find((d) => c.startsWith(d)) && r.throw(new Error(`Invalid response Content-Type: ${c ?? "undefined"}, from URL: ${e}`)), o.ok && this._jwtHandler && (c != null && c.startsWith("application/jwt")))
507
+ return await this._jwtHandler(await o.text());
508
508
  let l;
509
509
  try {
510
- l = await n.json();
510
+ l = await o.json();
511
511
  } catch (d) {
512
- throw r.error("Error parsing JSON response", d), n.ok ? d : new Error(`${n.statusText} (${n.status})`);
512
+ throw r.error("Error parsing JSON response", d), o.ok ? d : new Error(`${o.statusText} (${o.status})`);
513
513
  }
514
- if (!n.ok)
515
- throw r.error("Error from server:", l), l.error ? new B(l) : new Error(`${n.statusText} (${n.status}): ${JSON.stringify(l)}`);
514
+ if (!o.ok)
515
+ throw r.error("Error from server:", l), l.error ? new B(l) : new Error(`${o.statusText} (${o.status}): ${JSON.stringify(l)}`);
516
516
  return l;
517
517
  }
518
518
  async postForm(e, {
@@ -520,21 +520,21 @@ var C = Ze, W = class {
520
520
  basicAuth: s,
521
521
  timeoutInSeconds: i,
522
522
  initCredentials: r,
523
- extraHeaders: o
523
+ extraHeaders: n
524
524
  }) {
525
- const n = this._logger.create("postForm"), c = {
525
+ const o = this._logger.create("postForm"), c = {
526
526
  Accept: this._contentTypes.join(", "),
527
527
  "Content-Type": "application/x-www-form-urlencoded",
528
- ...o
528
+ ...n
529
529
  };
530
530
  s !== void 0 && (c.Authorization = "Basic " + s), this.appendExtraHeaders(c);
531
531
  let l;
532
532
  try {
533
- n.debug("url:", e), l = await this.fetchWithTimeout(e, { method: "POST", headers: c, body: t, timeoutInSeconds: i, credentials: r });
533
+ o.debug("url:", e), l = await this.fetchWithTimeout(e, { method: "POST", headers: c, body: t, timeoutInSeconds: i, credentials: r });
534
534
  } catch (_) {
535
- throw n.error("Network error"), _;
535
+ throw o.error("Network error"), _;
536
536
  }
537
- n.debug("HTTP response received, status", l.status);
537
+ o.debug("HTTP response received, status", l.status);
538
538
  const d = l.headers.get("Content-Type");
539
539
  if (d && !this._contentTypes.find((_) => d.startsWith(_)))
540
540
  throw new Error(`Invalid response Content-Type: ${d ?? "undefined"}, from URL: ${e}`);
@@ -544,12 +544,12 @@ var C = Ze, W = class {
544
544
  try {
545
545
  g = JSON.parse(h);
546
546
  } catch (_) {
547
- throw n.error("Error parsing JSON response", _), l.ok ? _ : new Error(`${l.statusText} (${l.status})`);
547
+ throw o.error("Error parsing JSON response", _), l.ok ? _ : new Error(`${l.statusText} (${l.status})`);
548
548
  }
549
549
  if (!l.ok) {
550
- if (n.error("Error from server:", g), l.headers.has("dpop-nonce")) {
550
+ if (o.error("Error from server:", g), l.headers.has("dpop-nonce")) {
551
551
  const _ = l.headers.get("dpop-nonce");
552
- throw new ke(_, `${JSON.stringify(g)}`);
552
+ throw new ye(_, `${JSON.stringify(g)}`);
553
553
  }
554
554
  throw g.error ? new B(g, t) : new Error(`${l.statusText} (${l.status}): ${JSON.stringify(g)}`);
555
555
  }
@@ -566,13 +566,13 @@ var C = Ze, W = class {
566
566
  t.warn("Protected header could not be overridden", r, i);
567
567
  return;
568
568
  }
569
- const o = typeof this._extraHeaders[r] == "function" ? this._extraHeaders[r]() : this._extraHeaders[r];
570
- o && o !== "" && (e[r] = o);
569
+ const n = typeof this._extraHeaders[r] == "function" ? this._extraHeaders[r]() : this._extraHeaders[r];
570
+ n && n !== "" && (e[r] = n);
571
571
  });
572
572
  }
573
- }, ns = class {
573
+ }, Zt = class {
574
574
  constructor(e) {
575
- this._settings = e, this._logger = new u("MetadataService"), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._jsonService = new De(
575
+ this._settings = e, this._logger = new u("MetadataService"), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._jsonService = new Oe(
576
576
  ["application/jwk-set+json"],
577
577
  null,
578
578
  this._settings.extraHeaders
@@ -637,7 +637,7 @@ var C = Ze, W = class {
637
637
  throw e.throw(new Error("Missing keys on keyset")), null;
638
638
  return this._signingKeys = s.keys, this._signingKeys;
639
639
  }
640
- }, tt = class {
640
+ }, Qe = class {
641
641
  constructor({
642
642
  prefix: e = "oidc.",
643
643
  store: t = localStorage
@@ -664,7 +664,7 @@ var C = Ze, W = class {
664
664
  }
665
665
  return t;
666
666
  }
667
- }, os = "code", as = "openid", cs = "client_secret_post", ls = 60 * 15, Te = class {
667
+ }, es = "code", ts = "openid", ss = "client_secret_post", is = 60 * 15, be = class {
668
668
  constructor({
669
669
  // metadata related
670
670
  authority: e,
@@ -673,61 +673,61 @@ var C = Ze, W = class {
673
673
  signingKeys: i,
674
674
  metadataSeed: r,
675
675
  // client related
676
- client_id: o,
677
- client_secret: n,
678
- response_type: c = os,
679
- scope: l = as,
676
+ client_id: n,
677
+ client_secret: o,
678
+ response_type: c = es,
679
+ scope: l = ts,
680
680
  redirect_uri: d,
681
681
  post_logout_redirect_uri: h,
682
- client_authentication: g = cs,
682
+ client_authentication: g = ss,
683
683
  // optional protocol
684
684
  prompt: _,
685
685
  display: S,
686
686
  max_age: x,
687
- ui_locales: T,
687
+ ui_locales: k,
688
688
  acr_values: A,
689
689
  resource: I,
690
690
  response_mode: N,
691
691
  // behavior flags
692
692
  filterProtocolClaims: P = !0,
693
- loadUserInfo: L = !1,
693
+ loadUserInfo: M = !1,
694
694
  requestTimeoutInSeconds: R,
695
- staleStateAgeInSeconds: w = ls,
695
+ staleStateAgeInSeconds: m = is,
696
696
  mergeClaimsStrategy: E = { array: "replace" },
697
697
  disablePKCE: U = !1,
698
698
  // other behavior
699
- stateStore: b,
699
+ stateStore: y,
700
700
  revokeTokenAdditionalContentTypes: z,
701
701
  fetchRequestCredentials: f,
702
- refreshTokenAllowedScope: v,
702
+ refreshTokenAllowedScope: w,
703
703
  // extra
704
704
  extraQueryParams: q = {},
705
705
  extraTokenParams: J = {},
706
706
  extraHeaders: K = {},
707
707
  dpop: Q,
708
- omitScopeWhenRequesting: pe = !1
708
+ omitScopeWhenRequesting: _e = !1
709
709
  }) {
710
710
  var X;
711
- if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = r, this.signingKeys = i, this.client_id = o, this.client_secret = n, this.response_type = c, this.scope = l, this.redirect_uri = d, this.post_logout_redirect_uri = h, this.client_authentication = g, this.prompt = _, this.display = S, this.max_age = x, this.ui_locales = T, this.acr_values = A, this.resource = I, this.response_mode = N, this.filterProtocolClaims = P ?? !0, this.loadUserInfo = !!L, this.staleStateAgeInSeconds = w, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = pe, this.disablePKCE = !!U, this.revokeTokenAdditionalContentTypes = z, this.fetchRequestCredentials = f || "same-origin", this.requestTimeoutInSeconds = R, b)
712
- this.stateStore = b;
711
+ if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = r, this.signingKeys = i, this.client_id = n, this.client_secret = o, this.response_type = c, this.scope = l, this.redirect_uri = d, this.post_logout_redirect_uri = h, this.client_authentication = g, this.prompt = _, this.display = S, this.max_age = x, this.ui_locales = k, this.acr_values = A, this.resource = I, this.response_mode = N, this.filterProtocolClaims = P ?? !0, this.loadUserInfo = !!M, this.staleStateAgeInSeconds = m, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = _e, this.disablePKCE = !!U, this.revokeTokenAdditionalContentTypes = z, this.fetchRequestCredentials = f || "same-origin", this.requestTimeoutInSeconds = R, y)
712
+ this.stateStore = y;
713
713
  else {
714
- const te = typeof window < "u" ? window.localStorage : new et();
715
- this.stateStore = new tt({ store: te });
714
+ const te = typeof window < "u" ? window.localStorage : new Ge();
715
+ this.stateStore = new Qe({ store: te });
716
716
  }
717
- if (this.refreshTokenAllowedScope = v, this.extraQueryParams = q, this.extraTokenParams = J, this.extraHeaders = K, this.dpop = Q, this.dpop && !((X = this.dpop) != null && X.store))
717
+ if (this.refreshTokenAllowedScope = w, this.extraQueryParams = q, this.extraTokenParams = J, this.extraHeaders = K, this.dpop = Q, this.dpop && !((X = this.dpop) != null && X.store))
718
718
  throw new Error("A DPoPStore is required when dpop is enabled");
719
719
  }
720
- }, ds = class {
720
+ }, rs = class {
721
721
  constructor(e, t) {
722
722
  this._settings = e, this._metadataService = t, this._logger = new u("UserInfoService"), this._getClaimsFromJwt = async (s) => {
723
723
  const i = this._logger.create("_getClaimsFromJwt");
724
724
  try {
725
- const r = de.decode(s);
725
+ const r = he.decode(s);
726
726
  return i.debug("JWT decoding successful"), r;
727
727
  } catch (r) {
728
728
  throw i.error("Error parsing JWT response"), r;
729
729
  }
730
- }, this._jsonService = new De(
730
+ }, this._jsonService = new Oe(
731
731
  void 0,
732
732
  this._getClaimsFromJwt,
733
733
  this._settings.extraHeaders
@@ -745,9 +745,9 @@ var C = Ze, W = class {
745
745
  });
746
746
  return t.debug("got claims", i), i;
747
747
  }
748
- }, st = class {
748
+ }, Xe = class {
749
749
  constructor(e, t) {
750
- this._settings = e, this._metadataService = t, this._logger = new u("TokenClient"), this._jsonService = new De(
750
+ this._settings = e, this._metadataService = t, this._logger = new u("TokenClient"), this._jsonService = new Oe(
751
751
  this._settings.revokeTokenAdditionalContentTypes,
752
752
  null,
753
753
  this._settings.extraHeaders
@@ -764,18 +764,18 @@ var C = Ze, W = class {
764
764
  client_id: s = this._settings.client_id,
765
765
  client_secret: i = this._settings.client_secret,
766
766
  extraHeaders: r,
767
- ...o
767
+ ...n
768
768
  }) {
769
- const n = this._logger.create("exchangeCode");
770
- s || n.throw(new Error("A client_id is required")), t || n.throw(new Error("A redirect_uri is required")), o.code || n.throw(new Error("A code is required"));
769
+ const o = this._logger.create("exchangeCode");
770
+ s || o.throw(new Error("A client_id is required")), t || o.throw(new Error("A redirect_uri is required")), n.code || o.throw(new Error("A code is required"));
771
771
  const c = new URLSearchParams({ grant_type: e, redirect_uri: t });
772
- for (const [g, _] of Object.entries(o))
772
+ for (const [g, _] of Object.entries(n))
773
773
  _ != null && c.set(g, _);
774
774
  let l;
775
775
  switch (this._settings.client_authentication) {
776
776
  case "client_secret_basic":
777
777
  if (!i)
778
- throw n.throw(new Error("A client_secret is required")), null;
778
+ throw o.throw(new Error("A client_secret is required")), null;
779
779
  l = C.generateBasicAuth(s, i);
780
780
  break;
781
781
  case "client_secret_post":
@@ -783,7 +783,7 @@ var C = Ze, W = class {
783
783
  break;
784
784
  }
785
785
  const d = await this._metadataService.getTokenEndpoint(!1);
786
- n.debug("got token endpoint");
786
+ o.debug("got token endpoint");
787
787
  const h = await this._jsonService.postForm(d, {
788
788
  body: c,
789
789
  basicAuth: l,
@@ -791,7 +791,7 @@ var C = Ze, W = class {
791
791
  initCredentials: this._settings.fetchRequestCredentials,
792
792
  extraHeaders: r
793
793
  });
794
- return n.debug("got response"), h;
794
+ return o.debug("got response"), h;
795
795
  }
796
796
  /**
797
797
  * Exchange credentials.
@@ -805,27 +805,27 @@ var C = Ze, W = class {
805
805
  scope: i = this._settings.scope,
806
806
  ...r
807
807
  }) {
808
- const o = this._logger.create("exchangeCredentials");
809
- t || o.throw(new Error("A client_id is required"));
810
- const n = new URLSearchParams({ grant_type: e });
811
- this._settings.omitScopeWhenRequesting || n.set("scope", i);
808
+ const n = this._logger.create("exchangeCredentials");
809
+ t || n.throw(new Error("A client_id is required"));
810
+ const o = new URLSearchParams({ grant_type: e });
811
+ this._settings.omitScopeWhenRequesting || o.set("scope", i);
812
812
  for (const [h, g] of Object.entries(r))
813
- g != null && n.set(h, g);
813
+ g != null && o.set(h, g);
814
814
  let c;
815
815
  switch (this._settings.client_authentication) {
816
816
  case "client_secret_basic":
817
817
  if (!s)
818
- throw o.throw(new Error("A client_secret is required")), null;
818
+ throw n.throw(new Error("A client_secret is required")), null;
819
819
  c = C.generateBasicAuth(t, s);
820
820
  break;
821
821
  case "client_secret_post":
822
- n.append("client_id", t), s && n.append("client_secret", s);
822
+ o.append("client_id", t), s && o.append("client_secret", s);
823
823
  break;
824
824
  }
825
825
  const l = await this._metadataService.getTokenEndpoint(!1);
826
- o.debug("got token endpoint");
827
- const d = await this._jsonService.postForm(l, { body: n, basicAuth: c, timeoutInSeconds: this._settings.requestTimeoutInSeconds, initCredentials: this._settings.fetchRequestCredentials });
828
- return o.debug("got response"), d;
826
+ n.debug("got token endpoint");
827
+ const d = await this._jsonService.postForm(l, { body: o, basicAuth: c, timeoutInSeconds: this._settings.requestTimeoutInSeconds, initCredentials: this._settings.fetchRequestCredentials });
828
+ return n.debug("got response"), d;
829
829
  }
830
830
  /**
831
831
  * Exchange a refresh token.
@@ -838,18 +838,18 @@ var C = Ze, W = class {
838
838
  client_secret: s = this._settings.client_secret,
839
839
  timeoutInSeconds: i,
840
840
  extraHeaders: r,
841
- ...o
841
+ ...n
842
842
  }) {
843
- const n = this._logger.create("exchangeRefreshToken");
844
- t || n.throw(new Error("A client_id is required")), o.refresh_token || n.throw(new Error("A refresh_token is required"));
843
+ const o = this._logger.create("exchangeRefreshToken");
844
+ t || o.throw(new Error("A client_id is required")), n.refresh_token || o.throw(new Error("A refresh_token is required"));
845
845
  const c = new URLSearchParams({ grant_type: e });
846
- for (const [g, _] of Object.entries(o))
846
+ for (const [g, _] of Object.entries(n))
847
847
  Array.isArray(_) ? _.forEach((S) => c.append(g, S)) : _ != null && c.set(g, _);
848
848
  let l;
849
849
  switch (this._settings.client_authentication) {
850
850
  case "client_secret_basic":
851
851
  if (!s)
852
- throw n.throw(new Error("A client_secret is required")), null;
852
+ throw o.throw(new Error("A client_secret is required")), null;
853
853
  l = C.generateBasicAuth(t, s);
854
854
  break;
855
855
  case "client_secret_post":
@@ -857,9 +857,9 @@ var C = Ze, W = class {
857
857
  break;
858
858
  }
859
859
  const d = await this._metadataService.getTokenEndpoint(!1);
860
- n.debug("got token endpoint");
860
+ o.debug("got token endpoint");
861
861
  const h = await this._jsonService.postForm(d, { body: c, basicAuth: l, timeoutInSeconds: i, initCredentials: this._settings.fetchRequestCredentials, extraHeaders: r });
862
- return n.debug("got response"), h;
862
+ return o.debug("got response"), h;
863
863
  }
864
864
  /**
865
865
  * Revoke an access or refresh token.
@@ -873,13 +873,13 @@ var C = Ze, W = class {
873
873
  const i = await this._metadataService.getRevocationEndpoint(!1);
874
874
  s.debug(`got revocation endpoint, revoking ${(t = e.token_type_hint) != null ? t : "default token type"}`);
875
875
  const r = new URLSearchParams();
876
- for (const [o, n] of Object.entries(e))
877
- n != null && r.set(o, n);
876
+ for (const [n, o] of Object.entries(e))
877
+ o != null && r.set(n, o);
878
878
  r.set("client_id", this._settings.client_id), this._settings.client_secret && r.set("client_secret", this._settings.client_secret), await this._jsonService.postForm(i, { body: r, timeoutInSeconds: this._settings.requestTimeoutInSeconds }), s.debug("got response");
879
879
  }
880
- }, hs = class {
880
+ }, ns = class {
881
881
  constructor(e, t, s) {
882
- this._settings = e, this._metadataService = t, this._claimsService = s, this._logger = new u("ResponseValidator"), this._userInfoService = new ds(this._settings, this._metadataService), this._tokenClient = new st(this._settings, this._metadataService);
882
+ this._settings = e, this._metadataService = t, this._claimsService = s, this._logger = new u("ResponseValidator"), this._userInfoService = new rs(this._settings, this._metadataService), this._tokenClient = new Xe(this._settings, this._metadataService);
883
883
  }
884
884
  async validateSigninResponse(e, t, s) {
885
885
  const i = this._logger.create("validateSigninResponse");
@@ -893,8 +893,8 @@ var C = Ze, W = class {
893
893
  var s, i;
894
894
  const r = this._logger.create("validateRefreshResponse");
895
895
  e.userState = t.data, (s = e.session_state) != null || (e.session_state = t.session_state), (i = e.scope) != null || (e.scope = t.scope), e.isOpenId && e.id_token && (this._validateIdTokenAttributes(e, t.id_token), r.debug("ID Token validated")), e.id_token || (e.id_token = t.id_token, e.profile = t.profile);
896
- const o = e.isOpenId && !!e.id_token;
897
- await this._processClaims(e, !1, o), r.debug("claims processed");
896
+ const n = e.isOpenId && !!e.id_token;
897
+ await this._processClaims(e, !1, n), r.debug("claims processed");
898
898
  }
899
899
  validateSignoutResponse(e, t) {
900
900
  const s = this._logger.create("validateSignoutResponse");
@@ -939,16 +939,16 @@ var C = Ze, W = class {
939
939
  var s;
940
940
  const i = this._logger.create("_validateIdTokenAttributes");
941
941
  i.debug("decoding ID Token JWT");
942
- const r = de.decode((s = e.id_token) != null ? s : "");
942
+ const r = he.decode((s = e.id_token) != null ? s : "");
943
943
  if (r.sub || i.throw(new Error("ID Token is missing a subject claim")), t) {
944
- const o = de.decode(t);
945
- r.sub !== o.sub && i.throw(new Error("sub in id_token does not match current sub")), r.auth_time && r.auth_time !== o.auth_time && i.throw(new Error("auth_time in id_token does not match original auth_time")), r.azp && r.azp !== o.azp && i.throw(new Error("azp in id_token does not match original azp")), !r.azp && o.azp && i.throw(new Error("azp not in id_token, but present in original id_token"));
944
+ const n = he.decode(t);
945
+ r.sub !== n.sub && i.throw(new Error("sub in id_token does not match current sub")), r.auth_time && r.auth_time !== n.auth_time && i.throw(new Error("auth_time in id_token does not match original auth_time")), r.azp && r.azp !== n.azp && i.throw(new Error("azp in id_token does not match original azp")), !r.azp && n.azp && i.throw(new Error("azp not in id_token, but present in original id_token"));
946
946
  }
947
947
  e.profile = r;
948
948
  }
949
- }, he = class Ie {
949
+ }, ge = class ke {
950
950
  constructor(t) {
951
- this.id = t.id || C.generateUUIDv4(), this.data = t.data, t.created && t.created > 0 ? this.created = t.created : this.created = M.getEpochTime(), this.request_type = t.request_type, this.url_state = t.url_state;
951
+ this.id = t.id || C.generateUUIDv4(), this.data = t.data, t.created && t.created > 0 ? this.created = t.created : this.created = F.getEpochTime(), this.request_type = t.request_type, this.url_state = t.url_state;
952
952
  }
953
953
  toStorageString() {
954
954
  return new u("State").create("toStorageString"), JSON.stringify({
@@ -960,17 +960,17 @@ var C = Ze, W = class {
960
960
  });
961
961
  }
962
962
  static fromStorageString(t) {
963
- return u.createStatic("State", "fromStorageString"), Promise.resolve(new Ie(JSON.parse(t)));
963
+ return u.createStatic("State", "fromStorageString"), Promise.resolve(new ke(JSON.parse(t)));
964
964
  }
965
965
  static async clearStaleState(t, s) {
966
- const i = u.createStatic("State", "clearStaleState"), r = M.getEpochTime() - s, o = await t.getAllKeys();
967
- i.debug("got keys", o);
968
- for (let n = 0; n < o.length; n++) {
969
- const c = o[n], l = await t.get(c);
966
+ const i = u.createStatic("State", "clearStaleState"), r = F.getEpochTime() - s, n = await t.getAllKeys();
967
+ i.debug("got keys", n);
968
+ for (let o = 0; o < n.length; o++) {
969
+ const c = n[o], l = await t.get(c);
970
970
  let d = !1;
971
971
  if (l)
972
972
  try {
973
- const h = await Ie.fromStorageString(l);
973
+ const h = await ke.fromStorageString(l);
974
974
  i.debug("got item from key:", c, h.created), h.created <= r && (d = !0);
975
975
  } catch (h) {
976
976
  i.error("Error parsing state for key:", c, h), d = !0;
@@ -980,13 +980,13 @@ var C = Ze, W = class {
980
980
  d && (i.debug("removed item for key:", c), t.remove(c));
981
981
  }
982
982
  }
983
- }, it = class Ee extends he {
983
+ }, Ye = class Te extends ge {
984
984
  constructor(t) {
985
985
  super(t), this.code_verifier = t.code_verifier, this.code_challenge = t.code_challenge, this.authority = t.authority, this.client_id = t.client_id, this.redirect_uri = t.redirect_uri, this.scope = t.scope, this.client_secret = t.client_secret, this.extraTokenParams = t.extraTokenParams, this.response_mode = t.response_mode, this.skipUserInfo = t.skipUserInfo;
986
986
  }
987
987
  static async create(t) {
988
988
  const s = t.code_verifier === !0 ? C.generateCodeVerifier() : t.code_verifier || void 0, i = s ? await C.generateCodeChallenge(s) : void 0;
989
- return new Ee({
989
+ return new Te({
990
990
  ...t,
991
991
  code_verifier: s,
992
992
  code_challenge: i
@@ -1013,9 +1013,9 @@ var C = Ze, W = class {
1013
1013
  static fromStorageString(t) {
1014
1014
  u.createStatic("SigninState", "fromStorageString");
1015
1015
  const s = JSON.parse(t);
1016
- return Ee.create(s);
1016
+ return Te.create(s);
1017
1017
  }
1018
- }, rt = class nt {
1018
+ }, Ze = class et {
1019
1019
  constructor(t) {
1020
1020
  this.url = t.url, this.state = t.state;
1021
1021
  }
@@ -1025,8 +1025,8 @@ var C = Ze, W = class {
1025
1025
  authority: s,
1026
1026
  client_id: i,
1027
1027
  redirect_uri: r,
1028
- response_type: o,
1029
- scope: n,
1028
+ response_type: n,
1029
+ scope: o,
1030
1030
  // optional
1031
1031
  state_data: c,
1032
1032
  response_mode: l,
@@ -1036,12 +1036,12 @@ var C = Ze, W = class {
1036
1036
  url_state: _,
1037
1037
  resource: S,
1038
1038
  skipUserInfo: x,
1039
- extraQueryParams: T,
1039
+ extraQueryParams: k,
1040
1040
  extraTokenParams: A,
1041
1041
  disablePKCE: I,
1042
1042
  dpopJkt: N,
1043
1043
  omitScopeWhenRequesting: P,
1044
- ...L
1044
+ ...M
1045
1045
  }) {
1046
1046
  if (!t)
1047
1047
  throw this._logger.error("create: No url passed"), new Error("url");
@@ -1049,13 +1049,13 @@ var C = Ze, W = class {
1049
1049
  throw this._logger.error("create: No client_id passed"), new Error("client_id");
1050
1050
  if (!r)
1051
1051
  throw this._logger.error("create: No redirect_uri passed"), new Error("redirect_uri");
1052
- if (!o)
1053
- throw this._logger.error("create: No response_type passed"), new Error("response_type");
1054
1052
  if (!n)
1053
+ throw this._logger.error("create: No response_type passed"), new Error("response_type");
1054
+ if (!o)
1055
1055
  throw this._logger.error("create: No scope passed"), new Error("scope");
1056
1056
  if (!s)
1057
1057
  throw this._logger.error("create: No authority passed"), new Error("authority");
1058
- const R = await it.create({
1058
+ const R = await Ye.create({
1059
1059
  data: c,
1060
1060
  request_type: d,
1061
1061
  url_state: _,
@@ -1065,64 +1065,64 @@ var C = Ze, W = class {
1065
1065
  redirect_uri: r,
1066
1066
  response_mode: l,
1067
1067
  client_secret: h,
1068
- scope: n,
1068
+ scope: o,
1069
1069
  extraTokenParams: A,
1070
1070
  skipUserInfo: x
1071
- }), w = new URL(t);
1072
- w.searchParams.append("client_id", i), w.searchParams.append("redirect_uri", r), w.searchParams.append("response_type", o), P || w.searchParams.append("scope", n), g && w.searchParams.append("nonce", g), N && w.searchParams.append("dpop_jkt", N);
1071
+ }), m = new URL(t);
1072
+ m.searchParams.append("client_id", i), m.searchParams.append("redirect_uri", r), m.searchParams.append("response_type", n), P || m.searchParams.append("scope", o), g && m.searchParams.append("nonce", g), N && m.searchParams.append("dpop_jkt", N);
1073
1073
  let E = R.id;
1074
- _ && (E = `${E}${be}${_}`), w.searchParams.append("state", E), R.code_challenge && (w.searchParams.append("code_challenge", R.code_challenge), w.searchParams.append("code_challenge_method", "S256")), S && (Array.isArray(S) ? S : [S]).forEach((b) => w.searchParams.append("resource", b));
1075
- for (const [U, b] of Object.entries({ response_mode: l, ...L, ...T }))
1076
- b != null && w.searchParams.append(U, b.toString());
1077
- return new nt({
1078
- url: w.href,
1074
+ _ && (E = `${E}${Se}${_}`), m.searchParams.append("state", E), R.code_challenge && (m.searchParams.append("code_challenge", R.code_challenge), m.searchParams.append("code_challenge_method", "S256")), S && (Array.isArray(S) ? S : [S]).forEach((y) => m.searchParams.append("resource", y));
1075
+ for (const [U, y] of Object.entries({ response_mode: l, ...M, ...k }))
1076
+ y != null && m.searchParams.append(U, y.toString());
1077
+ return new et({
1078
+ url: m.href,
1079
1079
  state: R
1080
1080
  });
1081
1081
  }
1082
1082
  };
1083
- rt._logger = new u("SigninRequest");
1084
- var gs = rt, us = "openid", me = class {
1083
+ Ze._logger = new u("SigninRequest");
1084
+ var os = Ze, as = "openid", pe = class {
1085
1085
  constructor(e) {
1086
1086
  if (this.access_token = "", this.token_type = "", this.profile = {}, this.state = e.get("state"), this.session_state = e.get("session_state"), this.state) {
1087
- const t = decodeURIComponent(this.state).split(be);
1088
- this.state = t[0], t.length > 1 && (this.url_state = t.slice(1).join(be));
1087
+ const t = decodeURIComponent(this.state).split(Se);
1088
+ this.state = t[0], t.length > 1 && (this.url_state = t.slice(1).join(Se));
1089
1089
  }
1090
1090
  this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri"), this.code = e.get("code");
1091
1091
  }
1092
1092
  get expires_in() {
1093
1093
  if (this.expires_at !== void 0)
1094
- return this.expires_at - M.getEpochTime();
1094
+ return this.expires_at - F.getEpochTime();
1095
1095
  }
1096
1096
  set expires_in(e) {
1097
- typeof e == "string" && (e = Number(e)), e !== void 0 && e >= 0 && (this.expires_at = Math.floor(e) + M.getEpochTime());
1097
+ typeof e == "string" && (e = Number(e)), e !== void 0 && e >= 0 && (this.expires_at = Math.floor(e) + F.getEpochTime());
1098
1098
  }
1099
1099
  get isOpenId() {
1100
1100
  var e;
1101
- return ((e = this.scope) == null ? void 0 : e.split(" ").includes(us)) || !!this.id_token;
1101
+ return ((e = this.scope) == null ? void 0 : e.split(" ").includes(as)) || !!this.id_token;
1102
1102
  }
1103
- }, _s = class {
1103
+ }, cs = class {
1104
1104
  constructor({
1105
1105
  url: e,
1106
1106
  state_data: t,
1107
1107
  id_token_hint: s,
1108
1108
  post_logout_redirect_uri: i,
1109
1109
  extraQueryParams: r,
1110
- request_type: o,
1111
- client_id: n
1110
+ request_type: n,
1111
+ client_id: o
1112
1112
  }) {
1113
1113
  if (this._logger = new u("SignoutRequest"), !e)
1114
1114
  throw this._logger.error("ctor: No url passed"), new Error("url");
1115
1115
  const c = new URL(e);
1116
- s && c.searchParams.append("id_token_hint", s), n && c.searchParams.append("client_id", n), i && (c.searchParams.append("post_logout_redirect_uri", i), t && (this.state = new he({ data: t, request_type: o }), c.searchParams.append("state", this.state.id)));
1116
+ s && c.searchParams.append("id_token_hint", s), o && c.searchParams.append("client_id", o), i && (c.searchParams.append("post_logout_redirect_uri", i), t && (this.state = new ge({ data: t, request_type: n }), c.searchParams.append("state", this.state.id)));
1117
1117
  for (const [l, d] of Object.entries({ ...r }))
1118
1118
  d != null && c.searchParams.append(l, d.toString());
1119
1119
  this.url = c.href;
1120
1120
  }
1121
- }, ps = class {
1121
+ }, ls = class {
1122
1122
  constructor(e) {
1123
1123
  this.state = e.get("state"), this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri");
1124
1124
  }
1125
- }, fs = [
1125
+ }, ds = [
1126
1126
  "nbf",
1127
1127
  "jti",
1128
1128
  "auth_time",
@@ -1132,7 +1132,7 @@ var gs = rt, us = "openid", me = class {
1132
1132
  "azp",
1133
1133
  "at_hash"
1134
1134
  // https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken
1135
- ], ms = ["sub", "iss", "aud", "exp", "iat"], ws = class {
1135
+ ], hs = ["sub", "iss", "aud", "exp", "iat"], gs = class {
1136
1136
  constructor(e) {
1137
1137
  this._settings = e, this._logger = new u("ClaimsService");
1138
1138
  }
@@ -1140,9 +1140,9 @@ var gs = rt, us = "openid", me = class {
1140
1140
  const t = { ...e };
1141
1141
  if (this._settings.filterProtocolClaims) {
1142
1142
  let s;
1143
- Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = fs;
1143
+ Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = ds;
1144
1144
  for (const i of s)
1145
- ms.includes(i) || delete t[i];
1145
+ hs.includes(i) || delete t[i];
1146
1146
  }
1147
1147
  return t;
1148
1148
  }
@@ -1154,21 +1154,21 @@ var gs = rt, us = "openid", me = class {
1154
1154
  if (this._settings.mergeClaimsStrategy.array == "replace")
1155
1155
  s[i] = r;
1156
1156
  else {
1157
- const o = Array.isArray(s[i]) ? s[i] : [s[i]];
1158
- for (const n of Array.isArray(r) ? r : [r])
1159
- o.includes(n) || o.push(n);
1160
- s[i] = o;
1157
+ const n = Array.isArray(s[i]) ? s[i] : [s[i]];
1158
+ for (const o of Array.isArray(r) ? r : [r])
1159
+ n.includes(o) || n.push(o);
1160
+ s[i] = n;
1161
1161
  }
1162
1162
  else typeof s[i] == "object" && typeof r == "object" ? s[i] = this.mergeClaims(s[i], r) : s[i] = r;
1163
1163
  return s;
1164
1164
  }
1165
- }, ot = class {
1165
+ }, tt = class {
1166
1166
  constructor(e, t) {
1167
1167
  this.keys = e, this.nonce = t;
1168
1168
  }
1169
- }, vs = class {
1169
+ }, us = class {
1170
1170
  constructor(e, t) {
1171
- this._logger = new u("OidcClient"), this.settings = e instanceof Te ? e : new Te(e), this.metadataService = t ?? new ns(this.settings), this._claimsService = new ws(this.settings), this._validator = new hs(this.settings, this.metadataService, this._claimsService), this._tokenClient = new st(this.settings, this.metadataService);
1171
+ this._logger = new u("OidcClient"), this.settings = e instanceof be ? e : new be(e), this.metadataService = t ?? new Zt(this.settings), this._claimsService = new gs(this.settings), this._validator = new ns(this.settings, this.metadataService, this._claimsService), this._tokenClient = new Xe(this.settings, this.metadataService);
1172
1172
  }
1173
1173
  async createSigninRequest({
1174
1174
  state: e,
@@ -1176,8 +1176,8 @@ var gs = rt, us = "openid", me = class {
1176
1176
  request_uri: s,
1177
1177
  request_type: i,
1178
1178
  id_token_hint: r,
1179
- login_hint: o,
1180
- skipUserInfo: n,
1179
+ login_hint: n,
1180
+ skipUserInfo: o,
1181
1181
  nonce: c,
1182
1182
  url_state: l,
1183
1183
  response_type: d = this.settings.response_type,
@@ -1186,21 +1186,21 @@ var gs = rt, us = "openid", me = class {
1186
1186
  prompt: _ = this.settings.prompt,
1187
1187
  display: S = this.settings.display,
1188
1188
  max_age: x = this.settings.max_age,
1189
- ui_locales: T = this.settings.ui_locales,
1189
+ ui_locales: k = this.settings.ui_locales,
1190
1190
  acr_values: A = this.settings.acr_values,
1191
1191
  resource: I = this.settings.resource,
1192
1192
  response_mode: N = this.settings.response_mode,
1193
1193
  extraQueryParams: P = this.settings.extraQueryParams,
1194
- extraTokenParams: L = this.settings.extraTokenParams,
1194
+ extraTokenParams: M = this.settings.extraTokenParams,
1195
1195
  dpopJkt: R,
1196
- omitScopeWhenRequesting: w = this.settings.omitScopeWhenRequesting
1196
+ omitScopeWhenRequesting: m = this.settings.omitScopeWhenRequesting
1197
1197
  }) {
1198
1198
  const E = this._logger.create("createSigninRequest");
1199
1199
  if (d !== "code")
1200
1200
  throw new Error("Only the Authorization Code flow (with PKCE) is supported");
1201
1201
  const U = await this.metadataService.getAuthorizationEndpoint();
1202
1202
  E.debug("Received authorization endpoint", U);
1203
- const b = await gs.create({
1203
+ const y = await os.create({
1204
1204
  url: U,
1205
1205
  authority: this.settings.authority,
1206
1206
  client_id: this.settings.client_id,
@@ -1212,57 +1212,57 @@ var gs = rt, us = "openid", me = class {
1212
1212
  prompt: _,
1213
1213
  display: S,
1214
1214
  max_age: x,
1215
- ui_locales: T,
1215
+ ui_locales: k,
1216
1216
  id_token_hint: r,
1217
- login_hint: o,
1217
+ login_hint: n,
1218
1218
  acr_values: A,
1219
1219
  dpopJkt: R,
1220
1220
  resource: I,
1221
1221
  request: t,
1222
1222
  request_uri: s,
1223
1223
  extraQueryParams: P,
1224
- extraTokenParams: L,
1224
+ extraTokenParams: M,
1225
1225
  request_type: i,
1226
1226
  response_mode: N,
1227
1227
  client_secret: this.settings.client_secret,
1228
- skipUserInfo: n,
1228
+ skipUserInfo: o,
1229
1229
  nonce: c,
1230
1230
  disablePKCE: this.settings.disablePKCE,
1231
- omitScopeWhenRequesting: w
1231
+ omitScopeWhenRequesting: m
1232
1232
  });
1233
1233
  await this.clearStaleState();
1234
- const z = b.state;
1235
- return await this.settings.stateStore.set(z.id, z.toStorageString()), b;
1234
+ const z = y.state;
1235
+ return await this.settings.stateStore.set(z.id, z.toStorageString()), y;
1236
1236
  }
1237
1237
  async readSigninResponseState(e, t = !1) {
1238
- const s = this._logger.create("readSigninResponseState"), i = new me(ye.readParams(e, this.settings.response_mode));
1238
+ const s = this._logger.create("readSigninResponseState"), i = new pe(ve.readParams(e, this.settings.response_mode));
1239
1239
  if (!i.state)
1240
1240
  throw s.throw(new Error("No state in response")), null;
1241
1241
  const r = await this.settings.stateStore[t ? "remove" : "get"](i.state);
1242
1242
  if (!r)
1243
1243
  throw s.throw(new Error("No matching state found in storage")), null;
1244
- return { state: await it.fromStorageString(r), response: i };
1244
+ return { state: await Ye.fromStorageString(r), response: i };
1245
1245
  }
1246
1246
  async processSigninResponse(e, t) {
1247
1247
  const s = this._logger.create("processSigninResponse"), { state: i, response: r } = await this.readSigninResponseState(e, !0);
1248
1248
  if (s.debug("received state from storage; validating response"), this.settings.dpop && this.settings.dpop.store) {
1249
- const o = await this.getDpopProof(this.settings.dpop.store);
1250
- t = { ...t, DPoP: o };
1249
+ const n = await this.getDpopProof(this.settings.dpop.store);
1250
+ t = { ...t, DPoP: n };
1251
1251
  }
1252
1252
  try {
1253
1253
  await this._validator.validateSigninResponse(r, i, t);
1254
- } catch (o) {
1255
- if (o instanceof ke && this.settings.dpop) {
1256
- const n = await this.getDpopProof(this.settings.dpop.store, o.nonce);
1257
- t.DPoP = n, await this._validator.validateSigninResponse(r, i, t);
1254
+ } catch (n) {
1255
+ if (n instanceof ye && this.settings.dpop) {
1256
+ const o = await this.getDpopProof(this.settings.dpop.store, n.nonce);
1257
+ t.DPoP = o, await this._validator.validateSigninResponse(r, i, t);
1258
1258
  } else
1259
- throw o;
1259
+ throw n;
1260
1260
  }
1261
1261
  return r;
1262
1262
  }
1263
1263
  async getDpopProof(e, t) {
1264
1264
  let s, i;
1265
- return (await e.getAllKeys()).includes(this.settings.client_id) ? (i = await e.get(this.settings.client_id), i.nonce !== t && t && (i.nonce = t, await e.set(this.settings.client_id, i))) : (s = await C.generateDPoPKeys(), i = new ot(s, t), await e.set(this.settings.client_id, i)), await C.generateDPoPProof({
1265
+ return (await e.getAllKeys()).includes(this.settings.client_id) ? (i = await e.get(this.settings.client_id), i.nonce !== t && t && (i.nonce = t, await e.set(this.settings.client_id, i))) : (s = await C.generateDPoPKeys(), i = new tt(s, t), await e.set(this.settings.client_id, i)), await C.generateDPoPProof({
1266
1266
  url: await this.metadataService.getTokenEndpoint(!1),
1267
1267
  httpMethod: "POST",
1268
1268
  keyPair: i.keys,
@@ -1275,8 +1275,8 @@ var gs = rt, us = "openid", me = class {
1275
1275
  skipUserInfo: s = !1,
1276
1276
  extraTokenParams: i = {}
1277
1277
  }) {
1278
- const r = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...i }), o = new me(new URLSearchParams());
1279
- return Object.assign(o, r), await this._validator.validateCredentialsResponse(o, s), o;
1278
+ const r = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...i }), n = new pe(new URLSearchParams());
1279
+ return Object.assign(n, r), await this._validator.validateCredentialsResponse(n, s), n;
1280
1280
  }
1281
1281
  async useRefreshToken({
1282
1282
  state: e,
@@ -1284,16 +1284,16 @@ var gs = rt, us = "openid", me = class {
1284
1284
  resource: s,
1285
1285
  timeoutInSeconds: i,
1286
1286
  extraHeaders: r,
1287
- extraTokenParams: o
1287
+ extraTokenParams: n
1288
1288
  }) {
1289
- var n;
1289
+ var o;
1290
1290
  const c = this._logger.create("useRefreshToken");
1291
1291
  let l;
1292
1292
  if (this.settings.refreshTokenAllowedScope === void 0)
1293
1293
  l = e.scope;
1294
1294
  else {
1295
1295
  const g = this.settings.refreshTokenAllowedScope.split(" ");
1296
- l = (((n = e.scope) == null ? void 0 : n.split(" ")) || []).filter((S) => g.includes(S)).join(" ");
1296
+ l = (((o = e.scope) == null ? void 0 : o.split(" ")) || []).filter((S) => g.includes(S)).join(" ");
1297
1297
  }
1298
1298
  if (this.settings.dpop && this.settings.dpop.store) {
1299
1299
  const g = await this.getDpopProof(this.settings.dpop.store);
@@ -1309,10 +1309,10 @@ var gs = rt, us = "openid", me = class {
1309
1309
  resource: s,
1310
1310
  timeoutInSeconds: i,
1311
1311
  extraHeaders: r,
1312
- ...o
1312
+ ...n
1313
1313
  });
1314
1314
  } catch (g) {
1315
- if (g instanceof ke && this.settings.dpop)
1315
+ if (g instanceof ye && this.settings.dpop)
1316
1316
  r.DPoP = await this.getDpopProof(this.settings.dpop.store, g.nonce), d = await this._tokenClient.exchangeRefreshToken({
1317
1317
  refresh_token: e.refresh_token,
1318
1318
  // provide the (possible filtered) scope list
@@ -1321,12 +1321,12 @@ var gs = rt, us = "openid", me = class {
1321
1321
  resource: s,
1322
1322
  timeoutInSeconds: i,
1323
1323
  extraHeaders: r,
1324
- ...o
1324
+ ...n
1325
1325
  });
1326
1326
  else
1327
1327
  throw g;
1328
1328
  }
1329
- const h = new me(new URLSearchParams());
1329
+ const h = new pe(new URLSearchParams());
1330
1330
  return Object.assign(h, d), c.debug("validating response", h), await this._validator.validateRefreshResponse(h, {
1331
1331
  ...e,
1332
1332
  // override the scope in the state handed over to the validator
@@ -1340,27 +1340,27 @@ var gs = rt, us = "openid", me = class {
1340
1340
  client_id: s,
1341
1341
  request_type: i,
1342
1342
  post_logout_redirect_uri: r = this.settings.post_logout_redirect_uri,
1343
- extraQueryParams: o = this.settings.extraQueryParams
1343
+ extraQueryParams: n = this.settings.extraQueryParams
1344
1344
  } = {}) {
1345
- const n = this._logger.create("createSignoutRequest"), c = await this.metadataService.getEndSessionEndpoint();
1345
+ const o = this._logger.create("createSignoutRequest"), c = await this.metadataService.getEndSessionEndpoint();
1346
1346
  if (!c)
1347
- throw n.throw(new Error("No end session endpoint")), null;
1348
- n.debug("Received end session endpoint", c), !s && r && !t && (s = this.settings.client_id);
1349
- const l = new _s({
1347
+ throw o.throw(new Error("No end session endpoint")), null;
1348
+ o.debug("Received end session endpoint", c), !s && r && !t && (s = this.settings.client_id);
1349
+ const l = new cs({
1350
1350
  url: c,
1351
1351
  id_token_hint: t,
1352
1352
  client_id: s,
1353
1353
  post_logout_redirect_uri: r,
1354
1354
  state_data: e,
1355
- extraQueryParams: o,
1355
+ extraQueryParams: n,
1356
1356
  request_type: i
1357
1357
  });
1358
1358
  await this.clearStaleState();
1359
1359
  const d = l.state;
1360
- return d && (n.debug("Signout request has state to persist"), await this.settings.stateStore.set(d.id, d.toStorageString())), l;
1360
+ return d && (o.debug("Signout request has state to persist"), await this.settings.stateStore.set(d.id, d.toStorageString())), l;
1361
1361
  }
1362
1362
  async readSignoutResponseState(e, t = !1) {
1363
- const s = this._logger.create("readSignoutResponseState"), i = new ps(ye.readParams(e, this.settings.response_mode));
1363
+ const s = this._logger.create("readSignoutResponseState"), i = new ls(ve.readParams(e, this.settings.response_mode));
1364
1364
  if (!i.state) {
1365
1365
  if (s.debug("No state in response"), i.error)
1366
1366
  throw s.warn("Response was error:", i.error), new B(i);
@@ -1369,14 +1369,14 @@ var gs = rt, us = "openid", me = class {
1369
1369
  const r = await this.settings.stateStore[t ? "remove" : "get"](i.state);
1370
1370
  if (!r)
1371
1371
  throw s.throw(new Error("No matching state found in storage")), null;
1372
- return { state: await he.fromStorageString(r), response: i };
1372
+ return { state: await ge.fromStorageString(r), response: i };
1373
1373
  }
1374
1374
  async processSignoutResponse(e) {
1375
1375
  const t = this._logger.create("processSignoutResponse"), { state: s, response: i } = await this.readSignoutResponseState(e, !0);
1376
1376
  return s ? (t.debug("Received state from storage; validating response"), this._validator.validateSignoutResponse(i, s)) : t.debug("No state from storage; skipping response validation"), i;
1377
1377
  }
1378
1378
  clearStaleState() {
1379
- return this._logger.create("clearStaleState"), he.clearStaleState(this.settings.stateStore, this.settings.staleStateAgeInSeconds);
1379
+ return this._logger.create("clearStaleState"), ge.clearStaleState(this.settings.stateStore, this.settings.staleStateAgeInSeconds);
1380
1380
  }
1381
1381
  async revokeToken(e, t) {
1382
1382
  return this._logger.create("revokeToken"), await this._tokenClient.revoke({
@@ -1384,7 +1384,7 @@ var gs = rt, us = "openid", me = class {
1384
1384
  token_type_hint: t
1385
1385
  });
1386
1386
  }
1387
- }, Ss = class {
1387
+ }, _s = class {
1388
1388
  constructor(e) {
1389
1389
  this._userManager = e, this._logger = new u("SessionMonitor"), this._start = async (t) => {
1390
1390
  const s = t.session_state;
@@ -1399,7 +1399,7 @@ var gs = rt, us = "openid", me = class {
1399
1399
  const r = await this._userManager.metadataService.getCheckSessionIframe();
1400
1400
  if (r) {
1401
1401
  i.debug("initializing check session iframe");
1402
- const o = this._userManager.settings.client_id, n = this._userManager.settings.checkSessionIntervalInSeconds, c = this._userManager.settings.stopCheckSessionOnError, l = new rs(this._callback, o, r, n, c);
1402
+ const n = this._userManager.settings.client_id, o = this._userManager.settings.checkSessionIntervalInSeconds, c = this._userManager.settings.stopCheckSessionOnError, l = new Yt(this._callback, n, r, o, c);
1403
1403
  await l.load(), this._checkSessionIFrame = l, l.start(s);
1404
1404
  } else
1405
1405
  i.warn("no check session iframe found in the metadata");
@@ -1458,7 +1458,7 @@ var gs = rt, us = "openid", me = class {
1458
1458
  }
1459
1459
  }
1460
1460
  }
1461
- }, we = class at {
1461
+ }, fe = class st {
1462
1462
  constructor(t) {
1463
1463
  var s;
1464
1464
  this.id_token = t.id_token, this.session_state = (s = t.session_state) != null ? s : null, this.access_token = t.access_token, this.refresh_token = t.refresh_token, this.token_type = t.token_type, this.scope = t.scope, this.profile = t.profile, this.expires_at = t.expires_at, this.state = t.userState, this.url_state = t.url_state;
@@ -1466,10 +1466,10 @@ var gs = rt, us = "openid", me = class {
1466
1466
  /** Computed number of seconds the access token has remaining. */
1467
1467
  get expires_in() {
1468
1468
  if (this.expires_at !== void 0)
1469
- return this.expires_at - M.getEpochTime();
1469
+ return this.expires_at - F.getEpochTime();
1470
1470
  }
1471
1471
  set expires_in(t) {
1472
- t !== void 0 && (this.expires_at = Math.floor(t) + M.getEpochTime());
1472
+ t !== void 0 && (this.expires_at = Math.floor(t) + F.getEpochTime());
1473
1473
  }
1474
1474
  /** Computed value indicating if the access token is expired. */
1475
1475
  get expired() {
@@ -1495,9 +1495,9 @@ var gs = rt, us = "openid", me = class {
1495
1495
  });
1496
1496
  }
1497
1497
  static fromStorageString(t) {
1498
- return u.createStatic("User", "fromStorageString"), new at(JSON.parse(t));
1498
+ return u.createStatic("User", "fromStorageString"), new st(JSON.parse(t));
1499
1499
  }
1500
- }, Je = "oidc-client", ct = class {
1500
+ }, Me = "oidc-client", it = class {
1501
1501
  constructor() {
1502
1502
  this._abort = new W("Window navigation aborted"), this._disposeHandlers = /* @__PURE__ */ new Set(), this._window = null;
1503
1503
  }
@@ -1506,23 +1506,23 @@ var gs = rt, us = "openid", me = class {
1506
1506
  if (!this._window)
1507
1507
  throw new Error("Attempted to navigate on a disposed window");
1508
1508
  t.debug("setting URL in window"), this._window.location.replace(e.url);
1509
- const { url: s, keepOpen: i } = await new Promise((r, o) => {
1510
- const n = (c) => {
1509
+ const { url: s, keepOpen: i } = await new Promise((r, n) => {
1510
+ const o = (c) => {
1511
1511
  var l;
1512
1512
  const d = c.data, h = (l = e.scriptOrigin) != null ? l : window.location.origin;
1513
- if (!(c.origin !== h || (d == null ? void 0 : d.source) !== Je)) {
1513
+ if (!(c.origin !== h || (d == null ? void 0 : d.source) !== Me)) {
1514
1514
  try {
1515
- const g = ye.readParams(d.url, e.response_mode).get("state");
1515
+ const g = ve.readParams(d.url, e.response_mode).get("state");
1516
1516
  if (g || t.warn("no state found in response url"), c.source !== this._window && g !== e.state)
1517
1517
  return;
1518
1518
  } catch {
1519
- this._dispose(), o(new Error("Invalid response from window"));
1519
+ this._dispose(), n(new Error("Invalid response from window"));
1520
1520
  }
1521
1521
  r(d);
1522
1522
  }
1523
1523
  };
1524
- window.addEventListener("message", n, !1), this._disposeHandlers.add(() => window.removeEventListener("message", n, !1)), this._disposeHandlers.add(this._abort.addHandler((c) => {
1525
- this._dispose(), o(c);
1524
+ window.addEventListener("message", o, !1), this._disposeHandlers.add(() => window.removeEventListener("message", o, !1)), this._disposeHandlers.add(this._abort.addHandler((c) => {
1525
+ this._dispose(), n(c);
1526
1526
  }));
1527
1527
  });
1528
1528
  return t.debug("got response from window"), this._dispose(), i || this.close(), { url: s };
@@ -1535,25 +1535,25 @@ var gs = rt, us = "openid", me = class {
1535
1535
  }
1536
1536
  static _notifyParent(e, t, s = !1, i = window.location.origin) {
1537
1537
  e.postMessage({
1538
- source: Je,
1538
+ source: Me,
1539
1539
  url: t,
1540
1540
  keepOpen: s
1541
1541
  }, i);
1542
1542
  }
1543
- }, lt = {
1543
+ }, rt = {
1544
1544
  location: !1,
1545
1545
  toolbar: !1,
1546
1546
  height: 640,
1547
1547
  closePopupWindowAfterInSeconds: -1
1548
- }, dt = "_blank", ys = 60, bs = 2, ht = 10, ks = class extends Te {
1548
+ }, nt = "_blank", ps = 60, fs = 2, ot = 10, ms = class extends be {
1549
1549
  constructor(e) {
1550
1550
  const {
1551
1551
  popup_redirect_uri: t = e.redirect_uri,
1552
1552
  popup_post_logout_redirect_uri: s = e.post_logout_redirect_uri,
1553
- popupWindowFeatures: i = lt,
1554
- popupWindowTarget: r = dt,
1555
- redirectMethod: o = "assign",
1556
- redirectTarget: n = "self",
1553
+ popupWindowFeatures: i = rt,
1554
+ popupWindowTarget: r = nt,
1555
+ redirectMethod: n = "assign",
1556
+ redirectTarget: o = "self",
1557
1557
  iframeNotifyParentOrigin: c = e.iframeNotifyParentOrigin,
1558
1558
  iframeScriptOrigin: l = e.iframeScriptOrigin,
1559
1559
  requestTimeoutInSeconds: d,
@@ -1562,29 +1562,29 @@ var gs = rt, us = "openid", me = class {
1562
1562
  automaticSilentRenew: _ = !0,
1563
1563
  validateSubOnSilentRenew: S = !0,
1564
1564
  includeIdTokenInSilentRenew: x = !1,
1565
- monitorSession: T = !1,
1565
+ monitorSession: k = !1,
1566
1566
  monitorAnonymousSession: A = !1,
1567
- checkSessionIntervalInSeconds: I = bs,
1567
+ checkSessionIntervalInSeconds: I = fs,
1568
1568
  query_status_response_type: N = "code",
1569
1569
  stopCheckSessionOnError: P = !0,
1570
- revokeTokenTypes: L = ["access_token", "refresh_token"],
1570
+ revokeTokenTypes: M = ["access_token", "refresh_token"],
1571
1571
  revokeTokensOnSignout: R = !1,
1572
- includeIdTokenInSilentSignout: w = !1,
1573
- accessTokenExpiringNotificationTimeInSeconds: E = ys,
1572
+ includeIdTokenInSilentSignout: m = !1,
1573
+ accessTokenExpiringNotificationTimeInSeconds: E = ps,
1574
1574
  userStore: U
1575
1575
  } = e;
1576
- if (super(e), this.popup_redirect_uri = t, this.popup_post_logout_redirect_uri = s, this.popupWindowFeatures = i, this.popupWindowTarget = r, this.redirectMethod = o, this.redirectTarget = n, this.iframeNotifyParentOrigin = c, this.iframeScriptOrigin = l, this.silent_redirect_uri = h, this.silentRequestTimeoutInSeconds = g || d || ht, this.automaticSilentRenew = _, this.validateSubOnSilentRenew = S, this.includeIdTokenInSilentRenew = x, this.monitorSession = T, this.monitorAnonymousSession = A, this.checkSessionIntervalInSeconds = I, this.stopCheckSessionOnError = P, this.query_status_response_type = N, this.revokeTokenTypes = L, this.revokeTokensOnSignout = R, this.includeIdTokenInSilentSignout = w, this.accessTokenExpiringNotificationTimeInSeconds = E, U)
1576
+ if (super(e), this.popup_redirect_uri = t, this.popup_post_logout_redirect_uri = s, this.popupWindowFeatures = i, this.popupWindowTarget = r, this.redirectMethod = n, this.redirectTarget = o, this.iframeNotifyParentOrigin = c, this.iframeScriptOrigin = l, this.silent_redirect_uri = h, this.silentRequestTimeoutInSeconds = g || d || ot, this.automaticSilentRenew = _, this.validateSubOnSilentRenew = S, this.includeIdTokenInSilentRenew = x, this.monitorSession = k, this.monitorAnonymousSession = A, this.checkSessionIntervalInSeconds = I, this.stopCheckSessionOnError = P, this.query_status_response_type = N, this.revokeTokenTypes = M, this.revokeTokensOnSignout = R, this.includeIdTokenInSilentSignout = m, this.accessTokenExpiringNotificationTimeInSeconds = E, U)
1577
1577
  this.userStore = U;
1578
1578
  else {
1579
- const b = typeof window < "u" ? window.sessionStorage : new et();
1580
- this.userStore = new tt({ store: b });
1579
+ const y = typeof window < "u" ? window.sessionStorage : new Ge();
1580
+ this.userStore = new Qe({ store: y });
1581
1581
  }
1582
1582
  }
1583
- }, Ke = class gt extends ct {
1583
+ }, Fe = class at extends it {
1584
1584
  constructor({
1585
- silentRequestTimeoutInSeconds: t = ht
1585
+ silentRequestTimeoutInSeconds: t = ot
1586
1586
  }) {
1587
- super(), this._logger = new u("IFrameWindow"), this._timeoutInSeconds = t, this._frame = gt.createHiddenIframe(), this._window = this._frame.contentWindow;
1587
+ super(), this._logger = new u("IFrameWindow"), this._timeoutInSeconds = t, this._frame = at.createHiddenIframe(), this._window = this._frame.contentWindow;
1588
1588
  }
1589
1589
  static createHiddenIframe() {
1590
1590
  const t = window.document.createElement("iframe");
@@ -1592,7 +1592,7 @@ var gs = rt, us = "openid", me = class {
1592
1592
  }
1593
1593
  async navigate(t) {
1594
1594
  this._logger.debug("navigate: Using timeout of:", this._timeoutInSeconds);
1595
- const s = setTimeout(() => void this._abort.raise(new qe("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
1595
+ const s = setTimeout(() => void this._abort.raise(new Ae("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
1596
1596
  return this._disposeHandlers.add(() => clearTimeout(s)), await super.navigate(t);
1597
1597
  }
1598
1598
  close() {
@@ -1606,27 +1606,27 @@ var gs = rt, us = "openid", me = class {
1606
1606
  static notifyParent(t, s) {
1607
1607
  return super._notifyParent(window.parent, t, !1, s);
1608
1608
  }
1609
- }, Ts = class {
1609
+ }, ws = class {
1610
1610
  constructor(e) {
1611
1611
  this._settings = e, this._logger = new u("IFrameNavigator");
1612
1612
  }
1613
1613
  async prepare({
1614
1614
  silentRequestTimeoutInSeconds: e = this._settings.silentRequestTimeoutInSeconds
1615
1615
  }) {
1616
- return new Ke({ silentRequestTimeoutInSeconds: e });
1616
+ return new Fe({ silentRequestTimeoutInSeconds: e });
1617
1617
  }
1618
1618
  async callback(e) {
1619
- this._logger.create("callback"), Ke.notifyParent(e, this._settings.iframeNotifyParentOrigin);
1619
+ this._logger.create("callback"), Fe.notifyParent(e, this._settings.iframeNotifyParentOrigin);
1620
1620
  }
1621
- }, Is = 500, Es = 1e3, Be = class extends ct {
1621
+ }, vs = 500, Ss = 1e3, We = class extends it {
1622
1622
  constructor({
1623
- popupWindowTarget: e = dt,
1623
+ popupWindowTarget: e = nt,
1624
1624
  popupWindowFeatures: t = {},
1625
1625
  popupSignal: s
1626
1626
  }) {
1627
1627
  super(), this._logger = new u("PopupWindow");
1628
- const i = We.center({ ...lt, ...t });
1629
- this._window = window.open(void 0, e, We.serialize(i)), s && s.addEventListener("abort", () => {
1628
+ const i = $e.center({ ...rt, ...t });
1629
+ this._window = window.open(void 0, e, $e.serialize(i)), s && s.addEventListener("abort", () => {
1630
1630
  var r;
1631
1631
  this._abort.raise(new Error((r = s.reason) != null ? r : "Popup aborted"));
1632
1632
  }), t.closePopupWindowAfterInSeconds && t.closePopupWindowAfterInSeconds > 0 && setTimeout(() => {
@@ -1635,14 +1635,14 @@ var gs = rt, us = "openid", me = class {
1635
1635
  return;
1636
1636
  }
1637
1637
  this.close();
1638
- }, t.closePopupWindowAfterInSeconds * Es);
1638
+ }, t.closePopupWindowAfterInSeconds * Ss);
1639
1639
  }
1640
1640
  async navigate(e) {
1641
1641
  var t;
1642
1642
  (t = this._window) == null || t.focus();
1643
1643
  const s = setInterval(() => {
1644
1644
  (!this._window || this._window.closed) && this._abort.raise(new Error("Popup closed by user"));
1645
- }, Is);
1645
+ }, vs);
1646
1646
  return this._disposeHandlers.add(() => clearInterval(s)), await super.navigate(e);
1647
1647
  }
1648
1648
  close() {
@@ -1653,7 +1653,7 @@ var gs = rt, us = "openid", me = class {
1653
1653
  throw new Error("No window.opener. Can't complete notification.");
1654
1654
  return super._notifyParent(window.opener, e, t);
1655
1655
  }
1656
- }, Cs = class {
1656
+ }, ys = class {
1657
1657
  constructor(e) {
1658
1658
  this._settings = e, this._logger = new u("PopupNavigator");
1659
1659
  }
@@ -1662,12 +1662,12 @@ var gs = rt, us = "openid", me = class {
1662
1662
  popupWindowTarget: t = this._settings.popupWindowTarget,
1663
1663
  popupSignal: s
1664
1664
  }) {
1665
- return new Be({ popupWindowFeatures: e, popupWindowTarget: t, popupSignal: s });
1665
+ return new We({ popupWindowFeatures: e, popupWindowTarget: t, popupSignal: s });
1666
1666
  }
1667
1667
  async callback(e, { keepOpen: t = !1 }) {
1668
- this._logger.create("callback"), Be.notifyOpener(e, t);
1668
+ this._logger.create("callback"), We.notifyOpener(e, t);
1669
1669
  }
1670
- }, Ps = class {
1670
+ }, bs = class {
1671
1671
  constructor(e) {
1672
1672
  this._settings = e, this._logger = new u("RedirectNavigator");
1673
1673
  }
@@ -1680,23 +1680,23 @@ var gs = rt, us = "openid", me = class {
1680
1680
  let i = window.self;
1681
1681
  t === "top" && (i = (s = window.top) != null ? s : window.self);
1682
1682
  const r = i.location[e].bind(i.location);
1683
- let o;
1683
+ let n;
1684
1684
  return {
1685
- navigate: async (n) => {
1685
+ navigate: async (o) => {
1686
1686
  this._logger.create("navigate");
1687
1687
  const c = new Promise((l, d) => {
1688
- o = d;
1688
+ n = d;
1689
1689
  });
1690
- return r(n.url), await c;
1690
+ return r(o.url), await c;
1691
1691
  },
1692
1692
  close: () => {
1693
- this._logger.create("close"), o == null || o(new Error("Redirect aborted")), i.stop();
1693
+ this._logger.create("close"), n == null || n(new Error("Redirect aborted")), i.stop();
1694
1694
  }
1695
1695
  };
1696
1696
  }
1697
1697
  async callback() {
1698
1698
  }
1699
- }, Rs = class extends is {
1699
+ }, ks = class extends Xt {
1700
1700
  constructor(e) {
1701
1701
  super({ expiringNotificationTimeInSeconds: e.accessTokenExpiringNotificationTimeInSeconds }), this._logger = new u("UserManagerEvents"), this._userLoaded = new W("User loaded"), this._userUnloaded = new W("User unloaded"), this._silentRenewError = new W("Silent renew error"), this._userSignedIn = new W("User signed in"), this._userSignedOut = new W("User signed out"), this._userSessionChanged = new W("User session changed");
1702
1702
  }
@@ -1805,14 +1805,14 @@ var gs = rt, us = "openid", me = class {
1805
1805
  async _raiseUserSessionChanged() {
1806
1806
  await this._userSessionChanged.raise();
1807
1807
  }
1808
- }, Us = class {
1808
+ }, Ts = class {
1809
1809
  constructor(e) {
1810
- this._userManager = e, this._logger = new u("SilentRenewService"), this._isStarted = !1, this._retryTimer = new M("Retry Silent Renew"), this._tokenExpiring = async () => {
1810
+ this._userManager = e, this._logger = new u("SilentRenewService"), this._isStarted = !1, this._retryTimer = new F("Retry Silent Renew"), this._tokenExpiring = async () => {
1811
1811
  const t = this._logger.create("_tokenExpiring");
1812
1812
  try {
1813
1813
  await this._userManager.signinSilent(), t.debug("silent token renewal successful");
1814
1814
  } catch (s) {
1815
- if (s instanceof qe) {
1815
+ if (s instanceof Ae) {
1816
1816
  t.warn("ErrorTimeout from signinSilent:", s, "retry in 5s"), this._retryTimer.init(5);
1817
1817
  return;
1818
1818
  }
@@ -1834,13 +1834,13 @@ var gs = rt, us = "openid", me = class {
1834
1834
  stop() {
1835
1835
  this._isStarted && (this._retryTimer.cancel(), this._retryTimer.removeHandler(this._tokenExpiring), this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring), this._isStarted = !1);
1836
1836
  }
1837
- }, xs = class {
1837
+ }, Is = class {
1838
1838
  constructor(e) {
1839
1839
  this.refresh_token = e.refresh_token, this.id_token = e.id_token, this.session_state = e.session_state, this.scope = e.scope, this.profile = e.profile, this.data = e.state;
1840
1840
  }
1841
- }, As = class {
1841
+ }, Es = class {
1842
1842
  constructor(e, t, s, i) {
1843
- this._logger = new u("UserManager"), this.settings = new ks(e), this._client = new vs(e), this._redirectNavigator = t ?? new Ps(this.settings), this._popupNavigator = s ?? new Cs(this.settings), this._iframeNavigator = i ?? new Ts(this.settings), this._events = new Rs(this.settings), this._silentRenewService = new Us(this), this.settings.automaticSilentRenew && this.startSilentRenew(), this._sessionMonitor = null, this.settings.monitorSession && (this._sessionMonitor = new Ss(this));
1843
+ this._logger = new u("UserManager"), this.settings = new ms(e), this._client = new us(e), this._redirectNavigator = t ?? new bs(this.settings), this._popupNavigator = s ?? new ys(this.settings), this._iframeNavigator = i ?? new ws(this.settings), this._events = new ks(this.settings), this._silentRenewService = new Ts(this), this.settings.automaticSilentRenew && this.startSilentRenew(), this._sessionMonitor = null, this.settings.monitorSession && (this._sessionMonitor = new _s(this));
1844
1844
  }
1845
1845
  /**
1846
1846
  * Get object used to register for events raised by the `UserManager`.
@@ -1888,12 +1888,12 @@ var gs = rt, us = "openid", me = class {
1888
1888
  } = e;
1889
1889
  let r;
1890
1890
  (t = this.settings.dpop) != null && t.bind_authorization_code && (r = await this.generateDPoPJkt(this.settings.dpop));
1891
- const o = await this._redirectNavigator.prepare({ redirectMethod: s });
1891
+ const n = await this._redirectNavigator.prepare({ redirectMethod: s });
1892
1892
  await this._signinStart({
1893
1893
  request_type: "si:r",
1894
1894
  dpopJkt: r,
1895
1895
  ...i
1896
- }, o);
1896
+ }, n);
1897
1897
  }
1898
1898
  /**
1899
1899
  * Process the response (callback) from the authorization endpoint.
@@ -1925,8 +1925,8 @@ var gs = rt, us = "openid", me = class {
1925
1925
  extraTokenParams: this.settings.extraTokenParams
1926
1926
  });
1927
1927
  i.debug("got signin response");
1928
- const o = await this._buildUser(r);
1929
- return o.profile && o.profile.sub ? i.info("success, signed in subject", o.profile.sub) : i.info("no subject"), o;
1928
+ const n = await this._buildUser(r);
1929
+ return n.profile && n.profile.sub ? i.info("success, signed in subject", n.profile.sub) : i.info("no subject"), n;
1930
1930
  }
1931
1931
  /**
1932
1932
  * Trigger a request (via a popup window) to the authorization endpoint.
@@ -1941,12 +1941,12 @@ var gs = rt, us = "openid", me = class {
1941
1941
  (t = this.settings.dpop) != null && t.bind_authorization_code && (i = await this.generateDPoPJkt(this.settings.dpop));
1942
1942
  const {
1943
1943
  popupWindowFeatures: r,
1944
- popupWindowTarget: o,
1945
- popupSignal: n,
1944
+ popupWindowTarget: n,
1945
+ popupSignal: o,
1946
1946
  ...c
1947
1947
  } = e, l = this.settings.popup_redirect_uri;
1948
1948
  l || s.throw(new Error("No popup_redirect_uri configured"));
1949
- const d = await this._popupNavigator.prepare({ popupWindowFeatures: r, popupWindowTarget: o, popupSignal: n }), h = await this._signin({
1949
+ const d = await this._popupNavigator.prepare({ popupWindowFeatures: r, popupWindowTarget: n, popupSignal: o }), h = await this._signin({
1950
1950
  request_type: "si:p",
1951
1951
  redirect_uri: l,
1952
1952
  display: "popup",
@@ -1976,17 +1976,17 @@ var gs = rt, us = "openid", me = class {
1976
1976
  var t, s;
1977
1977
  const i = this._logger.create("signinSilent"), {
1978
1978
  silentRequestTimeoutInSeconds: r,
1979
- ...o
1979
+ ...n
1980
1980
  } = e;
1981
- let n = await this._loadUser();
1982
- if (n != null && n.refresh_token) {
1981
+ let o = await this._loadUser();
1982
+ if (o != null && o.refresh_token) {
1983
1983
  i.debug("using refresh token");
1984
- const g = new xs(n);
1984
+ const g = new Is(o);
1985
1985
  return await this._useRefreshToken({
1986
1986
  state: g,
1987
- redirect_uri: o.redirect_uri,
1988
- resource: o.resource,
1989
- extraTokenParams: o.extraTokenParams,
1987
+ redirect_uri: n.redirect_uri,
1988
+ resource: n.resource,
1989
+ extraTokenParams: n.extraTokenParams,
1990
1990
  timeoutInSeconds: r
1991
1991
  });
1992
1992
  }
@@ -1995,22 +1995,22 @@ var gs = rt, us = "openid", me = class {
1995
1995
  const l = this.settings.silent_redirect_uri;
1996
1996
  l || i.throw(new Error("No silent_redirect_uri configured"));
1997
1997
  let d;
1998
- n && this.settings.validateSubOnSilentRenew && (i.debug("subject prior to silent renew:", n.profile.sub), d = n.profile.sub);
1998
+ o && this.settings.validateSubOnSilentRenew && (i.debug("subject prior to silent renew:", o.profile.sub), d = o.profile.sub);
1999
1999
  const h = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: r });
2000
- return n = await this._signin({
2000
+ return o = await this._signin({
2001
2001
  request_type: "si:s",
2002
2002
  redirect_uri: l,
2003
2003
  prompt: "none",
2004
- id_token_hint: this.settings.includeIdTokenInSilentRenew ? n == null ? void 0 : n.id_token : void 0,
2004
+ id_token_hint: this.settings.includeIdTokenInSilentRenew ? o == null ? void 0 : o.id_token : void 0,
2005
2005
  dpopJkt: c,
2006
- ...o
2007
- }, h, d), n && ((s = n.profile) != null && s.sub ? i.info("success, signed in subject", n.profile.sub) : i.info("no subject")), n;
2006
+ ...n
2007
+ }, h, d), o && ((s = o.profile) != null && s.sub ? i.info("success, signed in subject", o.profile.sub) : i.info("no subject")), o;
2008
2008
  }
2009
2009
  async _useRefreshToken(e) {
2010
2010
  const t = await this._client.useRefreshToken({
2011
2011
  timeoutInSeconds: this.settings.silentRequestTimeoutInSeconds,
2012
2012
  ...e
2013
- }), s = new we({ ...e.state, ...t });
2013
+ }), s = new fe({ ...e.state, ...t });
2014
2014
  return await this.storeUser(s), await this._events.load(s), s;
2015
2015
  }
2016
2016
  /**
@@ -2086,17 +2086,17 @@ var gs = rt, us = "openid", me = class {
2086
2086
  ...i
2087
2087
  } = e, r = this.settings.silent_redirect_uri;
2088
2088
  r || t.throw(new Error("No silent_redirect_uri configured"));
2089
- const o = await this._loadUser(), n = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: s }), c = await this._signinStart({
2089
+ const n = await this._loadUser(), o = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: s }), c = await this._signinStart({
2090
2090
  request_type: "si:s",
2091
2091
  // this acts like a signin silent
2092
2092
  redirect_uri: r,
2093
2093
  prompt: "none",
2094
- id_token_hint: this.settings.includeIdTokenInSilentRenew ? o == null ? void 0 : o.id_token : void 0,
2094
+ id_token_hint: this.settings.includeIdTokenInSilentRenew ? n == null ? void 0 : n.id_token : void 0,
2095
2095
  response_type: this.settings.query_status_response_type,
2096
2096
  scope: "openid",
2097
2097
  skipUserInfo: !0,
2098
2098
  ...i
2099
- }, n);
2099
+ }, o);
2100
2100
  try {
2101
2101
  const l = {}, d = await this._client.processSigninResponse(c.url, l);
2102
2102
  return t.debug("got signin response"), d.session_state && d.profile.sub ? (t.info("success for subject", d.profile.sub), {
@@ -2141,7 +2141,7 @@ var gs = rt, us = "openid", me = class {
2141
2141
  return s.debug("got signin response"), await this._buildUser(r, t);
2142
2142
  }
2143
2143
  async _buildUser(e, t) {
2144
- const s = this._logger.create("_buildUser"), i = new we(e);
2144
+ const s = this._logger.create("_buildUser"), i = new fe(e);
2145
2145
  if (t) {
2146
2146
  if (t !== i.profile.sub)
2147
2147
  throw s.debug("current user does not match user returned from signin. sub from signin:", i.profile.sub), new B({ ...e, error: "login_required" });
@@ -2187,18 +2187,18 @@ var gs = rt, us = "openid", me = class {
2187
2187
  popupWindowFeatures: s,
2188
2188
  popupWindowTarget: i,
2189
2189
  popupSignal: r,
2190
- ...o
2191
- } = e, n = this.settings.popup_post_logout_redirect_uri, c = await this._popupNavigator.prepare({ popupWindowFeatures: s, popupWindowTarget: i, popupSignal: r });
2190
+ ...n
2191
+ } = e, o = this.settings.popup_post_logout_redirect_uri, c = await this._popupNavigator.prepare({ popupWindowFeatures: s, popupWindowTarget: i, popupSignal: r });
2192
2192
  await this._signout({
2193
2193
  request_type: "so:p",
2194
- post_logout_redirect_uri: n,
2194
+ post_logout_redirect_uri: o,
2195
2195
  // we're putting a dummy entry in here because we
2196
2196
  // need a unique id from the state for notification
2197
2197
  // to the parent window, which is necessary if we
2198
2198
  // plan to return back to the client after signout
2199
2199
  // and so we can close the popup after signout
2200
- state: n == null ? void 0 : {},
2201
- ...o
2200
+ state: o == null ? void 0 : {},
2201
+ ...n
2202
2202
  }, c), t.info("success");
2203
2203
  }
2204
2204
  /**
@@ -2223,12 +2223,12 @@ var gs = rt, us = "openid", me = class {
2223
2223
  try {
2224
2224
  const r = await this._loadUser();
2225
2225
  i.debug("loaded current user from storage"), this.settings.revokeTokensOnSignout && await this._revokeInternal(r);
2226
- const o = e.id_token_hint || r && r.id_token;
2227
- o && (i.debug("setting id_token_hint in signout request"), e.id_token_hint = o), await this.removeUser(), i.debug("user removed, creating signout request");
2228
- const n = await this._client.createSignoutRequest(e);
2226
+ const n = e.id_token_hint || r && r.id_token;
2227
+ n && (i.debug("setting id_token_hint in signout request"), e.id_token_hint = n), await this.removeUser(), i.debug("user removed, creating signout request");
2228
+ const o = await this._client.createSignoutRequest(e);
2229
2229
  return i.debug("got signout request"), await t.navigate({
2230
- url: n.url,
2231
- state: (s = n.state) == null ? void 0 : s.id,
2230
+ url: o.url,
2231
+ state: (s = o.state) == null ? void 0 : s.id,
2232
2232
  scriptOrigin: this.settings.iframeScriptOrigin
2233
2233
  });
2234
2234
  } catch (r) {
@@ -2249,11 +2249,11 @@ var gs = rt, us = "openid", me = class {
2249
2249
  const s = this._logger.create("signoutSilent"), {
2250
2250
  silentRequestTimeoutInSeconds: i,
2251
2251
  ...r
2252
- } = e, o = this.settings.includeIdTokenInSilentSignout ? (t = await this._loadUser()) == null ? void 0 : t.id_token : void 0, n = this.settings.popup_post_logout_redirect_uri, c = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: i });
2252
+ } = e, n = this.settings.includeIdTokenInSilentSignout ? (t = await this._loadUser()) == null ? void 0 : t.id_token : void 0, o = this.settings.popup_post_logout_redirect_uri, c = await this._iframeNavigator.prepare({ silentRequestTimeoutInSeconds: i });
2253
2253
  await this._signout({
2254
2254
  request_type: "so:s",
2255
- post_logout_redirect_uri: n,
2256
- id_token_hint: o,
2255
+ post_logout_redirect_uri: o,
2256
+ id_token_hint: n,
2257
2257
  ...r
2258
2258
  }, c), s.info("success");
2259
2259
  }
@@ -2306,7 +2306,7 @@ var gs = rt, us = "openid", me = class {
2306
2306
  }
2307
2307
  async _loadUser() {
2308
2308
  const e = this._logger.create("_loadUser"), t = await this.settings.userStore.get(this._userStoreKey);
2309
- return t ? (e.debug("user storageString loaded"), we.fromStorageString(t)) : (e.debug("no user storageString"), null);
2309
+ return t ? (e.debug("user storageString loaded"), fe.fromStorageString(t)) : (e.debug("no user storageString"), null);
2310
2310
  }
2311
2311
  async storeUser(e) {
2312
2312
  const t = this._logger.create("storeUser");
@@ -2335,14 +2335,14 @@ var gs = rt, us = "openid", me = class {
2335
2335
  * @returns A promise containing the DPoP proof or undefined if DPoP is not enabled/no user is found.
2336
2336
  */
2337
2337
  async dpopProof(e, t, s, i) {
2338
- var r, o;
2339
- const n = await ((o = (r = this.settings.dpop) == null ? void 0 : r.store) == null ? void 0 : o.get(this.settings.client_id));
2340
- if (n)
2338
+ var r, n;
2339
+ const o = await ((n = (r = this.settings.dpop) == null ? void 0 : r.store) == null ? void 0 : n.get(this.settings.client_id));
2340
+ if (o)
2341
2341
  return await C.generateDPoPProof({
2342
2342
  url: e,
2343
2343
  accessToken: t == null ? void 0 : t.access_token,
2344
2344
  httpMethod: s,
2345
- keyPair: n.keys,
2345
+ keyPair: o.keys,
2346
2346
  nonce: i
2347
2347
  });
2348
2348
  }
@@ -2350,30 +2350,30 @@ var gs = rt, us = "openid", me = class {
2350
2350
  let t = await e.store.get(this.settings.client_id);
2351
2351
  if (!t) {
2352
2352
  const s = await C.generateDPoPKeys();
2353
- t = new ot(s), await e.store.set(this.settings.client_id, t);
2353
+ t = new tt(s), await e.store.set(this.settings.client_id, t);
2354
2354
  }
2355
2355
  return await C.generateDPoPJkt(t.keys);
2356
2356
  }
2357
2357
  };
2358
- const Os = ["url", "clientId", "redirectUri", "scope", "logoutUrl"], Ns = "openid profile email";
2359
- function qs(e, t) {
2358
+ const Cs = ["url", "clientId", "redirectUri", "scope", "logoutUrl"], Ps = "openid profile email";
2359
+ function Rs(e, t) {
2360
2360
  const s = {};
2361
2361
  return e.forEach((i) => {
2362
2362
  t[i] !== void 0 && (s[i] = t[i]);
2363
2363
  }), s;
2364
2364
  }
2365
2365
  let p, V;
2366
- const Ds = (e) => (V = qs(Os, e), new As({
2366
+ const Us = (e) => (V = Rs(Cs, e), new Es({
2367
2367
  authority: V.url,
2368
2368
  client_id: V.clientId,
2369
2369
  redirect_uri: V.redirectUri,
2370
2370
  response_type: "code",
2371
- scope: V.scope || Ns,
2371
+ scope: V.scope || Ps,
2372
2372
  filterProtocolClaims: !0,
2373
2373
  includeIdTokenInSilentRenew: !0,
2374
2374
  includeIdTokenInSilentSignout: !0,
2375
2375
  loadUserInfo: !0
2376
- })), js = async () => {
2376
+ })), xs = async () => {
2377
2377
  try {
2378
2378
  console.debug("[Auth] Logging in using OIDC");
2379
2379
  const e = new URL(window.location.href), t = await (p == null ? void 0 : p.getUser());
@@ -2385,51 +2385,51 @@ const Ds = (e) => (V = qs(Os, e), new As({
2385
2385
  } catch (e) {
2386
2386
  console.error("[Auth] Error logging in using OIDC: ", e);
2387
2387
  }
2388
- }, Fs = async () => p == null ? void 0 : p.removeUser().then(() => p == null ? void 0 : p.signoutRedirect({
2388
+ }, As = async () => p == null ? void 0 : p.removeUser().then(() => p == null ? void 0 : p.signoutRedirect({
2389
2389
  post_logout_redirect_uri: V.logoutUrl || window.location.href
2390
- })), $s = async () => await (p == null ? void 0 : p.getUser()) != null, Hs = async () => {
2390
+ })), Os = async () => await (p == null ? void 0 : p.getUser()) != null, Ns = async () => {
2391
2391
  const e = await (p == null ? void 0 : p.getUser());
2392
2392
  return Promise.resolve(e == null ? void 0 : e.id_token);
2393
- }, Ls = async () => {
2393
+ }, qs = async () => {
2394
2394
  const e = await (p == null ? void 0 : p.getUser());
2395
2395
  return Promise.resolve(e == null ? void 0 : e.profile.preferred_username);
2396
2396
  };
2397
2397
  let G, Z;
2398
- const Ms = async (e, t) => {
2398
+ const Ds = async (e, t) => {
2399
2399
  try {
2400
2400
  console.debug("[Auth] Setting Username and Password for BasicAuth"), G = e, Z = t;
2401
2401
  } catch (s) {
2402
2402
  console.error("[Auth] Error logging in using BasicAuth: ", s);
2403
2403
  }
2404
- }, Ws = async () => {
2404
+ }, Ls = async () => {
2405
2405
  console.debug("[Auth] Logout for BasicAuth"), G = void 0, Z = void 0, window.location.reload();
2406
- }, Js = async () => G !== void 0 && Z !== void 0, Ks = async () => Promise.resolve(G), Bs = () => {
2406
+ }, js = async () => G !== void 0 && Z !== void 0, Hs = async () => Promise.resolve(G), $s = () => {
2407
2407
  if (G !== void 0 && Z != null)
2408
2408
  return {
2409
2409
  username: G,
2410
2410
  password: Z
2411
2411
  };
2412
- }, ut = () => {
2413
- const e = wt(Xt);
2414
- return e.type === "oidc" ? (p === void 0 && (console.debug("[Auth] Creating OIDC UserManager with options: ", e.options), p = Ds(e.options)), {
2412
+ }, ct = () => {
2413
+ const e = ut(Kt);
2414
+ return e.type === "oidc" ? (p === void 0 && (console.debug("[Auth] Creating OIDC UserManager with options: ", e.options), p = Us(e.options)), {
2415
2415
  isOidcAuthEnabled: () => !0,
2416
2416
  isBasicAuthEnabled: () => !1,
2417
- isAuthenticated: $s,
2418
- getToken: Hs,
2417
+ isAuthenticated: Os,
2418
+ getToken: Ns,
2419
2419
  getUsernameAndPassword: () => {
2420
2420
  },
2421
- getUsername: Ls,
2422
- login: js,
2423
- logout: Fs
2421
+ getUsername: qs,
2422
+ login: xs,
2423
+ logout: As
2424
2424
  }) : e.type === "basic" ? {
2425
2425
  isOidcAuthEnabled: () => !1,
2426
2426
  isBasicAuthEnabled: () => !0,
2427
- isAuthenticated: Js,
2427
+ isAuthenticated: js,
2428
2428
  getToken: () => Promise.resolve(void 0),
2429
- getUsernameAndPassword: Bs,
2430
- getUsername: Ks,
2431
- login: Ms,
2432
- logout: Ws
2429
+ getUsernameAndPassword: $s,
2430
+ getUsername: Hs,
2431
+ login: Ds,
2432
+ logout: Ls
2433
2433
  } : {
2434
2434
  isOidcAuthEnabled: () => !1,
2435
2435
  isBasicAuthEnabled: () => !1,
@@ -2441,60 +2441,65 @@ const Ms = async (e, t) => {
2441
2441
  login: () => Promise.resolve(),
2442
2442
  logout: () => Promise.resolve()
2443
2443
  };
2444
- }, Ce = (e) => {
2445
- const [t, s] = y(null), i = e.format || "locale";
2446
- return Re(() => {
2447
- let r;
2448
- if (e.date && typeof e.date == "string" ? r = fe.fromISO(e.date) : e.date && typeof e.date == "object" && (r = fe.fromJSDate(e.date)), r) {
2449
- const o = {
2444
+ }, Ie = (e) => {
2445
+ const [t, s] = T(""), [i, r] = T(""), n = e.format || "locale";
2446
+ _t(() => {
2447
+ n === "fromNow" && o();
2448
+ }, 5e3);
2449
+ const o = () => {
2450
+ let c;
2451
+ if (e.date && typeof e.date == "string" ? c = se.fromISO(e.date) : e.date && typeof e.date == "object" && (c = se.fromJSDate(e.date)), c) {
2452
+ const l = {
2450
2453
  locale: e.locale
2451
2454
  };
2452
- s(i === "fromNow" ? r.toRelative() : i === "locale" ? r.toLocaleString(fe.DATETIME_FULL, o) : r.toFormat(i, o));
2453
- } else
2454
- s(null);
2455
- }, [e.date]), /* @__PURE__ */ a("span", { children: t || "" });
2456
- }, oi = (e) => /* @__PURE__ */ a(Ce, { date: e.date, format: "fromNow" }), O = ({ condition: e, children: t }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ a(H.Fragment, { children: t }) : /* @__PURE__ */ a(H.Fragment, {}), ai = ({ collection: e, emptyState: t, emptyStateTitle: s, emptyStateMessage: i, children: r }) => {
2457
- const o = () => !e || e.length === 0, n = t || /* @__PURE__ */ m(re, { variant: vt.xs, children: [
2458
- /* @__PURE__ */ a(ne, { titleText: s || "None found", headingLevel: "h4" }),
2459
- /* @__PURE__ */ a(ve, { children: i || "No items found." })
2455
+ s(n === "fromNow" ? c.toRelative() || "" : n === "locale" ? c.toLocaleString(se.DATETIME_FULL, l) : c.toFormat(n, l)), r(c.toLocaleString(se.DATETIME_FULL, l));
2456
+ }
2457
+ };
2458
+ return Ce(() => {
2459
+ o();
2460
+ }, [e.date]), n === "fromNow" ? /* @__PURE__ */ a(pt, { content: /* @__PURE__ */ a("span", { children: i }), children: /* @__PURE__ */ a("span", { children: t }) }) : /* @__PURE__ */ a("span", { children: t });
2461
+ }, Ys = (e) => /* @__PURE__ */ a(Ie, { date: e.date, format: "fromNow" }), O = ({ condition: e, children: t }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ a($.Fragment, { children: t }) : /* @__PURE__ */ a($.Fragment, {}), Zs = ({ collection: e, emptyState: t, emptyStateTitle: s, emptyStateMessage: i, children: r }) => {
2462
+ const n = () => !e || e.length === 0, o = t || /* @__PURE__ */ v(ne, { variant: ft.xs, children: [
2463
+ /* @__PURE__ */ a(oe, { titleText: s || "None found", headingLevel: "h4" }),
2464
+ /* @__PURE__ */ a(me, { children: i || "No items found." })
2460
2465
  ] });
2461
- return o() ? /* @__PURE__ */ a(H.Fragment, { children: n }) : /* @__PURE__ */ a(H.Fragment, { children: r });
2462
- }, ge = ({ isLoading: e, loadingComponent: t, children: s }) => {
2466
+ return n() ? /* @__PURE__ */ a($.Fragment, { children: o }) : /* @__PURE__ */ a($.Fragment, { children: r });
2467
+ }, ue = ({ isLoading: e, loadingComponent: t, children: s }) => {
2463
2468
  const i = () => typeof e == "boolean" ? e : e(), r = t || /* @__PURE__ */ a(ee, {});
2464
- return i() ? /* @__PURE__ */ a(H.Fragment, { children: r }) : /* @__PURE__ */ a(H.Fragment, { children: s });
2465
- }, ci = ({ toolbar: e, alwaysShowToolbar: t, emptyState: s, filteredEmptyState: i, isLoading: r, isError: o, loadingComponent: n, errorComponent: c, isEmpty: l, isFiltered: d, children: h }) => {
2466
- const g = t || !l || d || o;
2467
- return c || (c = /* @__PURE__ */ a("div", { style: { padding: "15px", backgroundColor: "white" }, children: /* @__PURE__ */ a(St, { isInline: !0, variant: "danger", title: "Error: Something went wrong!", children: /* @__PURE__ */ a("p", { children: "Something went wrong with the action you attempted, but we're not sure what it was. Try reloading the page and hopef for a better result, or contact your admin to report the error." }) }) })), /* @__PURE__ */ m(H.Fragment, { children: [
2469
+ return i() ? /* @__PURE__ */ a($.Fragment, { children: r }) : /* @__PURE__ */ a($.Fragment, { children: s });
2470
+ }, ei = ({ toolbar: e, alwaysShowToolbar: t, emptyState: s, filteredEmptyState: i, isLoading: r, isError: n, loadingComponent: o, errorComponent: c, isEmpty: l, isFiltered: d, children: h }) => {
2471
+ const g = t || !l || d || n;
2472
+ return c || (c = /* @__PURE__ */ a("div", { style: { padding: "15px", backgroundColor: "white" }, children: /* @__PURE__ */ a(mt, { isInline: !0, variant: "danger", title: "Error: Something went wrong!", children: /* @__PURE__ */ a("p", { children: "Something went wrong with the action you attempted, but we're not sure what it was. Try reloading the page and hopef for a better result, or contact your admin to report the error." }) }) })), /* @__PURE__ */ v($.Fragment, { children: [
2468
2473
  /* @__PURE__ */ a(O, { condition: g, children: e }),
2469
- /* @__PURE__ */ m(ge, { isLoading: r, loadingComponent: n, children: [
2470
- /* @__PURE__ */ a(O, { condition: !l && !o, children: h }),
2471
- /* @__PURE__ */ a(O, { condition: l && d && !o, children: i }),
2472
- /* @__PURE__ */ a(O, { condition: l && !d && !o, children: s }),
2473
- /* @__PURE__ */ a(O, { condition: o, children: c })
2474
+ /* @__PURE__ */ v(ue, { isLoading: r, loadingComponent: o, children: [
2475
+ /* @__PURE__ */ a(O, { condition: !l && !n, children: h }),
2476
+ /* @__PURE__ */ a(O, { condition: l && d && !n, children: i }),
2477
+ /* @__PURE__ */ a(O, { condition: l && !d && !n, children: s }),
2478
+ /* @__PURE__ */ a(O, { condition: n, children: c })
2474
2479
  ] })
2475
2480
  ] });
2476
- }, li = (e) => {
2477
- const [t, s] = y(!1), i = (l, d) => {
2481
+ }, ti = (e) => {
2482
+ const [t, s] = T(!1), i = (l, d) => {
2478
2483
  s(!1);
2479
2484
  const h = d;
2480
2485
  h !== void 0 && h >= 0 ? e.onSelect(e.items[h]) : e.onSelect(void 0);
2481
2486
  }, r = () => {
2482
2487
  s(!t);
2483
- }, o = (l) => {
2488
+ }, n = (l) => {
2484
2489
  let d;
2485
2490
  return e.itemToTestId !== void 0 && (d = e.itemToTestId(l)), d;
2486
- }, n = e.popperProps || {
2491
+ }, o = e.popperProps || {
2487
2492
  appendTo: e.menuAppendTo
2488
2493
  };
2489
- let c = /* @__PURE__ */ a(Ht, { title: e.label });
2490
- return e.isKebab || (c = /* @__PURE__ */ a(H.Fragment, { children: e.label })), /* @__PURE__ */ a(
2491
- yt,
2494
+ let c = /* @__PURE__ */ a(Nt, { title: e.label });
2495
+ return e.isKebab || (c = /* @__PURE__ */ a($.Fragment, { children: e.label })), /* @__PURE__ */ a(
2496
+ wt,
2492
2497
  {
2493
2498
  isOpen: t,
2494
2499
  onSelect: i,
2495
2500
  onOpenChange: (l) => s(l),
2496
2501
  toggle: (l) => /* @__PURE__ */ a(
2497
- _e,
2502
+ Je,
2498
2503
  {
2499
2504
  "data-testid": e.testId,
2500
2505
  ref: l,
@@ -2505,31 +2510,31 @@ const Ms = async (e, t) => {
2505
2510
  }
2506
2511
  ),
2507
2512
  ouiaId: "ObjectDropdown",
2508
- popperProps: n,
2513
+ popperProps: o,
2509
2514
  shouldFocusToggleOnSelect: !0,
2510
- children: /* @__PURE__ */ a(bt, { children: e.items.map((l, d) => e.itemIsVisible !== void 0 && !e.itemIsVisible(l) ? /* @__PURE__ */ a(ue, {}) : e.itemIsDivider && e.itemIsDivider(l) ? /* @__PURE__ */ a(Ve, { component: "li" }, `divider-${d}`) : /* @__PURE__ */ a(
2511
- kt,
2515
+ children: /* @__PURE__ */ a(vt, { children: e.items.map((l, d) => e.itemIsVisible !== void 0 && !e.itemIsVisible(l) ? /* @__PURE__ */ a(Re, {}) : e.itemIsDivider && e.itemIsDivider(l) ? /* @__PURE__ */ a(Ke, { component: "li" }, `divider-${d}`) : /* @__PURE__ */ a(
2516
+ St,
2512
2517
  {
2513
2518
  value: d,
2514
2519
  isDisabled: e.itemIsDisabled === void 0 ? !1 : e.itemIsDisabled(l),
2515
- component: (h) => /* @__PURE__ */ a("button", { ...h, "data-testid": o(l) }),
2520
+ component: (h) => /* @__PURE__ */ a("button", { ...h, "data-testid": n(l) }),
2516
2521
  children: e.itemToString(l)
2517
2522
  },
2518
2523
  `action-${d}`
2519
2524
  )) })
2520
2525
  }
2521
2526
  );
2522
- }, zs = (e) => {
2527
+ }, Ms = (e) => {
2523
2528
  var l;
2524
- const [t, s] = y(!1), i = (d, h) => {
2529
+ const [t, s] = T(!1), i = (d, h) => {
2525
2530
  s(!1), e.onSelect(e.items[h]);
2526
2531
  }, r = () => {
2527
2532
  s(!t);
2528
- }, o = (d) => {
2533
+ }, n = (d) => {
2529
2534
  let h;
2530
2535
  return e.itemToTestId !== void 0 && (h = e.itemToTestId(d)), h;
2531
- }, n = (d) => /* @__PURE__ */ a(
2532
- _e,
2536
+ }, o = (d) => /* @__PURE__ */ a(
2537
+ Je,
2533
2538
  {
2534
2539
  ref: d,
2535
2540
  className: e.toggleClassname || "menu-toggle",
@@ -2542,19 +2547,19 @@ const Ms = async (e, t) => {
2542
2547
  appendTo: e.appendTo === "document" ? () => document.body : "inline"
2543
2548
  };
2544
2549
  return /* @__PURE__ */ a(
2545
- xe,
2550
+ yt,
2546
2551
  {
2547
- toggle: n,
2552
+ toggle: o,
2548
2553
  id: e.toggleId,
2549
2554
  onSelect: i,
2550
2555
  onOpenChange: s,
2551
2556
  isOpen: t,
2552
2557
  popperProps: c,
2553
- children: (l = e.items) == null ? void 0 : l.map((d, h) => e.itemIsDivider && e.itemIsDivider(d) ? /* @__PURE__ */ a(Ve, {}, h) : /* @__PURE__ */ a(
2554
- Ae,
2558
+ children: (l = e.items) == null ? void 0 : l.map((d, h) => e.itemIsDivider && e.itemIsDivider(d) ? /* @__PURE__ */ a(Ke, {}, h) : /* @__PURE__ */ a(
2559
+ bt,
2555
2560
  {
2556
2561
  isSelected: d === e.value,
2557
- component: (g) => /* @__PURE__ */ a("button", { ...g, "data-testid": o(d) }),
2562
+ component: (g) => /* @__PURE__ */ a("button", { ...g, "data-testid": n(d) }),
2558
2563
  value: h,
2559
2564
  children: e.itemToString(d)
2560
2565
  },
@@ -2562,36 +2567,36 @@ const Ms = async (e, t) => {
2562
2567
  ))
2563
2568
  }
2564
2569
  );
2565
- }, di = ({ expanded: e, onClick: t }) => e ? /* @__PURE__ */ a(Lt, { onClick: t, style: { cursor: "pointer" } }) : /* @__PURE__ */ a(Mt, { onClick: t, style: { cursor: "pointer" } }), _t = {
2570
+ }, si = ({ expanded: e, onClick: t }) => e ? /* @__PURE__ */ a(qt, { onClick: t, style: { cursor: "pointer" } }) : /* @__PURE__ */ a(Dt, { onClick: t, style: { cursor: "pointer" } }), lt = {
2566
2571
  padding: "5px",
2567
2572
  minHeight: "128px",
2568
2573
  borderRight: 0,
2569
2574
  borderLeft: 0,
2570
2575
  borderBottom: "1px solid #666",
2571
2576
  backgroundColor: "rgb(240, 240, 240)"
2572
- }, Vs = {
2573
- ..._t,
2577
+ }, Fs = {
2578
+ ...lt,
2574
2579
  color: "red",
2575
2580
  overflow: "auto"
2576
- }, hi = (e) => {
2577
- const [t, s] = y(""), [i, r] = y(""), [o, n] = y(!1), [c, l] = y(), d = (T, A) => {
2581
+ }, ii = (e) => {
2582
+ const [t, s] = T(""), [i, r] = T(""), [n, o] = T(!1), [c, l] = T(), d = (k, A) => {
2578
2583
  s(A);
2579
2584
  }, h = () => t != null && t.trim().length > 0, g = () => c != null && c.trim().length > 0, _ = () => {
2580
- n(!0), e.onUrlFetch(t).then((T) => {
2581
- l(void 0), r(T), n(!1), e.onChange(T, t);
2582
- }).catch((T) => {
2583
- l(T.message), n(!1);
2585
+ o(!0), e.onUrlFetch(t).then((k) => {
2586
+ l(void 0), r(k), o(!1), e.onChange(k, t);
2587
+ }).catch((k) => {
2588
+ l(k.message), o(!1);
2584
2589
  });
2585
2590
  }, S = () => {
2586
2591
  s(""), r(""), e.onChange(void 0, void 0);
2587
- }, x = /* @__PURE__ */ m("div", { className: "url-upload-loading", style: _t, children: [
2592
+ }, x = /* @__PURE__ */ v("div", { className: "url-upload-loading", style: lt, children: [
2588
2593
  /* @__PURE__ */ a(ee, { size: "md", className: "spinner", style: { marginRight: "5px" } }),
2589
2594
  /* @__PURE__ */ a("span", { className: "spinner-message", children: "Loading URL content" })
2590
2595
  ] });
2591
- return /* @__PURE__ */ m("div", { className: "url-upload", "data-testid": e.testId, children: [
2592
- /* @__PURE__ */ m("div", { className: "url-upload-flex", style: { display: "flex" }, children: [
2596
+ return /* @__PURE__ */ v("div", { className: "url-upload", "data-testid": e.testId, children: [
2597
+ /* @__PURE__ */ v("div", { className: "url-upload-flex", style: { display: "flex" }, children: [
2593
2598
  /* @__PURE__ */ a("div", { className: "url-upload-url", style: { flexGrow: 1 }, children: /* @__PURE__ */ a(
2594
- oe,
2599
+ ae,
2595
2600
  {
2596
2601
  "data-testid": `${e.testId}-input`,
2597
2602
  value: t,
@@ -2602,16 +2607,16 @@ const Ms = async (e, t) => {
2602
2607
  "aria-label": "url input"
2603
2608
  }
2604
2609
  ) }),
2605
- /* @__PURE__ */ a("div", { className: "url-fetch-button", children: /* @__PURE__ */ a(ae, { "data-testid": `${e.testId}-fetch`, variant: "control", isDisabled: !h(), onClick: _, children: "Fetch" }) }),
2606
- /* @__PURE__ */ a("div", { className: "url-clear-button", children: /* @__PURE__ */ a(ae, { "data-testid": `${e.testId}-clear`, variant: "control", isDisabled: !h(), onClick: S, children: "Clear" }) })
2610
+ /* @__PURE__ */ a("div", { className: "url-fetch-button", children: /* @__PURE__ */ a(ce, { "data-testid": `${e.testId}-fetch`, variant: "control", isDisabled: !h(), onClick: _, children: "Fetch" }) }),
2611
+ /* @__PURE__ */ a("div", { className: "url-clear-button", children: /* @__PURE__ */ a(ce, { "data-testid": `${e.testId}-clear`, variant: "control", isDisabled: !h(), onClick: S, children: "Clear" }) })
2607
2612
  ] }),
2608
- /* @__PURE__ */ a("div", { className: "url-upload-preview", children: /* @__PURE__ */ m(ge, { isLoading: o, loadingComponent: x, children: [
2609
- /* @__PURE__ */ a(O, { condition: g, children: /* @__PURE__ */ m("div", { className: "url-upload-error", style: Vs, children: [
2613
+ /* @__PURE__ */ a("div", { className: "url-upload-preview", children: /* @__PURE__ */ v(ue, { isLoading: n, loadingComponent: x, children: [
2614
+ /* @__PURE__ */ a(O, { condition: g, children: /* @__PURE__ */ v("div", { className: "url-upload-error", style: Fs, children: [
2610
2615
  /* @__PURE__ */ a("div", { children: "Error getting content from URL." }),
2611
2616
  /* @__PURE__ */ a("div", { children: c })
2612
2617
  ] }) }),
2613
2618
  /* @__PURE__ */ a(O, { condition: !g(), children: /* @__PURE__ */ a(
2614
- Tt,
2619
+ kt,
2615
2620
  {
2616
2621
  "data-testid": `${e.testId}-preview`,
2617
2622
  "aria-label": "url-content",
@@ -2622,12 +2627,12 @@ const Ms = async (e, t) => {
2622
2627
  ) })
2623
2628
  ] }) })
2624
2629
  ] });
2625
- }, gi = (e) => {
2626
- const [t, s] = y(), [i, r] = y();
2627
- return Re(() => {
2630
+ }, ri = (e) => {
2631
+ const [t, s] = T(), [i, r] = T();
2632
+ return Ce(() => {
2628
2633
  e.isOpen && (typeof e.frontendInfo == "function" ? e.frontendInfo().then(s) : s(e.frontendInfo), typeof e.backendInfo == "function" ? e.backendInfo().then(r) : r(e.backendInfo));
2629
2634
  }, [e.isOpen]), /* @__PURE__ */ a(
2630
- It,
2635
+ Tt,
2631
2636
  {
2632
2637
  className: "app-about-modal",
2633
2638
  isOpen: e.isOpen,
@@ -2636,51 +2641,51 @@ const Ms = async (e, t) => {
2636
2641
  brandImageSrc: e.brandImageSrc,
2637
2642
  brandImageAlt: e.brandImageAlt,
2638
2643
  "aria-label": e.brandImageAlt,
2639
- children: /* @__PURE__ */ m(Et, { className: "app-about-modal-content", style: { marginTop: "-25px" }, children: [
2640
- /* @__PURE__ */ a($e, { component: He.h2, children: "Web console info" }),
2641
- /* @__PURE__ */ a(ge, { isLoading: t === void 0, children: /* @__PURE__ */ m(Le, { component: "dl", children: [
2642
- /* @__PURE__ */ a(k, { component: "dt", children: "Project" }),
2643
- /* @__PURE__ */ a(k, { component: "dd", children: /* @__PURE__ */ a("a", { href: t == null ? void 0 : t.url, target: "_blank", children: t == null ? void 0 : t.name }) }),
2644
- /* @__PURE__ */ a(k, { component: "dt", children: "Version" }),
2645
- /* @__PURE__ */ a(k, { component: "dd", children: t == null ? void 0 : t.version }),
2646
- /* @__PURE__ */ a(k, { component: "dt", children: "Built on" }),
2647
- /* @__PURE__ */ a(k, { component: "dd", children: /* @__PURE__ */ a(Ce, { date: t == null ? void 0 : t.builtOn, format: "locale" }) }),
2648
- /* @__PURE__ */ a(k, { component: "dt", children: "Digest" }),
2649
- /* @__PURE__ */ a(k, { component: "dd", children: t == null ? void 0 : t.digest })
2644
+ children: /* @__PURE__ */ v(It, { className: "app-about-modal-content", style: { marginTop: "-25px" }, children: [
2645
+ /* @__PURE__ */ a(De, { component: Le.h2, children: "Web console info" }),
2646
+ /* @__PURE__ */ a(ue, { isLoading: t === void 0, children: /* @__PURE__ */ v(je, { component: "dl", children: [
2647
+ /* @__PURE__ */ a(b, { component: "dt", children: "Project" }),
2648
+ /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a("a", { href: t == null ? void 0 : t.url, target: "_blank", children: t == null ? void 0 : t.name }) }),
2649
+ /* @__PURE__ */ a(b, { component: "dt", children: "Version" }),
2650
+ /* @__PURE__ */ a(b, { component: "dd", children: t == null ? void 0 : t.version }),
2651
+ /* @__PURE__ */ a(b, { component: "dt", children: "Built on" }),
2652
+ /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a(Ie, { date: t == null ? void 0 : t.builtOn, format: "locale" }) }),
2653
+ /* @__PURE__ */ a(b, { component: "dt", children: "Digest" }),
2654
+ /* @__PURE__ */ a(b, { component: "dd", children: t == null ? void 0 : t.digest })
2650
2655
  ] }) }),
2651
- /* @__PURE__ */ a($e, { style: { marginTop: "40px" }, component: He.h2, children: e.backendLabel }),
2652
- /* @__PURE__ */ a(ge, { isLoading: i === void 0, children: /* @__PURE__ */ m(Le, { component: "dl", children: [
2653
- /* @__PURE__ */ a(k, { component: "dt", children: "Name" }),
2654
- /* @__PURE__ */ a(k, { component: "dd", children: (i == null ? void 0 : i.name) || "" }),
2655
- /* @__PURE__ */ a(k, { component: "dt", children: "Description" }),
2656
- /* @__PURE__ */ a(k, { component: "dd", children: (i == null ? void 0 : i.description) || "" }),
2657
- /* @__PURE__ */ a(k, { component: "dt", children: "Version" }),
2658
- /* @__PURE__ */ a(k, { component: "dd", children: (i == null ? void 0 : i.version) || "" }),
2659
- /* @__PURE__ */ a(k, { component: "dt", children: "Built on" }),
2660
- /* @__PURE__ */ a(k, { component: "dd", children: /* @__PURE__ */ a(Ce, { date: i == null ? void 0 : i.builtOn, format: "locale" }) })
2656
+ /* @__PURE__ */ a(De, { style: { marginTop: "40px" }, component: Le.h2, children: e.backendLabel }),
2657
+ /* @__PURE__ */ a(ue, { isLoading: i === void 0, children: /* @__PURE__ */ v(je, { component: "dl", children: [
2658
+ /* @__PURE__ */ a(b, { component: "dt", children: "Name" }),
2659
+ /* @__PURE__ */ a(b, { component: "dd", children: (i == null ? void 0 : i.name) || "" }),
2660
+ /* @__PURE__ */ a(b, { component: "dt", children: "Description" }),
2661
+ /* @__PURE__ */ a(b, { component: "dd", children: (i == null ? void 0 : i.description) || "" }),
2662
+ /* @__PURE__ */ a(b, { component: "dt", children: "Version" }),
2663
+ /* @__PURE__ */ a(b, { component: "dd", children: (i == null ? void 0 : i.version) || "" }),
2664
+ /* @__PURE__ */ a(b, { component: "dt", children: "Built on" }),
2665
+ /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a(Ie, { date: i == null ? void 0 : i.builtOn, format: "locale" }) })
2661
2666
  ] }) })
2662
2667
  ] })
2663
2668
  }
2664
2669
  );
2665
- }, Gs = (e) => {
2666
- const [t, s] = y({
2670
+ }, Ws = (e) => {
2671
+ const [t, s] = T({
2667
2672
  username: "",
2668
2673
  password: ""
2669
2674
  }), i = () => {
2670
2675
  e.onLogin(t);
2671
- }, r = (n, c) => {
2676
+ }, r = (o, c) => {
2672
2677
  s({
2673
2678
  ...t,
2674
2679
  username: c
2675
2680
  });
2676
- }, o = (n, c) => {
2681
+ }, n = (o, c) => {
2677
2682
  s({
2678
2683
  ...t,
2679
2684
  password: c
2680
2685
  });
2681
2686
  };
2682
2687
  return /* @__PURE__ */ a(
2683
- Oe,
2688
+ Ue,
2684
2689
  {
2685
2690
  title: "Login",
2686
2691
  variant: "small",
@@ -2691,16 +2696,16 @@ const Ms = async (e, t) => {
2691
2696
  "aria-label": "please-wait-modal",
2692
2697
  style: { marginTop: "-15px" },
2693
2698
  actions: [
2694
- /* @__PURE__ */ a(ae, { variant: "primary", "data-testid": "modal-btn-login", onClick: i, isDisabled: (t == null ? void 0 : t.username) === "" || (t == null ? void 0 : t.password) === "", children: "Login" }, "login")
2699
+ /* @__PURE__ */ a(ce, { variant: "primary", "data-testid": "modal-btn-login", onClick: i, isDisabled: (t == null ? void 0 : t.username) === "" || (t == null ? void 0 : t.password) === "", children: "Login" }, "login")
2695
2700
  ],
2696
- children: /* @__PURE__ */ m(Ge, { children: [
2701
+ children: /* @__PURE__ */ v(Be, { children: [
2697
2702
  /* @__PURE__ */ a(
2698
- Me,
2703
+ He,
2699
2704
  {
2700
2705
  label: "Username",
2701
2706
  fieldId: "form-username",
2702
2707
  children: /* @__PURE__ */ a(
2703
- oe,
2708
+ ae,
2704
2709
  {
2705
2710
  isRequired: !0,
2706
2711
  type: "text",
@@ -2715,12 +2720,12 @@ const Ms = async (e, t) => {
2715
2720
  }
2716
2721
  ),
2717
2722
  /* @__PURE__ */ a(
2718
- Me,
2723
+ He,
2719
2724
  {
2720
2725
  label: "Password",
2721
2726
  fieldId: "form-password",
2722
2727
  children: /* @__PURE__ */ a(
2723
- oe,
2728
+ ae,
2724
2729
  {
2725
2730
  isRequired: !0,
2726
2731
  type: "text",
@@ -2729,7 +2734,7 @@ const Ms = async (e, t) => {
2729
2734
  name: "form-password",
2730
2735
  value: t == null ? void 0 : t.password,
2731
2736
  placeholder: "Password",
2732
- onChange: o
2737
+ onChange: n
2733
2738
  }
2734
2739
  )
2735
2740
  }
@@ -2737,8 +2742,8 @@ const Ms = async (e, t) => {
2737
2742
  ] })
2738
2743
  }
2739
2744
  );
2740
- }, ui = (e) => /* @__PURE__ */ m(
2741
- Oe,
2745
+ }, ni = (e) => /* @__PURE__ */ v(
2746
+ Ue,
2742
2747
  {
2743
2748
  title: "Please Wait",
2744
2749
  variant: "small",
@@ -2753,8 +2758,8 @@ const Ms = async (e, t) => {
2753
2758
  /* @__PURE__ */ a("span", { className: "message", style: { fontSize: "15px", color: "#333", marginLeft: "10px" }, children: e.message })
2754
2759
  ]
2755
2760
  }
2756
- ), _i = (e) => /* @__PURE__ */ a(
2757
- Oe,
2761
+ ), oi = (e) => /* @__PURE__ */ a(
2762
+ Ue,
2758
2763
  {
2759
2764
  title: e.title,
2760
2765
  variant: "small",
@@ -2763,26 +2768,26 @@ const Ms = async (e, t) => {
2763
2768
  onClose: e.onClose,
2764
2769
  className: "progress pf-m-redhat-font",
2765
2770
  "aria-label": "progress-modal",
2766
- children: /* @__PURE__ */ a(Ct, { title: e.message, value: e.progress })
2771
+ children: /* @__PURE__ */ a(Et, { title: e.message, value: e.progress })
2767
2772
  }
2768
- ), pi = (e) => {
2769
- const [t, s] = y(
2773
+ ), ai = (e) => {
2774
+ const [t, s] = T(
2770
2775
  0
2771
2776
  /* AUTHENTICATING */
2772
- ), i = ut(), r = (o) => {
2773
- console.info("[ApplicationAuth] Using username and password."), i.login(o.username, o.password), s(
2777
+ ), i = ct(), r = (n) => {
2778
+ console.info("[ApplicationAuth] Using username and password."), i.login(n.username, n.password), s(
2774
2779
  1
2775
2780
  /* AUTHENTICATED */
2776
2781
  );
2777
2782
  };
2778
- return Re(() => {
2783
+ return Ce(() => {
2779
2784
  i.isOidcAuthEnabled() ? i.login("", "").then(() => {
2780
2785
  console.info("[ApplicationAuth] Authentication successful."), s(
2781
2786
  1
2782
2787
  /* AUTHENTICATED */
2783
2788
  );
2784
- }).catch((o) => {
2785
- console.error("[ApplicationAuth] Authentication failed: ", o), s(
2789
+ }).catch((n) => {
2790
+ console.error("[ApplicationAuth] Authentication failed: ", n), s(
2786
2791
  2
2787
2792
  /* AUTHENTICATION_FAILED */
2788
2793
  );
@@ -2790,89 +2795,89 @@ const Ms = async (e, t) => {
2790
2795
  1
2791
2796
  /* AUTHENTICATED */
2792
2797
  );
2793
- }, []), /* @__PURE__ */ m(ue, { children: [
2794
- /* @__PURE__ */ a(O, { condition: t === 0 && i.isOidcAuthEnabled(), children: /* @__PURE__ */ m(re, { children: [
2795
- /* @__PURE__ */ a(ne, { titleText: "Loading", headingLevel: "h4" }),
2796
- /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ a(ee, { size: "xl", "aria-label": "Loading spinner" }) })
2798
+ }, []), /* @__PURE__ */ v(Re, { children: [
2799
+ /* @__PURE__ */ a(O, { condition: t === 0 && i.isOidcAuthEnabled(), children: /* @__PURE__ */ v(ne, { children: [
2800
+ /* @__PURE__ */ a(oe, { titleText: "Loading", headingLevel: "h4" }),
2801
+ /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(ee, { size: "xl", "aria-label": "Loading spinner" }) })
2797
2802
  ] }) }),
2798
- /* @__PURE__ */ a(O, { condition: t === 0 && i.isBasicAuthEnabled(), children: /* @__PURE__ */ a(Gs, { onLogin: r }) }),
2799
- /* @__PURE__ */ a(O, { condition: t === 2, children: /* @__PURE__ */ m(re, { children: [
2800
- /* @__PURE__ */ a(ne, { titleText: "Empty state", headingLevel: "h4", icon: /* @__PURE__ */ a(Qe, { icon: Wt }) }),
2801
- /* @__PURE__ */ a(ve, { children: "Authentication failed." })
2803
+ /* @__PURE__ */ a(O, { condition: t === 0 && i.isBasicAuthEnabled(), children: /* @__PURE__ */ a(Ws, { onLogin: r }) }),
2804
+ /* @__PURE__ */ a(O, { condition: t === 2, children: /* @__PURE__ */ v(ne, { children: [
2805
+ /* @__PURE__ */ a(oe, { titleText: "Empty state", headingLevel: "h4", icon: /* @__PURE__ */ a(ze, { icon: Lt }) }),
2806
+ /* @__PURE__ */ a(me, { children: "Authentication failed." })
2802
2807
  ] }) }),
2803
2808
  /* @__PURE__ */ a(O, { condition: t === 1, children: e.children })
2804
2809
  ] });
2805
- }, fi = (e) => {
2806
- const t = ut();
2810
+ }, ci = (e) => {
2811
+ const t = ct();
2807
2812
  return (() => {
2808
2813
  let i = !0;
2809
2814
  return e.enabled !== void 0 && (i = i && (t.isOidcAuthEnabled() === e.enabled || t.isBasicAuthEnabled() === e.enabled)), i;
2810
- })() ? /* @__PURE__ */ a(H.Fragment, { children: e.children }) : /* @__PURE__ */ a(H.Fragment, {});
2811
- }, mi = (e) => /* @__PURE__ */ a(Pt, { categoryName: e.categoryName || "Filters", isClosable: !0, onClick: e.onClearAllCriteria, children: e.criteria.map((t, s) => /* @__PURE__ */ m(Rt, { onClick: () => e.onRemoveCriteria(t), children: [
2815
+ })() ? /* @__PURE__ */ a($.Fragment, { children: e.children }) : /* @__PURE__ */ a($.Fragment, {});
2816
+ }, li = (e) => /* @__PURE__ */ a(Ct, { categoryName: e.categoryName || "Filters", isClosable: !0, onClick: e.onClearAllCriteria, children: e.criteria.map((t, s) => /* @__PURE__ */ v(Pt, { onClick: () => e.onRemoveCriteria(t), children: [
2812
2817
  /* @__PURE__ */ a("b", { children: t.filterBy.label }),
2813
2818
  /* @__PURE__ */ a("span", { children: ": " }),
2814
2819
  /* @__PURE__ */ a("span", { children: t.filterValue })
2815
- ] }, s)) }), wi = (e) => {
2816
- const [t, s] = y(e.filterTypes[0]), [i, r] = y(""), o = (n) => {
2817
- n && n.preventDefault(), e.onAddCriteria({
2820
+ ] }, s)) }), di = (e) => {
2821
+ const [t, s] = T(e.filterTypes[0]), [i, r] = T(""), n = (o) => {
2822
+ o && o.preventDefault(), e.onAddCriteria({
2818
2823
  filterBy: t,
2819
2824
  filterValue: i
2820
2825
  }), r("");
2821
2826
  };
2822
- return /* @__PURE__ */ a(Ge, { onSubmit: o, children: /* @__PURE__ */ m(Xe, { children: [
2827
+ return /* @__PURE__ */ a(Be, { onSubmit: n, children: /* @__PURE__ */ v(Rt, { children: [
2823
2828
  /* @__PURE__ */ a(
2824
- zs,
2829
+ Ms,
2825
2830
  {
2826
2831
  value: t,
2827
2832
  items: e.filterTypes,
2828
2833
  testId: "chip-filter-select",
2829
2834
  toggleClassname: "chip-filter-toggle",
2830
2835
  onSelect: s,
2831
- itemToTestId: (n) => n.testId,
2832
- itemToString: (n) => n.label
2836
+ itemToTestId: (o) => o.testId,
2837
+ itemToString: (o) => o.label
2833
2838
  }
2834
2839
  ),
2835
2840
  /* @__PURE__ */ a(
2836
- oe,
2841
+ ae,
2837
2842
  {
2838
2843
  name: "filterValue",
2839
2844
  id: "filterValue",
2840
2845
  type: "search",
2841
2846
  value: i,
2842
- onChange: (n, c) => r(c),
2847
+ onChange: (o, c) => r(c),
2843
2848
  "data-testid": "chip-filter-value",
2844
2849
  "aria-label": "search input"
2845
2850
  }
2846
2851
  ),
2847
2852
  /* @__PURE__ */ a(
2848
- ae,
2853
+ ce,
2849
2854
  {
2850
2855
  variant: Ut.control,
2851
- onClick: o,
2856
+ onClick: n,
2852
2857
  "data-testid": "chip-filter-search",
2853
2858
  "aria-label": "search button for search input",
2854
- children: /* @__PURE__ */ a(Jt, {})
2859
+ children: /* @__PURE__ */ a(jt, {})
2855
2860
  }
2856
2861
  )
2857
2862
  ] }) });
2858
2863
  };
2859
- function vi() {
2860
- return /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(
2861
- ne,
2864
+ function hi() {
2865
+ return /* @__PURE__ */ a(ne, { children: /* @__PURE__ */ a(
2866
+ oe,
2862
2867
  {
2863
2868
  titleText: "Loading",
2864
2869
  headingLevel: "h4",
2865
- icon: /* @__PURE__ */ a(Qe, { icon: ee })
2870
+ icon: /* @__PURE__ */ a(ze, { icon: ee })
2866
2871
  }
2867
2872
  ) });
2868
2873
  }
2869
- function Si({
2874
+ function gi({
2870
2875
  itemCount: e,
2871
2876
  page: t,
2872
2877
  perPage: s,
2873
2878
  isCompact: i = !1,
2874
2879
  onChange: r,
2875
- variant: o = At.top
2880
+ variant: n = At.top
2876
2881
  }) {
2877
2882
  return /* @__PURE__ */ a(
2878
2883
  xt,
@@ -2880,33 +2885,33 @@ function Si({
2880
2885
  itemCount: e,
2881
2886
  page: t,
2882
2887
  perPage: s,
2883
- onSetPage: (n, c) => r(c, s),
2884
- onPerPageSelect: (n, c) => r(1, c),
2885
- variant: o,
2888
+ onSetPage: (o, c) => r(c, s),
2889
+ onPerPageSelect: (o, c) => r(1, c),
2890
+ variant: n,
2886
2891
  isCompact: i
2887
2892
  }
2888
2893
  );
2889
2894
  }
2890
- function Qs({ columns: e, rows: t, getTd: s = () => Ne }) {
2891
- const i = new Array(e).fill(0).map((o, n) => {
2892
- const c = s(n);
2895
+ function Js({ columns: e, rows: t, getTd: s = () => xe }) {
2896
+ const i = new Array(e).fill(0).map((n, o) => {
2897
+ const c = s(o);
2893
2898
  return /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(
2894
2899
  Ot,
2895
2900
  {
2896
- screenreaderText: n === 0 ? "Loading data" : void 0
2901
+ screenreaderText: o === 0 ? "Loading data" : void 0
2897
2902
  }
2898
- ) }, `cell_${n}`);
2899
- }), r = new Array(t).fill(0).map((o, n) => /* @__PURE__ */ a(ce, { children: i }, `row_${n}`));
2900
- return /* @__PURE__ */ a(ue, { children: r });
2903
+ ) }, `cell_${o}`);
2904
+ }), r = new Array(t).fill(0).map((n, o) => /* @__PURE__ */ a(le, { children: i }, `row_${o}`));
2905
+ return /* @__PURE__ */ a(Re, { children: r });
2901
2906
  }
2902
- const yi = ({
2907
+ const ui = ({
2903
2908
  ariaLabel: e,
2904
2909
  minimumColumnWidth: t = 250,
2905
2910
  columns: s,
2906
2911
  data: i,
2907
2912
  renderHeader: r,
2908
- renderCell: o,
2909
- renderActions: n,
2913
+ renderCell: n,
2914
+ renderActions: o,
2910
2915
  isColumnSortable: c,
2911
2916
  isRowDeleted: l,
2912
2917
  isRowSelected: d,
@@ -2915,27 +2920,27 @@ const yi = ({
2915
2920
  setActionCellOuiaId: _,
2916
2921
  setRowOuiaId: S,
2917
2922
  tableOuiaId: x,
2918
- children: T,
2923
+ children: k,
2919
2924
  variant: A
2920
2925
  }) => {
2921
- const [I, N] = y(1e3);
2926
+ const [I, N] = T(1e3);
2922
2927
  let P;
2923
- const L = ({ width: f }) => {
2928
+ const M = ({ width: f }) => {
2924
2929
  P && cancelAnimationFrame(P), f && (P = requestAnimationFrame(() => {
2925
2930
  N(f);
2926
2931
  }));
2927
- }, { ref: R } = Qt({ onResize: L }), w = I >= 576, E = je(
2928
- (f) => w && f !== 0 && f !== s.length - 1,
2929
- [s, w]
2930
- ), U = Fe(() => s.map((f, v) => {
2931
- const q = ie(
2932
+ }, { ref: R } = Jt({ onResize: M }), m = I >= 576, E = Ne(
2933
+ (f) => m && f !== 0 && f !== s.length - 1,
2934
+ [s, m]
2935
+ ), U = qe(() => s.map((f, w) => {
2936
+ const q = re(
2932
2937
  ({ children: J, ...K }, Q) => /* @__PURE__ */ a(
2933
- pt,
2938
+ dt,
2934
2939
  {
2935
- position: v,
2940
+ position: w,
2936
2941
  tableWidth: I,
2937
2942
  columnWidth: t,
2938
- canHide: E(v),
2943
+ canHide: E(w),
2939
2944
  sort: c ? c(f) : void 0,
2940
2945
  ...K,
2941
2946
  ref: Q,
@@ -2947,7 +2952,7 @@ const yi = ({
2947
2952
  Th: q,
2948
2953
  key: `header_${f}`,
2949
2954
  column: f,
2950
- colIndex: v
2955
+ colIndex: w
2951
2956
  });
2952
2957
  }), [
2953
2958
  E,
@@ -2956,11 +2961,11 @@ const yi = ({
2956
2961
  t,
2957
2962
  r,
2958
2963
  I
2959
- ]), b = je(
2964
+ ]), y = Ne(
2960
2965
  (f) => {
2961
- const v = ie(
2966
+ const w = re(
2962
2967
  ({ children: q, ...J }, K) => /* @__PURE__ */ a(
2963
- Pe,
2968
+ Ee,
2964
2969
  {
2965
2970
  position: f,
2966
2971
  tableWidth: I,
@@ -2972,320 +2977,162 @@ const yi = ({
2972
2977
  }
2973
2978
  )
2974
2979
  );
2975
- return v.displayName = "ResponsiveTdCurried", v;
2980
+ return w.displayName = "ResponsiveTdCurried", w;
2976
2981
  },
2977
2982
  [E, t, I]
2978
- ), z = Fe(
2979
- () => s.map((f, v) => b(v)),
2980
- [s, b]
2983
+ ), z = qe(
2984
+ () => s.map((f, w) => y(w)),
2985
+ [s, y]
2981
2986
  );
2982
- return /* @__PURE__ */ m(
2983
- Bt,
2987
+ return /* @__PURE__ */ v(
2988
+ $t,
2984
2989
  {
2985
2990
  "aria-label": e,
2986
2991
  gridBreakPoint: "",
2987
2992
  ref: R,
2988
- className: w ? "" : "pf-m-grid",
2993
+ className: m ? "" : "pf-m-grid",
2989
2994
  ouiaId: x,
2990
2995
  variant: A,
2991
2996
  children: [
2992
- /* @__PURE__ */ a(zt, { children: /* @__PURE__ */ a(ce, { children: U }) }),
2993
- /* @__PURE__ */ m(Vt, { children: [
2997
+ /* @__PURE__ */ a(Mt, { children: /* @__PURE__ */ a(le, { children: U }) }),
2998
+ /* @__PURE__ */ v(Ft, { children: [
2994
2999
  i === void 0 && /* @__PURE__ */ a(
2995
- Qs,
3000
+ Js,
2996
3001
  {
2997
3002
  columns: s.length,
2998
3003
  rows: h,
2999
- getTd: b
3004
+ getTd: y
3000
3005
  }
3001
3006
  ),
3002
- i == null ? void 0 : i.map((f, v) => {
3003
- const q = l !== void 0 && l({ row: f, rowIndex: v }), J = d !== void 0 && d({ row: f, rowIndex: v }), K = !q && g ? () => g({ row: f, rowIndex: v }) : void 0, Q = s.map((X, te) => o({
3007
+ i == null ? void 0 : i.map((f, w) => {
3008
+ const q = l !== void 0 && l({ row: f, rowIndex: w }), J = d !== void 0 && d({ row: f, rowIndex: w }), K = !q && g ? () => g({ row: f, rowIndex: w }) : void 0, Q = s.map((X, te) => n({
3004
3009
  Td: z[te],
3005
- key: `row_${v}_cell_${X}`,
3010
+ key: `row_${w}_cell_${X}`,
3006
3011
  column: X,
3007
3012
  colIndex: te,
3008
- rowIndex: v,
3013
+ rowIndex: w,
3009
3014
  row: f
3010
- })), pe = !q && n && /* @__PURE__ */ a(
3011
- Pe,
3015
+ })), _e = !q && o && /* @__PURE__ */ a(
3016
+ Ee,
3012
3017
  {
3013
3018
  position: s.length,
3014
3019
  tableWidth: I,
3015
3020
  columnWidth: t,
3016
3021
  canHide: !1,
3017
3022
  isActionCell: !0,
3018
- "data-testid": _ ? _({ row: f, rowIndex: v }) : `actions-for-row-${v}`,
3019
- children: n({ rowIndex: v, row: f, ActionsColumn: Gt })
3023
+ "data-testid": _ ? _({ row: f, rowIndex: w }) : `actions-for-row-${w}`,
3024
+ children: o({ rowIndex: w, row: f, ActionsColumn: Wt })
3020
3025
  }
3021
3026
  );
3022
- return /* @__PURE__ */ m(
3023
- ft,
3027
+ return /* @__PURE__ */ v(
3028
+ ht,
3024
3029
  {
3025
3030
  isDeleted: q,
3026
3031
  isSelected: J,
3027
3032
  onClick: K,
3028
- rowOuiaId: S == null ? void 0 : S({ row: f, rowIndex: v }),
3033
+ rowOuiaId: S == null ? void 0 : S({ row: f, rowIndex: w }),
3029
3034
  children: [
3030
3035
  Q,
3031
- pe
3036
+ _e
3032
3037
  ]
3033
3038
  },
3034
- `row_${v}`
3039
+ `row_${w}`
3035
3040
  );
3036
3041
  }),
3037
- (i == null ? void 0 : i.length) === 0 && /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(Ne, { colSpan: s.length, children: T }) })
3042
+ (i == null ? void 0 : i.length) === 0 && /* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(xe, { colSpan: s.length, children: k }) })
3038
3043
  ] })
3039
3044
  ]
3040
3045
  }
3041
3046
  );
3042
- }, pt = Ue(
3043
- ie((e, t) => {
3047
+ }, dt = Pe(
3048
+ re((e, t) => {
3044
3049
  const {
3045
3050
  tableWidth: s,
3046
3051
  columnWidth: i,
3047
3052
  position: r,
3048
- canHide: o,
3049
- className: n = "",
3053
+ canHide: n,
3054
+ className: o = "",
3050
3055
  children: c,
3051
3056
  ...l
3052
- } = e, d = o && s < i * (r + 1) ? "pf-m-hidden" : "pf-m-visible";
3057
+ } = e, d = n && s < i * (r + 1) ? "pf-m-hidden" : "pf-m-visible";
3053
3058
  return /* @__PURE__ */ a(
3054
- Kt,
3059
+ Ht,
3055
3060
  {
3056
3061
  ref: t,
3057
- className: `${d} ${n}`,
3062
+ className: `${d} ${o}`,
3058
3063
  ...l,
3059
3064
  children: c
3060
3065
  }
3061
3066
  );
3062
3067
  })
3063
3068
  );
3064
- pt.displayName = "ResponsiveTh";
3065
- const Pe = Ue(
3066
- ie((e, t) => {
3069
+ dt.displayName = "ResponsiveTh";
3070
+ const Ee = Pe(
3071
+ re((e, t) => {
3067
3072
  const {
3068
3073
  tableWidth: s,
3069
3074
  columnWidth: i,
3070
3075
  position: r,
3071
- canHide: o,
3072
- className: n = "",
3076
+ canHide: n,
3077
+ className: o = "",
3073
3078
  children: c,
3074
3079
  ...l
3075
- } = e, d = o && s < i * (r + 1) ? "pf-m-hidden" : "pf-m-visible";
3080
+ } = e, d = n && s < i * (r + 1) ? "pf-m-hidden" : "pf-m-visible";
3076
3081
  return /* @__PURE__ */ a(
3077
- Ne,
3082
+ xe,
3078
3083
  {
3079
3084
  ref: t,
3080
- className: `${d} ${n}`,
3085
+ className: `${d} ${o}`,
3081
3086
  ...l,
3082
3087
  children: c
3083
3088
  }
3084
3089
  );
3085
3090
  })
3086
3091
  );
3087
- Pe.displayName = "ResponsiveTd";
3088
- const ft = Ue(
3092
+ Ee.displayName = "ResponsiveTd";
3093
+ const ht = Pe(
3089
3094
  ({ isDeleted: e, isSelected: t, onClick: s, children: i, rowOuiaId: r }) => /* @__PURE__ */ a(
3090
- ce,
3095
+ le,
3091
3096
  {
3092
- onRowClick: (o) => {
3093
- (o == null ? void 0 : o.target) instanceof HTMLElement && (["a", "button"].includes(o.target.tagName.toLowerCase()) || s && s());
3097
+ onRowClick: (n) => {
3098
+ (n == null ? void 0 : n.target) instanceof HTMLElement && (["a", "button"].includes(n.target.tagName.toLowerCase()) || s && s());
3094
3099
  },
3095
3100
  ouiaId: r,
3096
3101
  isRowSelected: t,
3097
3102
  className: e ? "mas--ResponsiveTable__Tr--deleted" : void 0,
3098
- "data-testid": [t && "row-selected", e && "row-deleted"].filter((o) => !!o).join(" "),
3103
+ "data-testid": [t && "row-selected", e && "row-deleted"].filter((n) => !!n).join(" "),
3099
3104
  role: "row",
3100
3105
  children: i
3101
3106
  }
3102
3107
  )
3103
3108
  );
3104
- ft.displayName = "DeletableRow";
3105
- const Xs = ({ label: e, onSearch: t }) => {
3106
- const s = (i, r, o) => {
3107
- t(r);
3108
- };
3109
- return /* @__PURE__ */ a(
3110
- Nt,
3111
- {
3112
- placeholder: `Filter by ${e}`,
3113
- onSearch: s
3114
- }
3115
- );
3116
- };
3117
- function ze({
3118
- options: e,
3119
- value: t,
3120
- onChange: s,
3121
- ouiaId: i
3122
- }) {
3123
- const [r, o] = y(!1);
3124
- return /* @__PURE__ */ a(
3125
- xe,
3126
- {
3127
- toggle: (c) => /* @__PURE__ */ a(
3128
- _e,
3129
- {
3130
- ref: c,
3131
- onClick: () => o((l) => !l),
3132
- isExpanded: r,
3133
- variant: "plain",
3134
- children: /* @__PURE__ */ a(Ye, {})
3135
- }
3136
- ),
3137
- "aria-label": "table:select_filter",
3138
- selected: t,
3139
- isOpen: r,
3140
- onSelect: (c, l) => {
3141
- s(l), o(!1);
3142
- },
3143
- ouiaId: i,
3144
- children: /* @__PURE__ */ a(qt, { children: e.map((c, l) => /* @__PURE__ */ a(Ae, { value: c, children: c }, l)) })
3145
- }
3146
- );
3147
- }
3148
- function Ys({
3149
- label: e,
3150
- chips: t,
3151
- options: s,
3152
- onToggle: i
3153
- }) {
3154
- const [r, o] = y(!1);
3155
- return /* @__PURE__ */ a(
3156
- xe,
3157
- {
3158
- "aria-label": e,
3159
- onSelect: (n, c) => {
3160
- i(c);
3161
- },
3162
- selected: t,
3163
- isOpen: r,
3164
- toggle: (n) => /* @__PURE__ */ a(
3165
- _e,
3166
- {
3167
- ref: n,
3168
- onClick: () => o((c) => !c),
3169
- isExpanded: r,
3170
- style: {
3171
- width: "200px"
3172
- },
3173
- children: `Filter by ${e}`
3174
- }
3175
- ),
3176
- children: Object.entries(s).map(([n, c]) => /* @__PURE__ */ a(Ae, { value: n, hasCheckbox: !0, children: c }, n))
3177
- }
3178
- );
3179
- }
3180
- function bi({ filters: e, breakpoint: t = "md" }) {
3181
- const s = Object.keys(e), [i, r] = y(s[0]), o = (n, c) => {
3182
- switch (c.type) {
3183
- case "search":
3184
- return /* @__PURE__ */ a(
3185
- Xs,
3186
- {
3187
- onSearch: c.onSearch,
3188
- label: n,
3189
- validate: c.validate,
3190
- errorMessage: c.errorMessage
3191
- }
3192
- );
3193
- case "checkbox":
3194
- return /* @__PURE__ */ a(
3195
- Ys,
3196
- {
3197
- chips: c.chips,
3198
- options: c.options,
3199
- onToggle: c.onToggle,
3200
- label: n
3201
- }
3202
- );
3203
- }
3204
- };
3205
- return /* @__PURE__ */ m(ue, { children: [
3206
- /* @__PURE__ */ a(
3207
- Dt,
3208
- {
3209
- variant: "search-filter",
3210
- visibility: { default: "hidden", [t]: "visible" },
3211
- "data-testid": "large-viewport-toolbar",
3212
- children: /* @__PURE__ */ m(Xe, { children: [
3213
- s.length > 1 && /* @__PURE__ */ a(
3214
- ze,
3215
- {
3216
- options: s,
3217
- value: i,
3218
- onChange: r,
3219
- ouiaId: "chip-filter-selector-large-viewport"
3220
- }
3221
- ),
3222
- o(i, e[i])
3223
- ] })
3224
- }
3225
- ),
3226
- /* @__PURE__ */ a(
3227
- jt,
3228
- {
3229
- toggleIcon: /* @__PURE__ */ a(Ye, {}),
3230
- breakpoint: t,
3231
- visibility: { default: "visible", [t]: "hidden" },
3232
- children: /* @__PURE__ */ m(Ft, { variant: "filter-group", children: [
3233
- s.length > 1 && /* @__PURE__ */ a(
3234
- ze,
3235
- {
3236
- options: s,
3237
- value: i,
3238
- onChange: r,
3239
- ouiaId: "chip-filter-selector-small-viewport"
3240
- }
3241
- ),
3242
- Object.entries(e).map(([n, c], l) => /* @__PURE__ */ a(
3243
- $t,
3244
- {
3245
- chips: c.type === "checkbox" ? c.chips.map((d) => ({ key: d, node: c.options[d] })) : c.chips,
3246
- deleteChip: (d, h) => c.onRemoveChip(typeof h == "string" ? h : h.key),
3247
- deleteChipGroup: c.onRemoveGroup,
3248
- categoryName: n,
3249
- showToolbarItem: n === i,
3250
- children: n === i && o(n, c)
3251
- },
3252
- l
3253
- ))
3254
- ] })
3255
- }
3256
- )
3257
- ] });
3258
- }
3109
+ ht.displayName = "DeletableRow";
3259
3110
  export {
3260
- gi as AppAboutModal,
3261
- pi as ApplicationAuth,
3262
- Xt as AuthConfigContext,
3263
- Gs as BasicAuthModal,
3264
- bi as ChipFilter,
3265
- wi as ChipFilterInput,
3266
- Ce as DateTime,
3267
- ft as DeletableRow,
3268
- Ys as FilterCheckbox,
3269
- mi as FilterChips,
3270
- Xs as FilterSearch,
3271
- ze as FilterSelector,
3272
- oi as FromNow,
3111
+ ri as AppAboutModal,
3112
+ ai as ApplicationAuth,
3113
+ Kt as AuthConfigContext,
3114
+ Ws as BasicAuthModal,
3115
+ di as ChipFilterInput,
3116
+ Ie as DateTime,
3117
+ ht as DeletableRow,
3118
+ li as FilterChips,
3119
+ Ys as FromNow,
3273
3120
  O as If,
3274
- fi as IfAuth,
3275
- ai as IfNotEmpty,
3276
- ge as IfNotLoading,
3277
- ci as ListWithToolbar,
3278
- vi as Loading,
3279
- li as ObjectDropdown,
3280
- zs as ObjectSelect,
3281
- Si as Pagination,
3282
- ui as PleaseWaitModal,
3283
- _i as ProgressModal,
3284
- yi as ResponsiveTable,
3285
- Pe as ResponsiveTd,
3286
- pt as ResponsiveTh,
3287
- Qs as TableSkeleton,
3288
- di as ToggleIcon,
3289
- hi as UrlUpload,
3290
- ut as useAuth
3121
+ ci as IfAuth,
3122
+ Zs as IfNotEmpty,
3123
+ ue as IfNotLoading,
3124
+ ei as ListWithToolbar,
3125
+ hi as Loading,
3126
+ ti as ObjectDropdown,
3127
+ Ms as ObjectSelect,
3128
+ gi as Pagination,
3129
+ ni as PleaseWaitModal,
3130
+ oi as ProgressModal,
3131
+ ui as ResponsiveTable,
3132
+ Ee as ResponsiveTd,
3133
+ dt as ResponsiveTh,
3134
+ Js as TableSkeleton,
3135
+ si as ToggleIcon,
3136
+ ii as UrlUpload,
3137
+ ct as useAuth
3291
3138
  };