zudoku 0.16.3 → 0.18.0

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 (342) hide show
  1. package/dist/app/demo.js +0 -2
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/entry.client.js +14 -0
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.js +5 -4
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/app/main.d.ts +1 -1
  8. package/dist/app/main.js +2 -2
  9. package/dist/app/main.js.map +1 -1
  10. package/dist/app/standalone.js +0 -2
  11. package/dist/app/standalone.js.map +1 -1
  12. package/dist/codegen.d.ts +3 -0
  13. package/dist/codegen.js +45 -0
  14. package/dist/codegen.js.map +1 -0
  15. package/dist/config/validators/InputSidebarSchema.d.ts +10 -10
  16. package/dist/config/validators/validate.d.ts +114 -114
  17. package/dist/config/validators/validate.js.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/authentication/authentication.d.ts +2 -2
  22. package/dist/lib/authentication/hook.d.ts +5 -4
  23. package/dist/lib/authentication/hook.js +1 -3
  24. package/dist/lib/authentication/hook.js.map +1 -1
  25. package/dist/lib/authentication/providers/auth0.js +11 -11
  26. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  27. package/dist/lib/authentication/providers/openid.d.ts +0 -1
  28. package/dist/lib/authentication/providers/openid.js +11 -26
  29. package/dist/lib/authentication/providers/openid.js.map +1 -1
  30. package/dist/lib/authentication/state.d.ts +25 -4
  31. package/dist/lib/authentication/state.js +28 -3
  32. package/dist/lib/authentication/state.js.map +1 -1
  33. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  34. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  35. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  36. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  37. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  38. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  39. package/dist/lib/components/Bootstrap.d.ts +3 -1
  40. package/dist/lib/components/Bootstrap.js +11 -3
  41. package/dist/lib/components/Bootstrap.js.map +1 -1
  42. package/dist/lib/components/ClientOnly.d.ts +4 -2
  43. package/dist/lib/components/ClientOnly.js +1 -1
  44. package/dist/lib/components/ClientOnly.js.map +1 -1
  45. package/dist/lib/components/DeveloperHint.js +2 -1
  46. package/dist/lib/components/DeveloperHint.js.map +1 -1
  47. package/dist/lib/components/Header.js +5 -7
  48. package/dist/lib/components/Header.js.map +1 -1
  49. package/dist/lib/components/Heading.d.ts +1 -1
  50. package/dist/lib/components/Layout.js +11 -3
  51. package/dist/lib/components/Layout.js.map +1 -1
  52. package/dist/lib/components/MobileTopNavigation.js +6 -7
  53. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  54. package/dist/lib/components/SyntaxHighlight.js +16 -12
  55. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  56. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  57. package/dist/lib/components/ThemeSwitch.js +13 -0
  58. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  59. package/dist/lib/components/TopNavigation.d.ts +2 -0
  60. package/dist/lib/components/TopNavigation.js +13 -7
  61. package/dist/lib/components/TopNavigation.js.map +1 -1
  62. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  63. package/dist/lib/components/{DevPortal.js → Zudoku.js} +13 -14
  64. package/dist/lib/components/Zudoku.js.map +1 -0
  65. package/dist/lib/components/context/ZudokuContext.d.ts +7 -7
  66. package/dist/lib/components/context/ZudokuContext.js +8 -13
  67. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  68. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  69. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  70. package/dist/lib/components/index.d.ts +18 -10
  71. package/dist/lib/components/index.js +2 -3
  72. package/dist/lib/components/index.js.map +1 -1
  73. package/dist/lib/components/navigation/Sidebar.js +1 -1
  74. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  75. package/dist/lib/components/navigation/utils.js +2 -2
  76. package/dist/lib/components/navigation/utils.js.map +1 -1
  77. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +3 -7
  78. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  79. package/dist/lib/core/ZudokuContext.js.map +1 -0
  80. package/dist/lib/core/plugins.d.ts +12 -12
  81. package/dist/lib/core/plugins.js.map +1 -1
  82. package/dist/lib/errors/ErrorAlert.js +1 -1
  83. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  84. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  85. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  86. package/dist/lib/plugins/custom-pages/index.d.ts +2 -2
  87. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  88. package/dist/lib/plugins/markdown/index.d.ts +2 -2
  89. package/dist/lib/plugins/markdown/index.js.map +1 -1
  90. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  91. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  92. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  93. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  94. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  95. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  96. package/dist/lib/plugins/openapi/OperationList.js +7 -22
  97. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  98. package/dist/lib/plugins/openapi/Route.d.ts +4 -4
  99. package/dist/lib/plugins/openapi/Route.js +2 -4
  100. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  101. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  102. package/dist/lib/plugins/openapi/Sidecar.js +34 -33
  103. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  104. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  105. package/dist/lib/plugins/openapi/client/GraphQLClient.js +102 -0
  106. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  107. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  108. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  109. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  110. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  111. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  112. package/dist/lib/plugins/openapi/client/useCreateQuery.js +13 -0
  113. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  114. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  115. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  116. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  117. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  118. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  119. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  120. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -52
  121. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  122. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  123. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +134 -9
  124. package/dist/lib/plugins/openapi/graphql/graphql.js +194 -778
  125. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  126. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  127. package/dist/lib/plugins/openapi/index.js +40 -53
  128. package/dist/lib/plugins/openapi/index.js.map +1 -1
  129. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  130. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  131. package/dist/lib/plugins/openapi-worker.js +7 -1
  132. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  133. package/dist/lib/plugins/redirect/index.d.ts +2 -2
  134. package/dist/lib/plugins/redirect/index.js.map +1 -1
  135. package/dist/lib/plugins/search-inkeep/index.d.ts +2 -2
  136. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  137. package/dist/lib/ui/ActionButton.d.ts +3 -1
  138. package/dist/lib/util/MdxComponents.d.ts +1 -1
  139. package/dist/lib/util/useOnScreen.d.ts +4 -0
  140. package/dist/lib/util/useOnScreen.js +19 -0
  141. package/dist/lib/util/useOnScreen.js.map +1 -0
  142. package/dist/vite/config.js +0 -1
  143. package/dist/vite/config.js.map +1 -1
  144. package/dist/vite/html.js +0 -2
  145. package/dist/vite/html.js.map +1 -1
  146. package/dist/vite/plugin-component.js +1 -1
  147. package/dist/vite/plugin-component.js.map +1 -1
  148. package/dist/vite/plugin-mdx.d.ts +0 -6
  149. package/dist/vite/plugin-mdx.js +3 -2
  150. package/dist/vite/plugin-mdx.js.map +1 -1
  151. package/dist/vite/plugin.js +0 -2
  152. package/dist/vite/plugin.js.map +1 -1
  153. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  154. package/dist/vite/remarkStaticGeneration.js +125 -0
  155. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  156. package/lib/{AnchorLink-BbB2q-jx.js → AnchorLink-CDlhr8gL.js} +11 -10
  157. package/lib/{AnchorLink-BbB2q-jx.js.map → AnchorLink-CDlhr8gL.js.map} +1 -1
  158. package/lib/{AuthenticationPlugin-C9BHGXlE.js → AuthenticationPlugin-DeGDVa1r.js} +6 -5
  159. package/lib/{AuthenticationPlugin-C9BHGXlE.js.map → AuthenticationPlugin-DeGDVa1r.js.map} +1 -1
  160. package/lib/{Spinner-ChOGyPls.js → Button-jK0EsymC.js} +12 -15
  161. package/lib/Button-jK0EsymC.js.map +1 -0
  162. package/lib/{ClientOnly-CVN6leDu.js → ClientOnly-E7hGysn1.js} +4 -4
  163. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  164. package/lib/Markdown-ievDDhFT.js +15192 -0
  165. package/lib/Markdown-ievDDhFT.js.map +1 -0
  166. package/lib/{MdxPage-DKMH_t0f.js → MdxPage-Bwn-VSsH.js} +5 -5
  167. package/lib/{MdxPage-DKMH_t0f.js.map → MdxPage-Bwn-VSsH.js.map} +1 -1
  168. package/lib/OperationList-BwBl1xrD.js +4691 -0
  169. package/lib/OperationList-BwBl1xrD.js.map +1 -0
  170. package/lib/Route-DlG_HTMu.js +11 -0
  171. package/lib/Route-DlG_HTMu.js.map +1 -0
  172. package/lib/{Select-Bagt3Bme.js → Select-O9ZM3ZgX.js} +7 -7
  173. package/lib/Select-O9ZM3ZgX.js.map +1 -0
  174. package/lib/SidebarBadge-DxFJcJ6V.js +51 -0
  175. package/lib/SidebarBadge-DxFJcJ6V.js.map +1 -0
  176. package/lib/SlotletProvider-DyomlzGx.js +252 -0
  177. package/lib/SlotletProvider-DyomlzGx.js.map +1 -0
  178. package/lib/Spinner-3cQDBVGr.js +7 -0
  179. package/lib/Spinner-3cQDBVGr.js.map +1 -0
  180. package/lib/SyntaxHighlight-DkLOsjHS.js +2983 -0
  181. package/lib/SyntaxHighlight-DkLOsjHS.js.map +1 -0
  182. package/lib/assets/{worker-YA-aCP3P.js → worker-CPsGZsve.js} +24 -22
  183. package/lib/assets/{worker-YA-aCP3P.js.map → worker-CPsGZsve.js.map} +1 -1
  184. package/lib/context-D1nXWxm7.js +22 -0
  185. package/lib/context-D1nXWxm7.js.map +1 -0
  186. package/lib/createServer-DK-g7kbB.js +16089 -0
  187. package/lib/createServer-DK-g7kbB.js.map +1 -0
  188. package/lib/{hook-sn0zMTkE.js → hook-hEqe7fPB.js} +12 -14
  189. package/lib/hook-hEqe7fPB.js.map +1 -0
  190. package/lib/index-Czzd9rjU.js +899 -0
  191. package/lib/index-Czzd9rjU.js.map +1 -0
  192. package/lib/index-DNxQ_rCt.js +1273 -0
  193. package/lib/index-DNxQ_rCt.js.map +1 -0
  194. package/lib/index-Yn8c3UWE.js +921 -0
  195. package/lib/index-Yn8c3UWE.js.map +1 -0
  196. package/lib/{router-BsfSoK2j.js → router-lfyopgBI.js} +23 -23
  197. package/lib/{router-BsfSoK2j.js.map → router-lfyopgBI.js.map} +1 -1
  198. package/lib/state-tsXBLONe.js +203 -0
  199. package/lib/{state-CsuHT8ZO.js.map → state-tsXBLONe.js.map} +1 -1
  200. package/lib/ui/ActionButton.js +11 -10
  201. package/lib/ui/ActionButton.js.map +1 -1
  202. package/lib/useExposedProps-CTPtylCV.js +10 -0
  203. package/lib/{useExposedProps-ChOIUaS4.js.map → useExposedProps-CTPtylCV.js.map} +1 -1
  204. package/lib/{ZudokuContext-BKXGJTmu.js → utils-DcpDOncX.js} +242 -246
  205. package/lib/utils-DcpDOncX.js.map +1 -0
  206. package/lib/zudoku.auth-auth0.js +24 -18
  207. package/lib/zudoku.auth-auth0.js.map +1 -1
  208. package/lib/zudoku.auth-clerk.js +2 -2
  209. package/lib/zudoku.auth-openid.js +124 -138
  210. package/lib/zudoku.auth-openid.js.map +1 -1
  211. package/lib/zudoku.components.js +1284 -1121
  212. package/lib/zudoku.components.js.map +1 -1
  213. package/lib/zudoku.openapi-worker.js +10 -16346
  214. package/lib/zudoku.openapi-worker.js.map +1 -1
  215. package/lib/zudoku.plugin-api-keys.js +18 -18
  216. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  217. package/lib/zudoku.plugin-custom-pages.js +2 -2
  218. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  219. package/lib/zudoku.plugin-markdown.js +1 -1
  220. package/lib/zudoku.plugin-markdown.js.map +1 -1
  221. package/lib/zudoku.plugin-openapi.js +5 -9
  222. package/lib/zudoku.plugin-openapi.js.map +1 -1
  223. package/lib/zudoku.plugin-redirect.js +1 -1
  224. package/lib/zudoku.plugin-redirect.js.map +1 -1
  225. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  226. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  227. package/package.json +14 -4
  228. package/src/app/demo.tsx +0 -3
  229. package/src/app/entry.client.tsx +14 -0
  230. package/src/app/entry.server.tsx +59 -57
  231. package/src/app/main.tsx +4 -4
  232. package/src/app/standalone.tsx +0 -3
  233. package/src/lib/authentication/authentication.ts +2 -2
  234. package/src/lib/authentication/hook.ts +1 -3
  235. package/src/lib/authentication/providers/auth0.tsx +16 -11
  236. package/src/lib/authentication/providers/openid.tsx +12 -30
  237. package/src/lib/authentication/state.ts +50 -9
  238. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  239. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  240. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  241. package/src/lib/components/Bootstrap.tsx +36 -9
  242. package/src/lib/components/ClientOnly.tsx +6 -3
  243. package/src/lib/components/DeveloperHint.tsx +6 -1
  244. package/src/lib/components/Header.tsx +32 -37
  245. package/src/lib/components/Layout.tsx +48 -36
  246. package/src/lib/components/MobileTopNavigation.tsx +15 -18
  247. package/src/lib/components/SyntaxHighlight.tsx +81 -46
  248. package/src/lib/components/ThemeSwitch.tsx +26 -0
  249. package/src/lib/components/TopNavigation.tsx +27 -19
  250. package/src/lib/components/Zudoku.tsx +108 -0
  251. package/src/lib/components/context/ZudokuContext.ts +11 -16
  252. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  253. package/src/lib/components/index.ts +2 -3
  254. package/src/lib/components/navigation/Sidebar.tsx +3 -3
  255. package/src/lib/components/navigation/utils.ts +2 -2
  256. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +3 -11
  257. package/src/lib/core/plugins.ts +12 -16
  258. package/src/lib/errors/ErrorAlert.tsx +2 -1
  259. package/src/lib/plugins/api-keys/index.tsx +9 -9
  260. package/src/lib/plugins/custom-pages/index.tsx +2 -2
  261. package/src/lib/plugins/markdown/index.tsx +2 -2
  262. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  263. package/src/lib/plugins/openapi/Endpoint.tsx +5 -10
  264. package/src/lib/plugins/openapi/OperationList.tsx +6 -40
  265. package/src/lib/plugins/openapi/Route.tsx +11 -12
  266. package/src/lib/plugins/openapi/Sidecar.tsx +72 -61
  267. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +140 -0
  268. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  269. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  270. package/src/lib/plugins/openapi/client/useCreateQuery.ts +18 -0
  271. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  272. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  273. package/src/lib/plugins/openapi/graphql/gql.ts +7 -25
  274. package/src/lib/plugins/openapi/graphql/graphql.ts +351 -782
  275. package/src/lib/plugins/openapi/index.tsx +42 -67
  276. package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
  277. package/src/lib/plugins/openapi-worker.ts +11 -1
  278. package/src/lib/plugins/redirect/index.tsx +2 -2
  279. package/src/lib/plugins/search-inkeep/index.tsx +2 -2
  280. package/src/lib/ui/ActionButton.tsx +1 -1
  281. package/src/lib/util/useOnScreen.ts +32 -0
  282. package/dist/lib/components/DevPortal.js.map +0 -1
  283. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  284. package/dist/lib/components/context/ThemeContext.js +0 -7
  285. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  286. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  287. package/dist/lib/components/context/ThemeProvider.js +0 -23
  288. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  289. package/dist/lib/core/DevPortalContext.js.map +0 -1
  290. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -9
  291. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -54
  292. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  293. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  294. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -62
  295. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  296. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  297. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  298. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  299. package/dist/lib/themeToggle.d.ts +0 -1
  300. package/dist/lib/themeToggle.js +0 -7
  301. package/dist/lib/themeToggle.js.map +0 -1
  302. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  303. package/dist/lib/util/createWaitForNotify.js +0 -15
  304. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  305. package/dist/vite/plugin-html-transform.d.ts +0 -2
  306. package/dist/vite/plugin-html-transform.js +0 -15
  307. package/dist/vite/plugin-html-transform.js.map +0 -1
  308. package/lib/ClientOnly-CVN6leDu.js.map +0 -1
  309. package/lib/DeveloperHint-DHdLXGHA.js +0 -16
  310. package/lib/DeveloperHint-DHdLXGHA.js.map +0 -1
  311. package/lib/Markdown-BDcCAWwm.js +0 -18059
  312. package/lib/Markdown-BDcCAWwm.js.map +0 -1
  313. package/lib/OperationList-BjppA5yM.js +0 -621
  314. package/lib/OperationList-BjppA5yM.js.map +0 -1
  315. package/lib/Route-D_djzMv3.js +0 -13
  316. package/lib/Route-D_djzMv3.js.map +0 -1
  317. package/lib/Select-Bagt3Bme.js.map +0 -1
  318. package/lib/SidebarBadge-Bbt92M5K.js +0 -38
  319. package/lib/SidebarBadge-Bbt92M5K.js.map +0 -1
  320. package/lib/SlotletProvider-Da7eFgd2.js +0 -241
  321. package/lib/SlotletProvider-Da7eFgd2.js.map +0 -1
  322. package/lib/Spinner-ChOGyPls.js.map +0 -1
  323. package/lib/StaggeredRender-DDHSzQKE.js +0 -17
  324. package/lib/StaggeredRender-DDHSzQKE.js.map +0 -1
  325. package/lib/ZudokuContext-BKXGJTmu.js.map +0 -1
  326. package/lib/hook-sn0zMTkE.js.map +0 -1
  327. package/lib/index-CRo94sKK.js +0 -1783
  328. package/lib/index-CRo94sKK.js.map +0 -1
  329. package/lib/index-_gtpPhlu.js +0 -5877
  330. package/lib/index-_gtpPhlu.js.map +0 -1
  331. package/lib/state-CsuHT8ZO.js +0 -183
  332. package/lib/urql-core-35Qt_U4i.js +0 -1511
  333. package/lib/urql-core-35Qt_U4i.js.map +0 -1
  334. package/lib/useExposedProps-ChOIUaS4.js +0 -9
  335. package/src/lib/components/DevPortal.tsx +0 -111
  336. package/src/lib/components/context/ThemeContext.tsx +0 -8
  337. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  338. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -65
  339. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -79
  340. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  341. package/src/lib/themeToggle.ts +0 -7
  342. package/src/lib/util/createWaitForNotify.ts +0 -18
