zudoku 0.26.0 → 0.27.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 (300) hide show
  1. package/dist/app/main.d.ts +1 -1
  2. package/dist/app/main.js +19 -7
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/config/config.d.ts +1 -0
  5. package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
  6. package/dist/config/validators/common.d.ts +78 -0
  7. package/dist/config/validators/common.js +6 -0
  8. package/dist/config/validators/common.js.map +1 -1
  9. package/dist/config/validators/validate.d.ts +34 -0
  10. package/dist/lib/authentication/providers/auth0.js +1 -1
  11. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  12. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  13. package/dist/lib/authentication/providers/openid.js +10 -6
  14. package/dist/lib/authentication/providers/openid.js.map +1 -1
  15. package/dist/lib/components/AnchorLink.js +5 -2
  16. package/dist/lib/components/AnchorLink.js.map +1 -1
  17. package/dist/lib/components/Autocomplete.d.ts +12 -0
  18. package/dist/lib/components/Autocomplete.js +47 -0
  19. package/dist/lib/components/Autocomplete.js.map +1 -0
  20. package/dist/lib/components/Header.js +4 -4
  21. package/dist/lib/components/Header.js.map +1 -1
  22. package/dist/lib/components/Heading.d.ts +1 -1
  23. package/dist/lib/components/Markdown.d.ts +2 -2
  24. package/dist/lib/components/Markdown.js +3 -1
  25. package/dist/lib/components/Markdown.js.map +1 -1
  26. package/dist/lib/components/StatusPage.d.ts +7 -0
  27. package/dist/lib/components/StatusPage.js +71 -0
  28. package/dist/lib/components/StatusPage.js.map +1 -0
  29. package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
  30. package/dist/lib/components/SyntaxHighlight.js +2 -2
  31. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  32. package/dist/lib/components/ThemeSwitch.js +4 -4
  33. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  34. package/dist/lib/components/cache.d.ts +6 -0
  35. package/dist/lib/components/cache.js +13 -0
  36. package/dist/lib/components/cache.js.map +1 -0
  37. package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
  38. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  39. package/dist/lib/components/context/ZudokuContext.js +2 -1
  40. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  41. package/dist/lib/components/index.d.ts +9 -2
  42. package/dist/lib/components/index.js +5 -2
  43. package/dist/lib/components/index.js.map +1 -1
  44. package/dist/lib/core/RouteGuard.d.ts +1 -0
  45. package/dist/lib/core/RouteGuard.js +28 -0
  46. package/dist/lib/core/RouteGuard.js.map +1 -0
  47. package/dist/lib/core/ZudokuContext.d.ts +4 -2
  48. package/dist/lib/core/ZudokuContext.js +9 -7
  49. package/dist/lib/core/ZudokuContext.js.map +1 -1
  50. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  51. package/dist/lib/oas/graphql/circular.js +27 -0
  52. package/dist/lib/oas/graphql/circular.js.map +1 -0
  53. package/dist/lib/oas/graphql/index.js +5 -6
  54. package/dist/lib/oas/graphql/index.js.map +1 -1
  55. package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
  56. package/dist/lib/oas/parser/dereference/index.js +1 -1
  57. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  58. package/dist/lib/plugins/markdown/MdxPage.js +8 -2
  59. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  60. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  61. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  62. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  63. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  64. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
  65. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -2
  66. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  67. package/dist/lib/plugins/openapi/Sidecar.js +3 -3
  68. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  69. package/dist/lib/plugins/openapi/index.js +4 -11
  70. package/dist/lib/plugins/openapi/index.js.map +1 -1
  71. package/dist/lib/plugins/openapi/interfaces.d.ts +7 -2
  72. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  73. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  74. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  75. package/dist/lib/plugins/openapi/playground/Headers.js +67 -4
  76. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +5 -0
  78. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +4 -0
  79. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  80. package/dist/lib/plugins/openapi/playground/PathParams.js +4 -12
  81. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  82. package/dist/lib/plugins/openapi/playground/Playground.d.ts +18 -1
  83. package/dist/lib/plugins/openapi/playground/Playground.js +53 -40
  84. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  85. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  86. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  87. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -30
  88. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  89. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  90. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  91. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  92. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  93. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  94. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  95. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  96. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  98. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
  99. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
  100. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  101. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  102. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  103. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  104. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  105. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  106. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  107. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
  108. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
  109. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
  110. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
  111. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
  112. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  113. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  114. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  115. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  116. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  117. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  118. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +1 -1
  119. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  120. package/dist/lib/ui/Command.d.ts +9 -1
  121. package/dist/lib/ui/Command.js +5 -1
  122. package/dist/lib/ui/Command.js.map +1 -1
  123. package/dist/lib/ui/Select.js +2 -2
  124. package/dist/lib/ui/Select.js.map +1 -1
  125. package/dist/lib/util/MdxComponents.js +2 -2
  126. package/dist/lib/util/MdxComponents.js.map +1 -1
  127. package/dist/lib/util/joinUrl.d.ts +1 -0
  128. package/dist/lib/util/joinUrl.js +40 -0
  129. package/dist/lib/util/joinUrl.js.map +1 -0
  130. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  131. package/dist/lib/util/useScrollToAnchor.js +26 -15
  132. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  133. package/dist/vite/build.js +10 -10
  134. package/dist/vite/build.js.map +1 -1
  135. package/dist/vite/config.js +4 -1
  136. package/dist/vite/config.js.map +1 -1
  137. package/dist/vite/dev-server.js +4 -1
  138. package/dist/vite/dev-server.js.map +1 -1
  139. package/dist/vite/plugin-api.d.ts +1 -1
  140. package/dist/vite/plugin-api.js +31 -7
  141. package/dist/vite/plugin-api.js.map +1 -1
  142. package/dist/vite/plugin-auth.js +4 -1
  143. package/dist/vite/plugin-auth.js.map +1 -1
  144. package/dist/vite/plugin-mdx.js +9 -4
  145. package/dist/vite/plugin-mdx.js.map +1 -1
  146. package/dist/vite/prerender.d.ts +2 -2
  147. package/dist/vite/prerender.js +5 -4
  148. package/dist/vite/prerender.js.map +1 -1
  149. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  150. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  151. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  152. package/dist/zuplo/env.d.ts +1 -0
  153. package/dist/zuplo/env.js +3 -0
  154. package/dist/zuplo/env.js.map +1 -1
  155. package/dist/zuplo/policy-types.d.ts +33 -0
  156. package/dist/zuplo/policy-types.js +8 -0
  157. package/dist/zuplo/policy-types.js.map +1 -0
  158. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  159. package/dist/zuplo/with-zuplo-processors.js +26 -0
  160. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  161. package/dist/zuplo/with-zuplo.d.ts +1 -1
  162. package/dist/zuplo/with-zuplo.js +7 -26
  163. package/dist/zuplo/with-zuplo.js.map +1 -1
  164. package/lib/{AuthenticationPlugin-DNXBcsVN.js → AuthenticationPlugin-CO_YCd2x.js} +3 -3
  165. package/lib/{AuthenticationPlugin-DNXBcsVN.js.map → AuthenticationPlugin-CO_YCd2x.js.map} +1 -1
  166. package/lib/{Markdown-BrfrjEk_.js → Markdown-B8o9Qz4q.js} +1197 -1186
  167. package/lib/{Markdown-BrfrjEk_.js.map → Markdown-B8o9Qz4q.js.map} +1 -1
  168. package/lib/{MdxPage-LNZLj_A5.js → MdxPage-BxRt3Ly7.js} +63 -58
  169. package/lib/MdxPage-BxRt3Ly7.js.map +1 -0
  170. package/lib/OperationList-DH-zIgtq.js +5160 -0
  171. package/lib/OperationList-DH-zIgtq.js.map +1 -0
  172. package/lib/{Route-Pzk6qwIk.js → Route-DJ0ZlVq1.js} +3 -3
  173. package/lib/{Route-Pzk6qwIk.js.map → Route-DJ0ZlVq1.js.map} +1 -1
  174. package/lib/{Select-DkOpAG0c.js → Select-B7UXR0SB.js} +61 -61
  175. package/lib/Select-B7UXR0SB.js.map +1 -0
  176. package/lib/{SlotletProvider-DPbx9KdU.js → SlotletProvider-CtIp8rP3.js} +4 -4
  177. package/lib/{SlotletProvider-DPbx9KdU.js.map → SlotletProvider-CtIp8rP3.js.map} +1 -1
  178. package/lib/{Button-oroWHXAy.js → Spinner-BlzrEEk1.js} +15 -12
  179. package/lib/Spinner-BlzrEEk1.js.map +1 -0
  180. package/lib/{SyntaxHighlight-CJCSPG1F.js → SyntaxHighlight-C1w1QPdY.js} +300 -295
  181. package/lib/{SyntaxHighlight-CJCSPG1F.js.map → SyntaxHighlight-C1w1QPdY.js.map} +1 -1
  182. package/lib/{ZudokuContext-D3ayHjP-.js → ZudokuContext-8jts0fF3.js} +259 -248
  183. package/lib/ZudokuContext-8jts0fF3.js.map +1 -0
  184. package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js → chunk-SYFQ2XB5-BPvC-soB.js} +6 -5
  185. package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js.map → chunk-SYFQ2XB5-BPvC-soB.js.map} +1 -1
  186. package/lib/circular-Dgpd6AN-.js +15397 -0
  187. package/lib/circular-Dgpd6AN-.js.map +1 -0
  188. package/lib/{createServer-BcaswoFO.js → createServer-BV0tHzLK.js} +3450 -5577
  189. package/lib/createServer-BV0tHzLK.js.map +1 -0
  190. package/lib/{hook-DUyACbIK.js → hook-BG02esyv.js} +2 -2
  191. package/lib/{hook-DUyACbIK.js.map → hook-BG02esyv.js.map} +1 -1
  192. package/lib/index-B7mqiOei.js +509 -0
  193. package/lib/index-B7mqiOei.js.map +1 -0
  194. package/lib/index-DmqsUPcm.js +1915 -0
  195. package/lib/index-DmqsUPcm.js.map +1 -0
  196. package/lib/joinUrl-BTy9bvoK.js +20 -0
  197. package/lib/joinUrl-BTy9bvoK.js.map +1 -0
  198. package/lib/post-processors/removeExtensions.js +7 -7
  199. package/lib/post-processors/removeExtensions.js.map +1 -1
  200. package/lib/post-processors/removeParameters.js +48 -0
  201. package/lib/post-processors/removeParameters.js.map +1 -0
  202. package/lib/ui/ActionButton.js +10 -11
  203. package/lib/ui/ActionButton.js.map +1 -1
  204. package/lib/ui/Command.js +125 -13
  205. package/lib/ui/Command.js.map +1 -1
  206. package/lib/ui/Select.js +2 -2
  207. package/lib/ui/Select.js.map +1 -1
  208. package/lib/{useExposedProps-BBHR7aLM.js → useExposedProps-BLKFBylA.js} +2 -2
  209. package/lib/{useExposedProps-BBHR7aLM.js.map → useExposedProps-BLKFBylA.js.map} +1 -1
  210. package/lib/useScrollToAnchor-Bl6mz9_x.js +288 -0
  211. package/lib/useScrollToAnchor-Bl6mz9_x.js.map +1 -0
  212. package/lib/zudoku.auth-auth0.js +7 -9
  213. package/lib/zudoku.auth-auth0.js.map +1 -1
  214. package/lib/zudoku.auth-clerk.js +1 -1
  215. package/lib/zudoku.auth-openid.js +223 -219
  216. package/lib/zudoku.auth-openid.js.map +1 -1
  217. package/lib/zudoku.components.js +754 -992
  218. package/lib/zudoku.components.js.map +1 -1
  219. package/lib/zudoku.plugin-api-catalog.js +3 -3
  220. package/lib/zudoku.plugin-api-keys.js +5 -5
  221. package/lib/zudoku.plugin-custom-pages.js +2 -2
  222. package/lib/zudoku.plugin-markdown.js +1 -1
  223. package/lib/zudoku.plugin-openapi.js +4 -4
  224. package/lib/zudoku.plugin-redirect.js +1 -1
  225. package/package.json +2 -2
  226. package/src/app/main.css +50 -50
  227. package/src/app/main.tsx +26 -7
  228. package/src/lib/authentication/providers/auth0.tsx +1 -4
  229. package/src/lib/authentication/providers/openid.tsx +12 -5
  230. package/src/lib/components/AnchorLink.tsx +5 -2
  231. package/src/lib/components/Autocomplete.tsx +111 -0
  232. package/src/lib/components/Header.tsx +4 -4
  233. package/src/lib/components/Markdown.tsx +14 -15
  234. package/src/lib/components/StatusPage.tsx +91 -0
  235. package/src/lib/components/SyntaxHighlight.tsx +14 -0
  236. package/src/lib/components/ThemeSwitch.tsx +14 -15
  237. package/src/lib/components/cache.ts +15 -0
  238. package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
  239. package/src/lib/components/context/ZudokuContext.ts +3 -1
  240. package/src/lib/components/index.ts +9 -2
  241. package/src/lib/core/RouteGuard.tsx +35 -0
  242. package/src/lib/core/ZudokuContext.ts +9 -8
  243. package/src/lib/oas/graphql/circular.ts +29 -0
  244. package/src/lib/oas/graphql/index.ts +9 -9
  245. package/src/lib/oas/parser/dereference/index.ts +1 -2
  246. package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
  247. package/src/lib/plugins/openapi/OperationListItem.tsx +0 -2
  248. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -0
  249. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +5 -0
  250. package/src/lib/plugins/openapi/Sidecar.tsx +4 -2
  251. package/src/lib/plugins/openapi/index.tsx +9 -15
  252. package/src/lib/plugins/openapi/interfaces.ts +10 -2
  253. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
  254. package/src/lib/plugins/openapi/playground/Headers.tsx +136 -39
  255. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +8 -0
  256. package/src/lib/plugins/openapi/playground/PathParams.tsx +34 -74
  257. package/src/lib/plugins/openapi/playground/Playground.tsx +219 -177
  258. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  259. package/src/lib/plugins/openapi/playground/QueryParams.tsx +90 -122
  260. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  261. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  262. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
  263. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
  264. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  265. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  266. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
  267. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
  268. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  269. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  270. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +1 -1
  271. package/src/lib/ui/Command.tsx +20 -0
  272. package/src/lib/ui/Select.tsx +1 -1
  273. package/src/lib/util/MdxComponents.tsx +2 -1
  274. package/src/lib/util/joinUrl.ts +57 -0
  275. package/src/lib/util/useScrollToAnchor.ts +32 -15
  276. package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
  277. package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
  278. package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
  279. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  280. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  281. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  282. package/lib/AnchorLink-_Vu02ceN.js +0 -34
  283. package/lib/AnchorLink-_Vu02ceN.js.map +0 -1
  284. package/lib/Button-oroWHXAy.js.map +0 -1
  285. package/lib/Command-D5DE0DD7.js +0 -611
  286. package/lib/Command-D5DE0DD7.js.map +0 -1
  287. package/lib/MdxPage-LNZLj_A5.js.map +0 -1
  288. package/lib/OperationList-PCwzTp1r.js +0 -5144
  289. package/lib/OperationList-PCwzTp1r.js.map +0 -1
  290. package/lib/Select-DkOpAG0c.js.map +0 -1
  291. package/lib/Spinner-C5gHXrVz.js +0 -7
  292. package/lib/Spinner-C5gHXrVz.js.map +0 -1
  293. package/lib/ZudokuContext-D3ayHjP-.js.map +0 -1
  294. package/lib/createServer-BcaswoFO.js.map +0 -1
  295. package/lib/index-CaILD1AV.js +0 -1292
  296. package/lib/index-CaILD1AV.js.map +0 -1
  297. package/lib/index-TaRXY2w1.js +0 -43
  298. package/lib/index-TaRXY2w1.js.map +0 -1
  299. package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
  300. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
