@apicurio/common-ui-components 2.0.16 → 2.1.1

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 j, { createContext as gt, useContext as ut, useState as T, useEffect as pe, memo as Pe, forwardRef as ne, useCallback as Ne, useMemo as De } 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 oe, EmptyStateVariant as ft, EmptyStateHeader as ae, EmptyStateBody as ve, Spinner as te, Alert as wt, Dropdown as mt, MenuToggle as Je, DropdownList as vt, Divider as Ke, DropdownItem as St, Select as yt, SelectOption as bt, TextInput as ce, Button as le, TextArea as kt, AboutModal as Tt, TextContent as It, Text as qe, TextVariants as Le, TextList as $e, 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 Dt, ChevronRightIcon as qt, ErrorCircleOIcon as Lt, SearchIcon as $t } from "@patternfly/react-icons";
1
+ import F, { createContext as ut, useContext as _t, useState as T, useEffect as pe, memo as Re, forwardRef as ne, useCallback as De, useMemo as qe } from "react";
2
+ import { jsx as a, jsxs as v, Fragment as Ue } from "react/jsx-runtime";
3
+ import { useInterval as pt, Tooltip as ft, EmptyState as oe, EmptyStateVariant as wt, EmptyStateHeader as ae, EmptyStateBody as Se, Spinner as te, Alert as mt, Dropdown as vt, MenuToggle as Be, DropdownList as St, Divider as Ke, DropdownItem as yt, Select as bt, SelectOption as kt, TextInput as ce, Button as le, TextArea as Tt, AboutModal as It, TextContent as Et, Text as $e, TextVariants as Le, TextList as je, TextListItem as b, Modal as Ae, Form as ze, FormGroup as He, Progress as Ct, EmptyStateIcon as Ve, ChipGroup as Pt, Chip as Rt, InputGroup as Ut, ButtonVariant as At, Pagination as xt, PaginationVariant as Ot, Skeleton as Nt } from "@patternfly/react-core";
4
+ import { EllipsisVIcon as Dt, ChevronDownIcon as qt, ChevronRightIcon as $t, ErrorCircleOIcon as Lt, SearchIcon as jt } from "@patternfly/react-icons";
5
5
  import { DateTime as ie } from "luxon";
