zudoku 0.0.0-fa903e7 → 0.0.0-fc5c03b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/client.d.ts +7 -0
  2. package/dist/app/entry.client.d.ts +1 -0
  3. package/dist/app/entry.client.js +13 -0
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.d.ts +1 -0
  6. package/dist/app/entry.server.js +1 -0
  7. package/dist/app/entry.server.js.map +1 -1
  8. package/dist/app/main.js +2 -1
  9. package/dist/app/main.js.map +1 -1
  10. package/dist/app/sentry.d.ts +3 -0
  11. package/dist/app/sentry.js +19 -0
  12. package/dist/app/sentry.js.map +1 -0
  13. package/dist/app/tailwind.d.ts +2 -1
  14. package/dist/app/tailwind.js +64 -52
  15. package/dist/app/tailwind.js.map +1 -1
  16. package/dist/cli/cli.js +0 -2
  17. package/dist/cli/cli.js.map +1 -1
  18. package/dist/cli/common/outdated.js +2 -1
  19. package/dist/cli/common/outdated.js.map +1 -1
  20. package/dist/config/common.d.ts +8 -0
  21. package/dist/config/common.js +2 -0
  22. package/dist/config/common.js.map +1 -0
  23. package/dist/config/config.d.ts +3 -2
  24. package/dist/config/loader.d.ts +20 -0
  25. package/dist/config/loader.js +154 -0
  26. package/dist/config/loader.js.map +1 -0
  27. package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
  28. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  29. package/dist/config/validators/common.d.ts +4911 -0
  30. package/dist/config/validators/common.js +276 -0
  31. package/dist/config/validators/common.js.map +1 -0
  32. package/dist/config/validators/icon-types.d.ts +1 -0
  33. package/dist/config/validators/icon-types.js +2 -0
  34. package/dist/config/validators/icon-types.js.map +1 -0
  35. package/dist/config/validators/validate.d.ts +760 -524
  36. package/dist/config/validators/validate.js +9 -234
  37. package/dist/config/validators/validate.js.map +1 -1
  38. package/dist/lib/authentication/providers/openid.js +7 -2
  39. package/dist/lib/authentication/providers/openid.js.map +1 -1
  40. package/dist/lib/components/Heading.d.ts +4 -4
  41. package/dist/lib/components/Heading.js +1 -1
  42. package/dist/lib/components/Heading.js.map +1 -1
  43. package/dist/lib/components/Layout.js +3 -2
  44. package/dist/lib/components/Layout.js.map +1 -1
  45. package/dist/lib/components/Markdown.js +1 -1
  46. package/dist/lib/components/Markdown.js.map +1 -1
  47. package/dist/lib/components/MobileTopNavigation.js +1 -1
  48. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  49. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  50. package/dist/lib/components/ReactMarkdown.js +182 -0
  51. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  52. package/dist/lib/components/Search.d.ts +3 -1
  53. package/dist/lib/components/Search.js +3 -3
  54. package/dist/lib/components/Search.js.map +1 -1
  55. package/dist/lib/components/SyntaxHighlight.js +0 -4
  56. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  57. package/dist/lib/components/TopNavigation.d.ts +1 -1
  58. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  59. package/dist/lib/components/navigation/Sidebar.js +2 -2
  60. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  61. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  62. package/dist/lib/components/navigation/SidebarCategory.js +3 -4
  63. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  64. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
  65. package/dist/lib/components/navigation/SidebarItem.js +5 -10
  66. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  67. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  68. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  69. package/dist/lib/core/ZudokuContext.d.ts +1 -1
  70. package/dist/lib/oas/graphql/index.js +4 -1
  71. package/dist/lib/oas/graphql/index.js.map +1 -1
  72. package/dist/lib/plugins/api-catalog/Catalog.d.ts +6 -0
  73. package/dist/lib/plugins/api-catalog/Catalog.js +29 -0
  74. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  75. package/dist/lib/plugins/api-catalog/index.d.ts +23 -0
  76. package/dist/lib/plugins/api-catalog/index.js +15 -0
  77. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  78. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
  79. package/dist/lib/plugins/markdown/MdxPage.js +2 -2
  80. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  81. package/dist/lib/plugins/markdown/index.d.ts +2 -1
  82. package/dist/lib/plugins/markdown/index.js.map +1 -1
  83. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  84. package/dist/lib/plugins/openapi/OperationList.js +47 -2
  85. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  86. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  87. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  88. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  89. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
  90. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  91. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  92. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  93. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  94. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  95. package/dist/lib/ui/Button.d.ts +1 -1
  96. package/dist/lib/ui/Command.d.ts +1 -1
  97. package/dist/lib/util/MdxComponents.d.ts +2 -3
  98. package/dist/lib/util/MdxComponents.js.map +1 -1
  99. package/dist/vite/build.js +15 -3
  100. package/dist/vite/build.js.map +1 -1
  101. package/dist/vite/config.d.ts +6 -4
  102. package/dist/vite/config.js +42 -15
  103. package/dist/vite/config.js.map +1 -1
  104. package/dist/vite/config.test.js +4 -1
  105. package/dist/vite/config.test.js.map +1 -1
  106. package/dist/vite/dev-server.js +12 -3
  107. package/dist/vite/dev-server.js.map +1 -1
  108. package/dist/vite/output.d.ts +1 -1
  109. package/dist/vite/output.js +25 -16
  110. package/dist/vite/output.js.map +1 -1
  111. package/dist/vite/plugin-api.js +44 -1
  112. package/dist/vite/plugin-api.js.map +1 -1
  113. package/dist/vite/plugin-component.js +1 -0
  114. package/dist/vite/plugin-component.js.map +1 -1
  115. package/dist/vite/plugin-config-reload.d.ts +1 -2
  116. package/dist/vite/plugin-config-reload.js.map +1 -1
  117. package/dist/vite/plugin-config.js +20 -0
  118. package/dist/vite/plugin-config.js.map +1 -1
  119. package/dist/vite/plugin-mdx.js +48 -1
  120. package/dist/vite/plugin-mdx.js.map +1 -1
  121. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
  122. package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
  123. package/dist/vite/plugin-theme-css.js.map +1 -0
  124. package/dist/vite/plugin.d.ts +1 -2
  125. package/dist/vite/plugin.js +2 -2
  126. package/dist/vite/plugin.js.map +1 -1
  127. package/dist/vite/prerender.d.ts +2 -1
  128. package/dist/vite/prerender.js +2 -2
  129. package/dist/vite/prerender.js.map +1 -1
  130. package/dist/vite/sitemap.d.ts +1 -1
  131. package/dist/zuplo/env.d.ts +6 -0
  132. package/dist/zuplo/env.js +9 -0
  133. package/dist/zuplo/env.js.map +1 -0
  134. package/dist/zuplo/with-zuplo.d.ts +2 -2
  135. package/dist/zuplo/with-zuplo.js.map +1 -1
  136. package/lib/AnchorLink-BR0MvI7n.js +35 -0
  137. package/lib/AnchorLink-BR0MvI7n.js.map +1 -0
  138. package/lib/{Markdown-ievDDhFT.js → Markdown-CRsmPPfY.js} +13084 -13096
  139. package/lib/Markdown-CRsmPPfY.js.map +1 -0
  140. package/lib/{MdxPage-B2FpJ9KC.js → MdxPage-Wp8QU0-q.js} +85 -80
  141. package/lib/MdxPage-Wp8QU0-q.js.map +1 -0
  142. package/lib/{OperationList-BkNQEsNs.js → OperationList-u8xHU9-b.js} +982 -969
  143. package/lib/{OperationList-BkNQEsNs.js.map → OperationList-u8xHU9-b.js.map} +1 -1
  144. package/lib/{SlotletProvider-DyomlzGx.js → SlotletProvider-BgvYIPQe.js} +2 -2
  145. package/lib/{SlotletProvider-DyomlzGx.js.map → SlotletProvider-BgvYIPQe.js.map} +1 -1
  146. package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-C31iouiO.js} +1 -3
  147. package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-C31iouiO.js.map} +1 -1
  148. package/lib/assets/{worker-BHClFO3A.js → worker-C_2va8B8.js} +435 -432
  149. package/lib/assets/{worker-BHClFO3A.js.map → worker-C_2va8B8.js.map} +1 -1
  150. package/lib/{createServer-CpJlUPtn.js → createServer-BCAHdrpE.js} +5 -2
  151. package/lib/{createServer-CpJlUPtn.js.map → createServer-BCAHdrpE.js.map} +1 -1
  152. package/lib/{index-C7SaIME0.js → index-CmdLGbbk.js} +7 -5
  153. package/lib/index-CmdLGbbk.js.map +1 -0
  154. package/lib/{AnchorLink-CDlhr8gL.js → index.esm-Bm8pj-bc.js} +223 -254
  155. package/lib/index.esm-Bm8pj-bc.js.map +1 -0
  156. package/lib/ui/Drawer.js +79 -79
  157. package/lib/ui/Drawer.js.map +1 -1
  158. package/lib/zudoku.auth-openid.js +42 -37
  159. package/lib/zudoku.auth-openid.js.map +1 -1
  160. package/lib/zudoku.components.js +386 -367
  161. package/lib/zudoku.components.js.map +1 -1
  162. package/lib/zudoku.openapi-worker.js +1 -1
  163. package/lib/zudoku.plugin-api-catalog.js +121 -0
  164. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  165. package/lib/zudoku.plugin-api-keys.js +1 -1
  166. package/lib/zudoku.plugin-custom-pages.js +1 -1
  167. package/lib/zudoku.plugin-markdown.js +1 -1
  168. package/lib/zudoku.plugin-markdown.js.map +1 -1
  169. package/lib/zudoku.plugin-openapi.js +1 -1
  170. package/lib/zudoku.plugin-redirect.js.map +1 -1
  171. package/package.json +19 -6
  172. package/src/app/entry.client.tsx +15 -0
  173. package/src/app/entry.server.tsx +1 -0
  174. package/src/app/main.tsx +5 -1
  175. package/src/app/sentry.ts +24 -0
  176. package/src/app/tailwind.ts +67 -52
  177. package/src/lib/authentication/providers/openid.tsx +7 -2
  178. package/src/lib/components/Heading.tsx +13 -13
  179. package/src/lib/components/Layout.tsx +8 -3
  180. package/src/lib/components/Markdown.tsx +1 -1
  181. package/src/lib/components/MobileTopNavigation.tsx +18 -18
  182. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  183. package/src/lib/components/ReactMarkdown.tsx +264 -0
  184. package/src/lib/components/Search.tsx +3 -3
  185. package/src/lib/components/SyntaxHighlight.tsx +0 -4
  186. package/src/lib/components/TopNavigation.tsx +1 -1
  187. package/src/lib/components/navigation/Sidebar.tsx +18 -8
  188. package/src/lib/components/navigation/SidebarCategory.tsx +10 -9
  189. package/src/lib/components/navigation/SidebarItem.tsx +10 -13
  190. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
  191. package/src/lib/core/ZudokuContext.ts +1 -1
  192. package/src/lib/oas/graphql/index.ts +4 -1
  193. package/src/lib/plugins/api-catalog/Catalog.tsx +124 -0
  194. package/src/lib/plugins/api-catalog/index.tsx +50 -0
  195. package/src/lib/plugins/markdown/MdxPage.tsx +2 -0
  196. package/src/lib/plugins/markdown/index.tsx +2 -1
  197. package/src/lib/plugins/markdown/resolver.ts +2 -4
  198. package/src/lib/plugins/openapi/OperationList.tsx +64 -3
  199. package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
  200. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  201. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
  202. package/src/lib/plugins/redirect/index.tsx +1 -1
  203. package/src/lib/util/MdxComponents.tsx +2 -5
  204. package/dist/vite/plugin-custom-css.js.map +0 -1
  205. package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
  206. package/lib/Markdown-ievDDhFT.js.map +0 -1
  207. package/lib/MdxPage-B2FpJ9KC.js.map +0 -1
  208. package/lib/index-C7SaIME0.js.map +0 -1
  209. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  210. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  211. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  212. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