@@ -1,611 +0,0 @@
1
- import { j as w } from "./jsx-runtime-Bdg6XQ1m.js";
2
- import * as C from "@radix-ui/react-dialog";
3
- import * as a from "react";
4
- import _e from "react";
5
- import { Primitive as M } from "@radix-ui/react-primitive";
6
- import { useId as F } from "@radix-ui/react-id";
7
- import { X as Te, Search as Me } from "lucide-react";
8
- import { c as L } from "./cn-qaFjX9_3.js";
9
- const $e = C.Root, Nt = C.Trigger, Ve = C.Portal, ke = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
10
- C.Overlay,
11
- {
12
- ref: t,
13
- className: L(
14
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15
- e
16
- ),
17
- ...r
18
- }
19
- ));
20
- ke.displayName = C.Overlay.displayName;
21
- const Re = a.forwardRef(({ className: e, children: r, ...t }, f) => /* @__PURE__ */ w.jsxs(Ve, { children: [
22
- /* @__PURE__ */ w.jsx(ke, {}),
23
- /* @__PURE__ */ w.jsxs(
24
- C.Content,
25
- {
26
- ref: f,
27
- className: L(
28
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
29
- e
30
- ),
31
- ...t,
32
- children: [
33
- r,
34
- /* @__PURE__ */ w.jsxs(C.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
35
- /* @__PURE__ */ w.jsx(Te, { className: "h-4 w-4" }),
36
- /* @__PURE__ */ w.jsx("span", { className: "sr-only", children: "Close" })
37
- ] })
38
- ]
39
- }
40
- )
41
- ] }));
42
- Re.displayName = C.Content.displayName;
43
- const Ke = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
44
- C.Title,
45
- {
46
- ref: t,
47
- className: L(
48
- "text-lg font-semibold leading-none tracking-tight",
49
- e
50
- ),
51
- ...r
52
- }
53
- ));
54
- Ke.displayName = C.Title.displayName;
55
- const qe = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
56
- C.Description,
57
- {
58
- ref: t,
59
- className: L("text-sm text-muted-foreground", e),
60
- ...r
61
- }
62
- ));
63
- qe.displayName = C.Description.displayName;
64
- var ye = 1, Ue = 0.9, Ge = 0.8, Pe = 0.17, ae = 0.1, le = 0.999, Fe = 0.9999, Be = 0.99, He = /[\\\/_+.#"@\[\(\{&]/, ze = /[\\\/_+.#"@\[\(\{&]/g, We = /[\s-]/, Ce = /[\s-]/g;
65
- function de(e, r, t, f, l, i, c) {
66
- if (i === r.length) return l === e.length ? ye : Be;
67
- var v = `${l},${i}`;
68
- if (c[v] !== void 0) return c[v];
69
- for (var h = f.charAt(i), m = t.indexOf(h, l), d = 0, u, y, x, N; m >= 0; ) u = de(e, r, t, f, m + 1, i + 1, c), u > d && (m === l ? u *= ye : He.test(e.charAt(m - 1)) ? (u *= Ge, x = e.slice(l, m - 1).match(ze), x && l > 0 && (u *= Math.pow(le, x.length))) : We.test(e.charAt(m - 1)) ? (u *= Ue, N = e.slice(l, m - 1).match(Ce), N && l > 0 && (u *= Math.pow(le, N.length))) : (u *= Pe, l > 0 && (u *= Math.pow(le, m - l))), e.charAt(m) !== r.charAt(i) && (u *= Fe)), (u < ae && t.charAt(m - 1) === f.charAt(i + 1) || f.charAt(i + 1) === f.charAt(i) && t.charAt(m - 1) !== f.charAt(i)) && (y = de(e, r, t, f, m + 1, i + 2, c), y * ae > u && (u = y * ae)), u > d && (d = u), m = t.indexOf(h, m + 1);
70
- return c[v] = d, d;
71
- }
72
- function Se(e) {
73
- return e.toLowerCase().replace(Ce, " ");
74
- }
75
- function Xe(e, r, t) {
76
- return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, de(e, r, Se(e), Se(r), 0, 0, {});
77
- }
78
- var Z = { exports: {} }, oe = {};
79
- /**
80
- * @license React
81
- * use-sync-external-store-shim.production.min.js
82
- *
83
- * Copyright (c) Facebook, Inc. and its affiliates.
84
- *
85
- * This source code is licensed under the MIT license found in the
86
- * LICENSE file in the root directory of this source tree.
87
- */
88
- var xe;
89
- function Ye() {
90
- if (xe) return oe;
91
- xe = 1;
92
- var e = _e;
93
- function r(u, y) {
94
- return u === y && (u !== 0 || 1 / u === 1 / y) || u !== u && y !== y;
95
- }
96
- var t = typeof Object.is == "function" ? Object.is : r, f = e.useState, l = e.useEffect, i = e.useLayoutEffect, c = e.useDebugValue;
97
- function v(u, y) {
98
- var x = y(), N = f({ inst: { value: x, getSnapshot: y } }), O = N[0].inst, I = N[1];
99
- return i(function() {
100
- O.value = x, O.getSnapshot = y, h(O) && I({ inst: O });
101
- }, [u, x, y]), l(function() {
102
- return h(O) && I({ inst: O }), u(function() {
103
- h(O) && I({ inst: O });
104
- });
105
- }, [u]), c(x), x;
106
- }
107
- function h(u) {
108
- var y = u.getSnapshot;
109
- u = u.value;
110
- try {
111
- var x = y();
112
- return !t(u, x);
113
- } catch {
114
- return !0;
115
- }
116
- }
117
- function m(u, y) {
118
- return y();
119
- }
120
- var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? m : v;
121
- return oe.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, oe;
122
- }
123
- var ue = {};
124
- /**
125
- * @license React
126
- * use-sync-external-store-shim.development.js
127
- *
128
- * Copyright (c) Facebook, Inc. and its affiliates.
129
- *
130
- * This source code is licensed under the MIT license found in the
131
- * LICENSE file in the root directory of this source tree.
132
- */
133
- var be;
134
- function Je() {
135
- return be || (be = 1, process.env.NODE_ENV !== "production" && function() {
136
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
137
- var e = _e, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
138
- function t(_) {
139
- {
140
- for (var b = arguments.length, R = new Array(b > 1 ? b - 1 : 0), p = 1; p < b; p++)
141
- R[p - 1] = arguments[p];
142
- f("error", _, R);
143
- }
144
- }
145
- function f(_, b, R) {
146
- {
147
- var p = r.ReactDebugCurrentFrame, k = p.getStackAddendum();
148
- k !== "" && (b += "%s", R = R.concat([k]));
149
- var T = R.map(function(j) {
150
- return String(j);
151
- });
152
- T.unshift("Warning: " + b), Function.prototype.apply.call(console[_], console, T);
153
- }
154
- }
155
- function l(_, b) {
156
- return _ === b && (_ !== 0 || 1 / _ === 1 / b) || _ !== _ && b !== b;
157
- }
158
- var i = typeof Object.is == "function" ? Object.is : l, c = e.useState, v = e.useEffect, h = e.useLayoutEffect, m = e.useDebugValue, d = !1, u = !1;
159
- function y(_, b, R) {
160
- d || e.startTransition !== void 0 && (d = !0, t("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
161
- var p = b();
162
- if (!u) {
163
- var k = b();
164
- i(p, k) || (t("The result of getSnapshot should be cached to avoid an infinite loop"), u = !0);
165
- }
166
- var T = c({
167
- inst: {
168
- value: p,
169
- getSnapshot: b
170
- }
171
- }), j = T[0].inst, $ = T[1];
172
- return h(function() {
173
- j.value = p, j.getSnapshot = b, x(j) && $({
174
- inst: j
175
- });
176
- }, [_, p, b]), v(function() {
177
- x(j) && $({
178
- inst: j
179
- });
180
- var B = function() {
181
- x(j) && $({
182
- inst: j
183
- });
184
- };
185
- return _(B);
186
- }, [_]), m(p), p;
187
- }
188
- function x(_) {
189
- var b = _.getSnapshot, R = _.value;
190
- try {
191
- var p = b();
192
- return !i(R, p);
193
- } catch {
194
- return !0;
195
- }
196
- }
197
- function N(_, b, R) {
198
- return b();
199
- }
200
- var O = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", I = !O, G = I ? N : y, J = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : G;
201
- ue.useSyncExternalStore = J, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
202
- }()), ue;
203
- }
204
- var Ee;
205
- function Qe() {
206
- return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? Z.exports = Ye() : Z.exports = Je()), Z.exports;
207
- }
208
- var Ze = Qe(), W = '[cmdk-group=""]', ie = '[cmdk-group-items=""]', et = '[cmdk-group-heading=""]', ce = '[cmdk-item=""]', we = `${ce}:not([aria-disabled="true"])`, se = "cmdk-item-select", K = "data-value", tt = (e, r, t) => Xe(e, r, t), Ne = a.createContext(void 0), Y = () => a.useContext(Ne), Oe = a.createContext(void 0), fe = () => a.useContext(Oe), De = a.createContext(void 0), Ie = a.forwardRef((e, r) => {
209
- let t = P(() => {
210
- var n, s;
211
- return { search: "", value: (s = (n = e.value) != null ? n : e.defaultValue) != null ? s : "", filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
212
- }), f = P(() => /* @__PURE__ */ new Set()), l = P(() => /* @__PURE__ */ new Map()), i = P(() => /* @__PURE__ */ new Map()), c = P(() => /* @__PURE__ */ new Set()), v = je(e), { label: h, children: m, value: d, onValueChange: u, filter: y, shouldFilter: x, loop: N, disablePointerSelection: O = !1, vimBindings: I = !0, ...G } = e, J = F(), _ = F(), b = F(), R = a.useRef(null), p = ft();
213
- q(() => {
214
- if (d !== void 0) {
215
- let n = d.trim();
216
- t.current.value = n, k.emit();
217
- }
218
- }, [d]), q(() => {
219
- p(6, me);
220
- }, []);
221
- let k = a.useMemo(() => ({ subscribe: (n) => (c.current.add(n), () => c.current.delete(n)), snapshot: () => t.current, setState: (n, s, g) => {
222
- var o, S, E;
223
- if (!Object.is(t.current[n], s)) {
224
- if (t.current[n] = s, n === "search") te(), $(), p(1, B);
225
- else if (n === "value" && (g || p(5, me), ((o = v.current) == null ? void 0 : o.value) !== void 0)) {
226
- let A = s ?? "";
227
- (E = (S = v.current).onValueChange) == null || E.call(S, A);
228
- return;
229
- }
230
- k.emit();
231
- }
232
- }, emit: () => {
233
- c.current.forEach((n) => n());
234
- } }), []), T = a.useMemo(() => ({ value: (n, s, g) => {
235
- var o;
236
- s !== ((o = i.current.get(n)) == null ? void 0 : o.value) && (i.current.set(n, { value: s, keywords: g }), t.current.filtered.items.set(n, j(s, g)), p(2, () => {
237
- $(), k.emit();
238
- }));
239
- }, item: (n, s) => (f.current.add(n), s && (l.current.has(s) ? l.current.get(s).add(n) : l.current.set(s, /* @__PURE__ */ new Set([n]))), p(3, () => {
240
- te(), $(), t.current.value || B(), k.emit();
241
- }), () => {
242
- i.current.delete(n), f.current.delete(n), t.current.filtered.items.delete(n);
243
- let g = H();
244
- p(4, () => {
245
- te(), (g == null ? void 0 : g.getAttribute("id")) === n && B(), k.emit();
246
- });
247
- }), group: (n) => (l.current.has(n) || l.current.set(n, /* @__PURE__ */ new Set()), () => {
248
- i.current.delete(n), l.current.delete(n);
249
- }), filter: () => v.current.shouldFilter, label: h || e["aria-label"], getDisablePointerSelection: () => v.current.disablePointerSelection, listId: J, inputId: b, labelId: _, listInnerRef: R }), []);
250
- function j(n, s) {
251
- var g, o;
252
- let S = (o = (g = v.current) == null ? void 0 : g.filter) != null ? o : tt;
253
- return n ? S(n, t.current.search, s) : 0;
254
- }
255
- function $() {
256
- if (!t.current.search || v.current.shouldFilter === !1) return;
257
- let n = t.current.filtered.items, s = [];
258
- t.current.filtered.groups.forEach((o) => {
259
- let S = l.current.get(o), E = 0;
260
- S.forEach((A) => {
261
- let V = n.get(A);
262
- E = Math.max(V, E);
263
- }), s.push([o, E]);
264
- });
265
- let g = R.current;
266
- z().sort((o, S) => {
267
- var E, A;
268
- let V = o.getAttribute("id"), Q = S.getAttribute("id");
269
- return ((E = n.get(Q)) != null ? E : 0) - ((A = n.get(V)) != null ? A : 0);
270
- }).forEach((o) => {
271
- let S = o.closest(ie);
272
- S ? S.appendChild(o.parentElement === S ? o : o.closest(`${ie} > *`)) : g.appendChild(o.parentElement === g ? o : o.closest(`${ie} > *`));
273
- }), s.sort((o, S) => S[1] - o[1]).forEach((o) => {
274
- var S;
275
- let E = (S = R.current) == null ? void 0 : S.querySelector(`${W}[${K}="${encodeURIComponent(o[0])}"]`);
276
- E == null || E.parentElement.appendChild(E);
277
- });
278
- }
279
- function B() {
280
- let n = z().find((g) => g.getAttribute("aria-disabled") !== "true"), s = n == null ? void 0 : n.getAttribute(K);
281
- k.setState("value", s || void 0);
282
- }
283
- function te() {
284
- var n, s, g, o;
285
- if (!t.current.search || v.current.shouldFilter === !1) {
286
- t.current.filtered.count = f.current.size;
287
- return;
288
- }
289
- t.current.filtered.groups = /* @__PURE__ */ new Set();
290
- let S = 0;
291
- for (let E of f.current) {
292
- let A = (s = (n = i.current.get(E)) == null ? void 0 : n.value) != null ? s : "", V = (o = (g = i.current.get(E)) == null ? void 0 : g.keywords) != null ? o : [], Q = j(A, V);
293
- t.current.filtered.items.set(E, Q), Q > 0 && S++;
294
- }
295
- for (let [E, A] of l.current) for (let V of A) if (t.current.filtered.items.get(V) > 0) {
296
- t.current.filtered.groups.add(E);
297
- break;
298
- }
299
- t.current.filtered.count = S;
300
- }
301
- function me() {
302
- var n, s, g;
303
- let o = H();
304
- o && (((n = o.parentElement) == null ? void 0 : n.firstChild) === o && ((g = (s = o.closest(W)) == null ? void 0 : s.querySelector(et)) == null || g.scrollIntoView({ block: "nearest" })), o.scrollIntoView({ block: "nearest" }));
305
- }
306
- function H() {
307
- var n;
308
- return (n = R.current) == null ? void 0 : n.querySelector(`${ce}[aria-selected="true"]`);
309
- }
310
- function z() {
311
- var n;
312
- return Array.from(((n = R.current) == null ? void 0 : n.querySelectorAll(we)) || []);
313
- }
314
- function re(n) {
315
- let s = z()[n];
316
- s && k.setState("value", s.getAttribute(K));
317
- }
318
- function ne(n) {
319
- var s;
320
- let g = H(), o = z(), S = o.findIndex((A) => A === g), E = o[S + n];
321
- (s = v.current) != null && s.loop && (E = S + n < 0 ? o[o.length - 1] : S + n === o.length ? o[0] : o[S + n]), E && k.setState("value", E.getAttribute(K));
322
- }
323
- function pe(n) {
324
- let s = H(), g = s == null ? void 0 : s.closest(W), o;
325
- for (; g && !o; ) g = n > 0 ? st(g, W) : ct(g, W), o = g == null ? void 0 : g.querySelector(we);
326
- o ? k.setState("value", o.getAttribute(K)) : ne(n);
327
- }
328
- let ve = () => re(z().length - 1), ge = (n) => {
329
- n.preventDefault(), n.metaKey ? ve() : n.altKey ? pe(1) : ne(1);
330
- }, he = (n) => {
331
- n.preventDefault(), n.metaKey ? re(0) : n.altKey ? pe(-1) : ne(-1);
332
- };
333
- return a.createElement(M.div, { ref: r, tabIndex: -1, ...G, "cmdk-root": "", onKeyDown: (n) => {
334
- var s;
335
- if ((s = G.onKeyDown) == null || s.call(G, n), !n.defaultPrevented) switch (n.key) {
336
- case "n":
337
- case "j": {
338
- I && n.ctrlKey && ge(n);
339
- break;
340
- }
341
- case "ArrowDown": {
342
- ge(n);
343
- break;
344
- }
345
- case "p":
346
- case "k": {
347
- I && n.ctrlKey && he(n);
348
- break;
349
- }
350
- case "ArrowUp": {
351
- he(n);
352
- break;
353
- }
354
- case "Home": {
355
- n.preventDefault(), re(0);
356
- break;
357
- }
358
- case "End": {
359
- n.preventDefault(), ve();
360
- break;
361
- }
362
- case "Enter":
363
- if (!n.nativeEvent.isComposing && n.keyCode !== 229) {
364
- n.preventDefault();
365
- let g = H();
366
- if (g) {
367
- let o = new Event(se);
368
- g.dispatchEvent(o);
369
- }
370
- }
371
- }
372
- } }, a.createElement("label", { "cmdk-label": "", htmlFor: T.inputId, id: T.labelId, style: pt }, h), ee(e, (n) => a.createElement(Oe.Provider, { value: k }, a.createElement(Ne.Provider, { value: T }, n))));
373
- }), rt = a.forwardRef((e, r) => {
374
- var t, f;
375
- let l = F(), i = a.useRef(null), c = a.useContext(De), v = Y(), h = je(e), m = (f = (t = h.current) == null ? void 0 : t.forceMount) != null ? f : c == null ? void 0 : c.forceMount;
376
- q(() => {
377
- if (!m) return v.item(l, c == null ? void 0 : c.id);
378
- }, [m]);
379
- let d = Ae(l, i, [e.value, e.children, i], e.keywords), u = fe(), y = U((p) => p.value && p.value === d.current), x = U((p) => m || v.filter() === !1 ? !0 : p.search ? p.filtered.items.get(l) > 0 : !0);
380
- a.useEffect(() => {
381
- let p = i.current;
382
- if (!(!p || e.disabled)) return p.addEventListener(se, N), () => p.removeEventListener(se, N);
383
- }, [x, e.onSelect, e.disabled]);
384
- function N() {
385
- var p, k;
386
- O(), (k = (p = h.current).onSelect) == null || k.call(p, d.current);
387
- }
388
- function O() {
389
- u.setState("value", d.current, !0);
390
- }
391
- if (!x) return null;
392
- let { disabled: I, value: G, onSelect: J, forceMount: _, keywords: b, ...R } = e;
393
- return a.createElement(M.div, { ref: X([i, r]), ...R, id: l, "cmdk-item": "", role: "option", "aria-disabled": !!I, "aria-selected": !!y, "data-disabled": !!I, "data-selected": !!y, onPointerMove: I || v.getDisablePointerSelection() ? void 0 : O, onClick: I ? void 0 : N }, e.children);
394
- }), nt = a.forwardRef((e, r) => {
395
- let { heading: t, children: f, forceMount: l, ...i } = e, c = F(), v = a.useRef(null), h = a.useRef(null), m = F(), d = Y(), u = U((x) => l || d.filter() === !1 ? !0 : x.search ? x.filtered.groups.has(c) : !0);
396
- q(() => d.group(c), []), Ae(c, v, [e.value, e.heading, h]);
397
- let y = a.useMemo(() => ({ id: c, forceMount: l }), [l]);
398
- return a.createElement(M.div, { ref: X([v, r]), ...i, "cmdk-group": "", role: "presentation", hidden: u ? void 0 : !0 }, t && a.createElement("div", { ref: h, "cmdk-group-heading": "", "aria-hidden": !0, id: m }, t), ee(e, (x) => a.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? m : void 0 }, a.createElement(De.Provider, { value: y }, x))));
399
- }), at = a.forwardRef((e, r) => {
400
- let { alwaysRender: t, ...f } = e, l = a.useRef(null), i = U((c) => !c.search);
401
- return !t && !i ? null : a.createElement(M.div, { ref: X([l, r]), ...f, "cmdk-separator": "", role: "separator" });
402
- }), lt = a.forwardRef((e, r) => {
403
- let { onValueChange: t, ...f } = e, l = e.value != null, i = fe(), c = U((d) => d.search), v = U((d) => d.value), h = Y(), m = a.useMemo(() => {
404
- var d;
405
- let u = (d = h.listInnerRef.current) == null ? void 0 : d.querySelector(`${ce}[${K}="${encodeURIComponent(v)}"]`);
406
- return u == null ? void 0 : u.getAttribute("id");
407
- }, []);
408
- return a.useEffect(() => {
409
- e.value != null && i.setState("search", e.value);
410
- }, [e.value]), a.createElement(M.input, { ref: r, ...f, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": h.listId, "aria-labelledby": h.labelId, "aria-activedescendant": m, id: h.inputId, type: "text", value: l ? e.value : c, onChange: (d) => {
411
- l || i.setState("search", d.target.value), t == null || t(d.target.value);
412
- } });
413
- }), ot = a.forwardRef((e, r) => {
414
- let { children: t, label: f = "Suggestions", ...l } = e, i = a.useRef(null), c = a.useRef(null), v = Y();
415
- return a.useEffect(() => {
416
- if (c.current && i.current) {
417
- let h = c.current, m = i.current, d, u = new ResizeObserver(() => {
418
- d = requestAnimationFrame(() => {
419
- let y = h.offsetHeight;
420
- m.style.setProperty("--cmdk-list-height", y.toFixed(1) + "px");
421
- });
422
- });
423
- return u.observe(h), () => {
424
- cancelAnimationFrame(d), u.unobserve(h);
425
- };
426
- }
427
- }, []), a.createElement(M.div, { ref: X([i, r]), ...l, "cmdk-list": "", role: "listbox", "aria-label": f, id: v.listId }, ee(e, (h) => a.createElement("div", { ref: X([c, v.listInnerRef]), "cmdk-list-sizer": "" }, h)));
428
- }), ut = a.forwardRef((e, r) => {
429
- let { open: t, onOpenChange: f, overlayClassName: l, contentClassName: i, container: c, ...v } = e;
430
- return a.createElement(C.Root, { open: t, onOpenChange: f }, a.createElement(C.Portal, { container: c }, a.createElement(C.Overlay, { "cmdk-overlay": "", className: l }), a.createElement(C.Content, { "aria-label": e.label, "cmdk-dialog": "", className: i }, a.createElement(Ie, { ref: r, ...v }))));
431
- }), it = a.forwardRef((e, r) => U((t) => t.filtered.count === 0) ? a.createElement(M.div, { ref: r, ...e, "cmdk-empty": "", role: "presentation" }) : null), dt = a.forwardRef((e, r) => {
432
- let { progress: t, children: f, label: l = "Loading...", ...i } = e;
433
- return a.createElement(M.div, { ref: r, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": l }, ee(e, (c) => a.createElement("div", { "aria-hidden": !0 }, c)));
434
- }), D = Object.assign(Ie, { List: ot, Item: rt, Input: lt, Group: nt, Separator: at, Dialog: ut, Empty: it, Loading: dt });
435
- function st(e, r) {
436
- let t = e.nextElementSibling;
437
- for (; t; ) {
438
- if (t.matches(r)) return t;
439
- t = t.nextElementSibling;
440
- }
441
- }
442
- function ct(e, r) {
443
- let t = e.previousElementSibling;
444
- for (; t; ) {
445
- if (t.matches(r)) return t;
446
- t = t.previousElementSibling;
447
- }
448
- }
449
- function je(e) {
450
- let r = a.useRef(e);
451
- return q(() => {
452
- r.current = e;
453
- }), r;
454
- }
455
- var q = typeof window > "u" ? a.useEffect : a.useLayoutEffect;
456
- function P(e) {
457
- let r = a.useRef();
458
- return r.current === void 0 && (r.current = e()), r;
459
- }
460
- function X(e) {
461
- return (r) => {
462
- e.forEach((t) => {
463
- typeof t == "function" ? t(r) : t != null && (t.current = r);
464
- });
465
- };
466
- }
467
- function U(e) {
468
- let r = fe(), t = () => e(r.snapshot());
469
- return Ze.useSyncExternalStore(r.subscribe, t, t);
470
- }
471
- function Ae(e, r, t, f = []) {
472
- let l = a.useRef(), i = Y();
473
- return q(() => {
474
- var c;
475
- let v = (() => {
476
- var m;
477
- for (let d of t) {
478
- if (typeof d == "string") return d.trim();
479
- if (typeof d == "object" && "current" in d) return d.current ? (m = d.current.textContent) == null ? void 0 : m.trim() : l.current;
480
- }
481
- })(), h = f.map((m) => m.trim());
482
- i.value(e, v, h), (c = r.current) == null || c.setAttribute(K, v), l.current = v;
483
- }), l;
484
- }
485
- var ft = () => {
486
- let [e, r] = a.useState(), t = P(() => /* @__PURE__ */ new Map());
487
- return q(() => {
488
- t.current.forEach((f) => f()), t.current = /* @__PURE__ */ new Map();
489
- }, [e]), (f, l) => {
490
- t.current.set(f, l), r({});
491
- };
492
- };
493
- function mt(e) {
494
- let r = e.type;
495
- return typeof r == "function" ? r(e.props) : "render" in r ? r.render(e.props) : e;
496
- }
497
- function ee({ asChild: e, children: r }, t) {
498
- return e && a.isValidElement(r) ? a.cloneElement(mt(r), { ref: r.ref }, t(r.props.children)) : t(r);
499
- }
500
- var pt = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
501
- const Le = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
502
- D,
503
- {
504
- ref: t,
505
- className: L(
506
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
507
- e
508
- ),
509
- ...r
510
- }
511
- ));
512
- Le.displayName = D.displayName;
513
- const Ot = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx($e, { ...r, children: /* @__PURE__ */ w.jsx(Re, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ w.jsx(Le, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), vt = a.forwardRef(({ className: e, ...r }, t) => (
514
- // eslint-disable-next-line react/no-unknown-property
515
- /* @__PURE__ */ w.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
516
- /* @__PURE__ */ w.jsx(Me, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
517
- /* @__PURE__ */ w.jsx(
518
- D.Input,
519
- {
520
- ref: t,
521
- className: L(
522
- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
523
- e
524
- ),
525
- ...r
526
- }
527
- )
528
- ] })
529
- ));
530
- vt.displayName = D.Input.displayName;
531
- const gt = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
532
- D.List,
533
- {
534
- ref: t,
535
- className: L("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
536
- ...r
537
- }
538
- ));
539
- gt.displayName = D.List.displayName;
540
- const ht = a.forwardRef((e, r) => /* @__PURE__ */ w.jsx(
541
- D.Empty,
542
- {
543
- ref: r,
544
- className: "py-6 text-center text-sm",
545
- ...e
546
- }
547
- ));
548
- ht.displayName = D.Empty.displayName;
549
- const yt = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
550
- D.Group,
551
- {
552
- ref: t,
553
- className: L(
554
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
555
- e
556
- ),
557
- ...r
558
- }
559
- ));
560
- yt.displayName = D.Group.displayName;
561
- const St = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
562
- D.Separator,
563
- {
564
- ref: t,
565
- className: L("-mx-1 h-px bg-border", e),
566
- ...r
567
- }
568
- ));
569
- St.displayName = D.Separator.displayName;
570
- const xt = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ w.jsx(
571
- D.Item,
572
- {
573
- ref: t,
574
- className: L(
575
- "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
576
- e
577
- ),
578
- ...r
579
- }
580
- ));
581
- xt.displayName = D.Item.displayName;
582
- const bt = ({
583
- className: e,
584
- ...r
585
- }) => /* @__PURE__ */ w.jsx(
586
- "span",
587
- {
588
- className: L(
589
- "ml-auto text-xs tracking-widest text-muted-foreground",
590
- e
591
- ),
592
- ...r
593
- }
594
- );
595
- bt.displayName = "CommandShortcut";
596
- export {
597
- Le as C,
598
- $e as D,
599
- vt as a,
600
- gt as b,
601
- ht as c,
602
- xt as d,
603
- Nt as e,
604
- Re as f,
605
- Ke as g,
606
- Ot as h,
607
- yt as i,
608
- St as j,
609
- bt as k
610
- };
611
- //# sourceMappingURL=Command-D5DE0DD7.js.map