zudoku 0.0.0-e614aaa → 0.0.0-e6d1d34

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 (543) hide show
  1. package/README.md +1 -1
  2. package/dist/app/entry.server.d.ts +8 -6
  3. package/dist/app/entry.server.js +12 -8
  4. package/dist/app/entry.server.js.map +1 -1
  5. package/dist/app/main.js +2 -0
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/tailwind.js +14 -0
  8. package/dist/app/tailwind.js.map +1 -1
  9. package/dist/cli/build/handler.js +2 -1
  10. package/dist/cli/build/handler.js.map +1 -1
  11. package/dist/cli/cmds/dev.d.ts +1 -1
  12. package/dist/cli/cmds/dev.js.map +1 -1
  13. package/dist/cli/dev/handler.js +2 -1
  14. package/dist/cli/dev/handler.js.map +1 -1
  15. package/dist/cli/preview/handler.js +13 -15
  16. package/dist/cli/preview/handler.js.map +1 -1
  17. package/dist/config/common.d.ts +0 -1
  18. package/dist/config/config.d.ts +13 -8
  19. package/dist/config/loader.d.ts +2 -2
  20. package/dist/config/loader.js +14 -25
  21. package/dist/config/loader.js.map +1 -1
  22. package/dist/config/validators/common.d.ts +2773 -597
  23. package/dist/config/validators/common.js +81 -4
  24. package/dist/config/validators/common.js.map +1 -1
  25. package/dist/config/validators/validate.d.ts +1013 -257
  26. package/dist/lib/authentication/authentication.d.ts +1 -0
  27. package/dist/lib/authentication/hook.d.ts +1 -0
  28. package/dist/lib/authentication/hook.js +11 -1
  29. package/dist/lib/authentication/hook.js.map +1 -1
  30. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  31. package/dist/lib/authentication/providers/clerk.js +19 -0
  32. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  33. package/dist/lib/authentication/providers/openid.d.ts +1 -0
  34. package/dist/lib/authentication/providers/openid.js +20 -8
  35. package/dist/lib/authentication/providers/openid.js.map +1 -1
  36. package/dist/lib/authentication/providers/supabase.d.ts +4 -0
  37. package/dist/lib/authentication/providers/supabase.js +117 -0
  38. package/dist/lib/authentication/providers/supabase.js.map +1 -0
  39. package/dist/lib/authentication/state.d.ts +0 -26
  40. package/dist/lib/authentication/state.js +1 -16
  41. package/dist/lib/authentication/state.js.map +1 -1
  42. package/dist/lib/components/AnchorLink.d.ts +2 -2
  43. package/dist/lib/components/AnchorLink.js +5 -4
  44. package/dist/lib/components/AnchorLink.js.map +1 -1
  45. package/dist/lib/components/Bootstrap.d.ts +2 -1
  46. package/dist/lib/components/Bootstrap.js +3 -2
  47. package/dist/lib/components/Bootstrap.js.map +1 -1
  48. package/dist/lib/components/Footer.d.ts +1 -0
  49. package/dist/lib/components/Footer.js +32 -0
  50. package/dist/lib/components/Footer.js.map +1 -0
  51. package/dist/lib/components/Header.js +4 -4
  52. package/dist/lib/components/Header.js.map +1 -1
  53. package/dist/lib/components/Heading.d.ts +1 -1
  54. package/dist/lib/components/InlineCode.d.ts +2 -1
  55. package/dist/lib/components/InlineCode.js +2 -9
  56. package/dist/lib/components/InlineCode.js.map +1 -1
  57. package/dist/lib/components/Layout.js +8 -29
  58. package/dist/lib/components/Layout.js.map +1 -1
  59. package/dist/lib/components/Main.d.ts +2 -0
  60. package/dist/lib/components/Main.js +17 -0
  61. package/dist/lib/components/Main.js.map +1 -0
  62. package/dist/lib/components/MobileTopNavigation.js +6 -3
  63. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  64. package/dist/lib/components/Pagination.d.ts +11 -0
  65. package/dist/lib/components/Pagination.js +10 -0
  66. package/dist/lib/components/Pagination.js.map +1 -0
  67. package/dist/lib/components/TopNavigation.d.ts +3 -2
  68. package/dist/lib/components/TopNavigation.js +26 -13
  69. package/dist/lib/components/TopNavigation.js.map +1 -1
  70. package/dist/lib/components/Zudoku.js +9 -3
  71. package/dist/lib/components/Zudoku.js.map +1 -1
  72. package/dist/lib/components/cache.d.ts +7 -0
  73. package/dist/lib/components/cache.js +7 -0
  74. package/dist/lib/components/cache.js.map +1 -1
  75. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  76. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  77. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  78. package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
  79. package/dist/lib/components/context/ViewportAnchorContext.js +5 -10
  80. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  81. package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
  82. package/dist/lib/components/context/ZudokuContext.js +13 -7
  83. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  84. package/dist/lib/components/index.d.ts +5 -2
  85. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  86. package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
  87. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  88. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  89. package/dist/lib/components/navigation/Sidebar.js +1 -12
  90. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  91. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  92. package/dist/lib/components/navigation/SidebarCategory.js +10 -6
  93. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  94. package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
  95. package/dist/lib/components/navigation/SidebarItem.js +17 -11
  96. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  97. package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
  98. package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
  99. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  100. package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
  101. package/dist/lib/components/navigation/Toc.js.map +1 -0
  102. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  103. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  104. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  105. package/dist/lib/core/RouteGuard.d.ts +1 -0
  106. package/dist/lib/core/RouteGuard.js +10 -3
  107. package/dist/lib/core/RouteGuard.js.map +1 -1
  108. package/dist/lib/core/ZudokuContext.d.ts +23 -7
  109. package/dist/lib/core/ZudokuContext.js +12 -5
  110. package/dist/lib/core/ZudokuContext.js.map +1 -1
  111. package/dist/lib/core/plugins.d.ts +9 -7
  112. package/dist/lib/errors/ErrorAlert.js +6 -1
  113. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  114. package/dist/lib/hooks/useEvent.test.js +1 -1
  115. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  116. package/dist/lib/oas/graphql/index.d.ts +17 -4
  117. package/dist/lib/oas/graphql/index.js +148 -38
  118. package/dist/lib/oas/graphql/index.js.map +1 -1
  119. package/dist/lib/oas/parser/dereference/index.js +2 -0
  120. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  121. package/dist/lib/oas/parser/index.d.ts +5 -3
  122. package/dist/lib/oas/parser/index.js +0 -22
  123. package/dist/lib/oas/parser/index.js.map +1 -1
  124. package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
  125. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  126. package/dist/lib/plugins/api-catalog/index.js +19 -17
  127. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  128. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
  129. package/dist/lib/plugins/markdown/MdxPage.js +3 -9
  130. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  131. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  132. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  133. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  134. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  135. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  136. package/dist/lib/plugins/openapi/OperationList.js +63 -19
  137. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  138. package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
  139. package/dist/lib/plugins/openapi/OperationListItem.js +6 -12
  140. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  141. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  142. package/dist/lib/plugins/openapi/ParamInfos.js +42 -0
  143. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  144. package/dist/lib/plugins/openapi/ParameterListItem.js +9 -4
  145. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  146. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
  147. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  148. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  149. package/dist/lib/plugins/openapi/SchemaList.js +52 -0
  150. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  151. package/dist/lib/plugins/openapi/Sidecar.js +38 -9
  152. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  153. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  154. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  155. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  156. package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
  157. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  158. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
  159. package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -5
  160. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  161. package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
  162. package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
  163. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
  164. package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
  165. package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
  166. package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
  167. package/dist/lib/plugins/openapi/graphql/gql.d.ts +9 -5
  168. package/dist/lib/plugins/openapi/graphql/gql.js +5 -4
  169. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  170. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +108 -55
  171. package/dist/lib/plugins/openapi/graphql/graphql.js +59 -34
  172. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  173. package/dist/lib/plugins/openapi/index.d.ts +6 -11
  174. package/dist/lib/plugins/openapi/index.js +41 -60
  175. package/dist/lib/plugins/openapi/index.js.map +1 -1
  176. package/dist/lib/plugins/openapi/interfaces.d.ts +36 -10
  177. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
  178. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
  179. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  180. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  181. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  182. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  183. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
  184. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  185. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  186. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
  187. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  188. package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
  189. package/dist/lib/plugins/openapi/playground/Playground.js +81 -27
  190. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  191. package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
  192. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  193. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  194. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  195. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  196. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  197. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  198. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  199. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
  200. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  201. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
  202. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
  203. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  204. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  205. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  206. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  207. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  208. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  209. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  210. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  211. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  212. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  213. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  214. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
  215. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  216. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
  217. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +18 -13
  218. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  219. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
  220. package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -48
  221. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  222. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  223. package/dist/lib/plugins/openapi/schema/utils.js +3 -1
  224. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  225. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  226. package/dist/lib/plugins/openapi/state.js +18 -0
  227. package/dist/lib/plugins/openapi/state.js.map +1 -0
  228. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
  229. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
  230. package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
  231. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  232. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +23 -10
  233. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  234. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -0
  235. package/dist/lib/plugins/search-pagefind/ResultList.js +19 -17
  236. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  237. package/dist/lib/plugins/search-pagefind/get-results.d.ts +8 -1
  238. package/dist/lib/plugins/search-pagefind/get-results.js +9 -4
  239. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  240. package/dist/lib/ui/Badge.d.ts +1 -1
  241. package/dist/lib/ui/Button.d.ts +2 -2
  242. package/dist/lib/ui/Button.js +2 -1
  243. package/dist/lib/ui/Button.js.map +1 -1
  244. package/dist/lib/ui/Callout.d.ts +2 -1
  245. package/dist/lib/ui/Callout.js +3 -2
  246. package/dist/lib/ui/Callout.js.map +1 -1
  247. package/dist/lib/ui/Checkbox.d.ts +2 -8
  248. package/dist/lib/ui/Checkbox.js +1 -13
  249. package/dist/lib/ui/Checkbox.js.map +1 -1
  250. package/dist/lib/ui/Command.d.ts +1 -1
  251. package/dist/lib/ui/Select.js +1 -1
  252. package/dist/lib/ui/Select.js.map +1 -1
  253. package/dist/lib/ui/Stepper.d.ts +0 -1
  254. package/dist/lib/ui/Stepper.js +1 -1
  255. package/dist/lib/ui/Stepper.js.map +1 -1
  256. package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
  257. package/dist/lib/ui/SyntaxHighlight.js +21 -15
  258. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  259. package/dist/lib/util/MdxComponents.d.ts +3 -2
  260. package/dist/lib/util/MdxComponents.js +2 -2
  261. package/dist/lib/util/MdxComponents.js.map +1 -1
  262. package/dist/lib/util/joinPath.d.ts +3 -0
  263. package/dist/lib/util/joinPath.js +3 -0
  264. package/dist/lib/util/joinPath.js.map +1 -1
  265. package/dist/lib/util/traverse.d.ts +2 -8
  266. package/dist/lib/util/traverse.js +2 -2
  267. package/dist/lib/util/traverse.js.map +1 -1
  268. package/dist/lib/util/types.d.ts +7 -0
  269. package/dist/lib/util/types.js +2 -0
  270. package/dist/lib/util/types.js.map +1 -0
  271. package/dist/lib/util/useOnScreen.d.ts +3 -2
  272. package/dist/lib/util/useOnScreen.js +3 -3
  273. package/dist/lib/util/useOnScreen.js.map +1 -1
  274. package/dist/lib/util/useScrollToAnchor.js +20 -12
  275. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  276. package/dist/vite/api/schema-codegen.d.ts +1 -1
  277. package/dist/vite/api/schema-codegen.js +35 -12
  278. package/dist/vite/api/schema-codegen.js.map +1 -1
  279. package/dist/vite/api/schema-codegen.test.js +66 -0
  280. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  281. package/dist/vite/build.js +1 -4
  282. package/dist/vite/build.js.map +1 -1
  283. package/dist/vite/config.js +7 -9
  284. package/dist/vite/config.js.map +1 -1
  285. package/dist/vite/create-pagefind-index.d.ts +4 -0
  286. package/dist/vite/create-pagefind-index.js +12 -0
  287. package/dist/vite/create-pagefind-index.js.map +1 -0
  288. package/dist/vite/dev-server.js +4 -4
  289. package/dist/vite/dev-server.js.map +1 -1
  290. package/dist/vite/plugin-api.js +36 -29
  291. package/dist/vite/plugin-api.js.map +1 -1
  292. package/dist/vite/plugin-config-reload.js +3 -2
  293. package/dist/vite/plugin-config-reload.js.map +1 -1
  294. package/dist/vite/plugin-docs.d.ts +1 -1
  295. package/dist/vite/plugin-docs.js +18 -1
  296. package/dist/vite/plugin-docs.js.map +1 -1
  297. package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
  298. package/dist/vite/prerender/FileWritingResponse.js +5 -5
  299. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  300. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  301. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  302. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  303. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  304. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  305. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  306. package/dist/vite/prerender/prerender.d.ts +1 -0
  307. package/dist/vite/prerender/prerender.js +32 -8
  308. package/dist/vite/prerender/prerender.js.map +1 -1
  309. package/dist/vite/prerender/worker.js +41 -14
  310. package/dist/vite/prerender/worker.js.map +1 -1
  311. package/dist/zuplo/with-zuplo.js +4 -0
  312. package/dist/zuplo/with-zuplo.js.map +1 -1
  313. package/lib/{AuthenticationPlugin-CiO1FM6Q.js → AuthenticationPlugin-foqdvvkf.js} +3 -3
  314. package/lib/{AuthenticationPlugin-CiO1FM6Q.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
  315. package/lib/Button-Fp19CMUr.js +49 -0
  316. package/lib/Button-Fp19CMUr.js.map +1 -0
  317. package/lib/Callout-B2vsR09t.js +229 -0
  318. package/lib/Callout-B2vsR09t.js.map +1 -0
  319. package/lib/{Dialog-DIKGQxQc.js → Dialog-sbgekbjb.js} +47 -32
  320. package/lib/{Dialog-DIKGQxQc.js.map → Dialog-sbgekbjb.js.map} +1 -1
  321. package/lib/Drawer-kDAfOq_2.js +1133 -0
  322. package/lib/Drawer-kDAfOq_2.js.map +1 -0
  323. package/lib/{Markdown-DePfm7oQ.js → Markdown-aF5FdsNi.js} +6268 -4572
  324. package/lib/Markdown-aF5FdsNi.js.map +1 -0
  325. package/lib/MdxPage-Vw_dc9Yz.js +85 -0
  326. package/lib/MdxPage-Vw_dc9Yz.js.map +1 -0
  327. package/lib/{OasProvider-BSuptFK-.js → OasProvider-C5paEivQ.js} +4 -4
  328. package/lib/{OasProvider-BSuptFK-.js.map → OasProvider-C5paEivQ.js.map} +1 -1
  329. package/lib/OperationList-Ds9Izgkn.js +5069 -0
  330. package/lib/OperationList-Ds9Izgkn.js.map +1 -0
  331. package/lib/Pagination-SdlocK96.js +48 -0
  332. package/lib/Pagination-SdlocK96.js.map +1 -0
  333. package/lib/{index.esm-CQHE3GEU.js → RouteGuard-CqZPoZYJ.js} +192 -139
  334. package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
  335. package/lib/SchemaList-NZbDXAV5.js +148 -0
  336. package/lib/SchemaList-NZbDXAV5.js.map +1 -0
  337. package/lib/SchemaView-B3fOPR4V.js +357 -0
  338. package/lib/SchemaView-B3fOPR4V.js.map +1 -0
  339. package/lib/{Select-Dqtcn53H.js → Select-DVFRKf1R.js} +9 -9
  340. package/lib/{Select-Dqtcn53H.js.map → Select-DVFRKf1R.js.map} +1 -1
  341. package/lib/SlotletProvider-DXvc0aY6.js +338 -0
  342. package/lib/SlotletProvider-DXvc0aY6.js.map +1 -0
  343. package/lib/Spinner-CE68iCm0.js +7 -0
  344. package/lib/Spinner-CE68iCm0.js.map +1 -0
  345. package/lib/SyntaxHighlight-BEoSoPEo.js +2890 -0
  346. package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
  347. package/lib/Toc-YBsgI72s.js +92 -0
  348. package/lib/Toc-YBsgI72s.js.map +1 -0
  349. package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-HA7DTUK3-C4gP41vD.js} +278 -278
  350. package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
  351. package/lib/{circular-v7K6lDDh.js → circular-ByJI6Mci.js} +4887 -4419
  352. package/lib/circular-ByJI6Mci.js.map +1 -0
  353. package/lib/{createServer-DmusVVsi.js → createServer-mYvGvmc0.js} +4150 -4424
  354. package/lib/createServer-mYvGvmc0.js.map +1 -0
  355. package/lib/{hook-CN__aZIt.js → hook-CqpVYDqN.js} +398 -379
  356. package/lib/hook-CqpVYDqN.js.map +1 -0
  357. package/lib/index-D48iOQvJ.js +1973 -0
  358. package/lib/index-D48iOQvJ.js.map +1 -0
  359. package/lib/index-PGJOZ6R-.js +2227 -0
  360. package/lib/index-PGJOZ6R-.js.map +1 -0
  361. package/lib/{mutation-EclmI0is.js → mutation-8LjrN7uz.js} +2 -2
  362. package/lib/{mutation-EclmI0is.js.map → mutation-8LjrN7uz.js.map} +1 -1
  363. package/lib/post-processors/traverse.js +2 -2
  364. package/lib/post-processors/traverse.js.map +1 -1
  365. package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
  366. package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
  367. package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
  368. package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
  369. package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
  370. package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
  371. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
  372. package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
  373. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  374. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
  375. package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
  376. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  377. package/lib/ui/ActionButton.js +11 -10
  378. package/lib/ui/ActionButton.js.map +1 -1
  379. package/lib/ui/Button.js +13 -12
  380. package/lib/ui/Button.js.map +1 -1
  381. package/lib/ui/Callout.js +39 -21
  382. package/lib/ui/Callout.js.map +1 -1
  383. package/lib/ui/Checkbox.js +15 -25
  384. package/lib/ui/Checkbox.js.map +1 -1
  385. package/lib/ui/Command.js +1 -1
  386. package/lib/ui/Drawer.js +14 -1129
  387. package/lib/ui/Drawer.js.map +1 -1
  388. package/lib/ui/Select.js +1 -1
  389. package/lib/ui/Select.js.map +1 -1
  390. package/lib/ui/Stepper.js.map +1 -1
  391. package/lib/ui/SyntaxHighlight.js +8 -2902
  392. package/lib/ui/SyntaxHighlight.js.map +1 -1
  393. package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-B9qXJedG.js} +2 -2
  394. package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
  395. package/lib/useLatest-hmRS46UF.js +11 -0
  396. package/lib/useLatest-hmRS46UF.js.map +1 -0
  397. package/lib/zudoku.auth-auth0.js +1 -1
  398. package/lib/zudoku.auth-clerk.js +59 -41
  399. package/lib/zudoku.auth-clerk.js.map +1 -1
  400. package/lib/zudoku.auth-openid.js +341 -337
  401. package/lib/zudoku.auth-openid.js.map +1 -1
  402. package/lib/zudoku.components.js +32 -1395
  403. package/lib/zudoku.components.js.map +1 -1
  404. package/lib/zudoku.hooks.js +1 -1
  405. package/lib/zudoku.plugin-api-catalog.js +94 -98
  406. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  407. package/lib/zudoku.plugin-api-keys.js +4 -4
  408. package/lib/zudoku.plugin-custom-pages.js +2 -2
  409. package/lib/zudoku.plugin-markdown.js +1 -1
  410. package/lib/zudoku.plugin-openapi.js +5 -7
  411. package/lib/zudoku.plugin-openapi.js.map +1 -1
  412. package/lib/zudoku.plugin-redirect.js +1 -1
  413. package/lib/zudoku.plugin-search-pagefind.js +233 -0
  414. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  415. package/lib/zudoku.plugins.js.map +1 -1
  416. package/package.json +32 -24
  417. package/src/app/entry.server.tsx +23 -13
  418. package/src/app/main.css +98 -57
  419. package/src/app/main.tsx +2 -0
  420. package/src/app/tailwind.ts +14 -0
  421. package/src/lib/authentication/authentication.ts +2 -0
  422. package/src/lib/authentication/hook.ts +12 -1
  423. package/src/lib/authentication/providers/clerk.tsx +22 -2
  424. package/src/lib/authentication/providers/openid.tsx +23 -10
  425. package/src/lib/authentication/providers/supabase.tsx +157 -0
  426. package/src/lib/authentication/state.ts +1 -35
  427. package/src/lib/components/AnchorLink.tsx +9 -7
  428. package/src/lib/components/Bootstrap.tsx +13 -6
  429. package/src/lib/components/Footer.tsx +136 -0
  430. package/src/lib/components/Header.tsx +11 -7
  431. package/src/lib/components/InlineCode.tsx +13 -16
  432. package/src/lib/components/Layout.tsx +22 -68
  433. package/src/lib/components/Main.tsx +50 -0
  434. package/src/lib/components/MobileTopNavigation.tsx +27 -18
  435. package/src/lib/components/Pagination.tsx +50 -0
  436. package/src/lib/components/TopNavigation.tsx +40 -17
  437. package/src/lib/components/Zudoku.tsx +12 -3
  438. package/src/lib/components/cache.ts +8 -0
  439. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  440. package/src/lib/components/context/ViewportAnchorContext.tsx +6 -15
  441. package/src/lib/components/context/ZudokuContext.ts +17 -8
  442. package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
  443. package/src/lib/components/navigation/Sidebar.tsx +30 -44
  444. package/src/lib/components/navigation/SidebarCategory.tsx +15 -12
  445. package/src/lib/components/navigation/SidebarItem.tsx +21 -29
  446. package/src/lib/components/navigation/SidebarWrapper.tsx +42 -23
  447. package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
  448. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  449. package/src/lib/core/RouteGuard.tsx +27 -4
  450. package/src/lib/core/ZudokuContext.ts +35 -15
  451. package/src/lib/core/plugins.ts +8 -8
  452. package/src/lib/errors/ErrorAlert.tsx +24 -17
  453. package/src/lib/hooks/useEvent.test.tsx +1 -1
  454. package/src/lib/oas/graphql/index.ts +202 -54
  455. package/src/lib/oas/parser/dereference/index.ts +2 -0
  456. package/src/lib/oas/parser/index.ts +7 -29
  457. package/src/lib/plugins/api-catalog/Catalog.tsx +1 -4
  458. package/src/lib/plugins/api-catalog/index.tsx +40 -35
  459. package/src/lib/plugins/markdown/MdxPage.tsx +11 -47
  460. package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
  461. package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
  462. package/src/lib/plugins/openapi/OperationList.tsx +162 -84
  463. package/src/lib/plugins/openapi/OperationListItem.tsx +116 -110
  464. package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
  465. package/src/lib/plugins/openapi/ParameterListItem.tsx +35 -23
  466. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
  467. package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
  468. package/src/lib/plugins/openapi/Sidecar.tsx +47 -11
  469. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  470. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
  471. package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -5
  472. package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
  473. package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
  474. package/src/lib/plugins/openapi/graphql/gql.ts +29 -20
  475. package/src/lib/plugins/openapi/graphql/graphql.ts +172 -86
  476. package/src/lib/plugins/openapi/index.tsx +55 -87
  477. package/src/lib/plugins/openapi/interfaces.ts +44 -15
  478. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
  479. package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
  480. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
  481. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
  482. package/src/lib/plugins/openapi/playground/Playground.tsx +175 -88
  483. package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
  484. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  485. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  486. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
  487. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +67 -45
  488. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  489. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  490. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  491. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
  492. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +47 -50
  493. package/src/lib/plugins/openapi/schema/SchemaView.tsx +84 -138
  494. package/src/lib/plugins/openapi/schema/utils.ts +7 -1
  495. package/src/lib/plugins/openapi/state.ts +36 -0
  496. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
  497. package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
  498. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +39 -14
  499. package/src/lib/plugins/search-pagefind/ResultList.tsx +60 -53
  500. package/src/lib/plugins/search-pagefind/get-results.tsx +31 -10
  501. package/src/lib/ui/Button.tsx +4 -2
  502. package/src/lib/ui/Callout.tsx +28 -10
  503. package/src/lib/ui/Checkbox.tsx +8 -24
  504. package/src/lib/ui/Select.tsx +1 -1
  505. package/src/lib/ui/Stepper.tsx +1 -1
  506. package/src/lib/ui/SyntaxHighlight.tsx +96 -96
  507. package/src/lib/util/MdxComponents.tsx +2 -2
  508. package/src/lib/util/joinPath.tsx +3 -0
  509. package/src/lib/util/traverse.ts +4 -8
  510. package/src/lib/util/types.ts +7 -0
  511. package/src/lib/util/useOnScreen.ts +6 -4
  512. package/src/lib/util/useScrollToAnchor.ts +22 -12
  513. package/dist/lib/components/context/PluginSystem.d.ts +0 -1
  514. package/dist/lib/components/context/PluginSystem.js +0 -2
  515. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  516. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  517. package/dist/vite/pagefind.d.ts +0 -4
  518. package/dist/vite/pagefind.js +0 -15
  519. package/dist/vite/pagefind.js.map +0 -1
  520. package/lib/Markdown-DePfm7oQ.js.map +0 -1
  521. package/lib/MdxPage-BN6l6zXL.js +0 -201
  522. package/lib/MdxPage-BN6l6zXL.js.map +0 -1
  523. package/lib/OperationList-DOcfDmJP.js +0 -5217
  524. package/lib/OperationList-DOcfDmJP.js.map +0 -1
  525. package/lib/SlotletProvider-DdtIOUi6.js +0 -221
  526. package/lib/SlotletProvider-DdtIOUi6.js.map +0 -1
  527. package/lib/Spinner-1KrEmx1V.js +0 -51
  528. package/lib/Spinner-1KrEmx1V.js.map +0 -1
  529. package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +0 -1
  530. package/lib/circular-v7K6lDDh.js.map +0 -1
  531. package/lib/createServer-DmusVVsi.js.map +0 -1
  532. package/lib/hook-CN__aZIt.js.map +0 -1
  533. package/lib/index-BTbP6Lgf.js +0 -2103
  534. package/lib/index-BTbP6Lgf.js.map +0 -1
  535. package/lib/index.esm-CQHE3GEU.js.map +0 -1
  536. package/lib/joinUrl-10po2Jdj.js +0 -20
  537. package/lib/joinUrl-10po2Jdj.js.map +0 -1
  538. package/lib/useScrollToAnchor-RyqO3lj4.js +0 -290
  539. package/lib/useScrollToAnchor-RyqO3lj4.js.map +0 -1
  540. package/lib/zudoku.css +0 -1
  541. package/src/lib/components/context/PluginSystem.ts +0 -0
  542. package/src/lib/ui/Stepper.css +0 -43
  543. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