@@ -0,0 +1,921 @@
1
+ import * as o from "react";
2
+ import * as Ue from "react-dom";
3
+ import { N as O, c as he, a as ne, u as A, d as V, D as J, e as pe, R as re, f as ae, g as M, h as Ie, m as ve, i as ye, j as we, k as Ee, A as Ve, M as Me, l as He, O as Ke, n as Be, o as je, L as ze, p as We, q as ce, r as Ye, s as qe, t as Ge, v as Je, w as Xe, x as $e, y as Qe, z as Ze, B as et, C as tt, b as nt, E as rt, F as at, G as ot, H as it } from "./index-Czzd9rjU.js";
4
+ import { s as P, w as H, c as q, i as E, j as st, m as te, a as Se, b as ge, d as Re, E as be, I as lt, A as ut, e as ct, f as ft, g as dt, h as mt, k as ht, l as pt, p as vt, r as yt, n as wt, o as Et, q as St } from "./router-lfyopgBI.js";
5
+ /**
6
+ * React Router DOM v6.27.0
7
+ *
8
+ * Copyright (c) Remix Software Inc.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE.md file in the root directory of this source tree.
12
+ *
13
+ * @license MIT
14
+ */
15
+ function b() {
16
+ return b = Object.assign ? Object.assign.bind() : function(e) {
17
+ for (var t = 1; t < arguments.length; t++) {
18
+ var n = arguments[t];
19
+ for (var a in n)
20
+ Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
21
+ }
22
+ return e;
23
+ }, b.apply(this, arguments);
24
+ }
25
+ function oe(e, t) {
26
+ if (e == null) return {};
27
+ var n = {}, a = Object.keys(e), r, s;
28
+ for (s = 0; s < a.length; s++)
29
+ r = a[s], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
30
+ return n;
31
+ }
32
+ const W = "get", Y = "application/x-www-form-urlencoded";
33
+ function X(e) {
34
+ return e != null && typeof e.tagName == "string";
35
+ }
36
+ function gt(e) {
37
+ return X(e) && e.tagName.toLowerCase() === "button";
38
+ }
39
+ function Rt(e) {
40
+ return X(e) && e.tagName.toLowerCase() === "form";
41
+ }
42
+ function bt(e) {
43
+ return X(e) && e.tagName.toLowerCase() === "input";
44
+ }
45
+ function Nt(e) {
46
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
47
+ }
48
+ function Ct(e, t) {
49
+ return e.button === 0 && // Ignore everything but left clicks
50
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
51
+ !Nt(e);
52
+ }
53
+ function G(e) {
54
+ return e === void 0 && (e = ""), new URLSearchParams(typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
55
+ let a = e[n];
56
+ return t.concat(Array.isArray(a) ? a.map((r) => [n, r]) : [[n, a]]);
57
+ }, []));
58
+ }
59
+ function Tt(e, t) {
60
+ let n = G(e);
61
+ return t && t.forEach((a, r) => {
62
+ n.has(r) || t.getAll(r).forEach((s) => {
63
+ n.append(r, s);
64
+ });
65
+ }), n;
66
+ }
67
+ let j = null;
68
+ function _t() {
69
+ if (j === null)
70
+ try {
71
+ new FormData(
72
+ document.createElement("form"),
73
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
74
+ 0
75
+ ), j = !1;
76
+ } catch {
77
+ j = !0;
78
+ }
79
+ return j;
80
+ }
81
+ const Lt = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
82
+ function ee(e) {
83
+ return e != null && !Lt.has(e) ? (process.env.NODE_ENV !== "production" && H(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + Y + '"')), null) : e;
84
+ }
85
+ function xt(e, t) {
86
+ let n, a, r, s, i;
87
+ if (Rt(e)) {
88
+ let u = e.getAttribute("action");
89
+ a = u ? P(u, t) : null, n = e.getAttribute("method") || W, r = ee(e.getAttribute("enctype")) || Y, s = new FormData(e);
90
+ } else if (gt(e) || bt(e) && (e.type === "submit" || e.type === "image")) {
91
+ let u = e.form;
92
+ if (u == null)
93
+ throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
94
+ let f = e.getAttribute("formaction") || u.getAttribute("action");
95
+ if (a = f ? P(f, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || W, r = ee(e.getAttribute("formenctype")) || ee(u.getAttribute("enctype")) || Y, s = new FormData(u, e), !_t()) {
96
+ let {
97
+ name: l,
98
+ type: c,
99
+ value: d
100
+ } = e;
101
+ if (c === "image") {
102
+ let h = l ? l + "." : "";
103
+ s.append(h + "x", "0"), s.append(h + "y", "0");
104
+ } else l && s.append(l, d);
105
+ }
106
+ } else {
107
+ if (X(e))
108
+ throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
109
+ n = W, a = null, r = Y, i = e;
110
+ }
111
+ return s && r === "text/plain" && (i = s, s = void 0), {
112
+ action: a,
113
+ method: n.toLowerCase(),
114
+ encType: r,
115
+ formData: s,
116
+ body: i
117
+ };
118
+ }
119
+ const Ft = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], Pt = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], Dt = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"], Ot = "6";
120
+ try {
121
+ window.__reactRouterVersion = Ot;
122
+ } catch {
123
+ }
124
+ function At(e, t) {
125
+ return Se({
126
+ basename: t == null ? void 0 : t.basename,
127
+ future: b({}, t == null ? void 0 : t.future, {
128
+ v7_prependBasename: !0
129
+ }),
130
+ history: ge({
131
+ window: t == null ? void 0 : t.window
132
+ }),
133
+ hydrationData: (t == null ? void 0 : t.hydrationData) || Ne(),
134
+ routes: e,
135
+ mapRouteProperties: ve,
136
+ dataStrategy: t == null ? void 0 : t.dataStrategy,
137
+ patchRoutesOnNavigation: t == null ? void 0 : t.patchRoutesOnNavigation,
138
+ window: t == null ? void 0 : t.window
139
+ }).initialize();
140
+ }
141
+ function kt(e, t) {
142
+ return Se({
143
+ basename: t == null ? void 0 : t.basename,
144
+ future: b({}, t == null ? void 0 : t.future, {
145
+ v7_prependBasename: !0
146
+ }),
147
+ history: Re({
148
+ window: t == null ? void 0 : t.window
149
+ }),
150
+ hydrationData: (t == null ? void 0 : t.hydrationData) || Ne(),
151
+ routes: e,
152
+ mapRouteProperties: ve,
153
+ dataStrategy: t == null ? void 0 : t.dataStrategy,
154
+ patchRoutesOnNavigation: t == null ? void 0 : t.patchRoutesOnNavigation,
155
+ window: t == null ? void 0 : t.window
156
+ }).initialize();
157
+ }
158
+ function Ne() {
159
+ var e;
160
+ let t = (e = window) == null ? void 0 : e.__staticRouterHydrationData;
161
+ return t && t.errors && (t = b({}, t, {
162
+ errors: Ut(t.errors)
163
+ })), t;
164
+ }
165
+ function Ut(e) {
166
+ if (!e) return null;
167
+ let t = Object.entries(e), n = {};
168
+ for (let [a, r] of t)
169
+ if (r && r.__type === "RouteErrorResponse")
170
+ n[a] = new be(r.status, r.statusText, r.data, r.internal === !0);
171
+ else if (r && r.__type === "Error") {
172
+ if (r.__subType) {
173
+ let s = window[r.__subType];
174
+ if (typeof s == "function")
175
+ try {
176
+ let i = new s(r.message);
177
+ i.stack = "", n[a] = i;
178
+ } catch {
179
+ }
180
+ }
181
+ if (n[a] == null) {
182
+ let s = new Error(r.message);
183
+ s.stack = "", n[a] = s;
184
+ }
185
+ } else
186
+ n[a] = r;
187
+ return n;
188
+ }
189
+ const $ = /* @__PURE__ */ o.createContext({
190
+ isTransitioning: !1
191
+ });
192
+ process.env.NODE_ENV !== "production" && ($.displayName = "ViewTransition");
193
+ const Q = /* @__PURE__ */ o.createContext(/* @__PURE__ */ new Map());
194
+ process.env.NODE_ENV !== "production" && (Q.displayName = "Fetchers");
195
+ const It = "startTransition", L = o[It], Vt = "flushSync", fe = Ue[Vt], Mt = "useId", de = o[Mt];
196
+ function Ht(e) {
197
+ L ? L(e) : e();
198
+ }
199
+ function U(e) {
200
+ fe ? fe(e) : e();
201
+ }
202
+ class Kt {
203
+ constructor() {
204
+ this.status = "pending", this.promise = new Promise((t, n) => {
205
+ this.resolve = (a) => {
206
+ this.status === "pending" && (this.status = "resolved", t(a));
207
+ }, this.reject = (a) => {
208
+ this.status === "pending" && (this.status = "rejected", n(a));
209
+ };
210
+ });
211
+ }
212
+ }
213
+ function Bt(e) {
214
+ let {
215
+ fallbackElement: t,
216
+ router: n,
217
+ future: a
218
+ } = e, [r, s] = o.useState(n.state), [i, u] = o.useState(), [f, l] = o.useState({
219
+ isTransitioning: !1
220
+ }), [c, d] = o.useState(), [h, S] = o.useState(), [w, N] = o.useState(), g = o.useRef(/* @__PURE__ */ new Map()), {
221
+ v7_startTransition: C
222
+ } = a || {}, m = o.useCallback((y) => {
223
+ C ? Ht(y) : y();
224
+ }, [C]), p = o.useCallback((y, T) => {
225
+ let {
226
+ deletedFetchers: R,
227
+ flushSync: B,
228
+ viewTransitionOpts: x
229
+ } = T;
230
+ R.forEach((F) => g.current.delete(F)), y.fetchers.forEach((F, ke) => {
231
+ F.data !== void 0 && g.current.set(ke, F.data);
232
+ });
233
+ let Ae = n.window == null || n.window.document == null || typeof n.window.document.startViewTransition != "function";
234
+ if (!x || Ae) {
235
+ B ? U(() => s(y)) : m(() => s(y));
236
+ return;
237
+ }
238
+ if (B) {
239
+ U(() => {
240
+ h && (c && c.resolve(), h.skipTransition()), l({
241
+ isTransitioning: !0,
242
+ flushSync: !0,
243
+ currentLocation: x.currentLocation,
244
+ nextLocation: x.nextLocation
245
+ });
246
+ });
247
+ let F = n.window.document.startViewTransition(() => {
248
+ U(() => s(y));
249
+ });
250
+ F.finished.finally(() => {
251
+ U(() => {
252
+ d(void 0), S(void 0), u(void 0), l({
253
+ isTransitioning: !1
254
+ });
255
+ });
256
+ }), U(() => S(F));
257
+ return;
258
+ }
259
+ h ? (c && c.resolve(), h.skipTransition(), N({
260
+ state: y,
261
+ currentLocation: x.currentLocation,
262
+ nextLocation: x.nextLocation
263
+ })) : (u(y), l({
264
+ isTransitioning: !0,
265
+ flushSync: !1,
266
+ currentLocation: x.currentLocation,
267
+ nextLocation: x.nextLocation
268
+ }));
269
+ }, [n.window, h, c, g, m]);
270
+ o.useLayoutEffect(() => n.subscribe(p), [n, p]), o.useEffect(() => {
271
+ f.isTransitioning && !f.flushSync && d(new Kt());
272
+ }, [f]), o.useEffect(() => {
273
+ if (c && i && n.window) {
274
+ let y = i, T = c.promise, R = n.window.document.startViewTransition(async () => {
275
+ m(() => s(y)), await T;
276
+ });
277
+ R.finished.finally(() => {
278
+ d(void 0), S(void 0), u(void 0), l({
279
+ isTransitioning: !1
280
+ });
281
+ }), S(R);
282
+ }
283
+ }, [m, i, c, n.window]), o.useEffect(() => {
284
+ c && i && r.location.key === i.location.key && c.resolve();
285
+ }, [c, h, r.location, i]), o.useEffect(() => {
286
+ !f.isTransitioning && w && (u(w.state), l({
287
+ isTransitioning: !0,
288
+ flushSync: !1,
289
+ currentLocation: w.currentLocation,
290
+ nextLocation: w.nextLocation
291
+ }), N(void 0));
292
+ }, [f.isTransitioning, w]), o.useEffect(() => {
293
+ process.env.NODE_ENV !== "production" && H(t == null || !n.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead");
294
+ }, []);
295
+ let v = o.useMemo(() => ({
296
+ createHref: n.createHref,
297
+ encodeLocation: n.encodeLocation,
298
+ go: (y) => n.navigate(y),
299
+ push: (y, T, R) => n.navigate(y, {
300
+ state: T,
301
+ preventScrollReset: R == null ? void 0 : R.preventScrollReset
302
+ }),
303
+ replace: (y, T, R) => n.navigate(y, {
304
+ replace: !0,
305
+ state: T,
306
+ preventScrollReset: R == null ? void 0 : R.preventScrollReset
307
+ })
308
+ }), [n]), _ = n.basename || "/", k = o.useMemo(() => ({
309
+ router: n,
310
+ navigator: v,
311
+ static: !1,
312
+ basename: _
313
+ }), [n, v, _]), K = o.useMemo(() => ({
314
+ v7_relativeSplatPath: n.future.v7_relativeSplatPath
315
+ }), [n.future.v7_relativeSplatPath]);
316
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(ae.Provider, {
317
+ value: k
318
+ }, /* @__PURE__ */ o.createElement(J.Provider, {
319
+ value: r
320
+ }, /* @__PURE__ */ o.createElement(Q.Provider, {
321
+ value: g.current
322
+ }, /* @__PURE__ */ o.createElement($.Provider, {
323
+ value: f
324
+ }, /* @__PURE__ */ o.createElement(M, {
325
+ basename: _,
326
+ location: r.location,
327
+ navigationType: r.historyAction,
328
+ navigator: v,
329
+ future: K
330
+ }, r.initialized || n.future.v7_partialHydration ? /* @__PURE__ */ o.createElement(jt, {
331
+ routes: n.routes,
332
+ future: n.future,
333
+ state: r
334
+ }) : t))))), null);
335
+ }
336
+ const jt = /* @__PURE__ */ o.memo(zt);
337
+ function zt(e) {
338
+ let {
339
+ routes: t,
340
+ future: n,
341
+ state: a
342
+ } = e;
343
+ return Ie(t, void 0, a, n);
344
+ }
345
+ function Wt(e) {
346
+ let {
347
+ basename: t,
348
+ children: n,
349
+ future: a,
350
+ window: r
351
+ } = e, s = o.useRef();
352
+ s.current == null && (s.current = ge({
353
+ window: r,
354
+ v5Compat: !0
355
+ }));
356
+ let i = s.current, [u, f] = o.useState({
357
+ action: i.action,
358
+ location: i.location
359
+ }), {
360
+ v7_startTransition: l
361
+ } = a || {}, c = o.useCallback((d) => {
362
+ l && L ? L(() => f(d)) : f(d);
363
+ }, [f, l]);
364
+ return o.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ o.createElement(M, {
365
+ basename: t,
366
+ children: n,
367
+ location: u.location,
368
+ navigationType: u.action,
369
+ navigator: i,
370
+ future: a
371
+ });
372
+ }
373
+ function Yt(e) {
374
+ let {
375
+ basename: t,
376
+ children: n,
377
+ future: a,
378
+ window: r
379
+ } = e, s = o.useRef();
380
+ s.current == null && (s.current = Re({
381
+ window: r,
382
+ v5Compat: !0
383
+ }));
384
+ let i = s.current, [u, f] = o.useState({
385
+ action: i.action,
386
+ location: i.location
387
+ }), {
388
+ v7_startTransition: l
389
+ } = a || {}, c = o.useCallback((d) => {
390
+ l && L ? L(() => f(d)) : f(d);
391
+ }, [f, l]);
392
+ return o.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ o.createElement(M, {
393
+ basename: t,
394
+ children: n,
395
+ location: u.location,
396
+ navigationType: u.action,
397
+ navigator: i,
398
+ future: a
399
+ });
400
+ }
401
+ function Ce(e) {
402
+ let {
403
+ basename: t,
404
+ children: n,
405
+ future: a,
406
+ history: r
407
+ } = e, [s, i] = o.useState({
408
+ action: r.action,
409
+ location: r.location
410
+ }), {
411
+ v7_startTransition: u
412
+ } = a || {}, f = o.useCallback((l) => {
413
+ u && L ? L(() => i(l)) : i(l);
414
+ }, [i, u]);
415
+ return o.useLayoutEffect(() => r.listen(f), [r, f]), /* @__PURE__ */ o.createElement(M, {
416
+ basename: t,
417
+ children: n,
418
+ location: s.location,
419
+ navigationType: s.action,
420
+ navigator: r,
421
+ future: a
422
+ });
423
+ }
424
+ process.env.NODE_ENV !== "production" && (Ce.displayName = "unstable_HistoryRouter");
425
+ const qt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Gt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ie = /* @__PURE__ */ o.forwardRef(function(t, n) {
426
+ let {
427
+ onClick: a,
428
+ relative: r,
429
+ reloadDocument: s,
430
+ replace: i,
431
+ state: u,
432
+ target: f,
433
+ to: l,
434
+ preventScrollReset: c,
435
+ viewTransition: d
436
+ } = t, h = oe(t, Ft), {
437
+ basename: S
438
+ } = o.useContext(O), w, N = !1;
439
+ if (typeof l == "string" && Gt.test(l) && (w = l, qt))
440
+ try {
441
+ let p = new URL(window.location.href), v = l.startsWith("//") ? new URL(p.protocol + l) : new URL(l), _ = P(v.pathname, S);
442
+ v.origin === p.origin && _ != null ? l = _ + v.search + v.hash : N = !0;
443
+ } catch {
444
+ process.env.NODE_ENV !== "production" && H(!1, '<Link to="' + l + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
445
+ }
446
+ let g = he(l, {
447
+ relative: r
448
+ }), C = xe(l, {
449
+ replace: i,
450
+ state: u,
451
+ target: f,
452
+ preventScrollReset: c,
453
+ relative: r,
454
+ viewTransition: d
455
+ });
456
+ function m(p) {
457
+ a && a(p), p.defaultPrevented || C(p);
458
+ }
459
+ return (
460
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
461
+ /* @__PURE__ */ o.createElement("a", b({}, h, {
462
+ href: w || g,
463
+ onClick: N || s ? a : m,
464
+ ref: n,
465
+ target: f
466
+ }))
467
+ );
468
+ });
469
+ process.env.NODE_ENV !== "production" && (ie.displayName = "Link");
470
+ const Te = /* @__PURE__ */ o.forwardRef(function(t, n) {
471
+ let {
472
+ "aria-current": a = "page",
473
+ caseSensitive: r = !1,
474
+ className: s = "",
475
+ end: i = !1,
476
+ style: u,
477
+ to: f,
478
+ viewTransition: l,
479
+ children: c
480
+ } = t, d = oe(t, Pt), h = V(f, {
481
+ relative: d.relative
482
+ }), S = A(), w = o.useContext(J), {
483
+ navigator: N,
484
+ basename: g
485
+ } = o.useContext(O), C = w != null && // Conditional usage is OK here because the usage of a data router is static
486
+ // eslint-disable-next-line react-hooks/rules-of-hooks
487
+ Oe(h) && l === !0, m = N.encodeLocation ? N.encodeLocation(h).pathname : h.pathname, p = S.pathname, v = w && w.navigation && w.navigation.location ? w.navigation.location.pathname : null;
488
+ r || (p = p.toLowerCase(), v = v ? v.toLowerCase() : null, m = m.toLowerCase()), v && g && (v = P(v, g) || v);
489
+ const _ = m !== "/" && m.endsWith("/") ? m.length - 1 : m.length;
490
+ let k = p === m || !i && p.startsWith(m) && p.charAt(_) === "/", K = v != null && (v === m || !i && v.startsWith(m) && v.charAt(m.length) === "/"), y = {
491
+ isActive: k,
492
+ isPending: K,
493
+ isTransitioning: C
494
+ }, T = k ? a : void 0, R;
495
+ typeof s == "function" ? R = s(y) : R = [s, k ? "active" : null, K ? "pending" : null, C ? "transitioning" : null].filter(Boolean).join(" ");
496
+ let B = typeof u == "function" ? u(y) : u;
497
+ return /* @__PURE__ */ o.createElement(ie, b({}, d, {
498
+ "aria-current": T,
499
+ className: R,
500
+ ref: n,
501
+ style: B,
502
+ to: f,
503
+ viewTransition: l
504
+ }), typeof c == "function" ? c(y) : c);
505
+ });
506
+ process.env.NODE_ENV !== "production" && (Te.displayName = "NavLink");
507
+ const se = /* @__PURE__ */ o.forwardRef((e, t) => {
508
+ let {
509
+ fetcherKey: n,
510
+ navigate: a,
511
+ reloadDocument: r,
512
+ replace: s,
513
+ state: i,
514
+ method: u = W,
515
+ action: f,
516
+ onSubmit: l,
517
+ relative: c,
518
+ preventScrollReset: d,
519
+ viewTransition: h
520
+ } = e, S = oe(e, Dt), w = ue(), N = Pe(f, {
521
+ relative: c
522
+ }), g = u.toLowerCase() === "get" ? "get" : "post", C = (m) => {
523
+ if (l && l(m), m.defaultPrevented) return;
524
+ m.preventDefault();
525
+ let p = m.nativeEvent.submitter, v = (p == null ? void 0 : p.getAttribute("formmethod")) || u;
526
+ w(p || m.currentTarget, {
527
+ fetcherKey: n,
528
+ method: v,
529
+ navigate: a,
530
+ replace: s,
531
+ state: i,
532
+ relative: c,
533
+ preventScrollReset: d,
534
+ viewTransition: h
535
+ });
536
+ };
537
+ return /* @__PURE__ */ o.createElement("form", b({
538
+ ref: t,
539
+ method: g,
540
+ action: N,
541
+ onSubmit: r ? l : C
542
+ }, S));
543
+ });
544
+ process.env.NODE_ENV !== "production" && (se.displayName = "Form");
545
+ function _e(e) {
546
+ let {
547
+ getKey: t,
548
+ storageKey: n
549
+ } = e;
550
+ return De({
551
+ getKey: t,
552
+ storageKey: n
553
+ }), null;
554
+ }
555
+ process.env.NODE_ENV !== "production" && (_e.displayName = "ScrollRestoration");
556
+ var D;
557
+ (function(e) {
558
+ e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
559
+ })(D || (D = {}));
560
+ var I;
561
+ (function(e) {
562
+ e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
563
+ })(I || (I = {}));
564
+ function Le(e) {
565
+ return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
566
+ }
567
+ function Z(e) {
568
+ let t = o.useContext(ae);
569
+ return t || (process.env.NODE_ENV !== "production" ? E(!1, Le(e)) : E(!1)), t;
570
+ }
571
+ function le(e) {
572
+ let t = o.useContext(J);
573
+ return t || (process.env.NODE_ENV !== "production" ? E(!1, Le(e)) : E(!1)), t;
574
+ }
575
+ function xe(e, t) {
576
+ let {
577
+ target: n,
578
+ replace: a,
579
+ state: r,
580
+ preventScrollReset: s,
581
+ relative: i,
582
+ viewTransition: u
583
+ } = t === void 0 ? {} : t, f = ne(), l = A(), c = V(e, {
584
+ relative: i
585
+ });
586
+ return o.useCallback((d) => {
587
+ if (Ct(d, n)) {
588
+ d.preventDefault();
589
+ let h = a !== void 0 ? a : q(l) === q(c);
590
+ f(e, {
591
+ replace: h,
592
+ state: r,
593
+ preventScrollReset: s,
594
+ relative: i,
595
+ viewTransition: u
596
+ });
597
+ }
598
+ }, [l, f, c, a, r, n, e, s, i, u]);
599
+ }
600
+ function Jt(e) {
601
+ process.env.NODE_ENV !== "production" && H(typeof URLSearchParams < "u", "You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");
602
+ let t = o.useRef(G(e)), n = o.useRef(!1), a = A(), r = o.useMemo(() => (
603
+ // Only merge in the defaults if we haven't yet called setSearchParams.
604
+ // Once we call that we want those to take precedence, otherwise you can't
605
+ // remove a param with setSearchParams({}) if it has an initial value
606
+ Tt(a.search, n.current ? null : t.current)
607
+ ), [a.search]), s = ne(), i = o.useCallback((u, f) => {
608
+ const l = G(typeof u == "function" ? u(r) : u);
609
+ n.current = !0, s("?" + l, f);
610
+ }, [s, r]);
611
+ return [r, i];
612
+ }
613
+ function Xt() {
614
+ if (typeof document > "u")
615
+ throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
616
+ }
617
+ let $t = 0, Fe = () => "__" + String(++$t) + "__";
618
+ function ue() {
619
+ let {
620
+ router: e
621
+ } = Z(D.UseSubmit), {
622
+ basename: t
623
+ } = o.useContext(O), n = pe();
624
+ return o.useCallback(function(a, r) {
625
+ r === void 0 && (r = {}), Xt();
626
+ let {
627
+ action: s,
628
+ method: i,
629
+ encType: u,
630
+ formData: f,
631
+ body: l
632
+ } = xt(a, t);
633
+ if (r.navigate === !1) {
634
+ let c = r.fetcherKey || Fe();
635
+ e.fetch(c, n, r.action || s, {
636
+ preventScrollReset: r.preventScrollReset,
637
+ formData: f,
638
+ body: l,
639
+ formMethod: r.method || i,
640
+ formEncType: r.encType || u,
641
+ flushSync: r.flushSync
642
+ });
643
+ } else
644
+ e.navigate(r.action || s, {
645
+ preventScrollReset: r.preventScrollReset,
646
+ formData: f,
647
+ body: l,
648
+ formMethod: r.method || i,
649
+ formEncType: r.encType || u,
650
+ replace: r.replace,
651
+ state: r.state,
652
+ fromRouteId: n,
653
+ flushSync: r.flushSync,
654
+ viewTransition: r.viewTransition
655
+ });
656
+ }, [e, t, n]);
657
+ }
658
+ function Pe(e, t) {
659
+ let {
660
+ relative: n
661
+ } = t === void 0 ? {} : t, {
662
+ basename: a
663
+ } = o.useContext(O), r = o.useContext(re);
664
+ r || (process.env.NODE_ENV !== "production" ? E(!1, "useFormAction must be used inside a RouteContext") : E(!1));
665
+ let [s] = r.matches.slice(-1), i = b({}, V(e || ".", {
666
+ relative: n
667
+ })), u = A();
668
+ if (e == null) {
669
+ i.search = u.search;
670
+ let f = new URLSearchParams(i.search), l = f.getAll("index");
671
+ if (l.some((d) => d === "")) {
672
+ f.delete("index"), l.filter((h) => h).forEach((h) => f.append("index", h));
673
+ let d = f.toString();
674
+ i.search = d ? "?" + d : "";
675
+ }
676
+ }
677
+ return (!e || e === ".") && s.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (i.pathname = i.pathname === "/" ? a : st([a, i.pathname])), q(i);
678
+ }
679
+ function Qt(e) {
680
+ var t;
681
+ let {
682
+ key: n
683
+ } = e === void 0 ? {} : e, {
684
+ router: a
685
+ } = Z(D.UseFetcher), r = le(I.UseFetcher), s = o.useContext(Q), i = o.useContext(re), u = (t = i.matches[i.matches.length - 1]) == null ? void 0 : t.route.id;
686
+ s || (process.env.NODE_ENV !== "production" ? E(!1, "useFetcher must be used inside a FetchersContext") : E(!1)), i || (process.env.NODE_ENV !== "production" ? E(!1, "useFetcher must be used inside a RouteContext") : E(!1)), u == null && (process.env.NODE_ENV !== "production" ? E(!1, 'useFetcher can only be used on routes that contain a unique "id"') : E(!1));
687
+ let f = de ? de() : "", [l, c] = o.useState(n || f);
688
+ n && n !== l ? c(n) : l || c(Fe()), o.useEffect(() => (a.getFetcher(l), () => {
689
+ a.deleteFetcher(l);
690
+ }), [a, l]);
691
+ let d = o.useCallback((m, p) => {
692
+ u || (process.env.NODE_ENV !== "production" ? E(!1, "No routeId available for fetcher.load()") : E(!1)), a.fetch(l, u, m, p);
693
+ }, [l, u, a]), h = ue(), S = o.useCallback((m, p) => {
694
+ h(m, b({}, p, {
695
+ navigate: !1,
696
+ fetcherKey: l
697
+ }));
698
+ }, [l, h]), w = o.useMemo(() => {
699
+ let m = /* @__PURE__ */ o.forwardRef((p, v) => /* @__PURE__ */ o.createElement(se, b({}, p, {
700
+ navigate: !1,
701
+ fetcherKey: l,
702
+ ref: v
703
+ })));
704
+ return process.env.NODE_ENV !== "production" && (m.displayName = "fetcher.Form"), m;
705
+ }, [l]), N = r.fetchers.get(l) || lt, g = s.get(l);
706
+ return o.useMemo(() => b({
707
+ Form: w,
708
+ submit: S,
709
+ load: d
710
+ }, N, {
711
+ data: g
712
+ }), [w, S, d, N, g]);
713
+ }
714
+ function Zt() {
715
+ let e = le(I.UseFetchers);
716
+ return Array.from(e.fetchers.entries()).map((t) => {
717
+ let [n, a] = t;
718
+ return b({}, a, {
719
+ key: n
720
+ });
721
+ });
722
+ }
723
+ const me = "react-router-scroll-positions";
724
+ let z = {};
725
+ function De(e) {
726
+ let {
727
+ getKey: t,
728
+ storageKey: n
729
+ } = e === void 0 ? {} : e, {
730
+ router: a
731
+ } = Z(D.UseScrollRestoration), {
732
+ restoreScrollPosition: r,
733
+ preventScrollReset: s
734
+ } = le(I.UseScrollRestoration), {
735
+ basename: i
736
+ } = o.useContext(O), u = A(), f = ye(), l = we();
737
+ o.useEffect(() => (window.history.scrollRestoration = "manual", () => {
738
+ window.history.scrollRestoration = "auto";
739
+ }), []), tn(o.useCallback(() => {
740
+ if (l.state === "idle") {
741
+ let c = (t ? t(u, f) : null) || u.key;
742
+ z[c] = window.scrollY;
743
+ }
744
+ try {
745
+ sessionStorage.setItem(n || me, JSON.stringify(z));
746
+ } catch (c) {
747
+ process.env.NODE_ENV !== "production" && H(!1, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + c + ").");
748
+ }
749
+ window.history.scrollRestoration = "auto";
750
+ }, [n, t, l.state, u, f])), typeof document < "u" && (o.useLayoutEffect(() => {
751
+ try {
752
+ let c = sessionStorage.getItem(n || me);
753
+ c && (z = JSON.parse(c));
754
+ } catch {
755
+ }
756
+ }, [n]), o.useLayoutEffect(() => {
757
+ let c = t && i !== "/" ? (h, S) => t(
758
+ // Strip the basename to match useLocation()
759
+ b({}, h, {
760
+ pathname: P(h.pathname, i) || h.pathname
761
+ }),
762
+ S
763
+ ) : t, d = a == null ? void 0 : a.enableScrollRestoration(z, () => window.scrollY, c);
764
+ return () => d && d();
765
+ }, [a, i, t]), o.useLayoutEffect(() => {
766
+ if (r !== !1) {
767
+ if (typeof r == "number") {
768
+ window.scrollTo(0, r);
769
+ return;
770
+ }
771
+ if (u.hash) {
772
+ let c = document.getElementById(decodeURIComponent(u.hash.slice(1)));
773
+ if (c) {
774
+ c.scrollIntoView();
775
+ return;
776
+ }
777
+ }
778
+ s !== !0 && window.scrollTo(0, 0);
779
+ }
780
+ }, [u, r, s]));
781
+ }
782
+ function en(e, t) {
783
+ let {
784
+ capture: n
785
+ } = t || {};
786
+ o.useEffect(() => {
787
+ let a = n != null ? {
788
+ capture: n
789
+ } : void 0;
790
+ return window.addEventListener("beforeunload", e, a), () => {
791
+ window.removeEventListener("beforeunload", e, a);
792
+ };
793
+ }, [e, n]);
794
+ }
795
+ function tn(e, t) {
796
+ let {
797
+ capture: n
798
+ } = {};
799
+ o.useEffect(() => {
800
+ let a = n != null ? {
801
+ capture: n
802
+ } : void 0;
803
+ return window.addEventListener("pagehide", e, a), () => {
804
+ window.removeEventListener("pagehide", e, a);
805
+ };
806
+ }, [e, n]);
807
+ }
808
+ function nn(e) {
809
+ let {
810
+ when: t,
811
+ message: n
812
+ } = e, a = Ee(t);
813
+ o.useEffect(() => {
814
+ a.state === "blocked" && (window.confirm(n) ? setTimeout(a.proceed, 0) : a.reset());
815
+ }, [a, n]), o.useEffect(() => {
816
+ a.state === "blocked" && !t && a.reset();
817
+ }, [a, t]);
818
+ }
819
+ function Oe(e, t) {
820
+ t === void 0 && (t = {});
821
+ let n = o.useContext($);
822
+ n == null && (process.env.NODE_ENV !== "production" ? E(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : E(!1));
823
+ let {
824
+ basename: a
825
+ } = Z(D.useViewTransitionState), r = V(e, {
826
+ relative: t.relative
827
+ });
828
+ if (!n.isTransitioning)
829
+ return !1;
830
+ let s = P(n.currentLocation.pathname, a) || n.currentLocation.pathname, i = P(n.nextLocation.pathname, a) || n.nextLocation.pathname;
831
+ return te(r.pathname, i) != null || te(r.pathname, s) != null;
832
+ }
833
+ const on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
834
+ __proto__: null,
835
+ AbortedDeferredError: ut,
836
+ Await: Ve,
837
+ BrowserRouter: Wt,
838
+ Form: se,
839
+ HashRouter: Yt,
840
+ Link: ie,
841
+ MemoryRouter: Me,
842
+ NavLink: Te,
843
+ Navigate: He,
844
+ get NavigationType() {
845
+ return ct;
846
+ },
847
+ Outlet: Ke,
848
+ Route: Be,
849
+ Router: M,
850
+ RouterProvider: Bt,
851
+ Routes: je,
852
+ ScrollRestoration: _e,
853
+ UNSAFE_DataRouterContext: ae,
854
+ UNSAFE_DataRouterStateContext: J,
855
+ UNSAFE_ErrorResponseImpl: be,
856
+ UNSAFE_FetchersContext: Q,
857
+ UNSAFE_LocationContext: ze,
858
+ UNSAFE_NavigationContext: O,
859
+ UNSAFE_RouteContext: re,
860
+ UNSAFE_ViewTransitionContext: $,
861
+ UNSAFE_useRouteId: pe,
862
+ UNSAFE_useScrollRestoration: De,
863
+ createBrowserRouter: At,
864
+ createHashRouter: kt,
865
+ createMemoryRouter: We,
866
+ createPath: q,
867
+ createRoutesFromChildren: ce,
868
+ createRoutesFromElements: ce,
869
+ createSearchParams: G,
870
+ defer: ft,
871
+ generatePath: dt,
872
+ isRouteErrorResponse: mt,
873
+ json: ht,
874
+ matchPath: te,
875
+ matchRoutes: pt,
876
+ parsePath: vt,
877
+ redirect: yt,
878
+ redirectDocument: wt,
879
+ renderMatches: Ye,
880
+ replace: Et,
881
+ resolvePath: St,
882
+ unstable_HistoryRouter: Ce,
883
+ unstable_usePrompt: nn,
884
+ useActionData: qe,
885
+ useAsyncError: Ge,
886
+ useAsyncValue: Je,
887
+ useBeforeUnload: en,
888
+ useBlocker: Ee,
889
+ useFetcher: Qt,
890
+ useFetchers: Zt,
891
+ useFormAction: Pe,
892
+ useHref: he,
893
+ useInRouterContext: Xe,
894
+ useLinkClickHandler: xe,
895
+ useLoaderData: $e,
896
+ useLocation: A,
897
+ useMatch: Qe,
898
+ useMatches: ye,
899
+ useNavigate: ne,
900
+ useNavigation: we,
901
+ useNavigationType: Ze,
902
+ useOutlet: et,
903
+ useOutletContext: tt,
904
+ useParams: nt,
905
+ useResolvedPath: V,
906
+ useRevalidator: rt,
907
+ useRouteError: at,
908
+ useRouteLoaderData: ot,
909
+ useRoutes: it,
910
+ useSearchParams: Jt,
911
+ useSubmit: ue,
912
+ useViewTransitionState: Oe
913
+ }, Symbol.toStringTag, { value: "Module" }));
914
+ export {
915
+ ie as L,
916
+ Te as N,
917
+ Bt as R,
918
+ on as d,
919
+ Jt as u
920
+ };
921
+ //# sourceMappingURL=index-Yn8c3UWE.js.map