@@ -7,7 +7,7 @@ import { A as ze } from "./AuthenticationPlugin-D0Em0SwR.js";
7
7
  import { g as De } from "./utils-DcpDOncX.js";
8
8
  import { Z as Ne } from "./invariant-Caa8-XvF.js";
9
9
  import { l as Ke } from "./index-Czzd9rjU.js";
10
- import { u as z } from "./state-tsXBLONe.js";
10
+ import { u as C } from "./state-tsXBLONe.js";
11
11
  var pe = { exports: {} };
12
12
  (function(t) {
13
13
  (function(e, n) {
@@ -56,7 +56,7 @@ var pe = { exports: {} };
56
56
  return _(l) || y.apply(this, arguments);
57
57
  }
58
58
  function h(l, m) {
59
- var u = this, J, F, R, v = "loglevel";
59
+ var u = this, O, F, R, v = "loglevel";
60
60
  typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
61
61
  function Ce(d) {
62
62
  var g = (a[d] || "silent").toUpperCase();
@@ -81,9 +81,9 @@ var pe = { exports: {} };
81
81
  }
82
82
  if (typeof d === n)
83
83
  try {
84
- var g = window.document.cookie, O = encodeURIComponent(v), re = g.indexOf(O + "=");
84
+ var g = window.document.cookie, z = encodeURIComponent(v), re = g.indexOf(z + "=");
85
85
  re !== -1 && (d = /^([^;]+)/.exec(
86
- g.slice(re + O.length + 1)
86
+ g.slice(re + z.length + 1)
87
87
  )[1]);
88
88
  } catch {
89
89
  }
@@ -116,7 +116,7 @@ var pe = { exports: {} };
116
116
  ERROR: 4,
117
117
  SILENT: 5
118
118
  }, u.methodFactory = m || T, u.getLevel = function() {
119
- return R ?? F ?? J;
119
+ return R ?? F ?? O;
120
120
  }, u.setLevel = function(d, g) {
121
121
  return R = U(d), g !== !1 && Ce(R), f.call(u);
122
122
  }, u.setDefaultLevel = function(d) {
@@ -128,10 +128,10 @@ var pe = { exports: {} };
128
128
  }, u.disableAll = function(d) {
129
129
  u.setLevel(u.levels.SILENT, d);
130
130
  }, u.rebuild = function() {
131
- if (i !== u && (J = U(i.getLevel())), f.call(u), i === u)
131
+ if (i !== u && (O = U(i.getLevel())), f.call(u), i === u)
132
132
  for (var d in r)
133
133
  r[d].rebuild();
134
- }, J = U(
134
+ }, O = U(
135
135
  i ? i.getLevel() : "WARN"
136
136
  );
137
137
  var ne = te();
@@ -146,9 +146,9 @@ var pe = { exports: {} };
146
146
  i.methodFactory
147
147
  )), u;
148
148
  };
