zudoku 0.53.4 → 0.53.6

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 (233) hide show
  1. package/dist/config/validators/InputNavigationSchema.d.ts +64 -5
  2. package/dist/config/validators/InputNavigationSchema.js +0 -3
  3. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  4. package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
  5. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
  6. package/dist/config/validators/NavigationSchema.js +3 -2
  7. package/dist/config/validators/NavigationSchema.js.map +1 -1
  8. package/dist/config/validators/icon-types.d.ts +1 -1
  9. package/dist/config/validators/icon-types.js +16 -0
  10. package/dist/config/validators/icon-types.js.map +1 -1
  11. package/dist/config/validators/validate.d.ts +3 -0
  12. package/dist/config/validators/validate.js +1 -0
  13. package/dist/config/validators/validate.js.map +1 -1
  14. package/dist/flat-config.d.ts +2 -4
  15. package/dist/lib/components/Header.js +1 -1
  16. package/dist/lib/components/Header.js.map +1 -1
  17. package/dist/lib/components/Markdown.js +2 -2
  18. package/dist/lib/components/Markdown.js.map +1 -1
  19. package/dist/lib/components/NotFoundPage.js +1 -1
  20. package/dist/lib/components/NotFoundPage.js.map +1 -1
  21. package/dist/lib/components/Typography.d.ts +1 -1
  22. package/dist/lib/components/Typography.js +1 -1
  23. package/dist/lib/components/Typography.js.map +1 -1
  24. package/dist/lib/core/ZudokuContext.d.ts +1 -0
  25. package/dist/lib/core/ZudokuContext.js.map +1 -1
  26. package/dist/lib/errors/ErrorAlert.js +1 -1
  27. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  28. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  29. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  30. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  31. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  32. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  33. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  34. package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
  35. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  36. package/dist/lib/ui/CodeBlock.js +1 -1
  37. package/dist/lib/ui/CodeBlock.js.map +1 -1
  38. package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
  39. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  40. package/dist/vite/dev-server.js +9 -1
  41. package/dist/vite/dev-server.js.map +1 -1
  42. package/dist/vite/plugin-docs.js +20 -13
  43. package/dist/vite/plugin-docs.js.map +1 -1
  44. package/dist/vite/plugin-theme.js +88 -49
  45. package/dist/vite/plugin-theme.js.map +1 -1
  46. package/dist/vite/plugin-theme.test.js +25 -4
  47. package/dist/vite/plugin-theme.test.js.map +1 -1
  48. package/lib/{Alert-SijAp9LN.js → Alert-CWApD0CL.js} +3 -3
  49. package/lib/{Alert-SijAp9LN.js.map → Alert-CWApD0CL.js.map} +1 -1
  50. package/lib/{Button-BE9IVkWV.js → Button-B3o-2Xdf.js} +2 -2
  51. package/lib/{Button-BE9IVkWV.js.map → Button-B3o-2Xdf.js.map} +1 -1
  52. package/lib/CallbackHandler-Dr5Lva9x.js +38 -0
  53. package/lib/CallbackHandler-Dr5Lva9x.js.map +1 -0
  54. package/lib/{Card-DPhGbYUM.js → Card-CMDQUPM4.js} +2 -2
  55. package/lib/{Card-DPhGbYUM.js.map → Card-CMDQUPM4.js.map} +1 -1
  56. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  57. package/lib/{CodeBlock-DAKxs_Tu.js → CodeBlock-B-G0eKtw.js} +3 -3
  58. package/lib/{CodeBlock-DAKxs_Tu.js.map → CodeBlock-B-G0eKtw.js.map} +1 -1
  59. package/lib/{Command-xsbs2uhf.js → Command-C9AC5cf-.js} +3 -3
  60. package/lib/{Command-xsbs2uhf.js.map → Command-C9AC5cf-.js.map} +1 -1
  61. package/lib/{Dialog-CiIdyz6a.js → Dialog-DMWw1doX.js} +2 -2
  62. package/lib/{Dialog-CiIdyz6a.js.map → Dialog-DMWw1doX.js.map} +1 -1
  63. package/lib/{Drawer-BzkOKwgC.js → Drawer-DJ05s2pH.js} +86 -86
  64. package/lib/{Drawer-BzkOKwgC.js.map → Drawer-DJ05s2pH.js.map} +1 -1
  65. package/lib/{MdxPage-BFKqQsmK.js → MdxPage-DVI4iYgW.js} +7 -7
  66. package/lib/{MdxPage-BFKqQsmK.js.map → MdxPage-DVI4iYgW.js.map} +1 -1
  67. package/lib/{OasProvider-Bdyvd6Ic.js → OasProvider-CbwsKPNc.js} +2 -2
  68. package/lib/{OasProvider-Bdyvd6Ic.js.map → OasProvider-CbwsKPNc.js.map} +1 -1
  69. package/lib/{OperationList-YZ7k-Rkt.js → OperationList-Bn9ggxw8.js} +12 -12
  70. package/lib/OperationList-Bn9ggxw8.js.map +1 -0
  71. package/lib/{Pagination-EViy7EHt.js → Pagination-bavPec-z.js} +3 -3
  72. package/lib/{Pagination-EViy7EHt.js.map → Pagination-bavPec-z.js.map} +1 -1
  73. package/lib/{RouteGuard-CX6A77iy.js → RouteGuard-Vnlz_t51.js} +2 -2
  74. package/lib/{RouteGuard-CX6A77iy.js.map → RouteGuard-Vnlz_t51.js.map} +1 -1
  75. package/lib/{SchemaList--_f8Azv0.js → SchemaList-DETyCVqu.js} +8 -8
  76. package/lib/{SchemaList--_f8Azv0.js.map → SchemaList-DETyCVqu.js.map} +1 -1
  77. package/lib/{SchemaView-7XWvSrbX.js → SchemaView-Dvxo2RNe.js} +6 -6
  78. package/lib/{SchemaView-7XWvSrbX.js.map → SchemaView-Dvxo2RNe.js.map} +1 -1
  79. package/lib/{SignUp-CXCezG-m.js → SignUp-ClYhZq9H.js} +3 -3
  80. package/lib/{SignUp-CXCezG-m.js.map → SignUp-ClYhZq9H.js.map} +1 -1
  81. package/lib/{Slot-tFjhrd8V.js → Slot-B31yZlfB.js} +316 -336
  82. package/lib/{Slot-tFjhrd8V.js.map → Slot-B31yZlfB.js.map} +1 -1
  83. package/lib/Spinner-mNLZ6awP.js.map +1 -1
  84. package/lib/{SyntaxHighlight-Bp_UsIXG.js → SyntaxHighlight-bm761HDo.js} +3 -3
  85. package/lib/{SyntaxHighlight-Bp_UsIXG.js.map → SyntaxHighlight-bm761HDo.js.map} +1 -1
  86. package/lib/{Toc-Ck0YQtmd.js → Toc-D4oBWE8D.js} +3 -3
  87. package/lib/{Toc-Ck0YQtmd.js.map → Toc-D4oBWE8D.js.map} +1 -1
  88. package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +1 -1
  89. package/lib/{circular-BtKlhs07.js → circular-CRbFI6Zl.js} +2 -2
  90. package/lib/{circular-BtKlhs07.js.map → circular-CRbFI6Zl.js.map} +1 -1
  91. package/lib/{cn-wvCW-ho6.js → cn-dYga0KKN.js} +2 -2
  92. package/lib/cn-dYga0KKN.js.map +1 -0
  93. package/lib/{createServer-Di2U1Dg0.js → createServer-DNyGJJNX.js} +3398 -3552
  94. package/lib/createServer-DNyGJJNX.js.map +1 -0
  95. package/lib/errors-C1GlNcV3.js +44 -0
  96. package/lib/errors-C1GlNcV3.js.map +1 -0
  97. package/lib/hook-CZjW2buS.js.map +1 -1
  98. package/lib/index-Bm35Tkgf.js.map +1 -1
  99. package/lib/{index-CeQqiMIG.js → index-CZTEgYDd.js} +2 -2
  100. package/lib/{index-CeQqiMIG.js.map → index-CZTEgYDd.js.map} +1 -1
  101. package/lib/{index-BTqwnlI5.js → index-C_PXQ8Bx.js} +612 -610
  102. package/lib/{index-BTqwnlI5.js.map → index-C_PXQ8Bx.js.map} +1 -1
  103. package/lib/index-CrcNWbel.js.map +1 -1
  104. package/lib/{index-DKCEJ4Kd.js → index-D09PbNex.js} +911 -911
  105. package/lib/index-D09PbNex.js.map +1 -0
  106. package/lib/index-DI5SPFK9.js.map +1 -1
  107. package/lib/index-DmNq2fbN.js.map +1 -1
  108. package/lib/index.esm-Cp4wkyud.js.map +1 -1
  109. package/lib/invariant-DAFpPywt.js.map +1 -1
  110. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
  111. package/lib/processors/removeExtensions.js.map +1 -1
  112. package/lib/processors/removeParameters.js.map +1 -1
  113. package/lib/processors/removePaths.js.map +1 -1
  114. package/lib/processors/traverse.js.map +1 -1
  115. package/lib/ui/Accordion.js +1 -1
  116. package/lib/ui/Accordion.js.map +1 -1
  117. package/lib/ui/ActionButton.js +2 -2
  118. package/lib/ui/ActionButton.js.map +1 -1
  119. package/lib/ui/Alert.js +1 -1
  120. package/lib/ui/Alert.js.map +1 -1
  121. package/lib/ui/AlertDialog.js +1 -1
  122. package/lib/ui/AlertDialog.js.map +1 -1
  123. package/lib/ui/Badge.js +1 -1
  124. package/lib/ui/Badge.js.map +1 -1
  125. package/lib/ui/Breadcrumb.js +1 -1
  126. package/lib/ui/Breadcrumb.js.map +1 -1
  127. package/lib/ui/Button.js +1 -1
  128. package/lib/ui/Button.js.map +1 -1
  129. package/lib/ui/Callout.js +1 -1
  130. package/lib/ui/Callout.js.map +1 -1
  131. package/lib/ui/Card.js +1 -1
  132. package/lib/ui/Card.js.map +1 -1
  133. package/lib/ui/Carousel.js +1 -1
  134. package/lib/ui/Carousel.js.map +1 -1
  135. package/lib/ui/Checkbox.js +1 -1
  136. package/lib/ui/Checkbox.js.map +1 -1
  137. package/lib/ui/CodeBlock.js +2 -2
  138. package/lib/ui/Command.js +2 -2
  139. package/lib/ui/Command.js.map +1 -1
  140. package/lib/ui/Dialog.js +1 -1
  141. package/lib/ui/Dialog.js.map +1 -1
  142. package/lib/ui/Drawer.js +2 -2
  143. package/lib/ui/DropdownMenu.js +1 -1
  144. package/lib/ui/DropdownMenu.js.map +1 -1
  145. package/lib/ui/EmbeddedCodeBlock.js +2 -2
  146. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  147. package/lib/ui/Form.js +1 -1
  148. package/lib/ui/Form.js.map +1 -1
  149. package/lib/ui/HoverCard.js +1 -1
  150. package/lib/ui/HoverCard.js.map +1 -1
  151. package/lib/ui/Input.js +1 -1
  152. package/lib/ui/Input.js.map +1 -1
  153. package/lib/ui/Label.js +1 -1
  154. package/lib/ui/Label.js.map +1 -1
  155. package/lib/ui/Pagination.js +1 -1
  156. package/lib/ui/Pagination.js.map +1 -1
  157. package/lib/ui/Popover.js +1 -1
  158. package/lib/ui/Popover.js.map +1 -1
  159. package/lib/ui/Progress.js +1 -1
  160. package/lib/ui/Progress.js.map +1 -1
  161. package/lib/ui/RadioGroup.js +1 -1
  162. package/lib/ui/RadioGroup.js.map +1 -1
  163. package/lib/ui/ScrollArea.js +1 -1
  164. package/lib/ui/ScrollArea.js.map +1 -1
  165. package/lib/ui/Select.js +1 -1
  166. package/lib/ui/Select.js.map +1 -1
  167. package/lib/ui/Skeleton.js +1 -1
  168. package/lib/ui/Skeleton.js.map +1 -1
  169. package/lib/ui/Slider.js +1 -1
  170. package/lib/ui/Slider.js.map +1 -1
  171. package/lib/ui/Stepper.js.map +1 -1
  172. package/lib/ui/Switch.js +1 -1
  173. package/lib/ui/Switch.js.map +1 -1
  174. package/lib/ui/SyntaxHighlight.js +2 -2
  175. package/lib/ui/Tabs.js +1 -1
  176. package/lib/ui/Tabs.js.map +1 -1
  177. package/lib/ui/Textarea.js +1 -1
  178. package/lib/ui/Textarea.js.map +1 -1
  179. package/lib/ui/Toggle.js +1 -1
  180. package/lib/ui/Toggle.js.map +1 -1
  181. package/lib/ui/ToggleGroup.js +1 -1
  182. package/lib/ui/ToggleGroup.js.map +1 -1
  183. package/lib/ui/Tooltip.js +1 -1
  184. package/lib/ui/Tooltip.js.map +1 -1
  185. package/lib/ui/util.js +1 -1
  186. package/lib/useExposedProps-BIYjecPD.js.map +1 -1
  187. package/lib/zudoku.auth-auth0.js.map +1 -1
  188. package/lib/zudoku.auth-azureb2c.js +40 -9882
  189. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  190. package/lib/zudoku.auth-clerk.js +2 -2
  191. package/lib/zudoku.auth-clerk.js.map +1 -1
  192. package/lib/zudoku.auth-openid.js +20 -19
  193. package/lib/zudoku.auth-openid.js.map +1 -1
  194. package/lib/zudoku.auth-supabase.js +97 -0
  195. package/lib/zudoku.auth-supabase.js.map +1 -0
  196. package/lib/zudoku.components.js +3 -3
  197. package/lib/zudoku.hooks.js.map +1 -1
  198. package/lib/zudoku.icons.js.map +1 -1
  199. package/lib/zudoku.plugin-api-catalog.js +4 -4
  200. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  201. package/lib/zudoku.plugin-api-keys.js +266 -263
  202. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  203. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  204. package/lib/zudoku.plugin-markdown.js +1 -1
  205. package/lib/zudoku.plugin-markdown.js.map +1 -1
  206. package/lib/zudoku.plugin-openapi.js +1 -1
  207. package/lib/zudoku.plugin-redirect.js.map +1 -1
  208. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  209. package/lib/zudoku.plugin-search-pagefind.js +5 -5
  210. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  211. package/lib/zudoku.plugins.js.map +1 -1
  212. package/package.json +18 -18
  213. package/src/app/main.css +26 -5
  214. package/src/lib/components/Header.tsx +1 -1
  215. package/src/lib/components/Markdown.tsx +3 -3
  216. package/src/lib/components/NotFoundPage.tsx +3 -2
  217. package/src/lib/components/Typography.tsx +1 -1
  218. package/src/lib/core/ZudokuContext.ts +1 -0
  219. package/src/lib/errors/ErrorAlert.tsx +5 -7
  220. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  221. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
  222. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  223. package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
  224. package/src/lib/ui/CodeBlock.tsx +1 -1
  225. package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
  226. package/lib/OperationList-YZ7k-Rkt.js.map +0 -1
  227. package/lib/clerk-BDZ31hjU.js +0 -25190
  228. package/lib/clerk-BDZ31hjU.js.map +0 -1
  229. package/lib/cn-wvCW-ho6.js.map +0 -1
  230. package/lib/createServer-Di2U1Dg0.js.map +0 -1
  231. package/lib/errors-Dv_yAK6M.js +0 -78
  232. package/lib/errors-Dv_yAK6M.js.map +0 -1
  233. package/lib/index-DKCEJ4Kd.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Alert-SijAp9LN.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.81.5/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/.pnpm/@tanstack+react-query@5.81.5_react@19.1.0/node_modules/@tanstack/react-query/build/modern/useMutation.js","../src/lib/ui/Alert.tsx"],"sourcesContent":["// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar MutationObserver = class extends Subscribable {\n #client;\n #currentResult = void 0;\n #currentMutation;\n #mutateOptions;\n constructor(client, options) {\n super();\n this.#client = client;\n this.setOptions(options);\n this.bindMethods();\n this.#updateResult();\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n this.options = this.#client.defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: this.#currentMutation,\n observer: this\n });\n }\n if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else if (this.#currentMutation?.state.status === \"pending\") {\n this.#currentMutation.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n this.#updateResult();\n this.#notify(action);\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n reset() {\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = void 0;\n this.#updateResult();\n this.#notify();\n }\n mutate(variables, options) {\n this.#mutateOptions = options;\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n this.#currentMutation.addObserver(this);\n return this.#currentMutation.execute(variables);\n }\n #updateResult() {\n const state = this.#currentMutation?.state ?? getDefaultState();\n this.#currentResult = {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n };\n }\n #notify(action) {\n notifyManager.batch(() => {\n if (this.#mutateOptions && this.hasListeners()) {\n const variables = this.#currentResult.variables;\n const context = this.#currentResult.context;\n if (action?.type === \"success\") {\n this.#mutateOptions.onSuccess?.(action.data, variables, context);\n this.#mutateOptions.onSettled?.(action.data, null, variables, context);\n } else if (action?.type === \"error\") {\n this.#mutateOptions.onError?.(action.error, variables, context);\n this.#mutateOptions.onSettled?.(\n void 0,\n action.error,\n variables,\n context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n });\n }\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport {\n MutationObserver,\n noop,\n notifyManager,\n shouldThrowError\n} from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"names":["MutationObserver","Subscribable","#client","#currentResult","#currentMutation","#mutateOptions","client","options","#updateResult","prevOptions","shallowEqualObjects","hashKey","action","#notify","variables","state","getDefaultState","notifyManager","context","listener","useMutation","queryClient","useQueryClient","observer","React","result","onStoreChange","mutate","mutateOptions","noop","shouldThrowError","alertVariants","cva","Alert","className","variant","props","jsx","cn","AlertTitle","AlertDescription"],"mappings":";;;;;;AAKA,IAAIA,IAAmB,cAAcC,EAAa;AAAA,EAChDC;AAAA,EACAC,KAAiB;AAAA,EACjBC;AAAA,EACAC;AAAA,EACA,YAAYC,GAAQC,GAAS;AAC3B,UAAO,GACP,KAAKL,KAAUI,GACf,KAAK,WAAWC,CAAO,GACvB,KAAK,YAAa,GAClB,KAAKC,GAAe;AAAA,EACxB;AAAA,EACE,cAAc;AACZ,SAAK,SAAS,KAAK,OAAO,KAAK,IAAI,GACnC,KAAK,QAAQ,KAAK,MAAM,KAAK,IAAI;AAAA,EACrC;AAAA,EACE,WAAWD,GAAS;AAClB,UAAME,IAAc,KAAK;AACzB,SAAK,UAAU,KAAKP,GAAQ,uBAAuBK,CAAO,GACrDG,EAAoB,KAAK,SAASD,CAAW,KAChD,KAAKP,GAAQ,iBAAkB,EAAC,OAAO;AAAA,MACrC,MAAM;AAAA,MACN,UAAU,KAAKE;AAAA,MACf,UAAU;AAAA,IAClB,CAAO,GAECK,GAAa,eAAe,KAAK,QAAQ,eAAeE,EAAQF,EAAY,WAAW,MAAME,EAAQ,KAAK,QAAQ,WAAW,IAC/H,KAAK,MAAO,IACH,KAAKP,IAAkB,MAAM,WAAW,aACjD,KAAKA,GAAiB,WAAW,KAAK,OAAO;AAAA,EAEnD;AAAA,EACE,gBAAgB;AACd,IAAK,KAAK,kBACR,KAAKA,IAAkB,eAAe,IAAI;AAAA,EAEhD;AAAA,EACE,iBAAiBQ,GAAQ;AACvB,SAAKJ,GAAe,GACpB,KAAKK,GAAQD,CAAM;AAAA,EACvB;AAAA,EACE,mBAAmB;AACjB,WAAO,KAAKT;AAAA,EAChB;AAAA,EACE,QAAQ;AACN,SAAKC,IAAkB,eAAe,IAAI,GAC1C,KAAKA,KAAmB,QACxB,KAAKI,GAAe,GACpB,KAAKK,GAAS;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AA;AAAA,EACN;AAEJ;AAEA,SAASG,EAAW,EAAE,WAAAL,GAAW,GAAGE,KAAsC;AAEtE,SAAAC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;AAEA,SAASI,EAAiB;AAAA,EACxB,WAAAN;AAAA,EACA,GAAGE;AACL,GAAgC;AAE5B,SAAAC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"Alert-CWApD0CL.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.81.5/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/.pnpm/@tanstack+react-query@5.81.5_react@19.1.0/node_modules/@tanstack/react-query/build/modern/useMutation.js","../src/lib/ui/Alert.tsx"],"sourcesContent":["// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar MutationObserver = class extends Subscribable {\n #client;\n #currentResult = void 0;\n #currentMutation;\n #mutateOptions;\n constructor(client, options) {\n super();\n this.#client = client;\n this.setOptions(options);\n this.bindMethods();\n this.#updateResult();\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n this.options = this.#client.defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: this.#currentMutation,\n observer: this\n });\n }\n if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else if (this.#currentMutation?.state.status === \"pending\") {\n this.#currentMutation.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n this.#updateResult();\n this.#notify(action);\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n reset() {\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = void 0;\n this.#updateResult();\n this.#notify();\n }\n mutate(variables, options) {\n this.#mutateOptions = options;\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n this.#currentMutation.addObserver(this);\n return this.#currentMutation.execute(variables);\n }\n #updateResult() {\n const state = this.#currentMutation?.state ?? getDefaultState();\n this.#currentResult = {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n };\n }\n #notify(action) {\n notifyManager.batch(() => {\n if (this.#mutateOptions && this.hasListeners()) {\n const variables = this.#currentResult.variables;\n const context = this.#currentResult.context;\n if (action?.type === \"success\") {\n this.#mutateOptions.onSuccess?.(action.data, variables, context);\n this.#mutateOptions.onSettled?.(action.data, null, variables, context);\n } else if (action?.type === \"error\") {\n this.#mutateOptions.onError?.(action.error, variables, context);\n this.#mutateOptions.onSettled?.(\n void 0,\n action.error,\n variables,\n context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n });\n }\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport {\n MutationObserver,\n noop,\n notifyManager,\n shouldThrowError\n} from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"names":["MutationObserver","Subscribable","#client","#currentResult","#currentMutation","#mutateOptions","client","options","#updateResult","prevOptions","shallowEqualObjects","hashKey","action","#notify","variables","state","getDefaultState","notifyManager","context","listener","useMutation","queryClient","useQueryClient","observer","React","result","onStoreChange","mutate","mutateOptions","noop","shouldThrowError","alertVariants","cva","Alert","className","variant","props","jsx","cn","AlertTitle","AlertDescription"],"mappings":";;;;;;AAKA,IAAIA,IAAmB,cAAcC,EAAa;AAAA,EAChDC;AAAA,EACAC,KAAiB;AAAA,EACjBC;AAAA,EACAC;AAAA,EACA,YAAYC,GAAQC,GAAS;AAC3B,UAAK,GACL,KAAKL,KAAUI,GACf,KAAK,WAAWC,CAAO,GACvB,KAAK,YAAW,GAChB,KAAKC,GAAa;AAAA,EACpB;AAAA,EACA,cAAc;AACZ,SAAK,SAAS,KAAK,OAAO,KAAK,IAAI,GACnC,KAAK,QAAQ,KAAK,MAAM,KAAK,IAAI;AAAA,EACnC;AAAA,EACA,WAAWD,GAAS;AAClB,UAAME,IAAc,KAAK;AACzB,SAAK,UAAU,KAAKP,GAAQ,uBAAuBK,CAAO,GACrDG,EAAoB,KAAK,SAASD,CAAW,KAChD,KAAKP,GAAQ,iBAAgB,EAAG,OAAO;AAAA,MACrC,MAAM;AAAA,MACN,UAAU,KAAKE;AAAA,MACf,UAAU;AAAA,IAClB,CAAO,GAECK,GAAa,eAAe,KAAK,QAAQ,eAAeE,EAAQF,EAAY,WAAW,MAAME,EAAQ,KAAK,QAAQ,WAAW,IAC/H,KAAK,MAAK,IACD,KAAKP,IAAkB,MAAM,WAAW,aACjD,KAAKA,GAAiB,WAAW,KAAK,OAAO;AAAA,EAEjD;AAAA,EACA,gBAAgB;AACd,IAAK,KAAK,kBACR,KAAKA,IAAkB,eAAe,IAAI;AAAA,EAE9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AAAA,EACb,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GAAqE;AACnE,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,MAAK;AAAA,MACL,WAAWC,EAAGP,EAAc,EAAE,SAAAI,EAAA,CAAS,GAAGD,CAAS;AAAA,MAClD,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASG,EAAW,EAAE,WAAAL,GAAW,GAAGE,KAAsC;AACxE,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASI,EAAiB;AAAA,EACxB,WAAAN;AAAA,EACA,GAAGE;AACL,GAAgC;AAC9B,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;","x_google_ignoreList":[0,1]}
