zudoku 0.37.1 → 0.39.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 (260) hide show
  1. package/dist/app/main.js +2 -0
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/app/tailwind.js +14 -0
  4. package/dist/app/tailwind.js.map +1 -1
  5. package/dist/config/validators/common.d.ts +287 -18
  6. package/dist/config/validators/common.js +2 -0
  7. package/dist/config/validators/common.js.map +1 -1
  8. package/dist/config/validators/validate.d.ts +107 -7
  9. package/dist/lib/authentication/authentication.d.ts +1 -0
  10. package/dist/lib/authentication/providers/clerk.js +19 -0
  11. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  12. package/dist/lib/authentication/providers/openid.d.ts +1 -0
  13. package/dist/lib/authentication/providers/openid.js +5 -0
  14. package/dist/lib/authentication/providers/openid.js.map +1 -1
  15. package/dist/lib/authentication/providers/supabase.js +5 -0
  16. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  17. package/dist/lib/authentication/state.d.ts +0 -26
  18. package/dist/lib/authentication/state.js +1 -16
  19. package/dist/lib/authentication/state.js.map +1 -1
  20. package/dist/lib/components/Heading.d.ts +1 -1
  21. package/dist/lib/components/Layout.js +5 -10
  22. package/dist/lib/components/Layout.js.map +1 -1
  23. package/dist/lib/components/Main.js +3 -1
  24. package/dist/lib/components/Main.js.map +1 -1
  25. package/dist/lib/components/Pagination.d.ts +10 -0
  26. package/dist/lib/components/Pagination.js +10 -0
  27. package/dist/lib/components/Pagination.js.map +1 -0
  28. package/dist/lib/components/TopNavigation.js +18 -2
  29. package/dist/lib/components/TopNavigation.js.map +1 -1
  30. package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
  31. package/dist/lib/components/navigation/SidebarItem.js +7 -3
  32. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  33. package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
  34. package/dist/lib/components/navigation/Toc.js.map +1 -0
  35. package/dist/lib/core/ZudokuContext.d.ts +7 -0
  36. package/dist/lib/core/ZudokuContext.js +8 -3
  37. package/dist/lib/core/ZudokuContext.js.map +1 -1
  38. package/dist/lib/core/plugins.d.ts +1 -1
  39. package/dist/lib/oas/graphql/index.d.ts +2 -1
  40. package/dist/lib/oas/graphql/index.js +74 -14
  41. package/dist/lib/oas/graphql/index.js.map +1 -1
  42. package/dist/lib/oas/parser/dereference/index.js +2 -0
  43. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  44. package/dist/lib/oas/parser/index.d.ts +5 -3
  45. package/dist/lib/oas/parser/index.js +0 -22
  46. package/dist/lib/oas/parser/index.js.map +1 -1
  47. package/dist/lib/plugins/api-catalog/index.js +19 -17
  48. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  49. package/dist/lib/plugins/markdown/MdxPage.js +3 -9
  50. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  51. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  52. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  53. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  54. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  55. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  56. package/dist/lib/plugins/openapi/OperationList.js +29 -9
  57. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  58. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  59. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  60. package/dist/lib/plugins/openapi/ParameterListItem.js +2 -1
  61. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  62. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  63. package/dist/lib/plugins/openapi/SchemaList.js +52 -0
  64. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  65. package/dist/lib/plugins/openapi/Sidecar.js +29 -5
  66. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  67. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  68. package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
  69. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  70. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
  71. package/dist/lib/plugins/openapi/client/useCreateQuery.js +5 -5
  72. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  73. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  74. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  75. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
  76. package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
  77. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  78. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +67 -11
  79. package/dist/lib/plugins/openapi/graphql/graphql.js +34 -5
  80. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  81. package/dist/lib/plugins/openapi/index.js +12 -0
  82. package/dist/lib/plugins/openapi/index.js.map +1 -1
  83. package/dist/lib/plugins/openapi/interfaces.d.ts +26 -0
  84. package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
  85. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  86. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +2 -2
  87. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  88. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  89. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  90. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  91. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  92. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  93. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  94. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  95. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
  96. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  97. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
  98. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +12 -9
  99. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  100. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
  101. package/dist/lib/plugins/openapi/schema/SchemaView.js +30 -52
  102. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  103. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  104. package/dist/lib/plugins/openapi/schema/utils.js +3 -1
  105. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  106. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  107. package/dist/lib/plugins/openapi/state.js +18 -0
  108. package/dist/lib/plugins/openapi/state.js.map +1 -0
  109. package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
  110. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  111. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +13 -4
  112. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  113. package/dist/lib/plugins/search-pagefind/ResultList.js +19 -12
  114. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  115. package/dist/lib/plugins/search-pagefind/get-results.d.ts +8 -1
  116. package/dist/lib/plugins/search-pagefind/get-results.js +9 -4
  117. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  118. package/dist/lib/util/traverse.d.ts +2 -8
  119. package/dist/lib/util/traverse.js.map +1 -1
  120. package/dist/lib/util/types.d.ts +7 -0
  121. package/dist/lib/util/types.js +2 -0
  122. package/dist/lib/util/types.js.map +1 -0
  123. package/dist/lib/util/useOnScreen.d.ts +3 -2
  124. package/dist/lib/util/useOnScreen.js +3 -3
  125. package/dist/lib/util/useOnScreen.js.map +1 -1
  126. package/dist/lib/util/useScrollToAnchor.js +18 -12
  127. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  128. package/dist/vite/api/schema-codegen.js +2 -2
  129. package/dist/vite/api/schema-codegen.js.map +1 -1
  130. package/dist/vite/api/schema-codegen.test.js +5 -0
  131. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  132. package/dist/vite/plugin-api.js +12 -8
  133. package/dist/vite/plugin-api.js.map +1 -1
  134. package/lib/{AuthenticationPlugin-Cij2tPWa.js → AuthenticationPlugin-foqdvvkf.js} +3 -3
  135. package/lib/{AuthenticationPlugin-Cij2tPWa.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
  136. package/lib/{Callout-B2vsR09t.js → Callout-D5frCCJ0.js} +2 -2
  137. package/lib/{Callout-B2vsR09t.js.map → Callout-D5frCCJ0.js.map} +1 -1
  138. package/lib/{Dialog-sbgekbjb.js → Dialog-Dv6WG8RN.js} +5 -5
  139. package/lib/{Dialog-sbgekbjb.js.map → Dialog-Dv6WG8RN.js.map} +1 -1
  140. package/lib/{Markdown-DT5Rrq8_.js → Markdown-aF5FdsNi.js} +1945 -1937
  141. package/lib/{Markdown-DT5Rrq8_.js.map → Markdown-aF5FdsNi.js.map} +1 -1
  142. package/lib/MdxPage-ZW1StNhp.js +83 -0
  143. package/lib/MdxPage-ZW1StNhp.js.map +1 -0
  144. package/lib/{OasProvider-DdEBf2qS.js → OasProvider-Cld9RAMQ.js} +4 -4
  145. package/lib/{OasProvider-DdEBf2qS.js.map → OasProvider-Cld9RAMQ.js.map} +1 -1
  146. package/lib/OperationList-D-OfzJm6.js +5065 -0
  147. package/lib/OperationList-D-OfzJm6.js.map +1 -0
  148. package/lib/Pagination-CYB3nVYx.js +46 -0
  149. package/lib/Pagination-CYB3nVYx.js.map +1 -0
  150. package/lib/SchemaList-Ci1WxRh0.js +148 -0
  151. package/lib/SchemaList-Ci1WxRh0.js.map +1 -0
  152. package/lib/SchemaView-Brn-YxHY.js +345 -0
  153. package/lib/SchemaView-Brn-YxHY.js.map +1 -0
  154. package/lib/{Select-z1Lwl0-J.js → Select-DVFRKf1R.js} +8 -8
  155. package/lib/{Select-z1Lwl0-J.js.map → Select-DVFRKf1R.js.map} +1 -1
  156. package/lib/{SlotletProvider-D8OBnr77.js → SlotletProvider-DXvc0aY6.js} +4 -4
  157. package/lib/{SlotletProvider-D8OBnr77.js.map → SlotletProvider-DXvc0aY6.js.map} +1 -1
  158. package/lib/Toc-YBsgI72s.js +92 -0
  159. package/lib/Toc-YBsgI72s.js.map +1 -0
  160. package/lib/{chunk-HA7DTUK3-ZGg2W6yV.js → chunk-HA7DTUK3-C4gP41vD.js} +5 -5
  161. package/lib/{chunk-HA7DTUK3-ZGg2W6yV.js.map → chunk-HA7DTUK3-C4gP41vD.js.map} +1 -1
  162. package/lib/{createServer-DjgKDpGV.js → createServer-mMau3eV_.js} +1732 -1664
  163. package/lib/{createServer-DjgKDpGV.js.map → createServer-mMau3eV_.js.map} +1 -1
  164. package/lib/hook-CqpVYDqN.js +1483 -0
  165. package/lib/hook-CqpVYDqN.js.map +1 -0
  166. package/lib/index-Bt7MKhZq.js +2514 -0
  167. package/lib/index-Bt7MKhZq.js.map +1 -0
  168. package/lib/{index-DdQSV2RF.js → index-CjPMxpOV.js} +809 -750
  169. package/lib/index-CjPMxpOV.js.map +1 -0
  170. package/lib/{mutation-_Z5C2wFZ.js → mutation-8LjrN7uz.js} +2 -2
  171. package/lib/{mutation-_Z5C2wFZ.js.map → mutation-8LjrN7uz.js.map} +1 -1
  172. package/lib/post-processors/traverse.js.map +1 -1
  173. package/lib/ui/Command.js +1 -1
  174. package/lib/{useExposedProps-BslIn-FE.js → useExposedProps-B9qXJedG.js} +2 -2
  175. package/lib/{useExposedProps-BslIn-FE.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
  176. package/lib/zudoku.auth-auth0.js +1 -1
  177. package/lib/zudoku.auth-clerk.js +59 -41
  178. package/lib/zudoku.auth-clerk.js.map +1 -1
  179. package/lib/zudoku.auth-openid.js +76 -73
  180. package/lib/zudoku.auth-openid.js.map +1 -1
  181. package/lib/zudoku.components.js +31 -1440
  182. package/lib/zudoku.components.js.map +1 -1
  183. package/lib/zudoku.hooks.js +1 -1
  184. package/lib/zudoku.plugin-api-catalog.js +81 -79
  185. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  186. package/lib/zudoku.plugin-api-keys.js +15 -16
  187. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  188. package/lib/zudoku.plugin-custom-pages.js +2 -2
  189. package/lib/zudoku.plugin-markdown.js +1 -1
  190. package/lib/zudoku.plugin-openapi.js +5 -6
  191. package/lib/zudoku.plugin-openapi.js.map +1 -1
  192. package/lib/zudoku.plugin-redirect.js +1 -1
  193. package/lib/zudoku.plugin-search-pagefind.js +133 -98
  194. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  195. package/lib/zudoku.plugins.js.map +1 -1
  196. package/package.json +4 -3
  197. package/src/app/main.tsx +2 -0
  198. package/src/app/tailwind.ts +14 -0
  199. package/src/lib/authentication/authentication.ts +2 -0
  200. package/src/lib/authentication/providers/clerk.tsx +20 -0
  201. package/src/lib/authentication/providers/openid.tsx +6 -0
  202. package/src/lib/authentication/providers/supabase.tsx +6 -0
  203. package/src/lib/authentication/state.ts +1 -35
  204. package/src/lib/components/Layout.tsx +17 -17
  205. package/src/lib/components/Main.tsx +3 -1
  206. package/src/lib/components/Pagination.tsx +47 -0
  207. package/src/lib/components/TopNavigation.tsx +29 -2
  208. package/src/lib/components/navigation/SidebarItem.tsx +10 -4
  209. package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
  210. package/src/lib/core/ZudokuContext.ts +13 -6
  211. package/src/lib/core/plugins.ts +1 -1
  212. package/src/lib/oas/graphql/index.ts +118 -45
  213. package/src/lib/oas/parser/dereference/index.ts +2 -0
  214. package/src/lib/oas/parser/index.ts +7 -29
  215. package/src/lib/plugins/api-catalog/index.tsx +40 -35
  216. package/src/lib/plugins/markdown/MdxPage.tsx +6 -43
  217. package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
  218. package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
  219. package/src/lib/plugins/openapi/OperationList.tsx +37 -16
  220. package/src/lib/plugins/openapi/OperationListItem.tsx +7 -2
  221. package/src/lib/plugins/openapi/ParameterListItem.tsx +2 -0
  222. package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
  223. package/src/lib/plugins/openapi/Sidecar.tsx +36 -7
  224. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
  225. package/src/lib/plugins/openapi/client/useCreateQuery.ts +12 -5
  226. package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
  227. package/src/lib/plugins/openapi/graphql/gql.ts +15 -6
  228. package/src/lib/plugins/openapi/graphql/graphql.ts +104 -15
  229. package/src/lib/plugins/openapi/index.tsx +13 -0
  230. package/src/lib/plugins/openapi/interfaces.ts +29 -0
  231. package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
  232. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +2 -1
  233. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  234. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +1 -2
  235. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
  236. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +20 -21
  237. package/src/lib/plugins/openapi/schema/SchemaView.tsx +69 -141
  238. package/src/lib/plugins/openapi/schema/utils.ts +7 -1
  239. package/src/lib/plugins/openapi/state.ts +36 -0
  240. package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
  241. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +26 -4
  242. package/src/lib/plugins/search-pagefind/ResultList.tsx +59 -47
  243. package/src/lib/plugins/search-pagefind/get-results.tsx +31 -10
  244. package/src/lib/util/traverse.ts +2 -6
  245. package/src/lib/util/types.ts +7 -0
  246. package/src/lib/util/useOnScreen.ts +6 -4
  247. package/src/lib/util/useScrollToAnchor.ts +20 -12
  248. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  249. package/lib/MdxPage-D2rD1vC4.js +0 -200
  250. package/lib/MdxPage-D2rD1vC4.js.map +0 -1
  251. package/lib/OperationList-DT4-gm_S.js +0 -5363
  252. package/lib/OperationList-DT4-gm_S.js.map +0 -1
  253. package/lib/hook-DzQC8PzJ.js +0 -355
  254. package/lib/hook-DzQC8PzJ.js.map +0 -1
  255. package/lib/index-DdQSV2RF.js.map +0 -1
  256. package/lib/index.esm-CltAN0Tf.js +0 -711
  257. package/lib/index.esm-CltAN0Tf.js.map +0 -1
  258. package/lib/joinUrl-BjDooT-T.js +0 -1154
  259. package/lib/joinUrl-BjDooT-T.js.map +0 -1
  260. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
@@ -1,1443 +1,34 @@
1
- var ut = Object.defineProperty;
2
- var ye = (t) => {
3
- throw TypeError(t);
4
- };
5
- var dt = (t, e, s) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
- var j = (t, e, s) => dt(t, typeof e != "symbol" ? e + "" : e, s), ve = (t, e, s) => e.has(t) || ye("Cannot " + s);
7
- var l = (t, e, s) => (ve(t, e, "read from private field"), s ? s.call(t) : e.get(t)), w = (t, e, s) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), v = (t, e, s, n) => (ve(t, e, "write to private field"), n ? n.call(t, s) : e.set(t, s), s);
8
- var W = (t, e, s, n) => ({
9
- set _(a) {
10
- v(t, e, a, s);
11
- },
12
- get _() {
13
- return l(t, e, n);
14
- }
15
- });
16
- import { a as Fe, H as le, M as ht, u as ft } from "./index.esm-CltAN0Tf.js";
17
- import { z as ze, J as mt } from "./index-DwT-v3zK.js";
18
- import { a as gt, u as se, m as pt, O as ce, R as xt, S as yt, g as ue, h as vt, L as de } from "./chunk-HA7DTUK3-ZGg2W6yV.js";
19
- import { e as $, a as O, f as Be, t as bt, j as jt, b as wt, Z as Pt, g as Ct, C as Nt } from "./hook-DzQC8PzJ.js";
20
- import { j as r } from "./jsx-runtime-CYK1ROHF.js";
21
- import { S as He, i as Le, l as Dt, n as P, m as be, o as je, p as T, q as kt, r as St, t as Et, v as Ot, w as we, x as Pe, y as Mt, h as Ce, z as Ne, e as At, u as Ke, d as Tt, A as $e, j as V } from "./joinUrl-BjDooT-T.js";
22
- import { D as qt, a as It, c as Qt, b as Rt, d as Ft } from "./Dialog-sbgekbjb.js";
23
- import { Z as zt } from "./invariant-Caa8-XvF.js";
24
- import { u as Bt, o as Ht } from "./objectEntries-BS7aAgOm.js";
25
- import { E as Ue, S as D, a as Lt, R as Kt } from "./SlotletProvider-D8OBnr77.js";
26
- import { Button as $t } from "./ui/Button.js";
27
- import { Callout as Ut } from "./ui/Callout.js";
28
- import { M as Zt } from "./mutation-_Z5C2wFZ.js";
29
- import * as I from "react";
30
- import Yt, { createContext as he, StrictMode as Ze, useRef as fe, useEffect as Z, useState as U, useCallback as Xt, Suspense as me, memo as Ye, Component as Vt, createElement as De, useMemo as re, useContext as _t } from "react";
31
- import * as Gt from "react-dom";
32
- import { C as ge } from "./ClientOnly-E7hGysn1.js";
33
- import { s as Wt, S as ke, a as Jt, H as es, P as ts, b as ss, V as rs, M as ns } from "./Markdown-DT5Rrq8_.js";
34
- import { B as ie } from "./Button-Fp19CMUr.js";
35
- import { c as E } from "./cn-qaFjX9_3.js";
36
- import { isSearchPlugin as as, isProfileMenuPlugin as is, isNavigationPlugin as os, isEventConsumerPlugin as ls, needsInitialization as cs, isApiIdentityPlugin as us, isMdxProviderPlugin as ds, hasHead as hs } from "./zudoku.plugins.js";
37
- import { DropdownMenu as fs, DropdownMenuTrigger as ms, DropdownMenuContent as gs, DropdownMenuLabel as ps, DropdownMenuSeparator as ne, DropdownMenuSub as xs, DropdownMenuSubTrigger as ys, DropdownMenuPortal as vs, DropdownMenuSubContent as bs, DropdownMenuItem as js } from "./ui/DropdownMenu.js";
38
- import { CircleXIcon as ws, SearchIcon as Ps, SunIcon as Cs, MoonIcon as Ns, MenuIcon as Ds, PanelLeftIcon as ks } from "lucide-react";
39
- import { VisuallyHidden as Xe } from "@radix-ui/react-visually-hidden";
40
- import { D as Ss, a as Es, b as Ve, c as _e, d as M } from "./Drawer-kDAfOq_2.js";
41
- import { a as Os } from "./index-CPNSgwSb.js";
42
- import { S as Ge } from "./Spinner-CE68iCm0.js";
43
- import { C as Ms } from "./CategoryHeading-DpB47wvk.js";
44
- var S, Ie, As = (Ie = class extends He {
45
- constructor(e = {}) {
46
- super();
47
- w(this, S);
48
- this.config = e, v(this, S, /* @__PURE__ */ new Map());
49
- }
50
- build(e, s, n) {
51
- const a = s.queryKey, o = s.queryHash ?? Le(a, s);
52
- let i = this.get(o);
53
- return i || (i = new Dt({
54
- client: e,
55
- queryKey: a,
56
- queryHash: o,
57
- options: e.defaultQueryOptions(s),
58
- state: n,
59
- defaultOptions: e.getQueryDefaults(a)
60
- }), this.add(i)), i;
61
- }
62
- add(e) {
63
- l(this, S).has(e.queryHash) || (l(this, S).set(e.queryHash, e), this.notify({
64
- type: "added",
65
- query: e
66
- }));
67
- }
68
- remove(e) {
69
- const s = l(this, S).get(e.queryHash);
70
- s && (e.destroy(), s === e && l(this, S).delete(e.queryHash), this.notify({ type: "removed", query: e }));
71
- }
72
- clear() {
73
- P.batch(() => {
74
- this.getAll().forEach((e) => {
75
- this.remove(e);
76
- });
77
- });
78
- }
79
- get(e) {
80
- return l(this, S).get(e);
81
- }
82
- getAll() {
83
- return [...l(this, S).values()];
84
- }
85
- find(e) {
86
- const s = { exact: !0, ...e };
87
- return this.getAll().find(
88
- (n) => be(s, n)
89
- );
90
- }
91
- findAll(e = {}) {
92
- const s = this.getAll();
93
- return Object.keys(e).length > 0 ? s.filter((n) => be(e, n)) : s;
94
- }
95
- notify(e) {
96
- P.batch(() => {
97
- this.listeners.forEach((s) => {
98
- s(e);
99
- });
100
- });
101
- }
102
- onFocus() {
103
- P.batch(() => {
104
- this.getAll().forEach((e) => {
105
- e.onFocus();
106
- });
107
- });
108
- }
109
- onOnline() {
110
- P.batch(() => {
111
- this.getAll().forEach((e) => {
112
- e.onOnline();
113
- });
114
- });
115
- }
116
- }, S = new WeakMap(), Ie), q, N, _, Qe, Ts = (Qe = class extends He {
117
- constructor(e = {}) {
118
- super();
119
- w(this, q);
120
- w(this, N);
121
- w(this, _);
122
- this.config = e, v(this, q, /* @__PURE__ */ new Set()), v(this, N, /* @__PURE__ */ new Map()), v(this, _, 0);
123
- }
124
- build(e, s, n) {
125
- const a = new Zt({
126
- mutationCache: this,
127
- mutationId: ++W(this, _)._,
128
- options: e.defaultMutationOptions(s),
129
- state: n
130
- });
131
- return this.add(a), a;
132
- }
133
- add(e) {
134
- l(this, q).add(e);
135
- const s = J(e);
136
- if (typeof s == "string") {
137
- const n = l(this, N).get(s);
138
- n ? n.push(e) : l(this, N).set(s, [e]);
139
- }
140
- this.notify({ type: "added", mutation: e });
141
- }
142
- remove(e) {
143
- if (l(this, q).delete(e)) {
144
- const s = J(e);
145
- if (typeof s == "string") {
146
- const n = l(this, N).get(s);
147
- if (n)
148
- if (n.length > 1) {
149
- const a = n.indexOf(e);
150
- a !== -1 && n.splice(a, 1);
151
- } else n[0] === e && l(this, N).delete(s);
152
- }
153
- }
154
- this.notify({ type: "removed", mutation: e });
155
- }
156
- canRun(e) {
157
- const s = J(e);
158
- if (typeof s == "string") {
159
- const n = l(this, N).get(s), a = n == null ? void 0 : n.find(
160
- (o) => o.state.status === "pending"
161
- );
162
- return !a || a === e;
163
- } else
164
- return !0;
165
- }
166
- runNext(e) {
167
- var n;
168
- const s = J(e);
169
- if (typeof s == "string") {
170
- const a = (n = l(this, N).get(s)) == null ? void 0 : n.find((o) => o !== e && o.state.isPaused);
171
- return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
172
- } else
173
- return Promise.resolve();
174
- }
175
- clear() {
176
- P.batch(() => {
177
- l(this, q).forEach((e) => {
178
- this.notify({ type: "removed", mutation: e });
179
- }), l(this, q).clear(), l(this, N).clear();
180
- });
181
- }
182
- getAll() {
183
- return Array.from(l(this, q));
184
- }
185
- find(e) {
186
- const s = { exact: !0, ...e };
187
- return this.getAll().find(
188
- (n) => je(s, n)
189
- );
190
- }
191
- findAll(e = {}) {
192
- return this.getAll().filter((s) => je(e, s));
193
- }
194
- notify(e) {
195
- P.batch(() => {
196
- this.listeners.forEach((s) => {
197
- s(e);
198
- });
199
- });
200
- }
201
- resumePausedMutations() {
202
- const e = this.getAll().filter((s) => s.state.isPaused);
203
- return P.batch(
204
- () => Promise.all(
205
- e.map((s) => s.continue().catch(T))
206
- )
207
- );
208
- }
209
- }, q = new WeakMap(), N = new WeakMap(), _ = new WeakMap(), Qe);
210
- function J(t) {
211
- var e;
212
- return (e = t.options.scope) == null ? void 0 : e.id;
213
- }
214
- function Se(t) {
215
- return {
216
- onFetch: (e, s) => {
217
- var x, f, h, p, C;
218
- const n = e.options, a = (h = (f = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((p = e.state.data) == null ? void 0 : p.pages) || [], i = ((C = e.state.data) == null ? void 0 : C.pageParams) || [];
219
- let u = { pages: [], pageParams: [] }, d = 0;
220
- const c = async () => {
221
- let m = !1;
222
- const y = (b) => {
223
- Object.defineProperty(b, "signal", {
224
- enumerable: !0,
225
- get: () => (e.signal.aborted ? m = !0 : e.signal.addEventListener("abort", () => {
226
- m = !0;
227
- }), e.signal)
228
- });
229
- }, A = kt(e.options, e.fetchOptions), z = async (b, k, Y) => {
230
- if (m)
231
- return Promise.reject();
232
- if (k == null && b.pages.length)
233
- return Promise.resolve(b);
234
- const G = {
235
- client: e.client,
236
- queryKey: e.queryKey,
237
- pageParam: k,
238
- direction: Y ? "backward" : "forward",
239
- meta: e.options.meta
240
- };
241
- y(G);
242
- const ct = await A(
243
- G
244
- ), { maxPages: pe } = e.options, xe = Y ? St : Et;
245
- return {
246
- pages: xe(b.pages, ct, pe),
247
- pageParams: xe(b.pageParams, k, pe)
248
- };
249
- };
250
- if (a && o.length) {
251
- const b = a === "backward", k = b ? qs : Ee, Y = {
252
- pages: o,
253
- pageParams: i
254
- }, G = k(n, Y);
255
- u = await z(Y, G, b);
256
- } else {
257
- const b = t ?? o.length;
258
- do {
259
- const k = d === 0 ? i[0] ?? n.initialPageParam : Ee(n, u);
260
- if (d > 0 && k == null)
261
- break;
262
- u = await z(u, k), d++;
263
- } while (d < b);
264
- }
265
- return u;
266
- };
267
- e.options.persister ? e.fetchFn = () => {
268
- var m, y;
269
- return (y = (m = e.options).persister) == null ? void 0 : y.call(
270
- m,
271
- c,
272
- {
273
- client: e.client,
274
- queryKey: e.queryKey,
275
- meta: e.options.meta,
276
- signal: e.signal
277
- },
278
- s
279
- );
280
- } : e.fetchFn = c;
281
- }
282
- };
283
- }
284
- function Ee(t, { pages: e, pageParams: s }) {
285
- const n = e.length - 1;
286
- return e.length > 0 ? t.getNextPageParam(
287
- e[n],
288
- e,
289
- s[n],
290
- s
291
- ) : void 0;
292
- }
293
- function qs(t, { pages: e, pageParams: s }) {
294
- var n;
295
- return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, s[0], s) : void 0;
296
- }
297
- var g, Q, R, B, H, F, L, K, Re, Is = (Re = class {
298
- constructor(t = {}) {
299
- w(this, g);
300
- w(this, Q);
301
- w(this, R);
302
- w(this, B);
303
- w(this, H);
304
- w(this, F);
305
- w(this, L);
306
- w(this, K);
307
- v(this, g, t.queryCache || new As()), v(this, Q, t.mutationCache || new Ts()), v(this, R, t.defaultOptions || {}), v(this, B, /* @__PURE__ */ new Map()), v(this, H, /* @__PURE__ */ new Map()), v(this, F, 0);
308
- }
309
- mount() {
310
- W(this, F)._++, l(this, F) === 1 && (v(this, L, Ot.subscribe(async (t) => {
311
- t && (await this.resumePausedMutations(), l(this, g).onFocus());
312
- })), v(this, K, we.subscribe(async (t) => {
313
- t && (await this.resumePausedMutations(), l(this, g).onOnline());
314
- })));
315
- }
316
- unmount() {
317
- var t, e;
318
- W(this, F)._--, l(this, F) === 0 && ((t = l(this, L)) == null || t.call(this), v(this, L, void 0), (e = l(this, K)) == null || e.call(this), v(this, K, void 0));
319
- }
320
- isFetching(t) {
321
- return l(this, g).findAll({ ...t, fetchStatus: "fetching" }).length;
322
- }
323
- isMutating(t) {
324
- return l(this, Q).findAll({ ...t, status: "pending" }).length;
325
- }
326
- getQueryData(t) {
327
- var s;
328
- const e = this.defaultQueryOptions({ queryKey: t });
329
- return (s = l(this, g).get(e.queryHash)) == null ? void 0 : s.state.data;
330
- }
331
- ensureQueryData(t) {
332
- const e = this.defaultQueryOptions(t), s = l(this, g).build(this, e), n = s.state.data;
333
- return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && s.isStaleByTime(Pe(e.staleTime, s)) && this.prefetchQuery(e), Promise.resolve(n));
334
- }
335
- getQueriesData(t) {
336
- return l(this, g).findAll(t).map(({ queryKey: e, state: s }) => {
337
- const n = s.data;
338
- return [e, n];
339
- });
340
- }
341
- setQueryData(t, e, s) {
342
- const n = this.defaultQueryOptions({ queryKey: t }), a = l(this, g).get(
343
- n.queryHash
344
- ), o = a == null ? void 0 : a.state.data, i = Mt(e, o);
345
- if (i !== void 0)
346
- return l(this, g).build(this, n).setData(i, { ...s, manual: !0 });
347
- }
348
- setQueriesData(t, e, s) {
349
- return P.batch(
350
- () => l(this, g).findAll(t).map(({ queryKey: n }) => [
351
- n,
352
- this.setQueryData(n, e, s)
353
- ])
354
- );
355
- }
356
- getQueryState(t) {
357
- var s;
358
- const e = this.defaultQueryOptions({ queryKey: t });
359
- return (s = l(this, g).get(
360
- e.queryHash
361
- )) == null ? void 0 : s.state;
362
- }
363
- removeQueries(t) {
364
- const e = l(this, g);
365
- P.batch(() => {
366
- e.findAll(t).forEach((s) => {
367
- e.remove(s);
368
- });
369
- });
370
- }
371
- resetQueries(t, e) {
372
- const s = l(this, g), n = {
373
- type: "active",
374
- ...t
375
- };
376
- return P.batch(() => (s.findAll(t).forEach((a) => {
377
- a.reset();
378
- }), this.refetchQueries(n, e)));
379
- }
380
- cancelQueries(t, e = {}) {
381
- const s = { revert: !0, ...e }, n = P.batch(
382
- () => l(this, g).findAll(t).map((a) => a.cancel(s))
383
- );
384
- return Promise.all(n).then(T).catch(T);
385
- }
386
- invalidateQueries(t, e = {}) {
387
- return P.batch(() => {
388
- if (l(this, g).findAll(t).forEach((n) => {
389
- n.invalidate();
390
- }), (t == null ? void 0 : t.refetchType) === "none")
391
- return Promise.resolve();
392
- const s = {
393
- ...t,
394
- type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
395
- };
396
- return this.refetchQueries(s, e);
397
- });
398
- }
399
- refetchQueries(t, e = {}) {
400
- const s = {
401
- ...e,
402
- cancelRefetch: e.cancelRefetch ?? !0
403
- }, n = P.batch(
404
- () => l(this, g).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
405
- let o = a.fetch(void 0, s);
406
- return s.throwOnError || (o = o.catch(T)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
407
- })
408
- );
409
- return Promise.all(n).then(T);
410
- }
411
- fetchQuery(t) {
412
- const e = this.defaultQueryOptions(t);
413
- e.retry === void 0 && (e.retry = !1);
414
- const s = l(this, g).build(this, e);
415
- return s.isStaleByTime(
416
- Pe(e.staleTime, s)
417
- ) ? s.fetch(e) : Promise.resolve(s.state.data);
418
- }
419
- prefetchQuery(t) {
420
- return this.fetchQuery(t).then(T).catch(T);
421
- }
422
- fetchInfiniteQuery(t) {
423
- return t.behavior = Se(t.pages), this.fetchQuery(t);
424
- }
425
- prefetchInfiniteQuery(t) {
426
- return this.fetchInfiniteQuery(t).then(T).catch(T);
427
- }
428
- ensureInfiniteQueryData(t) {
429
- return t.behavior = Se(t.pages), this.ensureQueryData(t);
430
- }
431
- resumePausedMutations() {
432
- return we.isOnline() ? l(this, Q).resumePausedMutations() : Promise.resolve();
433
- }
434
- getQueryCache() {
435
- return l(this, g);
436
- }
437
- getMutationCache() {
438
- return l(this, Q);
439
- }
440
- getDefaultOptions() {
441
- return l(this, R);
442
- }
443
- setDefaultOptions(t) {
444
- v(this, R, t);
445
- }
446
- setQueryDefaults(t, e) {
447
- l(this, B).set(Ce(t), {
448
- queryKey: t,
449
- defaultOptions: e
450
- });
451
- }
452
- getQueryDefaults(t) {
453
- const e = [...l(this, B).values()], s = {};
454
- return e.forEach((n) => {
455
- Ne(t, n.queryKey) && Object.assign(s, n.defaultOptions);
456
- }), s;
457
- }
458
- setMutationDefaults(t, e) {
459
- l(this, H).set(Ce(t), {
460
- mutationKey: t,
461
- defaultOptions: e
462
- });
463
- }
464
- getMutationDefaults(t) {
465
- const e = [...l(this, H).values()];
466
- let s = {};
467
- return e.forEach((n) => {
468
- Ne(t, n.mutationKey) && (s = { ...s, ...n.defaultOptions });
469
- }), s;
470
- }
471
- defaultQueryOptions(t) {
472
- if (t._defaulted)
473
- return t;
474
- const e = {
475
- ...l(this, R).queries,
476
- ...this.getQueryDefaults(t.queryKey),
477
- ...t,
478
- _defaulted: !0
479
- };
480
- return e.queryHash || (e.queryHash = Le(
481
- e.queryKey,
482
- e
483
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === At && (e.enabled = !1), e;
484
- }
485
- defaultMutationOptions(t) {
486
- return t != null && t._defaulted ? t : {
487
- ...l(this, R).mutations,
488
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
489
- ...t,
490
- _defaulted: !0
491
- };
492
- }
493
- clear() {
494
- l(this, g).clear(), l(this, Q).clear();
495
- }
496
- }, g = new WeakMap(), Q = new WeakMap(), R = new WeakMap(), B = new WeakMap(), H = new WeakMap(), F = new WeakMap(), L = new WeakMap(), K = new WeakMap(), Re);
497
- function Qs(t) {
498
- return t;
499
- }
500
- function Oe(t, e, s) {
501
- var d, c;
502
- if (typeof e != "object" || e === null)
503
- return;
504
- const n = t.getMutationCache(), a = t.getQueryCache(), o = ((d = s == null ? void 0 : s.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? Qs, i = e.mutations || [], u = e.queries || [];
505
- i.forEach(({ state: x, ...f }) => {
506
- var h, p;
507
- n.build(
508
- t,
509
- {
510
- ...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
511
- ...(p = s == null ? void 0 : s.defaultOptions) == null ? void 0 : p.mutations,
512
- ...f
513
- },
514
- x
515
- );
516
- }), u.forEach(({ queryKey: x, state: f, queryHash: h, meta: p, promise: C }) => {
517
- var A, z;
518
- let m = a.get(h);
519
- const y = f.data === void 0 ? f.data : o(f.data);
520
- if (m) {
521
- if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
522
- const { fetchStatus: b, ...k } = f;
523
- m.setState({
524
- ...k,
525
- data: y
526
- });
527
- }
528
- } else
529
- m = a.build(
530
- t,
531
- {
532
- ...(A = t.getDefaultOptions().hydrate) == null ? void 0 : A.queries,
533
- ...(z = s == null ? void 0 : s.defaultOptions) == null ? void 0 : z.queries,
534
- queryKey: x,
535
- queryHash: h,
536
- meta: p
537
- },
538
- // Reset fetch status to idle to avoid
539
- // query being stuck in fetching state upon hydration
540
- {
541
- ...f,
542
- data: y,
543
- fetchStatus: "idle"
544
- }
545
- );
546
- if (C) {
547
- const b = Promise.resolve(C).then(o);
548
- m.fetch(void 0, { initialPromise: b });
549
- }
550
- });
551
- }
552
- var Me = (t, e) => typeof t == "object" && t !== null && e in t, Rs = ({
553
- children: t,
554
- options: e = {},
555
- state: s,
556
- queryClient: n
557
- }) => {
558
- const a = Ke(n), [o, i] = I.useState(), u = I.useRef(e);
559
- return u.current = e, I.useMemo(() => {
560
- if (s) {
561
- if (typeof s != "object")
562
- return;
563
- const d = a.getQueryCache(), c = s.queries || [], x = [], f = [];
564
- for (const h of c) {
565
- const p = d.get(h.queryHash);
566
- if (!p)
567
- x.push(h);
568
- else {
569
- const C = h.state.dataUpdatedAt > p.state.dataUpdatedAt || // RSC special serialized then-able chunks
570
- Me(h.promise, "status") && Me(p.promise, "status") && h.promise.status !== p.promise.status, m = o == null ? void 0 : o.find(
571
- (y) => y.queryHash === h.queryHash
572
- );
573
- C && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
574
- }
575
- }
576
- x.length > 0 && Oe(a, { queries: x }, u.current), f.length > 0 && i(
577
- (h) => h ? [...h, ...f] : f
578
- );
579
- }
580
- }, [a, o, s]), I.useEffect(() => {
581
- o && (Oe(a, { queries: o }, u.current), i(void 0));
582
- }, [a, o]), t;
583
- };
584
- const Fs = () => {
585
- const t = $(), e = O(), s = gt(), n = se(), a = Bt(n.pathname), { protectedRoutes: o = [] } = e.options, i = o.some(
586
- (u) => pt({ path: u, end: !0 }, n.pathname)
587
- );
588
- if (Tt({
589
- queryKey: ["login-redirect"],
590
- queryFn: async () => {
591
- var u;
592
- return await new Promise((d) => setTimeout(d, 1200)), await ((u = e.authentication) == null ? void 0 : u.signIn({
593
- redirectTo: a.current
594
- })), !0;
595
- },
596
- enabled: typeof window < "u" && i && !t.isPending && !t.isAuthenticated
597
- }), i && !t.isAuthenticated)
598
- return /* @__PURE__ */ r.jsx(
599
- qt,
600
- {
601
- open: !0,
602
- onOpenChange: (u) => {
603
- u || s(-1);
604
- },
605
- children: /* @__PURE__ */ r.jsxs(It, { children: [
606
- /* @__PURE__ */ r.jsx(Qt, { children: /* @__PURE__ */ r.jsx(Rt, { children: "Logging you in..." }) }),
607
- /* @__PURE__ */ r.jsx(Ft, { children: "Please wait while we log you in." })
608
- ] })
609
- }
610
- );
611
- if (i && !t.isAuthEnabled)
612
- throw new zt("Authentication is not enabled", {
613
- title: "Authentication is not enabled",
614
- developerHint: "To use protectedRoutes you need authentication to be enabled"
615
- });
616
- return /* @__PURE__ */ r.jsx(ce, {});
617
- };
618
- function zs({ error: t }) {
619
- return /* @__PURE__ */ r.jsx(Ue, { error: t });
620
- }
621
- /**
622
- * react-router v7.2.0
623
- *
624
- * Copyright (c) Remix Software Inc.
625
- *
626
- * This source code is licensed under the MIT license found in the
627
- * LICENSE.md file in the root directory of this source tree.
628
- *
629
- * @license MIT
630
- */
631
- function Bs(t) {
632
- return /* @__PURE__ */ I.createElement(xt, { flushSync: Gt.flushSync, ...t });
633
- }
634
- const oe = he({ stagger: !1 }), Hs = new Is({
635
- defaultOptions: {
636
- queries: {
637
- staleTime: 1e3 * 60 * 5
638
- }
639
- }
640
- }), Ls = ({
641
- router: t,
642
- hydrate: e = !1
643
- }) => /* @__PURE__ */ r.jsx(Ze, { children: /* @__PURE__ */ r.jsx($e, { client: Hs, children: /* @__PURE__ */ r.jsx(Rs, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ r.jsx(Fe, { children: /* @__PURE__ */ r.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ r.jsx(Bs, { router: t }) }) }) }) }) }), Ks = ({
644
- router: t,
645
- context: e,
646
- queryClient: s,
647
- helmetContext: n
648
- }) => /* @__PURE__ */ r.jsx(Ze, { children: /* @__PURE__ */ r.jsx($e, { client: s, children: /* @__PURE__ */ r.jsx(Fe, { context: n, children: /* @__PURE__ */ r.jsx(yt, { router: t, context: e }) }) }) });
649
- var X = { exports: {} }, $s = X.exports, Ae;
650
- function Us() {
651
- return Ae || (Ae = 1, function(t, e) {
652
- (function(s, n) {
653
- n(e, Yt);
654
- })($s, function(s, n) {
655
- const a = {
656
- delay: 500,
657
- minDuration: 200,
658
- ssr: !0
659
- };
660
- function o() {
661
- const [u, d] = n.useState(!0);
662
- return n.useEffect(() => {
663
- d(!1);
664
- }, []), u;
665
- }
666
- function i(u, d) {
667
- d = Object.assign({}, a, d);
668
- const c = o() && d.ssr, x = c && u ? "DISPLAY" : "IDLE", [f, h] = n.useState(x), p = n.useRef(null);
669
- return n.useEffect(() => {
670
- if (u && (f === "IDLE" || c)) {
671
- clearTimeout(p.current);
672
- const C = c ? 0 : d.delay;
673
- p.current = setTimeout(() => {
674
- if (!u)
675
- return h("IDLE");
676
- p.current = setTimeout(() => {
677
- h("EXPIRE");
678
- }, d.minDuration), h("DISPLAY");
679
- }, C), c || h("DELAY");
680
- }
681
- !u && f !== "DISPLAY" && (clearTimeout(p.current), h("IDLE"));
682
- }, [u, f, d.delay, d.minDuration, c]), n.useEffect(() => () => clearTimeout(p.current), []), f === "DISPLAY" || f === "EXPIRE";
683
- }
684
- s.defaultOptions = a, s.useSpinDelay = i;
685
- });
686
- }(X, X.exports)), X.exports;
687
- }
688
- var Zs = Us();
689
- const Ys = () => {
690
- const t = se(), e = fe(t.pathname);
691
- Z(() => {
692
- const s = e.current !== t.pathname, n = t.hash !== "";
693
- s && !n && window.scrollTo(0, 0), e.current = t.pathname;
694
- }, [t.pathname, t.hash]);
695
- };
696
- function Xs({
697
- className: t,
698
- ...e
699
- }) {
700
- return /* @__PURE__ */ r.jsx(
701
- "div",
702
- {
703
- className: E("animate-pulse rounded-md bg-muted", t),
704
- ...e
705
- }
706
- );
707
- }
708
- const Te = {
709
- info: "bg-blue-500",
710
- note: "bg-gray-500",
711
- tip: "bg-green-600",
712
- caution: "bg-orange-500",
713
- danger: "bg-rose-500"
714
- }, Vs = () => {
715
- const { page: t } = O(), [e, s] = U(!0);
716
- if (!(t != null && t.banner) || !e)
717
- return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
718
- const n = t.banner.color && t.banner.color in Te ? Te[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = n ? {} : { backgroundColor: t.banner.color };
719
- return /* @__PURE__ */ r.jsxs(
720
- "div",
721
- {
722
- className: E(
723
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
724
- n
725
- ),
726
- "data-pagefind-ignore": "all",
727
- style: a,
728
- children: [
729
- /* @__PURE__ */ r.jsx("div", { className: "w-full", children: t.banner.message }),
730
- t.banner.dismissible && /* @__PURE__ */ r.jsx(
731
- "button",
732
- {
733
- type: "button",
734
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
735
- onClick: () => s(!1),
736
- children: /* @__PURE__ */ r.jsx(ws, { size: 16 })
737
- }
738
- )
739
- ]
740
- }
741
- );
742
- }, We = ({ className: t }) => {
743
- const e = O(), [s, n] = U(!1), a = Xt(() => n(!1), []);
744
- Z(() => {
745
- if (s)
746
- return;
747
- function i(u) {
748
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), n(!0));
749
- }
750
- return window.addEventListener("keydown", i), () => {
751
- window.removeEventListener("keydown", i);
752
- };
753
- }, [s, n]);
754
- const o = e.plugins.find(as);
755
- return o ? /* @__PURE__ */ r.jsxs("div", { className: t, children: [
756
- /* @__PURE__ */ r.jsxs(
757
- "button",
758
- {
759
- type: "button",
760
- onClick: () => n(!0),
761
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
762
- children: [
763
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
764
- /* @__PURE__ */ r.jsx(Ps, { size: 14 }),
765
- "Search"
766
- ] }),
767
- /* @__PURE__ */ r.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
768
- ]
769
- }
770
- ),
771
- /* @__PURE__ */ r.jsx(me, { fallback: null, children: o.renderSearch({
772
- isOpen: s,
773
- onClose: a
774
- }) })
775
- ] }) : null;
776
- }, Je = () => {
777
- const { resolvedTheme: t, setTheme: e } = ze();
778
- return /* @__PURE__ */ r.jsx(ge, { fallback: /* @__PURE__ */ r.jsx(ie, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ r.jsxs(
779
- "button",
780
- {
781
- type: "button",
782
- className: "flex rounded-full border p-0.5 gap-0.5 group",
783
- onClick: () => e(t === "dark" ? "light" : "dark"),
784
- "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
785
- children: [
786
- /* @__PURE__ */ r.jsx(
787
- "div",
788
- {
789
- className: E(
790
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
791
- t === "light" && "border-border bg-muted",
792
- t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
793
- ),
794
- children: /* @__PURE__ */ r.jsx(Cs, { size: 16 })
795
- }
796
- ),
797
- /* @__PURE__ */ r.jsx(
798
- "div",
799
- {
800
- className: E(
801
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
802
- t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
803
- t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
804
- ),
805
- children: /* @__PURE__ */ r.jsx(Ns, { size: 16 })
806
- }
807
- )
808
- ]
809
- }
810
- ) });
811
- }, et = (t) => (e) => e.display === "hide" ? !1 : e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", _s = () => {
812
- const { topNavigation: t } = O(), { isAuthenticated: e } = $(), s = t.filter(et(e));
813
- return s.length === 0 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(me, { children: /* @__PURE__ */ r.jsxs("div", { className: "items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm", children: [
814
- /* @__PURE__ */ r.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: s.map((n) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(tt, { ...n }) }, n.id)) }) }),
815
- /* @__PURE__ */ r.jsx(D, { name: "top-navigation-side" })
816
- ] }) });
817
- }, tt = ({
818
- id: t,
819
- label: e,
820
- default: s
821
- }) => {
822
- var c;
823
- const { sidebars: n } = O(), a = n[t], o = Be(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = s ?? (a ? bt(a, (x) => {
824
- if (x.type === "doc") return V(x.id);
825
- }) : V(t)) ?? V(t);
826
- return (
827
- // We don't use isActive here because it has to be inside the sidebar,
828
- // the top nav id doesn't necessarily start with the sidebar id
829
- /* @__PURE__ */ r.jsx(
830
- vt,
831
- {
832
- className: ({ isPending: x }) => Os(
833
- "block lg:py-3.5 font-medium -mb-px",
834
- u || x ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
835
- ),
836
- to: d,
837
- children: e
838
- }
839
- )
840
- );
841
- }, Gs = () => {
842
- const { topNavigation: t } = O(), { isAuthenticated: e } = $(), [s, n] = U(!1);
843
- return /* @__PURE__ */ r.jsxs(
844
- Ss,
845
- {
846
- direction: "right",
847
- open: s,
848
- onOpenChange: (a) => n(a),
849
- children: [
850
- /* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(Es, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Ds, { size: 22 }) }) }),
851
- /* @__PURE__ */ r.jsx(
852
- Ve,
853
- {
854
- className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
855
- "aria-describedby": void 0,
856
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
857
- /* @__PURE__ */ r.jsx(Xe, { children: /* @__PURE__ */ r.jsx(_e, { children: "Navigation" }) }),
858
- /* @__PURE__ */ r.jsx(We, { className: "flex p-4" }),
859
- /* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
860
- /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Je, {}) }),
861
- t.filter(et(e)).map((a) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { type: "button", onClick: () => n(!1), children: /* @__PURE__ */ r.jsx(tt, { ...a }) }) }, a.label))
862
- ] })
863
- ] })
864
- }
865
- )
866
- ]
867
- }
868
- );
869
- }, te = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(xs, { children: [
870
- /* @__PURE__ */ r.jsx(ys, { children: t.label }),
871
- /* @__PURE__ */ r.jsx(vs, { children: /* @__PURE__ */ r.jsx(bs, { children: t.children.map((e, s) => (
872
- // eslint-disable-next-line react/no-array-index-key
873
- /* @__PURE__ */ r.jsx(te, { item: e }, s)
874
- )) }) })
875
- ] }, t.label) : /* @__PURE__ */ r.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ r.jsxs(js, { className: "flex gap-2", children: [
876
- t.icon && /* @__PURE__ */ r.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
877
- t.label
878
- ] }, t.label) }), st = Ye(function() {
879
- const e = $(), { isAuthenticated: s, profile: n, isAuthEnabled: a } = $(), o = O(), { page: i, plugins: u } = o, d = u.filter((c) => is(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
880
- return /* @__PURE__ */ r.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
881
- /* @__PURE__ */ r.jsx(Vs, {}),
882
- /* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl 2xl:border-x mx-auto flex relative items-center justify-between px-4 lg:px-8 h-[--top-header-height]", children: [
883
- /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(de, { to: "/", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
884
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
885
- /* @__PURE__ */ r.jsx(
886
- "img",
887
- {
888
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : V(
889
- "/",
890
- i.logo.src.light
891
- ),
892
- alt: i.logo.alt ?? i.pageTitle,
893
- style: { width: i.logo.width },
894
- className: "h-10 dark:hidden",
895
- loading: "lazy"
896
- }
897
- ),
898
- /* @__PURE__ */ r.jsx(
899
- "img",
900
- {
901
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : V(
902
- "/",
903
- i.logo.src.dark
904
- ),
905
- alt: i.logo.alt ?? i.pageTitle,
906
- style: { width: i.logo.width },
907
- className: "h-10 hidden dark:block",
908
- loading: "lazy"
909
- }
910
- )
911
- ] }),
912
- /* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
913
- ] }) }) }),
914
- /* @__PURE__ */ r.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ r.jsx(We, { className: "pointer-events-auto" }) }),
915
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-8", children: [
916
- /* @__PURE__ */ r.jsx(Gs, {}),
917
- /* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
918
- /* @__PURE__ */ r.jsx(D, { name: "head-navigation-start" }),
919
- a && /* @__PURE__ */ r.jsx(
920
- ge,
921
- {
922
- fallback: /* @__PURE__ */ r.jsx(Xs, { className: "rounded h-5 w-24 mr-4" }),
923
- children: s ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(fs, { modal: !1, children: [
924
- /* @__PURE__ */ r.jsx(ms, { asChild: !0, children: /* @__PURE__ */ r.jsx(ie, { variant: "ghost", children: n != null && n.name ? `${n.name}` : "My Account" }) }),
925
- /* @__PURE__ */ r.jsxs(gs, { className: "w-56", children: [
926
- /* @__PURE__ */ r.jsxs(ps, { children: [
927
- n != null && n.name ? `${n.name}` : "My Account",
928
- (n == null ? void 0 : n.email) && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: n.email })
929
- ] }),
930
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
931
- d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ r.jsx(te, { item: c }, c.label)),
932
- d.filter(
933
- (c) => !c.category || c.category === "middle"
934
- ).length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
935
- d.filter(
936
- (c) => !c.category || c.category === "middle"
937
- ).map((c) => /* @__PURE__ */ r.jsx(te, { item: c }, c.label)),
938
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
939
- d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ r.jsx(te, { item: c }, c.label))
940
- ] })
941
- ] }) : /* @__PURE__ */ r.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
942
- }
943
- ),
944
- /* @__PURE__ */ r.jsx(D, { name: "head-navigation-end" }),
945
- /* @__PURE__ */ r.jsx(Je, {})
946
- ] })
947
- ] })
948
- ] }) }),
949
- /* @__PURE__ */ r.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto 2xl:border-x", children: [
950
- /* @__PURE__ */ r.jsx(D, { name: "top-navigation-before" }),
951
- /* @__PURE__ */ r.jsx(_s, {}),
952
- /* @__PURE__ */ r.jsx(D, { name: "top-navigation-after" })
953
- ] }) })
954
- ] });
955
- }), rt = ({
956
- shouldScaleBackground: t = !0,
957
- ...e
958
- }) => /* @__PURE__ */ r.jsx(
959
- M.Root,
960
- {
961
- shouldScaleBackground: t,
962
- ...e
963
- }
964
- );
965
- rt.displayName = "Drawer";
966
- const Ws = M.Trigger, Js = M.Portal, nt = I.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r.jsx(
967
- M.Overlay,
968
- {
969
- ref: s,
970
- className: E("fixed inset-0 z-50 bg-black/80", t),
971
- ...e
972
- }
973
- ));
974
- nt.displayName = M.Overlay.displayName;
975
- const er = I.forwardRef(
976
- ({ className: t, children: e, hideBar: s = !0, ...n }, a) => /* @__PURE__ */ r.jsxs(Js, { children: [
977
- /* @__PURE__ */ r.jsx(nt, {}),
978
- /* @__PURE__ */ r.jsxs(
979
- M.Content,
980
- {
981
- ref: a,
982
- className: E(
983
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
984
- t
985
- ),
986
- ...n,
987
- children: [
988
- !s && /* @__PURE__ */ r.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
989
- e
990
- ]
991
- }
992
- )
993
- ] })
994
- );
995
- er.displayName = "DrawerContent";
996
- const tr = I.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r.jsx(
997
- M.Title,
998
- {
999
- ref: s,
1000
- className: E(
1001
- "text-lg font-semibold leading-none tracking-tight",
1002
- t
1003
- ),
1004
- ...e
1005
- }
1006
- ));
1007
- tr.displayName = M.Title.displayName;
1008
- const sr = I.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r.jsx(
1009
- M.Description,
1010
- {
1011
- ref: s,
1012
- className: E("text-sm text-muted-foreground", t),
1013
- ...e
1014
- }
1015
- ));
1016
- sr.displayName = M.Description.displayName;
1017
- const at = ({
1018
- children: t,
1019
- className: e,
1020
- ref: s
1021
- }) => /* @__PURE__ */ r.jsx(
1022
- "nav",
1023
- {
1024
- className: E(
1025
- "hidden lg:flex h-full scrollbar flex-col overflow-y-auto shrink-0 text-sm border-r pr-6",
1026
- "sticky top-[--header-height] h-[calc(100vh-var(--header-height))]",
1027
- "-mx-[--padding-nav-item] max-w-[--side-nav-width] pb-6 pt-[--padding-content-top] scroll-pt-2 gap-2",
1028
- e
1029
- ),
1030
- ref: s,
1031
- children: t
1032
- }
1033
- );
1034
- at.displayName = "SidebarWrapper";
1035
- const rr = ({
1036
- onRequestClose: t,
1037
- sidebar: e
1038
- }) => {
1039
- const s = fe(null);
1040
- return Z(() => {
1041
- var a;
1042
- const n = (a = s.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
1043
- Wt(n ?? null);
1044
- }, []), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1045
- /* @__PURE__ */ r.jsxs(at, { ref: s, children: [
1046
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-before-navigation" }),
1047
- e.map((n) => /* @__PURE__ */ r.jsx(ke, { item: n }, n.label)),
1048
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-after-navigation" })
1049
- ] }),
1050
- /* @__PURE__ */ r.jsx(
1051
- Ve,
1052
- {
1053
- className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
1054
- "aria-describedby": void 0,
1055
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
1056
- /* @__PURE__ */ r.jsx(Xe, { children: /* @__PURE__ */ r.jsx(_e, { children: "Sidebar" }) }),
1057
- e.map((n) => /* @__PURE__ */ r.jsx(
1058
- ke,
1059
- {
1060
- item: n,
1061
- onRequestClose: t
1062
- },
1063
- n.label
1064
- ))
1065
- ] })
1066
- }
1067
- )
1068
- ] });
1069
- }, nr = ({ children: t }) => {
1070
- const [e, s] = U(!1), { sidebar: n } = Be(), a = n.length > 0;
1071
- return /* @__PURE__ */ r.jsxs(
1072
- rt,
1073
- {
1074
- direction: "left",
1075
- open: e,
1076
- onOpenChange: (o) => s(o),
1077
- children: [
1078
- a && /* @__PURE__ */ r.jsx(
1079
- rr,
1080
- {
1081
- onRequestClose: () => s(!1),
1082
- sidebar: n
1083
- }
1084
- ),
1085
- a && /* @__PURE__ */ r.jsx("div", { className: "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b", children: /* @__PURE__ */ r.jsxs(Ws, { className: "flex items-center gap-2", children: [
1086
- /* @__PURE__ */ r.jsx(ks, { size: 16, strokeWidth: 1.5 }),
1087
- /* @__PURE__ */ r.jsx("span", { className: "text-sm", children: "Menu" })
1088
- ] }) }),
1089
- /* @__PURE__ */ r.jsxs(
1090
- "main",
1091
- {
1092
- "data-pagefind-body": !0,
1093
- className: E(
1094
- "h-auto dark:border-white/10 translate-x-0",
1095
- a ? "lg:pl-12" : "col-span-full"
1096
- ),
1097
- children: [
1098
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-before-content" }),
1099
- t,
1100
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-after-content" })
1101
- ]
1102
- }
1103
- )
1104
- ]
1105
- }
1106
- );
1107
- }, qe = () => /* @__PURE__ */ r.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ r.jsx(Ge, {}) }), ar = ({ children: t }) => {
1108
- const { meta: e, authentication: s } = O();
1109
- Jt(), Ys(), Z(() => {
1110
- var o;
1111
- (o = s == null ? void 0 : s.onPageLoad) == null || o.call(s);
1112
- }, [s]);
1113
- const n = !!ue().location, a = Zs.useSpinDelay(n, {
1114
- delay: 300,
1115
- minDuration: 500
1116
- });
1117
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1118
- !1,
1119
- /* @__PURE__ */ r.jsxs(le, { titleTemplate: e == null ? void 0 : e.title, children: [
1120
- (e == null ? void 0 : e.description) && /* @__PURE__ */ r.jsx("meta", { name: "description", content: e.description }),
1121
- (e == null ? void 0 : e.favicon) && /* @__PURE__ */ r.jsx("link", { rel: "icon", href: e.favicon })
1122
- ] }),
1123
- /* @__PURE__ */ r.jsx(D, { name: "layout-before-head" }),
1124
- /* @__PURE__ */ r.jsx(st, {}),
1125
- /* @__PURE__ */ r.jsx(D, { name: "layout-after-head" }),
1126
- /* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-1 grid-rows-[min-content_1fr] lg:grid-cols-[var(--side-nav-width)_1fr] max-w-screen-2xl w-full lg:mx-auto px-4 lg:px-8 2xl:border-x", children: a ? /* @__PURE__ */ r.jsx(qe, {}) : /* @__PURE__ */ r.jsx(me, { fallback: /* @__PURE__ */ r.jsx(qe, {}), children: /* @__PURE__ */ r.jsx(nr, { children: t ?? /* @__PURE__ */ r.jsx(ce, {}) }) }) })
1127
- ] });
1128
- }, ir = ({
1129
- title: t = "An error occurred",
1130
- message: e,
1131
- category: s
1132
- }) => /* @__PURE__ */ r.jsxs("div", { className: ts + " h-full pt-[--padding-content-top]", children: [
1133
- s && /* @__PURE__ */ r.jsx(Ms, { children: s }),
1134
- t && /* @__PURE__ */ r.jsx(es, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1135
- /* @__PURE__ */ r.jsx("p", { children: e })
1136
- ] }), or = (t) => {
1137
- switch (t) {
1138
- case 400:
1139
- return {
1140
- title: "Bad Request",
1141
- message: "The request could not be understood by the server due to malformed syntax."
1142
- };
1143
- case 403:
1144
- return {
1145
- title: "Forbidden",
1146
- message: "You don't have permission to access this resource."
1147
- };
1148
- case 404:
1149
- return {
1150
- title: "Not Found",
1151
- message: "The requested resource could not be found."
1152
- };
1153
- case 405:
1154
- return {
1155
- title: "Method Not Allowed",
1156
- message: "The request method is not supported for the requested resource."
1157
- };
1158
- case 414:
1159
- return {
1160
- title: "Request URI Too Large",
1161
- message: "The request URI is too large."
1162
- };
1163
- case 416:
1164
- return {
1165
- title: "Range Not Satisfiable",
1166
- message: "The server cannot satisfy the request range."
1167
- };
1168
- case 500:
1169
- return {
1170
- title: "Internal Server Error",
1171
- message: "An unexpected error occurred while processing your request."
1172
- };
1173
- case 501:
1174
- return {
1175
- title: "Not Implemented",
1176
- message: "The server does not support the functionality required to fulfill the request."
1177
- };
1178
- case 502:
1179
- return {
1180
- title: "Bad Gateway",
1181
- message: "The server received an invalid response from the upstream server."
1182
- };
1183
- case 503:
1184
- return {
1185
- title: "Service Unavailable",
1186
- message: "The server is temporarily unable to handle the request."
1187
- };
1188
- case 504:
1189
- return {
1190
- title: "Gateway Timeout",
1191
- message: "The server did not receive a timely response from the upstream server."
1192
- };
1193
- default:
1194
- return {
1195
- title: "An error occurred",
1196
- message: "Something went wrong while processing your request."
1197
- };
1198
- }
1199
- }, lr = ({ statusCode: t, message: e }) => {
1200
- const s = or(t);
1201
- return /* @__PURE__ */ r.jsx(
1202
- ir,
1203
- {
1204
- title: s.title,
1205
- message: e ?? s.message,
1206
- category: t
1207
- }
1208
- );
1209
- }, cr = he(null), ae = {
1210
- didCatch: !1,
1211
- error: null
1212
- };
1213
- class ur extends Vt {
1214
- constructor(e) {
1215
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ae;
1216
- }
1217
- static getDerivedStateFromError(e) {
1218
- return {
1219
- didCatch: !0,
1220
- error: e
1221
- };
1222
- }
1223
- resetErrorBoundary() {
1224
- const {
1225
- error: e
1226
- } = this.state;
1227
- if (e !== null) {
1228
- for (var s, n, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
1229
- o[i] = arguments[i];
1230
- (s = (n = this.props).onReset) === null || s === void 0 || s.call(n, {
1231
- args: o,
1232
- reason: "imperative-api"
1233
- }), this.setState(ae);
1234
- }
1235
- }
1236
- componentDidCatch(e, s) {
1237
- var n, a;
1238
- (n = (a = this.props).onError) === null || n === void 0 || n.call(a, e, s);
1239
- }
1240
- componentDidUpdate(e, s) {
1241
- const {
1242
- didCatch: n
1243
- } = this.state, {
1244
- resetKeys: a
1245
- } = this.props;
1246
- if (n && s.error !== null && dr(e.resetKeys, a)) {
1247
- var o, i;
1248
- (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1249
- next: a,
1250
- prev: e.resetKeys,
1251
- reason: "keys"
1252
- }), this.setState(ae);
1253
- }
1254
- }
1255
- render() {
1256
- const {
1257
- children: e,
1258
- fallbackRender: s,
1259
- FallbackComponent: n,
1260
- fallback: a
1261
- } = this.props, {
1262
- didCatch: o,
1263
- error: i
1264
- } = this.state;
1265
- let u = e;
1266
- if (o) {
1267
- const d = {
1268
- error: i,
1269
- resetErrorBoundary: this.resetErrorBoundary
1270
- };
1271
- if (typeof s == "function")
1272
- u = s(d);
1273
- else if (n)
1274
- u = De(n, d);
1275
- else if (a !== void 0)
1276
- u = a;
1277
- else
1278
- throw i;
1279
- }
1280
- return De(cr.Provider, {
1281
- value: {
1282
- didCatch: o,
1283
- error: i,
1284
- resetErrorBoundary: this.resetErrorBoundary
1285
- }
1286
- }, u);
1287
- }
1288
- }
1289
- function dr() {
1290
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1291
- return t.length !== e.length || t.some((s, n) => !Object.is(s, e[n]));
1292
- }
1293
- let hr = () => ({
1294
- emit(t, ...e) {
1295
- for (let s = this.events[t] || [], n = 0, a = s.length; n < a; n++)
1296
- s[n](...e);
1297
- },
1298
- events: {},
1299
- on(t, e) {
1300
- var s;
1301
- return ((s = this.events)[t] || (s[t] = [])).push(e), () => {
1302
- var n;
1303
- this.events[t] = (n = this.events[t]) == null ? void 0 : n.filter((a) => e !== a);
1304
- };
1305
- }
1306
- });
1307
- class fr {
1308
- constructor(e, s) {
1309
- j(this, "plugins");
1310
- j(this, "sidebars");
1311
- j(this, "topNavigation");
1312
- j(this, "meta");
1313
- j(this, "page");
1314
- j(this, "authentication");
1315
- j(this, "navigationPlugins");
1316
- j(this, "emitter", hr());
1317
- j(this, "initialize", async () => {
1318
- await Promise.all(
1319
- this.plugins.filter(cs).map((e) => {
1320
- var s;
1321
- return (s = e.initialize) == null ? void 0 : s.call(e, this);
1322
- })
1323
- );
1324
- });
1325
- j(this, "getApiIdentities", async () => (await Promise.all(
1326
- this.plugins.filter(us).map((s) => s.getIdentities(this))
1327
- )).flat());
1328
- j(this, "emitEvent", (e, ...s) => this.emitter.emit(e, ...s));
1329
- j(this, "getPluginSidebar", async (e) => (await Promise.all(
1330
- this.navigationPlugins.map(
1331
- (n) => {
1332
- var a;
1333
- return (a = n.getSidebar) == null ? void 0 : a.call(n, jt(e), this);
1334
- }
1335
- )
1336
- )).flatMap((n) => n ?? []));
1337
- j(this, "signRequest", async (e) => {
1338
- if (!this.authentication)
1339
- throw new Error("No authentication provider configured");
1340
- const s = await this.authentication.getAccessToken();
1341
- return e.headers.set("Authorization", `Bearer ${s}`), e;
1342
- });
1343
- this.options = e, this.queryClient = s, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(os), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((n) => {
1344
- ls(n) && Ht(n.events).forEach(([a, o]) => {
1345
- this.emitter.on(a, o);
1346
- });
1347
- });
1348
- }
1349
- addEventListener(e, s) {
1350
- return this.emitter.on(e, s);
1351
- }
1352
- }
1353
- function mr({ error: t, resetErrorBoundary: e }) {
1354
- return /* @__PURE__ */ r.jsx(Ue, { error: t });
1355
- }
1356
- const ee = globalThis;
1357
- (!ee.requestIdleCallback || !ee.cancelIdleCallback) && (ee.requestIdleCallback = (t) => setTimeout(t, 1), ee.cancelIdleCallback = clearTimeout);
1358
- const it = {
1359
- Header: st
1360
- }, gr = he(it), pr = gr.Provider, xr = () => {
1361
- const t = se(), e = O(), s = fe(void 0);
1362
- return Z(() => {
1363
- e.emitEvent("location", {
1364
- from: s.current,
1365
- to: t
1366
- }), s.current = t;
1367
- }, [e, t]), null;
1368
- }, yr = ({
1369
- children: t,
1370
- context: e
1371
- }) => (wt({
1372
- queryFn: async () => (await e.initialize(), !0),
1373
- queryKey: ["zudoku-initialize"]
1374
- }), /* @__PURE__ */ r.jsx(Pt.Provider, { value: e, children: t })), ot = Ye(
1375
- ({ children: t, ...e }) => {
1376
- var p, C;
1377
- const s = re(
1378
- () => ({ ...it, ...e.overrides }),
1379
- [e.overrides]
1380
- ), n = se(), a = re(() => {
1381
- var y;
1382
- return {
1383
- ...(e.plugins ?? []).filter(ds).flatMap(
1384
- (A) => A.getMdxComponents ? [A.getMdxComponents()] : []
1385
- ).reduce(
1386
- (A, z) => ({ ...A, ...z }),
1387
- {}
1388
- ),
1389
- ...ss,
1390
- ...(y = e.mdx) == null ? void 0 : y.components
1391
- };
1392
- }, [(p = e.mdx) == null ? void 0 : p.components, e.plugins]), { stagger: o } = _t(oe), [i, u] = U(!1), d = re(
1393
- () => i ? { stagger: !0 } : { stagger: o },
1394
- [o, i]
1395
- ), c = ue(), x = Ke();
1396
- Z(() => {
1397
- i || u(!0);
1398
- }, [i, c.location]);
1399
- const [f] = U(
1400
- () => new fr(e, x)
1401
- ), h = (C = e.plugins) == null ? void 0 : C.flatMap(
1402
- (m) => {
1403
- var y;
1404
- return hs(m) ? ((y = m.getHead) == null ? void 0 : y.call(m, { location: n })) ?? [] : [];
1405
- }
1406
- ).map((m, y) => /* @__PURE__ */ r.jsx(le, { children: m }, y));
1407
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1408
- h,
1409
- /* @__PURE__ */ r.jsx(oe.Provider, { value: d, children: /* @__PURE__ */ r.jsxs(yr, { context: f, children: [
1410
- /* @__PURE__ */ r.jsx(xr, {}),
1411
- /* @__PURE__ */ r.jsx(ht, { components: a, children: /* @__PURE__ */ r.jsx(mt, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx(pr, { value: s, children: /* @__PURE__ */ r.jsx(Lt, { slotlets: e.slotlets, children: /* @__PURE__ */ r.jsx(rs, { children: t ?? /* @__PURE__ */ r.jsx(ce, {}) }) }) }) }) })
1412
- ] }) })
1413
- ] });
1414
- }
1415
- );
1416
- ot.displayName = "ZudokoInner";
1417
- const lt = (t) => /* @__PURE__ */ r.jsx(ur, { FallbackComponent: mr, children: /* @__PURE__ */ r.jsx(ot, { ...t }) });
1418
- lt.displayName = "Zudoku";
1419
- const Zr = ft, Yr = ar, Xr = Kt, Vr = zs, _r = Ls, Gr = Ks, Wr = Fs, Jr = le, en = O, tn = $, sn = Ct, rn = Nt, nn = lt, an = lr, on = Ut, ln = ns, cn = Ge, un = ge, dn = $t, hn = de, fn = ze;
1
+ import { e as C, f as d, B as S, C as k, k as l, m as h, h as B, d as E, L as c, M as L, g as M, R, S as Z, l as f, j as g, Z as y, a as A, i as H, c as b, n as j, b as v } from "./index-Bt7MKhZq.js";
2
+ import "./index-DwT-v3zK.js";
3
+ import "./chunk-HA7DTUK3-C4gP41vD.js";
4
+ import "./hook-CqpVYDqN.js";
5
+ import "./SlotletProvider-DXvc0aY6.js";
6
+ import "./ui/Button.js";
7
+ import "./ui/Callout.js";
8
+ import "./ClientOnly-E7hGysn1.js";
9
+ import "./Markdown-aF5FdsNi.js";
10
+ import "./Spinner-CE68iCm0.js";
1420
11
  export {
1421
- _r as Bootstrap,
1422
- Gr as BootstrapStatic,
1423
- dn as Button,
1424
- rn as CACHE_KEYS,
1425
- on as Callout,
1426
- un as ClientOnly,
1427
- Jr as Head,
1428
- Yr as Layout,
1429
- hn as Link,
1430
- ln as Markdown,
1431
- Wr as RouteGuard,
1432
- Xr as RouterError,
1433
- Vr as ServerError,
1434
- cn as Spinner,
1435
- an as StatusPage,
1436
- nn as Zudoku,
1437
- tn as useAuth,
1438
- sn as useCache,
1439
- Zr as useMDXComponents,
1440
- fn as useTheme,
1441
- en as useZudoku
12
+ C as Bootstrap,
13
+ d as BootstrapStatic,
14
+ S as Button,
15
+ k as CACHE_KEYS,
16
+ l as Callout,
17
+ h as ClientOnly,
18
+ B as Head,
19
+ E as Layout,
20
+ c as Link,
21
+ L as Markdown,
22
+ M as RouteGuard,
23
+ R as RouterError,
24
+ Z as ServerError,
25
+ f as Spinner,
26
+ g as StatusPage,
27
+ y as Zudoku,
28
+ A as useAuth,
29
+ H as useCache,
30
+ b as useMDXComponents,
31
+ j as useTheme,
32
+ v as useZudoku
1442
33
  };
1443
34
  //# sourceMappingURL=zudoku.components.js.map