149
- var j = typeof window !== n ? window.log : void 0;
149
+ var J = typeof window !== n ? window.log : void 0;
150
150
  return i.noConflict = function() {
151
- return typeof window !== n && window.log === i && (window.log = j), i;
151
+ return typeof window !== n && window.log === i && (window.log = J), i;
152
152
  }, i.getLoggers = function() {
153
153
  return r;
154
154
  }, i.default = i, i;
@@ -247,7 +247,7 @@ function Q(t) {
247
247
  }
248
248
  return t;
249
249
  }
250
- function C(t) {
250
+ function L(t) {
251
251
  return !(t === null || typeof t != "object" || Array.isArray(t));
252
252
  }
253
253
  function W(t) {
@@ -306,7 +306,7 @@ async function Xe(t, e) {
306
306
  } catch (o) {
307
307
  throw new s('failed to parse "response" body as JSON', { cause: o });
308
308
  }
309
- if (!C(n))
309
+ if (!L(n))
310
310
  throw new s('"response" body must be a top level object');
311
311
  if (!w(n.issuer))
312
312
  throw new s('"response" body "issuer" property must be a non-empty string');
@@ -399,7 +399,7 @@ function be(t) {
399
399
  throw new S("unsupported CryptoKey algorithm name");
400
400
  }
401
401
  }
402
- function L(t) {
402
+ function x(t) {
403
403
  const e = t == null ? void 0 : t[K];
404
404
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
405
405
  }
@@ -411,7 +411,7 @@ function $() {
411
411
  return Math.floor(Date.now() / 1e3);
412
412
  }
413
413
  function ct(t, e) {
414
- const n = $() + L(e);
414
+ const n = $() + x(e);
415
415
  return {
416
416
  jti: H(),
417
417
  aud: [t.issuer, t.token_endpoint],
@@ -426,14 +426,14 @@ async function ut(t, e, n, o, a) {
426
426
  const r = { alg: be(n), kid: o }, i = ct(t, e);
427
427
  return a == null || a(r, i), ve(r, i, n);
428
428
  }
429
- function x(t) {
429
+ function I(t) {
430
430
  if (typeof t != "object" || t === null)
431
431
  throw new TypeError('"as" must be an object');
432
432
  if (!w(t.issuer))
433
433
  throw new TypeError('"as.issuer" property must be a non-empty string');
434
434
  return !0;
435
435
  }
436
- function I(t) {
436
+ function j(t) {
437
437
  if (typeof t != "object" || t === null)
438
438
  throw new TypeError('"client" must be an object');
439
439
  if (!w(t.client_id))
@@ -542,7 +542,7 @@ async function pt(t, e, n, o, a, r) {
542
542
  throw new TypeError('"accessToken" must be a non-empty string');
543
543
  if (!(n instanceof URL))
544
544
  throw new TypeError('"url" must be an instance of URL');
545
- return o = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), L({ [K]: r == null ? void 0 : r[K] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Y]) || fetch)(n.href, {
545
+ return o = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), x({ [K]: r == null ? void 0 : r[K] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Y]) || fetch)(n.href, {
546
546
  body: a,
547
547
  headers: Object.fromEntries(o.entries()),
548
548
  method: e,
@@ -551,11 +551,11 @@ async function pt(t, e, n, o, a, r) {
551
551
  }).then(Q);
552
552
  }
553
553
  async function wt(t, e, n, o) {
554
- x(t), I(e);
554
+ I(t), j(e);
555
555
  const a = Se(t, "userinfo_endpoint", Te(e, o)), r = W(o == null ? void 0 : o.headers);
556
556
  return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), pt(n, "GET", a, r, null, {
557
557
  ...o,
558
- [K]: L(e)
558
+ [K]: x(e)
559
559
  });
560
560
  }
561
561
  async function mt(t, e, n, o, a, r, i) {
@@ -574,7 +574,7 @@ async function ke(t, e, n, o, a) {
574
574
  return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
575
575
  }
576
576
  async function gt(t, e, n, o) {
577
- if (x(t), I(e), !w(n))
577
+ if (I(t), j(e), !w(n))
578
578
  throw new TypeError('"refreshToken" must be a non-empty string');
579
579
  const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
580
580
  return a.set("refresh_token", n), ke(t, e, "refresh_token", a, o);
@@ -589,7 +589,7 @@ function yt(t) {
589
589
  return e[0];
590
590
  }
591
591
  async function Ee(t, e, n, o = !1, a = !1) {
592
- if (x(t), I(e), !Z(n, Response))
592
+ if (I(t), j(e), !Z(n, Response))
593
593
  throw new TypeError('"response" must be an instance of Response');
594
594
  if (n.status !== 200) {
595
595
  let i;
@@ -604,7 +604,7 @@ async function Ee(t, e, n, o = !1, a = !1) {
604
604
  } catch (i) {
605
605
  throw new s('failed to parse "response" body as JSON', { cause: i });
606
606
  }
607
- if (!C(r))
607
+ if (!L(r))
608
608
  throw new s('"response" body must be a top level object');
609
609
  if (!w(r.access_token))
610
610
  throw new s('"response" body "access_token" property must be a non-empty string');
@@ -622,7 +622,7 @@ async function Ee(t, e, n, o = !1, a = !1) {
622
622
  if (r.id_token !== void 0 && !w(r.id_token))
623
623
  throw new s('"response" body "id_token" property must be a non-empty string');
624
624
  if (r.id_token) {
625
- const { claims: i, jwt: c } = await Lt(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue, L(e), _e(e), e[$e]).then(At.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
625
+ const { claims: i, jwt: c } = await Lt(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue, x(e), _e(e), e[$e]).then(At.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
626
626
  if (Array.isArray(i.aud) && i.aud.length !== 1) {
627
627
  if (i.azp === void 0)
628
628
  throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
@@ -657,7 +657,7 @@ function St(t) {
657
657
  return Re.add(t), t;
658
658
  }
659
659
  async function Tt(t, e, n, o, a, r) {
660
- if (x(t), I(e), !Re.has(n))
660
+ if (I(t), j(e), !Re.has(n))
661
661
  throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
662
662
  if (!w(o))
663
663
  throw new TypeError('"redirectUri" must be a non-empty string');
@@ -705,7 +705,7 @@ async function Rt(t, e, n, o, a) {
705
705
  if (a !== B) {
706
706
  if (typeof a != "number" || a < 0)
707
707
  throw new TypeError('"maxAge" must be a non-negative number');
708
- const c = $() + L(e), p = _e(e);
708
+ const c = $() + x(e), p = _e(e);
709
709
  if (i.auth_time + a < c - p)
710
710
  throw new s("too much time has elapsed since the last End-User authentication");
711
711
  }
@@ -734,7 +734,7 @@ async function Pt(t) {
734
734
  ee(t);
735
735
  try {
736
736
  const e = await t.json();
737
- if (C(e) && typeof e.error == "string" && e.error.length)
737
+ if (L(e) && typeof e.error == "string" && e.error.length)
738
738
  return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
739
739
  } catch {
740
740
  }
@@ -804,7 +804,7 @@ async function Lt(t, e, n, o, a, r) {
804
804
  } catch (l) {
805
805
  throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
806
806
  }
807
- if (!C(f))
807
+ if (!L(f))
808
808
  throw new s("JWT Header must be a top level object");
809
809
  if (e(f), f.crit !== void 0)
810
810
  throw new s('unexpected JWT "crit" header parameter');
@@ -817,13 +817,13 @@ async function Lt(t, e, n, o, a, r) {
817
817
  } catch (l) {
818
818
  throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
819
819
  }
820
- if (!C(h))
820
+ if (!L(h))
821
821
  throw new s("JWT Payload must be a top level object");
822
- const j = $() + o;
822
+ const J = $() + o;
823
823
  if (h.exp !== void 0) {
824
824
  if (typeof h.exp != "number")
825
825
  throw new s('unexpected JWT "exp" (expiration time) claim type');
826
- if (h.exp <= j - a)
826
+ if (h.exp <= J - a)
827
827
  throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
828
828
  }
829
829
  if (h.iat !== void 0 && typeof h.iat != "number")
@@ -833,7 +833,7 @@ async function Lt(t, e, n, o, a, r) {
833
833
  if (h.nbf !== void 0) {
834
834
  if (typeof h.nbf != "number")
835
835
  throw new s('unexpected JWT "nbf" (not before) claim type');
836
- if (h.nbf > j + a)
836
+ if (h.nbf > J + a)
837
837
  throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
838
838
  }
839
839
  if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
@@ -862,7 +862,7 @@ function k(t, e) {
862
862
  }
863
863
  const It = Symbol(), jt = Symbol();
864
864
  function Jt(t, e, n, o) {
865
- if (x(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
865
+ if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
866
866
  throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
867
867
  if (k(n, "response"))
868
868
  throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
@@ -961,7 +961,7 @@ class Dt {
961
961
  b(this, "redirectToAfterSignOut");
962
962
  b(this, "audience");
963
963
  b(this, "signOut", async () => {
964
- z.setState({
964
+ C.setState({
965
965
  isAuthenticated: !1,
966
966
  isPending: !1,
967
967
  profile: void 0,
@@ -1017,7 +1017,7 @@ class Dt {
1017
1017
  emailVerified: y.email_verified ?? !1,
1018
1018
  pictureUrl: y.picture
1019
1019
  };
1020
- z.setState({
1020
+ C.setState({
1021
1021
  isAuthenticated: !0,
1022
1022
  isPending: !1,
1023
1023
  profile: T
@@ -1055,7 +1055,7 @@ class Dt {
1055
1055
  expiresOn: new Date(Date.now() + e.expires_in * 1e3),
1056
1056
  tokenType: e.token_type
1057
1057
  };
1058
- z.setState({
1058
+ C.setState({
1059
1059
  providerData: n
1060
1060
  });
1061
1061
  }
@@ -1098,13 +1098,18 @@ class Dt {
1098
1098
  location.href = c.href;
1099
1099
  }
1100
1100
  async getAccessToken() {
1101
- const e = await this.getAuthServer(), { providerData: n } = z.getState();
1101
+ const e = await this.getAuthServer(), { providerData: n } = C.getState();
1102
1102
  if (!n)
1103
1103
  throw new P("User is not authenticated");
1104
1104
  const o = n;
1105
- if (o.expiresOn < /* @__PURE__ */ new Date()) {
1105
+ if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
1106
1106
  if (!o.refreshToken)
1107
- return await this.signIn(), "";
1107
+ return C.setState({
1108
+ isAuthenticated: !1,
1109
+ isPending: !1,
1110
+ profile: null,
1111
+ providerData: null
1112
+ }), "";
1108
1113
  const a = await gt(
1109
1114
  e,
1110
1115
  this.client,