@@ -2,7 +2,7 @@ import { j as i } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { Slot as a } from "@radix-ui/react-slot";
3
3
  import { c as u } from "./index-DI5SPFK9.js";
4
4
  import * as c from "react";
5
- import { c as x } from "./cn-wvCW-ho6.js";
5
+ import { c as x } from "./cn-dYga0KKN.js";
6
6
  const f = u(
7
7
  "not-prose inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
8
8
  {
@@ -48,4 +48,4 @@ g.displayName = "Button";
48
48
  export {
49
49
  g as B
50
50
  };
51
- //# sourceMappingURL=Button-BE9IVkWV.js.map
51
+ //# sourceMappingURL=Button-B3o-2Xdf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button-BE9IVkWV.js","sources":["../src/lib/ui/Button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nexport const buttonVariants = cva(\n \"not-prose inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n \"ghost-destructive\":\n \"text-destructive hover:bg-destructive hover:text-destructive-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n expand:\n \"flex gap-1.5 border bg-transparent rounded-xl text-muted-foreground hover:text-foreground\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n xl: \"h-14 rounded-lg px-10 text-lg\",\n icon: \"size-9\",\n \"icon-xs\": \"size-7\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","Comp","Slot","jsx","cn"],"mappings":";;;;;AAKO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,qBACE;AAAA,QACF,MAAM;AAAA,QACN,QACE;AAAA,MACJ;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,MAAA;AAAA,IAEf;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAQaC,IAASC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAM,GAAGC,MAAQ;AAC1D,UAAAC,IAAOH,IAAUI,IAAO;AAE5B,WAAAC,gBAAAA,EAAA;AAAA,MAACF;AAAA,MAAA;AAAA,QACC,WAAWG,EAAGb,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAK;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AACAN,EAAO,cAAc;"}
1
+ {"version":3,"file":"Button-B3o-2Xdf.js","sources":["../src/lib/ui/Button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nexport const buttonVariants = cva(\n \"not-prose inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n \"ghost-destructive\":\n \"text-destructive hover:bg-destructive hover:text-destructive-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n expand:\n \"flex gap-1.5 border bg-transparent rounded-xl text-muted-foreground hover:text-foreground\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n xl: \"h-14 rounded-lg px-10 text-lg\",\n icon: \"size-9\",\n \"icon-xs\": \"size-7\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","Comp","Slot","jsx","cn"],"mappings":";;;;;AAKO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,qBACE;AAAA,QACF,MAAM;AAAA,QACN,QACE;AAAA,MAAA;AAAA,MAEJ,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAQaC,IAASC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAA,GAASC,MAAQ;AAChE,UAAMC,IAAOH,IAAUI,IAAO;AAC9B,WACEC,gBAAAA,EAAAA;AAAAA,MAACF;AAAA,MAAA;AAAA,QACC,WAAWG,EAAGb,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAK;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAN,EAAO,cAAc;"}
@@ -0,0 +1,38 @@
1
+ import { j as o } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { c as n, j as u } from "./hook-CZjW2buS.js";
3
+ import { N as s } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
+ import { u as l } from "./index-D09PbNex.js";
5
+ import { Z as i } from "./invariant-DAFpPywt.js";
6
+ function c(t, r, e = "/") {
7
+ return t.startsWith(r) ? e !== "/" && t.startsWith(r + e) ? t.slice(r.length + e.length) : t.slice(r.length) : t;
8
+ }
9
+ function d({
10
+ handleCallback: t
11
+ }) {
12
+ const { options: r } = l(), e = n({
13
+ retry: !1,
14
+ queryKey: ["oauth-callback"],
15
+ queryFn: async () => {
16
+ try {
17
+ return u(
18
+ c(
19
+ await t(),
20
+ window.location.origin,
21
+ r.basePath
22
+ )
23
+ );
24
+ } catch (a) {
25
+ throw new i("Could not validate user", {
26
+ cause: a,
27
+ title: "Authentication Error",
28
+ developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
29
+ });
30
+ }
31
+ }
32
+ });
33
+ return /* @__PURE__ */ o.jsx(s, { to: e.data, replace: !0 });
34
+ }
35
+ export {
36
+ d as C
37
+ };
38
+ //# sourceMappingURL=CallbackHandler-Dr5Lva9x.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallbackHandler-Dr5Lva9x.js","sources":["../src/lib/util/url.ts","../src/lib/authentication/components/CallbackHandler.tsx"],"sourcesContent":["/**\n * Normalizes a redirect URL by removing the origin and optionally the root path\n */\nexport function normalizeRedirectUrl(\n redirectTo: string,\n origin: string,\n basePath: string = \"/\",\n): string {\n if (!redirectTo.startsWith(origin)) {\n return redirectTo;\n }\n\n if (basePath !== \"/\" && redirectTo.startsWith(origin + basePath)) {\n return redirectTo.slice(origin.length + basePath.length);\n }\n\n return redirectTo.slice(origin.length);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Navigate } from \"react-router\";\nimport { useZudoku } from \"zudoku/components\";\nimport { ZudokuError } from \"../../util/invariant.js\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { normalizeRedirectUrl } from \"../../util/url.js\";\n\nexport function CallbackHandler({\n handleCallback,\n}: {\n handleCallback: () => Promise<string>;\n}) {\n const { options } = useZudoku();\n const executeCallback = useSuspenseQuery({\n retry: false,\n queryKey: [\"oauth-callback\"],\n queryFn: async () => {\n try {\n return joinUrl(\n normalizeRedirectUrl(\n await handleCallback(),\n window.location.origin,\n options.basePath,\n ),\n );\n } catch (error) {\n throw new ZudokuError(\"Could not validate user\", {\n cause: error,\n title: \"Authentication Error\",\n developerHint:\n \"Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly.\",\n });\n }\n },\n });\n\n return <Navigate to={executeCallback.data} replace />;\n}\n"],"names":["normalizeRedirectUrl","redirectTo","origin","basePath","CallbackHandler","handleCallback","options","useZudoku","executeCallback","useSuspenseQuery","joinUrl","error","ZudokuError","Navigate"],"mappings":";;;;;AAGO,SAASA,EACdC,GACAC,GACAC,IAAmB,KACX;AACR,SAAKF,EAAW,WAAWC,CAAM,IAI7BC,MAAa,OAAOF,EAAW,WAAWC,IAASC,CAAQ,IACtDF,EAAW,MAAMC,EAAO,SAASC,EAAS,MAAM,IAGlDF,EAAW,MAAMC,EAAO,MAAM,IAP5BD;AAQX;ACVO,SAASG,EAAgB;AAAA,EAC9B,gBAAAC;AACF,GAEG;AACD,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAkBC,EAAiB;AAAA,IACvC,OAAO;AAAA,IACP,UAAU,CAAC,gBAAgB;AAAA,IAC3B,SAAS,YAAY;AACnB,UAAI;AACF,eAAOC;AAAA,UACLV;AAAA,YACE,MAAMK,EAAA;AAAA,YACN,OAAO,SAAS;AAAA,YAChBC,EAAQ;AAAA,UAAA;AAAA,QACV;AAAA,MAEJ,SAASK,GAAO;AACd,cAAM,IAAIC,EAAY,2BAA2B;AAAA,UAC/C,OAAOD;AAAA,UACP,OAAO;AAAA,UACP,eACE;AAAA,QAAA,CACH;AAAA,MACH;AAAA,IACF;AAAA,EAAA,CACD;AAED,+BAAQE,GAAA,EAAS,IAAIL,EAAgB,MAAM,SAAO,IAAC;AACrD;"}
@@ -1,6 +1,6 @@
1
1
  import { j as s } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import * as d from "react";
3
- import { c as o } from "./cn-wvCW-ho6.js";
3
+ import { c as o } from "./cn-dYga0KKN.js";
4
4
  const t = d.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ s.jsx(
5
5
  "div",
6
6
  {
@@ -58,4 +58,4 @@ export {
58
58
  m as c,
59
59
  n as d
60
60
  };
61
- //# sourceMappingURL=Card-DPhGbYUM.js.map
61
+ //# sourceMappingURL=Card-CMDQUPM4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card-DPhGbYUM.js","sources":["../src/lib/ui/Card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-xl border bg-card text-card-foreground shadow-xs\",\n className,\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n};\n"],"names":["Card","React","className","props","ref","jsx","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;;AAGM,MAAAA,IAAOC,EAAM,WAGjB,CAA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A,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,8BAA8BJ,CAAS;AAAA,IACpD,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAW,cAAc;"}
1
+ {"version":3,"file":"Card-CMDQUPM4.js","sources":["../src/lib/ui/Card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-xl border bg-card text-card-foreground shadow-xs\",\n className,\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n};\n"],"names":["Card","React","className","props","ref","jsx","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;;AAGA,MAAMA,IAAOC,EAAM,WAGjB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAK,cAAc;AAEnB,MAAMO,IAAaN,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAW,cAAc;AAEzB,MAAMC,IAAYP,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,6CAA6CJ,CAAS;AAAA,IACnE,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAU,cAAc;AAExB,MAAMC,IAAkBR,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAgB,cAAc;AAE9B,MAAMC,IAAcT,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,4BACzB,OAAA,EAAI,KAAAA,GAAU,WAAWE,EAAG,YAAYJ,CAAS,GAAI,GAAGC,GAAO,CACjE;AACDO,EAAY,cAAc;AAE1B,MAAMC,IAAaV,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,8BAA8BJ,CAAS;AAAA,IACpD,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAW,cAAc;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ClientOnly-E7hGysn1.js","sources":["../src/lib/components/ClientOnly.tsx"],"sourcesContent":["import { type ReactNode, useSyncExternalStore } from \"react\";\n\nconst noop = () => () => {};\n\nexport const ClientOnly = (props: {\n children: ReactNode;\n fallback?: ReactNode;\n}) => {\n const value = useSyncExternalStore(\n noop,\n () => \"client\",\n () => \"server\",\n );\n\n return value === \"client\" ? props.children : props.fallback;\n};\n"],"names":["noop","ClientOnly","props","useSyncExternalStore"],"mappings":";AAEA,MAAMA,IAAO,MAAM,MAAM;AAAC,GAEbC,IAAa,CAACC,MAIXC;AAAA,EACZH;AAAA,EACA,MAAM;AAAA,EACN,MAAM;AACR,MAEiB,WAAWE,EAAM,WAAWA,EAAM;"}
1
+ {"version":3,"file":"ClientOnly-E7hGysn1.js","sources":["../src/lib/components/ClientOnly.tsx"],"sourcesContent":["import { type ReactNode, useSyncExternalStore } from \"react\";\n\nconst noop = () => () => {};\n\nexport const ClientOnly = (props: {\n children: ReactNode;\n fallback?: ReactNode;\n}) => {\n const value = useSyncExternalStore(\n noop,\n () => \"client\",\n () => \"server\",\n );\n\n return value === \"client\" ? props.children : props.fallback;\n};\n"],"names":["noop","ClientOnly","props","useSyncExternalStore"],"mappings":";AAEA,MAAMA,IAAO,MAAM,MAAM;AAAC,GAEbC,IAAa,CAACC,MAIXC;AAAA,EACZH;AAAA,EACA,MAAM;AAAA,EACN,MAAM;AAAA,MAGS,WAAWE,EAAM,WAAWA,EAAM;"}
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { CheckIcon as u, CopyIcon as m } from "lucide-react";
3
3
  import { useState as x, useCallback as b, useRef as f } from "react";
4
- import { c as n } from "./cn-wvCW-ho6.js";
4
+ import { c as n } from "./cn-dYga0KKN.js";
5
5
  const C = (o = 2e3) => {
6
6
  const [r, s] = x(!1), t = b(
7
7
  (l) => {
@@ -67,7 +67,7 @@ const C = (o = 2e3) => {
67
67
  "div",
68
68
  {
69
69
  className: n(
70
- "code-block text-sm not-prose scrollbar overflow-x-auto scrollbar p-4",
70
+ "code-block text-sm not-prose scrollbar overflow-x-auto scrollbar [&>code]:p-4",
71
71
  d.className
72
72
  ),
73
73
  ref: a,
@@ -82,4 +82,4 @@ export {
82
82
  w as C,
83
83
  C as u
84
84
  };
85
- //# sourceMappingURL=CodeBlock-DAKxs_Tu.js.map
85
+ //# sourceMappingURL=CodeBlock-B-G0eKtw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock-DAKxs_Tu.js","sources":["../src/lib/util/useCopyToClipboard.ts","../src/lib/ui/CodeBlock.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\nexport const useCopyToClipboard = (timeout = 2000) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copyToClipboard = useCallback(\n (text: string) => {\n void navigator.clipboard.writeText(text);\n setIsCopied(true);\n\n setTimeout(() => setIsCopied(false), timeout);\n },\n [timeout],\n );\n\n return [isCopied, copyToClipboard] as const;\n};\n","import { CheckIcon, CopyIcon } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { useRef } from \"react\";\nimport { cn } from \"../util/cn.js\";\nimport { useCopyToClipboard } from \"../util/useCopyToClipboard.js\";\n\nexport type CodeBlockProps = {\n className?: string;\n noBackground?: boolean;\n wrapLines?: boolean;\n showLanguageIndicator?: boolean;\n language?: string;\n title?: string;\n children?: ReactNode;\n code?: ReactNode;\n showCopy?: \"hover\" | \"always\" | \"never\";\n disabled?: boolean;\n showLineNumbers?: boolean;\n};\n\nexport const CodeBlock = ({\n children,\n title = \"Code\",\n language,\n showCopy = \"hover\",\n showLanguageIndicator = false,\n showLineNumbers,\n ...props\n}: CodeBlockProps) => {\n const [isCopied, copyToClipboard] = useCopyToClipboard();\n const ref = useRef<HTMLDivElement>(null);\n\n if (!children) return null;\n\n return (\n <div\n className={cn(\n \"border code-block-wrapper relative group bg-muted/50 rounded-md overflow-hidden\",\n showLineNumbers && \"line-numbers\",\n )}\n >\n <div className=\"border-b flex items-center h-10 font-sans bg-black/2\">\n <div className=\"flex-1 text-sm w-full px-4\">\n {title}\n {showLanguageIndicator && language && (\n <span className=\"text-muted-foreground ml-2\">({language})</span>\n )}\n </div>{\" \"}\n {showCopy !== \"never\" && (\n <button\n type=\"button\"\n aria-label=\"Copy code\"\n title=\"Copy code\"\n className={cn(\n \"cursor:pointer h-full hover:border-l-border active:shadow-none active:inset-shadow-xs hover:inset-shadow-xs flex items-center gap-2 px-4 outline-border text-sm hover:bg-black/5 transition-all\",\n )}\n disabled={isCopied}\n onClick={() => {\n if (!ref.current?.textContent) return;\n\n copyToClipboard(ref.current.textContent);\n }}\n >\n {isCopied ? (\n <CheckIcon\n className=\"text-emerald-600\"\n size={14}\n strokeWidth={2.5}\n absoluteStrokeWidth\n />\n ) : (\n <CopyIcon size={14} />\n )}\n </button>\n )}\n </div>\n <div\n className={cn(\n \"code-block text-sm not-prose scrollbar overflow-x-auto scrollbar p-4\",\n props.className,\n )}\n ref={ref}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"names":["useCopyToClipboard","timeout","isCopied","setIsCopied","useState","copyToClipboard","useCallback","text","CodeBlock","children","title","language","showCopy","showLanguageIndicator","showLineNumbers","props","ref","useRef","jsxs","cn","jsx","CheckIcon","CopyIcon"],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,gBAACc,EAAI,SAAS,eAEFX,EAAAW,EAAI,QAAQ,WAAW;AAAA,cACzC;AAAA,cAEC,UACCd,IAAAkB,gBAAAA,EAAA;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,MAAM;AAAA,kBACN,aAAa;AAAA,kBACb,qBAAmB;AAAA,gBAAA;AAAA,cAGrB,IAAAD,gBAAAA,MAACE,GAAS,EAAA,MAAM,GAAI,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAExB,GAEJ;AAAA,QACAF,gBAAAA,EAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWD;AAAA,cACT;AAAA,cACAJ,EAAM;AAAA,YACR;AAAA,YACA,KAAAC;AAAA,YAEC,UAAAP;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF,IArDoB;AAuDxB;"}
1
+ {"version":3,"file":"CodeBlock-B-G0eKtw.js","sources":["../src/lib/util/useCopyToClipboard.ts","../src/lib/ui/CodeBlock.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\nexport const useCopyToClipboard = (timeout = 2000) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copyToClipboard = useCallback(\n (text: string) => {\n void navigator.clipboard.writeText(text);\n setIsCopied(true);\n\n setTimeout(() => setIsCopied(false), timeout);\n },\n [timeout],\n );\n\n return [isCopied, copyToClipboard] as const;\n};\n","import { CheckIcon, CopyIcon } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { useRef } from \"react\";\nimport { cn } from \"../util/cn.js\";\nimport { useCopyToClipboard } from \"../util/useCopyToClipboard.js\";\n\nexport type CodeBlockProps = {\n className?: string;\n noBackground?: boolean;\n wrapLines?: boolean;\n showLanguageIndicator?: boolean;\n language?: string;\n title?: string;\n children?: ReactNode;\n code?: ReactNode;\n showCopy?: \"hover\" | \"always\" | \"never\";\n disabled?: boolean;\n showLineNumbers?: boolean;\n};\n\nexport const CodeBlock = ({\n children,\n title = \"Code\",\n language,\n showCopy = \"hover\",\n showLanguageIndicator = false,\n showLineNumbers,\n ...props\n}: CodeBlockProps) => {\n const [isCopied, copyToClipboard] = useCopyToClipboard();\n const ref = useRef<HTMLDivElement>(null);\n\n if (!children) return null;\n\n return (\n <div\n className={cn(\n \"border code-block-wrapper relative group bg-muted/50 rounded-md overflow-hidden\",\n showLineNumbers && \"line-numbers\",\n )}\n >\n <div className=\"border-b flex items-center h-10 font-sans bg-black/2\">\n <div className=\"flex-1 text-sm w-full px-4\">\n {title}\n {showLanguageIndicator && language && (\n <span className=\"text-muted-foreground ml-2\">({language})</span>\n )}\n </div>{\" \"}\n {showCopy !== \"never\" && (\n <button\n type=\"button\"\n aria-label=\"Copy code\"\n title=\"Copy code\"\n className={cn(\n \"cursor:pointer h-full hover:border-l-border active:shadow-none active:inset-shadow-xs hover:inset-shadow-xs flex items-center gap-2 px-4 outline-border text-sm hover:bg-black/5 transition-all\",\n )}\n disabled={isCopied}\n onClick={() => {\n if (!ref.current?.textContent) return;\n\n copyToClipboard(ref.current.textContent);\n }}\n >\n {isCopied ? (\n <CheckIcon\n className=\"text-emerald-600\"\n size={14}\n strokeWidth={2.5}\n absoluteStrokeWidth\n />\n ) : (\n <CopyIcon size={14} />\n )}\n </button>\n )}\n </div>\n <div\n className={cn(\n \"code-block text-sm not-prose scrollbar overflow-x-auto scrollbar [&>code]:p-4\",\n props.className,\n )}\n ref={ref}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"names":["useCopyToClipboard","timeout","isCopied","setIsCopied","useState","copyToClipboard","useCallback","text","CodeBlock","children","title","language","showCopy","showLanguageIndicator","showLineNumbers","props","ref","useRef","jsxs","cn","jsx","CheckIcon","CopyIcon"],"mappings":";;;;AAEO,MAAMA,IAAqB,CAACC,IAAU,QAAS;AACpD,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GAExCC,IAAkBC;AAAA,IACtB,CAACC,MAAiB;AAChB,MAAK,UAAU,UAAU,U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AAU;AAAA,kBACV,MAAM;AAAA,kBACN,aAAa;AAAA,kBACb,qBAAmB;AAAA,gBAAA;AAAA,cAAA,IAGrBD,gBAAAA,MAACE,GAAA,EAAS,MAAM,GAAA,CAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAExB,GAEJ;AAAA,QACAF,gBAAAA,EAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWD;AAAA,cACT;AAAA,cACAJ,EAAM;AAAA,YAAA;AAAA,YAER,KAAAC;AAAA,YAEC,UAAAP;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA,IApDkB;AAuDxB;"}
@@ -2,8 +2,8 @@ import { j as r } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { _ as s } from "./index-CrcNWbel.js";
3
3
  import { Search as n } from "lucide-react";
4
4
  import * as t from "react";
5
- import { D as p, a as l } from "./Dialog-CiIdyz6a.js";
6
- import { c as o } from "./cn-wvCW-ho6.js";
5
+ import { D as p, a as l } from "./Dialog-DMWw1doX.js";
6
+ import { c as o } from "./cn-dYga0KKN.js";
7
7
  const m = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
8
8
  s,
9
9
  {
@@ -137,4 +137,4 @@ export {
137
137
  m as f,
138
138
  u as g
139
139
  };
140
- //# sourceMappingURL=Command-xsbs2uhf.js.map
140
+ //# sourceMappingURL=Command-C9AC5cf-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Command-xsbs2uhf.js","sources":["../src/lib/ui/Command.tsx"],"sourcesContent":["import { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { Dialog, DialogContent } from \"zudoku/ui/Dialog.js\";\nimport { cn } from \"../util/cn.js\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({\n children,\n command,\n content,\n ...props\n}: DialogProps & {\n command?: ComponentPropsWithoutRef<typeof CommandPrimitive>;\n content?: ComponentPropsWithoutRef<typeof DialogContent>;\n}) => {\n return (\n <Dialog {...props}>\n <DialogContent\n {...content}\n className={cn(\n \"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]\",\n content?.className,\n )}\n aria-describedby={undefined}\n >\n <Command\n {...command}\n className={cn(\n \"[&_[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\",\n command?.className,\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandInlineInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInlineInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden 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\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInlineInput,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","command","content","Dialog","DialogContent","CommandInput","jsxs","Search","CommandInlineInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem"],"mappings":";;;;;;AAQM,MAAAA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAG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KAAAF;AAAA,IACA,WAAWG,EAAG,wBAAwBL,CAAS;AAAA,IAC9C,GAAGC;AAAA,EAAA;AACN,CACD;AACDkB,EAAiB,cAAcf,EAAiB,UAAU;AAEpD,MAAAgB,IAAcrB,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AAEDmB,EAAY,cAAchB,EAAiB,KAAK;"}
1
+ {"version":3,"file":"Command-C9AC5cf-.js","sources":["../src/lib/ui/Command.tsx"],"sourcesContent":["import { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { Dialog, DialogContent } from \"zudoku/ui/Dialog.js\";\nimport { cn } from \"../util/cn.js\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({\n children,\n command,\n content,\n ...props\n}: DialogProps & {\n command?: ComponentPropsWithoutRef<typeof CommandPrimitive>;\n content?: ComponentPropsWithoutRef<typeof DialogContent>;\n}) => {\n return (\n <Dialog {...props}>\n <DialogContent\n {...content}\n className={cn(\n \"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]\",\n content?.className,\n )}\n aria-describedby={undefined}\n >\n <Command\n {...command}\n className={cn(\n \"[&_[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\",\n command?.className,\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandInlineInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInlineInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden 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\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInlineInput,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","command","content","Dialog","DialogContent","CommandInput","jsxs","Search","CommandInlineInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem"],"mappings":";;;;;;AAQA,MAAMA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAQ,cAAcM,EAAiB;AAEvC,MAAME,IAAgB,CAAC;AAAA,EACrB,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGR;AACL,MAKIE,gBAAAA,EAAAA,IAACO,GAAA,EAAQ,GAAGT,GACV,UAAAE,gBAAAA,EAAAA;AAAAA,EAACQ;AAAA,EAAA;AAAA,IACE,GAAGF;AAAA,IACJ,WAAWJ;AAAA,MACT;AAAA,MACAI,GAAS;AAAA,IAAA;A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2
2
  import * as a from "@radix-ui/react-dialog";
3
3
  import * as l from "react";
4
4
  import { XIcon as c } from "lucide-react";
5
- import { c as i } from "./cn-wvCW-ho6.js";
5
+ import { c as i } from "./cn-dYga0KKN.js";
6
6
  const j = a.Root, b = a.Trigger, m = a.Portal, h = a.Close, n = l.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s.jsx(
7
7
  a.Overlay,
8
8
  {
@@ -96,4 +96,4 @@ export {
96
96
  g as f,
97
97
  h as g
98
98
  };
99
- //# sourceMappingURL=Dialog-CiIdyz6a.js.map
99
+ //# sourceMappingURL=Dialog-DMWw1doX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog-CiIdyz6a.js","sources":["../src/lib/ui/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\n\nimport { XIcon } from \"lucide-react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n }\n>(({ className, children, showCloseButton = true, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute left-1 top-1 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden 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\">\n <XIcon className=\"h-3 w-3\" strokeWidth={2} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","jsx","cn","DialogContent","children","showCloseButton","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAMA,MAAMA,IAASC,EAAgB,MAEzBC,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMW,IAAgBN,EAAM,WAK1B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,iBAAAC,IAAkB,IAAM,GAAGN,EAAS,GAAAC,6BAC3DN,GACC,EAAA,UAAA;AAAA,EAAAO,gBAAAA,EAAA,IAACL,GAAc,EAAA;AAAA,EACfU,gBAAAA,EAAA;AAAA,IAACd,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAQ;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGC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AAA,IACC,KAAAQ;AAAA,IACA,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDY,EAAkB,cAAcnB,EAAgB,YAAY;"}
1
+ {"version":3,"file":"Dialog-DMWw1doX.js","sources":["../src/lib/ui/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\n\nimport { XIcon } from \"lucide-react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n }\n>(({ className, children, showCloseButton = true, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute left-1 top-1 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden 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\">\n <XIcon className=\"h-3 w-3\" strokeWidth={2} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","jsx","cn","DialogContent","children","showCloseButton","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAMA,MAAMA,IAASC,EAAgB,MAEzBC,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMW,IAAgBN,EAAM,WAK1B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,iBAAAC,IAAkB,IAAM,GAAGN,EAAA,GAASC,6BAC3DN,GAAA,EACC,UAAA;AAAA,EAAAO,gBAAAA,EAAAA,IAACL,GAAA,EAAc;AAAA,EACfU,gBAAAA,EAAAA;AAAAA,IAACd,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAQ;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAK;AAAA,QACAC,KACCC,gBAAAA,EAAAA,KAACd,EAAgB,OAAhB,EAAsB,WAAU,kRAC/B,UAAA;AAAA,UAAAS,gBAAAA,EAAAA,IAACM,GAAA,EAAM,WAAU,WAAU,aAAa,GAAG;AAAA,UAC3CN,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CA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