zudoku 0.3.0-dev.30 → 0.3.0-dev.32

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 (224) hide show
  1. package/dist/app/App.d.ts +1 -0
  2. package/dist/app/App.js +2 -0
  3. package/dist/app/App.js.map +1 -0
  4. package/dist/app/demo.js +15 -11
  5. package/dist/app/demo.js.map +1 -1
  6. package/dist/app/entry.client.d.ts +5 -0
  7. package/dist/app/entry.client.js +28 -0
  8. package/dist/app/entry.client.js.map +1 -0
  9. package/dist/app/entry.server.d.ts +10 -0
  10. package/dist/app/entry.server.js +107 -0
  11. package/dist/app/entry.server.js.map +1 -0
  12. package/dist/app/main.d.ts +26 -2
  13. package/dist/app/main.js +39 -15
  14. package/dist/app/main.js.map +1 -1
  15. package/dist/app/standalone.js +14 -10
  16. package/dist/app/standalone.js.map +1 -1
  17. package/dist/app/tailwind.d.ts +1 -1
  18. package/dist/app/tailwind.js +0 -4
  19. package/dist/app/tailwind.js.map +1 -1
  20. package/dist/app/zudoku-manifest.d.ts +1 -0
  21. package/dist/app/zudoku-manifest.js +20 -0
  22. package/dist/app/zudoku-manifest.js.map +1 -0
  23. package/dist/cli/cmds/dev.js +5 -0
  24. package/dist/cli/cmds/dev.js.map +1 -1
  25. package/dist/cli/dev/handler.d.ts +1 -0
  26. package/dist/cli/dev/handler.js +3 -1
  27. package/dist/cli/dev/handler.js.map +1 -1
  28. package/dist/config/config.d.ts +5 -0
  29. package/dist/lib/authentication/providers/clerk.js +2 -0
  30. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  31. package/dist/lib/components/DevPortal.d.ts +5 -2
  32. package/dist/lib/components/DevPortal.js +11 -10
  33. package/dist/lib/components/DevPortal.js.map +1 -1
  34. package/dist/lib/components/ErrorPage.d.ts +6 -0
  35. package/dist/lib/components/ErrorPage.js +9 -0
  36. package/dist/lib/components/ErrorPage.js.map +1 -0
  37. package/dist/lib/components/InlineCode.d.ts +5 -0
  38. package/dist/lib/components/InlineCode.js +4 -0
  39. package/dist/lib/components/InlineCode.js.map +1 -0
  40. package/dist/lib/components/Layout.js +2 -1
  41. package/dist/lib/components/Layout.js.map +1 -1
  42. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  43. package/dist/lib/components/NotFoundPage.js +12 -0
  44. package/dist/lib/components/NotFoundPage.js.map +1 -0
  45. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  46. package/dist/lib/components/SyntaxHighlight.js +20 -22
  47. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  48. package/dist/lib/components/index.d.ts +4 -1
  49. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  50. package/dist/lib/errors/ErrorAlert.js +8 -0
  51. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  52. package/dist/lib/errors/RouterError.d.ts +1 -0
  53. package/dist/lib/errors/RouterError.js +12 -0
  54. package/dist/lib/errors/RouterError.js.map +1 -0
  55. package/dist/lib/errors/ServerError.d.ts +3 -0
  56. package/dist/lib/errors/ServerError.js +6 -0
  57. package/dist/lib/errors/ServerError.js.map +1 -0
  58. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  59. package/dist/lib/errors/TopLevelError.js +7 -0
  60. package/dist/lib/errors/TopLevelError.js.map +1 -0
  61. package/dist/lib/oas/parser/index.d.ts +1 -1
  62. package/dist/lib/oas/parser/index.js +38 -14
  63. package/dist/lib/oas/parser/index.js.map +1 -1
  64. package/dist/lib/plugins/api-keys/index.js +3 -8
  65. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  66. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  67. package/dist/lib/plugins/markdown/index.js +3 -7
  68. package/dist/lib/plugins/markdown/index.js.map +1 -1
  69. package/dist/lib/plugins/openapi/OperationList.js +11 -1
  70. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  71. package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
  72. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  73. package/dist/lib/plugins/openapi/SchemaListView.js +2 -1
  74. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  75. package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
  76. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
  77. package/dist/lib/plugins/openapi/index.js +9 -1
  78. package/dist/lib/plugins/openapi/index.js.map +1 -1
  79. package/dist/lib/plugins/redirect/index.js +2 -3
  80. package/dist/lib/plugins/redirect/index.js.map +1 -1
  81. package/dist/lib/ui/Callout.js +1 -1
  82. package/dist/lib/ui/Callout.js.map +1 -1
  83. package/dist/lib/ui/button-variants.d.ts +1 -1
  84. package/dist/lib/util/MdxComponents.js +2 -2
  85. package/dist/lib/util/MdxComponents.js.map +1 -1
  86. package/dist/lib/util/groupBy.d.ts +1 -6
  87. package/dist/lib/util/groupBy.js +10 -8
  88. package/dist/lib/util/groupBy.js.map +1 -1
  89. package/dist/vite/build.js +23 -10
  90. package/dist/vite/build.js.map +1 -1
  91. package/dist/vite/config.d.ts +2 -2
  92. package/dist/vite/config.js +36 -8
  93. package/dist/vite/config.js.map +1 -1
  94. package/dist/vite/dev-server.d.ts +1 -1
  95. package/dist/vite/dev-server.js +15 -9
  96. package/dist/vite/dev-server.js.map +1 -1
  97. package/dist/vite/html.js +5 -4
  98. package/dist/vite/html.js.map +1 -1
  99. package/dist/vite/plugin-custom-css.d.ts +6 -0
  100. package/dist/vite/plugin-custom-css.js +55 -0
  101. package/dist/vite/plugin-custom-css.js.map +1 -0
  102. package/dist/vite/plugin-docs.js +14 -5
  103. package/dist/vite/plugin-docs.js.map +1 -1
  104. package/dist/vite/plugin-openapi-worker.js +4 -1
  105. package/dist/vite/plugin-openapi-worker.js.map +1 -1
  106. package/dist/vite/plugin.js +2 -0
  107. package/dist/vite/plugin.js.map +1 -1
  108. package/dist/vite/prerender.d.ts +1 -0
  109. package/dist/vite/prerender.js +57 -0
  110. package/dist/vite/prerender.js.map +1 -0
  111. package/lib/{DevPortalProvider--xZTs0RJ.js → DevPortalProvider-BlxLX6GG.js} +230 -250
  112. package/lib/DevPortalProvider-BlxLX6GG.js.map +1 -0
  113. package/lib/{Markdown-oJFqm0uk.js → Markdown-CL8KPvJN.js} +8 -9
  114. package/lib/{Markdown-oJFqm0uk.js.map → Markdown-CL8KPvJN.js.map} +1 -1
  115. package/lib/MdxComponents-Ev_hBHb2.js +5885 -0
  116. package/lib/MdxComponents-Ev_hBHb2.js.map +1 -0
  117. package/lib/{MdxPage-BV_9ncEk.js → MdxPage-Z3HKNTrj.js} +92 -89
  118. package/lib/MdxPage-Z3HKNTrj.js.map +1 -0
  119. package/lib/{OperationList-DfG_E0Xa.js → OperationList-KoITgfDT.js} +1967 -1785
  120. package/lib/OperationList-KoITgfDT.js.map +1 -0
  121. package/lib/Route-Bf1_D_vC.js +13 -0
  122. package/lib/{Route-CHqr53jb.js.map → Route-Bf1_D_vC.js.map} +1 -1
  123. package/lib/Select-DSa3bN4t.js +4770 -0
  124. package/lib/Select-DSa3bN4t.js.map +1 -0
  125. package/lib/assets/{worker-BXS8hiSM.js → worker-BjPv-hjP.js} +3100 -2720
  126. package/lib/assets/worker-BjPv-hjP.js.map +1 -0
  127. package/lib/hook-CTmJ6CWq.js +35 -0
  128. package/lib/hook-CTmJ6CWq.js.map +1 -0
  129. package/lib/index-BdWBDosx.js +74 -0
  130. package/lib/index-BdWBDosx.js.map +1 -0
  131. package/lib/{index-B2qLeglF.js → index-BoWzKb_9.js} +57 -41
  132. package/lib/index-BoWzKb_9.js.map +1 -0
  133. package/lib/{AnchorLink-BtVKbEwm.js → index.esm-CPEExBJE.js} +156 -168
  134. package/lib/index.esm-CPEExBJE.js.map +1 -0
  135. package/lib/jsx-runtime-CM0TzjGp.js +866 -0
  136. package/lib/jsx-runtime-CM0TzjGp.js.map +1 -0
  137. package/lib/mutation-91kw0lHb.js +208 -0
  138. package/lib/mutation-91kw0lHb.js.map +1 -0
  139. package/lib/router-CcYTwKjf.js +183 -0
  140. package/lib/router-CcYTwKjf.js.map +1 -0
  141. package/lib/zudoku.auth-clerk.js.map +1 -1
  142. package/lib/zudoku.auth-openid.js +588 -441
  143. package/lib/zudoku.auth-openid.js.map +1 -1
  144. package/lib/zudoku.components.js +330 -543
  145. package/lib/zudoku.components.js.map +1 -1
  146. package/lib/zudoku.openapi-worker.js +18 -18
  147. package/lib/zudoku.plugin-api-keys.js +143 -98
  148. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  149. package/lib/zudoku.plugin-markdown.js +2 -49
  150. package/lib/zudoku.plugin-markdown.js.map +1 -1
  151. package/lib/zudoku.plugin-openapi.js +5 -3
  152. package/lib/zudoku.plugin-openapi.js.map +1 -1
  153. package/lib/zudoku.plugin-redirect.js +6 -7
  154. package/lib/zudoku.plugin-redirect.js.map +1 -1
  155. package/package.json +3 -1
  156. package/src/app/App.tsx +0 -0
  157. package/src/app/demo.tsx +18 -13
  158. package/src/app/entry.client.tsx +51 -0
  159. package/src/app/entry.server.tsx +158 -0
  160. package/src/app/main.tsx +65 -41
  161. package/src/app/standalone.tsx +15 -11
  162. package/src/app/tailwind.ts +2 -6
  163. package/src/app/zudoku-manifest.ts +22 -0
  164. package/src/lib/authentication/providers/clerk.tsx +1 -0
  165. package/src/lib/components/DevPortal.tsx +34 -33
  166. package/src/lib/components/ErrorPage.tsx +28 -0
  167. package/src/lib/components/InlineCode.tsx +19 -0
  168. package/src/lib/components/Layout.tsx +7 -4
  169. package/src/lib/components/NotFoundPage.tsx +39 -0
  170. package/src/lib/components/SyntaxHighlight.tsx +26 -22
  171. package/src/lib/errors/ErrorAlert.tsx +21 -0
  172. package/src/lib/errors/RouterError.tsx +13 -0
  173. package/src/lib/errors/ServerError.tsx +5 -0
  174. package/src/lib/errors/TopLevelError.tsx +8 -0
  175. package/src/lib/oas/parser/index.ts +41 -22
  176. package/src/lib/plugins/api-keys/index.tsx +4 -16
  177. package/src/lib/plugins/markdown/generateRoutes.tsx +1 -1
  178. package/src/lib/plugins/markdown/index.tsx +3 -7
  179. package/src/lib/plugins/openapi/OperationList.tsx +30 -0
  180. package/src/lib/plugins/openapi/OperationListItem.tsx +3 -1
  181. package/src/lib/plugins/openapi/SchemaListView.tsx +8 -10
  182. package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -1
  183. package/src/lib/plugins/openapi/index.tsx +18 -1
  184. package/src/lib/plugins/redirect/index.tsx +2 -2
  185. package/src/lib/ui/Callout.tsx +2 -2
  186. package/src/lib/util/MdxComponents.tsx +2 -11
  187. package/src/lib/util/groupBy.ts +7 -12
  188. package/dist/lib/components/Error.d.ts +0 -1
  189. package/dist/lib/components/Error.js +0 -10
  190. package/dist/lib/components/Error.js.map +0 -1
  191. package/dist/lib/components/Router.d.ts +0 -4
  192. package/dist/lib/components/Router.js +0 -21
  193. package/dist/lib/components/Router.js.map +0 -1
  194. package/lib/AnchorLink-BtVKbEwm.js.map +0 -1
  195. package/lib/DevPortalProvider--xZTs0RJ.js.map +0 -1
  196. package/lib/MdxComponents-CsU8yR42.js +0 -3019
  197. package/lib/MdxComponents-CsU8yR42.js.map +0 -1
  198. package/lib/MdxPage-BV_9ncEk.js.map +0 -1
  199. package/lib/OperationList-DfG_E0Xa.js.map +0 -1
  200. package/lib/Route-CHqr53jb.js +0 -14
  201. package/lib/Select-CNmXi4JU.js +0 -4572
  202. package/lib/Select-CNmXi4JU.js.map +0 -1
  203. package/lib/Spinner-By5opWs5.js +0 -182
  204. package/lib/Spinner-By5opWs5.js.map +0 -1
  205. package/lib/assets/worker-BXS8hiSM.js.map +0 -1
  206. package/lib/cn-DpqTslo9.js +0 -2342
  207. package/lib/cn-DpqTslo9.js.map +0 -1
  208. package/lib/hook-kVJ4gpk5.js +0 -25
  209. package/lib/hook-kVJ4gpk5.js.map +0 -1
  210. package/lib/index-B2qLeglF.js.map +0 -1
  211. package/lib/index-CUIxJAeE.js +0 -713
  212. package/lib/index-CUIxJAeE.js.map +0 -1
  213. package/lib/index-Cr3hgaqt.js +0 -412
  214. package/lib/index-Cr3hgaqt.js.map +0 -1
  215. package/lib/index-fXFJf9Ua.js +0 -464
  216. package/lib/index-fXFJf9Ua.js.map +0 -1
  217. package/lib/jsx-runtime-D7DwziLW.js +0 -3009
  218. package/lib/jsx-runtime-D7DwziLW.js.map +0 -1
  219. package/lib/loglevel-CA34MiFn.js +0 -153
  220. package/lib/loglevel-CA34MiFn.js.map +0 -1
  221. package/lib/util-DnDPBx_j.js +0 -41
  222. package/lib/util-DnDPBx_j.js.map +0 -1
  223. package/src/lib/components/Error.tsx +0 -15
  224. package/src/lib/components/Router.tsx +0 -23
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-Cr3hgaqt.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.50.1/node_modules/@tanstack/query-core/build/modern/mutation.js","../../../node_modules/.pnpm/@radix-ui+primitive@1.1.0/node_modules/@radix-ui/primitive/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-context@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-slot@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-primitive@2.0.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue: () => {\n this.#dispatch({ type: \"continue\" });\n },\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (!restored) {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n await this.#mutationCache.config.onMutate?.(\n variables,\n this\n );\n const context = await this.options.onMutate?.(variables);\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this\n );\n await this.options.onSuccess?.(data, variables, this.state.context);\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(data, null, variables, this.state.context);\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this\n );\n await this.options.onError?.(\n error,\n variables,\n this.state.context\n );\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context\n );\n throw error;\n } finally {\n this.#dispatch({ type: \"error\", error });\n }\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n function Provider(props) {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n function Provider(props) {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName][index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName][index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/useLayoutEffect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/composeRefs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => refs.forEach((ref) => setRef(ref, node));\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/slot/src/Slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar Slot = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return React.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef\n });\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/Primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\"useId\".toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Mutation","_a","Removable","config","__privateAdd","_Mutation_instances","_observers","_mutationCache","_retryer","__privateSet","getDefaultState","options","observer","__privateGet","x","variables","createRetryer","failureCount","error","__privateMethod","dispatch_fn","restored","isPaused","_b","context","_d","_c","data","_f","_e","_h","_g","_j","_i","_l","_k","_n","_m","_p","_o","_r","_q","_t","_s","action","reducer","state","notifyManager","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","useCallbackRef","callback","callbackRef","args","useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","handleChange","setValue","nextValue","value2","uncontrolledState","prevValueRef","useLayoutEffect2","setRef","ref","composeRefs","refs","node","useComposedRefs","Slot","forwardedRef","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","SlotClone","childrenRef","getElementRef","mergeProps","Slottable","Fragment","childProps","overrideProps","propName","slotPropValue","childPropValue","element","getter","mayWarn","NODES","Primitive","primitive","Node","asChild","primitiveProps","Comp","dispatchDiscreteCustomEvent","target","ReactDOM","useReactId","count","useId","deterministicId","id","setId","useLayoutEffect","reactId"],"mappings":";;;;;;;;;sBAIIA,MAAWC,IAAA,cAAcC,EAAU;AAAA,EAIrC,YAAYC,GAAQ;AAClB;AALW,IAAAC,EAAA,MAAAC;AACb,IAAAD,EAAA,MAAAE;AACA,IAAAF,EAAA,MAAAG;AACA,IAAAH,EAAA,MAAAI;AAGE,SAAK,aAAaL,EAAO,YACzBM,EAAA,MAAKF,GAAiBJ,EAAO,gBAC7BM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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACIC,KAAYD,GAAM,OAAO,CAACE,GAAW3B,MAAS;AAChD,QAAM4B,IAAOhF,EAAM,WAAW,CAACE,GAAOqD,MAAiB;AACrD,UAAM,EAAE,SAAA0B,GAAS,GAAGC,EAAc,IAAKhF,GACjCiF,IAAOF,IAAU3B,IAAOF;AAC9B,WAAI,OAAO,SAAW,QACpB,OAAO,OAAO,IAAI,UAAU,CAAC,IAAI,KAEZ/C,gBAAAA,EAAAA,IAAI8E,GAAM,EAAE,GAAGD,GAAgB,KAAK3B,EAAY,CAAE;AAAA,EAC7E,CAAG;AACD,SAAAyB,EAAK,cAAc,aAAa5B,CAAI,IAC7B,EAAE,GAAG2B,GAAW,CAAC3B,CAAI,GAAG4B,EAAI;AACrC,GAAG,EAAE;AACL,SAASI,GAA4BC,GAAQ1F,GAAO;AAClD,EAAI0F,KAAQC,EAAS,UAAU,MAAMD,EAAO,cAAc1F,CAAK,CAAC;AAClE;AClCA,IAAI4F,KAAavF,EAAM,UAAwB,MAAA;AAAA,IAC3CwF,KAAQ;AACZ,SAASC,GAAMC,GAAiB;AAC9B,QAAM,CAACC,GAAIC,CAAK,IAAI5F,EAAM,SAASuF,GAAU,CAAE;AAC/CM,SAAAA,EAAgB,MAAM;AACE,IAAAD,EAAM,CAACE,MAAYA,KAAW,OAAON,IAAO,CAAC;AAAA,EACvE,GAAK,CAACE,CAAe,CAAC,GACOC,IAAK,SAASA,CAAE,KAAK;AAClD;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
@@ -1,464 +0,0 @@
1
- import * as n from "react";
2
- import { i as c, w as g, r as U, g as F, d as D, e as Y, A as W, p as z, s as H, f as q } from "./jsx-runtime-D7DwziLW.js";
3
- /**
4
- * React Router v6.24.1
5
- *
6
- * Copyright (c) Remix Software Inc.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE.md file in the root directory of this source tree.
10
- *
11
- * @license MIT
12
- */
13
- function _() {
14
- return _ = Object.assign ? Object.assign.bind() : function(e) {
15
- for (var t = 1; t < arguments.length; t++) {
16
- var r = arguments[t];
17
- for (var a in r)
18
- Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
19
- }
20
- return e;
21
- }, _.apply(this, arguments);
22
- }
23
- const P = /* @__PURE__ */ n.createContext(null);
24
- process.env.NODE_ENV !== "production" && (P.displayName = "DataRouter");
25
- const M = /* @__PURE__ */ n.createContext(null);
26
- process.env.NODE_ENV !== "production" && (M.displayName = "DataRouterState");
27
- const X = /* @__PURE__ */ n.createContext(null);
28
- process.env.NODE_ENV !== "production" && (X.displayName = "Await");
29
- const C = /* @__PURE__ */ n.createContext(null);
30
- process.env.NODE_ENV !== "production" && (C.displayName = "Navigation");
31
- const V = /* @__PURE__ */ n.createContext(null);
32
- process.env.NODE_ENV !== "production" && (V.displayName = "Location");
33
- const y = /* @__PURE__ */ n.createContext({
34
- outlet: null,
35
- matches: [],
36
- isDataRoute: !1
37
- });
38
- process.env.NODE_ENV !== "production" && (y.displayName = "Route");
39
- const k = /* @__PURE__ */ n.createContext(null);
40
- process.env.NODE_ENV !== "production" && (k.displayName = "RouteError");
41
- function de(e, t) {
42
- let {
43
- relative: r
44
- } = t === void 0 ? {} : t;
45
- R() || (process.env.NODE_ENV !== "production" ? c(
46
- !1,
47
- // TODO: This error is probably because they somehow have 2 versions of the
48
- // router loaded. We can help them understand how to avoid that.
49
- "useHref() may be used only in the context of a <Router> component."
50
- ) : c(!1));
51
- let {
52
- basename: a,
53
- navigator: i
54
- } = n.useContext(C), {
55
- hash: u,
56
- pathname: o,
57
- search: f
58
- } = Z(e, {
59
- relative: r
60
- }), m = o;
61
- return a !== "/" && (m = o === "/" ? a : D([a, o])), i.createHref({
62
- pathname: m,
63
- search: f,
64
- hash: u
65
- });
66
- }
67
- function R() {
68
- return n.useContext(V) != null;
69
- }
70
- function B() {
71
- return R() || (process.env.NODE_ENV !== "production" ? c(
72
- !1,
73
- // TODO: This error is probably because they somehow have 2 versions of the
74
- // router loaded. We can help them understand how to avoid that.
75
- "useLocation() may be used only in the context of a <Router> component."
76
- ) : c(!1)), n.useContext(V).location;
77
- }
78
- const S = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
79
- function J(e) {
80
- n.useContext(C).static || n.useLayoutEffect(e);
81
- }
82
- function $() {
83
- let {
84
- isDataRoute: e
85
- } = n.useContext(y);
86
- return e ? ue() : G();
87
- }
88
- function G() {
89
- R() || (process.env.NODE_ENV !== "production" ? c(
90
- !1,
91
- // TODO: This error is probably because they somehow have 2 versions of the
92
- // router loaded. We can help them understand how to avoid that.
93
- "useNavigate() may be used only in the context of a <Router> component."
94
- ) : c(!1));
95
- let e = n.useContext(P), {
96
- basename: t,
97
- future: r,
98
- navigator: a
99
- } = n.useContext(C), {
100
- matches: i
101
- } = n.useContext(y), {
102
- pathname: u
103
- } = B(), o = JSON.stringify(F(i, r.v7_relativeSplatPath)), f = n.useRef(!1);
104
- return J(() => {
105
- f.current = !0;
106
- }), n.useCallback(function(d, s) {
107
- if (s === void 0 && (s = {}), process.env.NODE_ENV !== "production" && g(f.current, S), !f.current) return;
108
- if (typeof d == "number") {
109
- a.go(d);
110
- return;
111
- }
112
- let l = U(d, JSON.parse(o), u, s.relative === "path");
113
- e == null && t !== "/" && (l.pathname = l.pathname === "/" ? t : D([t, l.pathname])), (s.replace ? a.replace : a.push)(l, s.state, s);
114
- }, [t, a, o, u, e]);
115
- }
116
- const K = /* @__PURE__ */ n.createContext(null);
117
- function Q(e) {
118
- let t = n.useContext(y).outlet;
119
- return t && /* @__PURE__ */ n.createElement(K.Provider, {
120
- value: e
121
- }, t);
122
- }
123
- function Z(e, t) {
124
- let {
125
- relative: r
126
- } = t === void 0 ? {} : t, {
127
- future: a
128
- } = n.useContext(C), {
129
- matches: i
130
- } = n.useContext(y), {
131
- pathname: u
132
- } = B(), o = JSON.stringify(F(i, a.v7_relativeSplatPath));
133
- return n.useMemo(() => U(e, JSON.parse(o), u, r === "path"), [e, o, u, r]);
134
- }
135
- function fe(e, t, r, a) {
136
- R() || (process.env.NODE_ENV !== "production" ? c(
137
- !1,
138
- // TODO: This error is probably because they somehow have 2 versions of the
139
- // router loaded. We can help them understand how to avoid that.
140
- "useRoutes() may be used only in the context of a <Router> component."
141
- ) : c(!1));
142
- let {
143
- navigator: i
144
- } = n.useContext(C), {
145
- matches: u
146
- } = n.useContext(y), o = u[u.length - 1], f = o ? o.params : {}, m = o ? o.pathname : "/", d = o ? o.pathnameBase : "/", s = o && o.route;
147
- if (process.env.NODE_ENV !== "production") {
148
- let v = s && s.path || "";
149
- T(m, !s || v.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ('"' + m + '" (under <Route path="' + v + '">) but the ') + `parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
150
-
151
- ` + ('Please change the parent <Route path="' + v + '"> to <Route ') + ('path="' + (v === "/" ? "*" : v + "/*") + '">.'));
152
- }
153
- let l = B(), p;
154
- p = l;
155
- let E = p.pathname || "/", N = E;
156
- if (d !== "/") {
157
- let v = d.replace(/^\//, "").split("/");
158
- N = "/" + E.replace(/^\//, "").split("/").slice(v.length).join("/");
159
- }
160
- let h = Y(e, {
161
- pathname: N
162
- });
163
- return process.env.NODE_ENV !== "production" && (process.env.NODE_ENV !== "production" && g(s || h != null, 'No routes matched location "' + p.pathname + p.search + p.hash + '" '), process.env.NODE_ENV !== "production" && g(h == null || h[h.length - 1].route.element !== void 0 || h[h.length - 1].route.Component !== void 0 || h[h.length - 1].route.lazy !== void 0, 'Matched leaf route at location "' + p.pathname + p.search + p.hash + '" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')), oe(h && h.map((v) => Object.assign({}, v, {
164
- params: Object.assign({}, f, v.params),
165
- pathname: D([
166
- d,
167
- // Re-encode pathnames that were decoded inside matchRoutes
168
- i.encodeLocation ? i.encodeLocation(v.pathname).pathname : v.pathname
169
- ]),
170
- pathnameBase: v.pathnameBase === "/" ? d : D([
171
- d,
172
- // Re-encode pathnames that were decoded inside matchRoutes
173
- i.encodeLocation ? i.encodeLocation(v.pathnameBase).pathname : v.pathnameBase
174
- ])
175
- })), u, r, a);
176
- }
177
- function ee() {
178
- let e = se(), t = q(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", i = {
179
- padding: "0.5rem",
180
- backgroundColor: a
181
- }, u = {
182
- padding: "2px 4px",
183
- backgroundColor: a
184
- }, o = null;
185
- return process.env.NODE_ENV !== "production" && (console.error("Error handled by React Router default ErrorBoundary:", e), o = /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ n.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ n.createElement("code", {
186
- style: u
187
- }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ n.createElement("code", {
188
- style: u
189
- }, "errorElement"), " prop on your route."))), /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ n.createElement("h3", {
190
- style: {
191
- fontStyle: "italic"
192
- }
193
- }, t), r ? /* @__PURE__ */ n.createElement("pre", {
194
- style: i
195
- }, r) : null, o);
196
- }
197
- const te = /* @__PURE__ */ n.createElement(ee, null);
198
- class ne extends n.Component {
199
- constructor(t) {
200
- super(t), this.state = {
201
- location: t.location,
202
- revalidation: t.revalidation,
203
- error: t.error
204
- };
205
- }
206
- static getDerivedStateFromError(t) {
207
- return {
208
- error: t
209
- };
210
- }
211
- static getDerivedStateFromProps(t, r) {
212
- return r.location !== t.location || r.revalidation !== "idle" && t.revalidation === "idle" ? {
213
- error: t.error,
214
- location: t.location,
215
- revalidation: t.revalidation
216
- } : {
217
- error: t.error !== void 0 ? t.error : r.error,
218
- location: r.location,
219
- revalidation: t.revalidation || r.revalidation
220
- };
221
- }
222
- componentDidCatch(t, r) {
223
- console.error("React Router caught the following error during render", t, r);
224
- }
225
- render() {
226
- return this.state.error !== void 0 ? /* @__PURE__ */ n.createElement(y.Provider, {
227
- value: this.props.routeContext
228
- }, /* @__PURE__ */ n.createElement(k.Provider, {
229
- value: this.state.error,
230
- children: this.props.component
231
- })) : this.props.children;
232
- }
233
- }
234
- function re(e) {
235
- let {
236
- routeContext: t,
237
- match: r,
238
- children: a
239
- } = e, i = n.useContext(P);
240
- return i && i.static && i.staticContext && (r.route.errorElement || r.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = r.route.id), /* @__PURE__ */ n.createElement(y.Provider, {
241
- value: t
242
- }, a);
243
- }
244
- function oe(e, t, r, a) {
245
- var i;
246
- if (t === void 0 && (t = []), r === void 0 && (r = null), a === void 0 && (a = null), e == null) {
247
- var u;
248
- if ((u = r) != null && u.errors)
249
- e = r.matches;
250
- else
251
- return null;
252
- }
253
- let o = e, f = (i = r) == null ? void 0 : i.errors;
254
- if (f != null) {
255
- let s = o.findIndex((l) => l.route.id && (f == null ? void 0 : f[l.route.id]) !== void 0);
256
- s >= 0 || (process.env.NODE_ENV !== "production" ? c(!1, "Could not find a matching route for errors on route IDs: " + Object.keys(f).join(",")) : c(!1)), o = o.slice(0, Math.min(o.length, s + 1));
257
- }
258
- let m = !1, d = -1;
259
- if (r && a && a.v7_partialHydration)
260
- for (let s = 0; s < o.length; s++) {
261
- let l = o[s];
262
- if ((l.route.HydrateFallback || l.route.hydrateFallbackElement) && (d = s), l.route.id) {
263
- let {
264
- loaderData: p,
265
- errors: E
266
- } = r, N = l.route.loader && p[l.route.id] === void 0 && (!E || E[l.route.id] === void 0);
267
- if (l.route.lazy || N) {
268
- m = !0, d >= 0 ? o = o.slice(0, d + 1) : o = [o[0]];
269
- break;
270
- }
271
- }
272
- }
273
- return o.reduceRight((s, l, p) => {
274
- let E, N = !1, h = null, b = null;
275
- r && (E = f && l.route.id ? f[l.route.id] : void 0, h = l.route.errorElement || te, m && (d < 0 && p === 0 ? (T("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), N = !0, b = null) : d === p && (N = !0, b = l.route.hydrateFallbackElement || null)));
276
- let v = t.concat(o.slice(0, p + 1)), w = () => {
277
- let x;
278
- return E ? x = h : N ? x = b : l.route.Component ? x = /* @__PURE__ */ n.createElement(l.route.Component, null) : l.route.element ? x = l.route.element : x = s, /* @__PURE__ */ n.createElement(re, {
279
- match: l,
280
- routeContext: {
281
- outlet: s,
282
- matches: v,
283
- isDataRoute: r != null
284
- },
285
- children: x
286
- });
287
- };
288
- return r && (l.route.ErrorBoundary || l.route.errorElement || p === 0) ? /* @__PURE__ */ n.createElement(ne, {
289
- location: r.location,
290
- revalidation: r.revalidation,
291
- component: h,
292
- error: E,
293
- children: w(),
294
- routeContext: {
295
- outlet: null,
296
- matches: v,
297
- isDataRoute: !0
298
- }
299
- }) : w();
300
- }, null);
301
- }
302
- var A = /* @__PURE__ */ function(e) {
303
- return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
304
- }(A || {}), O = /* @__PURE__ */ function(e) {
305
- return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
306
- }(O || {});
307
- function I(e) {
308
- return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
309
- }
310
- function ae(e) {
311
- let t = n.useContext(P);
312
- return t || (process.env.NODE_ENV !== "production" ? c(!1, I(e)) : c(!1)), t;
313
- }
314
- function le(e) {
315
- let t = n.useContext(M);
316
- return t || (process.env.NODE_ENV !== "production" ? c(!1, I(e)) : c(!1)), t;
317
- }
318
- function ie(e) {
319
- let t = n.useContext(y);
320
- return t || (process.env.NODE_ENV !== "production" ? c(!1, I(e)) : c(!1)), t;
321
- }
322
- function L(e) {
323
- let t = ie(e), r = t.matches[t.matches.length - 1];
324
- return r.route.id || (process.env.NODE_ENV !== "production" ? c(!1, e + ' can only be used on routes that contain a unique "id"') : c(!1)), r.route.id;
325
- }
326
- function pe() {
327
- return L(O.UseRouteId);
328
- }
329
- function se() {
330
- var e;
331
- let t = n.useContext(k), r = le(O.UseRouteError), a = L(O.UseRouteError);
332
- return t !== void 0 ? t : (e = r.errors) == null ? void 0 : e[a];
333
- }
334
- function ue() {
335
- let {
336
- router: e
337
- } = ae(A.UseNavigateStable), t = L(O.UseNavigateStable), r = n.useRef(!1);
338
- return J(() => {
339
- r.current = !0;
340
- }), n.useCallback(function(i, u) {
341
- u === void 0 && (u = {}), process.env.NODE_ENV !== "production" && g(r.current, S), r.current && (typeof i == "number" ? e.navigate(i) : e.navigate(i, _({
342
- fromRouteId: t
343
- }, u)));
344
- }, [e, t]);
345
- }
346
- const j = {};
347
- function T(e, t, r) {
348
- !t && !j[e] && (j[e] = !0, process.env.NODE_ENV !== "production" && g(!1, r));
349
- }
350
- function he(e) {
351
- let {
352
- to: t,
353
- replace: r,
354
- state: a,
355
- relative: i
356
- } = e;
357
- R() || (process.env.NODE_ENV !== "production" ? c(
358
- !1,
359
- // TODO: This error is probably because they somehow have 2 versions of
360
- // the router loaded. We can help them understand how to avoid that.
361
- "<Navigate> may be used only in the context of a <Router> component."
362
- ) : c(!1));
363
- let {
364
- future: u,
365
- static: o
366
- } = n.useContext(C);
367
- process.env.NODE_ENV !== "production" && g(!o, "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");
368
- let {
369
- matches: f
370
- } = n.useContext(y), {
371
- pathname: m
372
- } = B(), d = $(), s = U(t, F(f, u.v7_relativeSplatPath), m, i === "path"), l = JSON.stringify(s);
373
- return n.useEffect(() => d(JSON.parse(l), {
374
- replace: r,
375
- state: a,
376
- relative: i
377
- }), [d, l, i, r, a]), null;
378
- }
379
- function ve(e) {
380
- return Q(e.context);
381
- }
382
- function me(e) {
383
- let {
384
- basename: t = "/",
385
- children: r = null,
386
- location: a,
387
- navigationType: i = W.Pop,
388
- navigator: u,
389
- static: o = !1,
390
- future: f
391
- } = e;
392
- R() && (process.env.NODE_ENV !== "production" ? c(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : c(!1));
393
- let m = t.replace(/^\/*/, "/"), d = n.useMemo(() => ({
394
- basename: m,
395
- navigator: u,
396
- static: o,
397
- future: _({
398
- v7_relativeSplatPath: !1
399
- }, f)
400
- }), [m, f, u, o]);
401
- typeof a == "string" && (a = z(a));
402
- let {
403
- pathname: s = "/",
404
- search: l = "",
405
- hash: p = "",
406
- state: E = null,
407
- key: N = "default"
408
- } = a, h = n.useMemo(() => {
409
- let b = H(s, m);
410
- return b == null ? null : {
411
- location: {
412
- pathname: b,
413
- search: l,
414
- hash: p,
415
- state: E,
416
- key: N
417
- },
418
- navigationType: i
419
- };
420
- }, [m, s, l, p, E, N, i]);
421
- return process.env.NODE_ENV !== "production" && g(h != null, '<Router basename="' + m + '"> is not able to match the URL ' + ('"' + s + l + p + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), h == null ? null : /* @__PURE__ */ n.createElement(C.Provider, {
422
- value: d
423
- }, /* @__PURE__ */ n.createElement(V.Provider, {
424
- children: r,
425
- value: h
426
- }));
427
- }
428
- new Promise(() => {
429
- });
430
- function Ee(e) {
431
- let t = {
432
- // Note: this check also occurs in createRoutesFromChildren so update
433
- // there if you change this -- please and thank you!
434
- hasErrorBoundary: e.ErrorBoundary != null || e.errorElement != null
435
- };
436
- return e.Component && (process.env.NODE_ENV !== "production" && e.element && process.env.NODE_ENV !== "production" && g(!1, "You should not include both `Component` and `element` on your route - `Component` will be used."), Object.assign(t, {
437
- element: /* @__PURE__ */ n.createElement(e.Component),
438
- Component: void 0
439
- })), e.HydrateFallback && (process.env.NODE_ENV !== "production" && e.hydrateFallbackElement && process.env.NODE_ENV !== "production" && g(!1, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."), Object.assign(t, {
440
- hydrateFallbackElement: /* @__PURE__ */ n.createElement(e.HydrateFallback),
441
- HydrateFallback: void 0
442
- })), e.ErrorBoundary && (process.env.NODE_ENV !== "production" && e.errorElement && process.env.NODE_ENV !== "production" && g(!1, "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."), Object.assign(t, {
443
- errorElement: /* @__PURE__ */ n.createElement(e.ErrorBoundary),
444
- ErrorBoundary: void 0
445
- })), t;
446
- }
447
- export {
448
- M as D,
449
- he as N,
450
- ve as O,
451
- me as R,
452
- se as a,
453
- $ as b,
454
- C as c,
455
- de as d,
456
- Z as e,
457
- P as f,
458
- fe as g,
459
- pe as h,
460
- y as i,
461
- Ee as m,
462
- B as u
463
- };
464
- //# sourceMappingURL=index-fXFJf9Ua.js.map