zudoku 0.0.0-ec30b50 → 0.0.0-ee328ec

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