6
- import { Tr as de, Td as xe, Th as Ht, Table as jt, Thead as Ft, Tbody as Mt, ActionsColumn as Wt } from "@patternfly/react-table";
7
- import Jt from "use-resize-observer";
8
- const Kt = gt({
6
+ import { Tr as de, Td as xe, Th as Ht, Table as Ft, Thead as Mt, Tbody as Wt, ActionsColumn as Jt } from "@patternfly/react-table";
7
+ import Bt from "use-resize-observer";
8
+ const Kt = ut({
9
9
  type: "none"
10
10
  });
11
11
  class Z extends Error {
12
12
  }
13
13
  Z.prototype.name = "InvalidTokenError";
14
- function Bt(e) {
14
+ function zt(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 Vt(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 Bt(t);
35
+ return zt(t);
36
36
  } catch {
37
37
  return atob(t);
38
38
  }
39
39
  }
40
- function Vt(e, t) {
40
+ function Gt(e, t) {
41
41
  if (typeof e != "string")
42
42
  throw new Z("Invalid token specified: must be a string");
43
43
  t || (t = {});
@@ -46,7 +46,7 @@ function Vt(e, t) {
46
46
  throw new Z(`Invalid token specified: missing part #${s + 1}`);
47
47
  let r;
48
48
  try {
49
- r = zt(i);
49
+ r = Vt(i);
50
50
  } catch (n) {
51
51
  throw new Z(`Invalid token specified: invalid base64 for part #${s + 1} (${n.message})`);
52
52
  }
@@ -56,7 +56,7 @@ function Vt(e, t) {
56
56
  throw new Z(`Invalid token specified: invalid json for part #${s + 1} (${n.message})`);
57
57
  }
58
58
  }
59
- var Gt = {
59
+ var Qt = {
60
60
  debug: () => {
61
61
  },
62
62
  info: () => {
@@ -65,16 +65,16 @@ var Gt = {
65
65
  },
66
66
  error: () => {
67
67
  }
68
- }, $, H, he = /* @__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))(he || {});
68
+ }, j, H, he = /* @__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))(he || {});
69
69
  ((e) => {
70
70
  function t() {
71
- $ = 3, H = Gt;
71
+ j = 3, H = Qt;
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
- $ = r;
77
+ j = r;
78
78
  }
79
79
  e.setLevel = s;
80
80
  function i(r) {
@@ -82,22 +82,22 @@ var Gt = {
82
82
  }
83
83
  e.setLogger = i;
84
84
  })(he || (he = {}));
85
- var p = class q {
85
+ var p = class $ {
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
- $ >= 4 && H.debug(q._format(this._name, this._method), ...t);
91
+ j >= 4 && H.debug($._format(this._name, this._method), ...t);
92
92
  }
93
93
  info(...t) {
94
- $ >= 3 && H.info(q._format(this._name, this._method), ...t);
94
+ j >= 3 && H.info($._format(this._name, this._method), ...t);
95
95
  }
96
96
  warn(...t) {
97
- $ >= 2 && H.warn(q._format(this._name, this._method), ...t);
97
+ j >= 2 && H.warn($._format(this._name, this._method), ...t);
98
98
  }
99
99
  error(...t) {
100
- $ >= 1 && H.error(q._format(this._name, this._method), ...t);
100
+ j >= 1 && H.error($._format(this._name, this._method), ...t);
101
101
  }
102
102
  /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
103
103
  throw(t) {
@@ -108,7 +108,7 @@ var p = class q {
108
108
  return s._method = t, s.debug("begin"), s;
109
109
  }
110
110
  static createStatic(t, s) {
111
- const i = new q(`${t}.${s}`);
111
+ const i = new $(`${t}.${s}`);
112
112
  return i.debug("begin"), i;
113
113
  }
114
114
  static _format(t, s) {
@@ -118,16 +118,16 @@ var p = class q {
118
118
  /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
119
119
  // helpers for static class methods
120
120
  static debug(t, ...s) {
121
- $ >= 4 && H.debug(q._format(t), ...s);
121
+ j >= 4 && H.debug($._format(t), ...s);
122
122
  }
123
123
  static info(t, ...s) {
124
- $ >= 3 && H.info(q._format(t), ...s);
124
+ j >= 3 && H.info($._format(t), ...s);
125
125
  }
126
126
  static warn(t, ...s) {
127
- $ >= 2 && H.warn(q._format(t), ...s);
127
+ j >= 2 && H.warn($._format(t), ...s);
128
128
  }
129
129
  static error(t, ...s) {
130
- $ >= 1 && H.error(q._format(t), ...s);
130
+ j >= 1 && H.error($._format(t), ...s);
131
131
  }
132
132
  /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
133
133
  };
@@ -136,7 +136,7 @@ var ge = class {
136
136
  // IMPORTANT: doesn't validate the token
137
137
  static decode(e) {
138
138
  try {
139
- return Vt(e);
139
+ return Gt(e);
140
140
  } catch (t) {
141
141
  throw p.error("JwtUtils.decode", t), t;
142
142
  }
@@ -152,7 +152,7 @@ var ge = class {
152
152
  ), c = C.encodeBase64Url(new Uint8Array(o));
153
153
  return `${n}.${c}`;
154
154
  }
155
- }, Qt = "10000000-1000-4000-8000-100000000000", Se = (e) => btoa([...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")), Ve = class L {
155
+ }, Xt = "10000000-1000-4000-8000-100000000000", ye = (e) => btoa([...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")), Ge = class L {
156
156
  static _randomWord() {
157
157
  const t = new Uint32Array(1);
158
158
  return crypto.getRandomValues(t), t[0];
@@ -161,7 +161,7 @@ var ge = class {
161
161
  * Generates RFC4122 version 4 guid
162
162
  */
163
163
  static generateUUIDv4() {
164
- return Qt.replace(
164
+ return Xt.replace(
165
165
  /[018]/g,
166
166
  (s) => (+s ^ L._randomWord() & 15 >> +s / 4).toString(16)
167
167
  ).replace(/-/g, "");
@@ -180,7 +180,7 @@ var ge = 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 ye(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
184
184
  } catch (s) {
185
185
  throw p.error("CryptoUtils.generateCodeChallenge", s), s;
186
186
  }
@@ -190,7 +190,7 @@ var ge = 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 ye(r);
194
194
  }
195
195
  /**
196
196
  * Generates a hash of a string using a given algorithm
@@ -292,8 +292,8 @@ var ge = class {
292
292
  );
293
293
  }
294
294
  };
295
- Ve.encodeBase64Url = (e) => Se(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
296
- var C = Ve, W = class {
295
+ Ge.encodeBase64Url = (e) => ye(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
296
+ var C = Ge, J = class {
297
297
  constructor(e) {
298
298
  this._name = e, this._callbacks = [], this._logger = new p(`Event('${this._name}')`);
299
299
  }
@@ -309,7 +309,7 @@ var C = Ve, W = class {
309
309
  for (const t of this._callbacks)
310
310
  await t(...e);
311
311
  }
312
- }, je = class {
312
+ }, Fe = 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,7 +322,7 @@ var C = Ve, 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 re extends W {
325
+ }, W = class re extends J {
326
326
  constructor() {
327
327
  super(...arguments), this._logger = new p(`Timer('${this._name}')`), this._timerHandle = null, this._expiration = 0, this._callback = () => {
328
328
  const t = this._expiration - re.getEpochTime();
@@ -351,7 +351,7 @@ var C = Ve, 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
+ }, be = 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"];
@@ -364,13 +364,13 @@ var C = Ve, W = class {
364
364
  throw p.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
- }, Ae = class extends Error {
367
+ }, Oe = class extends Error {
368
368
  constructor(e) {
369
369
  super(e), this.name = "ErrorTimeout";
370
370
  }
371
- }, Xt = class {
371
+ }, Yt = class {
372
372
  constructor(e) {
373
- this._logger = new p("AccessTokenEvents"), this._expiringTimer = new M("Access token expiring"), this._expiredTimer = new M("Access token expired"), this._expiringNotificationTimeInSeconds = e.expiringNotificationTimeInSeconds;
373
+ this._logger = new p("AccessTokenEvents"), this._expiringTimer = new W("Access token expiring"), this._expiredTimer = new W("Access token expired"), this._expiringNotificationTimeInSeconds = e.expiringNotificationTimeInSeconds;
374
374
  }
375
375
  async load(e) {
376
376
  const t = this._logger.create("load");
@@ -413,7 +413,7 @@ var C = Ve, W = class {
413
413
  removeAccessTokenExpired(e) {
414
414
  this._expiredTimer.removeHandler(e);
415
415
  }
416
- }, Yt = class {
416
+ }, Zt = class {
417
417
  constructor(e, t, s, i, r) {
418
418
  this._callback = e, this._client_id = t, this._intervalInSeconds = i, this._stopOnError = r, this._logger = new p("CheckSessionIFrame"), this._timer = null, this._session_state = null, this._message = (o) => {
419
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"));
@@ -440,7 +440,7 @@ var C = Ve, 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
- }, Ge = class {
443
+ }, Qe = class {
444
444
  constructor() {
445
445
  this._logger = new p("InMemoryWebStorage"), this._data = {};
446
446
  }
@@ -462,11 +462,11 @@ var C = Ve, W = class {
462
462
  key(e) {
463
463
  return Object.getOwnPropertyNames(this._data)[e];
464
464
  }
465
- }, be = class extends Error {
465
+ }, ke = class extends Error {
466
466
  constructor(e, t) {
467
467
  super(t), this.name = "ErrorDPoPNonce", this.nonce = e;
468
468
  }
469
- }, Oe = class {
469
+ }, Ne = class {
470
470
  constructor(e = [], t = null, s = {}) {
471
471
  this._jwtHandler = t, this._extraHeaders = s, this._logger = new p("JsonService"), this._contentTypes = [], this._contentTypes.push(...e, "application/json"), t && this._contentTypes.push("application/jwt");
472
472
  }
@@ -481,7 +481,7 @@ var C = Ve, W = class {
481
481
  signal: r.signal
482
482
  });
483
483
  } catch (o) {
484
- throw o instanceof DOMException && o.name === "AbortError" ? new Ae("Network timed out") : o;
484
+ throw o instanceof DOMException && o.name === "AbortError" ? new Oe("Network timed out") : o;
485
485
  } finally {
486
486
  clearTimeout(n);
487
487
  }
@@ -549,7 +549,7 @@ var C = Ve, W = class {
549
549
  if (!l.ok) {
550
550
  if (o.error("Error from server:", g), l.headers.has("dpop-nonce")) {
551
551
  const _ = l.headers.get("dpop-nonce");
552
- throw new be(_, `${JSON.stringify(g)}`);
552
+ throw new ke(_, `${JSON.stringify(g)}`);
553
553
  }
554
554
  throw g.error ? new z(g, t) : new Error(`${l.statusText} (${l.status}): ${JSON.stringify(g)}`);
555
555
  }
@@ -575,9 +575,9 @@ var C = Ve, W = class {
575
575
  o && o !== "" && (e[n] = o);
576
576
  });
577
577
  }
578
- }, Zt = class {
578
+ }, es = class {
579
579
  constructor(e) {
580
- this._settings = e, this._logger = new p("MetadataService"), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._jsonService = new Oe(
580
+ this._settings = e, this._logger = new p("MetadataService"), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._jsonService = new Ne(
581
581
  ["application/jwk-set+json"],
582
582
  null,
583
583
  this._settings.extraHeaders
@@ -642,7 +642,7 @@ var C = Ve, W = class {
642
642
  throw e.throw(new Error("Missing keys on keyset")), null;
643
643
  return this._signingKeys = s.keys, this._signingKeys;
644
644
  }
645
- }, Qe = class {
645
+ }, Xe = class {
646
646
  constructor({
647
647
  prefix: e = "oidc.",
648
648
  store: t = localStorage
@@ -669,7 +669,7 @@ var C = Ve, W = class {
669
669
  }
670
670
  return t;
671
671
  }
672
- }, es = "code", ts = "openid", ss = "client_secret_post", is = 60 * 15, ke = class {
672
+ }, ts = "code", ss = "openid", is = "client_secret_post", rs = 60 * 15, Te = class {
673
673
  constructor({
674
674
  // metadata related
675
675
  authority: e,
@@ -680,24 +680,24 @@ var C = Ve, W = class {
680
680
  // client related
681
681
  client_id: n,
682
682
  client_secret: o,
683
- response_type: c = es,
684
- scope: l = ts,
683
+ response_type: c = ts,
684
+ scope: l = ss,
685
685
  redirect_uri: d,
686
686
  post_logout_redirect_uri: h,
687
- client_authentication: g = ss,
687
+ client_authentication: g = is,
688
688
  // optional protocol
689
689
  prompt: _,
690
690
  display: S,
691
- max_age: x,
691
+ max_age: A,
692
692
  ui_locales: k,
693
- acr_values: A,
693
+ acr_values: x,
694
694
  resource: I,
695
- response_mode: N,
695
+ response_mode: D,
696
696
  // behavior flags
697
697
  filterProtocolClaims: P = !0,
698
- loadUserInfo: F = !1,
698
+ loadUserInfo: M = !1,
699
699
  requestTimeoutInSeconds: R,
700
- staleStateAgeInSeconds: w = is,
700
+ staleStateAgeInSeconds: w = rs,
701
701
  mergeClaimsStrategy: E = { array: "replace" },
702
702
  disablePKCE: U = !1,
703
703
  // other behavior
@@ -706,23 +706,23 @@ var C = Ve, W = class {
706
706
  fetchRequestCredentials: f,
707
707
  refreshTokenAllowedScope: m,
708
708
  // extra
709
- extraQueryParams: D = {},
710
- extraTokenParams: J = {},
709
+ extraQueryParams: q = {},
710
+ extraTokenParams: B = {},
711
711
  extraHeaders: K = {},
712
712
  dpop: X,
713
- omitScopeWhenRequesting: fe = !1
713
+ omitScopeWhenRequesting: we = !1
714
714
  }) {
715
715
  var Y;
716
- 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 = !!F, this.staleStateAgeInSeconds = w, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = fe, this.disablePKCE = !!U, this.revokeTokenAdditionalContentTypes = V, this.fetchRequestCredentials = f || "same-origin", this.requestTimeoutInSeconds = R, y)
716
+ 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 = A, this.ui_locales = k, this.acr_values = x, this.resource = I, this.response_mode = D, this.filterProtocolClaims = P ?? !0, this.loadUserInfo = !!M, this.staleStateAgeInSeconds = w, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = we, this.disablePKCE = !!U, this.revokeTokenAdditionalContentTypes = V, this.fetchRequestCredentials = f || "same-origin", this.requestTimeoutInSeconds = R, y)
717
717
  this.stateStore = y;
718
718
  else {
719
- const se = typeof window < "u" ? window.localStorage : new Ge();
720
- this.stateStore = new Qe({ store: se });
719
+ const se = typeof window < "u" ? window.localStorage : new Qe();
720
+ this.stateStore = new Xe({ store: se });
721
721
  }
722
- if (this.refreshTokenAllowedScope = m, this.extraQueryParams = D, this.extraTokenParams = J, this.extraHeaders = K, this.dpop = X, this.dpop && !((Y = this.dpop) != null && Y.store))
722
+ if (this.refreshTokenAllowedScope = m, this.extraQueryParams = q, this.extraTokenParams = B, this.extraHeaders = K, this.dpop = X, this.dpop && !((Y = this.dpop) != null && Y.store))
723
723
  throw new Error("A DPoPStore is required when dpop is enabled");
724
724
  }
725
- }, rs = class {
725
+ }, ns = class {
726
726
  constructor(e, t) {
727
727
  this._settings = e, this._metadataService = t, this._logger = new p("UserInfoService"), this._getClaimsFromJwt = async (s) => {
728
728
  const i = this._logger.create("_getClaimsFromJwt");
@@ -732,7 +732,7 @@ var C = Ve, W = class {
732
732
  } catch (r) {
733
733
  throw i.error("Error parsing JWT response"), r;
734
734
  }
735
- }, this._jsonService = new Oe(
735
+ }, this._jsonService = new Ne(
736
736
  void 0,
737
737
  this._getClaimsFromJwt,
738
738
  this._settings.extraHeaders
@@ -750,9 +750,9 @@ var C = Ve, W = class {
750
750
  });
751
751
  return t.debug("got claims", i), i;
752
752
  }
753
- }, Xe = class {
753
+ }, Ye = class {
754
754
  constructor(e, t) {
755
- this._settings = e, this._metadataService = t, this._logger = new p("TokenClient"), this._jsonService = new Oe(
755
+ this._settings = e, this._metadataService = t, this._logger = new p("TokenClient"), this._jsonService = new Ne(
756
756
  this._settings.revokeTokenAdditionalContentTypes,
757
757
  null,
758
758
  this._settings.extraHeaders
@@ -882,9 +882,9 @@ var C = Ve, W = class {
882
882
  o != null && r.set(n, o);
883
883
  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");
884
884
  }
885
- }, ns = class {
885
+ }, os = class {
886
886
  constructor(e, t, s) {
887
- this._settings = e, this._metadataService = t, this._claimsService = s, this._logger = new p("ResponseValidator"), this._userInfoService = new rs(this._settings, this._metadataService), this._tokenClient = new Xe(this._settings, this._metadataService);
887
+ this._settings = e, this._metadataService = t, this._claimsService = s, this._logger = new p("ResponseValidator"), this._userInfoService = new ns(this._settings, this._metadataService), this._tokenClient = new Ye(this._settings, this._metadataService);
888
888
  }
889
889
  async validateSigninResponse(e, t, s) {
890
890
  const i = this._logger.create("validateSigninResponse");
@@ -951,9 +951,9 @@ var C = Ve, W = class {
951
951
  }
952
952
  e.profile = r;
953
953
  }
954
- }, ue = class Te {
954
+ }, ue = class Ie {
955
955
  constructor(t) {
956
- 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;
956
+ this.id = t.id || C.generateUUIDv4(), this.data = t.data, t.created && t.created > 0 ? this.created = t.created : this.created = W.getEpochTime(), this.request_type = t.request_type, this.url_state = t.url_state;
957
957
  }
958
958
  toStorageString() {
959
959
  return new p("State").create("toStorageString"), JSON.stringify({
@@ -965,17 +965,17 @@ var C = Ve, W = class {
965
965
  });
966
966
  }
967
967
  static fromStorageString(t) {
968
- return p.createStatic("State", "fromStorageString"), Promise.resolve(new Te(JSON.parse(t)));
968
+ return p.createStatic("State", "fromStorageString"), Promise.resolve(new Ie(JSON.parse(t)));
969
969
  }
970
970
  static async clearStaleState(t, s) {
971
- const i = p.createStatic("State", "clearStaleState"), r = M.getEpochTime() - s, n = await t.getAllKeys();
971
+ const i = p.createStatic("State", "clearStaleState"), r = W.getEpochTime() - s, n = await t.getAllKeys();
972
972
  i.debug("got keys", n);
973
973
  for (let o = 0; o < n.length; o++) {
974
974
  const c = n[o], l = await t.get(c);
975
975
  let d = !1;
976
976
  if (l)
977
977
  try {
978
- const h = await Te.fromStorageString(l);
978
+ const h = await Ie.fromStorageString(l);
979
979
  i.debug("got item from key:", c, h.created), h.created <= r && (d = !0);
980
980
  } catch (h) {
981
981
  i.error("Error parsing state for key:", c, h), d = !0;
@@ -985,13 +985,13 @@ var C = Ve, W = class {
985
985
  d && (i.debug("removed item for key:", c), t.remove(c));
986
986
  }
987
987
  }
988
- }, Ye = class Ie extends ue {
988
+ }, Ze = class Ee extends ue {
989
989
  constructor(t) {
990
990
  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;
991
991
  }
992
992
  static async create(t) {
993
993
  const s = t.code_verifier === !0 ? C.generateCodeVerifier() : t.code_verifier || void 0, i = s ? await C.generateCodeChallenge(s) : void 0;
994
- return new Ie({
994
+ return new Ee({
995
995
  ...t,
996
996
  code_verifier: s,
997
997
  code_challenge: i
@@ -1018,9 +1018,9 @@ var C = Ve, W = class {
1018
1018
  static fromStorageString(t) {
1019
1019
  p.createStatic("SigninState", "fromStorageString");
1020
1020
  const s = JSON.parse(t);
1021
- return Ie.create(s);
1021
+ return Ee.create(s);
1022
1022
  }
1023
- }, Ze = class et {
1023
+ }, et = class tt {
1024
1024
  constructor(t) {
1025
1025
  this.url = t.url, this.state = t.state;
1026
1026
  }
@@ -1040,13 +1040,13 @@ var C = Ve, W = class {
1040
1040
  nonce: g,
1041
1041
  url_state: _,
1042
1042
  resource: S,
1043
- skipUserInfo: x,
1043
+ skipUserInfo: A,
1044
1044
  extraQueryParams: k,
1045
- extraTokenParams: A,
1045
+ extraTokenParams: x,
1046
1046
  disablePKCE: I,
1047
- dpopJkt: N,
1047
+ dpopJkt: D,
1048
1048
  omitScopeWhenRequesting: P,
1049
- ...F
1049
+ ...M
1050
1050
  }) {
1051
1051
  if (!t)
1052
1052
  throw this._logger.error("create: No url passed"), new Error("url");
@@ -1060,7 +1060,7 @@ var C = Ve, W = class {
1060
1060
  throw this._logger.error("create: No scope passed"), new Error("scope");
1061
1061
  if (!s)
1062
1062
  throw this._logger.error("create: No authority passed"), new Error("authority");
1063
- const R = await Ye.create({
1063
+ const R = await Ze.create({
1064
1064
  data: c,
1065
1065
  request_type: d,
1066
1066
  url_state: _,
@@ -1071,22 +1071,22 @@ var C = Ve, W = class {
1071
1071
  response_mode: l,
1072
1072
  client_secret: h,
1073
1073
  scope: o,
1074
- extraTokenParams: A,
1075
- skipUserInfo: x
1074
+ extraTokenParams: x,
1075
+ skipUserInfo: A
1076
1076
  }), w = new URL(t);
1077
- w.searchParams.append("client_id", i), w.searchParams.append("redirect_uri", r), w.searchParams.append("response_type", n), P || w.searchParams.append("scope", o), g && w.searchParams.append("nonce", g), N && w.searchParams.append("dpop_jkt", N);
1077
+ w.searchParams.append("client_id", i), w.searchParams.append("redirect_uri", r), w.searchParams.append("response_type", n), P || w.searchParams.append("scope", o), g && w.searchParams.append("nonce", g), D && w.searchParams.append("dpop_jkt", D);
1078
1078
  let E = R.id;
1079
1079
  _ && (E = `${E}${G}${_}`), 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((y) => w.searchParams.append("resource", y));
1080
- for (const [U, y] of Object.entries({ response_mode: l, ...F, ...k }))
1080
+ for (const [U, y] of Object.entries({ response_mode: l, ...M, ...k }))
1081
1081
  y != null && w.searchParams.append(U, y.toString());
1082
- return new et({
1082
+ return new tt({
1083
1083
  url: w.href,
1084
1084
  state: R
1085
1085
  });
1086
1086
  }
1087
1087
  };
1088
- Ze._logger = new p("SigninRequest");
1089
- var os = Ze, as = "openid", we = class {
1088
+ et._logger = new p("SigninRequest");
1089
+ var as = et, cs = "openid", me = class {
1090
1090
  constructor(e) {
1091
1091
  if (this.access_token = "", this.token_type = "", this.profile = {}, this.state = e.get("state"), this.session_state = e.get("session_state"), this.state) {
1092
1092
  const t = decodeURIComponent(this.state).split(G);
@@ -1096,16 +1096,16 @@ var os = Ze, as = "openid", we = class {
1096
1096
  }
1097
1097
  get expires_in() {
1098
1098
  if (this.expires_at !== void 0)
1099
- return this.expires_at - M.getEpochTime();
1099
+ return this.expires_at - W.getEpochTime();
1100
1100
  }
1101
1101
  set expires_in(e) {
1102
- typeof e == "string" && (e = Number(e)), e !== void 0 && e >= 0 && (this.expires_at = Math.floor(e) + M.getEpochTime());
1102
+ typeof e == "string" && (e = Number(e)), e !== void 0 && e >= 0 && (this.expires_at = Math.floor(e) + W.getEpochTime());
1103
1103
  }
1104
1104
  get isOpenId() {
1105
1105
  var e;
1106
- return ((e = this.scope) == null ? void 0 : e.split(" ").includes(as)) || !!this.id_token;
1106
+ return ((e = this.scope) == null ? void 0 : e.split(" ").includes(cs)) || !!this.id_token;
1107
1107
  }
1108
- }, cs = class {
1108
+ }, ls = class {
1109
1109
  constructor({
1110
1110
  url: e,
1111
1111
  state_data: t,
@@ -1128,7 +1128,7 @@ var os = Ze, as = "openid", we = class {
1128
1128
  h != null && l.searchParams.append(d, h.toString());
1129
1129
  this.url = l.href;
1130
1130
  }
1131
- }, ls = class {
1131
+ }, ds = class {
1132
1132
  constructor(e) {
1133
1133
  if (this.state = e.get("state"), this.state) {
1134
1134
  const t = decodeURIComponent(this.state).split(G);
@@ -1136,7 +1136,7 @@ var os = Ze, as = "openid", we = class {
1136
1136
  }
1137
1137
  this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri");
1138
1138
  }
1139
- }, ds = [
1139
+ }, hs = [
1140
1140
  "nbf",
1141
1141
  "jti",
1142
1142
  "auth_time",
@@ -1146,7 +1146,7 @@ var os = Ze, as = "openid", we = class {
1146
1146
  "azp",
1147
1147
  "at_hash"
1148
1148
  // https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken
1149
- ], hs = ["sub", "iss", "aud", "exp", "iat"], gs = class {
1149
+ ], gs = ["sub", "iss", "aud", "exp", "iat"], us = class {
1150
1150
  constructor(e) {
1151
1151
  this._settings = e, this._logger = new p("ClaimsService");
1152
1152
  }
@@ -1154,9 +1154,9 @@ var os = Ze, as = "openid", we = class {
1154
1154
  const t = { ...e };
1155
1155
  if (this._settings.filterProtocolClaims) {
1156
1156
  let s;
1157
- Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = ds;
1157
+ Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = hs;
1158
1158
  for (const i of s)
1159
- hs.includes(i) || delete t[i];
1159
+ gs.includes(i) || delete t[i];
1160
1160
  }
1161
1161
  return t;
1162
1162
  }
@@ -1176,13 +1176,13 @@ var os = Ze, as = "openid", we = class {
1176
1176
  else typeof s[i] == "object" && typeof r == "object" ? s[i] = this.mergeClaims(s[i], r) : s[i] = r;
1177
1177
  return s;
1178
1178
  }
1179
- }, tt = class {
1179
+ }, st = class {
1180
1180
  constructor(e, t) {
1181
1181
  this.keys = e, this.nonce = t;
1182
1182
  }
1183
- }, us = class {
1183
+ }, _s = class {
1184
1184
  constructor(e, t) {
1185
- this._logger = new p("OidcClient"), this.settings = e instanceof ke ? e : new ke(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);
1185
+ this._logger = new p("OidcClient"), this.settings = e instanceof Te ? e : new Te(e), this.metadataService = t ?? new es(this.settings), this._claimsService = new us(this.settings), this._validator = new os(this.settings, this.metadataService, this._claimsService), this._tokenClient = new Ye(this.settings, this.metadataService);
1186
1186
  }
1187
1187
  async createSigninRequest({
1188
1188
  state: e,
@@ -1199,13 +1199,13 @@ var os = Ze, as = "openid", we = class {
1199
1199
  redirect_uri: g = this.settings.redirect_uri,
1200
1200
  prompt: _ = this.settings.prompt,
1201
1201
  display: S = this.settings.display,
1202
- max_age: x = this.settings.max_age,
1202
+ max_age: A = this.settings.max_age,
1203
1203
  ui_locales: k = this.settings.ui_locales,
1204
- acr_values: A = this.settings.acr_values,
1204
+ acr_values: x = this.settings.acr_values,
1205
1205
  resource: I = this.settings.resource,
1206
- response_mode: N = this.settings.response_mode,
1206
+ response_mode: D = this.settings.response_mode,
1207
1207
  extraQueryParams: P = this.settings.extraQueryParams,
1208
- extraTokenParams: F = this.settings.extraTokenParams,
1208
+ extraTokenParams: M = this.settings.extraTokenParams,
1209
1209
  dpopJkt: R,
1210
1210
  omitScopeWhenRequesting: w = this.settings.omitScopeWhenRequesting
1211
1211
  }) {
@@ -1214,7 +1214,7 @@ var os = Ze, as = "openid", we = class {
1214
1214
  throw new Error("Only the Authorization Code flow (with PKCE) is supported");
1215
1215
  const U = await this.metadataService.getAuthorizationEndpoint();
1216
1216
  E.debug("Received authorization endpoint", U);
1217
- const y = await os.create({
1217
+ const y = await as.create({
1218
1218
  url: U,
1219
1219
  authority: this.settings.authority,
1220
1220
  client_id: this.settings.client_id,
@@ -1225,19 +1225,19 @@ var os = Ze, as = "openid", we = class {
1225
1225
  url_state: l,
1226
1226
  prompt: _,
1227
1227
  display: S,
1228
- max_age: x,
1228
+ max_age: A,
1229
1229
  ui_locales: k,
1230
1230
  id_token_hint: r,
1231
1231
  login_hint: n,
1232
- acr_values: A,
1232
+ acr_values: x,
1233
1233
  dpopJkt: R,
1234
1234
  resource: I,
1235
1235
  request: t,
1236
1236
  request_uri: s,
1237
1237
  extraQueryParams: P,
1238
- extraTokenParams: F,
1238
+ extraTokenParams: M,
1239
1239
  request_type: i,
1240
- response_mode: N,
1240
+ response_mode: D,
1241
1241
  client_secret: this.settings.client_secret,
1242
1242
  skipUserInfo: o,
1243
1243
  nonce: c,
@@ -1249,13 +1249,13 @@ var os = Ze, as = "openid", we = class {
1249
1249
  return await this.settings.stateStore.set(V.id, V.toStorageString()), y;
1250
1250
  }
1251
1251
  async readSigninResponseState(e, t = !1) {
1252
- const s = this._logger.create("readSigninResponseState"), i = new we(ye.readParams(e, this.settings.response_mode));
1252
+ const s = this._logger.create("readSigninResponseState"), i = new me(be.readParams(e, this.settings.response_mode));
1253
1253
  if (!i.state)
1254
1254
  throw s.throw(new Error("No state in response")), null;
1255
1255
  const r = await this.settings.stateStore[t ? "remove" : "get"](i.state);
1256
1256
  if (!r)
1257
1257
  throw s.throw(new Error("No matching state found in storage")), null;
1258
- return { state: await Ye.fromStorageString(r), response: i };
1258
+ return { state: await Ze.fromStorageString(r), response: i };
1259
1259
  }
1260
1260
  async processSigninResponse(e, t, s = !0) {
1261
1261
  const i = this._logger.create("processSigninResponse"), { state: r, response: n } = await this.readSigninResponseState(e, s);
@@ -1266,7 +1266,7 @@ var os = Ze, as = "openid", we = class {
1266
1266
  try {
1267
1267
  await this._validator.validateSigninResponse(n, r, t);
1268
1268
  } catch (o) {
1269
- if (o instanceof be && this.settings.dpop) {
1269
+ if (o instanceof ke && this.settings.dpop) {
1270
1270
  const c = await this.getDpopProof(this.settings.dpop.store, o.nonce);
1271
1271
  t.DPoP = c, await this._validator.validateSigninResponse(n, r, t);
1272
1272
  } else
@@ -1276,7 +1276,7 @@ var os = Ze, as = "openid", we = class {
1276
1276
  }
1277
1277
  async getDpopProof(e, t) {
1278
1278
  let s, i;
1279
- 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({
1279
+ 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 st(s, t), await e.set(this.settings.client_id, i)), await C.generateDPoPProof({
1280
1280
  url: await this.metadataService.getTokenEndpoint(!1),
1281
1281
  httpMethod: "POST",
1282
1282
  keyPair: i.keys,
@@ -1289,7 +1289,7 @@ var os = Ze, as = "openid", we = class {
1289
1289
  skipUserInfo: s = !1,
1290
1290
  extraTokenParams: i = {}
1291
1291
  }) {
1292
- const r = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...i }), n = new we(new URLSearchParams());
1292
+ const r = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...i }), n = new me(new URLSearchParams());
1293
1293
  return Object.assign(n, r), await this._validator.validateCredentialsResponse(n, s), n;
1294
1294
  }
1295
1295
  async useRefreshToken({
@@ -1326,7 +1326,7 @@ var os = Ze, as = "openid", we = class {
1326
1326
  ...n
1327
1327
  });
1328
1328
  } catch (g) {
1329
- if (g instanceof be && this.settings.dpop)
1329
+ if (g instanceof ke && this.settings.dpop)
1330
1330
  r.DPoP = await this.getDpopProof(this.settings.dpop.store, g.nonce), d = await this._tokenClient.exchangeRefreshToken({
1331
1331
  refresh_token: e.refresh_token,
1332
1332
  // provide the (possible filtered) scope list
@@ -1340,7 +1340,7 @@ var os = Ze, as = "openid", we = class {
1340
1340
  else
1341
1341
  throw g;
1342
1342
  }
1343
- const h = new we(new URLSearchParams());
1343
+ const h = new me(new URLSearchParams());
1344
1344
  return Object.assign(h, d), c.debug("validating response", h), await this._validator.validateRefreshResponse(h, {
1345
1345
  ...e,
1346
1346
  // override the scope in the state handed over to the validator
@@ -1361,7 +1361,7 @@ var os = Ze, as = "openid", we = class {
1361
1361
  if (!l)
1362
1362
  throw c.throw(new Error("No end session endpoint")), null;
1363
1363
  c.debug("Received end session endpoint", l), !s && n && !t && (s = this.settings.client_id);
1364
- const d = new cs({
1364
+ const d = new ls({
1365
1365
  url: l,
1366
1366
  id_token_hint: t,
1367
1367
  client_id: s,
@@ -1376,7 +1376,7 @@ var os = Ze, as = "openid", we = class {
1376
1376
  return h && (c.debug("Signout request has state to persist"), await this.settings.stateStore.set(h.id, h.toStorageString())), d;
1377
1377
  }
1378
1378
  async readSignoutResponseState(e, t = !1) {
1379
- const s = this._logger.create("readSignoutResponseState"), i = new ls(ye.readParams(e, this.settings.response_mode));
1379
+ const s = this._logger.create("readSignoutResponseState"), i = new ds(be.readParams(e, this.settings.response_mode));
1380
1380
  if (!i.state) {
1381
1381
  if (s.debug("No state in response"), i.error)
1382
1382
  throw s.warn("Response was error:", i.error), new z(i);
@@ -1400,7 +1400,7 @@ var os = Ze, as = "openid", we = class {
1400
1400
  token_type_hint: t
1401
1401
  });
1402
1402
  }
1403
- }, _s = class {
1403
+ }, ps = class {
1404
1404
  constructor(e) {
1405
1405
  this._userManager = e, this._logger = new p("SessionMonitor"), this._start = async (t) => {
1406
1406
  const s = t.session_state;
@@ -1415,7 +1415,7 @@ var os = Ze, as = "openid", we = class {
1415
1415
  const r = await this._userManager.metadataService.getCheckSessionIframe();
1416
1416
  if (r) {
1417
1417
  i.debug("initializing check session iframe");
1418
- 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);
1418
+ const n = this._userManager.settings.client_id, o = this._userManager.settings.checkSessionIntervalInSeconds, c = this._userManager.settings.stopCheckSessionOnError, l = new Zt(this._callback, n, r, o, c);
1419
1419
  await l.load(), this._checkSessionIFrame = l, l.start(s);
1420
1420
  } else
1421
1421
  i.warn("no check session iframe found in the metadata");
@@ -1474,7 +1474,7 @@ var os = Ze, as = "openid", we = class {
1474
1474
  }
1475
1475
  }
1476
1476
  }
1477
- }, me = class st {
1477
+ }, ve = class it {
1478
1478
  constructor(t) {
1479
1479
  var s;
1480
1480
  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;
@@ -1482,10 +1482,10 @@ var os = Ze, as = "openid", we = class {
1482
1482
  /** Computed number of seconds the access token has remaining. */
1483
1483
  get expires_in() {
1484
1484
  if (this.expires_at !== void 0)
1485
- return this.expires_at - M.getEpochTime();
1485
+ return this.expires_at - W.getEpochTime();
1486
1486
  }
1487
1487
  set expires_in(t) {
1488
- t !== void 0 && (this.expires_at = Math.floor(t) + M.getEpochTime());
1488
+ t !== void 0 && (this.expires_at = Math.floor(t) + W.getEpochTime());
1489
1489
  }
1490
1490
  /** Computed value indicating if the access token is expired. */
1491
1491
  get expired() {
@@ -1511,11 +1511,11 @@ var os = Ze, as = "openid", we = class {
1511
1511
  });
1512
1512
  }
1513
1513
  static fromStorageString(t) {
1514
- return p.createStatic("User", "fromStorageString"), new st(JSON.parse(t));
1514
+ return p.createStatic("User", "fromStorageString"), new it(JSON.parse(t));
1515
1515
  }
1516
- }, Fe = "oidc-client", it = class {
1516
+ }, Me = "oidc-client", rt = class {
1517
1517
  constructor() {
1518
- this._abort = new W("Window navigation aborted"), this._disposeHandlers = /* @__PURE__ */ new Set(), this._window = null;
1518
+ this._abort = new J("Window navigation aborted"), this._disposeHandlers = /* @__PURE__ */ new Set(), this._window = null;
1519
1519
  }
1520
1520
  async navigate(e) {
1521
1521
  const t = this._logger.create("navigate");
@@ -1526,9 +1526,9 @@ var os = Ze, as = "openid", we = class {
1526
1526
  const o = (l) => {
1527
1527
  var d;
1528
1528
  const h = l.data, g = (d = e.scriptOrigin) != null ? d : window.location.origin;
1529
- if (!(l.origin !== g || (h == null ? void 0 : h.source) !== Fe)) {
1529
+ if (!(l.origin !== g || (h == null ? void 0 : h.source) !== Me)) {
1530
1530
  try {
1531
- const _ = ye.readParams(h.url, e.response_mode).get("state");
1531
+ const _ = be.readParams(h.url, e.response_mode).get("state");
1532
1532
  if (_ || t.warn("no state found in response url"), l.source !== this._window && _ !== e.state)
1533
1533
  return;
1534
1534
  } catch {
@@ -1553,7 +1553,7 @@ var os = Ze, as = "openid", we = class {
1553
1553
  }
1554
1554
  static _notifyParent(e, t, s = !1, i = window.location.origin) {
1555
1555
  const r = {
1556
- source: Fe,
1556
+ source: Me,
1557
1557
  url: t,
1558
1558
  keepOpen: s
1559
1559
  }, n = new p("_notifyParent");
@@ -1568,18 +1568,18 @@ var os = Ze, as = "openid", we = class {
1568
1568
  c.postMessage(r), c.close();
1569
1569
  }
1570
1570
  }
1571
- }, rt = {
1571
+ }, nt = {
1572
1572
  location: !1,
1573
1573
  toolbar: !1,
1574
1574
  height: 640,
1575
1575
  closePopupWindowAfterInSeconds: -1
1576
- }, nt = "_blank", ps = 60, fs = 2, ot = 10, ws = class extends ke {
1576
+ }, ot = "_blank", fs = 60, ws = 2, at = 10, ms = class extends Te {
1577
1577
  constructor(e) {
1578
1578
  const {
1579
1579
  popup_redirect_uri: t = e.redirect_uri,
1580
1580
  popup_post_logout_redirect_uri: s = e.post_logout_redirect_uri,
1581
- popupWindowFeatures: i = rt,
1582
- popupWindowTarget: r = nt,
1581
+ popupWindowFeatures: i = nt,
1582
+ popupWindowTarget: r = ot,
1583
1583
  redirectMethod: n = "assign",
1584
1584
  redirectTarget: o = "self",
1585
1585
  iframeNotifyParentOrigin: c = e.iframeNotifyParentOrigin,
@@ -1589,30 +1589,30 @@ var os = Ze, as = "openid", we = class {
1589
1589
  silentRequestTimeoutInSeconds: g,
1590
1590
  automaticSilentRenew: _ = !0,
1591
1591
  validateSubOnSilentRenew: S = !0,
1592
- includeIdTokenInSilentRenew: x = !1,
1592
+ includeIdTokenInSilentRenew: A = !1,
1593
1593
  monitorSession: k = !1,
1594
- monitorAnonymousSession: A = !1,
1595
- checkSessionIntervalInSeconds: I = fs,
1596
- query_status_response_type: N = "code",
1594
+ monitorAnonymousSession: x = !1,
1595
+ checkSessionIntervalInSeconds: I = ws,
1596
+ query_status_response_type: D = "code",
1597
1597
  stopCheckSessionOnError: P = !0,
1598
- revokeTokenTypes: F = ["access_token", "refresh_token"],
1598
+ revokeTokenTypes: M = ["access_token", "refresh_token"],
1599
1599
  revokeTokensOnSignout: R = !1,
1600
1600
  includeIdTokenInSilentSignout: w = !1,
1601
- accessTokenExpiringNotificationTimeInSeconds: E = ps,
1601
+ accessTokenExpiringNotificationTimeInSeconds: E = fs,
1602
1602
  userStore: U
1603
1603
  } = e;
1604
- 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 = F, this.revokeTokensOnSignout = R, this.includeIdTokenInSilentSignout = w, this.accessTokenExpiringNotificationTimeInSeconds = E, U)
1604
+ 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 || at, this.automaticSilentRenew = _, this.validateSubOnSilentRenew = S, this.includeIdTokenInSilentRenew = A, this.monitorSession = k, this.monitorAnonymousSession = x, this.checkSessionIntervalInSeconds = I, this.stopCheckSessionOnError = P, this.query_status_response_type = D, this.revokeTokenTypes = M, this.revokeTokensOnSignout = R, this.includeIdTokenInSilentSignout = w, this.accessTokenExpiringNotificationTimeInSeconds = E, U)
1605
1605
  this.userStore = U;
1606
1606
  else {
1607
- const y = typeof window < "u" ? window.sessionStorage : new Ge();
1608
- this.userStore = new Qe({ store: y });
1607
+ const y = typeof window < "u" ? window.sessionStorage : new Qe();
1608
+ this.userStore = new Xe({ store: y });
1609
1609
  }
1610
1610
  }
1611
- }, Me = class at extends it {
1611
+ }, We = class ct extends rt {
1612
1612
  constructor({
1613
- silentRequestTimeoutInSeconds: t = ot
1613
+ silentRequestTimeoutInSeconds: t = at
1614
1614
  }) {
1615
- super(), this._logger = new p("IFrameWindow"), this._timeoutInSeconds = t, this._frame = at.createHiddenIframe(), this._window = this._frame.contentWindow;
1615
+ super(), this._logger = new p("IFrameWindow"), this._timeoutInSeconds = t, this._frame = ct.createHiddenIframe(), this._window = this._frame.contentWindow;
1616
1616
  }
1617
1617
  static createHiddenIframe() {
1618
1618
  const t = window.document.createElement("iframe");
@@ -1620,7 +1620,7 @@ var os = Ze, as = "openid", we = class {
1620
1620
  }
1621
1621
  async navigate(t) {
1622
1622
  this._logger.debug("navigate: Using timeout of:", this._timeoutInSeconds);
1623
- const s = setTimeout(() => void this._abort.raise(new Ae("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
1623
+ const s = setTimeout(() => void this._abort.raise(new Oe("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
1624
1624
  return this._disposeHandlers.add(() => clearTimeout(s)), await super.navigate(t);
1625
1625
  }
1626
1626
  close() {
@@ -1634,27 +1634,27 @@ var os = Ze, as = "openid", we = class {
1634
1634
  static notifyParent(t, s) {
1635
1635
  return super._notifyParent(window.parent, t, !1, s);
1636
1636
  }
1637
- }, ms = class {
1637
+ }, vs = class {
1638
1638
  constructor(e) {
1639
1639
  this._settings = e, this._logger = new p("IFrameNavigator");
1640
1640
  }
1641
1641
  async prepare({
1642
1642
  silentRequestTimeoutInSeconds: e = this._settings.silentRequestTimeoutInSeconds
1643
1643
  }) {
1644
- return new Me({ silentRequestTimeoutInSeconds: e });
1644
+ return new We({ silentRequestTimeoutInSeconds: e });
1645
1645
  }
1646
1646
  async callback(e) {
1647
- this._logger.create("callback"), Me.notifyParent(e, this._settings.iframeNotifyParentOrigin);
1647
+ this._logger.create("callback"), We.notifyParent(e, this._settings.iframeNotifyParentOrigin);
1648
1648
  }
1649
- }, vs = 500, Ss = 1e3, We = class extends it {
1649
+ }, Ss = 500, ys = 1e3, Je = class extends rt {
1650
1650
  constructor({
1651
- popupWindowTarget: e = nt,
1651
+ popupWindowTarget: e = ot,
1652
1652
  popupWindowFeatures: t = {},
1653
1653
  popupSignal: s
1654
1654
  }) {
1655
1655
  super(), this._logger = new p("PopupWindow");
1656
- const i = je.center({ ...rt, ...t });
1657
- this._window = window.open(void 0, e, je.serialize(i)), s && s.addEventListener("abort", () => {
1656
+ const i = Fe.center({ ...nt, ...t });
1657
+ this._window = window.open(void 0, e, Fe.serialize(i)), s && s.addEventListener("abort", () => {
1658
1658
  var r;
1659
1659
  this._abort.raise(new Error((r = s.reason) != null ? r : "Popup aborted"));
1660
1660
  }), t.closePopupWindowAfterInSeconds && t.closePopupWindowAfterInSeconds > 0 && setTimeout(() => {
@@ -1663,14 +1663,14 @@ var os = Ze, as = "openid", we = class {
1663
1663
  return;
1664
1664
  }
1665
1665
  this.close();
1666
- }, t.closePopupWindowAfterInSeconds * Ss);
1666
+ }, t.closePopupWindowAfterInSeconds * ys);
1667
1667
  }
1668
1668
  async navigate(e) {
1669
1669
  var t;
1670
1670
  (t = this._window) == null || t.focus();
1671
1671
  const s = setInterval(() => {
1672
1672
  (!this._window || this._window.closed) && (this._logger.debug("Popup closed by user or isolated by redirect"), i(), this._disposeHandlers.delete(i));
1673
- }, vs), i = () => clearInterval(s);
1673
+ }, Ss), i = () => clearInterval(s);
1674
1674
  return this._disposeHandlers.add(i), await super.navigate(e);
1675
1675
  }
1676
1676
  close() {
@@ -1679,7 +1679,7 @@ var os = Ze, as = "openid", we = class {
1679
1679
  static notifyOpener(e, t) {
1680
1680
  super._notifyParent(window.opener, e, t), !t && !window.opener && window.close();
1681
1681
  }
1682
- }, ys = class {
1682
+ }, bs = class {
1683
1683
  constructor(e) {
1684
1684
  this._settings = e, this._logger = new p("PopupNavigator");
1685
1685
  }
@@ -1688,12 +1688,12 @@ var os = Ze, as = "openid", we = class {
1688
1688
  popupWindowTarget: t = this._settings.popupWindowTarget,
1689
1689
  popupSignal: s
1690
1690
  }) {
1691
- return new We({ popupWindowFeatures: e, popupWindowTarget: t, popupSignal: s });
1691
+ return new Je({ popupWindowFeatures: e, popupWindowTarget: t, popupSignal: s });
1692
1692
  }
1693
1693
  async callback(e, { keepOpen: t = !1 }) {
1694
- this._logger.create("callback"), We.notifyOpener(e, t);
1694
+ this._logger.create("callback"), Je.notifyOpener(e, t);
1695
1695
  }
1696
- }, bs = class {
1696
+ }, ks = class {
1697
1697
  constructor(e) {
1698
1698
  this._settings = e, this._logger = new p("RedirectNavigator");
1699
1699
  }
@@ -1722,9 +1722,9 @@ var os = Ze, as = "openid", we = class {
1722
1722
  }
1723
1723
  async callback() {
1724
1724
  }
1725
- }, ks = class extends Xt {
1725
+ }, Ts = class extends Yt {
1726
1726
  constructor(e) {
1727
- super({ expiringNotificationTimeInSeconds: e.accessTokenExpiringNotificationTimeInSeconds }), this._logger = new p("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");
1727
+ super({ expiringNotificationTimeInSeconds: e.accessTokenExpiringNotificationTimeInSeconds }), this._logger = new p("UserManagerEvents"), this._userLoaded = new J("User loaded"), this._userUnloaded = new J("User unloaded"), this._silentRenewError = new J("Silent renew error"), this._userSignedIn = new J("User signed in"), this._userSignedOut = new J("User signed out"), this._userSessionChanged = new J("User session changed");
1728
1728
  }
1729
1729
  async load(e, t = !0) {
1730
1730
  await super.load(e), t && await this._userLoaded.raise(e);
@@ -1831,14 +1831,14 @@ var os = Ze, as = "openid", we = class {
1831
1831
  async _raiseUserSessionChanged() {
1832
1832
  await this._userSessionChanged.raise();
1833
1833
  }
1834
- }, Ts = class {
1834
+ }, Is = class {
1835
1835
  constructor(e) {
1836
- this._userManager = e, this._logger = new p("SilentRenewService"), this._isStarted = !1, this._retryTimer = new M("Retry Silent Renew"), this._tokenExpiring = async () => {
1836
+ this._userManager = e, this._logger = new p("SilentRenewService"), this._isStarted = !1, this._retryTimer = new W("Retry Silent Renew"), this._tokenExpiring = async () => {
1837
1837
  const t = this._logger.create("_tokenExpiring");
1838
1838
  try {
1839
1839
  await this._userManager.signinSilent(), t.debug("silent token renewal successful");
1840
1840
  } catch (s) {
1841
- if (s instanceof Ae) {
1841
+ if (s instanceof Oe) {
1842
1842
  t.warn("ErrorTimeout from signinSilent:", s, "retry in 5s"), this._retryTimer.init(5);
1843
1843
  return;
1844
1844
  }
@@ -1860,13 +1860,13 @@ var os = Ze, as = "openid", we = class {
1860
1860
  stop() {
1861
1861
  this._isStarted && (this._retryTimer.cancel(), this._retryTimer.removeHandler(this._tokenExpiring), this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring), this._isStarted = !1);
1862
1862
  }
1863
- }, Is = class {
1863
+ }, Es = class {
1864
1864
  constructor(e) {
1865
1865
  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;
1866
1866
  }
1867
- }, Es = class {
1867
+ }, Cs = class {
1868
1868
  constructor(e, t, s, i) {
1869
- this._logger = new p("UserManager"), this.settings = new ws(e), this._client = new us(e), this._redirectNavigator = t ?? new bs(this.settings), this._popupNavigator = s ?? new ys(this.settings), this._iframeNavigator = i ?? new ms(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));
1869
+ this._logger = new p("UserManager"), this.settings = new ms(e), this._client = new _s(e), this._redirectNavigator = t ?? new ks(this.settings), this._popupNavigator = s ?? new bs(this.settings), this._iframeNavigator = i ?? new vs(this.settings), this._events = new Ts(this.settings), this._silentRenewService = new Is(this), this.settings.automaticSilentRenew && this.startSilentRenew(), this._sessionMonitor = null, this.settings.monitorSession && (this._sessionMonitor = new ps(this));
1870
1870
  }
1871
1871
  /**
1872
1872
  * Get object used to register for events raised by the `UserManager`.
@@ -2008,7 +2008,7 @@ var os = Ze, as = "openid", we = class {
2008
2008
  let o = await this._loadUser();
2009
2009
  if (o != null && o.refresh_token) {
2010
2010
  i.debug("using refresh token");
2011
- const g = new Is(o);
2011
+ const g = new Es(o);
2012
2012
  return await this._useRefreshToken({
2013
2013
  state: g,
2014
2014
  redirect_uri: n.redirect_uri,
@@ -2037,7 +2037,7 @@ var os = Ze, as = "openid", we = class {
2037
2037
  const t = await this._client.useRefreshToken({
2038
2038
  timeoutInSeconds: this.settings.silentRequestTimeoutInSeconds,
2039
2039
  ...e
2040
- }), s = new me({ ...e.state, ...t });
2040
+ }), s = new ve({ ...e.state, ...t });
2041
2041
  return await this.storeUser(s), await this._events.load(s), s;
2042
2042
  }
2043
2043
  /**
@@ -2167,7 +2167,7 @@ var os = Ze, as = "openid", we = class {
2167
2167
  return s.debug("got signin response"), await this._buildUser(r, t);
2168
2168
  }
2169
2169
  async _buildUser(e, t) {
2170
- const s = this._logger.create("_buildUser"), i = new me(e);
2170
+ const s = this._logger.create("_buildUser"), i = new ve(e);
2171
2171
  if (t) {
2172
2172
  if (t !== i.profile.sub)
2173
2173
  throw s.debug("current user does not match user returned from signin. sub from signin:", i.profile.sub), new z({ ...e, error: "login_required" });
@@ -2331,7 +2331,7 @@ var os = Ze, as = "openid", we = class {
2331
2331
  }
2332
2332
  async _loadUser() {
2333
2333
  const e = this._logger.create("_loadUser"), t = await this.settings.userStore.get(this._userStoreKey);
2334
- return t ? (e.debug("user storageString loaded"), me.fromStorageString(t)) : (e.debug("no user storageString"), null);
2334
+ return t ? (e.debug("user storageString loaded"), ve.fromStorageString(t)) : (e.debug("no user storageString"), null);
2335
2335
  }
2336
2336
  async storeUser(e) {
2337
2337
  const t = this._logger.create("storeUser");
@@ -2375,108 +2375,167 @@ var os = Ze, as = "openid", we = class {
2375
2375
  let t = await e.store.get(this.settings.client_id);
2376
2376
  if (!t) {
2377
2377
  const s = await C.generateDPoPKeys();
2378
- t = new tt(s), await e.store.set(this.settings.client_id, t);
2378
+ t = new st(s), await e.store.set(this.settings.client_id, t);
2379
2379
  }
2380
2380
  return await C.generateDPoPJkt(t.keys);
2381
2381
  }
2382
2382
  };
2383
- const Cs = ["url", "clientId", "redirectUri", "scope", "logoutUrl", "loadUserInfo"], Ps = "openid profile email";
2384
- function Rs(e, t) {
2383
+ const Ps = ["url", "clientId", "redirectUri", "scope", "logoutUrl", "loadUserInfo", "useStateBasedRedirect", "stateMaxAge", "onRedirect"], Rs = "openid profile email", fe = "apicurio.oidc.state.", Us = 3e5;
2384
+ function As(e, t) {
2385
2385
  const s = {};
2386
2386
  return e.forEach((i) => {
2387
2387
  t[i] !== void 0 && (s[i] = t[i]);
2388
2388
  }), s;
2389
2389
  }
2390
- let u, B;
2391
- const Us = (e) => (B = Rs(Cs, e), new Es({
2392
- authority: B.url,
2393
- client_id: B.clientId,
2394
- redirect_uri: B.redirectUri,
2390
+ function xs() {
2391
+ return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).substring(2, 15)}`;
2392
+ }
2393
+ function Os(e, t) {
2394
+ const s = `${fe}${e}`, i = {
2395
+ location: t,
2396
+ timestamp: Date.now()
2397
+ };
2398
+ sessionStorage.setItem(s, JSON.stringify(i));
2399
+ }
2400
+ function Ns(e) {
2401
+ const t = `${fe}${e}`, s = sessionStorage.getItem(t);
2402
+ if (!s)
2403
+ return null;
2404
+ try {
2405
+ return JSON.parse(s).location;
2406
+ } catch (i) {
2407
+ return console.error("[Auth] Error parsing stored redirect state:", i), null;
2408
+ }
2409
+ }
2410
+ function Ds(e) {
2411
+ const t = `${fe}${e}`;
2412
+ sessionStorage.removeItem(t);
2413
+ }
2414
+ function qs(e) {
2415
+ const t = Date.now(), s = [];
2416
+ for (let i = 0; i < sessionStorage.length; i++) {
2417
+ const r = sessionStorage.key(i);
2418
+ if (r && r.startsWith(fe)) {
2419
+ const n = sessionStorage.getItem(r);
2420
+ if (n)
2421
+ try {
2422
+ const o = JSON.parse(n);
2423
+ t - o.timestamp > e && s.push(r);
2424
+ } catch {
2425
+ s.push(r);
2426
+ }
2427
+ }
2428
+ }
2429
+ s.forEach((i) => sessionStorage.removeItem(i)), s.length > 0 && console.debug(`[Auth] Cleaned up ${s.length} expired state entries`);
2430
+ }
2431
+ function $s(e) {
2432
+ return !e || e.trim() === "" ? !1 : !e.startsWith("/") || e.includes("://") ? (console.warn(`[Auth] Invalid redirect location (must be relative path): ${e}`), !1) : e.toLowerCase().startsWith("javascript:") ? (console.warn(`[Auth] Blocked potentially malicious redirect location: ${e}`), !1) : !0;
2433
+ }
2434
+ let u, O;
2435
+ const Ls = (e) => (O = As(Ps, e), new Cs({
2436
+ authority: O.url,
2437
+ client_id: O.clientId,
2438
+ redirect_uri: O.redirectUri,
2395
2439
  response_type: "code",
2396
- scope: B.scope || Ps,
2440
+ scope: O.scope || Rs,
2397
2441
  filterProtocolClaims: !0,
2398
2442
  includeIdTokenInSilentRenew: !0,
2399
2443
  includeIdTokenInSilentSignout: !0,
2400
- loadUserInfo: B.loadUserInfo ?? !0
2401
- })), xs = async () => {
2444
+ loadUserInfo: O.loadUserInfo ?? !0
2445
+ })), js = async () => {
2402
2446
  try {
2403
2447
  console.debug("[Auth] Logging in using OIDC");
2404
- const e = new URL(window.location.href), t = await (u == null ? void 0 : u.getUser());
2405
- e.searchParams.get("state") || t ? await (u == null ? void 0 : u.signinRedirectCallback()) : await (u == null ? void 0 : u.signinRedirect().then(() => {
2406
- u == null || u.startSilentRenew(), u == null || u.signinRedirectCallback();
2407
- }).catch((s) => {
2408
- console.log(s);
2409
- }));
2448
+ const e = new URL(window.location.href), t = await (u == null ? void 0 : u.getUser()), s = O.useStateBasedRedirect !== !1, i = O.stateMaxAge || Us;
2449
+ if (s && qs(i), e.searchParams.get("state") || t) {
2450
+ const r = await (u == null ? void 0 : u.signinRedirectCallback());
2451
+ if (u == null || u.startSilentRenew(), console.debug("[Auth] Started silent token renewal"), s && (r != null && r.state)) {
2452
+ const n = r.state.redirectStateId;
2453
+ if (n) {
2454
+ const o = Ns(n);
2455
+ if (Ds(n), o && $s(o)) {
2456
+ console.debug(`[Auth] Redirecting to stored location: ${o}`), O.onRedirect ? O.onRedirect(o) : window.location.href = o;
2457
+ return;
2458
+ } else
2459
+ console.debug("[Auth] No valid stored location found, staying at current page");
2460
+ }
2461
+ }
2462
+ } else if (s) {
2463
+ const r = xs(), n = window.location.pathname + window.location.search + window.location.hash;
2464
+ Os(r, n), console.debug(`[Auth] Stored redirect location: ${n} with state ID: ${r}`), await (u == null ? void 0 : u.signinRedirect({
2465
+ state: { redirectStateId: r }
2466
+ }));
2467
+ } else
2468
+ await (u == null ? void 0 : u.signinRedirect());
2410
2469
  } catch (e) {
2411
2470
  console.error("[Auth] Error logging in using OIDC: ", e);
2412
2471
  }
2413
- }, As = async () => {
2472
+ }, Hs = async () => {
2414
2473
  try {
2415
2474
  console.debug("[Auth] Refreshing token using OIDC"), await (u == null ? void 0 : u.signinSilent());
2416
2475
  } catch (e) {
2417
2476
  console.error("[Auth] Error refreshing token using OIDC: ", e);
2418
2477
  }
2419
- }, Os = async () => {
2478
+ }, Fs = async () => {
2420
2479
  const e = await (u == null ? void 0 : u.getUser()), t = e == null ? void 0 : e.id_token;
2421
2480
  return u == null ? void 0 : u.removeUser().then(() => u == null ? void 0 : u.signoutRedirect({
2422
2481
  id_token_hint: t,
2423
- post_logout_redirect_uri: B.logoutUrl || window.location.href
2482
+ post_logout_redirect_uri: O.logoutUrl || window.location.href
2424
2483
  }));
2425
- }, Ns = async () => await (u == null ? void 0 : u.getUser()) != null, Ds = async () => {
2484
+ }, Ms = async () => await (u == null ? void 0 : u.getUser()) != null, Ws = async () => {
2426
2485
  const e = await (u == null ? void 0 : u.getUser());
2427
2486
  return Promise.resolve(e == null ? void 0 : e.access_token);
2428
- }, qs = async () => {
2487
+ }, Js = async () => {
2429
2488
  const e = await (u == null ? void 0 : u.getUser());
2430
2489
  return Promise.resolve(e == null ? void 0 : e.id_token);
2431
- }, Ls = async () => {
2490
+ }, Bs = async () => {
2432
2491
  const e = await (u == null ? void 0 : u.getUser());
2433
2492
  return Promise.resolve(e == null ? void 0 : e.profile.preferred_username);
2434
2493
  };
2435
2494
  let Q, ee;
2436
- const $s = async (e, t) => {
2495
+ const Ks = async (e, t) => {
2437
2496
  try {
2438
2497
  console.debug("[Auth] Setting Username and Password for BasicAuth"), Q = e, ee = t;
2439
2498
  } catch (s) {
2440
2499
  console.error("[Auth] Error logging in using BasicAuth: ", s);
2441
2500
  }
2442
- }, Hs = async () => {
2501
+ }, zs = async () => {
2443
2502
  console.debug("[Auth] Logout for BasicAuth"), Q = void 0, ee = void 0, window.location.reload();
2444
- }, js = async () => Q !== void 0 && ee !== void 0, Fs = async () => Promise.resolve(Q), Ms = () => {
2503
+ }, Vs = async () => Q !== void 0 && ee !== void 0, Gs = async () => Promise.resolve(Q), Qs = () => {
2445
2504
  if (Q !== void 0 && ee != null)
2446
2505
  return {
2447
2506
  username: Q,
2448
2507
  password: ee
2449
2508
  };
2450
- }, ct = () => {
2451
- const e = ut(Kt);
2452
- return e.type === "oidc" ? (u === void 0 && (console.debug("[Auth] Creating OIDC UserManager with options: ", e.options), u = Us(e.options)), {
2509
+ }, lt = () => {
2510
+ const e = _t(Kt);
2511
+ return e.type === "oidc" ? (u === void 0 && (console.debug("[Auth] Creating OIDC UserManager with options: ", e.options), u = Ls(e.options)), {
2453
2512
  isOidcAuthEnabled: () => !0,
2454
2513
  isBasicAuthEnabled: () => !1,
2455
- isAuthenticated: Ns,
2514
+ isAuthenticated: Ms,
2456
2515
  getToken: async () => {
2457
2516
  if (e.options.logTokens) {
2458
2517
  const t = await (u == null ? void 0 : u.getUser());
2459
2518
  console.debug("[Auth] ID Token:"), console.debug(t == null ? void 0 : t.id_token), console.debug("[Auth] Access Token:"), console.debug(t == null ? void 0 : t.access_token);
2460
2519
  }
2461
- return e.options.tokenType === "id" ? qs() : Ds();
2520
+ return e.options.tokenType === "id" ? Js() : Ws();
2462
2521
  },
2463
2522
  getUsernameAndPassword: () => {
2464
2523
  },
2465
- getUsername: Ls,
2466
- login: xs,
2467
- refresh: As,
2468
- logout: Os
2524
+ getUsername: Bs,
2525
+ login: js,
2526
+ refresh: Hs,
2527
+ logout: Fs
2469
2528
  }) : e.type === "basic" ? {
2470
2529
  isOidcAuthEnabled: () => !1,
2471
2530
  isBasicAuthEnabled: () => !0,
2472
- isAuthenticated: js,
2531
+ isAuthenticated: Vs,
2473
2532
  getToken: async () => {
2474
2533
  },
2475
- getUsernameAndPassword: Ms,
2476
- getUsername: Fs,
2477
- login: $s,
2534
+ getUsernameAndPassword: Qs,
2535
+ getUsername: Gs,
2536
+ login: Ks,
2478
2537
  refresh: () => Promise.resolve(),
2479
- logout: Hs
2538
+ logout: zs
2480
2539
  } : {
2481
2540
  isOidcAuthEnabled: () => !1,
2482
2541
  isBasicAuthEnabled: () => !1,
@@ -2489,9 +2548,9 @@ const $s = async (e, t) => {
2489
2548
  refresh: () => Promise.resolve(),
2490
2549
  logout: () => Promise.resolve()
2491
2550
  };
2492
- }, Ee = (e) => {
2551
+ }, Ce = (e) => {
2493
2552
  const [t, s] = T(""), [i, r] = T(""), n = e.format || "locale";
2494
- _t(() => {
2553
+ pt(() => {
2495
2554
  n === "fromNow" && o();
2496
2555
  }, 5e3);
2497
2556
  const o = () => {
@@ -2505,28 +2564,28 @@ const $s = async (e, t) => {
2505
2564
  };
2506
2565
  return pe(() => {
2507
2566
  o();
2508
- }, [e.date]), n === "fromNow" ? /* @__PURE__ */ a(pt, { content: /* @__PURE__ */ a("span", { children: i }), children: /* @__PURE__ */ a("span", { children: t }) }) : /* @__PURE__ */ a("span", { children: t });
2509
- }, ei = (e) => /* @__PURE__ */ a(Ee, { date: e.date, format: "fromNow" }), O = ({ condition: e, children: t }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ a(j.Fragment, { children: t }) : /* @__PURE__ */ a(j.Fragment, {}), ti = ({ collection: e, emptyState: t, emptyStateTitle: s, emptyStateMessage: i, children: r }) => {
2510
- const n = () => !e || e.length === 0, o = t || /* @__PURE__ */ v(oe, { variant: ft.xs, children: [
2567
+ }, [e.date]), n === "fromNow" ? /* @__PURE__ */ a(ft, { content: /* @__PURE__ */ a("span", { children: i }), children: /* @__PURE__ */ a("span", { children: t }) }) : /* @__PURE__ */ a("span", { children: t });
2568
+ }, ci = (e) => /* @__PURE__ */ a(Ce, { date: e.date, format: "fromNow" }), N = ({ condition: e, children: t }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ a(F.Fragment, { children: t }) : /* @__PURE__ */ a(F.Fragment, {}), li = ({ collection: e, emptyState: t, emptyStateTitle: s, emptyStateMessage: i, children: r }) => {
2569
+ const n = () => !e || e.length === 0, o = t || /* @__PURE__ */ v(oe, { variant: wt.xs, children: [
2511
2570
  /* @__PURE__ */ a(ae, { titleText: s || "None found", headingLevel: "h4" }),
2512
- /* @__PURE__ */ a(ve, { children: i || "No items found." })
2571
+ /* @__PURE__ */ a(Se, { children: i || "No items found." })
2513
2572
  ] });
2514
- return n() ? /* @__PURE__ */ a(j.Fragment, { children: o }) : /* @__PURE__ */ a(j.Fragment, { children: r });
2573
+ return n() ? /* @__PURE__ */ a(F.Fragment, { children: o }) : /* @__PURE__ */ a(F.Fragment, { children: r });
2515
2574
  }, _e = ({ isLoading: e, loadingComponent: t, children: s }) => {
2516
2575
  const i = () => typeof e == "boolean" ? e : e(), r = t || /* @__PURE__ */ a(te, {});
2517
- return i() ? /* @__PURE__ */ a(j.Fragment, { children: r }) : /* @__PURE__ */ a(j.Fragment, { children: s });
2518
- }, si = ({ toolbar: e, alwaysShowToolbar: t, emptyState: s, filteredEmptyState: i, isLoading: r, isError: n, loadingComponent: o, errorComponent: c, isEmpty: l, isFiltered: d, children: h }) => {
2576
+ return i() ? /* @__PURE__ */ a(F.Fragment, { children: r }) : /* @__PURE__ */ a(F.Fragment, { children: s });
2577
+ }, di = ({ toolbar: e, alwaysShowToolbar: t, emptyState: s, filteredEmptyState: i, isLoading: r, isError: n, loadingComponent: o, errorComponent: c, isEmpty: l, isFiltered: d, children: h }) => {
2519
2578
  const g = t || !l || d || n;
2520
- return c || (c = /* @__PURE__ */ a("div", { style: { padding: "15px", backgroundColor: "white" }, children: /* @__PURE__ */ a(wt, { 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(j.Fragment, { children: [
2521
- /* @__PURE__ */ a(O, { condition: g, children: e }),
2579
+ 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(F.Fragment, { children: [
2580
+ /* @__PURE__ */ a(N, { condition: g, children: e }),
2522
2581
  /* @__PURE__ */ v(_e, { isLoading: r, loadingComponent: o, children: [
2523
- /* @__PURE__ */ a(O, { condition: !l && !n, children: h }),
2524
- /* @__PURE__ */ a(O, { condition: l && d && !n, children: i }),
2525
- /* @__PURE__ */ a(O, { condition: l && !d && !n, children: s }),
2526
- /* @__PURE__ */ a(O, { condition: n, children: c })
2582
+ /* @__PURE__ */ a(N, { condition: !l && !n, children: h }),
2583
+ /* @__PURE__ */ a(N, { condition: l && d && !n, children: i }),
2584
+ /* @__PURE__ */ a(N, { condition: l && !d && !n, children: s }),
2585
+ /* @__PURE__ */ a(N, { condition: n, children: c })
2527
2586
  ] })
2528
2587
  ] });
2529
- }, ii = (e) => {
2588
+ }, hi = (e) => {
2530
2589
  const [t, s] = T(!1), i = (l, d) => {
2531
2590
  s(!1);
2532
2591
  const h = d;
@@ -2539,15 +2598,15 @@ const $s = async (e, t) => {
2539
2598
  }, o = e.popperProps || {
2540
2599
  appendTo: e.menuAppendTo
2541
2600
  };
2542
- let c = /* @__PURE__ */ a(Nt, { title: e.label });
2543
- return e.isKebab || (c = /* @__PURE__ */ a(j.Fragment, { children: e.label })), /* @__PURE__ */ a(
2544
- mt,
2601
+ let c = /* @__PURE__ */ a(Dt, { title: e.label });
2602
+ return e.isKebab || (c = /* @__PURE__ */ a(F.Fragment, { children: e.label })), /* @__PURE__ */ a(
2603
+ vt,
2545
2604
  {
2546
2605
  isOpen: t,
2547
2606
  onSelect: i,
2548
2607
  onOpenChange: (l) => s(l),
2549
2608
  toggle: (l) => /* @__PURE__ */ a(
2550
- Je,
2609
+ Be,
2551
2610
  {
2552
2611
  "data-testid": e.testId,
2553
2612
  ref: l,
@@ -2560,8 +2619,8 @@ const $s = async (e, t) => {
2560
2619
  ouiaId: "ObjectDropdown",
2561
2620
  popperProps: o,
2562
2621
  shouldFocusToggleOnSelect: !0,
2563
- 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(
2564
- St,
2622
+ children: /* @__PURE__ */ a(St, { children: e.items.map((l, d) => e.itemIsVisible !== void 0 && !e.itemIsVisible(l) ? /* @__PURE__ */ a(Ue, {}) : e.itemIsDivider && e.itemIsDivider(l) ? /* @__PURE__ */ a(Ke, { component: "li" }, `divider-${d}`) : /* @__PURE__ */ a(
2623
+ yt,
2565
2624
  {
2566
2625
  value: d,
2567
2626
  isDisabled: e.itemIsDisabled === void 0 ? !1 : e.itemIsDisabled(l),
@@ -2572,7 +2631,7 @@ const $s = async (e, t) => {
2572
2631
  )) })
2573
2632
  }
2574
2633
  );
2575
- }, Ws = (e) => {
2634
+ }, Xs = (e) => {
2576
2635
  var l;
2577
2636
  const [t, s] = T(!1), i = (d, h) => {
2578
2637
  s(!1), e.onSelect(e.items[h]);
@@ -2582,7 +2641,7 @@ const $s = async (e, t) => {
2582
2641
  let h;
2583
2642
  return e.itemToTestId !== void 0 && (h = e.itemToTestId(d)), h;
2584
2643
  }, o = (d) => /* @__PURE__ */ a(
2585
- Je,
2644
+ Be,
2586
2645
  {
2587
2646
  ref: d,
2588
2647
  className: e.toggleClassname || "menu-toggle",
@@ -2595,7 +2654,7 @@ const $s = async (e, t) => {
2595
2654
  appendTo: e.appendTo === "document" ? () => document.body : "inline"
2596
2655
  };
2597
2656
  return /* @__PURE__ */ a(
2598
- yt,
2657
+ bt,
2599
2658
  {
2600
2659
  toggle: o,
2601
2660
  id: e.toggleId,
@@ -2604,7 +2663,7 @@ const $s = async (e, t) => {
2604
2663
  isOpen: t,
2605
2664
  popperProps: c,
2606
2665
  children: (l = e.items) == null ? void 0 : l.map((d, h) => e.itemIsDivider && e.itemIsDivider(d) ? /* @__PURE__ */ a(Ke, {}, h) : /* @__PURE__ */ a(
2607
- bt,
2666
+ kt,
2608
2667
  {
2609
2668
  isSelected: d === e.value,
2610
2669
  component: (g) => /* @__PURE__ */ a("button", { ...g, "data-testid": n(d) }),
@@ -2615,20 +2674,20 @@ const $s = async (e, t) => {
2615
2674
  ))
2616
2675
  }
2617
2676
  );
2618
- }, ri = ({ expanded: e, onClick: t }) => e ? /* @__PURE__ */ a(Dt, { onClick: t, style: { cursor: "pointer" } }) : /* @__PURE__ */ a(qt, { onClick: t, style: { cursor: "pointer" } }), lt = {
2677
+ }, gi = ({ expanded: e, onClick: t }) => e ? /* @__PURE__ */ a(qt, { onClick: t, style: { cursor: "pointer" } }) : /* @__PURE__ */ a($t, { onClick: t, style: { cursor: "pointer" } }), dt = {
2619
2678
  padding: "5px",
2620
2679
  minHeight: "128px",
2621
2680
  borderRight: 0,
2622
2681
  borderLeft: 0,
2623
2682
  borderBottom: "1px solid #666",
2624
2683
  backgroundColor: "rgb(240, 240, 240)"
2625
- }, Js = {
2626
- ...lt,
2684
+ }, Ys = {
2685
+ ...dt,
2627
2686
  color: "red",
2628
2687
  overflow: "auto"
2629
- }, ni = (e) => {
2630
- const [t, s] = T(""), [i, r] = T(""), [n, o] = T(!1), [c, l] = T(), d = (k, A) => {
2631
- s(A);
2688
+ }, ui = (e) => {
2689
+ const [t, s] = T(""), [i, r] = T(""), [n, o] = T(!1), [c, l] = T(), d = (k, x) => {
2690
+ s(x);
2632
2691
  }, h = () => t != null && t.trim().length > 0, g = () => c != null && c.trim().length > 0, _ = () => {
2633
2692
  o(!0), e.onUrlFetch(t).then((k) => {
2634
2693
  l(void 0), r(k), o(!1), e.onChange(k, t);
@@ -2637,7 +2696,7 @@ const $s = async (e, t) => {
2637
2696
  });
2638
2697
  }, S = () => {
2639
2698
  s(""), r(""), e.onChange(void 0, void 0);
2640
- }, x = /* @__PURE__ */ v("div", { className: "url-upload-loading", style: lt, children: [
2699
+ }, A = /* @__PURE__ */ v("div", { className: "url-upload-loading", style: dt, children: [
2641
2700
  /* @__PURE__ */ a(te, { size: "md", className: "spinner", style: { marginRight: "5px" } }),
2642
2701
  /* @__PURE__ */ a("span", { className: "spinner-message", children: "Loading URL content" })
2643
2702
  ] });
@@ -2658,13 +2717,13 @@ const $s = async (e, t) => {
2658
2717
  /* @__PURE__ */ a("div", { className: "url-fetch-button", children: /* @__PURE__ */ a(le, { "data-testid": `${e.testId}-fetch`, variant: "control", isDisabled: !h(), onClick: _, children: "Fetch" }) }),
2659
2718
  /* @__PURE__ */ a("div", { className: "url-clear-button", children: /* @__PURE__ */ a(le, { "data-testid": `${e.testId}-clear`, variant: "control", isDisabled: !h(), onClick: S, children: "Clear" }) })
2660
2719
  ] }),
2661
- /* @__PURE__ */ a("div", { className: "url-upload-preview", children: /* @__PURE__ */ v(_e, { isLoading: n, loadingComponent: x, children: [
2662
- /* @__PURE__ */ a(O, { condition: g, children: /* @__PURE__ */ v("div", { className: "url-upload-error", style: Js, children: [
2720
+ /* @__PURE__ */ a("div", { className: "url-upload-preview", children: /* @__PURE__ */ v(_e, { isLoading: n, loadingComponent: A, children: [
2721
+ /* @__PURE__ */ a(N, { condition: g, children: /* @__PURE__ */ v("div", { className: "url-upload-error", style: Ys, children: [
2663
2722
  /* @__PURE__ */ a("div", { children: "Error getting content from URL." }),
2664
2723
  /* @__PURE__ */ a("div", { children: c })
2665
2724
  ] }) }),
2666
- /* @__PURE__ */ a(O, { condition: !g(), children: /* @__PURE__ */ a(
2667
- kt,
2725
+ /* @__PURE__ */ a(N, { condition: !g(), children: /* @__PURE__ */ a(
2726
+ Tt,
2668
2727
  {
2669
2728
  "data-testid": `${e.testId}-preview`,
2670
2729
  "aria-label": "url-content",
@@ -2675,12 +2734,12 @@ const $s = async (e, t) => {
2675
2734
  ) })
2676
2735
  ] }) })
2677
2736
  ] });
2678
- }, oi = (e) => {
2737
+ }, _i = (e) => {
2679
2738
  const [t, s] = T(), [i, r] = T();
2680
2739
  return pe(() => {
2681
2740
  e.isOpen && (typeof e.frontendInfo == "function" ? e.frontendInfo().then(s) : s(e.frontendInfo), typeof e.backendInfo == "function" ? e.backendInfo().then(r) : r(e.backendInfo));
2682
2741
  }, [e.isOpen]), /* @__PURE__ */ a(
2683
- Tt,
2742
+ It,
2684
2743
  {
2685
2744
  className: "app-about-modal",
2686
2745
  isOpen: e.isOpen,
@@ -2689,20 +2748,20 @@ const $s = async (e, t) => {
2689
2748
  brandImageSrc: e.brandImageSrc,
2690
2749
  brandImageAlt: e.brandImageAlt,
2691
2750
  "aria-label": e.brandImageAlt,
2692
- children: /* @__PURE__ */ v(It, { className: "app-about-modal-content", style: { marginTop: "-25px" }, children: [
2693
- /* @__PURE__ */ a(qe, { component: Le.h2, children: "Web console info" }),
2694
- /* @__PURE__ */ a(_e, { isLoading: t === void 0, children: /* @__PURE__ */ v($e, { component: "dl", children: [
2751
+ children: /* @__PURE__ */ v(Et, { className: "app-about-modal-content", style: { marginTop: "-25px" }, children: [
2752
+ /* @__PURE__ */ a($e, { component: Le.h2, children: "Web console info" }),
2753
+ /* @__PURE__ */ a(_e, { isLoading: t === void 0, children: /* @__PURE__ */ v(je, { component: "dl", children: [
2695
2754
  /* @__PURE__ */ a(b, { component: "dt", children: "Project" }),
2696
2755
  /* @__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 }) }),
2697
2756
  /* @__PURE__ */ a(b, { component: "dt", children: "Version" }),
2698
2757
  /* @__PURE__ */ a(b, { component: "dd", children: t == null ? void 0 : t.version }),
2699
2758
  /* @__PURE__ */ a(b, { component: "dt", children: "Built on" }),
2700
- /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a(Ee, { date: t == null ? void 0 : t.builtOn, format: "locale" }) }),
2759
+ /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a(Ce, { date: t == null ? void 0 : t.builtOn, format: "locale" }) }),
2701
2760
  /* @__PURE__ */ a(b, { component: "dt", children: "Digest" }),
2702
2761
  /* @__PURE__ */ a(b, { component: "dd", children: t == null ? void 0 : t.digest })
2703
2762
  ] }) }),
2704
- /* @__PURE__ */ a(qe, { style: { marginTop: "40px" }, component: Le.h2, children: e.backendLabel }),
2705
- /* @__PURE__ */ a(_e, { isLoading: i === void 0, children: /* @__PURE__ */ v($e, { component: "dl", children: [
2763
+ /* @__PURE__ */ a($e, { style: { marginTop: "40px" }, component: Le.h2, children: e.backendLabel }),
2764
+ /* @__PURE__ */ a(_e, { isLoading: i === void 0, children: /* @__PURE__ */ v(je, { component: "dl", children: [
2706
2765
  /* @__PURE__ */ a(b, { component: "dt", children: "Name" }),
2707
2766
  /* @__PURE__ */ a(b, { component: "dd", children: (i == null ? void 0 : i.name) || "" }),
2708
2767
  /* @__PURE__ */ a(b, { component: "dt", children: "Description" }),
@@ -2710,12 +2769,12 @@ const $s = async (e, t) => {
2710
2769
  /* @__PURE__ */ a(b, { component: "dt", children: "Version" }),
2711
2770
  /* @__PURE__ */ a(b, { component: "dd", children: (i == null ? void 0 : i.version) || "" }),
2712
2771
  /* @__PURE__ */ a(b, { component: "dt", children: "Built on" }),
2713
- /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a(Ee, { date: i == null ? void 0 : i.builtOn, format: "locale" }) })
2772
+ /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a(Ce, { date: i == null ? void 0 : i.builtOn, format: "locale" }) })
2714
2773
  ] }) })
2715
2774
  ] })
2716
2775
  }
2717
2776
  );
2718
- }, Ks = (e) => {
2777
+ }, Zs = (e) => {
2719
2778
  const [t, s] = T({
2720
2779
  username: "",
2721
2780
  password: ""
@@ -2733,7 +2792,7 @@ const $s = async (e, t) => {
2733
2792
  });
2734
2793
  };
2735
2794
  return /* @__PURE__ */ a(
2736
- Ue,
2795
+ Ae,
2737
2796
  {
2738
2797
  title: "Login",
2739
2798
  variant: "small",
@@ -2746,7 +2805,7 @@ const $s = async (e, t) => {
2746
2805
  actions: [
2747
2806
  /* @__PURE__ */ a(le, { 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")
2748
2807
  ],
2749
- children: /* @__PURE__ */ v(Be, { children: [
2808
+ children: /* @__PURE__ */ v(ze, { children: [
2750
2809
  /* @__PURE__ */ a(
2751
2810
  He,
2752
2811
  {
@@ -2790,8 +2849,8 @@ const $s = async (e, t) => {
2790
2849
  ] })
2791
2850
  }
2792
2851
  );
2793
- }, ai = (e) => /* @__PURE__ */ v(
2794
- Ue,
2852
+ }, pi = (e) => /* @__PURE__ */ v(
2853
+ Ae,
2795
2854
  {
2796
2855
  title: "Please Wait",
2797
2856
  variant: "small",
@@ -2806,8 +2865,8 @@ const $s = async (e, t) => {
2806
2865
  /* @__PURE__ */ a("span", { className: "message", style: { fontSize: "15px", color: "#333", marginLeft: "10px" }, children: e.message })
2807
2866
  ]
2808
2867
  }
2809
- ), ci = (e) => /* @__PURE__ */ a(
2810
- Ue,
2868
+ ), fi = (e) => /* @__PURE__ */ a(
2869
+ Ae,
2811
2870
  {
2812
2871
  title: e.title,
2813
2872
  variant: "small",
@@ -2816,13 +2875,13 @@ const $s = async (e, t) => {
2816
2875
  onClose: e.onClose,
2817
2876
  className: "progress pf-m-redhat-font",
2818
2877
  "aria-label": "progress-modal",
2819
- children: /* @__PURE__ */ a(Et, { title: e.message, value: e.progress })
2878
+ children: /* @__PURE__ */ a(Ct, { title: e.message, value: e.progress })
2820
2879
  }
2821
- ), li = (e) => {
2880
+ ), wi = (e) => {
2822
2881
  const [t, s] = T(
2823
2882
  0
2824
2883
  /* AUTHENTICATING */
2825
- ), i = ct(), r = (n) => {
2884
+ ), i = lt(), r = (n) => {
2826
2885
  console.info("[ApplicationAuth] Using username and password."), i.login(n.username, n.password), s(
2827
2886
  1
2828
2887
  /* AUTHENTICATED */
@@ -2843,29 +2902,29 @@ const $s = async (e, t) => {
2843
2902
  1
2844
2903
  /* AUTHENTICATED */
2845
2904
  );
2846
- }, []), /* @__PURE__ */ v(Re, { children: [
2847
- /* @__PURE__ */ a(O, { condition: t === 0 && i.isOidcAuthEnabled(), children: /* @__PURE__ */ v(oe, { children: [
2905
+ }, []), /* @__PURE__ */ v(Ue, { children: [
2906
+ /* @__PURE__ */ a(N, { condition: t === 0 && i.isOidcAuthEnabled(), children: /* @__PURE__ */ v(oe, { children: [
2848
2907
  /* @__PURE__ */ a(ae, { titleText: "Loading", headingLevel: "h4" }),
2849
- /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ a(te, { size: "xl", "aria-label": "Loading spinner" }) })
2908
+ /* @__PURE__ */ a(Se, { children: /* @__PURE__ */ a(te, { size: "xl", "aria-label": "Loading spinner" }) })
2850
2909
  ] }) }),
2851
- /* @__PURE__ */ a(O, { condition: t === 0 && i.isBasicAuthEnabled(), children: /* @__PURE__ */ a(Ks, { onLogin: r }) }),
2852
- /* @__PURE__ */ a(O, { condition: t === 2, children: /* @__PURE__ */ v(oe, { children: [
2853
- /* @__PURE__ */ a(ae, { titleText: "Empty state", headingLevel: "h4", icon: /* @__PURE__ */ a(ze, { icon: Lt }) }),
2854
- /* @__PURE__ */ a(ve, { children: "Authentication failed." })
2910
+ /* @__PURE__ */ a(N, { condition: t === 0 && i.isBasicAuthEnabled(), children: /* @__PURE__ */ a(Zs, { onLogin: r }) }),
2911
+ /* @__PURE__ */ a(N, { condition: t === 2, children: /* @__PURE__ */ v(oe, { children: [
2912
+ /* @__PURE__ */ a(ae, { titleText: "Empty state", headingLevel: "h4", icon: /* @__PURE__ */ a(Ve, { icon: Lt }) }),
2913
+ /* @__PURE__ */ a(Se, { children: "Authentication failed." })
2855
2914
  ] }) }),
2856
- /* @__PURE__ */ a(O, { condition: t === 1, children: e.children })
2915
+ /* @__PURE__ */ a(N, { condition: t === 1, children: e.children })
2857
2916
  ] });
2858
- }, di = (e) => {
2859
- const t = ct();
2917
+ }, mi = (e) => {
2918
+ const t = lt();
2860
2919
  return (() => {
2861
2920
  let i = !0;
2862
2921
  return e.enabled !== void 0 && (i = i && (t.isOidcAuthEnabled() === e.enabled || t.isBasicAuthEnabled() === e.enabled)), i;
2863
- })() ? /* @__PURE__ */ a(j.Fragment, { children: e.children }) : /* @__PURE__ */ a(j.Fragment, {});
2864
- }, hi = (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: [
2922
+ })() ? /* @__PURE__ */ a(F.Fragment, { children: e.children }) : /* @__PURE__ */ a(F.Fragment, {});
2923
+ }, vi = (e) => /* @__PURE__ */ a(Pt, { categoryName: e.categoryName || "Filters", isClosable: !0, onClick: e.onClearAllCriteria, children: e.criteria.map((t, s) => /* @__PURE__ */ v(Rt, { onClick: () => e.onRemoveCriteria(t), children: [
2865
2924
  /* @__PURE__ */ a("b", { children: t.filterBy.label }),
2866
2925
  /* @__PURE__ */ a("span", { children: ": " }),
2867
2926
  /* @__PURE__ */ a("span", { children: t.filterValue })
2868
- ] }, s)) }), gi = (e) => {
2927
+ ] }, s)) }), Si = (e) => {
2869
2928
  const [t, s] = T(e.filterTypes[0]), [i, r] = T(""), n = (o) => {
2870
2929
  o && o.preventDefault(), e.onAddCriteria({
2871
2930
  filterBy: t,
@@ -2874,9 +2933,9 @@ const $s = async (e, t) => {
2874
2933
  };
2875
2934
  return pe(() => {
2876
2935
  s(e.filterTypes[0]);
2877
- }, [e.filterTypes]), /* @__PURE__ */ a(Be, { onSubmit: n, children: /* @__PURE__ */ v(Rt, { children: [
2936
+ }, [e.filterTypes]), /* @__PURE__ */ a(ze, { onSubmit: n, children: /* @__PURE__ */ v(Ut, { children: [
2878
2937
  /* @__PURE__ */ a(
2879
- Ws,
2938
+ Xs,
2880
2939
  {
2881
2940
  value: t,
2882
2941
  items: e.filterTypes,
@@ -2902,32 +2961,32 @@ const $s = async (e, t) => {
2902
2961
  /* @__PURE__ */ a(
2903
2962
  le,
2904
2963
  {
2905
- variant: Ut.control,
2964
+ variant: At.control,
2906
2965
  onClick: n,
2907
2966
  "data-testid": "chip-filter-search",
2908
2967
  "aria-label": "search button for search input",
2909
- children: /* @__PURE__ */ a($t, {})
2968
+ children: /* @__PURE__ */ a(jt, {})
2910
2969
  }
2911
2970
  )
2912
2971
  ] }) });
2913
2972
  };
2914
- function ui() {
2973
+ function yi() {
2915
2974
  return /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(
2916
2975
  ae,
2917
2976
  {
2918
2977
  titleText: "Loading",
2919
2978
  headingLevel: "h4",
2920
- icon: /* @__PURE__ */ a(ze, { icon: te })
2979
+ icon: /* @__PURE__ */ a(Ve, { icon: te })
2921
2980
  }
2922
2981
  ) });
2923
2982
  }
2924
- function _i({
2983
+ function bi({
2925
2984
  itemCount: e,
2926
2985
  page: t,
2927
2986
  perPage: s,
2928
2987
  isCompact: i = !1,
2929
2988
  onChange: r,
2930
- variant: n = At.top
2989
+ variant: n = Ot.top
2931
2990
  }) {
2932
2991
  return /* @__PURE__ */ a(
2933
2992
  xt,
@@ -2942,19 +3001,19 @@ function _i({
2942
3001
  }
2943
3002
  );
2944
3003
  }
2945
- function Bs({ columns: e, rows: t, getTd: s = () => xe }) {
3004
+ function ei({ columns: e, rows: t, getTd: s = () => xe }) {
2946
3005
  const i = new Array(e).fill(0).map((n, o) => {
2947
3006
  const c = s(o);
2948
3007
  return /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(
2949
- Ot,
3008
+ Nt,
2950
3009
  {
2951
3010
  screenreaderText: o === 0 ? "Loading data" : void 0
2952
3011
  }
2953
3012
  ) }, `cell_${o}`);
2954
3013
  }), r = new Array(t).fill(0).map((n, o) => /* @__PURE__ */ a(de, { children: i }, `row_${o}`));
2955
- return /* @__PURE__ */ a(Re, { children: r });
3014
+ return /* @__PURE__ */ a(Ue, { children: r });
2956
3015
  }
2957
- const pi = ({
3016
+ const ki = ({
2958
3017
  ariaLabel: e,
2959
3018
  minimumColumnWidth: t = 250,
2960
3019
  columns: s,
@@ -2969,23 +3028,23 @@ const pi = ({
2969
3028
  onRowClick: g,
2970
3029
  setActionCellOuiaId: _,
2971
3030
  setRowOuiaId: S,
2972
- tableOuiaId: x,
3031
+ tableOuiaId: A,
2973
3032
  children: k,
2974
- variant: A
3033
+ variant: x
2975
3034
  }) => {
2976
- const [I, N] = T(1e3);
3035
+ const [I, D] = T(1e3);
2977
3036
  let P;
2978
- const F = ({ width: f }) => {
3037
+ const M = ({ width: f }) => {
2979
3038
  P && cancelAnimationFrame(P), f && (P = requestAnimationFrame(() => {
2980
- N(f);
3039
+ D(f);
2981
3040
  }));
2982
- }, { ref: R } = Jt({ onResize: F }), w = I >= 576, E = Ne(
3041
+ }, { ref: R } = Bt({ onResize: M }), w = I >= 576, E = De(
2983
3042
  (f) => w && f !== 0 && f !== s.length - 1,
2984
3043
  [s, w]
2985
- ), U = De(() => s.map((f, m) => {
2986
- const D = ne(
2987
- ({ children: J, ...K }, X) => /* @__PURE__ */ a(
2988
- dt,
3044
+ ), U = qe(() => s.map((f, m) => {
3045
+ const q = ne(
3046
+ ({ children: B, ...K }, X) => /* @__PURE__ */ a(
3047
+ ht,
2989
3048
  {
2990
3049
  position: m,
2991
3050
  tableWidth: I,
@@ -2994,12 +3053,12 @@ const pi = ({
2994
3053
  sort: c ? c(f) : void 0,
2995
3054
  ...K,
2996
3055
  ref: X,
2997
- children: J
3056
+ children: B
2998
3057
  }
2999
3058
  )
3000
3059
  );
3001
- return D.displayName = "ResponsiveThCurried", r({
3002
- Th: D,
3060
+ return q.displayName = "ResponsiveThCurried", r({
3061
+ Th: q,
3003
3062
  key: `header_${f}`,
3004
3063
  column: f,
3005
3064
  colIndex: m
@@ -3011,43 +3070,43 @@ const pi = ({
3011
3070
  t,
3012
3071
  r,
3013
3072
  I
3014
- ]), y = Ne(
3073
+ ]), y = De(
3015
3074
  (f) => {
3016
3075
  const m = ne(
3017
- ({ children: D, ...J }, K) => /* @__PURE__ */ a(
3018
- Ce,
3076
+ ({ children: q, ...B }, K) => /* @__PURE__ */ a(
3077
+ Pe,
3019
3078
  {
3020
3079
  position: f,
3021
3080
  tableWidth: I,
3022
3081
  columnWidth: t,
3023
3082
  canHide: E(f),
3024
- ...J,
3083
+ ...B,
3025
3084
  ref: K,
3026
- children: D
3085
+ children: q
3027
3086
  }
3028
3087
  )
3029
3088
  );
3030
3089
  return m.displayName = "ResponsiveTdCurried", m;
3031
3090
  },
3032
3091
  [E, t, I]
3033
- ), V = De(
3092
+ ), V = qe(
3034
3093
  () => s.map((f, m) => y(m)),
3035
3094
  [s, y]
3036
3095
  );
3037
3096
  return /* @__PURE__ */ v(
3038
- jt,
3097
+ Ft,
3039
3098
  {
3040
3099
  "aria-label": e,
3041
3100
  gridBreakPoint: "",
3042
3101
  ref: R,
3043
3102
  className: w ? "" : "pf-m-grid",
3044
- ouiaId: x,
3045
- variant: A,
3103
+ ouiaId: A,
3104
+ variant: x,
3046
3105
  children: [
3047
- /* @__PURE__ */ a(Ft, { children: /* @__PURE__ */ a(de, { children: U }) }),
3048
- /* @__PURE__ */ v(Mt, { children: [
3106
+ /* @__PURE__ */ a(Mt, { children: /* @__PURE__ */ a(de, { children: U }) }),
3107
+ /* @__PURE__ */ v(Wt, { children: [
3049
3108
  i === void 0 && /* @__PURE__ */ a(
3050
- Bs,
3109
+ ei,
3051
3110
  {
3052
3111
  columns: s.length,
3053
3112
  rows: h,
@@ -3055,15 +3114,15 @@ const pi = ({
3055
3114
  }
3056
3115
  ),
3057
3116
  i == null ? void 0 : i.map((f, m) => {
3058
- const D = l !== void 0 && l({ row: f, rowIndex: m }), J = d !== void 0 && d({ row: f, rowIndex: m }), K = !D && g ? () => g({ row: f, rowIndex: m }) : void 0, X = s.map((Y, se) => n({
3117
+ const q = l !== void 0 && l({ row: f, rowIndex: m }), B = d !== void 0 && d({ row: f, rowIndex: m }), K = !q && g ? () => g({ row: f, rowIndex: m }) : void 0, X = s.map((Y, se) => n({
3059
3118
  Td: V[se],
3060
3119
  key: `row_${m}_cell_${Y}`,
3061
3120
  column: Y,
3062
3121
  colIndex: se,
3063
3122
  rowIndex: m,
3064
3123
  row: f
3065
- })), fe = !D && o && /* @__PURE__ */ a(
3066
- Ce,
3124
+ })), we = !q && o && /* @__PURE__ */ a(
3125
+ Pe,
3067
3126
  {
3068
3127
  position: s.length,
3069
3128
  tableWidth: I,
@@ -3071,19 +3130,19 @@ const pi = ({
3071
3130
  canHide: !1,
3072
3131
  isActionCell: !0,
3073
3132
  "data-testid": _ ? _({ row: f, rowIndex: m }) : `actions-for-row-${m}`,
3074
- children: o({ rowIndex: m, row: f, ActionsColumn: Wt })
3133
+ children: o({ rowIndex: m, row: f, ActionsColumn: Jt })
3075
3134
  }
3076
3135
  );
3077
3136
  return /* @__PURE__ */ v(
3078
- ht,
3137
+ gt,
3079
3138
  {
3080
- isDeleted: D,
3081
- isSelected: J,
3139
+ isDeleted: q,
3140
+ isSelected: B,
3082
3141
  onClick: K,
3083
3142
  rowOuiaId: S == null ? void 0 : S({ row: f, rowIndex: m }),
3084
3143
  children: [
3085
3144
  X,
3086
- fe
3145
+ we
3087
3146
  ]
3088
3147
  },
3089
3148
  `row_${m}`
@@ -3094,7 +3153,7 @@ const pi = ({
3094
3153
  ]
3095
3154
  }
3096
3155
  );
3097
- }, dt = Pe(
3156
+ }, ht = Re(
3098
3157
  ne((e, t) => {
3099
3158
  const {
3100
3159
  tableWidth: s,
@@ -3116,8 +3175,8 @@ const pi = ({
3116
3175
  );
3117
3176
  })
3118
3177
  );
3119
- dt.displayName = "ResponsiveTh";
3120
- const Ce = Pe(
3178
+ ht.displayName = "ResponsiveTh";
3179
+ const Pe = Re(
3121
3180
  ne((e, t) => {
3122
3181
  const {
3123
3182
  tableWidth: s,
@@ -3139,8 +3198,8 @@ const Ce = Pe(
3139
3198
  );
3140
3199
  })
3141
3200
  );
3142
- Ce.displayName = "ResponsiveTd";
3143
- const ht = Pe(
3201
+ Pe.displayName = "ResponsiveTd";
3202
+ const gt = Re(
3144
3203
  ({ isDeleted: e, isSelected: t, onClick: s, children: i, rowOuiaId: r }) => /* @__PURE__ */ a(
3145
3204
  de,
3146
3205
  {
@@ -3156,33 +3215,33 @@ const ht = Pe(
3156
3215
  }
3157
3216
  )
3158
3217
  );
3159
- ht.displayName = "DeletableRow";
3218
+ gt.displayName = "DeletableRow";
3160
3219
  export {
3161
- oi as AppAboutModal,
3162
- li as ApplicationAuth,
3220
+ _i as AppAboutModal,
3221
+ wi as ApplicationAuth,
3163
3222
  Kt as AuthConfigContext,
3164
- Ks as BasicAuthModal,
3165
- gi as ChipFilterInput,
3166
- Ee as DateTime,
3167
- ht as DeletableRow,
3168
- hi as FilterChips,
3169
- ei as FromNow,
3170
- O as If,
3171
- di as IfAuth,
3172
- ti as IfNotEmpty,
3223
+ Zs as BasicAuthModal,
3224
+ Si as ChipFilterInput,
3225
+ Ce as DateTime,
3226
+ gt as DeletableRow,
3227
+ vi as FilterChips,
3228
+ ci as FromNow,
3229
+ N as If,
3230
+ mi as IfAuth,
3231
+ li as IfNotEmpty,
3173
3232
  _e as IfNotLoading,
3174
- si as ListWithToolbar,
3175
- ui as Loading,
3176
- ii as ObjectDropdown,
3177
- Ws as ObjectSelect,
3178
- _i as Pagination,
3179
- ai as PleaseWaitModal,
3180
- ci as ProgressModal,
3181
- pi as ResponsiveTable,
3182
- Ce as ResponsiveTd,
3183
- dt as ResponsiveTh,
3184
- Bs as TableSkeleton,
3185
- ri as ToggleIcon,
3186
- ni as UrlUpload,
3187
- ct as useAuth
3233
+ di as ListWithToolbar,
3234
+ yi as Loading,
3235
+ hi as ObjectDropdown,
3236
+ Xs as ObjectSelect,
3237
+ bi as Pagination,
3238
+ pi as PleaseWaitModal,
3239
+ fi as ProgressModal,
3240
+ ki as ResponsiveTable,
3241
+ Pe as ResponsiveTd,
3242
+ ht as ResponsiveTh,
3243
+ ei as TableSkeleton,
3244
+ gi as ToggleIcon,
3245
+ ui as UrlUpload,
3246
+ lt as useAuth
3188
3247
  };