@@ -1,20 +1,19 @@
1
- var Ue = Object.defineProperty;
2
- var Le = (t, e, n) => e in t ? Ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var _ = (t, e, n) => Le(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { j as q } from "./jsx-runtime-CYK1ROHF.js";
5
- import { g as xe } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { C as Ce } from "./ClientOnly-E7hGysn1.js";
7
- import { j as oe } from "./joinUrl-10po2Jdj.js";
8
- import { A as je } from "./AuthenticationPlugin-CiO1FM6Q.js";
9
- import { b as Ie, u as L } from "./hook-CN__aZIt.js";
10
- import { N as Je } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
11
- import { Z as Oe } from "./invariant-Caa8-XvF.js";
12
- var D = { exports: {} }, ze = D.exports, ie;
13
- function De() {
14
- return ie || (ie = 1, function(t) {
1
+ var Le = Object.defineProperty;
2
+ var xe = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var b = (t, e, n) => xe(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { j as B } from "./jsx-runtime-CYK1ROHF.js";
5
+ import { g as Ce } from "./_commonjsHelpers-BkfeUUK-.js";
6
+ import { C as Ie } from "./ClientOnly-E7hGysn1.js";
7
+ import { d as je, f as ie, u as x } from "./hook-CqpVYDqN.js";
8
+ import { A as Je } from "./AuthenticationPlugin-foqdvvkf.js";
9
+ import { N as Oe } from "./chunk-HA7DTUK3-C4gP41vD.js";
10
+ import { Z as ze } from "./invariant-Caa8-XvF.js";
11
+ var D = { exports: {} }, De = D.exports, ae;
12
+ function Ne() {
13
+ return ae || (ae = 1, function(t) {
15
14
  (function(e, n) {
16
15
  t.exports ? t.exports = n() : e.log = n();
17
- })(ze, function() {
16
+ })(De, function() {
18
17
  var e = function() {
19
18
  }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
20
19
  "trace",
@@ -23,8 +22,8 @@ function De() {
23
22
  "warn",
24
23
  "error"
25
24
  ], r = {}, i = null;
26
- function c(l, g) {
27
- var u = l[g];
25
+ function c(l, m) {
26
+ var u = l[m];
28
27
  if (typeof u.bind == "function")
29
28
  return u.bind(l);
30
29
  try {
@@ -35,76 +34,76 @@ function De() {
35
34
  };
36
35
  }
37
36
  }
38
- function f() {
37
+ function p() {
39
38
  console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
40
39
  }
41
40
  function w(l) {
42
- return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? f : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
41
+ return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
43
42
  }
44
- function p() {
45
- for (var l = this.getLevel(), g = 0; g < a.length; g++) {
46
- var u = a[g];
47
- this[u] = g < l ? e : this.methodFactory(u, l, this.name);
43
+ function f() {
44
+ for (var l = this.getLevel(), m = 0; m < a.length; m++) {
45
+ var u = a[m];
46
+ this[u] = m < l ? e : this.methodFactory(u, l, this.name);
48
47
  }
49
48
  if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
50
49
  return "No console available for logging";
51
50
  }
52
- function b(l) {
51
+ function v(l) {
53
52
  return function() {
54
- typeof console !== n && (p.call(this), this[l].apply(this, arguments));
53
+ typeof console !== n && (f.call(this), this[l].apply(this, arguments));
55
54
  };
56
55
  }
57
- function T(l, g, u) {
58
- return w(l) || b.apply(this, arguments);
56
+ function _(l, m, u) {
57
+ return w(l) || v.apply(this, arguments);
59
58
  }
60
- function h(l, g) {
61
- var u = this, J, $, R, v = "loglevel";
62
- typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
63
- function Ee(d) {
59
+ function h(l, m) {
60
+ var u = this, J, $, U, S = "loglevel";
61
+ typeof l == "string" ? S += ":" + l : typeof l == "symbol" && (S = void 0);
62
+ function Re(d) {
64
63
  var y = (a[d] || "silent").toUpperCase();
65
- if (!(typeof window === n || !v)) {
64
+ if (!(typeof window === n || !S)) {
66
65
  try {
67
- window.localStorage[v] = y;
66
+ window.localStorage[S] = y;
68
67
  return;
69
68
  } catch {
70
69
  }
71
70
  try {
72
- window.document.cookie = encodeURIComponent(v) + "=" + y + ";";
71
+ window.document.cookie = encodeURIComponent(S) + "=" + y + ";";
73
72
  } catch {
74
73
  }
75
74
  }
76
75
  }
77
- function te() {
76
+ function ne() {
78
77
  var d;
79
- if (!(typeof window === n || !v)) {
78
+ if (!(typeof window === n || !S)) {
80
79
  try {
81
- d = window.localStorage[v];
80
+ d = window.localStorage[S];
82
81
  } catch {
83
82
  }
84
83
  if (typeof d === n)
85
84
  try {
86
- var y = window.document.cookie, O = encodeURIComponent(v), re = y.indexOf(O + "=");
87
- re !== -1 && (d = /^([^;]+)/.exec(
88
- y.slice(re + O.length + 1)
85
+ var y = window.document.cookie, O = encodeURIComponent(S), oe = y.indexOf(O + "=");
86
+ oe !== -1 && (d = /^([^;]+)/.exec(
87
+ y.slice(oe + O.length + 1)
89
88
  )[1]);
90
89
  } catch {
91
90
  }
92
91
  return u.levels[d] === void 0 && (d = void 0), d;
93
92
  }
94
93
  }
95
- function Re() {
96
- if (!(typeof window === n || !v)) {
94
+ function Pe() {
95
+ if (!(typeof window === n || !S)) {
97
96
  try {
98
- window.localStorage.removeItem(v);
97
+ window.localStorage.removeItem(S);
99
98
  } catch {
100
99
  }
101
100
  try {
102
- window.document.cookie = encodeURIComponent(v) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
101
+ window.document.cookie = encodeURIComponent(S) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
103
102
  } catch {
104
103
  }
105
104
  }
106
105
  }
107
- function U(d) {
106
+ function L(d) {
108
107
  var y = d;
109
108
  if (typeof y == "string" && u.levels[y.toUpperCase()] !== void 0 && (y = u.levels[y.toUpperCase()]), typeof y == "number" && y >= 0 && y <= u.levels.SILENT)
110
109
  return y;
@@ -117,52 +116,52 @@ function De() {
117
116
  WARN: 3,
118
117
  ERROR: 4,
119
118
  SILENT: 5
120
- }, u.methodFactory = g || T, u.getLevel = function() {
121
- return R ?? $ ?? J;
119
+ }, u.methodFactory = m || _, u.getLevel = function() {
120
+ return U ?? $ ?? J;
122
121
  }, u.setLevel = function(d, y) {
123
- return R = U(d), y !== !1 && Ee(R), p.call(u);
122
+ return U = L(d), y !== !1 && Re(U), f.call(u);
124
123
  }, u.setDefaultLevel = function(d) {
125
- $ = U(d), te() || u.setLevel(d, !1);
124
+ $ = L(d), ne() || u.setLevel(d, !1);
126
125
  }, u.resetLevel = function() {
127
- R = null, Re(), p.call(u);
126
+ U = null, Pe(), f.call(u);
128
127
  }, u.enableAll = function(d) {
129
128
  u.setLevel(u.levels.TRACE, d);
130
129
  }, u.disableAll = function(d) {
131
130
  u.setLevel(u.levels.SILENT, d);
132
131
  }, u.rebuild = function() {
133
- if (i !== u && (J = U(i.getLevel())), p.call(u), i === u)
132
+ if (i !== u && (J = L(i.getLevel())), f.call(u), i === u)
134
133
  for (var d in r)
135
134
  r[d].rebuild();
136
- }, J = U(
135
+ }, J = L(
137
136
  i ? i.getLevel() : "WARN"
138
137
  );
139
- var ne = te();
140
- ne != null && (R = U(ne)), p.call(u);
138
+ var re = ne();
139
+ re != null && (U = L(re)), f.call(u);
141
140
  }
142
- i = new h(), i.getLogger = function(g) {
143
- if (typeof g != "symbol" && typeof g != "string" || g === "")
141
+ i = new h(), i.getLogger = function(m) {
142
+ if (typeof m != "symbol" && typeof m != "string" || m === "")
144
143
  throw new TypeError("You must supply a name when creating a logger.");
145
- var u = r[g];
146
- return u || (u = r[g] = new h(
147
- g,
144
+ var u = r[m];
145
+ return u || (u = r[m] = new h(
146
+ m,
148
147
  i.methodFactory
149
148
  )), u;
150
149
  };
151
- var I = typeof window !== n ? window.log : void 0;
150
+ var P = typeof window !== n ? window.log : void 0;
152
151
  return i.noConflict = function() {
153
- return typeof window !== n && window.log === i && (window.log = I), i;
152
+ return typeof window !== n && window.log === i && (window.log = P), i;
154
153
  }, i.getLoggers = function() {
155
154
  return r;
156
155
  }, i.default = i, i;
157
156
  });
158
157
  }(D)), D.exports;
159
158
  }
160
- var Ne = De();
161
- const ae = /* @__PURE__ */ xe(Ne);
162
- let B;
163
- var z, pe;
164
- (typeof navigator > "u" || !((pe = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && pe.call(z, "Mozilla/5.0 "))) && (B = "oauth4webapi/v2.17.0");
165
- function G(t, e) {
159
+ var We = Ne();
160
+ const se = /* @__PURE__ */ Ce(We);
161
+ let V;
162
+ var z, we;
163
+ (typeof navigator > "u" || !((we = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && we.call(z, "Mozilla/5.0 "))) && (V = "oauth4webapi/v2.17.0");
164
+ function Y(t, e) {
166
165
  if (t == null)
167
166
  return !1;
168
167
  try {
@@ -171,19 +170,19 @@ function G(t, e) {
171
170
  return !1;
172
171
  }
173
172
  }
174
- const W = Symbol(), We = Symbol(), Z = Symbol(), Ke = Symbol(), He = Symbol(), $e = Symbol(), Fe = new TextEncoder(), Me = new TextDecoder();
173
+ const W = Symbol(), Ke = Symbol(), Z = Symbol(), He = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), qe = new TextDecoder();
175
174
  function E(t) {
176
- return typeof t == "string" ? Fe.encode(t) : Me.decode(t);
175
+ return typeof t == "string" ? Me.encode(t) : qe.decode(t);
177
176
  }
178
- const se = 32768;
179
- function qe(t) {
177
+ const ce = 32768;
178
+ function Be(t) {
180
179
  t instanceof ArrayBuffer && (t = new Uint8Array(t));
181
180
  const e = [];
182
- for (let n = 0; n < t.byteLength; n += se)
183
- e.push(String.fromCharCode.apply(null, t.subarray(n, n + se)));
181
+ for (let n = 0; n < t.byteLength; n += ce)
182
+ e.push(String.fromCharCode.apply(null, t.subarray(n, n + ce)));
184
183
  return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
185
184
  }
186
- function Be(t) {
185
+ function Ve(t) {
187
186
  try {
188
187
  const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
189
188
  for (let o = 0; o < e.length; o++)
@@ -194,9 +193,9 @@ function Be(t) {
194
193
  }
195
194
  }
196
195
  function k(t) {
197
- return typeof t == "string" ? Be(t) : qe(t);
196
+ return typeof t == "string" ? Ve(t) : Be(t);
198
197
  }
199
- class Ve {
198
+ class Ge {
200
199
  constructor(e) {
201
200
  this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
202
201
  }
@@ -220,54 +219,54 @@ class Ve {
220
219
  this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
221
220
  }
222
221
  }
223
- class S extends Error {
222
+ class T extends Error {
224
223
  constructor(e) {
225
224
  var n;
226
225
  super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
227
226
  }
228
227
  }
229
- class Ge extends Error {
228
+ class Ye extends Error {
230
229
  constructor(e, n) {
231
230
  var o;
232
231
  super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
233
232
  }
234
233
  }
235
- const s = Ge, we = new Ve(100);
234
+ const s = Ye, ge = new Ge(100);
236
235
  function me(t) {
237
236
  return t instanceof CryptoKey;
238
237
  }
239
238
  function Ze(t) {
240
239
  return me(t) && t.type === "private";
241
240
  }
242
- function Ye(t) {
241
+ function Qe(t) {
243
242
  return me(t) && t.type === "public";
244
243
  }
245
- function Y(t) {
244
+ function Q(t) {
246
245
  try {
247
246
  const e = t.headers.get("dpop-nonce");
248
- e && we.set(new URL(t.url).origin, e);
247
+ e && ge.set(new URL(t.url).origin, e);
249
248
  } catch {
250
249
  }
251
250
  return t;
252
251
  }
253
- function x(t) {
252
+ function C(t) {
254
253
  return !(t === null || typeof t != "object" || Array.isArray(t));
255
254
  }
256
255
  function K(t) {
257
- G(t, Headers) && (t = Object.fromEntries(t.entries()));
256
+ Y(t, Headers) && (t = Object.fromEntries(t.entries()));
258
257
  const e = new Headers(t);
259
- if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
258
+ if (V && !e.has("user-agent") && e.set("user-agent", V), e.has("authorization"))
260
259
  throw new TypeError('"options.headers" must not include the "authorization" header name');
261
260
  if (e.has("dpop"))
262
261
  throw new TypeError('"options.headers" must not include the "dpop" header name');
263
262
  return e;
264
263
  }
265
- function Qe(t) {
264
+ function Xe(t) {
266
265
  if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
267
266
  throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
268
267
  return t;
269
268
  }
270
- async function Xe(t, e) {
269
+ async function et(t, e) {
271
270
  if (!(t instanceof URL))
272
271
  throw new TypeError('"issuerIdentifier" must be an instance of URL');
273
272
  if (t.protocol !== "https:" && t.protocol !== "http:")
@@ -290,55 +289,55 @@ async function Xe(t, e) {
290
289
  method: "GET",
291
290
  redirect: "manual",
292
291
  signal: null
293
- }).then(Y);
292
+ }).then(Q);
294
293
  }
295
- function m(t) {
294
+ function g(t) {
296
295
  return typeof t == "string" && t.length !== 0;
297
296
  }
298
- async function et(t, e) {
297
+ async function tt(t, e) {
299
298
  if (!(t instanceof URL))
300
299
  throw new TypeError('"expectedIssuer" must be an instance of URL');
301
- if (!G(e, Response))
300
+ if (!Y(e, Response))
302
301
  throw new TypeError('"response" must be an instance of Response');
303
302
  if (e.status !== 200)
304
303
  throw new s('"response" is not a conform Authorization Server Metadata response');
305
- ee(e);
304
+ te(e);
306
305
  let n;
307
306
  try {
308
307
  n = await e.json();
309
308
  } catch (o) {
310
309
  throw new s('failed to parse "response" body as JSON', { cause: o });
311
310
  }
312
- if (!x(n))
311
+ if (!C(n))
313
312
  throw new s('"response" body must be a top level object');
314
- if (!m(n.issuer))
313
+ if (!g(n.issuer))
315
314
  throw new s('"response" body "issuer" property must be a non-empty string');
316
315
  if (new URL(n.issuer).href !== t.href)
317
316
  throw new s('"response" body "issuer" does not match "expectedIssuer"');
318
317
  return n;
319
318
  }
320
- function Q() {
319
+ function X() {
321
320
  return k(crypto.getRandomValues(new Uint8Array(32)));
322
321
  }
323
- function tt() {
324
- return Q();
325
- }
326
322
  function nt() {
327
- return Q();
323
+ return X();
324
+ }
325
+ function rt() {
326
+ return X();
328
327
  }
329
- async function rt(t) {
330
- if (!m(t))
328
+ async function ot(t) {
329
+ if (!g(t))
331
330
  throw new TypeError('"codeVerifier" must be a non-empty string');
332
331
  return k(await crypto.subtle.digest("SHA-256", E(t)));
333
332
  }
334
- function ce(t) {
333
+ function ue(t) {
335
334
  return encodeURIComponent(t).replace(/%20/g, "+");
336
335
  }
337
- function ot(t, e) {
338
- const n = ce(t), o = ce(e);
336
+ function it(t, e) {
337
+ const n = ue(t), o = ue(e);
339
338
  return `Basic ${btoa(`${n}:${o}`)}`;
340
339
  }
341
- function it(t) {
340
+ function at(t) {
342
341
  switch (t.algorithm.hash.name) {
343
342
  case "SHA-256":
344
343
  return "PS256";
@@ -347,10 +346,10 @@ function it(t) {
347
346
  case "SHA-512":
348
347
  return "PS512";
349
348
  default:
350
- throw new S("unsupported RsaHashedKeyAlgorithm hash name");
349
+ throw new T("unsupported RsaHashedKeyAlgorithm hash name");
351
350
  }
352
351
  }
353
- function at(t) {
352
+ function st(t) {
354
353
  switch (t.algorithm.hash.name) {
355
354
  case "SHA-256":
356
355
  return "RS256";
@@ -359,10 +358,10 @@ function at(t) {
359
358
  case "SHA-512":
360
359
  return "RS512";
361
360
  default:
362
- throw new S("unsupported RsaHashedKeyAlgorithm hash name");
361
+ throw new T("unsupported RsaHashedKeyAlgorithm hash name");
363
362
  }
364
363
  }
365
- function st(t) {
364
+ function ct(t) {
366
365
  switch (t.algorithm.namedCurve) {
367
366
  case "P-256":
368
367
  return "ES256";
@@ -371,221 +370,221 @@ function st(t) {
371
370
  case "P-521":
372
371
  return "ES512";
373
372
  default:
374
- throw new S("unsupported EcKeyAlgorithm namedCurve");
373
+ throw new T("unsupported EcKeyAlgorithm namedCurve");
375
374
  }
376
375
  }
377
- function ct(t) {
376
+ function ut(t) {
378
377
  switch (t.algorithm.name) {
379
378
  case "RSA-PSS":
380
- return it(t);
381
- case "RSASSA-PKCS1-v1_5":
382
379
  return at(t);
383
- case "ECDSA":
380
+ case "RSASSA-PKCS1-v1_5":
384
381
  return st(t);
382
+ case "ECDSA":
383
+ return ct(t);
385
384
  case "Ed25519":
386
385
  case "Ed448":
387
386
  return "EdDSA";
388
387
  default:
389
- throw new S("unsupported CryptoKey algorithm name");
388
+ throw new T("unsupported CryptoKey algorithm name");
390
389
  }
391
390
  }
392
391
  function H(t) {
393
392
  const e = t == null ? void 0 : t[W];
394
393
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
395
394
  }
396
- function ge(t) {
397
- const e = t == null ? void 0 : t[We];
395
+ function ye(t) {
396
+ const e = t == null ? void 0 : t[Ke];
398
397
  return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
399
398
  }
400
- function X() {
399
+ function ee() {
401
400
  return Math.floor(Date.now() / 1e3);
402
401
  }
403
- function C(t) {
402
+ function I(t) {
404
403
  if (typeof t != "object" || t === null)
405
404
  throw new TypeError('"as" must be an object');
406
- if (!m(t.issuer))
405
+ if (!g(t.issuer))
407
406
  throw new TypeError('"as.issuer" property must be a non-empty string');
408
407
  return !0;
409
408
  }
410
409
  function j(t) {
411
410
  if (typeof t != "object" || t === null)
412
411
  throw new TypeError('"client" must be an object');
413
- if (!m(t.client_id))
412
+ if (!g(t.client_id))
414
413
  throw new TypeError('"client.client_id" property must be a non-empty string');
415
414
  return !0;
416
415
  }
417
- function ue(t) {
418
- if (!m(t))
416
+ function le(t) {
417
+ if (!g(t))
419
418
  throw new TypeError('"client.client_secret" property must be a non-empty string');
420
419
  return t;
421
420
  }
422
- function le(t, e) {
421
+ function de(t, e) {
423
422
  if (e !== void 0)
424
423
  throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
425
424
  }
426
- async function ut(t, e, n, o, a) {
425
+ async function lt(t, e, n, o, a) {
427
426
  switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
428
427
  case void 0:
429
428
  case "client_secret_basic": {
430
- o.set("authorization", ot(e.client_id, ue(e.client_secret)));
429
+ o.set("authorization", it(e.client_id, le(e.client_secret)));
431
430
  break;
432
431
  }
433
432
  case "client_secret_post": {
434
- n.set("client_id", e.client_id), n.set("client_secret", ue(e.client_secret));
433
+ n.set("client_id", e.client_id), n.set("client_secret", le(e.client_secret));
435
434
  break;
436
435
  }
437
436
  case "private_key_jwt":
438
- throw le("private_key_jwt", e.client_secret), new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
437
+ throw de("private_key_jwt", e.client_secret), new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
439
438
  case "tls_client_auth":
440
439
  case "self_signed_tls_client_auth":
441
440
  case "none": {
442
- le(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
441
+ de(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
443
442
  break;
444
443
  }
445
444
  default:
446
- throw new S("unsupported client token_endpoint_auth_method");
445
+ throw new T("unsupported client token_endpoint_auth_method");
447
446
  }
448
447
  }
449
- async function lt(t, e, n) {
448
+ async function dt(t, e, n) {
450
449
  if (!n.usages.includes("sign"))
451
450
  throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
452
- const o = `${k(E(JSON.stringify(t)))}.${k(E(JSON.stringify(e)))}`, a = k(await crypto.subtle.sign(Ae(n), n, E(o)));
451
+ const o = `${k(E(JSON.stringify(t)))}.${k(E(JSON.stringify(e)))}`, a = k(await crypto.subtle.sign(ke(n), n, E(o)));
453
452
  return `${o}.${a}`;
454
453
  }
455
- async function dt(t, e, n, o, a, r) {
456
- var T;
457
- const { privateKey: i, publicKey: c, nonce: f = we.get(n.origin) } = e;
454
+ async function ht(t, e, n, o, a, r) {
455
+ var _;
456
+ const { privateKey: i, publicKey: c, nonce: p = ge.get(n.origin) } = e;
458
457
  if (!Ze(i))
459
458
  throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
460
- if (!Ye(c))
459
+ if (!Qe(c))
461
460
  throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
462
- if (f !== void 0 && !m(f))
461
+ if (p !== void 0 && !g(p))
463
462
  throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
464
463
  if (!c.extractable)
465
464
  throw new TypeError('"DPoP.publicKey.extractable" must be true');
466
- const w = X() + a, p = {
467
- alg: ct(i),
465
+ const w = ee() + a, f = {
466
+ alg: ut(i),
468
467
  typ: "dpop+jwt",
469
- jwk: await ft(c)
470
- }, b = {
468
+ jwk: await pt(c)
469
+ }, v = {
471
470
  iat: w,
472
- jti: Q(),
471
+ jti: X(),
473
472
  htm: o,
474
- nonce: f,
473
+ nonce: p,
475
474
  htu: `${n.origin}${n.pathname}`,
476
475
  ath: r ? k(await crypto.subtle.digest("SHA-256", E(r))) : void 0
477
476
  };
478
- (T = e[Ke]) == null || T.call(e, p, b), t.set("dpop", await lt(p, b, i));
477
+ (_ = e[He]) == null || _.call(e, f, v), t.set("dpop", await dt(f, v, i));
479
478
  }
480
479
  let N;
481
- async function ht(t) {
480
+ async function ft(t) {
482
481
  const { kty: e, e: n, n: o, x: a, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: a, y: r, crv: i };
483
482
  return N.set(t, c), c;
484
483
  }
485
- async function ft(t) {
486
- return N || (N = /* @__PURE__ */ new WeakMap()), N.get(t) || ht(t);
484
+ async function pt(t) {
485
+ return N || (N = /* @__PURE__ */ new WeakMap()), N.get(t) || ft(t);
487
486
  }
488
- function de(t, e, n) {
487
+ function he(t, e, n) {
489
488
  if (typeof t != "string")
490
489
  throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
491
490
  return new URL(t);
492
491
  }
493
- function ye(t, e, n = !1) {
494
- return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? de(t.mtls_endpoint_aliases[e], e, n) : de(t[e], e, n);
492
+ function be(t, e, n = !1) {
493
+ return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? he(t.mtls_endpoint_aliases[e], e, n) : he(t[e], e, n);
495
494
  }
496
- function be(t, e) {
497
- return !!(t.use_mtls_endpoint_aliases || e != null && e[$e]);
495
+ function _e(t, e) {
496
+ return !!(t.use_mtls_endpoint_aliases || e != null && e[Fe]);
498
497
  }
499
- function V(t) {
498
+ function G(t) {
500
499
  const e = t;
501
500
  return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
502
501
  }
503
- async function pt(t, e, n, o, a, r) {
504
- if (!m(t))
502
+ async function wt(t, e, n, o, a, r) {
503
+ if (!g(t))
505
504
  throw new TypeError('"accessToken" must be a non-empty string');
506
505
  if (!(n instanceof URL))
507
506
  throw new TypeError('"url" must be an instance of URL');
508
- return o = K(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), H({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Z]) || fetch)(n.href, {
507
+ return o = K(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ht(o, r.DPoP, n, e.toUpperCase(), H({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Z]) || fetch)(n.href, {
509
508
  body: a,
510
509
  headers: Object.fromEntries(o.entries()),
511
510
  method: e,
512
511
  redirect: "manual",
513
- signal: r != null && r.signal ? Qe(r.signal) : null
514
- }).then(Y);
512
+ signal: r != null && r.signal ? Xe(r.signal) : null
513
+ }).then(Q);
515
514
  }
516
- async function wt(t, e, n, o) {
517
- C(t), j(e);
518
- const a = ye(t, "userinfo_endpoint", be(e, o)), r = K(o == null ? void 0 : o.headers);
519
- 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, {
515
+ async function gt(t, e, n, o) {
516
+ I(t), j(e);
517
+ const a = be(t, "userinfo_endpoint", _e(e, o)), r = K(o == null ? void 0 : o.headers);
518
+ return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), wt(n, "GET", a, r, null, {
520
519
  ...o,
521
520
  [W]: H(e)
522
521
  });
523
522
  }
524
523
  async function mt(t, e, n, o, a, r, i) {
525
- return await ut(t, e, a, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Z]) || fetch)(o.href, {
524
+ return await lt(t, e, a, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Z]) || fetch)(o.href, {
526
525
  body: a,
527
526
  headers: Object.fromEntries(r.entries()),
528
527
  method: n,
529
528
  redirect: "manual",
530
529
  signal: null
531
- }).then(Y);
530
+ }).then(Q);
532
531
  }
533
- async function _e(t, e, n, o, a) {
534
- const r = ye(t, "token_endpoint", be(e, a));
532
+ async function ve(t, e, n, o, a) {
533
+ const r = be(t, "token_endpoint", _e(e, a));
535
534
  o.set("grant_type", n);
536
535
  const i = K(a == null ? void 0 : a.headers);
537
536
  return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
538
537
  }
539
- async function gt(t, e, n, o) {
540
- if (C(t), j(e), !m(n))
538
+ async function yt(t, e, n, o) {
539
+ if (I(t), j(e), !g(n))
541
540
  throw new TypeError('"refreshToken" must be a non-empty string');
542
541
  const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
543
- return a.set("refresh_token", n), _e(t, e, "refresh_token", a, o);
542
+ return a.set("refresh_token", n), ve(t, e, "refresh_token", a, o);
544
543
  }
545
- const ve = /* @__PURE__ */ new WeakMap();
546
- function yt(t) {
544
+ const Se = /* @__PURE__ */ new WeakMap();
545
+ function bt(t) {
547
546
  if (!t.id_token)
548
547
  return;
549
- const e = ve.get(t);
548
+ const e = Se.get(t);
550
549
  if (!e)
551
550
  throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
552
551
  return e[0];
553
552
  }
554
- async function Se(t, e, n, o = !1, a = !1) {
555
- if (C(t), j(e), !G(n, Response))
553
+ async function Te(t, e, n, o = !1, a = !1) {
554
+ if (I(t), j(e), !Y(n, Response))
556
555
  throw new TypeError('"response" must be an instance of Response');
557
556
  if (n.status !== 200) {
558
557
  let i;
559
- if (i = await Pt(n))
558
+ if (i = await Ut(n))
560
559
  return i;
561
560
  throw new s('"response" is not a conform Token Endpoint response');
562
561
  }
563
- ee(n);
562
+ te(n);
564
563
  let r;
565
564
  try {
566
565
  r = await n.json();
567
566
  } catch (i) {
568
567
  throw new s('failed to parse "response" body as JSON', { cause: i });
569
568
  }
570
- if (!x(r))
569
+ if (!C(r))
571
570
  throw new s('"response" body must be a top level object');
572
- if (!m(r.access_token))
571
+ if (!g(r.access_token))
573
572
  throw new s('"response" body "access_token" property must be a non-empty string');
574
- if (!m(r.token_type))
573
+ if (!g(r.token_type))
575
574
  throw new s('"response" body "token_type" property must be a non-empty string');
576
575
  if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
577
- throw new S("unsupported `token_type` value");
576
+ throw new T("unsupported `token_type` value");
578
577
  if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
579
578
  throw new s('"response" body "expires_in" property must be a positive number');
580
- if (!a && r.refresh_token !== void 0 && !m(r.refresh_token))
579
+ if (!a && r.refresh_token !== void 0 && !g(r.refresh_token))
581
580
  throw new s('"response" body "refresh_token" property must be a non-empty string');
582
581
  if (r.scope !== void 0 && typeof r.scope != "string")
583
582
  throw new s('"response" body "scope" property must be a string');
584
583
  if (!o) {
585
- if (r.id_token !== void 0 && !m(r.id_token))
584
+ if (r.id_token !== void 0 && !g(r.id_token))
586
585
  throw new s('"response" body "id_token" property must be a non-empty string');
587
586
  if (r.id_token) {
588
- const { claims: i, jwt: c } = await xt(r.id_token, Ct.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, H(e), ge(e), e[He]).then(kt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
587
+ const { claims: i, jwt: c } = await Ct(r.id_token, It.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ee, H(e), ye(e), e[$e]).then(Et.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(St.bind(void 0, t.issuer)).then(vt.bind(void 0, e.client_id));
589
588
  if (Array.isArray(i.aud) && i.aud.length !== 1) {
590
589
  if (i.azp === void 0)
591
590
  throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
@@ -594,15 +593,15 @@ async function Se(t, e, n, o = !1, a = !1) {
594
593
  }
595
594
  if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
596
595
  throw new s('ID Token "auth_time" (authentication time) must be a positive number');
597
- ve.set(r, [i, c]);
596
+ Se.set(r, [i, c]);
598
597
  }
599
598
  }
600
599
  return r;
601
600
  }
602
- async function bt(t, e, n) {
603
- return Se(t, e, n);
601
+ async function _t(t, e, n) {
602
+ return Te(t, e, n);
604
603
  }
605
- function _t(t, e) {
604
+ function vt(t, e) {
606
605
  if (Array.isArray(e.claims.aud)) {
607
606
  if (!e.claims.aud.includes(t))
608
607
  throw new s('unexpected JWT "aud" (audience) claim value');
@@ -610,29 +609,29 @@ function _t(t, e) {
610
609
  throw new s('unexpected JWT "aud" (audience) claim value');
611
610
  return e;
612
611
  }
613
- function vt(t, e) {
612
+ function St(t, e) {
614
613
  if (e.claims.iss !== t)
615
614
  throw new s('unexpected JWT "iss" (issuer) claim value');
616
615
  return e;
617
616
  }
618
- const Te = /* @__PURE__ */ new WeakSet();
619
- function St(t) {
620
- return Te.add(t), t;
617
+ const Ae = /* @__PURE__ */ new WeakSet();
618
+ function Tt(t) {
619
+ return Ae.add(t), t;
621
620
  }
622
- async function Tt(t, e, n, o, a, r) {
623
- if (C(t), j(e), !Te.has(n))
621
+ async function At(t, e, n, o, a, r) {
622
+ if (I(t), j(e), !Ae.has(n))
624
623
  throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
625
- if (!m(o))
624
+ if (!g(o))
626
625
  throw new TypeError('"redirectUri" must be a non-empty string');
627
- if (!m(a))
626
+ if (!g(a))
628
627
  throw new TypeError('"codeVerifier" must be a non-empty string');
629
628
  const i = A(n, "code");
630
629
  if (!i)
631
630
  throw new s('no authorization code in "callbackParameters"');
632
631
  const c = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
633
- return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), _e(t, e, "authorization_code", c, r);
632
+ return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), ve(t, e, "authorization_code", c, r);
634
633
  }
635
- const At = {
634
+ const kt = {
636
635
  aud: "audience",
637
636
  c_hash: "code hash",
638
637
  client_id: "client id",
@@ -648,38 +647,38 @@ const At = {
648
647
  htu: "http uri",
649
648
  cnf: "confirmation"
650
649
  };
651
- function kt(t, e) {
650
+ function Et(t, e) {
652
651
  for (const n of t)
653
652
  if (e.claims[n] === void 0)
654
- throw new s(`JWT "${n}" (${At[n]}) claim missing`);
653
+ throw new s(`JWT "${n}" (${kt[n]}) claim missing`);
655
654
  return e;
656
655
  }
657
- const Et = Symbol(), F = Symbol();
658
- async function Rt(t, e, n, o, a) {
659
- const r = await Se(t, e, n);
660
- if (V(r))
656
+ const Rt = Symbol(), F = Symbol();
657
+ async function Pt(t, e, n, o, a) {
658
+ const r = await Te(t, e, n);
659
+ if (G(r))
661
660
  return r;
662
- if (!m(r.id_token))
661
+ if (!g(r.id_token))
663
662
  throw new s('"response" body "id_token" property must be a non-empty string');
664
663
  a ?? (a = e.default_max_age ?? F);
665
- const i = yt(r);
664
+ const i = bt(r);
666
665
  if ((e.require_auth_time || a !== F) && i.auth_time === void 0)
667
666
  throw new s('ID Token "auth_time" (authentication time) claim missing');
668
667
  if (a !== F) {
669
668
  if (typeof a != "number" || a < 0)
670
669
  throw new TypeError('"maxAge" must be a non-negative number');
671
- const c = X() + H(e), f = ge(e);
672
- if (i.auth_time + a < c - f)
670
+ const c = ee() + H(e), p = ye(e);
671
+ if (i.auth_time + a < c - p)
673
672
  throw new s("too much time has elapsed since the last End-User authentication");
674
673
  }
675
674
  switch (o) {
676
675
  case void 0:
677
- case Et:
676
+ case Rt:
678
677
  if (i.nonce !== void 0)
679
678
  throw new s('unexpected ID Token "nonce" claim value');
680
679
  break;
681
680
  default:
682
- if (!m(o))
681
+ if (!g(o))
683
682
  throw new TypeError('"expectedNonce" must be a non-empty string');
684
683
  if (i.nonce === void 0)
685
684
  throw new s('ID Token "nonce" claim missing');
@@ -688,26 +687,26 @@ async function Rt(t, e, n, o, a) {
688
687
  }
689
688
  return r;
690
689
  }
691
- function ee(t) {
690
+ function te(t) {
692
691
  if (t.bodyUsed)
693
692
  throw new TypeError('"response" body has been used already');
694
693
  }
695
- async function Pt(t) {
694
+ async function Ut(t) {
696
695
  if (t.status > 399 && t.status < 500) {
697
- ee(t);
696
+ te(t);
698
697
  try {
699
698
  const e = await t.json();
700
- if (x(e) && typeof e.error == "string" && e.error.length)
699
+ if (C(e) && typeof e.error == "string" && e.error.length)
701
700
  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;
702
701
  } catch {
703
702
  }
704
703
  }
705
704
  }
706
- function he(t) {
705
+ function fe(t) {
707
706
  if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
708
707
  throw new s(`${t.name} modulusLength must be at least 2048 bits`);
709
708
  }
710
- function Ut(t) {
709
+ function Lt(t) {
711
710
  switch (t) {
712
711
  case "P-256":
713
712
  return "SHA-256";
@@ -716,18 +715,18 @@ function Ut(t) {
716
715
  case "P-521":
717
716
  return "SHA-512";
718
717
  default:
719
- throw new S();
718
+ throw new T();
720
719
  }
721
720
  }
722
- function Ae(t) {
721
+ function ke(t) {
723
722
  switch (t.algorithm.name) {
724
723
  case "ECDSA":
725
724
  return {
726
725
  name: t.algorithm.name,
727
- hash: Ut(t.algorithm.namedCurve)
726
+ hash: Lt(t.algorithm.namedCurve)
728
727
  };
729
728
  case "RSA-PSS":
730
- switch (he(t.algorithm), t.algorithm.hash.name) {
729
+ switch (fe(t.algorithm), t.algorithm.hash.name) {
731
730
  case "SHA-256":
732
731
  case "SHA-384":
733
732
  case "SHA-512":
@@ -736,57 +735,57 @@ function Ae(t) {
736
735
  saltLength: parseInt(t.algorithm.hash.name.slice(-3), 10) >> 3
737
736
  };
738
737
  default:
739
- throw new S();
738
+ throw new T();
740
739
  }
741
740
  case "RSASSA-PKCS1-v1_5":
742
- return he(t.algorithm), t.algorithm.name;
741
+ return fe(t.algorithm), t.algorithm.name;
743
742
  case "Ed448":
744
743
  case "Ed25519":
745
744
  return t.algorithm.name;
746
745
  }
747
- throw new S();
746
+ throw new T();
748
747
  }
749
- const ke = Symbol();
750
- async function Lt(t, e, n, o) {
748
+ const Ee = Symbol();
749
+ async function xt(t, e, n, o) {
751
750
  const a = `${t}.${e}`;
752
- if (!await crypto.subtle.verify(Ae(n), n, o, E(a)))
751
+ if (!await crypto.subtle.verify(ke(n), n, o, E(a)))
753
752
  throw new s("JWT signature verification failed");
754
753
  }
755
- async function xt(t, e, n, o, a, r) {
756
- let { 0: i, 1: c, 2: f, length: w } = t.split(".");
754
+ async function Ct(t, e, n, o, a, r) {
755
+ let { 0: i, 1: c, 2: p, length: w } = t.split(".");
757
756
  if (w === 5)
758
757
  if (r !== void 0)
759
- t = await r(t), { 0: i, 1: c, 2: f, length: w } = t.split(".");
758
+ t = await r(t), { 0: i, 1: c, 2: p, length: w } = t.split(".");
760
759
  else
761
- throw new S("JWE structure JWTs are not supported");
760
+ throw new T("JWE structure JWTs are not supported");
762
761
  if (w !== 3)
763
762
  throw new s("Invalid JWT");
764
- let p;
763
+ let f;
765
764
  try {
766
- p = JSON.parse(E(k(i)));
765
+ f = JSON.parse(E(k(i)));
767
766
  } catch (l) {
768
767
  throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
769
768
  }
770
- if (!x(p))
769
+ if (!C(f))
771
770
  throw new s("JWT Header must be a top level object");
772
- if (e(p), p.crit !== void 0)
771
+ if (e(f), f.crit !== void 0)
773
772
  throw new s('unexpected JWT "crit" header parameter');
774
- const b = k(f);
775
- let T;
776
- n !== ke && (T = await n(p), await Lt(i, c, T, b));
773
+ const v = k(p);
774
+ let _;
775
+ n !== Ee && (_ = await n(f), await xt(i, c, _, v));
777
776
  let h;
778
777
  try {
779
778
  h = JSON.parse(E(k(c)));
780
779
  } catch (l) {
781
780
  throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
782
781
  }
783
- if (!x(h))
782
+ if (!C(h))
784
783
  throw new s("JWT Payload must be a top level object");
785
- const I = X() + o;
784
+ const P = ee() + o;
786
785
  if (h.exp !== void 0) {
787
786
  if (typeof h.exp != "number")
788
787
  throw new s('unexpected JWT "exp" (expiration time) claim type');
789
- if (h.exp <= I - a)
788
+ if (h.exp <= P - a)
790
789
  throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
791
790
  }
792
791
  if (h.iat !== void 0 && typeof h.iat != "number")
@@ -796,14 +795,14 @@ async function xt(t, e, n, o, a, r) {
796
795
  if (h.nbf !== void 0) {
797
796
  if (typeof h.nbf != "number")
798
797
  throw new s('unexpected JWT "nbf" (not before) claim type');
799
- if (h.nbf > I + a)
798
+ if (h.nbf > P + a)
800
799
  throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
801
800
  }
802
801
  if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
803
802
  throw new s('unexpected JWT "aud" (audience) claim type');
804
- return { header: p, claims: h, signature: b, key: T, jwt: t };
803
+ return { header: f, claims: h, signature: v, key: _, jwt: t };
805
804
  }
806
- function Ct(t, e, n) {
805
+ function It(t, e, n) {
807
806
  if (t !== void 0) {
808
807
  if (n.alg !== t)
809
808
  throw new s('unexpected JWT "alg" header parameter');
@@ -823,9 +822,9 @@ function A(t, e) {
823
822
  throw new s(`"${e}" parameter must be provided only once`);
824
823
  return n;
825
824
  }
826
- const jt = Symbol(), It = Symbol();
827
- function Jt(t, e, n, o) {
828
- if (C(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
825
+ const jt = Symbol(), Jt = Symbol();
826
+ function Ot(t, e, n, o) {
827
+ if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
829
828
  throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
830
829
  if (A(n, "response"))
831
830
  throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
@@ -836,14 +835,14 @@ function Jt(t, e, n, o) {
836
835
  throw new s('unexpected "iss" (issuer) response parameter value');
837
836
  switch (o) {
838
837
  case void 0:
839
- case It:
838
+ case Jt:
840
839
  if (r !== void 0)
841
840
  throw new s('unexpected "state" response parameter encountered');
842
841
  break;
843
842
  case jt:
844
843
  break;
845
844
  default:
846
- if (!m(o))
845
+ if (!g(o))
847
846
  throw new s('"expectedState" must be a non-empty string');
848
847
  if (r === void 0)
849
848
  throw new s('response parameter "state" missing');
@@ -857,22 +856,22 @@ function Jt(t, e, n, o) {
857
856
  error_description: A(n, "error_description"),
858
857
  error_uri: A(n, "error_uri")
859
858
  };
860
- const c = A(n, "id_token"), f = A(n, "token");
861
- if (c !== void 0 || f !== void 0)
862
- throw new S("implicit and hybrid flows are not supported");
863
- return St(new URLSearchParams(n));
859
+ const c = A(n, "id_token"), p = A(n, "token");
860
+ if (c !== void 0 || p !== void 0)
861
+ throw new T("implicit and hybrid flows are not supported");
862
+ return Tt(new URLSearchParams(n));
864
863
  }
865
- function Ot({
864
+ function zt({
866
865
  handleCallback: t
867
866
  }) {
868
- const e = Ie({
867
+ const e = je({
869
868
  retry: !1,
870
869
  queryKey: ["oauth-callback"],
871
870
  queryFn: async () => {
872
871
  try {
873
872
  return await t();
874
873
  } catch (n) {
875
- throw new Oe("Could not validate user", {
874
+ throw new ze("Could not validate user", {
876
875
  cause: n,
877
876
  title: "Authentication Error",
878
877
  developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
@@ -880,17 +879,17 @@ function Ot({
880
879
  }
881
880
  }
882
881
  });
883
- return /* @__PURE__ */ q.jsx(Je, { to: e.data });
882
+ return /* @__PURE__ */ B.jsx(Oe, { to: e.data });
884
883
  }
885
- class P extends Error {
884
+ class R extends Error {
886
885
  }
887
- class fe extends P {
886
+ class pe extends R {
888
887
  constructor(e, n, o) {
889
888
  super(e, o), this.error = n;
890
889
  }
891
890
  }
892
- const M = "code-verifier";
893
- class zt extends je {
891
+ const M = "code-verifier", q = "oauth-state";
892
+ class Dt extends Je {
894
893
  constructor(e, n) {
895
894
  super(), this.callbackUrlPath = e, this.handleCallback = n;
896
895
  }
@@ -899,12 +898,12 @@ class zt extends je {
899
898
  ...super.getRoutes(),
900
899
  {
901
900
  path: this.callbackUrlPath,
902
- element: /* @__PURE__ */ q.jsx(Ce, { children: /* @__PURE__ */ q.jsx(Ot, { handleCallback: this.handleCallback }) })
901
+ element: /* @__PURE__ */ B.jsx(Ie, { children: /* @__PURE__ */ B.jsx(zt, { handleCallback: this.handleCallback }) })
903
902
  }
904
903
  ];
905
904
  }
906
905
  }
907
- class Dt {
906
+ class Nt {
908
907
  constructor({
909
908
  issuer: e,
910
909
  audience: n,
@@ -913,21 +912,25 @@ class Dt {
913
912
  redirectToAfterSignIn: r,
914
913
  redirectToAfterSignOut: i,
915
914
  basePath: c,
916
- scopes: f
915
+ scopes: p
917
916
  }) {
918
- _(this, "client");
919
- _(this, "issuer");
920
- _(this, "authorizationServer");
921
- _(this, "callbackUrlPath");
922
- _(this, "logoutRedirectUrlPath");
923
- _(this, "onAuthorizationUrl");
924
- _(this, "redirectToAfterSignUp");
925
- _(this, "redirectToAfterSignIn");
926
- _(this, "redirectToAfterSignOut");
927
- _(this, "audience");
928
- _(this, "scopes");
929
- _(this, "signOut", async () => {
930
- L.setState({
917
+ b(this, "client");
918
+ b(this, "issuer");
919
+ b(this, "authorizationServer");
920
+ b(this, "callbackUrlPath");
921
+ b(this, "logoutRedirectUrlPath");
922
+ b(this, "onAuthorizationUrl");
923
+ b(this, "redirectToAfterSignUp");
924
+ b(this, "redirectToAfterSignIn");
925
+ b(this, "redirectToAfterSignOut");
926
+ b(this, "audience");
927
+ b(this, "scopes");
928
+ b(this, "signRequest", async (e) => {
929
+ const n = await this.getAccessToken();
930
+ return e.headers.set("Authorization", `Bearer ${n}`), e;
931
+ });
932
+ b(this, "signOut", async () => {
933
+ x.setState({
931
934
  isAuthenticated: !1,
932
935
  isPending: !1,
933
936
  profile: void 0,
@@ -943,65 +946,68 @@ class Dt {
943
946
  n.toString()
944
947
  )) : o = n;
945
948
  });
946
- _(this, "handleCallback", async () => {
947
- const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(M);
948
- if (sessionStorage.removeItem(M), !o)
949
- throw new P("No code verifier found in state.");
950
- const a = await this.getAuthServer(), r = Jt(
951
- a,
949
+ b(this, "handleCallback", async () => {
950
+ const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(q);
951
+ if (sessionStorage.removeItem(q), n !== o)
952
+ throw new R("Invalid state parameter");
953
+ const a = sessionStorage.getItem(M);
954
+ if (sessionStorage.removeItem(M), !a)
955
+ throw new R("No code verifier found in state.");
956
+ const r = await this.getAuthServer(), i = Ot(
957
+ r,
952
958
  this.client,
953
959
  e.searchParams,
954
960
  n ?? void 0
955
961
  );
956
- if (V(r))
957
- throw ae.error("Error validating OAuth response", r), new fe(
962
+ if (G(i))
963
+ throw se.error("Error validating OAuth response", i), new pe(
958
964
  "Error validating OAuth response",
959
- r
965
+ i
960
966
  );
961
- const i = new URL(e);
962
- i.pathname = this.callbackUrlPath, i.search = "";
963
- const c = await Tt(
964
- a,
967
+ const c = new URL(e);
968
+ c.pathname = this.callbackUrlPath, c.search = "";
969
+ const p = await At(
970
+ r,
965
971
  this.client,
972
+ i,
973
+ c.toString(),
974
+ a
975
+ ), w = await Pt(
966
976
  r,
967
- i.toString(),
968
- o
969
- ), f = await Rt(
970
- a,
971
977
  this.client,
972
- c
978
+ p
973
979
  );
974
- this.setTokensFromResponse(f);
975
- const w = await this.getAccessToken(), b = await (await wt(
976
- a,
980
+ this.setTokensFromResponse(w);
981
+ const f = await this.getAccessToken(), _ = await (await gt(
982
+ r,
977
983
  this.client,
978
- w
979
- )).json(), T = {
980
- sub: b.sub,
981
- email: b.email,
982
- name: b.name,
983
- emailVerified: b.email_verified ?? !1,
984
- pictureUrl: b.picture
984
+ f
985
+ )).json(), h = {
986
+ sub: _.sub,
987
+ email: _.email,
988
+ name: _.name,
989
+ emailVerified: _.email_verified ?? !1,
990
+ pictureUrl: _.picture
985
991
  };
986
- L.setState({
992
+ x.setState({
987
993
  isAuthenticated: !0,
988
994
  isPending: !1,
989
- profile: T
995
+ profile: h
990
996
  });
991
- const h = sessionStorage.getItem("redirect-to") ?? "/";
992
- return sessionStorage.removeItem("redirect-to"), h;
997
+ const P = sessionStorage.getItem("redirect-to") ?? "/";
998
+ return sessionStorage.removeItem("redirect-to"), P;
993
999
  });
994
1000
  this.client = {
995
1001
  client_id: o,
996
1002
  token_endpoint_auth_method: "none"
997
- }, this.audience = n, this.issuer = e, this.callbackUrlPath = oe(c, "/oauth/callback"), this.scopes = f ?? ["openid", "profile", "email"];
998
- const w = oe(c, "/");
1003
+ }, this.audience = n, this.issuer = e, this.callbackUrlPath = ie(c, "/oauth/callback"), this.scopes = p ?? ["openid", "profile", "email"];
1004
+ const w = ie(c, "/");
999
1005
  this.logoutRedirectUrlPath = w, this.redirectToAfterSignUp = a ?? w, this.redirectToAfterSignIn = r ?? w, this.redirectToAfterSignOut = i ?? w;
1000
1006
  }
1001
1007
  async getAuthServer() {
1002
1008
  if (!this.authorizationServer) {
1003
- const e = new URL(this.issuer), n = await Xe(e);
1004
- this.authorizationServer = await et(
1009
+ const e = new URL(this.issuer), n = await et(e);
1010
+ this.authorizationServer = await tt(
1005
1011
  e,
1006
1012
  n
1007
1013
  );
@@ -1013,10 +1019,10 @@ class Dt {
1013
1019
  * @param response
1014
1020
  */
1015
1021
  setTokensFromResponse(e) {
1016
- if (V(e))
1017
- throw ae.error("Bad Token Response", e), new fe("Bad Token Response", e);
1022
+ if (G(e))
1023
+ throw se.error("Bad Token Response", e), new pe("Bad Token Response", e);
1018
1024
  if (!e.expires_in)
1019
- throw new P("No expires_in in response");
1025
+ throw new R("No expires_in in response");
1020
1026
  const n = {
1021
1027
  accessToken: e.access_token,
1022
1028
  refreshToken: e.refresh_token,
@@ -1024,7 +1030,7 @@ class Dt {
1024
1030
  expiresOn: new Date(Date.now() + e.expires_in * 1e3),
1025
1031
  tokenType: e.token_type
1026
1032
  };
1027
- L.setState({
1033
+ x.setState({
1028
1034
  providerData: n
1029
1035
  });
1030
1036
  }
@@ -1043,64 +1049,62 @@ class Dt {
1043
1049
  redirectTo: e,
1044
1050
  isSignUp: n = !1
1045
1051
  }) {
1046
- var w, p;
1052
+ var v;
1047
1053
  const o = "S256", a = await this.getAuthServer();
1048
1054
  if (!a.authorization_endpoint)
1049
- throw new P("No authorization endpoint");
1050
- const r = tt(), i = await rt(r);
1055
+ throw new R("No authorization endpoint");
1056
+ const r = nt(), i = await ot(r);
1051
1057
  sessionStorage.setItem(M, r);
1052
1058
  const c = new URL(
1053
1059
  a.authorization_endpoint
1054
- );
1055
- sessionStorage.setItem("redirect-to", e);
1056
- const f = new URL(window.location.origin);
1057
- if (f.pathname = this.callbackUrlPath, f.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", f.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
1060
+ ), p = e.startsWith(window.location.origin) ? e.slice(window.location.origin.length) : e;
1061
+ sessionStorage.setItem("redirect-to", p);
1062
+ const w = new URL(window.location.origin);
1063
+ w.pathname = this.callbackUrlPath, w.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", w.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
1058
1064
  "code_challenge_method",
1059
1065
  o
1060
- ), this.audience && c.searchParams.set("audience", this.audience), (w = this.onAuthorizationUrl) == null || w.call(this, c, {
1066
+ ), this.audience && c.searchParams.set("audience", this.audience), (v = this.onAuthorizationUrl) == null || v.call(this, c, {
1061
1067
  isSignIn: !n,
1062
1068
  isSignUp: n
1063
- }), ((p = a.code_challenge_methods_supported) == null ? void 0 : p.includes("S256")) !== !0) {
1064
- const b = nt();
1065
- c.searchParams.set("state", b);
1066
- }
1067
- location.href = c.href;
1069
+ });
1070
+ const f = rt();
1071
+ sessionStorage.setItem(q, f), c.searchParams.set("state", f), location.href = c.href;
1068
1072
  }
1069
1073
  async getAccessToken() {
1070
- const e = await this.getAuthServer(), { providerData: n } = L.getState();
1074
+ const e = await this.getAuthServer(), { providerData: n } = x.getState();
1071
1075
  if (!n)
1072
- throw new P("User is not authenticated");
1076
+ throw new R("User is not authenticated");
1073
1077
  const o = n;
1074
1078
  if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
1075
1079
  if (!o.refreshToken)
1076
- return L.setState({
1080
+ return x.setState({
1077
1081
  isAuthenticated: !1,
1078
1082
  isPending: !1,
1079
1083
  profile: null,
1080
1084
  providerData: null
1081
1085
  }), "";
1082
- const a = await gt(
1086
+ const a = await yt(
1083
1087
  e,
1084
1088
  this.client,
1085
1089
  o.refreshToken
1086
- ), r = await bt(
1090
+ ), r = await _t(
1087
1091
  e,
1088
1092
  this.client,
1089
1093
  a
1090
1094
  );
1091
1095
  if (!r.access_token)
1092
- throw new P("No access token in response");
1096
+ throw new R("No access token in response");
1093
1097
  return this.setTokensFromResponse(r), r.access_token.toString();
1094
1098
  } else
1095
1099
  return o.accessToken;
1096
1100
  }
1097
1101
  getAuthenticationPlugin() {
1098
- return new zt(this.callbackUrlPath, this.handleCallback);
1102
+ return new Dt(this.callbackUrlPath, this.handleCallback);
1099
1103
  }
1100
1104
  }
1101
- const Vt = (t) => new Dt(t);
1105
+ const Vt = (t) => new Nt(t);
1102
1106
  export {
1103
- Dt as OpenIDAuthenticationProvider,
1107
+ Nt as OpenIDAuthenticationProvider,
1104
1108
  Vt as default
1105
1109
  };
1106
1110
  //# sourceMappingURL=zudoku.auth-openid.js.map