diff --git a/app/layout.tsx b/app/layout.tsx
index af392850..64d0ddda 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,19 +1,25 @@
-import './styles/globals.css'
+// app/layout.tsx
+import type { Metadata } from "next";
+import "./globals.css";
+import { Toaster } from "@/components/ui/toaster";
-export const metadata = {
- title: 'LE-DB',
- description: 'Laser Everything Community Database',
-}
+export const metadata: Metadata = {
+ title: "MakeArmy",
+ description: "Laser tooling & community utilities",
+};
export default function RootLayout({
children,
}: {
- children: React.ReactNode
+ children: React.ReactNode;
}) {
return (
-
-
{children}
+
+
+ {children}
+ {/* Shadcn toast portal */}
+
+
- )
+ );
}
-
diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx
new file mode 100644
index 00000000..f000e3ef
--- /dev/null
+++ b/components/ui/badge.tsx
@@ -0,0 +1,36 @@
+import * as React from "react"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const badgeVariants = cva(
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
+ {
+ variants: {
+ variant: {
+ default:
+ "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
+ secondary:
+ "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ destructive:
+ "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
+ outline: "text-foreground",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+export interface BadgeProps
+ extends React.HTMLAttributes,
+ VariantProps {}
+
+function Badge({ className, variant, ...props }: BadgeProps) {
+ return (
+
+ )
+}
+
+export { Badge, badgeVariants }
diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx
new file mode 100644
index 00000000..4d858bb6
--- /dev/null
+++ b/components/ui/textarea.tsx
@@ -0,0 +1,22 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+const Textarea = React.forwardRef<
+ HTMLTextAreaElement,
+ React.ComponentProps<"textarea">
+>(({ className, ...props }, ref) => {
+ return (
+
+ )
+})
+Textarea.displayName = "Textarea"
+
+export { Textarea }
diff --git a/components/ui/toast.tsx b/components/ui/toast.tsx
new file mode 100644
index 00000000..521b94b0
--- /dev/null
+++ b/components/ui/toast.tsx
@@ -0,0 +1,129 @@
+"use client"
+
+import * as React from "react"
+import * as ToastPrimitives from "@radix-ui/react-toast"
+import { cva, type VariantProps } from "class-variance-authority"
+import { X } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+const ToastProvider = ToastPrimitives.Provider
+
+const ToastViewport = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+ToastViewport.displayName = ToastPrimitives.Viewport.displayName
+
+const toastVariants = cva(
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
+ {
+ variants: {
+ variant: {
+ default: "border bg-background text-foreground",
+ destructive:
+ "destructive group border-destructive bg-destructive text-destructive-foreground",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+const Toast = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef &
+ VariantProps
+>(({ className, variant, ...props }, ref) => {
+ return (
+
+ )
+})
+Toast.displayName = ToastPrimitives.Root.displayName
+
+const ToastAction = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+ToastAction.displayName = ToastPrimitives.Action.displayName
+
+const ToastClose = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+))
+ToastClose.displayName = ToastPrimitives.Close.displayName
+
+const ToastTitle = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+ToastTitle.displayName = ToastPrimitives.Title.displayName
+
+const ToastDescription = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+ToastDescription.displayName = ToastPrimitives.Description.displayName
+
+type ToastProps = React.ComponentPropsWithoutRef
+
+type ToastActionElement = React.ReactElement
+
+export {
+ type ToastProps,
+ type ToastActionElement,
+ ToastProvider,
+ ToastViewport,
+ Toast,
+ ToastTitle,
+ ToastDescription,
+ ToastClose,
+ ToastAction,
+}
diff --git a/components/ui/toaster.tsx b/components/ui/toaster.tsx
new file mode 100644
index 00000000..171beb46
--- /dev/null
+++ b/components/ui/toaster.tsx
@@ -0,0 +1,35 @@
+"use client"
+
+import { useToast } from "@/hooks/use-toast"
+import {
+ Toast,
+ ToastClose,
+ ToastDescription,
+ ToastProvider,
+ ToastTitle,
+ ToastViewport,
+} from "@/components/ui/toast"
+
+export function Toaster() {
+ const { toasts } = useToast()
+
+ return (
+
+ {toasts.map(function ({ id, title, description, action, ...props }) {
+ return (
+
+
+ {title && {title}}
+ {description && (
+ {description}
+ )}
+
+ {action}
+
+
+ )
+ })}
+
+
+ )
+}
diff --git a/hooks/use-toast.ts b/hooks/use-toast.ts
new file mode 100644
index 00000000..02e111d8
--- /dev/null
+++ b/hooks/use-toast.ts
@@ -0,0 +1,194 @@
+"use client"
+
+// Inspired by react-hot-toast library
+import * as React from "react"
+
+import type {
+ ToastActionElement,
+ ToastProps,
+} from "@/components/ui/toast"
+
+const TOAST_LIMIT = 1
+const TOAST_REMOVE_DELAY = 1000000
+
+type ToasterToast = ToastProps & {
+ id: string
+ title?: React.ReactNode
+ description?: React.ReactNode
+ action?: ToastActionElement
+}
+
+const actionTypes = {
+ ADD_TOAST: "ADD_TOAST",
+ UPDATE_TOAST: "UPDATE_TOAST",
+ DISMISS_TOAST: "DISMISS_TOAST",
+ REMOVE_TOAST: "REMOVE_TOAST",
+} as const
+
+let count = 0
+
+function genId() {
+ count = (count + 1) % Number.MAX_SAFE_INTEGER
+ return count.toString()
+}
+
+type ActionType = typeof actionTypes
+
+type Action =
+ | {
+ type: ActionType["ADD_TOAST"]
+ toast: ToasterToast
+ }
+ | {
+ type: ActionType["UPDATE_TOAST"]
+ toast: Partial
+ }
+ | {
+ type: ActionType["DISMISS_TOAST"]
+ toastId?: ToasterToast["id"]
+ }
+ | {
+ type: ActionType["REMOVE_TOAST"]
+ toastId?: ToasterToast["id"]
+ }
+
+interface State {
+ toasts: ToasterToast[]
+}
+
+const toastTimeouts = new Map>()
+
+const addToRemoveQueue = (toastId: string) => {
+ if (toastTimeouts.has(toastId)) {
+ return
+ }
+
+ const timeout = setTimeout(() => {
+ toastTimeouts.delete(toastId)
+ dispatch({
+ type: "REMOVE_TOAST",
+ toastId: toastId,
+ })
+ }, TOAST_REMOVE_DELAY)
+
+ toastTimeouts.set(toastId, timeout)
+}
+
+export const reducer = (state: State, action: Action): State => {
+ switch (action.type) {
+ case "ADD_TOAST":
+ return {
+ ...state,
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
+ }
+
+ case "UPDATE_TOAST":
+ return {
+ ...state,
+ toasts: state.toasts.map((t) =>
+ t.id === action.toast.id ? { ...t, ...action.toast } : t
+ ),
+ }
+
+ case "DISMISS_TOAST": {
+ const { toastId } = action
+
+ // ! Side effects ! - This could be extracted into a dismissToast() action,
+ // but I'll keep it here for simplicity
+ if (toastId) {
+ addToRemoveQueue(toastId)
+ } else {
+ state.toasts.forEach((toast) => {
+ addToRemoveQueue(toast.id)
+ })
+ }
+
+ return {
+ ...state,
+ toasts: state.toasts.map((t) =>
+ t.id === toastId || toastId === undefined
+ ? {
+ ...t,
+ open: false,
+ }
+ : t
+ ),
+ }
+ }
+ case "REMOVE_TOAST":
+ if (action.toastId === undefined) {
+ return {
+ ...state,
+ toasts: [],
+ }
+ }
+ return {
+ ...state,
+ toasts: state.toasts.filter((t) => t.id !== action.toastId),
+ }
+ }
+}
+
+const listeners: Array<(state: State) => void> = []
+
+let memoryState: State = { toasts: [] }
+
+function dispatch(action: Action) {
+ memoryState = reducer(memoryState, action)
+ listeners.forEach((listener) => {
+ listener(memoryState)
+ })
+}
+
+type Toast = Omit
+
+function toast({ ...props }: Toast) {
+ const id = genId()
+
+ const update = (props: ToasterToast) =>
+ dispatch({
+ type: "UPDATE_TOAST",
+ toast: { ...props, id },
+ })
+ const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id })
+
+ dispatch({
+ type: "ADD_TOAST",
+ toast: {
+ ...props,
+ id,
+ open: true,
+ onOpenChange: (open) => {
+ if (!open) dismiss()
+ },
+ },
+ })
+
+ return {
+ id: id,
+ dismiss,
+ update,
+ }
+}
+
+function useToast() {
+ const [state, setState] = React.useState(memoryState)
+
+ React.useEffect(() => {
+ listeners.push(setState)
+ return () => {
+ const index = listeners.indexOf(setState)
+ if (index > -1) {
+ listeners.splice(index, 1)
+ }
+ }
+ }, [state])
+
+ return {
+ ...state,
+ toast,
+ dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
+ }
+}
+
+export { useToast, toast }
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index c1e7a47a..e0a24047 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -26,6 +26,17 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@emnapi/runtime": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz",
+ "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==",
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
"node_modules/@floating-ui/core": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz",
@@ -64,6 +75,166 @@
"integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==",
"license": "MIT"
},
+ "node_modules/@hookform/resolvers": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-5.2.2.tgz",
+ "integrity": "sha512-A/IxlMLShx3KjV/HeTcTfaMxdwy690+L/ZADoeaTltLx+CVuzkeVIPuybK3jrRfw7YZnmdKsVVHAlEPIAEUNlA==",
+ "license": "MIT",
+ "dependencies": {
+ "@standard-schema/utils": "^0.3.0"
+ },
+ "peerDependencies": {
+ "react-hook-form": "^7.55.0"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.1.tgz",
+ "integrity": "sha512-pn44xgBtgpEbZsu+lWf2KNb6OAf70X68k+yk69Ic2Xz11zHR/w24/U49XT7AeRwJ0Px+mhALhU5LPci1Aymk7A==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.1.0"
+ }
+ },
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.1.tgz",
+ "integrity": "sha512-VfuYgG2r8BpYiOUN+BfYeFo69nP/MIwAtSJ7/Zpxc5QF3KS22z8Pvg3FkrSFJBPNQ7mmcUcYQFBmEQp7eu1F8Q==",
+ "cpu": [
+ "x64"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.1.0"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.1.0.tgz",
+ "integrity": "sha512-HZ/JUmPwrJSoM4DIQPv/BfNh9yrOA8tlBbqbLz4JZ5uew2+o22Ik+tHQJcih7QJuSa0zo5coHTfD5J8inqj9DA==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.1.0.tgz",
+ "integrity": "sha512-Xzc2ToEmHN+hfvsl9wja0RlnXEgpKNmftriQp6XzY/RaSfwD9th+MSh0WQKzUreLKKINb3afirxW7A0fz2YWuQ==",
+ "cpu": [
+ "x64"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.1.0.tgz",
+ "integrity": "sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA==",
+ "cpu": [
+ "arm"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.1.0.tgz",
+ "integrity": "sha512-IVfGJa7gjChDET1dK9SekxFFdflarnUB8PwW8aGwEoF3oAsSDuNUTYS+SKDOyOJxQyDC1aPFMuRYLoDInyV9Ew==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-ppc64": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.1.0.tgz",
+ "integrity": "sha512-tiXxFZFbhnkWE2LA8oQj7KYR+bWBkiV2nilRldT7bqoEZ4HiDOcePr9wVDAZPi/Id5fT1oY9iGnDq20cwUz8lQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.1.0.tgz",
+ "integrity": "sha512-xukSwvhguw7COyzvmjydRb3x/09+21HykyapcZchiCUkTThEQEOMtBj9UhkaBRLuBrgLFzQ2wbxdeCCJW/jgJA==",
+ "cpu": [
+ "s390x"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
"node_modules/@img/sharp-libvips-linux-x64": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.1.0.tgz",
@@ -80,6 +251,23 @@
"url": "https://opencollective.com/libvips"
}
},
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.1.0.tgz",
+ "integrity": "sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.1.0.tgz",
@@ -96,6 +284,75 @@
"url": "https://opencollective.com/libvips"
}
},
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.1.tgz",
+ "integrity": "sha512-anKiszvACti2sGy9CirTlNyk7BjjZPiML1jt2ZkTdcvpLU1YH6CXwRAZCA2UmRXnhiIftXQ7+Oh62Ji25W72jA==",
+ "cpu": [
+ "arm"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.1.0"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.1.tgz",
+ "integrity": "sha512-kX2c+vbvaXC6vly1RDf/IWNXxrlxLNpBVWkdpRq5Ka7OOKj6nr66etKy2IENf6FtOgklkg9ZdGpEu9kwdlcwOQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.1.0"
+ }
+ },
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.1.tgz",
+ "integrity": "sha512-7s0KX2tI9mZI2buRipKIw2X1ufdTeaRgwmRabt5bi9chYfhur+/C1OXg3TKg/eag1W+6CCWLVmSauV1owmRPxA==",
+ "cpu": [
+ "s390x"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.1.0"
+ }
+ },
"node_modules/@img/sharp-linux-x64": {
"version": "0.34.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.1.tgz",
@@ -118,6 +375,29 @@
"@img/sharp-libvips-linux-x64": "1.1.0"
}
},
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.1.tgz",
+ "integrity": "sha512-DfvyxzHxw4WGdPiTF0SOHnm11Xv4aQexvqhRDAoD00MzHekAj9a/jADXeXYCDFH/DzYruwHbXU7uz+H+nWmSOQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.1.0"
+ }
+ },
"node_modules/@img/sharp-linuxmusl-x64": {
"version": "0.34.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.1.tgz",
@@ -140,6 +420,66 @@
"@img/sharp-libvips-linuxmusl-x64": "1.1.0"
}
},
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.1.tgz",
+ "integrity": "sha512-YDybQnYrLQfEpzGOQe7OKcyLUCML4YOXl428gOOzBgN6Gw0rv8dpsJ7PqTHxBnXnwXr8S1mYFSLSa727tpz0xg==",
+ "cpu": [
+ "wasm32"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/runtime": "^1.4.0"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.1.tgz",
+ "integrity": "sha512-WKf/NAZITnonBf3U1LfdjoMgNO5JYRSlhovhRhMxXVdvWYveM4kM3L8m35onYIdh75cOMCo1BexgVQcCDzyoWw==",
+ "cpu": [
+ "ia32"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.34.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.1.tgz",
+ "integrity": "sha512-hw1iIAHpNE8q3uMIRCgGOeDoz9KtFNarFLQclLxr/LK1VBkj8nby18RjFvr6aP7USRYAjTZW6yisnBWMX571Tw==",
+ "cpu": [
+ "x64"
+ ],
+ "ideallyInert": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
"node_modules/@isaacs/cliui": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
@@ -217,6 +557,74 @@
"integrity": "sha512-xURk++7P7qR9JG1jJtLzPzf0qEvqCN0A/T3DXf8IPMKo9/6FfjxtEffRJIIew/bIL4T3C2jLLqBor8B/zVlx6g==",
"license": "MIT"
},
+ "node_modules/@next/swc-darwin-arm64": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.3.2.tgz",
+ "integrity": "sha512-2DR6kY/OGcokbnCsjHpNeQblqCZ85/1j6njYSkzRdpLn5At7OkSdmk7WyAmB9G0k25+VgqVZ/u356OSoQZ3z0g==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-darwin-x64": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.3.2.tgz",
+ "integrity": "sha512-ro/fdqaZWL6k1S/5CLv1I0DaZfDVJkWNaUU3un8Lg6m0YENWlDulmIWzV96Iou2wEYyEsZq51mwV8+XQXqMp3w==",
+ "cpu": [
+ "x64"
+ ],
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-linux-arm64-gnu": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.3.2.tgz",
+ "integrity": "sha512-covwwtZYhlbRWK2HlYX9835qXum4xYZ3E2Mra1mdQ+0ICGoMiw1+nVAn4d9Bo7R3JqSmK1grMq/va+0cdh7bJA==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-linux-arm64-musl": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.3.2.tgz",
+ "integrity": "sha512-KQkMEillvlW5Qk5mtGA/3Yz0/tzpNlSw6/3/ttsV1lNtMuOHcGii3zVeXZyi4EJmmLDKYcTcByV2wVsOhDt/zg==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
"node_modules/@next/swc-linux-x64-gnu": {
"version": "15.3.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.3.2.tgz",
@@ -249,6 +657,40 @@
"node": ">= 10"
}
},
+ "node_modules/@next/swc-win32-arm64-msvc": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.3.2.tgz",
+ "integrity": "sha512-LLTKmaI5cfD8dVzh5Vt7+OMo+AIOClEdIU/TSKbXXT2iScUTSxOGoBhfuv+FU8R9MLmrkIL1e2fBMkEEjYAtPQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@next/swc-win32-x64-msvc": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.3.2.tgz",
+ "integrity": "sha512-aW5B8wOPioJ4mBdMDXkt5f3j8pUr9W8AnlX0Df35uRWNT1Y6RIybxjnSUe+PhM+M1bwgyY8PHLmXZC6zT1o5tA==",
+ "cpu": [
+ "x64"
+ ],
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -972,6 +1414,119 @@
}
}
},
+ "node_modules/@radix-ui/react-toast": {
+ "version": "1.2.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.15.tgz",
+ "integrity": "sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-use-callback-ref": "1.1.1",
+ "@radix-ui/react-use-controllable-state": "1.2.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toast/node_modules/@radix-ui/primitive": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz",
+ "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-collection": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz",
+ "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-context": "1.1.2",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-presence": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz",
+ "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.2",
+ "@radix-ui/react-use-layout-effect": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-primitive": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.2.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-use-callback-ref": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",
@@ -1160,6 +1715,12 @@
"integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==",
"license": "MIT"
},
+ "node_modules/@standard-schema/utils": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",
+ "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",
+ "license": "MIT"
+ },
"node_modules/@swc/counter": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
@@ -1301,6 +1862,7 @@
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.2.tgz",
"integrity": "sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"csstype": "^3.0.2"
}
@@ -1494,6 +2056,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"caniuse-lite": "^1.0.30001716",
"electron-to-chromium": "^1.5.149",
@@ -2141,6 +2704,22 @@
"url": "https://github.com/sponsors/rawify"
}
},
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "ideallyInert": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@@ -3459,6 +4038,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"nanoid": "^3.3.8",
"picocolors": "^1.1.1",
@@ -3606,6 +4186,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -3615,6 +4196,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"scheduler": "^0.26.0"
},
@@ -3627,6 +4209,7 @@
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.63.0.tgz",
"integrity": "sha512-ZwueDMvUeucovM2VjkCf7zIHcs1aAlDimZu2Hvel5C5907gUzMpm4xCrQXtRzCvsBqFjonB4m3x4LzCFI1ZKWA==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -4792,6 +5375,15 @@
"node": ">= 14"
}
},
+ "node_modules/zod": {
+ "version": "4.1.11",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.11.tgz",
+ "integrity": "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
"node_modules/zwitch": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
diff --git a/node_modules/@hookform/resolvers/LICENSE b/node_modules/@hookform/resolvers/LICENSE
new file mode 100644
index 00000000..139faf48
--- /dev/null
+++ b/node_modules/@hookform/resolvers/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019-present Beier(Bill) Luo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@hookform/resolvers/README.md b/node_modules/@hookform/resolvers/README.md
new file mode 100644
index 00000000..9fa6f4df
--- /dev/null
+++ b/node_modules/@hookform/resolvers/README.md
@@ -0,0 +1,927 @@
+
+
+Performant, flexible and extensible forms with easy to use validation.
+
+
+
+[](https://www.npmjs.com/package/@hookform/resolvers)
+[](https://www.npmjs.com/package/@hookform/resolvers)
+[](https://bundlephobia.com/result?p=@hookform/resolvers)
+
+
+
+## React Hook Form Resolvers
+
+This function allows you to use any external validation library such as Yup, Zod, Joi, Vest, Ajv and many others. The goal is to make sure you can seamlessly integrate whichever validation library you prefer. If you're not using a library, you can always write your own logic to validate your forms.
+
+## Install
+
+Install your preferred validation library alongside `@hookform/resolvers`.
+
+ npm install @hookform/resolvers # npm
+ yarn add @hookform/resolvers # yarn
+ pnpm install @hookform/resolvers # pnpm
+ bun install @hookform/resolvers # bun
+
+
+ Resolver Comparison
+
+| resolver | Infer values
from schema | [criteriaMode](https://react-hook-form.com/docs/useform#criteriaMode) |
+|---|---|---|
+| AJV | ❌ | `firstError \| all` |
+| Arktype | ✅ | `firstError` |
+| class-validator | ✅ | `firstError \| all` |
+| computed-types | ✅ | `firstError` |
+| Effect | ✅ | `firstError \| all` |
+| fluentvalidation-ts | ❌ | `firstError` |
+| io-ts | ✅ | `firstError` |
+| joi | ❌ | `firstError \| all` |
+| Nope | ❌ | `firstError` |
+| Standard Schema | ✅ | `firstError \| all` |
+| Superstruct | ✅ | `firstError` |
+| typanion | ✅ | `firstError` |
+| typebox | ✅ | `firstError \| all` |
+| typeschema | ❌ | `firstError \| all` |
+| valibot | ✅ | `firstError \| all` |
+| vest | ❌ | `firstError \| all` |
+| vine | ✅ | `firstError \| all` |
+| yup | ✅ | `firstError \| all` |
+| zod | ✅ | `firstError \| all` |
+
+
+## TypeScript
+
+Most of the resolvers can infer the output type from the schema. See comparison table for more details.
+
+```tsx
+useForm()
+```
+
+Example:
+
+```tsx
+import { useForm } from 'react-hook-form';
+import { zodResolver } from '@hookform/resolvers/zod';
+import { z } from 'zod'; // or 'zod/v4'
+
+const schema = z.object({
+ id: z.number(),
+});
+
+// Automatically infers the output type from the schema
+useForm({
+ resolver: zodResolver(schema),
+});
+
+// Force the output type
+useForm, any, z.output>({
+ resolver: zodResolver(schema),
+});
+```
+
+## Links
+
+- [React-hook-form validation resolver documentation ](https://react-hook-form.com/docs/useform#resolver)
+
+### Supported resolvers
+
+- [React Hook Form Resolvers](#react-hook-form-resolvers)
+- [Install](#install)
+- [TypeScript](#typescript)
+- [Links](#links)
+ - [Supported resolvers](#supported-resolvers)
+- [API](#api)
+- [Quickstart](#quickstart)
+ - [Yup](#yup)
+ - [Zod](#zod)
+ - [Superstruct](#superstruct)
+ - [Joi](#joi)
+ - [Vest](#vest)
+ - [Class Validator](#class-validator)
+ - [io-ts](#io-ts)
+ - [Nope](#nope)
+ - [computed-types](#computed-types)
+ - [typanion](#typanion)
+ - [Ajv](#ajv)
+ - [TypeBox](#typebox)
+ - [With `ValueCheck`](#with-valuecheck)
+ - [With `TypeCompiler`](#with-typecompiler)
+ - [ArkType](#arktype)
+ - [Valibot](#valibot)
+ - [TypeSchema](#typeschema)
+ - [effect-ts](#effect-ts)
+ - [VineJS](#vinejs)
+ - [fluentvalidation-ts](#fluentvalidation-ts)
+ - [standard-schema](#standard-schema)
+- [Backers](#backers)
+- [Contributors](#contributors)
+
+## API
+
+```
+type Options = {
+ mode: 'async' | 'sync',
+ raw?: boolean
+}
+
+resolver(schema: object, schemaOptions?: object, resolverOptions: Options)
+```
+
+| | type | Required | Description |
+| --------------- | -------- | -------- | --------------------------------------------- |
+| schema | `object` | ✓ | validation schema |
+| schemaOptions | `object` | | validation library schema options |
+| resolverOptions | `object` | | resolver options, `async` is the default mode |
+
+## Quickstart
+
+### [Yup](https://github.com/jquense/yup)
+
+Dead simple Object schema validation.
+
+[](https://bundlephobia.com/result?p=yup)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { yupResolver } from '@hookform/resolvers/yup';
+import * as yup from 'yup';
+
+const schema = yup
+ .object()
+ .shape({
+ name: yup.string().required(),
+ age: yup.number().required(),
+ })
+ .required();
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: yupResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Zod](https://github.com/colinhacks/zod)
+
+TypeScript-first schema validation with static type inference
+
+[](https://bundlephobia.com/result?p=zod)
+
+> ⚠️ Example below uses the `valueAsNumber`, which requires `react-hook-form` v6.12.0 (released Nov 28, 2020) or later.
+
+```tsx
+import { useForm } from 'react-hook-form';
+import { zodResolver } from '@hookform/resolvers/zod';
+import { z } from 'zod'; // or 'zod/v4'
+
+const schema = z.object({
+ name: z.string().min(1, { message: 'Required' }),
+ age: z.number().min(10),
+});
+
+const App = () => {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({
+ resolver: zodResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Superstruct](https://github.com/ianstormtaylor/superstruct)
+
+A simple and composable way to validate data in JavaScript (or TypeScript).
+
+[](https://bundlephobia.com/result?p=superstruct)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { superstructResolver } from '@hookform/resolvers/superstruct';
+import { object, string, number } from 'superstruct';
+
+const schema = object({
+ name: string(),
+ age: number(),
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: superstructResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Joi](https://github.com/sideway/joi)
+
+The most powerful data validation library for JS.
+
+[](https://bundlephobia.com/result?p=joi)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { joiResolver } from '@hookform/resolvers/joi';
+import Joi from 'joi';
+
+const schema = Joi.object({
+ name: Joi.string().required(),
+ age: Joi.number().required(),
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: joiResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Vest](https://github.com/ealush/vest)
+
+Vest 🦺 Declarative Validation Testing.
+
+[](https://bundlephobia.com/result?p=vest)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { vestResolver } from '@hookform/resolvers/vest';
+import { create, test, enforce } from 'vest';
+
+const validationSuite = create((data = {}) => {
+ test('username', 'Username is required', () => {
+ enforce(data.username).isNotEmpty();
+ });
+
+ test('password', 'Password is required', () => {
+ enforce(data.password).isNotEmpty();
+ });
+});
+
+const App = () => {
+ const { register, handleSubmit, errors } = useForm({
+ resolver: vestResolver(validationSuite),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Class Validator](https://github.com/typestack/class-validator)
+
+Decorator-based property validation for classes.
+
+[](https://bundlephobia.com/result?p=class-validator)
+
+> ⚠️ Remember to add these options to your `tsconfig.json`!
+
+```
+"strictPropertyInitialization": false,
+"experimentalDecorators": true
+```
+
+```tsx
+import { useForm } from 'react-hook-form';
+import { classValidatorResolver } from '@hookform/resolvers/class-validator';
+import { Length, Min, IsEmail } from 'class-validator';
+
+class User {
+ @Length(2, 30)
+ username: string;
+
+ @IsEmail()
+ email: string;
+}
+
+const resolver = classValidatorResolver(User);
+
+const App = () => {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({ resolver });
+
+ return (
+
+ );
+};
+```
+
+### [io-ts](https://github.com/gcanti/io-ts)
+
+Validate your data with powerful decoders.
+
+[](https://bundlephobia.com/result?p=io-ts)
+
+```typescript jsx
+import React from 'react';
+import { useForm } from 'react-hook-form';
+import { ioTsResolver } from '@hookform/resolvers/io-ts';
+import t from 'io-ts';
+// you don't have to use io-ts-types, but it's very useful
+import tt from 'io-ts-types';
+
+const schema = t.type({
+ username: t.string,
+ age: tt.NumberFromString,
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: ioTsResolver(schema),
+ });
+
+ return (
+
+ );
+};
+
+export default App;
+```
+
+### [Nope](https://github.com/bvego/nope-validator)
+
+A small, simple, and fast JS validator
+
+[](https://bundlephobia.com/result?p=nope-validator)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { nopeResolver } from '@hookform/resolvers/nope';
+import Nope from 'nope-validator';
+
+const schema = Nope.object().shape({
+ name: Nope.string().required(),
+ age: Nope.number().required(),
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: nopeResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [computed-types](https://github.com/neuledge/computed-types)
+
+TypeScript-first schema validation with static type inference
+
+[](https://bundlephobia.com/result?p=computed-types)
+
+```tsx
+import { useForm } from 'react-hook-form';
+import { computedTypesResolver } from '@hookform/resolvers/computed-types';
+import Schema, { number, string } from 'computed-types';
+
+const schema = Schema({
+ username: string.min(1).error('username field is required'),
+ age: number,
+});
+
+const App = () => {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({
+ resolver: computedTypesResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [typanion](https://github.com/arcanis/typanion)
+
+Static and runtime type assertion library with no dependencies
+
+[](https://bundlephobia.com/result?p=typanion)
+
+```tsx
+import { useForm } from 'react-hook-form';
+import { typanionResolver } from '@hookform/resolvers/typanion';
+import * as t from 'typanion';
+
+const isUser = t.isObject({
+ username: t.applyCascade(t.isString(), [t.hasMinLength(1)]),
+ age: t.applyCascade(t.isNumber(), [
+ t.isInteger(),
+ t.isInInclusiveRange(1, 100),
+ ]),
+});
+
+const App = () => {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({
+ resolver: typanionResolver(isUser),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Ajv](https://github.com/ajv-validator/ajv)
+
+The fastest JSON validator for Node.js and browser
+
+[](https://bundlephobia.com/result?p=ajv)
+
+```tsx
+import { useForm } from 'react-hook-form';
+import { ajvResolver } from '@hookform/resolvers/ajv';
+
+// must use `minLength: 1` to implement required field
+const schema = {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ minLength: 1,
+ errorMessage: { minLength: 'username field is required' },
+ },
+ password: {
+ type: 'string',
+ minLength: 1,
+ errorMessage: { minLength: 'password field is required' },
+ },
+ },
+ required: ['username', 'password'],
+ additionalProperties: false,
+};
+
+const App = () => {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({
+ resolver: ajvResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [TypeBox](https://github.com/sinclairzx81/typebox)
+
+JSON Schema Type Builder with Static Type Resolution for TypeScript
+
+[](https://bundlephobia.com/result?p=@sinclair/typebox)
+
+#### With `ValueCheck`
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { typeboxResolver } from '@hookform/resolvers/typebox';
+import { Type } from '@sinclair/typebox';
+
+const schema = Type.Object({
+ username: Type.String({ minLength: 1 }),
+ password: Type.String({ minLength: 1 }),
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: typeboxResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+#### With `TypeCompiler`
+
+A high-performance JIT of `TypeBox`, [read more](https://github.com/sinclairzx81/typebox#typecompiler)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { typeboxResolver } from '@hookform/resolvers/typebox';
+import { Type } from '@sinclair/typebox';
+import { TypeCompiler } from '@sinclair/typebox/compiler';
+
+const schema = Type.Object({
+ username: Type.String({ minLength: 1 }),
+ password: Type.String({ minLength: 1 }),
+});
+
+const typecheck = TypeCompiler.Compile(schema);
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: typeboxResolver(typecheck),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [ArkType](https://github.com/arktypeio/arktype)
+
+TypeScript's 1:1 validator, optimized from editor to runtime
+
+[](https://bundlephobia.com/result?p=arktype)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { arktypeResolver } from '@hookform/resolvers/arktype';
+import { type } from 'arktype';
+
+const schema = type({
+ username: 'string>1',
+ password: 'string>1',
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: arktypeResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [Valibot](https://github.com/fabian-hiller/valibot)
+
+The modular and type safe schema library for validating structural data
+
+[](https://bundlephobia.com/result?p=valibot)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { valibotResolver } from '@hookform/resolvers/valibot';
+import * as v from 'valibot';
+
+const schema = v.object({
+ username: v.pipe(
+ v.string('username is required'),
+ v.minLength(3, 'Needs to be at least 3 characters'),
+ v.endsWith('cool', 'Needs to end with `cool`'),
+ ),
+ password: v.string('password is required'),
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: valibotResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [TypeSchema](https://typeschema.com)
+
+Universal adapter for schema validation, compatible with [any validation library](https://typeschema.com/#coverage)
+
+[](https://bundlephobia.com/result?p=@typeschema/main)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { typeschemaResolver } from '@hookform/resolvers/typeschema';
+import { z } from 'zod';
+
+// Use your favorite validation library
+const schema = z.object({
+ username: z.string().min(1, { message: 'Required' }),
+ password: z.number().min(1, { message: 'Required' }),
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: typeschemaResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [effect-ts](https://github.com/Effect-TS/effect)
+
+A powerful TypeScript framework that provides a fully-fledged functional effect system with a rich standard library.
+
+[](https://bundlephobia.com/result?p=effect)
+
+```typescript jsx
+import React from 'react';
+import { useForm } from 'react-hook-form';
+import { effectTsResolver } from '@hookform/resolvers/effect-ts';
+import { Schema } from 'effect';
+
+const schema = Schema.Struct({
+ username: Schema.String.pipe(
+ Schema.nonEmptyString({ message: () => 'username required' }),
+ ),
+ password: Schema.String.pipe(
+ Schema.nonEmptyString({ message: () => 'password required' }),
+ ),
+});
+
+type FormData = typeof schema.Type;
+
+interface Props {
+ onSubmit: (data: FormData) => void;
+}
+
+function TestComponent({ onSubmit }: Props) {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ // provide generic if TS has issues inferring types
+ } = useForm({
+ resolver: effectTsResolver(schema),
+ });
+
+ return (
+
+ );
+}
+```
+
+### [VineJS](https://github.com/vinejs/vine)
+
+VineJS is a form data validation library for Node.js
+
+[](https://bundlephobia.com/result?p=@vinejs/vine)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { vineResolver } from '@hookform/resolvers/vine';
+import vine from '@vinejs/vine';
+
+const schema = vine.compile(
+ vine.object({
+ username: vine.string().minLength(1),
+ password: vine.string().minLength(1),
+ }),
+);
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: vineResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+
+### [fluentvalidation-ts](https://github.com/AlexJPotter/fluentvalidation-ts)
+
+A TypeScript-first library for building strongly-typed validation rules
+
+[](https://bundlephobia.com/result?p=@vinejs/vine)
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { fluentValidationResolver } from '@hookform/resolvers/fluentvalidation-ts';
+import { Validator } from 'fluentvalidation-ts';
+
+class FormDataValidator extends Validator {
+ constructor() {
+ super();
+
+ this.ruleFor('username')
+ .notEmpty()
+ .withMessage('username is a required field');
+ this.ruleFor('password')
+ .notEmpty()
+ .withMessage('password is a required field');
+ }
+}
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: fluentValidationResolver(new FormDataValidator()),
+ });
+
+ return (
+
+ );
+};
+```
+
+### [standard-schema](https://github.com/standard-schema/standard-schema)
+
+A standard interface for TypeScript schema validation libraries
+
+[](https://bundlephobia.com/result?p=@standard-schema/spec)
+
+Example zod
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { standardSchemaResolver } from '@hookform/resolvers/standard-schema';
+import { z } from 'zod';
+
+const schema = z.object({
+ name: z.string().min(1, { message: 'Required' }),
+ age: z.number().min(10),
+});
+
+const App = () => {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({
+ resolver: standardSchemaResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+Example arkType
+
+```typescript jsx
+import { useForm } from 'react-hook-form';
+import { standardSchemaResolver } from '@hookform/resolvers/standard-schema';
+import { type } from 'arktype';
+
+const schema = type({
+ username: 'string>1',
+ password: 'string>1',
+});
+
+const App = () => {
+ const { register, handleSubmit } = useForm({
+ resolver: standardSchemaResolver(schema),
+ });
+
+ return (
+
+ );
+};
+```
+
+## Backers
+
+Thanks go to all our backers! [[Become a backer](https://opencollective.com/react-hook-form#backer)].
+
+
+
+
+
+## Contributors
+
+Thanks go to these wonderful people! [[Become a contributor](CONTRIBUTING.md)].
+
+
+
+
diff --git a/node_modules/@hookform/resolvers/ajv/dist/ajv.d.ts b/node_modules/@hookform/resolvers/ajv/dist/ajv.d.ts
new file mode 100644
index 00000000..4b06aec3
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/ajv.d.ts
@@ -0,0 +1,22 @@
+import { Resolver } from './types';
+/**
+ * Creates a resolver for react-hook-form using Ajv schema validation
+ * @param {Schema} schema - The Ajv schema to validate against
+ * @param {Object} schemaOptions - Additional schema validation options
+ * @param {Object} resolverOptions - Additional resolver configuration
+ * @param {string} [resolverOptions.mode='async'] - Validation mode
+ * @returns {Resolver} A resolver function compatible with react-hook-form
+ * @example
+ * const schema = ajv.compile({
+ * type: 'object',
+ * properties: {
+ * name: { type: 'string' },
+ * age: { type: 'number' }
+ * }
+ * });
+ *
+ * useForm({
+ * resolver: ajvResolver(schema)
+ * });
+ */
+export declare const ajvResolver: Resolver;
diff --git a/node_modules/@hookform/resolvers/ajv/dist/ajv.js b/node_modules/@hookform/resolvers/ajv/dist/ajv.js
new file mode 100644
index 00000000..53d47b20
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/ajv.js
@@ -0,0 +1,2 @@
+var e=require("@hookform/resolvers"),r=require("ajv"),a=require("ajv-errors"),s=require("ajv-formats"),o=require("react-hook-form");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=/*#__PURE__*/t(r),n=/*#__PURE__*/t(a),u=/*#__PURE__*/t(s),c=function(e,r){for(var a={},s=function(e){"required"===e.keyword&&(e.instancePath+="/"+e.params.missingProperty);var s=e.instancePath.substring(1).replace(/\//g,".");if(a[s]||(a[s]={message:e.message,type:e.keyword}),r){var t=a[s].types,i=t&&t[e.keyword];a[s]=o.appendErrors(s,r,a,e.keyword,i?[].concat(i,e.message||""):e.message)}},t=function(){var r=e[i];"errorMessage"===r.keyword?r.params.errors.forEach(function(e){e.message=r.message,s(e)}):s(r)},i=0;i {\n const parsedErrors: Record = {};\n\n const reduceError = (error: AjvError) => {\n // Ajv will return empty instancePath when require error\n if (error.keyword === 'required') {\n error.instancePath += `/${error.params.missingProperty}`;\n }\n\n // `/deepObject/data` -> `deepObject.data`\n const path = error.instancePath.substring(1).replace(/\\//g, '.');\n\n if (!parsedErrors[path]) {\n parsedErrors[path] = {\n message: error.message,\n type: error.keyword,\n };\n }\n\n if (validateAllFieldCriteria) {\n const types = parsedErrors[path].types;\n const messages = types && types[error.keyword];\n\n parsedErrors[path] = appendErrors(\n path,\n validateAllFieldCriteria,\n parsedErrors,\n error.keyword,\n messages\n ? ([] as string[]).concat(messages as string[], error.message || '')\n : error.message,\n ) as FieldError;\n }\n };\n\n for (let index = 0; index < ajvErrors.length; index += 1) {\n const error = ajvErrors[index];\n\n if (error.keyword === 'errorMessage') {\n error.params.errors.forEach((originalError) => {\n originalError.message = error.message;\n reduceError(originalError);\n });\n } else {\n reduceError(error);\n }\n }\n\n return parsedErrors;\n};\n\n/**\n * Creates a resolver for react-hook-form using Ajv schema validation\n * @param {Schema} schema - The Ajv schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = ajv.compile({\n * type: 'object',\n * properties: {\n * name: { type: 'string' },\n * age: { type: 'number' }\n * }\n * });\n *\n * useForm({\n * resolver: ajvResolver(schema)\n * });\n */\nexport const ajvResolver: Resolver =\n (schema, schemaOptions, resolverOptions = {}) =>\n async (values, _, options) => {\n const ajv = new Ajv(\n Object.assign(\n {},\n {\n allErrors: true,\n validateSchema: true,\n },\n schemaOptions,\n ),\n );\n\n ajvErrors(ajv);\n addFormats(ajv);\n\n const validate = ajv.compile(\n Object.assign(\n { $async: resolverOptions && resolverOptions.mode === 'async' },\n schema,\n ),\n );\n\n const valid = validate(values);\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return valid\n ? { values, errors: {} }\n : {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n validate.errors as DefinedError[],\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n };\n"],"names":["parseErrorSchema","ajvErrors","validateAllFieldCriteria","parsedErrors","reduceError","error","keyword","instancePath","params","missingProperty","path","substring","replace","message","type","types","messages","appendErrors","concat","_loop","index","errors","forEach","originalError","length","schema","schemaOptions","resolverOptions","values","_","options","ajv","Ajv","Object","assign","allErrors","validateSchema","addFormats","validate","compile","$async","mode","valid","shouldUseNativeValidation","validateFieldsNatively","Promise","resolve","toNestErrors","criteriaMode","e","reject"],"mappings":"4QAOMA,EAAmB,SACvBC,EACAC,GAoCA,IAlCA,IAAMC,EAA2C,CAAA,EAE3CC,EAAc,SAACC,GAEG,aAAlBA,EAAMC,UACRD,EAAME,cAAoBF,IAAAA,EAAMG,OAAOC,iBAIzC,IAAMC,EAAOL,EAAME,aAAaI,UAAU,GAAGC,QAAQ,MAAO,KAS5D,GAPKT,EAAaO,KAChBP,EAAaO,GAAQ,CACnBG,QAASR,EAAMQ,QACfC,KAAMT,EAAMC,UAIZJ,EAA0B,CAC5B,IAAMa,EAAQZ,EAAaO,GAAMK,MAC3BC,EAAWD,GAASA,EAAMV,EAAMC,SAEtCH,EAAaO,GAAQO,EAAAA,aACnBP,EACAR,EACAC,EACAE,EAAMC,QACNU,EACK,GAAgBE,OAAOF,EAAsBX,EAAMQ,SAAW,IAC/DR,EAAMQ,QAEd,CACF,EAAEM,EAAAA,WAGA,IAAMd,EAAQJ,EAAUmB,GAEF,iBAAlBf,EAAMC,QACRD,EAAMG,OAAOa,OAAOC,QAAQ,SAACC,GAC3BA,EAAcV,QAAUR,EAAMQ,QAC9BT,EAAYmB,EACd,GAEAnB,EAAYC,EAEhB,EAXSe,EAAQ,EAAGA,EAAQnB,EAAUuB,OAAQJ,GAAS,EAACD,IAaxD,OAAOhB,CACT,sBAuBE,SAACsB,EAAQC,EAAeC,GACjBC,YADiBD,IAAAA,IAAAA,EAAkB,IACnCC,SAAAA,EAAQC,EAAGC,OAChB,IAAMC,EAAM,IAAIC,EAAG,QACjBC,OAAOC,OACL,CAAA,EACA,CACEC,WAAW,EACXC,gBAAgB,GAElBV,IAIJzB,UAAU8B,GACVM,EAAU,QAACN,GAEX,IAAMO,EAAWP,EAAIQ,QACnBN,OAAOC,OACL,CAAEM,OAAQb,GAA4C,UAAzBA,EAAgBc,MAC7ChB,IAIEiB,EAAQJ,EAASV,GAIvB,OAFAE,EAAQa,2BAA6BC,EAAsBA,uBAAC,CAAE,EAAEd,GAEhEe,QAAAC,QAAOJ,EACH,CAAEd,OAAAA,EAAQP,OAAQ,CAAI,GACtB,CACEO,OAAQ,CAAA,EACRP,OAAQ0B,EAAYA,aAClB/C,EACEsC,EAASjB,QACRS,EAAQa,2BACkB,QAAzBb,EAAQkB,cAEZlB,IAGV,CAAC,MAAAmB,GAAA,OAAAJ,QAAAK,OAAAD,EAAA,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/ajv/dist/ajv.mjs b/node_modules/@hookform/resolvers/ajv/dist/ajv.mjs
new file mode 100644
index 00000000..e3d541f8
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/ajv.mjs
@@ -0,0 +1,2 @@
+import{validateFieldsNatively as r,toNestErrors as e}from"@hookform/resolvers";import o from"ajv";import a from"ajv-errors";import s from"ajv-formats";import{appendErrors as t}from"react-hook-form";var i=function(r,e){for(var o={},a=function(r){"required"===r.keyword&&(r.instancePath+="/"+r.params.missingProperty);var a=r.instancePath.substring(1).replace(/\//g,".");if(o[a]||(o[a]={message:r.message,type:r.keyword}),e){var s=o[a].types,i=s&&s[r.keyword];o[a]=t(a,e,o,r.keyword,i?[].concat(i,r.message||""):r.message)}},s=function(){var e=r[i];"errorMessage"===e.keyword?e.params.errors.forEach(function(r){r.message=e.message,a(r)}):a(e)},i=0;i{const s={},o=r=>{"required"===r.keyword&&(r.instancePath+=`/${r.params.missingProperty}`);const o=r.instancePath.substring(1).replace(/\//g,".");if(s[o]||(s[o]={message:r.message,type:r.keyword}),e){const a=s[o].types,m=a&&a[r.keyword];s[o]=t(o,e,s,r.keyword,m?[].concat(m,r.message||""):r.message)}};for(let e=0;e{r.message=s.message,o(r)}):o(s)}return s},n=(t,n,i={})=>async(c,l,d)=>{const g=new s(Object.assign({},{allErrors:!0,validateSchema:!0},n));o(g),a(g);const p=g.compile(Object.assign({$async:i&&"async"===i.mode},t)),f=p(c);return d.shouldUseNativeValidation&&r({},d),f?{values:c,errors:{}}:{values:{},errors:e(m(p.errors,!d.shouldUseNativeValidation&&"all"===d.criteriaMode),d)}};export{n as ajvResolver};
+//# sourceMappingURL=ajv.modern.mjs.map
diff --git a/node_modules/@hookform/resolvers/ajv/dist/ajv.modern.mjs.map b/node_modules/@hookform/resolvers/ajv/dist/ajv.modern.mjs.map
new file mode 100644
index 00000000..9e78d361
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/ajv.modern.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"ajv.modern.mjs","sources":["../src/ajv.ts"],"sourcesContent":["import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';\nimport Ajv, { DefinedError } from 'ajv';\nimport ajvErrors from 'ajv-errors';\nimport addFormats from 'ajv-formats';\nimport { FieldError, appendErrors } from 'react-hook-form';\nimport { AjvError, Resolver } from './types';\n\nconst parseErrorSchema = (\n ajvErrors: AjvError[],\n validateAllFieldCriteria: boolean,\n) => {\n const parsedErrors: Record = {};\n\n const reduceError = (error: AjvError) => {\n // Ajv will return empty instancePath when require error\n if (error.keyword === 'required') {\n error.instancePath += `/${error.params.missingProperty}`;\n }\n\n // `/deepObject/data` -> `deepObject.data`\n const path = error.instancePath.substring(1).replace(/\\//g, '.');\n\n if (!parsedErrors[path]) {\n parsedErrors[path] = {\n message: error.message,\n type: error.keyword,\n };\n }\n\n if (validateAllFieldCriteria) {\n const types = parsedErrors[path].types;\n const messages = types && types[error.keyword];\n\n parsedErrors[path] = appendErrors(\n path,\n validateAllFieldCriteria,\n parsedErrors,\n error.keyword,\n messages\n ? ([] as string[]).concat(messages as string[], error.message || '')\n : error.message,\n ) as FieldError;\n }\n };\n\n for (let index = 0; index < ajvErrors.length; index += 1) {\n const error = ajvErrors[index];\n\n if (error.keyword === 'errorMessage') {\n error.params.errors.forEach((originalError) => {\n originalError.message = error.message;\n reduceError(originalError);\n });\n } else {\n reduceError(error);\n }\n }\n\n return parsedErrors;\n};\n\n/**\n * Creates a resolver for react-hook-form using Ajv schema validation\n * @param {Schema} schema - The Ajv schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = ajv.compile({\n * type: 'object',\n * properties: {\n * name: { type: 'string' },\n * age: { type: 'number' }\n * }\n * });\n *\n * useForm({\n * resolver: ajvResolver(schema)\n * });\n */\nexport const ajvResolver: Resolver =\n (schema, schemaOptions, resolverOptions = {}) =>\n async (values, _, options) => {\n const ajv = new Ajv(\n Object.assign(\n {},\n {\n allErrors: true,\n validateSchema: true,\n },\n schemaOptions,\n ),\n );\n\n ajvErrors(ajv);\n addFormats(ajv);\n\n const validate = ajv.compile(\n Object.assign(\n { $async: resolverOptions && resolverOptions.mode === 'async' },\n schema,\n ),\n );\n\n const valid = validate(values);\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return valid\n ? { values, errors: {} }\n : {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n validate.errors as DefinedError[],\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n };\n"],"names":["parseErrorSchema","ajvErrors","validateAllFieldCriteria","parsedErrors","reduceError","error","keyword","instancePath","params","missingProperty","path","substring","replace","message","type","types","messages","appendErrors","concat","index","length","errors","forEach","originalError","ajvResolver","schema","schemaOptions","resolverOptions","async","values","_","options","ajv","Ajv","Object","assign","allErrors","validateSchema","addFormats","validate","compile","$async","mode","valid","shouldUseNativeValidation","validateFieldsNatively","toNestErrors","criteriaMode"],"mappings":"sMAOA,MAAMA,EAAmBA,CACvBC,EACAC,KAEA,MAAMC,EAA2C,CAAA,EAE3CC,EAAeC,IAEG,aAAlBA,EAAMC,UACRD,EAAME,cAAgB,IAAIF,EAAMG,OAAOC,mBAIzC,MAAMC,EAAOL,EAAME,aAAaI,UAAU,GAAGC,QAAQ,MAAO,KAS5D,GAPKT,EAAaO,KAChBP,EAAaO,GAAQ,CACnBG,QAASR,EAAMQ,QACfC,KAAMT,EAAMC,UAIZJ,EAA0B,CAC5B,MAAMa,EAAQZ,EAAaO,GAAMK,MAC3BC,EAAWD,GAASA,EAAMV,EAAMC,SAEtCH,EAAaO,GAAQO,EACnBP,EACAR,EACAC,EACAE,EAAMC,QACNU,EACK,GAAgBE,OAAOF,EAAsBX,EAAMQ,SAAW,IAC/DR,EAAMQ,QAEd,GAGF,IAAK,IAAIM,EAAQ,EAAGA,EAAQlB,EAAUmB,OAAQD,GAAS,EAAG,CACxD,MAAMd,EAAQJ,EAAUkB,GAEF,iBAAlBd,EAAMC,QACRD,EAAMG,OAAOa,OAAOC,QAASC,IAC3BA,EAAcV,QAAUR,EAAMQ,QAC9BT,EAAYmB,KAGdnB,EAAYC,EAEhB,CAEA,OAAOF,GAuBIqB,EACXA,CAACC,EAAQC,EAAeC,EAAkB,KAC1CC,MAAOC,EAAQC,EAAGC,KAChB,MAAMC,EAAM,IAAIC,EACdC,OAAOC,OACL,GACA,CACEC,WAAW,EACXC,gBAAgB,GAElBX,IAIJzB,EAAU+B,GACVM,EAAWN,GAEX,MAAMO,EAAWP,EAAIQ,QACnBN,OAAOC,OACL,CAAEM,OAAQd,GAA4C,UAAzBA,EAAgBe,MAC7CjB,IAIEkB,EAAQJ,EAASV,GAIvB,OAFAE,EAAQa,2BAA6BC,EAAuB,CAAE,EAAEd,GAEzDY,EACH,CAAEd,SAAQR,OAAQ,CAAA,GAClB,CACEQ,OAAQ,CAAA,EACRR,OAAQyB,EACN9C,EACEuC,EAASlB,QACRU,EAAQa,2BACkB,QAAzBb,EAAQgB,cAEZhB"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/ajv/dist/ajv.module.js b/node_modules/@hookform/resolvers/ajv/dist/ajv.module.js
new file mode 100644
index 00000000..e3d541f8
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/ajv.module.js
@@ -0,0 +1,2 @@
+import{validateFieldsNatively as r,toNestErrors as e}from"@hookform/resolvers";import o from"ajv";import a from"ajv-errors";import s from"ajv-formats";import{appendErrors as t}from"react-hook-form";var i=function(r,e){for(var o={},a=function(r){"required"===r.keyword&&(r.instancePath+="/"+r.params.missingProperty);var a=r.instancePath.substring(1).replace(/\//g,".");if(o[a]||(o[a]={message:r.message,type:r.keyword}),e){var s=o[a].types,i=s&&s[r.keyword];o[a]=t(a,e,o,r.keyword,i?[].concat(i,r.message||""):r.message)}},s=function(){var e=r[i];"errorMessage"===e.keyword?e.params.errors.forEach(function(r){r.message=e.message,a(r)}):a(e)},i=0;i {\n const parsedErrors: Record = {};\n\n const reduceError = (error: AjvError) => {\n // Ajv will return empty instancePath when require error\n if (error.keyword === 'required') {\n error.instancePath += `/${error.params.missingProperty}`;\n }\n\n // `/deepObject/data` -> `deepObject.data`\n const path = error.instancePath.substring(1).replace(/\\//g, '.');\n\n if (!parsedErrors[path]) {\n parsedErrors[path] = {\n message: error.message,\n type: error.keyword,\n };\n }\n\n if (validateAllFieldCriteria) {\n const types = parsedErrors[path].types;\n const messages = types && types[error.keyword];\n\n parsedErrors[path] = appendErrors(\n path,\n validateAllFieldCriteria,\n parsedErrors,\n error.keyword,\n messages\n ? ([] as string[]).concat(messages as string[], error.message || '')\n : error.message,\n ) as FieldError;\n }\n };\n\n for (let index = 0; index < ajvErrors.length; index += 1) {\n const error = ajvErrors[index];\n\n if (error.keyword === 'errorMessage') {\n error.params.errors.forEach((originalError) => {\n originalError.message = error.message;\n reduceError(originalError);\n });\n } else {\n reduceError(error);\n }\n }\n\n return parsedErrors;\n};\n\n/**\n * Creates a resolver for react-hook-form using Ajv schema validation\n * @param {Schema} schema - The Ajv schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = ajv.compile({\n * type: 'object',\n * properties: {\n * name: { type: 'string' },\n * age: { type: 'number' }\n * }\n * });\n *\n * useForm({\n * resolver: ajvResolver(schema)\n * });\n */\nexport const ajvResolver: Resolver =\n (schema, schemaOptions, resolverOptions = {}) =>\n async (values, _, options) => {\n const ajv = new Ajv(\n Object.assign(\n {},\n {\n allErrors: true,\n validateSchema: true,\n },\n schemaOptions,\n ),\n );\n\n ajvErrors(ajv);\n addFormats(ajv);\n\n const validate = ajv.compile(\n Object.assign(\n { $async: resolverOptions && resolverOptions.mode === 'async' },\n schema,\n ),\n );\n\n const valid = validate(values);\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return valid\n ? { values, errors: {} }\n : {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n validate.errors as DefinedError[],\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n };\n"],"names":["parseErrorSchema","ajvErrors","validateAllFieldCriteria","parsedErrors","reduceError","error","keyword","instancePath","params","missingProperty","path","substring","replace","message","type","types","messages","appendErrors","concat","_loop","index","errors","forEach","originalError","length","ajvResolver","schema","schemaOptions","resolverOptions","values","_","options","ajv","Ajv","Object","assign","allErrors","validateSchema","addFormats","validate","compile","$async","mode","valid","shouldUseNativeValidation","validateFieldsNatively","Promise","resolve","toNestErrors","criteriaMode","e","reject"],"mappings":"sMAOA,IAAMA,EAAmB,SACvBC,EACAC,GAoCA,IAlCA,IAAMC,EAA2C,CAAA,EAE3CC,EAAc,SAACC,GAEG,aAAlBA,EAAMC,UACRD,EAAME,cAAoBF,IAAAA,EAAMG,OAAOC,iBAIzC,IAAMC,EAAOL,EAAME,aAAaI,UAAU,GAAGC,QAAQ,MAAO,KAS5D,GAPKT,EAAaO,KAChBP,EAAaO,GAAQ,CACnBG,QAASR,EAAMQ,QACfC,KAAMT,EAAMC,UAIZJ,EAA0B,CAC5B,IAAMa,EAAQZ,EAAaO,GAAMK,MAC3BC,EAAWD,GAASA,EAAMV,EAAMC,SAEtCH,EAAaO,GAAQO,EACnBP,EACAR,EACAC,EACAE,EAAMC,QACNU,EACK,GAAgBE,OAAOF,EAAsBX,EAAMQ,SAAW,IAC/DR,EAAMQ,QAEd,CACF,EAAEM,EAAAA,WAGA,IAAMd,EAAQJ,EAAUmB,GAEF,iBAAlBf,EAAMC,QACRD,EAAMG,OAAOa,OAAOC,QAAQ,SAACC,GAC3BA,EAAcV,QAAUR,EAAMQ,QAC9BT,EAAYmB,EACd,GAEAnB,EAAYC,EAEhB,EAXSe,EAAQ,EAAGA,EAAQnB,EAAUuB,OAAQJ,GAAS,EAACD,IAaxD,OAAOhB,CACT,EAsBasB,EACX,SAACC,EAAQC,EAAeC,GACjBC,YADiBD,IAAAA,IAAAA,EAAkB,IACnCC,SAAAA,EAAQC,EAAGC,OAChB,IAAMC,EAAM,IAAIC,EACdC,OAAOC,OACL,CAAA,EACA,CACEC,WAAW,EACXC,gBAAgB,GAElBV,IAIJ1B,EAAU+B,GACVM,EAAWN,GAEX,IAAMO,EAAWP,EAAIQ,QACnBN,OAAOC,OACL,CAAEM,OAAQb,GAA4C,UAAzBA,EAAgBc,MAC7ChB,IAIEiB,EAAQJ,EAASV,GAIvB,OAFAE,EAAQa,2BAA6BC,EAAuB,CAAE,EAAEd,GAEhEe,QAAAC,QAAOJ,EACH,CAAEd,OAAAA,EAAQR,OAAQ,CAAI,GACtB,CACEQ,OAAQ,CAAA,EACRR,OAAQ2B,EACNhD,EACEuC,EAASlB,QACRU,EAAQa,2BACkB,QAAzBb,EAAQkB,cAEZlB,IAGV,CAAC,MAAAmB,GAAA,OAAAJ,QAAAK,OAAAD,EAAA,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/ajv/dist/ajv.umd.js b/node_modules/@hookform/resolvers/ajv/dist/ajv.umd.js
new file mode 100644
index 00000000..9fe59c8e
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/ajv.umd.js
@@ -0,0 +1,2 @@
+!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@hookform/resolvers"),require("ajv"),require("ajv-errors"),require("ajv-formats"),require("react-hook-form")):"function"==typeof define&&define.amd?define(["exports","@hookform/resolvers","ajv","ajv-errors","ajv-formats","react-hook-form"],r):r((e||self).hookformResolversAjv={},e.hookformResolvers,e.ajv,e.ajvErrors,e.ajvFormats,e.ReactHookForm)}(this,function(e,r,o,a,s,t){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=/*#__PURE__*/i(o),f=/*#__PURE__*/i(a),l=/*#__PURE__*/i(s),u=function(e,r){for(var o={},a=function(e){"required"===e.keyword&&(e.instancePath+="/"+e.params.missingProperty);var a=e.instancePath.substring(1).replace(/\//g,".");if(o[a]||(o[a]={message:e.message,type:e.keyword}),r){var s=o[a].types,i=s&&s[e.keyword];o[a]=t.appendErrors(a,r,o,e.keyword,i?[].concat(i,e.message||""):e.message)}},s=function(){var r=e[i];"errorMessage"===r.keyword?r.params.errors.forEach(function(e){e.message=r.message,a(e)}):a(r)},i=0;i {\n const parsedErrors: Record = {};\n\n const reduceError = (error: AjvError) => {\n // Ajv will return empty instancePath when require error\n if (error.keyword === 'required') {\n error.instancePath += `/${error.params.missingProperty}`;\n }\n\n // `/deepObject/data` -> `deepObject.data`\n const path = error.instancePath.substring(1).replace(/\\//g, '.');\n\n if (!parsedErrors[path]) {\n parsedErrors[path] = {\n message: error.message,\n type: error.keyword,\n };\n }\n\n if (validateAllFieldCriteria) {\n const types = parsedErrors[path].types;\n const messages = types && types[error.keyword];\n\n parsedErrors[path] = appendErrors(\n path,\n validateAllFieldCriteria,\n parsedErrors,\n error.keyword,\n messages\n ? ([] as string[]).concat(messages as string[], error.message || '')\n : error.message,\n ) as FieldError;\n }\n };\n\n for (let index = 0; index < ajvErrors.length; index += 1) {\n const error = ajvErrors[index];\n\n if (error.keyword === 'errorMessage') {\n error.params.errors.forEach((originalError) => {\n originalError.message = error.message;\n reduceError(originalError);\n });\n } else {\n reduceError(error);\n }\n }\n\n return parsedErrors;\n};\n\n/**\n * Creates a resolver for react-hook-form using Ajv schema validation\n * @param {Schema} schema - The Ajv schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = ajv.compile({\n * type: 'object',\n * properties: {\n * name: { type: 'string' },\n * age: { type: 'number' }\n * }\n * });\n *\n * useForm({\n * resolver: ajvResolver(schema)\n * });\n */\nexport const ajvResolver: Resolver =\n (schema, schemaOptions, resolverOptions = {}) =>\n async (values, _, options) => {\n const ajv = new Ajv(\n Object.assign(\n {},\n {\n allErrors: true,\n validateSchema: true,\n },\n schemaOptions,\n ),\n );\n\n ajvErrors(ajv);\n addFormats(ajv);\n\n const validate = ajv.compile(\n Object.assign(\n { $async: resolverOptions && resolverOptions.mode === 'async' },\n schema,\n ),\n );\n\n const valid = validate(values);\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return valid\n ? { values, errors: {} }\n : {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n validate.errors as DefinedError[],\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n };\n"],"names":["parseErrorSchema","ajvErrors","validateAllFieldCriteria","parsedErrors","reduceError","error","keyword","instancePath","params","missingProperty","path","substring","replace","message","type","types","messages","appendErrors","concat","_loop","index","errors","forEach","originalError","length","schema","schemaOptions","resolverOptions","values","_","options","ajv","Ajv","Object","assign","allErrors","validateSchema","addFormats","validate","compile","$async","mode","valid","shouldUseNativeValidation","validateFieldsNatively","Promise","resolve","toNestErrors","criteriaMode","e","reject"],"mappings":"koBAOMA,EAAmB,SACvBC,EACAC,GAoCA,IAlCA,IAAMC,EAA2C,CAAA,EAE3CC,EAAc,SAACC,GAEG,aAAlBA,EAAMC,UACRD,EAAME,cAAoBF,IAAAA,EAAMG,OAAOC,iBAIzC,IAAMC,EAAOL,EAAME,aAAaI,UAAU,GAAGC,QAAQ,MAAO,KAS5D,GAPKT,EAAaO,KAChBP,EAAaO,GAAQ,CACnBG,QAASR,EAAMQ,QACfC,KAAMT,EAAMC,UAIZJ,EAA0B,CAC5B,IAAMa,EAAQZ,EAAaO,GAAMK,MAC3BC,EAAWD,GAASA,EAAMV,EAAMC,SAEtCH,EAAaO,GAAQO,EAAAA,aACnBP,EACAR,EACAC,EACAE,EAAMC,QACNU,EACK,GAAgBE,OAAOF,EAAsBX,EAAMQ,SAAW,IAC/DR,EAAMQ,QAEd,CACF,EAAEM,EAAAA,WAGA,IAAMd,EAAQJ,EAAUmB,GAEF,iBAAlBf,EAAMC,QACRD,EAAMG,OAAOa,OAAOC,QAAQ,SAACC,GAC3BA,EAAcV,QAAUR,EAAMQ,QAC9BT,EAAYmB,EACd,GAEAnB,EAAYC,EAEhB,EAXSe,EAAQ,EAAGA,EAAQnB,EAAUuB,OAAQJ,GAAS,EAACD,IAaxD,OAAOhB,CACT,gBAuBE,SAACsB,EAAQC,EAAeC,GACjBC,YADiBD,IAAAA,IAAAA,EAAkB,IACnCC,SAAAA,EAAQC,EAAGC,OAChB,IAAMC,EAAM,IAAIC,EAAG,QACjBC,OAAOC,OACL,CAAA,EACA,CACEC,WAAW,EACXC,gBAAgB,GAElBV,IAIJzB,UAAU8B,GACVM,EAAU,QAACN,GAEX,IAAMO,EAAWP,EAAIQ,QACnBN,OAAOC,OACL,CAAEM,OAAQb,GAA4C,UAAzBA,EAAgBc,MAC7ChB,IAIEiB,EAAQJ,EAASV,GAIvB,OAFAE,EAAQa,2BAA6BC,EAAsBA,uBAAC,CAAE,EAAEd,GAEhEe,QAAAC,QAAOJ,EACH,CAAEd,OAAAA,EAAQP,OAAQ,CAAI,GACtB,CACEO,OAAQ,CAAA,EACRP,OAAQ0B,EAAYA,aAClB/C,EACEsC,EAASjB,QACRS,EAAQa,2BACkB,QAAzBb,EAAQkB,cAEZlB,IAGV,CAAC,MAAAmB,GAAA,OAAAJ,QAAAK,OAAAD,EAAA,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/ajv/dist/index.d.ts b/node_modules/@hookform/resolvers/ajv/dist/index.d.ts
new file mode 100644
index 00000000..5844f91e
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/index.d.ts
@@ -0,0 +1,2 @@
+export * from './ajv';
+export * from './types';
diff --git a/node_modules/@hookform/resolvers/ajv/dist/types.d.ts b/node_modules/@hookform/resolvers/ajv/dist/types.d.ts
new file mode 100644
index 00000000..f4b8f88a
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/dist/types.d.ts
@@ -0,0 +1,13 @@
+import * as Ajv from 'ajv';
+import type { DefinedError, ErrorObject } from 'ajv';
+import { FieldValues, ResolverOptions, ResolverResult } from 'react-hook-form';
+export type Resolver = (schema: Ajv.JSONSchemaType, schemaOptions?: Ajv.Options, factoryOptions?: {
+ mode?: 'async' | 'sync';
+}) => (values: TFieldValues, context: TContext | undefined, options: ResolverOptions) => Promise>;
+type ErrorMessage = ErrorObject<'errorMessage', {
+ errors: (DefinedError & {
+ emUsed: boolean;
+ })[];
+}>;
+export type AjvError = ErrorMessage | DefinedError;
+export {};
diff --git a/node_modules/@hookform/resolvers/ajv/package.json b/node_modules/@hookform/resolvers/ajv/package.json
new file mode 100644
index 00000000..6200a811
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "@hookform/resolvers/ajv",
+ "amdName": "hookformResolversAjv",
+ "version": "1.0.0",
+ "private": true,
+ "description": "React Hook Form validation resolver: ajv",
+ "main": "dist/ajv.js",
+ "module": "dist/ajv.module.js",
+ "umd:main": "dist/ajv.umd.js",
+ "source": "src/index.ts",
+ "types": "dist/index.d.ts",
+ "license": "MIT",
+ "peerDependencies": {
+ "react-hook-form": "^7.55.0",
+ "@hookform/resolvers": "^2.0.0",
+ "ajv": "^8.12.0",
+ "ajv-errors": "^3.0.0",
+ "ajv-formats": "^2.1.1"
+ }
+}
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/Form-native-validation.tsx b/node_modules/@hookform/resolvers/ajv/src/__tests__/Form-native-validation.tsx
new file mode 100644
index 00000000..0de3716d
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/Form-native-validation.tsx
@@ -0,0 +1,94 @@
+import { render, screen } from '@testing-library/react';
+import user from '@testing-library/user-event';
+import { JSONSchemaType } from 'ajv';
+import React from 'react';
+import { useForm } from 'react-hook-form';
+import { ajvResolver } from '..';
+
+const USERNAME_REQUIRED_MESSAGE = 'username field is required';
+const PASSWORD_REQUIRED_MESSAGE = 'password field is required';
+
+type FormData = { username: string; password: string };
+
+const schema: JSONSchemaType = {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ minLength: 1,
+ errorMessage: { minLength: USERNAME_REQUIRED_MESSAGE },
+ },
+ password: {
+ type: 'string',
+ minLength: 1,
+ errorMessage: { minLength: PASSWORD_REQUIRED_MESSAGE },
+ },
+ },
+ required: ['username', 'password'],
+ additionalProperties: false,
+};
+
+interface Props {
+ onSubmit: (data: FormData) => void;
+}
+
+function TestComponent({ onSubmit }: Props) {
+ const { register, handleSubmit } = useForm({
+ resolver: ajvResolver(schema),
+ shouldUseNativeValidation: true,
+ });
+
+ return (
+
+ );
+}
+
+test("form's native validation with Ajv", async () => {
+ const handleSubmit = vi.fn();
+ render();
+
+ // username
+ let usernameField = screen.getByPlaceholderText(
+ /username/i,
+ ) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(true);
+ expect(usernameField.validationMessage).toBe('');
+
+ // password
+ let passwordField = screen.getByPlaceholderText(
+ /password/i,
+ ) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(true);
+ expect(passwordField.validationMessage).toBe('');
+
+ await user.click(screen.getByText(/submit/i));
+
+ // username
+ usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(false);
+ expect(usernameField.validationMessage).toBe(USERNAME_REQUIRED_MESSAGE);
+
+ // password
+ passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(false);
+ expect(passwordField.validationMessage).toBe(PASSWORD_REQUIRED_MESSAGE);
+
+ await user.type(screen.getByPlaceholderText(/username/i), 'joe');
+ await user.type(screen.getByPlaceholderText(/password/i), 'password');
+
+ // username
+ usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(true);
+ expect(usernameField.validationMessage).toBe('');
+
+ // password
+ passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(true);
+ expect(passwordField.validationMessage).toBe('');
+});
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/Form.tsx b/node_modules/@hookform/resolvers/ajv/src/__tests__/Form.tsx
new file mode 100644
index 00000000..5504f602
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/Form.tsx
@@ -0,0 +1,65 @@
+import { render, screen } from '@testing-library/react';
+import user from '@testing-library/user-event';
+import { JSONSchemaType } from 'ajv';
+import React from 'react';
+import { useForm } from 'react-hook-form';
+import { ajvResolver } from '..';
+
+type FormData = { username: string; password: string };
+
+const schema: JSONSchemaType = {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ minLength: 1,
+ errorMessage: { minLength: 'username field is required' },
+ },
+ password: {
+ type: 'string',
+ minLength: 1,
+ errorMessage: { minLength: 'password field is required' },
+ },
+ },
+ required: ['username', 'password'],
+ additionalProperties: false,
+};
+
+interface Props {
+ onSubmit: (data: FormData) => void;
+}
+
+function TestComponent({ onSubmit }: Props) {
+ const {
+ register,
+ formState: { errors },
+ handleSubmit,
+ } = useForm({
+ resolver: ajvResolver(schema), // Useful to check TypeScript regressions
+ });
+
+ return (
+
+ );
+}
+
+test("form's validation with Ajv and TypeScript's integration", async () => {
+ const handleSubmit = vi.fn();
+ render();
+
+ expect(screen.queryAllByRole('alert')).toHaveLength(0);
+
+ await user.click(screen.getByText(/submit/i));
+
+ expect(screen.getByText(/username field is required/i)).toBeInTheDocument();
+ expect(screen.getByText(/password field is required/i)).toBeInTheDocument();
+ expect(handleSubmit).not.toHaveBeenCalled();
+});
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/__fixtures__/data-errors.ts b/node_modules/@hookform/resolvers/ajv/src/__tests__/__fixtures__/data-errors.ts
new file mode 100644
index 00000000..a5b3e577
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/__fixtures__/data-errors.ts
@@ -0,0 +1,216 @@
+import { JSONSchemaType } from 'ajv';
+import { Field, InternalFieldName } from 'react-hook-form';
+
+interface DataA {
+ username: string;
+ password: string;
+}
+
+export const schemaA: JSONSchemaType = {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ minLength: 3,
+ errorMessage: {
+ minLength: 'username should be at least three characters long',
+ },
+ },
+ password: {
+ type: 'string',
+ pattern: '.*[A-Z].*',
+ minLength: 8,
+ errorMessage: {
+ pattern: 'One uppercase character',
+ minLength: 'passwords should be at least eight characters long',
+ },
+ },
+ },
+ required: ['username', 'password'],
+ additionalProperties: false,
+ errorMessage: {
+ required: {
+ username: 'username field is required',
+ password: 'password field is required',
+ },
+ },
+};
+
+export const validDataA: DataA = {
+ username: 'kt666',
+ password: 'validPassword',
+};
+
+export const invalidDataA = {
+ username: 'kt',
+ password: 'invalid',
+};
+
+export const undefinedDataA = {
+ username: undefined,
+ password: undefined,
+};
+
+export const fieldsA: Record = {
+ username: {
+ ref: { name: 'username' },
+ name: 'username',
+ },
+ password: {
+ ref: { name: 'password' },
+ name: 'password',
+ },
+ email: {
+ ref: { name: 'email' },
+ name: 'email',
+ },
+ birthday: {
+ ref: { name: 'birthday' },
+ name: 'birthday',
+ },
+};
+
+// examples from [ajv-errors](https://github.com/ajv-validator/ajv-errors)
+
+interface DataB {
+ foo: number;
+}
+
+export const schemaB: JSONSchemaType = {
+ type: 'object',
+ required: ['foo'],
+ properties: {
+ foo: { type: 'integer' },
+ },
+ additionalProperties: false,
+ errorMessage: 'should be an object with an integer property foo only',
+};
+
+export const validDataB: DataB = { foo: 666 };
+export const invalidDataB = { foo: 'kt', bar: 6 };
+export const undefinedDataB = { foo: undefined };
+
+interface DataC {
+ foo: number;
+}
+
+export const schemaC: JSONSchemaType = {
+ type: 'object',
+ required: ['foo'],
+ properties: {
+ foo: { type: 'integer' },
+ },
+ additionalProperties: false,
+ errorMessage: {
+ type: 'should be an object',
+ required: 'should have property foo',
+ additionalProperties: 'should not have properties other than foo',
+ },
+};
+
+export const validDataC: DataC = { foo: 666 };
+export const invalidDataC = { foo: 'kt', bar: 6 };
+export const undefinedDataC = { foo: undefined };
+export const invalidTypeDataC = 'something';
+
+interface DataD {
+ foo: number;
+ bar: string;
+}
+
+export const schemaD: JSONSchemaType = {
+ type: 'object',
+ required: ['foo', 'bar'],
+ properties: {
+ foo: { type: 'integer' },
+ bar: { type: 'string' },
+ },
+ errorMessage: {
+ type: 'should be an object', // will not replace internal "type" error for the property "foo"
+ required: {
+ foo: 'should have an integer property "foo"',
+ bar: 'should have a string property "bar"',
+ },
+ },
+};
+
+export const validDataD: DataD = { foo: 666, bar: 'kt' };
+export const invalidDataD = { foo: 'kt', bar: 6 };
+export const undefinedDataD = { foo: undefined, bar: undefined };
+export const invalidTypeDataD = 'something';
+
+interface DataE {
+ foo: number;
+ bar: string;
+}
+
+export const schemaE: JSONSchemaType = {
+ type: 'object',
+ required: ['foo', 'bar'],
+ allOf: [
+ {
+ properties: {
+ foo: { type: 'integer', minimum: 2 },
+ bar: { type: 'string', minLength: 2 },
+ },
+ additionalProperties: false,
+ },
+ ],
+ errorMessage: {
+ properties: {
+ foo: 'data.foo should be integer >= 2',
+ bar: 'data.bar should be string with length >= 2',
+ },
+ },
+};
+
+export const validDataE: DataE = { foo: 666, bar: 'kt' };
+export const invalidDataE = { foo: 1, bar: 'k' };
+export const undefinedDataE = { foo: undefined, bar: undefined };
+
+interface DataF {
+ foo: number;
+ bar: string;
+}
+
+export const schemaF: JSONSchemaType = {
+ type: 'object',
+ required: ['foo', 'bar'],
+ allOf: [
+ {
+ properties: {
+ foo: { type: 'integer', minimum: 2 },
+ bar: { type: 'string', minLength: 2 },
+ },
+ additionalProperties: false,
+ },
+ ],
+ errorMessage: {
+ type: 'data should be an object',
+ properties: {
+ foo: 'data.foo should be integer >= 2',
+ bar: 'data.bar should be string with length >= 2',
+ },
+ _: 'data should have properties "foo" and "bar" only',
+ },
+};
+
+export const validDataF: DataF = { foo: 666, bar: 'kt' };
+export const invalidDataF = {};
+export const undefinedDataF = { foo: 1, bar: undefined };
+export const invalidTypeDataF = 'something';
+
+export const fieldsRest: Record = {
+ foo: {
+ ref: { name: 'foo' },
+ name: 'foo',
+ },
+ bar: {
+ ref: { name: 'bar' },
+ name: 'bar',
+ },
+ lorem: {
+ ref: { name: 'lorem' },
+ name: 'lorem',
+ },
+};
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/__fixtures__/data.ts b/node_modules/@hookform/resolvers/ajv/src/__tests__/__fixtures__/data.ts
new file mode 100644
index 00000000..edcdf777
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/__fixtures__/data.ts
@@ -0,0 +1,90 @@
+import { JSONSchemaType } from 'ajv';
+import { Field, InternalFieldName } from 'react-hook-form';
+
+interface Data {
+ username: string;
+ password: string;
+ deepObject: { data: string; twoLayersDeep: { name: string } };
+}
+
+export const schema: JSONSchemaType = {
+ type: 'object',
+ properties: {
+ username: {
+ type: 'string',
+ minLength: 3,
+ },
+ password: {
+ type: 'string',
+ pattern: '.*[A-Z].*',
+ errorMessage: {
+ pattern: 'One uppercase character',
+ },
+ },
+ deepObject: {
+ type: 'object',
+ properties: {
+ data: { type: 'string' },
+ twoLayersDeep: {
+ type: 'object',
+ properties: { name: { type: 'string' } },
+ additionalProperties: false,
+ required: ['name'],
+ },
+ },
+ required: ['data', 'twoLayersDeep'],
+ },
+ },
+ required: ['username', 'password', 'deepObject'],
+ additionalProperties: false,
+};
+
+export const validData: Data = {
+ username: 'jsun969',
+ password: 'validPassword',
+ deepObject: {
+ twoLayersDeep: {
+ name: 'deeper',
+ },
+ data: 'data',
+ },
+};
+
+export const invalidData = {
+ username: '__',
+ password: 'invalid-password',
+ deepObject: {
+ data: 233,
+ twoLayersDeep: { name: 123 },
+ },
+};
+
+export const invalidDataWithUndefined = {
+ username: 'jsun969',
+ password: undefined,
+ deepObject: {
+ twoLayersDeep: {
+ name: 'deeper',
+ },
+ data: undefined,
+ },
+};
+
+export const fields: Record = {
+ username: {
+ ref: { name: 'username' },
+ name: 'username',
+ },
+ password: {
+ ref: { name: 'password' },
+ name: 'password',
+ },
+ email: {
+ ref: { name: 'email' },
+ name: 'email',
+ },
+ birthday: {
+ ref: { name: 'birthday' },
+ name: 'birthday',
+ },
+};
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/__snapshots__/ajv-errors.ts.snap b/node_modules/@hookform/resolvers/ajv/src/__tests__/__snapshots__/ajv-errors.ts.snap
new file mode 100644
index 00000000..56062b23
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/__snapshots__/ajv-errors.ts.snap
@@ -0,0 +1,462 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`ajvResolver with errorMessage > should return a default message if there is no specific message for the error when requirement fails 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "data should have properties "foo" and "bar" only",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "data should have properties "foo" and "bar" only",
+ },
+ },
+ "foo": {
+ "message": "data should have properties "foo" and "bar" only",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "data should have properties "foo" and "bar" only",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return a default message if there is no specific message for the error when some properties are undefined 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "data should have properties "foo" and "bar" only",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "data should have properties "foo" and "bar" only",
+ },
+ },
+ "foo": {
+ "message": "data.foo should be integer >= 2",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "minimum",
+ "types": {
+ "minimum": "data.foo should be integer >= 2",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return a default message if there is no specific message for the error when walidation fails 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "data should have properties "foo" and "bar" only",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "data should have properties "foo" and "bar" only",
+ },
+ },
+ "foo": {
+ "message": "data should have properties "foo" and "bar" only",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "data should have properties "foo" and "bar" only",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized error messages for certain keywords when requirement fails 1`] = `
+{
+ "errors": {
+ "foo": {
+ "message": "should have property foo",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "should have property foo",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized error messages for certain keywords when some properties are undefined 1`] = `
+{
+ "errors": {
+ "foo": {
+ "message": "should have property foo",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "should have property foo",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized error messages for certain keywords when walidation fails 1`] = `
+{
+ "errors": {
+ "": {
+ "message": "should not have properties other than foo",
+ "ref": undefined,
+ "type": "additionalProperties",
+ "types": {
+ "additionalProperties": "should not have properties other than foo",
+ },
+ },
+ "foo": {
+ "message": "must be integer",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "type",
+ "types": {
+ "type": "must be integer",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized error messages when requirement fails 1`] = `
+{
+ "errors": {
+ "password": {
+ "message": "password field is required",
+ "ref": {
+ "name": "password",
+ },
+ "type": "required",
+ "types": {
+ "required": "password field is required",
+ },
+ },
+ "username": {
+ "message": "username field is required",
+ "ref": {
+ "name": "username",
+ },
+ "type": "required",
+ "types": {
+ "required": "username field is required",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized error messages when some properties are undefined 1`] = `
+{
+ "errors": {
+ "password": {
+ "message": "password field is required",
+ "ref": {
+ "name": "password",
+ },
+ "type": "required",
+ "types": {
+ "required": "password field is required",
+ },
+ },
+ "username": {
+ "message": "username field is required",
+ "ref": {
+ "name": "username",
+ },
+ "type": "required",
+ "types": {
+ "required": "username field is required",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized error messages when validation fails 1`] = `
+{
+ "errors": {
+ "password": {
+ "message": "One uppercase character",
+ "ref": {
+ "name": "password",
+ },
+ "type": "pattern",
+ "types": {
+ "minLength": "passwords should be at least eight characters long",
+ "pattern": "One uppercase character",
+ },
+ },
+ "username": {
+ "message": "username should be at least three characters long",
+ "ref": {
+ "name": "username",
+ },
+ "type": "minLength",
+ "types": {
+ "minLength": "username should be at least three characters long",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized errors for properties/items when requirement fails 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "must have required property 'bar'",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "must have required property 'bar'",
+ },
+ },
+ "foo": {
+ "message": "must have required property 'foo'",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "must have required property 'foo'",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized errors for properties/items when some properties are undefined 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "must have required property 'bar'",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "must have required property 'bar'",
+ },
+ },
+ "foo": {
+ "message": "must have required property 'foo'",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "must have required property 'foo'",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return customized errors for properties/items when walidation fails 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "data.bar should be string with length >= 2",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "minLength",
+ "types": {
+ "minLength": "data.bar should be string with length >= 2",
+ },
+ },
+ "foo": {
+ "message": "data.foo should be integer >= 2",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "minimum",
+ "types": {
+ "minimum": "data.foo should be integer >= 2",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return different messages for different properties when requirement fails 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "should have a string property "bar"",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "should have a string property "bar"",
+ },
+ },
+ "foo": {
+ "message": "should have an integer property "foo"",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "should have an integer property "foo"",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return different messages for different properties when some properties are undefined 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "should have a string property "bar"",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "required",
+ "types": {
+ "required": "should have a string property "bar"",
+ },
+ },
+ "foo": {
+ "message": "should have an integer property "foo"",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "should have an integer property "foo"",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return different messages for different properties when walidation fails 1`] = `
+{
+ "errors": {
+ "bar": {
+ "message": "must be string",
+ "ref": {
+ "name": "bar",
+ },
+ "type": "type",
+ "types": {
+ "type": "must be string",
+ },
+ },
+ "foo": {
+ "message": "must be integer",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "type",
+ "types": {
+ "type": "must be integer",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return the same customized error message when requirement fails 1`] = `
+{
+ "errors": {
+ "foo": {
+ "message": "should be an object with an integer property foo only",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "should be an object with an integer property foo only",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return the same customized message for all validation failures 1`] = `
+{
+ "errors": {
+ "": {
+ "message": "should be an object with an integer property foo only",
+ "ref": undefined,
+ "type": "additionalProperties",
+ "types": {
+ "additionalProperties": "should be an object with an integer property foo only",
+ },
+ },
+ "foo": {
+ "message": "should be an object with an integer property foo only",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "type",
+ "types": {
+ "type": "should be an object with an integer property foo only",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver with errorMessage > should return the same customized message when some properties are undefined 1`] = `
+{
+ "errors": {
+ "foo": {
+ "message": "should be an object with an integer property foo only",
+ "ref": {
+ "name": "foo",
+ },
+ "type": "required",
+ "types": {
+ "required": "should be an object with an integer property foo only",
+ },
+ },
+ },
+ "values": {},
+}
+`;
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/__snapshots__/ajv.ts.snap b/node_modules/@hookform/resolvers/ajv/src/__tests__/__snapshots__/ajv.ts.snap
new file mode 100644
index 00000000..a113c0e8
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/__snapshots__/ajv.ts.snap
@@ -0,0 +1,245 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`ajvResolver > should return all the error messages from ajvResolver when requirement fails and validateAllFieldCriteria set to true 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "message": "must have required property 'deepObject'",
+ "ref": undefined,
+ "type": "required",
+ },
+ "password": {
+ "message": "must have required property 'password'",
+ "ref": {
+ "name": "password",
+ },
+ "type": "required",
+ },
+ "username": {
+ "message": "must have required property 'username'",
+ "ref": {
+ "name": "username",
+ },
+ "type": "required",
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver > should return all the error messages from ajvResolver when requirement fails and validateAllFieldCriteria set to true and \`mode: sync\` 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "message": "must have required property 'deepObject'",
+ "ref": undefined,
+ "type": "required",
+ },
+ "password": {
+ "message": "must have required property 'password'",
+ "ref": {
+ "name": "password",
+ },
+ "type": "required",
+ },
+ "username": {
+ "message": "must have required property 'username'",
+ "ref": {
+ "name": "username",
+ },
+ "type": "required",
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver > should return all the error messages from ajvResolver when some property is undefined and result will keep the input data structure 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "data": {
+ "message": "must have required property 'data'",
+ "ref": undefined,
+ "type": "required",
+ },
+ },
+ "password": {
+ "message": "must have required property 'password'",
+ "ref": {
+ "name": "password",
+ },
+ "type": "required",
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver > should return all the error messages from ajvResolver when validation fails and validateAllFieldCriteria set to true 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "data": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ "types": {
+ "type": "must be string",
+ },
+ },
+ "twoLayersDeep": {
+ "name": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ "types": {
+ "type": "must be string",
+ },
+ },
+ },
+ },
+ "password": {
+ "message": "One uppercase character",
+ "ref": {
+ "name": "password",
+ },
+ "type": "pattern",
+ "types": {
+ "pattern": "One uppercase character",
+ },
+ },
+ "username": {
+ "message": "must NOT have fewer than 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "minLength",
+ "types": {
+ "minLength": "must NOT have fewer than 3 characters",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver > should return all the error messages from ajvResolver when validation fails and validateAllFieldCriteria set to true and \`mode: sync\` 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "data": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ "types": {
+ "type": "must be string",
+ },
+ },
+ "twoLayersDeep": {
+ "name": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ "types": {
+ "type": "must be string",
+ },
+ },
+ },
+ },
+ "password": {
+ "message": "One uppercase character",
+ "ref": {
+ "name": "password",
+ },
+ "type": "pattern",
+ "types": {
+ "pattern": "One uppercase character",
+ },
+ },
+ "username": {
+ "message": "must NOT have fewer than 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "minLength",
+ "types": {
+ "minLength": "must NOT have fewer than 3 characters",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver > should return single error message from ajvResolver when validation fails and validateAllFieldCriteria set to false 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "data": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ },
+ "twoLayersDeep": {
+ "name": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ },
+ },
+ },
+ "password": {
+ "message": "One uppercase character",
+ "ref": {
+ "name": "password",
+ },
+ "type": "pattern",
+ },
+ "username": {
+ "message": "must NOT have fewer than 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "minLength",
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`ajvResolver > should return single error message from ajvResolver when validation fails and validateAllFieldCriteria set to false and \`mode: sync\` 1`] = `
+{
+ "errors": {
+ "deepObject": {
+ "data": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ },
+ "twoLayersDeep": {
+ "name": {
+ "message": "must be string",
+ "ref": undefined,
+ "type": "type",
+ },
+ },
+ },
+ "password": {
+ "message": "One uppercase character",
+ "ref": {
+ "name": "password",
+ },
+ "type": "pattern",
+ },
+ "username": {
+ "message": "must NOT have fewer than 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "minLength",
+ },
+ },
+ "values": {},
+}
+`;
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/ajv-errors.ts b/node_modules/@hookform/resolvers/ajv/src/__tests__/ajv-errors.ts
new file mode 100644
index 00000000..63726ce2
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/ajv-errors.ts
@@ -0,0 +1,227 @@
+import { ajvResolver } from '..';
+import * as fixture from './__fixtures__/data-errors';
+
+const shouldUseNativeValidation = false;
+
+describe('ajvResolver with errorMessage', () => {
+ it('should return values when validation pass', async () => {
+ expect(
+ await ajvResolver(fixture.schemaA)(fixture.validDataA, undefined, {
+ fields: fixture.fieldsA,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toEqual({
+ values: fixture.validDataA,
+ errors: {},
+ });
+ });
+
+ it('should return customized error messages when validation fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaA)(
+ fixture.invalidDataA,
+ {},
+ {
+ fields: fixture.fieldsA,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized error messages when requirement fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaA)({}, undefined, {
+ fields: fixture.fieldsA,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized error messages when some properties are undefined', async () => {
+ expect(
+ await ajvResolver(fixture.schemaA, undefined, { mode: 'sync' })(
+ fixture.undefinedDataA,
+ undefined,
+ {
+ fields: fixture.fieldsA,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return the same customized message for all validation failures', async () => {
+ expect(
+ await ajvResolver(fixture.schemaB)(
+ fixture.invalidDataB,
+ {},
+ {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return the same customized error message when requirement fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaB)({}, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return the same customized message when some properties are undefined', async () => {
+ expect(
+ await ajvResolver(fixture.schemaB)(fixture.undefinedDataB, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized error messages for certain keywords when walidation fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaC)(
+ fixture.invalidDataC,
+ {},
+ {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized error messages for certain keywords when requirement fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaC)({}, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized error messages for certain keywords when some properties are undefined', async () => {
+ expect(
+ await ajvResolver(fixture.schemaC)(fixture.undefinedDataC, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return different messages for different properties when walidation fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaD)(
+ fixture.invalidDataD,
+ {},
+ {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return different messages for different properties when requirement fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaD)({}, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return different messages for different properties when some properties are undefined', async () => {
+ expect(
+ await ajvResolver(fixture.schemaD)(fixture.undefinedDataD, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized errors for properties/items when walidation fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaE)(
+ fixture.invalidDataE,
+ {},
+ {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized errors for properties/items when requirement fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaE)({}, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return customized errors for properties/items when some properties are undefined', async () => {
+ expect(
+ await ajvResolver(fixture.schemaE)(fixture.undefinedDataE, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return a default message if there is no specific message for the error when walidation fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaF)(
+ fixture.invalidDataF,
+ {},
+ {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return a default message if there is no specific message for the error when requirement fails', async () => {
+ expect(
+ await ajvResolver(fixture.schemaF)({}, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return a default message if there is no specific message for the error when some properties are undefined', async () => {
+ expect(
+ await ajvResolver(fixture.schemaF)(fixture.undefinedDataF, undefined, {
+ fields: fixture.fieldsRest,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+});
diff --git a/node_modules/@hookform/resolvers/ajv/src/__tests__/ajv.ts b/node_modules/@hookform/resolvers/ajv/src/__tests__/ajv.ts
new file mode 100644
index 00000000..738de9aa
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/__tests__/ajv.ts
@@ -0,0 +1,103 @@
+import { ajvResolver } from '..';
+import {
+ fields,
+ invalidData,
+ invalidDataWithUndefined,
+ schema,
+ validData,
+} from './__fixtures__/data';
+
+const shouldUseNativeValidation = false;
+
+describe('ajvResolver', () => {
+ it('should return values from ajvResolver when validation pass', async () => {
+ expect(
+ await ajvResolver(schema)(validData, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ }),
+ ).toEqual({
+ values: validData,
+ errors: {},
+ });
+ });
+
+ it('should return values from ajvResolver with `mode: sync` when validation pass', async () => {
+ expect(
+ await ajvResolver(schema, undefined, {
+ mode: 'sync',
+ })(validData, undefined, { fields, shouldUseNativeValidation }),
+ ).toEqual({
+ values: validData,
+ errors: {},
+ });
+ });
+
+ it('should return single error message from ajvResolver when validation fails and validateAllFieldCriteria set to false', async () => {
+ expect(
+ await ajvResolver(schema)(invalidData, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return single error message from ajvResolver when validation fails and validateAllFieldCriteria set to false and `mode: sync`', async () => {
+ expect(
+ await ajvResolver(schema, undefined, {
+ mode: 'sync',
+ })(invalidData, undefined, { fields, shouldUseNativeValidation }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return all the error messages from ajvResolver when validation fails and validateAllFieldCriteria set to true', async () => {
+ expect(
+ await ajvResolver(schema)(
+ invalidData,
+ {},
+ { fields, criteriaMode: 'all', shouldUseNativeValidation },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return all the error messages from ajvResolver when validation fails and validateAllFieldCriteria set to true and `mode: sync`', async () => {
+ expect(
+ await ajvResolver(schema, undefined, { mode: 'sync' })(
+ invalidData,
+ {},
+ { fields, criteriaMode: 'all', shouldUseNativeValidation },
+ ),
+ ).toMatchSnapshot();
+ });
+
+ it('should return all the error messages from ajvResolver when requirement fails and validateAllFieldCriteria set to true', async () => {
+ expect(
+ await ajvResolver(schema)({}, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return all the error messages from ajvResolver when requirement fails and validateAllFieldCriteria set to true and `mode: sync`', async () => {
+ expect(
+ await ajvResolver(schema, undefined, { mode: 'sync' })({}, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ }),
+ ).toMatchSnapshot();
+ });
+
+ it('should return all the error messages from ajvResolver when some property is undefined and result will keep the input data structure', async () => {
+ expect(
+ await ajvResolver(schema, undefined, { mode: 'sync' })(
+ invalidDataWithUndefined,
+ undefined,
+ {
+ fields,
+ shouldUseNativeValidation,
+ },
+ ),
+ ).toMatchSnapshot();
+ });
+});
diff --git a/node_modules/@hookform/resolvers/ajv/src/ajv.ts b/node_modules/@hookform/resolvers/ajv/src/ajv.ts
new file mode 100644
index 00000000..12f34a5a
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/ajv.ts
@@ -0,0 +1,123 @@
+import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';
+import Ajv, { DefinedError } from 'ajv';
+import ajvErrors from 'ajv-errors';
+import addFormats from 'ajv-formats';
+import { FieldError, appendErrors } from 'react-hook-form';
+import { AjvError, Resolver } from './types';
+
+const parseErrorSchema = (
+ ajvErrors: AjvError[],
+ validateAllFieldCriteria: boolean,
+) => {
+ const parsedErrors: Record = {};
+
+ const reduceError = (error: AjvError) => {
+ // Ajv will return empty instancePath when require error
+ if (error.keyword === 'required') {
+ error.instancePath += `/${error.params.missingProperty}`;
+ }
+
+ // `/deepObject/data` -> `deepObject.data`
+ const path = error.instancePath.substring(1).replace(/\//g, '.');
+
+ if (!parsedErrors[path]) {
+ parsedErrors[path] = {
+ message: error.message,
+ type: error.keyword,
+ };
+ }
+
+ if (validateAllFieldCriteria) {
+ const types = parsedErrors[path].types;
+ const messages = types && types[error.keyword];
+
+ parsedErrors[path] = appendErrors(
+ path,
+ validateAllFieldCriteria,
+ parsedErrors,
+ error.keyword,
+ messages
+ ? ([] as string[]).concat(messages as string[], error.message || '')
+ : error.message,
+ ) as FieldError;
+ }
+ };
+
+ for (let index = 0; index < ajvErrors.length; index += 1) {
+ const error = ajvErrors[index];
+
+ if (error.keyword === 'errorMessage') {
+ error.params.errors.forEach((originalError) => {
+ originalError.message = error.message;
+ reduceError(originalError);
+ });
+ } else {
+ reduceError(error);
+ }
+ }
+
+ return parsedErrors;
+};
+
+/**
+ * Creates a resolver for react-hook-form using Ajv schema validation
+ * @param {Schema} schema - The Ajv schema to validate against
+ * @param {Object} schemaOptions - Additional schema validation options
+ * @param {Object} resolverOptions - Additional resolver configuration
+ * @param {string} [resolverOptions.mode='async'] - Validation mode
+ * @returns {Resolver} A resolver function compatible with react-hook-form
+ * @example
+ * const schema = ajv.compile({
+ * type: 'object',
+ * properties: {
+ * name: { type: 'string' },
+ * age: { type: 'number' }
+ * }
+ * });
+ *
+ * useForm({
+ * resolver: ajvResolver(schema)
+ * });
+ */
+export const ajvResolver: Resolver =
+ (schema, schemaOptions, resolverOptions = {}) =>
+ async (values, _, options) => {
+ const ajv = new Ajv(
+ Object.assign(
+ {},
+ {
+ allErrors: true,
+ validateSchema: true,
+ },
+ schemaOptions,
+ ),
+ );
+
+ ajvErrors(ajv);
+ addFormats(ajv);
+
+ const validate = ajv.compile(
+ Object.assign(
+ { $async: resolverOptions && resolverOptions.mode === 'async' },
+ schema,
+ ),
+ );
+
+ const valid = validate(values);
+
+ options.shouldUseNativeValidation && validateFieldsNatively({}, options);
+
+ return valid
+ ? { values, errors: {} }
+ : {
+ values: {},
+ errors: toNestErrors(
+ parseErrorSchema(
+ validate.errors as DefinedError[],
+ !options.shouldUseNativeValidation &&
+ options.criteriaMode === 'all',
+ ),
+ options,
+ ),
+ };
+ };
diff --git a/node_modules/@hookform/resolvers/ajv/src/index.ts b/node_modules/@hookform/resolvers/ajv/src/index.ts
new file mode 100644
index 00000000..5844f91e
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/index.ts
@@ -0,0 +1,2 @@
+export * from './ajv';
+export * from './types';
diff --git a/node_modules/@hookform/resolvers/ajv/src/types.ts b/node_modules/@hookform/resolvers/ajv/src/types.ts
new file mode 100644
index 00000000..6726ccda
--- /dev/null
+++ b/node_modules/@hookform/resolvers/ajv/src/types.ts
@@ -0,0 +1,20 @@
+import * as Ajv from 'ajv';
+import type { DefinedError, ErrorObject } from 'ajv';
+import { FieldValues, ResolverOptions, ResolverResult } from 'react-hook-form';
+
+export type Resolver = (
+ schema: Ajv.JSONSchemaType,
+ schemaOptions?: Ajv.Options,
+ factoryOptions?: { mode?: 'async' | 'sync' },
+) => (
+ values: TFieldValues,
+ context: TContext | undefined,
+ options: ResolverOptions,
+) => Promise>;
+
+// ajv doesn't export any types for errors with `keyword='errorMessage'`
+type ErrorMessage = ErrorObject<
+ 'errorMessage',
+ { errors: (DefinedError & { emUsed: boolean })[] }
+>;
+export type AjvError = ErrorMessage | DefinedError;
diff --git a/node_modules/@hookform/resolvers/arktype/dist/arktype.d.ts b/node_modules/@hookform/resolvers/arktype/dist/arktype.d.ts
new file mode 100644
index 00000000..c82f6122
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/dist/arktype.d.ts
@@ -0,0 +1,8 @@
+import { StandardSchemaV1 } from '@standard-schema/spec';
+import { FieldValues, Resolver } from 'react-hook-form';
+export declare function arktypeResolver(schema: StandardSchemaV1, _schemaOptions?: never, resolverOptions?: {
+ raw?: false;
+}): Resolver;
+export declare function arktypeResolver(schema: StandardSchemaV1, _schemaOptions: never | undefined, resolverOptions: {
+ raw: true;
+}): Resolver;
diff --git a/node_modules/@hookform/resolvers/arktype/dist/arktype.js b/node_modules/@hookform/resolvers/arktype/dist/arktype.js
new file mode 100644
index 00000000..05509402
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/dist/arktype.js
@@ -0,0 +1,2 @@
+var e=require("@hookform/resolvers");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r = {};\n\n for (let i = 0; i < issues.length; i++) {\n const error = issues[i];\n const path = getDotPath(error);\n\n if (path) {\n if (!errors[path]) {\n errors[path] = { message: error.message, type: '' };\n }\n\n if (validateAllFieldCriteria) {\n const types = errors[path].types || {};\n\n errors[path].types = {\n ...types,\n [Object.keys(types).length]: error.message,\n };\n }\n }\n }\n\n return errors;\n}\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions?: {\n raw?: false;\n },\n): Resolver;\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions: never | undefined,\n resolverOptions: {\n raw: true;\n },\n): Resolver;\n\n/**\n * Creates a resolver for react-hook-form using Arktype schema validation\n * @param {Schema} schema - The Arktype schema to validate against\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='raw'] - Return the raw input values rather than the parsed values\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = type({\n * username: 'string>2'\n * });\n *\n * useForm({\n * resolver: arktypeResolver(schema)\n * });\n */\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions: {\n raw?: boolean;\n } = {},\n): Resolver {\n return async (values: Input, _, options) => {\n let result = schema['~standard'].validate(values);\n if (result instanceof Promise) {\n result = await result;\n }\n\n if (result.issues) {\n const errors = parseErrorSchema(\n result.issues,\n !options.shouldUseNativeValidation && options.criteriaMode === 'all',\n );\n\n return {\n values: {},\n errors: toNestErrors(errors, options),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : result.value,\n errors: {},\n };\n };\n}\n"],"names":["getDotPath","issue","path","length","dotPath","item","key","schema","_schemaOptions","resolverOptions","values","_","options","_temp2","result","issues","errors","validateAllFieldCriteria","i","error","message","type","_extends2","types","_extends","Object","keys","parseErrorSchema","shouldUseNativeValidation","criteriaMode","toNestErrors","validateFieldsNatively","raw","assign","value","validate","_temp","Promise","resolve","then","_result","e","reject"],"mappings":"6PACA,SAASA,EAAWC,GAClB,GAAIA,EAAMC,MAAMC,OAAQ,CACtB,IAAIC,EAAU,GACd,IAAK,MAAMC,KAAQJ,EAAMC,KAAM,CAC7B,MAAMI,EAAsB,iBAATD,EAAoBA,EAAKC,IAAMD,EAClD,GAAmB,iBAARC,GAAmC,iBAARA,EAOpC,OAAO,KALLF,GADEA,EACS,IAAIE,IAEJA,CAKhB,CACD,OAAOF,CACR,CACD,OAAO,IACT,yBC8CM,SACJG,EACAC,EACAC,GAIA,gBAJAA,IAAAA,EAEI,CAAE,GAEQC,SAAAA,EAAeC,EAAGC,GAAO,IAAIC,IAAAA,aAMzC,GAAIC,EAAOC,OAAQ,CACjB,IAAMC,EA1EZ,SACED,EACAE,GAIA,IAFA,IAAMD,EAAqC,GAElCE,EAAI,EAAGA,EAAIH,EAAOZ,OAAQe,IAAK,CACtC,IAAMC,EAAQJ,EAAOG,GACfhB,EAAOF,EAAWmB,GAExB,GAAIjB,IACGc,EAAOd,KACVc,EAAOd,GAAQ,CAAEkB,QAASD,EAAMC,QAASC,KAAM,KAG7CJ,GAA0B,CAAAK,IAAAA,EACtBC,EAAQP,EAAOd,GAAMqB,OAAS,GAEpCP,EAAOd,GAAMqB,MAAKC,KACbD,IAAKD,EAAA,CAAA,GACPG,OAAOC,KAAKH,GAAOpB,QAASgB,EAAMC,QAAOE,GAE9C,CAEJ,CAEA,OAAON,CACT,CA+CqBW,CACbb,EAAOC,QACNH,EAAQgB,2BAAsD,QAAzBhB,EAAQiB,cAGhD,MAAO,CACLnB,OAAQ,CAAA,EACRM,OAAQc,eAAad,EAAQJ,GAEjC,CAIA,OAFAA,EAAQgB,2BAA6BG,EAAAA,uBAAuB,CAAA,EAAInB,GAEzD,CACLF,OAAQD,EAAgBuB,IAAMP,OAAOQ,OAAO,CAAA,EAAIvB,GAAUI,EAAOoB,MACjElB,OAAQ,CAAA,EACR,EAtBEF,EAASP,EAAO,aAAa4B,SAASzB,GAAQ0B,gBAC9CtB,aAAkBuB,QAAO,OAAAA,QAAAC,QACZxB,GAAMyB,KAAA,SAAAC,GAArB1B,EAAM0B,CAAgB,EAAAH,IAAAA,OAAAA,QAAAC,QAAAF,GAAAA,EAAAG,KAAAH,EAAAG,KAAA1B,GAAAA,IAqB1B,CAAC,MAAA4B,GAAAJ,OAAAA,QAAAK,OAAAD,EACH,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/arktype/dist/arktype.mjs b/node_modules/@hookform/resolvers/arktype/dist/arktype.mjs
new file mode 100644
index 00000000..ee2f1ee0
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/dist/arktype.mjs
@@ -0,0 +1,2 @@
+import{toNestErrors as e,validateFieldsNatively as r}from"@hookform/resolvers";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;r{let u=s["~standard"].validate(o);if(u instanceof Promise&&(u=await u),u.issues){const t=function(e,t){const s={};for(let o=0;o = {};\n\n for (let i = 0; i < issues.length; i++) {\n const error = issues[i];\n const path = getDotPath(error);\n\n if (path) {\n if (!errors[path]) {\n errors[path] = { message: error.message, type: '' };\n }\n\n if (validateAllFieldCriteria) {\n const types = errors[path].types || {};\n\n errors[path].types = {\n ...types,\n [Object.keys(types).length]: error.message,\n };\n }\n }\n }\n\n return errors;\n}\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions?: {\n raw?: false;\n },\n): Resolver;\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions: never | undefined,\n resolverOptions: {\n raw: true;\n },\n): Resolver;\n\n/**\n * Creates a resolver for react-hook-form using Arktype schema validation\n * @param {Schema} schema - The Arktype schema to validate against\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='raw'] - Return the raw input values rather than the parsed values\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = type({\n * username: 'string>2'\n * });\n *\n * useForm({\n * resolver: arktypeResolver(schema)\n * });\n */\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions: {\n raw?: boolean;\n } = {},\n): Resolver {\n return async (values: Input, _, options) => {\n let result = schema['~standard'].validate(values);\n if (result instanceof Promise) {\n result = await result;\n }\n\n if (result.issues) {\n const errors = parseErrorSchema(\n result.issues,\n !options.shouldUseNativeValidation && options.criteriaMode === 'all',\n );\n\n return {\n values: {},\n errors: toNestErrors(errors, options),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : result.value,\n errors: {},\n };\n };\n}\n"],"names":["getDotPath","issue","path","length","dotPath","item","key","arktypeResolver","schema","_schemaOptions","resolverOptions","values","_","options","result","validate","Promise","issues","errors","validateAllFieldCriteria","i","error","message","type","types","_extends","Object","keys","parseErrorSchema","shouldUseNativeValidation","criteriaMode","toNestErrors","validateFieldsNatively","raw","assign","value"],"mappings":"uSACA,SAASA,EAAWC,GAClB,GAAIA,EAAMC,MAAMC,OAAQ,CACtB,IAAIC,EAAU,GACd,IAAK,MAAMC,KAAQJ,EAAMC,KAAM,CAC7B,MAAMI,EAAsB,iBAATD,EAAoBA,EAAKC,IAAMD,EAClD,GAAmB,iBAARC,GAAmC,iBAARA,EAOpC,OAAO,KALLF,GADEA,EACS,IAAIE,IAEJA,CAKhB,CACD,OAAOF,CACR,CACD,OAAO,IACT,CC8CgB,SAAAG,EACdC,EACAC,EACAC,EAEI,CAAE,GAEN,OAAcC,MAAAA,EAAeC,EAAGC,KAC9B,IAAIC,EAASN,EAAO,aAAaO,SAASJ,GAK1C,GAJIG,aAAkBE,UACpBF,QAAeA,GAGbA,EAAOG,OAAQ,CACjB,MAAMC,EA1EZ,SACED,EACAE,GAEA,MAAMD,EAAqC,CAAA,EAE3C,IAAK,IAAIE,EAAI,EAAGA,EAAIH,EAAOd,OAAQiB,IAAK,CACtC,MAAMC,EAAQJ,EAAOG,GACflB,EAAOF,EAAWqB,GAExB,GAAInB,IACGgB,EAAOhB,KACVgB,EAAOhB,GAAQ,CAAEoB,QAASD,EAAMC,QAASC,KAAM,KAG7CJ,GAA0B,CAC5B,MAAMK,EAAQN,EAAOhB,GAAMsB,OAAS,CAAA,EAEpCN,EAAOhB,GAAMsB,MAAKC,KACbD,EAAK,CACR,CAACE,OAAOC,KAAKH,GAAOrB,QAASkB,EAAMC,SAEvC,CAEJ,CAEA,OAAOJ,CACT,CA+CqBU,CACbd,EAAOG,QACNJ,EAAQgB,2BAAsD,QAAzBhB,EAAQiB,cAGhD,MAAO,CACLnB,OAAQ,CAAE,EACVO,OAAQa,EAAab,EAAQL,GAEjC,CAIA,OAFAA,EAAQgB,2BAA6BG,EAAuB,CAAE,EAAEnB,GAEzD,CACLF,OAAQD,EAAgBuB,IAAMP,OAAOQ,OAAO,CAAA,EAAIvB,GAAUG,EAAOqB,MACjEjB,OAAQ,IAGd"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/arktype/dist/arktype.module.js b/node_modules/@hookform/resolvers/arktype/dist/arktype.module.js
new file mode 100644
index 00000000..ee2f1ee0
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/dist/arktype.module.js
@@ -0,0 +1,2 @@
+import{toNestErrors as e,validateFieldsNatively as r}from"@hookform/resolvers";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;r = {};\n\n for (let i = 0; i < issues.length; i++) {\n const error = issues[i];\n const path = getDotPath(error);\n\n if (path) {\n if (!errors[path]) {\n errors[path] = { message: error.message, type: '' };\n }\n\n if (validateAllFieldCriteria) {\n const types = errors[path].types || {};\n\n errors[path].types = {\n ...types,\n [Object.keys(types).length]: error.message,\n };\n }\n }\n }\n\n return errors;\n}\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions?: {\n raw?: false;\n },\n): Resolver;\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions: never | undefined,\n resolverOptions: {\n raw: true;\n },\n): Resolver;\n\n/**\n * Creates a resolver for react-hook-form using Arktype schema validation\n * @param {Schema} schema - The Arktype schema to validate against\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='raw'] - Return the raw input values rather than the parsed values\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = type({\n * username: 'string>2'\n * });\n *\n * useForm({\n * resolver: arktypeResolver(schema)\n * });\n */\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions: {\n raw?: boolean;\n } = {},\n): Resolver {\n return async (values: Input, _, options) => {\n let result = schema['~standard'].validate(values);\n if (result instanceof Promise) {\n result = await result;\n }\n\n if (result.issues) {\n const errors = parseErrorSchema(\n result.issues,\n !options.shouldUseNativeValidation && options.criteriaMode === 'all',\n );\n\n return {\n values: {},\n errors: toNestErrors(errors, options),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : result.value,\n errors: {},\n };\n };\n}\n"],"names":["getDotPath","issue","path","length","dotPath","item","key","arktypeResolver","schema","_schemaOptions","resolverOptions","values","_","options","_temp2","result","issues","errors","validateAllFieldCriteria","i","error","message","type","_extends2","types","_extends","Object","keys","parseErrorSchema","shouldUseNativeValidation","criteriaMode","toNestErrors","validateFieldsNatively","raw","assign","value","validate","_temp","Promise","resolve","then","_result","e","reject"],"mappings":"uSACA,SAASA,EAAWC,GAClB,GAAIA,EAAMC,MAAMC,OAAQ,CACtB,IAAIC,EAAU,GACd,IAAK,MAAMC,KAAQJ,EAAMC,KAAM,CAC7B,MAAMI,EAAsB,iBAATD,EAAoBA,EAAKC,IAAMD,EAClD,GAAmB,iBAARC,GAAmC,iBAARA,EAOpC,OAAO,KALLF,GADEA,EACS,IAAIE,IAEJA,CAKhB,CACD,OAAOF,CACR,CACD,OAAO,IACT,CC8CM,SAAUG,EACdC,EACAC,EACAC,GAIA,gBAJAA,IAAAA,EAEI,CAAE,GAEQC,SAAAA,EAAeC,EAAGC,GAAO,IAAIC,IAAAA,aAMzC,GAAIC,EAAOC,OAAQ,CACjB,IAAMC,EA1EZ,SACED,EACAE,GAIA,IAFA,IAAMD,EAAqC,GAElCE,EAAI,EAAGA,EAAIH,EAAOb,OAAQgB,IAAK,CACtC,IAAMC,EAAQJ,EAAOG,GACfjB,EAAOF,EAAWoB,GAExB,GAAIlB,IACGe,EAAOf,KACVe,EAAOf,GAAQ,CAAEmB,QAASD,EAAMC,QAASC,KAAM,KAG7CJ,GAA0B,CAAAK,IAAAA,EACtBC,EAAQP,EAAOf,GAAMsB,OAAS,GAEpCP,EAAOf,GAAMsB,MAAKC,KACbD,IAAKD,EAAA,CAAA,GACPG,OAAOC,KAAKH,GAAOrB,QAASiB,EAAMC,QAAOE,GAE9C,CAEJ,CAEA,OAAON,CACT,CA+CqBW,CACbb,EAAOC,QACNH,EAAQgB,2BAAsD,QAAzBhB,EAAQiB,cAGhD,MAAO,CACLnB,OAAQ,CAAA,EACRM,OAAQc,EAAad,EAAQJ,GAEjC,CAIA,OAFAA,EAAQgB,2BAA6BG,EAAuB,CAAA,EAAInB,GAEzD,CACLF,OAAQD,EAAgBuB,IAAMP,OAAOQ,OAAO,CAAA,EAAIvB,GAAUI,EAAOoB,MACjElB,OAAQ,CAAA,EACR,EAtBEF,EAASP,EAAO,aAAa4B,SAASzB,GAAQ0B,gBAC9CtB,aAAkBuB,QAAO,OAAAA,QAAAC,QACZxB,GAAMyB,KAAA,SAAAC,GAArB1B,EAAM0B,CAAgB,EAAAH,IAAAA,OAAAA,QAAAC,QAAAF,GAAAA,EAAAG,KAAAH,EAAAG,KAAA1B,GAAAA,IAqB1B,CAAC,MAAA4B,GAAAJ,OAAAA,QAAAK,OAAAD,EACH,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/arktype/dist/arktype.umd.js b/node_modules/@hookform/resolvers/arktype/dist/arktype.umd.js
new file mode 100644
index 00000000..cc63becb
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/dist/arktype.umd.js
@@ -0,0 +1,2 @@
+!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@hookform/resolvers")):"function"==typeof define&&define.amd?define(["exports","@hookform/resolvers"],r):r((e||self).hookformResolversArktype={},e.hookformResolvers)}(this,function(e,r){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;r = {};\n\n for (let i = 0; i < issues.length; i++) {\n const error = issues[i];\n const path = getDotPath(error);\n\n if (path) {\n if (!errors[path]) {\n errors[path] = { message: error.message, type: '' };\n }\n\n if (validateAllFieldCriteria) {\n const types = errors[path].types || {};\n\n errors[path].types = {\n ...types,\n [Object.keys(types).length]: error.message,\n };\n }\n }\n }\n\n return errors;\n}\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions?: {\n raw?: false;\n },\n): Resolver;\n\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions: never | undefined,\n resolverOptions: {\n raw: true;\n },\n): Resolver;\n\n/**\n * Creates a resolver for react-hook-form using Arktype schema validation\n * @param {Schema} schema - The Arktype schema to validate against\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='raw'] - Return the raw input values rather than the parsed values\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * const schema = type({\n * username: 'string>2'\n * });\n *\n * useForm({\n * resolver: arktypeResolver(schema)\n * });\n */\nexport function arktypeResolver(\n schema: StandardSchemaV1,\n _schemaOptions?: never,\n resolverOptions: {\n raw?: boolean;\n } = {},\n): Resolver {\n return async (values: Input, _, options) => {\n let result = schema['~standard'].validate(values);\n if (result instanceof Promise) {\n result = await result;\n }\n\n if (result.issues) {\n const errors = parseErrorSchema(\n result.issues,\n !options.shouldUseNativeValidation && options.criteriaMode === 'all',\n );\n\n return {\n values: {},\n errors: toNestErrors(errors, options),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : result.value,\n errors: {},\n };\n };\n}\n"],"names":["getDotPath","issue","path","length","dotPath","item","key","schema","_schemaOptions","resolverOptions","values","_","options","_temp2","result","issues","errors","validateAllFieldCriteria","i","error","message","type","_extends2","types","_extends","Object","keys","parseErrorSchema","shouldUseNativeValidation","criteriaMode","toNestErrors","validateFieldsNatively","raw","assign","value","validate","_temp","Promise","resolve","then","_result","e","reject"],"mappings":"qhBACA,SAASA,EAAWC,GAClB,GAAIA,EAAMC,MAAMC,OAAQ,CACtB,IAAIC,EAAU,GACd,IAAK,MAAMC,KAAQJ,EAAMC,KAAM,CAC7B,MAAMI,EAAsB,iBAATD,EAAoBA,EAAKC,IAAMD,EAClD,GAAmB,iBAARC,GAAmC,iBAARA,EAOpC,OAAO,KALLF,GADEA,EACS,IAAIE,IAEJA,CAKhB,CACD,OAAOF,CACR,CACD,OAAO,IACT,mBC8CM,SACJG,EACAC,EACAC,GAIA,gBAJAA,IAAAA,EAEI,CAAE,GAEQC,SAAAA,EAAeC,EAAGC,GAAO,IAAIC,IAAAA,aAMzC,GAAIC,EAAOC,OAAQ,CACjB,IAAMC,EA1EZ,SACED,EACAE,GAIA,IAFA,IAAMD,EAAqC,GAElCE,EAAI,EAAGA,EAAIH,EAAOZ,OAAQe,IAAK,CACtC,IAAMC,EAAQJ,EAAOG,GACfhB,EAAOF,EAAWmB,GAExB,GAAIjB,IACGc,EAAOd,KACVc,EAAOd,GAAQ,CAAEkB,QAASD,EAAMC,QAASC,KAAM,KAG7CJ,GAA0B,CAAAK,IAAAA,EACtBC,EAAQP,EAAOd,GAAMqB,OAAS,GAEpCP,EAAOd,GAAMqB,MAAKC,KACbD,IAAKD,EAAA,CAAA,GACPG,OAAOC,KAAKH,GAAOpB,QAASgB,EAAMC,QAAOE,GAE9C,CAEJ,CAEA,OAAON,CACT,CA+CqBW,CACbb,EAAOC,QACNH,EAAQgB,2BAAsD,QAAzBhB,EAAQiB,cAGhD,MAAO,CACLnB,OAAQ,CAAA,EACRM,OAAQc,eAAad,EAAQJ,GAEjC,CAIA,OAFAA,EAAQgB,2BAA6BG,EAAAA,uBAAuB,CAAA,EAAInB,GAEzD,CACLF,OAAQD,EAAgBuB,IAAMP,OAAOQ,OAAO,CAAA,EAAIvB,GAAUI,EAAOoB,MACjElB,OAAQ,CAAA,EACR,EAtBEF,EAASP,EAAO,aAAa4B,SAASzB,GAAQ0B,gBAC9CtB,aAAkBuB,QAAO,OAAAA,QAAAC,QACZxB,GAAMyB,KAAA,SAAAC,GAArB1B,EAAM0B,CAAgB,EAAAH,IAAAA,OAAAA,QAAAC,QAAAF,GAAAA,EAAAG,KAAAH,EAAAG,KAAA1B,GAAAA,IAqB1B,CAAC,MAAA4B,GAAAJ,OAAAA,QAAAK,OAAAD,EACH,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/arktype/dist/index.d.ts b/node_modules/@hookform/resolvers/arktype/dist/index.d.ts
new file mode 100644
index 00000000..686e8490
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/dist/index.d.ts
@@ -0,0 +1 @@
+export * from './arktype';
diff --git a/node_modules/@hookform/resolvers/arktype/package.json b/node_modules/@hookform/resolvers/arktype/package.json
new file mode 100644
index 00000000..7056cd37
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@hookform/resolvers/arktype",
+ "amdName": "hookformResolversArktype",
+ "version": "2.0.0",
+ "private": true,
+ "description": "React Hook Form validation resolver: arktype",
+ "main": "dist/arktype.js",
+ "module": "dist/arktype.module.js",
+ "umd:main": "dist/arktype.umd.js",
+ "source": "src/index.ts",
+ "types": "dist/index.d.ts",
+ "license": "MIT",
+ "peerDependencies": {
+ "react-hook-form": "^7.55.0",
+ "@hookform/resolvers": "^2.0.0",
+ "arktype": "^2.0.0"
+ }
+}
diff --git a/node_modules/@hookform/resolvers/arktype/src/__tests__/Form-native-validation.tsx b/node_modules/@hookform/resolvers/arktype/src/__tests__/Form-native-validation.tsx
new file mode 100644
index 00000000..2e007dc9
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/__tests__/Form-native-validation.tsx
@@ -0,0 +1,82 @@
+import { render, screen } from '@testing-library/react';
+import user from '@testing-library/user-event';
+import { type } from 'arktype';
+import React from 'react';
+import { useForm } from 'react-hook-form';
+import { arktypeResolver } from '..';
+
+const schema = type({
+ username: 'string>1',
+ password: 'string>1',
+});
+
+type FormData = typeof schema.infer;
+
+interface Props {
+ onSubmit: (data: FormData) => void;
+}
+
+function TestComponent({ onSubmit }: Props) {
+ const { register, handleSubmit } = useForm({
+ resolver: arktypeResolver(schema),
+ shouldUseNativeValidation: true,
+ });
+
+ return (
+
+ );
+}
+
+test("form's native validation with Arktype", async () => {
+ const handleSubmit = vi.fn();
+ render();
+
+ // username
+ let usernameField = screen.getByPlaceholderText(
+ /username/i,
+ ) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(true);
+ expect(usernameField.validationMessage).toBe('');
+
+ // password
+ let passwordField = screen.getByPlaceholderText(
+ /password/i,
+ ) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(true);
+ expect(passwordField.validationMessage).toBe('');
+
+ await user.click(screen.getByText(/submit/i));
+
+ // username
+ usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(false);
+ expect(usernameField.validationMessage).toBe(
+ 'username must be at least length 2',
+ );
+
+ // password
+ passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(false);
+ expect(passwordField.validationMessage).toBe(
+ 'password must be at least length 2',
+ );
+
+ await user.type(screen.getByPlaceholderText(/username/i), 'joe');
+ await user.type(screen.getByPlaceholderText(/password/i), 'password');
+
+ // username
+ usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(true);
+ expect(usernameField.validationMessage).toBe('');
+
+ // password
+ passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(true);
+ expect(passwordField.validationMessage).toBe('');
+});
diff --git a/node_modules/@hookform/resolvers/arktype/src/__tests__/Form.tsx b/node_modules/@hookform/resolvers/arktype/src/__tests__/Form.tsx
new file mode 100644
index 00000000..5aec3a28
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/__tests__/Form.tsx
@@ -0,0 +1,54 @@
+import { render, screen } from '@testing-library/react';
+import user from '@testing-library/user-event';
+import { type } from 'arktype';
+import React from 'react';
+import { useForm } from 'react-hook-form';
+import { arktypeResolver } from '..';
+
+const schema = type({
+ username: 'string>1',
+ password: 'string>1',
+});
+
+function TestComponent({
+ onSubmit,
+}: {
+ onSubmit: (data: typeof schema.infer) => void;
+}) {
+ const {
+ register,
+ handleSubmit,
+ formState: { errors },
+ } = useForm({
+ resolver: arktypeResolver(schema), // Useful to check TypeScript regressions
+ });
+
+ return (
+
+ );
+}
+
+test("form's validation with arkType and TypeScript's integration", async () => {
+ const handleSubmit = vi.fn();
+ render();
+
+ expect(screen.queryAllByRole('alert')).toHaveLength(0);
+
+ await user.click(screen.getByText(/submit/i));
+
+ expect(
+ screen.getByText('username must be at least length 2'),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByText('password must be at least length 2'),
+ ).toBeInTheDocument();
+ expect(handleSubmit).not.toHaveBeenCalled();
+});
diff --git a/node_modules/@hookform/resolvers/arktype/src/__tests__/__fixtures__/data.ts b/node_modules/@hookform/resolvers/arktype/src/__tests__/__fixtures__/data.ts
new file mode 100644
index 00000000..a84cdddf
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/__tests__/__fixtures__/data.ts
@@ -0,0 +1,65 @@
+import { type } from 'arktype';
+import { Field, InternalFieldName } from 'react-hook-form';
+
+export const schema = type({
+ username: 'string>2',
+ password: '/.*[A-Za-z].*/>8|/.*\\d.*/',
+ repeatPassword: 'string>1',
+ accessToken: 'string|number',
+ birthYear: '19001',
+ 'like?': type({
+ id: 'number',
+ name: 'string>3',
+ }).array(),
+ dateStr: 'Date',
+});
+
+export const validData: typeof schema.infer = {
+ username: 'Doe',
+ password: 'Password123_',
+ repeatPassword: 'Password123_',
+ birthYear: 2000,
+ email: 'john@doe.com',
+ tags: ['tag1', 'tag2'],
+ enabled: true,
+ accessToken: 'accessToken',
+ url: 'https://react-hook-form.com/',
+ like: [
+ {
+ id: 1,
+ name: 'name',
+ },
+ ],
+ dateStr: new Date('2020-01-01'),
+};
+
+export const invalidData = {
+ password: '___',
+ email: '',
+ birthYear: 'birthYear',
+ like: [{ id: 'z' }],
+ url: 'abc',
+} as any as typeof schema.infer;
+
+export const fields: Record = {
+ username: {
+ ref: { name: 'username' },
+ name: 'username',
+ },
+ password: {
+ ref: { name: 'password' },
+ name: 'password',
+ },
+ email: {
+ ref: { name: 'email' },
+ name: 'email',
+ },
+ birthday: {
+ ref: { name: 'birthday' },
+ name: 'birthday',
+ },
+};
diff --git a/node_modules/@hookform/resolvers/arktype/src/__tests__/__snapshots__/arktype.ts.snap b/node_modules/@hookform/resolvers/arktype/src/__tests__/__snapshots__/arktype.ts.snap
new file mode 100644
index 00000000..51991b6c
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/__tests__/__snapshots__/arktype.ts.snap
@@ -0,0 +1,74 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`arktypeResolver > should return a single error from arktypeResolver when validation fails 1`] = `
+{
+ "errors": {
+ "accessToken": {
+ "message": "accessToken must be a number or a string (was missing)",
+ "ref": undefined,
+ "type": "required",
+ },
+ "birthYear": {
+ "message": "birthYear must be a number (was a string)",
+ "ref": undefined,
+ "type": "domain",
+ },
+ "dateStr": {
+ "message": "dateStr must be a Date (was missing)",
+ "ref": undefined,
+ "type": "required",
+ },
+ "email": {
+ "message": "email must be an email address (was "")",
+ "ref": {
+ "name": "email",
+ },
+ "type": "pattern",
+ },
+ "enabled": {
+ "message": "enabled must be boolean (was missing)",
+ "ref": undefined,
+ "type": "required",
+ },
+ "like": [
+ {
+ "id": {
+ "message": "like[0].id must be a number (was a string)",
+ "ref": undefined,
+ "type": "domain",
+ },
+ "name": {
+ "message": "like[0].name must be a string (was missing)",
+ "ref": undefined,
+ "type": "required",
+ },
+ },
+ ],
+ "password": {
+ "message": "password must be matched by .*[A-Za-z].* or matched by .*\\d.* (was "___")",
+ "ref": {
+ "name": "password",
+ },
+ "type": "union",
+ },
+ "repeatPassword": {
+ "message": "repeatPassword must be a string (was missing)",
+ "ref": undefined,
+ "type": "required",
+ },
+ "tags": {
+ "message": "tags must be an array (was missing)",
+ "ref": undefined,
+ "type": "required",
+ },
+ "username": {
+ "message": "username must be a string (was missing)",
+ "ref": {
+ "name": "username",
+ },
+ "type": "required",
+ },
+ },
+ "values": {},
+}
+`;
diff --git a/node_modules/@hookform/resolvers/arktype/src/__tests__/arktype.ts b/node_modules/@hookform/resolvers/arktype/src/__tests__/arktype.ts
new file mode 100644
index 00000000..a235952a
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/__tests__/arktype.ts
@@ -0,0 +1,82 @@
+import { type } from 'arktype';
+import { Resolver, useForm } from 'react-hook-form';
+import { SubmitHandler } from 'react-hook-form';
+import { arktypeResolver } from '..';
+import { fields, invalidData, schema, validData } from './__fixtures__/data';
+
+const shouldUseNativeValidation = false;
+
+describe('arktypeResolver', () => {
+ it('should return values from arktypeResolver when validation pass & raw=true', async () => {
+ const result = await arktypeResolver(schema, undefined, {
+ raw: true,
+ })(validData, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ });
+
+ expect(result).toEqual({ errors: {}, values: validData });
+ });
+
+ it('should return a single error from arktypeResolver when validation fails', async () => {
+ const result = await arktypeResolver(schema)(invalidData, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ });
+
+ expect(result).toMatchSnapshot();
+ });
+
+ /**
+ * Type inference tests
+ */
+ it('should correctly infer the output type from a arktype schema', () => {
+ const resolver = arktypeResolver(type({ id: 'number' }));
+
+ expectTypeOf(resolver).toEqualTypeOf<
+ Resolver<{ id: number }, unknown, { id: number }>
+ >();
+ });
+
+ it('should correctly infer the output type from a arktype schema using a transform', () => {
+ const resolver = arktypeResolver(
+ type({ id: type('string').pipe((s) => Number.parseInt(s)) }),
+ );
+
+ expectTypeOf(resolver).toEqualTypeOf<
+ Resolver<{ id: string }, unknown, { id: number }>
+ >();
+ });
+
+ it('should correctly infer the output type from a arktype schema for the handleSubmit function in useForm', () => {
+ const schema = type({ id: 'number' });
+
+ const form = useForm({
+ resolver: arktypeResolver(schema),
+ });
+
+ expectTypeOf(form.watch('id')).toEqualTypeOf();
+
+ expectTypeOf(form.handleSubmit).parameter(0).toEqualTypeOf<
+ SubmitHandler<{
+ id: number;
+ }>
+ >();
+ });
+
+ it('should correctly infer the output type from a arktype schema with a transform for the handleSubmit function in useForm', () => {
+ const schema = type({ id: type('string').pipe((s) => Number.parseInt(s)) });
+
+ const form = useForm({
+ resolver: arktypeResolver(schema),
+ });
+
+ expectTypeOf(form.watch('id')).toEqualTypeOf();
+
+ expectTypeOf(form.handleSubmit).parameter(0).toEqualTypeOf<
+ SubmitHandler<{
+ id: number;
+ }>
+ >();
+ });
+});
diff --git a/node_modules/@hookform/resolvers/arktype/src/arktype.ts b/node_modules/@hookform/resolvers/arktype/src/arktype.ts
new file mode 100644
index 00000000..17f11372
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/arktype.ts
@@ -0,0 +1,98 @@
+import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';
+import { StandardSchemaV1 } from '@standard-schema/spec';
+import { getDotPath } from '@standard-schema/utils';
+import { FieldError, FieldValues, Resolver } from 'react-hook-form';
+
+function parseErrorSchema(
+ issues: readonly StandardSchemaV1.Issue[],
+ validateAllFieldCriteria: boolean,
+) {
+ const errors: Record = {};
+
+ for (let i = 0; i < issues.length; i++) {
+ const error = issues[i];
+ const path = getDotPath(error);
+
+ if (path) {
+ if (!errors[path]) {
+ errors[path] = { message: error.message, type: '' };
+ }
+
+ if (validateAllFieldCriteria) {
+ const types = errors[path].types || {};
+
+ errors[path].types = {
+ ...types,
+ [Object.keys(types).length]: error.message,
+ };
+ }
+ }
+ }
+
+ return errors;
+}
+
+export function arktypeResolver(
+ schema: StandardSchemaV1,
+ _schemaOptions?: never,
+ resolverOptions?: {
+ raw?: false;
+ },
+): Resolver;
+
+export function arktypeResolver(
+ schema: StandardSchemaV1,
+ _schemaOptions: never | undefined,
+ resolverOptions: {
+ raw: true;
+ },
+): Resolver;
+
+/**
+ * Creates a resolver for react-hook-form using Arktype schema validation
+ * @param {Schema} schema - The Arktype schema to validate against
+ * @param {Object} resolverOptions - Additional resolver configuration
+ * @param {string} [resolverOptions.mode='raw'] - Return the raw input values rather than the parsed values
+ * @returns {Resolver} A resolver function compatible with react-hook-form
+ * @example
+ * const schema = type({
+ * username: 'string>2'
+ * });
+ *
+ * useForm({
+ * resolver: arktypeResolver(schema)
+ * });
+ */
+export function arktypeResolver(
+ schema: StandardSchemaV1,
+ _schemaOptions?: never,
+ resolverOptions: {
+ raw?: boolean;
+ } = {},
+): Resolver {
+ return async (values: Input, _, options) => {
+ let result = schema['~standard'].validate(values);
+ if (result instanceof Promise) {
+ result = await result;
+ }
+
+ if (result.issues) {
+ const errors = parseErrorSchema(
+ result.issues,
+ !options.shouldUseNativeValidation && options.criteriaMode === 'all',
+ );
+
+ return {
+ values: {},
+ errors: toNestErrors(errors, options),
+ };
+ }
+
+ options.shouldUseNativeValidation && validateFieldsNatively({}, options);
+
+ return {
+ values: resolverOptions.raw ? Object.assign({}, values) : result.value,
+ errors: {},
+ };
+ };
+}
diff --git a/node_modules/@hookform/resolvers/arktype/src/index.ts b/node_modules/@hookform/resolvers/arktype/src/index.ts
new file mode 100644
index 00000000..686e8490
--- /dev/null
+++ b/node_modules/@hookform/resolvers/arktype/src/index.ts
@@ -0,0 +1 @@
+export * from './arktype';
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.d.ts b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.d.ts
new file mode 100644
index 00000000..bd58d715
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.d.ts
@@ -0,0 +1,29 @@
+import { ClassConstructor, ClassTransformOptions } from 'class-transformer';
+import { ValidatorOptions } from 'class-validator';
+import { Resolver } from 'react-hook-form';
+/**
+ * Creates a resolver for react-hook-form using class-validator schema validation
+ * @param {ClassConstructor} schema - The class-validator schema to validate against
+ * @param {Object} schemaOptions - Additional schema validation options
+ * @param {Object} resolverOptions - Additional resolver configuration
+ * @param {string} [resolverOptions.mode='async'] - Validation mode
+ * @returns {Resolver} A resolver function compatible with react-hook-form
+ * @example
+ * class Schema {
+ * @Matches(/^\w+$/)
+ * @Length(3, 30)
+ * username: string;
+ * age: number
+ * }
+ *
+ * useForm({
+ * resolver: classValidatorResolver(Schema)
+ * });
+ */
+export declare function classValidatorResolver>(schema: ClassConstructor, schemaOptions?: {
+ validator?: ValidatorOptions;
+ transformer?: ClassTransformOptions;
+}, resolverOptions?: {
+ mode?: 'async' | 'sync';
+ raw?: boolean;
+}): Resolver;
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.js b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.js
new file mode 100644
index 00000000..12556b6f
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.js
@@ -0,0 +1,2 @@
+var r=require("@hookform/resolvers"),e=require("class-transformer"),t=require("class-validator");function s(r,e,t,a){return void 0===t&&(t={}),void 0===a&&(a=""),r.reduce(function(r,t){var i=a?a+"."+t.property:t.property;if(t.constraints){var o=Object.keys(t.constraints)[0];r[i]={type:o,message:t.constraints[o]};var n=r[i];e&&n&&Object.assign(n,{types:t.constraints})}return t.children&&t.children.length&&s(t.children,e,r,i),r},t)}exports.classValidatorResolver=function(a,i,o){return void 0===i&&(i={}),void 0===o&&(o={}),function(n,l,c){try{var v=i.validator,d=e.plainToClass(a,n,i.transformer);return Promise.resolve(("sync"===o.mode?t.validateSync:t.validate)(d,v)).then(function(e){return e.length?{values:{},errors:r.toNestErrors(s(e,!c.shouldUseNativeValidation&&"all"===c.criteriaMode),c)}:(c.shouldUseNativeValidation&&r.validateFieldsNatively({},c),{values:o.raw?Object.assign({},n):d,errors:{}})})}catch(r){return Promise.reject(r)}}};
+//# sourceMappingURL=class-validator.js.map
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.js.map b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.js.map
new file mode 100644
index 00000000..85dbafb3
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"class-validator.js","sources":["../src/class-validator.ts"],"sourcesContent":["import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';\nimport {\n ClassConstructor,\n ClassTransformOptions,\n plainToClass,\n} from 'class-transformer';\nimport {\n ValidationError,\n ValidatorOptions,\n validate,\n validateSync,\n} from 'class-validator';\nimport { FieldErrors, Resolver } from 'react-hook-form';\n\nfunction parseErrorSchema(\n errors: ValidationError[],\n validateAllFieldCriteria: boolean,\n parsedErrors: FieldErrors = {},\n path = '',\n) {\n return errors.reduce((acc, error) => {\n const _path = path ? `${path}.${error.property}` : error.property;\n\n if (error.constraints) {\n const key = Object.keys(error.constraints)[0];\n acc[_path] = {\n type: key,\n message: error.constraints[key],\n };\n\n const _e = acc[_path];\n if (validateAllFieldCriteria && _e) {\n Object.assign(_e, { types: error.constraints });\n }\n }\n\n if (error.children && error.children.length) {\n parseErrorSchema(error.children, validateAllFieldCriteria, acc, _path);\n }\n\n return acc;\n }, parsedErrors);\n}\n\n/**\n * Creates a resolver for react-hook-form using class-validator schema validation\n * @param {ClassConstructor} schema - The class-validator schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * class Schema {\n * @Matches(/^\\w+$/)\n * @Length(3, 30)\n * username: string;\n * age: number\n * }\n *\n * useForm({\n * resolver: classValidatorResolver(Schema)\n * });\n */\nexport function classValidatorResolver>(\n schema: ClassConstructor,\n schemaOptions: {\n validator?: ValidatorOptions;\n transformer?: ClassTransformOptions;\n } = {},\n resolverOptions: { mode?: 'async' | 'sync'; raw?: boolean } = {},\n): Resolver {\n return async (values, _, options) => {\n const { transformer, validator } = schemaOptions;\n const data = plainToClass(schema, values, transformer);\n\n const rawErrors = await (resolverOptions.mode === 'sync'\n ? validateSync\n : validate)(data, validator);\n\n if (rawErrors.length) {\n return {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n rawErrors,\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : data,\n errors: {},\n };\n };\n}\n"],"names":["parseErrorSchema","errors","validateAllFieldCriteria","parsedErrors","path","reduce","acc","error","_path","property","constraints","key","Object","keys","type","message","_e","assign","types","children","length","schema","schemaOptions","resolverOptions","values","_","options","validator","data","plainToClass","transformer","Promise","resolve","mode","validateSync","validate","then","rawErrors","toNestErrors","shouldUseNativeValidation","criteriaMode","validateFieldsNatively","raw","e","reject"],"mappings":"iGAcA,SAASA,EACPC,EACAC,EACAC,EACAC,GAEA,YAHA,IAAAD,IAAAA,EAA4B,CAAE,YAC9BC,IAAAA,EAAO,IAEAH,EAAOI,OAAO,SAACC,EAAKC,GACzB,IAAMC,EAAQJ,EAAUA,EAAI,IAAIG,EAAME,SAAaF,EAAME,SAEzD,GAAIF,EAAMG,YAAa,CACrB,IAAMC,EAAMC,OAAOC,KAAKN,EAAMG,aAAa,GAC3CJ,EAAIE,GAAS,CACXM,KAAMH,EACNI,QAASR,EAAMG,YAAYC,IAG7B,IAAMK,EAAKV,EAAIE,GACXN,GAA4Bc,GAC9BJ,OAAOK,OAAOD,EAAI,CAAEE,MAAOX,EAAMG,aAErC,CAMA,OAJIH,EAAMY,UAAYZ,EAAMY,SAASC,QACnCpB,EAAiBO,EAAMY,SAAUjB,EAA0BI,EAAKE,GAG3DF,CACT,EAAGH,EACL,gCAqBM,SACJkB,EACAC,EAIAC,GAEA,gBANAD,IAAAA,EAGI,CAAE,QACN,IAAAC,IAAAA,EAA8D,CAAE,GAEhE,SAAcC,EAAQC,EAAGC,OACvB,IAAqBC,EAAcL,EAAdK,UACfC,EAAOC,EAAYA,aAACR,EAAQG,EADCF,EAA3BQ,aAC+C,OAAAC,QAAAC,SAEL,SAAzBT,EAAgBU,KACrCC,eACAC,EAAAA,UAAUP,EAAMD,IAAUS,KAFxBC,SAAAA,GAIN,OAAIA,EAAUjB,OACL,CACLI,OAAQ,CAAA,EACRvB,OAAQqC,eACNtC,EACEqC,GACCX,EAAQa,2BACkB,QAAzBb,EAAQc,cAEZd,KAKNA,EAAQa,2BAA6BE,EAAsBA,uBAAC,CAAE,EAAEf,GAEzD,CACLF,OAAQD,EAAgBmB,IAAM9B,OAAOK,OAAO,CAAE,EAAEO,GAAUI,EAC1D3B,OAAQ,CAAA,GACR,EACJ,CAAC,MAAA0C,GAAAZ,OAAAA,QAAAa,OAAAD,EACH,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.mjs b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.mjs
new file mode 100644
index 00000000..5536f935
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.mjs
@@ -0,0 +1,2 @@
+import{toNestErrors as r,validateFieldsNatively as e}from"@hookform/resolvers";import{plainToClass as t}from"class-transformer";import{validateSync as o,validate as n}from"class-validator";function s(r,e,t,o){return void 0===t&&(t={}),void 0===o&&(o=""),r.reduce(function(r,t){var n=o?o+"."+t.property:t.property;if(t.constraints){var i=Object.keys(t.constraints)[0];r[n]={type:i,message:t.constraints[i]};var a=r[n];e&&a&&Object.assign(a,{types:t.constraints})}return t.children&&t.children.length&&s(t.children,e,r,n),r},t)}function i(i,a,c){return void 0===a&&(a={}),void 0===c&&(c={}),function(l,d,u){try{var v=a.validator,m=t(i,l,a.transformer);return Promise.resolve(("sync"===c.mode?o:n)(m,v)).then(function(t){return t.length?{values:{},errors:r(s(t,!u.shouldUseNativeValidation&&"all"===u.criteriaMode),u)}:(u.shouldUseNativeValidation&&e({},u),{values:c.raw?Object.assign({},l):m,errors:{}})})}catch(r){return Promise.reject(r)}}}export{i as classValidatorResolver};
+//# sourceMappingURL=class-validator.module.js.map
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.modern.mjs b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.modern.mjs
new file mode 100644
index 00000000..5561dd2c
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.modern.mjs
@@ -0,0 +1,2 @@
+import{toNestErrors as r,validateFieldsNatively as t}from"@hookform/resolvers";import{plainToClass as s}from"class-transformer";import{validateSync as e,validate as o}from"class-validator";function n(r,t,s={},e=""){return r.reduce((r,s)=>{const o=e?`${e}.${s.property}`:s.property;if(s.constraints){const e=Object.keys(s.constraints)[0];r[o]={type:e,message:s.constraints[e]};const n=r[o];t&&n&&Object.assign(n,{types:s.constraints})}return s.children&&s.children.length&&n(s.children,t,r,o),r},s)}function a(a,i={},c={}){return async(l,d,m)=>{const{transformer:u,validator:p}=i,f=s(a,l,u),h=await("sync"===c.mode?e:o)(f,p);return h.length?{values:{},errors:r(n(h,!m.shouldUseNativeValidation&&"all"===m.criteriaMode),m)}:(m.shouldUseNativeValidation&&t({},m),{values:c.raw?Object.assign({},l):f,errors:{}})}}export{a as classValidatorResolver};
+//# sourceMappingURL=class-validator.modern.mjs.map
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.modern.mjs.map b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.modern.mjs.map
new file mode 100644
index 00000000..11ec30b5
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.modern.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"class-validator.modern.mjs","sources":["../src/class-validator.ts"],"sourcesContent":["import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';\nimport {\n ClassConstructor,\n ClassTransformOptions,\n plainToClass,\n} from 'class-transformer';\nimport {\n ValidationError,\n ValidatorOptions,\n validate,\n validateSync,\n} from 'class-validator';\nimport { FieldErrors, Resolver } from 'react-hook-form';\n\nfunction parseErrorSchema(\n errors: ValidationError[],\n validateAllFieldCriteria: boolean,\n parsedErrors: FieldErrors = {},\n path = '',\n) {\n return errors.reduce((acc, error) => {\n const _path = path ? `${path}.${error.property}` : error.property;\n\n if (error.constraints) {\n const key = Object.keys(error.constraints)[0];\n acc[_path] = {\n type: key,\n message: error.constraints[key],\n };\n\n const _e = acc[_path];\n if (validateAllFieldCriteria && _e) {\n Object.assign(_e, { types: error.constraints });\n }\n }\n\n if (error.children && error.children.length) {\n parseErrorSchema(error.children, validateAllFieldCriteria, acc, _path);\n }\n\n return acc;\n }, parsedErrors);\n}\n\n/**\n * Creates a resolver for react-hook-form using class-validator schema validation\n * @param {ClassConstructor} schema - The class-validator schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * class Schema {\n * @Matches(/^\\w+$/)\n * @Length(3, 30)\n * username: string;\n * age: number\n * }\n *\n * useForm({\n * resolver: classValidatorResolver(Schema)\n * });\n */\nexport function classValidatorResolver>(\n schema: ClassConstructor,\n schemaOptions: {\n validator?: ValidatorOptions;\n transformer?: ClassTransformOptions;\n } = {},\n resolverOptions: { mode?: 'async' | 'sync'; raw?: boolean } = {},\n): Resolver {\n return async (values, _, options) => {\n const { transformer, validator } = schemaOptions;\n const data = plainToClass(schema, values, transformer);\n\n const rawErrors = await (resolverOptions.mode === 'sync'\n ? validateSync\n : validate)(data, validator);\n\n if (rawErrors.length) {\n return {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n rawErrors,\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : data,\n errors: {},\n };\n };\n}\n"],"names":["parseErrorSchema","errors","validateAllFieldCriteria","parsedErrors","path","reduce","acc","error","_path","property","constraints","key","Object","keys","type","message","_e","assign","types","children","length","classValidatorResolver","schema","schemaOptions","resolverOptions","values","_","options","transformer","validator","data","plainToClass","rawErrors","mode","validateSync","validate","toNestErrors","shouldUseNativeValidation","criteriaMode","validateFieldsNatively","raw"],"mappings":"6LAcA,SAASA,EACPC,EACAC,EACAC,EAA4B,CAAA,EAC5BC,EAAO,IAEP,OAAOH,EAAOI,OAAO,CAACC,EAAKC,KACzB,MAAMC,EAAQJ,EAAO,GAAGA,KAAQG,EAAME,WAAaF,EAAME,SAEzD,GAAIF,EAAMG,YAAa,CACrB,MAAMC,EAAMC,OAAOC,KAAKN,EAAMG,aAAa,GAC3CJ,EAAIE,GAAS,CACXM,KAAMH,EACNI,QAASR,EAAMG,YAAYC,IAG7B,MAAMK,EAAKV,EAAIE,GACXN,GAA4Bc,GAC9BJ,OAAOK,OAAOD,EAAI,CAAEE,MAAOX,EAAMG,aAErC,CAMA,OAJIH,EAAMY,UAAYZ,EAAMY,SAASC,QACnCpB,EAAiBO,EAAMY,SAAUjB,EAA0BI,EAAKE,GAG3DF,GACNH,EACL,CAqBgB,SAAAkB,EACdC,EACAC,EAGI,GACJC,EAA8D,CAAA,GAE9D,OAAcC,MAAAA,EAAQC,EAAGC,KACvB,MAAMC,YAAEA,EAAWC,UAAEA,GAAcN,EAC7BO,EAAOC,EAAaT,EAAQG,EAAQG,GAEpCI,QAA4C,SAAzBR,EAAgBS,KACrCC,EACAC,GAAUL,EAAMD,GAEpB,OAAIG,EAAUZ,OACL,CACLK,OAAQ,CAAA,EACRxB,OAAQmC,EACNpC,EACEgC,GACCL,EAAQU,2BACkB,QAAzBV,EAAQW,cAEZX,KAKNA,EAAQU,2BAA6BE,EAAuB,GAAIZ,GAEzD,CACLF,OAAQD,EAAgBgB,IAAM5B,OAAOK,OAAO,CAAA,EAAIQ,GAAUK,EAC1D7B,OAAQ,CAAA,IAGd"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.module.js b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.module.js
new file mode 100644
index 00000000..5536f935
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.module.js
@@ -0,0 +1,2 @@
+import{toNestErrors as r,validateFieldsNatively as e}from"@hookform/resolvers";import{plainToClass as t}from"class-transformer";import{validateSync as o,validate as n}from"class-validator";function s(r,e,t,o){return void 0===t&&(t={}),void 0===o&&(o=""),r.reduce(function(r,t){var n=o?o+"."+t.property:t.property;if(t.constraints){var i=Object.keys(t.constraints)[0];r[n]={type:i,message:t.constraints[i]};var a=r[n];e&&a&&Object.assign(a,{types:t.constraints})}return t.children&&t.children.length&&s(t.children,e,r,n),r},t)}function i(i,a,c){return void 0===a&&(a={}),void 0===c&&(c={}),function(l,d,u){try{var v=a.validator,m=t(i,l,a.transformer);return Promise.resolve(("sync"===c.mode?o:n)(m,v)).then(function(t){return t.length?{values:{},errors:r(s(t,!u.shouldUseNativeValidation&&"all"===u.criteriaMode),u)}:(u.shouldUseNativeValidation&&e({},u),{values:c.raw?Object.assign({},l):m,errors:{}})})}catch(r){return Promise.reject(r)}}}export{i as classValidatorResolver};
+//# sourceMappingURL=class-validator.module.js.map
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.module.js.map b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.module.js.map
new file mode 100644
index 00000000..b7bbb5fe
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.module.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"class-validator.module.js","sources":["../src/class-validator.ts"],"sourcesContent":["import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';\nimport {\n ClassConstructor,\n ClassTransformOptions,\n plainToClass,\n} from 'class-transformer';\nimport {\n ValidationError,\n ValidatorOptions,\n validate,\n validateSync,\n} from 'class-validator';\nimport { FieldErrors, Resolver } from 'react-hook-form';\n\nfunction parseErrorSchema(\n errors: ValidationError[],\n validateAllFieldCriteria: boolean,\n parsedErrors: FieldErrors = {},\n path = '',\n) {\n return errors.reduce((acc, error) => {\n const _path = path ? `${path}.${error.property}` : error.property;\n\n if (error.constraints) {\n const key = Object.keys(error.constraints)[0];\n acc[_path] = {\n type: key,\n message: error.constraints[key],\n };\n\n const _e = acc[_path];\n if (validateAllFieldCriteria && _e) {\n Object.assign(_e, { types: error.constraints });\n }\n }\n\n if (error.children && error.children.length) {\n parseErrorSchema(error.children, validateAllFieldCriteria, acc, _path);\n }\n\n return acc;\n }, parsedErrors);\n}\n\n/**\n * Creates a resolver for react-hook-form using class-validator schema validation\n * @param {ClassConstructor} schema - The class-validator schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * class Schema {\n * @Matches(/^\\w+$/)\n * @Length(3, 30)\n * username: string;\n * age: number\n * }\n *\n * useForm({\n * resolver: classValidatorResolver(Schema)\n * });\n */\nexport function classValidatorResolver>(\n schema: ClassConstructor,\n schemaOptions: {\n validator?: ValidatorOptions;\n transformer?: ClassTransformOptions;\n } = {},\n resolverOptions: { mode?: 'async' | 'sync'; raw?: boolean } = {},\n): Resolver {\n return async (values, _, options) => {\n const { transformer, validator } = schemaOptions;\n const data = plainToClass(schema, values, transformer);\n\n const rawErrors = await (resolverOptions.mode === 'sync'\n ? validateSync\n : validate)(data, validator);\n\n if (rawErrors.length) {\n return {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n rawErrors,\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : data,\n errors: {},\n };\n };\n}\n"],"names":["parseErrorSchema","errors","validateAllFieldCriteria","parsedErrors","path","reduce","acc","error","_path","property","constraints","key","Object","keys","type","message","_e","assign","types","children","length","classValidatorResolver","schema","schemaOptions","resolverOptions","values","_","options","validator","data","plainToClass","transformer","Promise","resolve","mode","validateSync","validate","then","rawErrors","toNestErrors","shouldUseNativeValidation","criteriaMode","validateFieldsNatively","raw","e","reject"],"mappings":"6LAcA,SAASA,EACPC,EACAC,EACAC,EACAC,GAEA,YAHA,IAAAD,IAAAA,EAA4B,CAAE,YAC9BC,IAAAA,EAAO,IAEAH,EAAOI,OAAO,SAACC,EAAKC,GACzB,IAAMC,EAAQJ,EAAUA,EAAI,IAAIG,EAAME,SAAaF,EAAME,SAEzD,GAAIF,EAAMG,YAAa,CACrB,IAAMC,EAAMC,OAAOC,KAAKN,EAAMG,aAAa,GAC3CJ,EAAIE,GAAS,CACXM,KAAMH,EACNI,QAASR,EAAMG,YAAYC,IAG7B,IAAMK,EAAKV,EAAIE,GACXN,GAA4Bc,GAC9BJ,OAAOK,OAAOD,EAAI,CAAEE,MAAOX,EAAMG,aAErC,CAMA,OAJIH,EAAMY,UAAYZ,EAAMY,SAASC,QACnCpB,EAAiBO,EAAMY,SAAUjB,EAA0BI,EAAKE,GAG3DF,CACT,EAAGH,EACL,CAqBM,SAAUkB,EACdC,EACAC,EAIAC,GAEA,gBANAD,IAAAA,EAGI,CAAE,QACN,IAAAC,IAAAA,EAA8D,CAAE,GAEhE,SAAcC,EAAQC,EAAGC,OACvB,IAAqBC,EAAcL,EAAdK,UACfC,EAAOC,EAAaR,EAAQG,EADCF,EAA3BQ,aAC+C,OAAAC,QAAAC,SAEL,SAAzBT,EAAgBU,KACrCC,EACAC,GAAUP,EAAMD,IAAUS,KAFxBC,SAAAA,GAIN,OAAIA,EAAUlB,OACL,CACLK,OAAQ,CAAA,EACRxB,OAAQsC,EACNvC,EACEsC,GACCX,EAAQa,2BACkB,QAAzBb,EAAQc,cAEZd,KAKNA,EAAQa,2BAA6BE,EAAuB,CAAE,EAAEf,GAEzD,CACLF,OAAQD,EAAgBmB,IAAM/B,OAAOK,OAAO,CAAE,EAAEQ,GAAUI,EAC1D5B,OAAQ,CAAA,GACR,EACJ,CAAC,MAAA2C,GAAAZ,OAAAA,QAAAa,OAAAD,EACH,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.umd.js b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.umd.js
new file mode 100644
index 00000000..05d69ef0
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.umd.js
@@ -0,0 +1,2 @@
+!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@hookform/resolvers"),require("class-transformer"),require("class-validator")):"function"==typeof define&&define.amd?define(["exports","@hookform/resolvers","class-transformer","class-validator"],r):r((e||self).hookformResolversClassValidator={},e.hookformResolvers,e.classTransformer,e.classValidator)}(this,function(e,r,o,s){function t(e,r,o,s){return void 0===o&&(o={}),void 0===s&&(s=""),e.reduce(function(e,o){var a=s?s+"."+o.property:o.property;if(o.constraints){var i=Object.keys(o.constraints)[0];e[a]={type:i,message:o.constraints[i]};var n=e[a];r&&n&&Object.assign(n,{types:o.constraints})}return o.children&&o.children.length&&t(o.children,r,e,a),e},o)}e.classValidatorResolver=function(e,a,i){return void 0===a&&(a={}),void 0===i&&(i={}),function(n,l,c){try{var d=a.validator,f=o.plainToClass(e,n,a.transformer);return Promise.resolve(("sync"===i.mode?s.validateSync:s.validate)(f,d)).then(function(e){return e.length?{values:{},errors:r.toNestErrors(t(e,!c.shouldUseNativeValidation&&"all"===c.criteriaMode),c)}:(c.shouldUseNativeValidation&&r.validateFieldsNatively({},c),{values:i.raw?Object.assign({},n):f,errors:{}})})}catch(e){return Promise.reject(e)}}}});
+//# sourceMappingURL=class-validator.umd.js.map
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/class-validator.umd.js.map b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.umd.js.map
new file mode 100644
index 00000000..071d3b67
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/class-validator.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"class-validator.umd.js","sources":["../src/class-validator.ts"],"sourcesContent":["import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';\nimport {\n ClassConstructor,\n ClassTransformOptions,\n plainToClass,\n} from 'class-transformer';\nimport {\n ValidationError,\n ValidatorOptions,\n validate,\n validateSync,\n} from 'class-validator';\nimport { FieldErrors, Resolver } from 'react-hook-form';\n\nfunction parseErrorSchema(\n errors: ValidationError[],\n validateAllFieldCriteria: boolean,\n parsedErrors: FieldErrors = {},\n path = '',\n) {\n return errors.reduce((acc, error) => {\n const _path = path ? `${path}.${error.property}` : error.property;\n\n if (error.constraints) {\n const key = Object.keys(error.constraints)[0];\n acc[_path] = {\n type: key,\n message: error.constraints[key],\n };\n\n const _e = acc[_path];\n if (validateAllFieldCriteria && _e) {\n Object.assign(_e, { types: error.constraints });\n }\n }\n\n if (error.children && error.children.length) {\n parseErrorSchema(error.children, validateAllFieldCriteria, acc, _path);\n }\n\n return acc;\n }, parsedErrors);\n}\n\n/**\n * Creates a resolver for react-hook-form using class-validator schema validation\n * @param {ClassConstructor} schema - The class-validator schema to validate against\n * @param {Object} schemaOptions - Additional schema validation options\n * @param {Object} resolverOptions - Additional resolver configuration\n * @param {string} [resolverOptions.mode='async'] - Validation mode\n * @returns {Resolver} A resolver function compatible with react-hook-form\n * @example\n * class Schema {\n * @Matches(/^\\w+$/)\n * @Length(3, 30)\n * username: string;\n * age: number\n * }\n *\n * useForm({\n * resolver: classValidatorResolver(Schema)\n * });\n */\nexport function classValidatorResolver>(\n schema: ClassConstructor,\n schemaOptions: {\n validator?: ValidatorOptions;\n transformer?: ClassTransformOptions;\n } = {},\n resolverOptions: { mode?: 'async' | 'sync'; raw?: boolean } = {},\n): Resolver {\n return async (values, _, options) => {\n const { transformer, validator } = schemaOptions;\n const data = plainToClass(schema, values, transformer);\n\n const rawErrors = await (resolverOptions.mode === 'sync'\n ? validateSync\n : validate)(data, validator);\n\n if (rawErrors.length) {\n return {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n rawErrors,\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n };\n }\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n values: resolverOptions.raw ? Object.assign({}, values) : data,\n errors: {},\n };\n };\n}\n"],"names":["parseErrorSchema","errors","validateAllFieldCriteria","parsedErrors","path","reduce","acc","error","_path","property","constraints","key","Object","keys","type","message","_e","assign","types","children","length","schema","schemaOptions","resolverOptions","values","_","options","validator","data","plainToClass","transformer","Promise","resolve","mode","validateSync","validate","then","rawErrors","toNestErrors","shouldUseNativeValidation","criteriaMode","validateFieldsNatively","raw","e","reject"],"mappings":"0cAcA,SAASA,EACPC,EACAC,EACAC,EACAC,GAEA,YAHA,IAAAD,IAAAA,EAA4B,CAAE,YAC9BC,IAAAA,EAAO,IAEAH,EAAOI,OAAO,SAACC,EAAKC,GACzB,IAAMC,EAAQJ,EAAUA,EAAI,IAAIG,EAAME,SAAaF,EAAME,SAEzD,GAAIF,EAAMG,YAAa,CACrB,IAAMC,EAAMC,OAAOC,KAAKN,EAAMG,aAAa,GAC3CJ,EAAIE,GAAS,CACXM,KAAMH,EACNI,QAASR,EAAMG,YAAYC,IAG7B,IAAMK,EAAKV,EAAIE,GACXN,GAA4Bc,GAC9BJ,OAAOK,OAAOD,EAAI,CAAEE,MAAOX,EAAMG,aAErC,CAMA,OAJIH,EAAMY,UAAYZ,EAAMY,SAASC,QACnCpB,EAAiBO,EAAMY,SAAUjB,EAA0BI,EAAKE,GAG3DF,CACT,EAAGH,EACL,0BAqBM,SACJkB,EACAC,EAIAC,GAEA,gBANAD,IAAAA,EAGI,CAAE,QACN,IAAAC,IAAAA,EAA8D,CAAE,GAEhE,SAAcC,EAAQC,EAAGC,OACvB,IAAqBC,EAAcL,EAAdK,UACfC,EAAOC,EAAYA,aAACR,EAAQG,EADCF,EAA3BQ,aAC+C,OAAAC,QAAAC,SAEL,SAAzBT,EAAgBU,KACrCC,eACAC,EAAAA,UAAUP,EAAMD,IAAUS,KAFxBC,SAAAA,GAIN,OAAIA,EAAUjB,OACL,CACLI,OAAQ,CAAA,EACRvB,OAAQqC,eACNtC,EACEqC,GACCX,EAAQa,2BACkB,QAAzBb,EAAQc,cAEZd,KAKNA,EAAQa,2BAA6BE,EAAsBA,uBAAC,CAAE,EAAEf,GAEzD,CACLF,OAAQD,EAAgBmB,IAAM9B,OAAOK,OAAO,CAAE,EAAEO,GAAUI,EAC1D3B,OAAQ,CAAA,GACR,EACJ,CAAC,MAAA0C,GAAAZ,OAAAA,QAAAa,OAAAD,EACH,CAAA,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@hookform/resolvers/class-validator/dist/index.d.ts b/node_modules/@hookform/resolvers/class-validator/dist/index.d.ts
new file mode 100644
index 00000000..e1cc75cf
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/dist/index.d.ts
@@ -0,0 +1 @@
+export * from './class-validator';
diff --git a/node_modules/@hookform/resolvers/class-validator/package.json b/node_modules/@hookform/resolvers/class-validator/package.json
new file mode 100644
index 00000000..1b6aef34
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "@hookform/resolvers/class-validator",
+ "amdName": "hookformResolversClassValidator",
+ "version": "1.0.0",
+ "private": true,
+ "description": "React Hook Form validation resolver: class-validator",
+ "main": "dist/class-validator.js",
+ "module": "dist/class-validator.module.js",
+ "umd:main": "dist/class-validator.umd.js",
+ "source": "src/index.ts",
+ "types": "dist/index.d.ts",
+ "license": "MIT",
+ "peerDependencies": {
+ "react-hook-form": ">=6.6.0",
+ "@hookform/resolvers": ">=2.0.0",
+ "class-transformer": "^0.4.0",
+ "class-validator": "^0.12.0"
+ }
+}
diff --git a/node_modules/@hookform/resolvers/class-validator/src/__tests__/Form-native-validation.tsx b/node_modules/@hookform/resolvers/class-validator/src/__tests__/Form-native-validation.tsx
new file mode 100644
index 00000000..ba2945a1
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/__tests__/Form-native-validation.tsx
@@ -0,0 +1,79 @@
+import { render, screen } from '@testing-library/react';
+import user from '@testing-library/user-event';
+import { IsNotEmpty } from 'class-validator';
+import React from 'react';
+import { SubmitHandler, useForm } from 'react-hook-form';
+import { classValidatorResolver } from '..';
+
+class Schema {
+ @IsNotEmpty()
+ username: string;
+
+ @IsNotEmpty()
+ password: string;
+}
+
+interface Props {
+ onSubmit: SubmitHandler;
+}
+
+function TestComponent({ onSubmit }: Props) {
+ const { register, handleSubmit } = useForm({
+ resolver: classValidatorResolver(Schema),
+ shouldUseNativeValidation: true,
+ });
+
+ return (
+
+ );
+}
+
+test("form's native validation with Class Validator", async () => {
+ const handleSubmit = vi.fn();
+ render();
+
+ // username
+ let usernameField = screen.getByPlaceholderText(
+ /username/i,
+ ) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(true);
+ expect(usernameField.validationMessage).toBe('');
+
+ // password
+ let passwordField = screen.getByPlaceholderText(
+ /password/i,
+ ) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(true);
+ expect(passwordField.validationMessage).toBe('');
+
+ await user.click(screen.getByText(/submit/i));
+
+ // username
+ usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(false);
+ expect(usernameField.validationMessage).toBe('username should not be empty');
+
+ // password
+ passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(false);
+ expect(passwordField.validationMessage).toBe('password should not be empty');
+
+ await user.type(screen.getByPlaceholderText(/username/i), 'joe');
+ await user.type(screen.getByPlaceholderText(/password/i), 'password');
+
+ // username
+ usernameField = screen.getByPlaceholderText(/username/i) as HTMLInputElement;
+ expect(usernameField.validity.valid).toBe(true);
+ expect(usernameField.validationMessage).toBe('');
+
+ // password
+ passwordField = screen.getByPlaceholderText(/password/i) as HTMLInputElement;
+ expect(passwordField.validity.valid).toBe(true);
+ expect(passwordField.validationMessage).toBe('');
+});
diff --git a/node_modules/@hookform/resolvers/class-validator/src/__tests__/Form.tsx b/node_modules/@hookform/resolvers/class-validator/src/__tests__/Form.tsx
new file mode 100644
index 00000000..52984f67
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/__tests__/Form.tsx
@@ -0,0 +1,53 @@
+import { render, screen } from '@testing-library/react';
+import user from '@testing-library/user-event';
+import { IsNotEmpty } from 'class-validator';
+import React from 'react';
+import { SubmitHandler, useForm } from 'react-hook-form';
+import { classValidatorResolver } from '..';
+
+class Schema {
+ @IsNotEmpty()
+ username: string;
+
+ @IsNotEmpty()
+ password: string;
+}
+
+interface Props {
+ onSubmit: SubmitHandler;
+}
+
+function TestComponent({ onSubmit }: Props) {
+ const {
+ register,
+ formState: { errors },
+ handleSubmit,
+ } = useForm({
+ resolver: classValidatorResolver(Schema),
+ });
+
+ return (
+
+ );
+}
+
+test("form's validation with Class Validator and TypeScript's integration", async () => {
+ const handleSubmit = vi.fn();
+ render();
+
+ expect(screen.queryAllByRole('alert')).toHaveLength(0);
+
+ await user.click(screen.getByText(/submit/i));
+
+ expect(screen.getByText(/username should not be empty/i)).toBeInTheDocument();
+ expect(screen.getByText(/password should not be empty/i)).toBeInTheDocument();
+ expect(handleSubmit).not.toHaveBeenCalled();
+});
diff --git a/node_modules/@hookform/resolvers/class-validator/src/__tests__/__fixtures__/data.ts b/node_modules/@hookform/resolvers/class-validator/src/__tests__/__fixtures__/data.ts
new file mode 100644
index 00000000..5abd5ef2
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/__tests__/__fixtures__/data.ts
@@ -0,0 +1,88 @@
+import 'reflect-metadata';
+import { Type } from 'class-transformer';
+import {
+ IsEmail,
+ IsNotEmpty,
+ Length,
+ Matches,
+ Max,
+ Min,
+ ValidateNested,
+} from 'class-validator';
+import { Field, InternalFieldName } from 'react-hook-form';
+
+class Like {
+ @IsNotEmpty()
+ id: number;
+
+ @Length(4)
+ name: string;
+}
+
+export class Schema {
+ @Matches(/^\w+$/)
+ @Length(3, 30)
+ username: string;
+
+ @Matches(/^[a-zA-Z0-9]{3,30}/)
+ password: string;
+
+ @Min(1900)
+ @Max(2013)
+ birthYear: number;
+
+ @IsEmail()
+ email: string;
+
+ accessToken: string;
+
+ tags: string[];
+
+ enabled: boolean;
+
+ @ValidateNested({ each: true })
+ @Type(() => Like)
+ like: Like[];
+}
+
+export const validData: Schema = {
+ username: 'Doe',
+ password: 'Password123',
+ birthYear: 2000,
+ email: 'john@doe.com',
+ tags: ['tag1', 'tag2'],
+ enabled: true,
+ accessToken: 'accessToken',
+ like: [
+ {
+ id: 1,
+ name: 'name',
+ },
+ ],
+};
+
+export const invalidData = {
+ password: '___',
+ email: '',
+ birthYear: 'birthYear',
+ like: [{ id: 'z' }],
+} as any as Schema;
+
+export const fields: Record = {
+ username: {
+ ref: { name: 'username' },
+ name: 'username',
+ },
+ password: {
+ ref: { name: 'password' },
+ name: 'password',
+ },
+ email: {
+ ref: { name: 'email' },
+ name: 'email',
+ },
+ birthday: {
+ ref: { name: 'birthday' },
+ name: 'birthday',
+ },
+};
diff --git a/node_modules/@hookform/resolvers/class-validator/src/__tests__/__snapshots__/class-validator.ts.snap b/node_modules/@hookform/resolvers/class-validator/src/__tests__/__snapshots__/class-validator.ts.snap
new file mode 100644
index 00000000..0a61fa96
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/__tests__/__snapshots__/class-validator.ts.snap
@@ -0,0 +1,242 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`classValidatorResolver > should return a single error from classValidatorResolver when validation fails 1`] = `
+{
+ "errors": {
+ "birthYear": {
+ "message": "birthYear must not be greater than 2013",
+ "ref": undefined,
+ "type": "max",
+ },
+ "email": {
+ "message": "email must be an email",
+ "ref": {
+ "name": "email",
+ },
+ "type": "isEmail",
+ },
+ "like": [
+ {
+ "name": {
+ "message": "name must be longer than or equal to 4 characters",
+ "ref": undefined,
+ "type": "isLength",
+ },
+ },
+ ],
+ "password": {
+ "message": "password must match /^[a-zA-Z0-9]{3,30}/ regular expression",
+ "ref": {
+ "name": "password",
+ },
+ "type": "matches",
+ },
+ "username": {
+ "message": "username must be longer than or equal to 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "isLength",
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`classValidatorResolver > should return a single error from classValidatorResolver with \`mode: sync\` when validation fails 1`] = `
+{
+ "errors": {
+ "birthYear": {
+ "message": "birthYear must not be greater than 2013",
+ "ref": undefined,
+ "type": "max",
+ },
+ "email": {
+ "message": "email must be an email",
+ "ref": {
+ "name": "email",
+ },
+ "type": "isEmail",
+ },
+ "like": [
+ {
+ "name": {
+ "message": "name must be longer than or equal to 4 characters",
+ "ref": undefined,
+ "type": "isLength",
+ },
+ },
+ ],
+ "password": {
+ "message": "password must match /^[a-zA-Z0-9]{3,30}/ regular expression",
+ "ref": {
+ "name": "password",
+ },
+ "type": "matches",
+ },
+ "username": {
+ "message": "username must be longer than or equal to 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "isLength",
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`classValidatorResolver > should return all the errors from classValidatorResolver when validation fails with \`validateAllFieldCriteria\` set to true 1`] = `
+{
+ "errors": {
+ "birthYear": {
+ "message": "birthYear must not be greater than 2013",
+ "ref": undefined,
+ "type": "max",
+ "types": {
+ "max": "birthYear must not be greater than 2013",
+ "min": "birthYear must not be less than 1900",
+ },
+ },
+ "email": {
+ "message": "email must be an email",
+ "ref": {
+ "name": "email",
+ },
+ "type": "isEmail",
+ "types": {
+ "isEmail": "email must be an email",
+ },
+ },
+ "like": [
+ {
+ "name": {
+ "message": "name must be longer than or equal to 4 characters",
+ "ref": undefined,
+ "type": "isLength",
+ "types": {
+ "isLength": "name must be longer than or equal to 4 characters",
+ },
+ },
+ },
+ ],
+ "password": {
+ "message": "password must match /^[a-zA-Z0-9]{3,30}/ regular expression",
+ "ref": {
+ "name": "password",
+ },
+ "type": "matches",
+ "types": {
+ "matches": "password must match /^[a-zA-Z0-9]{3,30}/ regular expression",
+ },
+ },
+ "username": {
+ "message": "username must be longer than or equal to 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "isLength",
+ "types": {
+ "isLength": "username must be longer than or equal to 3 characters",
+ "matches": "username must match /^\\w+$/ regular expression",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`classValidatorResolver > should return all the errors from classValidatorResolver when validation fails with \`validateAllFieldCriteria\` set to true and \`mode: sync\` 1`] = `
+{
+ "errors": {
+ "birthYear": {
+ "message": "birthYear must not be greater than 2013",
+ "ref": undefined,
+ "type": "max",
+ "types": {
+ "max": "birthYear must not be greater than 2013",
+ "min": "birthYear must not be less than 1900",
+ },
+ },
+ "email": {
+ "message": "email must be an email",
+ "ref": {
+ "name": "email",
+ },
+ "type": "isEmail",
+ "types": {
+ "isEmail": "email must be an email",
+ },
+ },
+ "like": [
+ {
+ "name": {
+ "message": "name must be longer than or equal to 4 characters",
+ "ref": undefined,
+ "type": "isLength",
+ "types": {
+ "isLength": "name must be longer than or equal to 4 characters",
+ },
+ },
+ },
+ ],
+ "password": {
+ "message": "password must match /^[a-zA-Z0-9]{3,30}/ regular expression",
+ "ref": {
+ "name": "password",
+ },
+ "type": "matches",
+ "types": {
+ "matches": "password must match /^[a-zA-Z0-9]{3,30}/ regular expression",
+ },
+ },
+ "username": {
+ "message": "username must be longer than or equal to 3 characters",
+ "ref": {
+ "name": "username",
+ },
+ "type": "isLength",
+ "types": {
+ "isLength": "username must be longer than or equal to 3 characters",
+ "matches": "username must match /^\\w+$/ regular expression",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`validate data with transformer option 1`] = `
+{
+ "errors": {
+ "random": {
+ "message": "All fields must be defined.",
+ "ref": undefined,
+ "type": "isDefined",
+ "types": {
+ "isDefined": "All fields must be defined.",
+ "isNumber": "Must be a number",
+ "max": "Cannot be greater than 255",
+ "min": "Cannot be lower than 0",
+ },
+ },
+ },
+ "values": {},
+}
+`;
+
+exports[`validate data with validator option 1`] = `
+{
+ "errors": {
+ "random": {
+ "message": "All fields must be defined.",
+ "ref": undefined,
+ "type": "isDefined",
+ "types": {
+ "isDefined": "All fields must be defined.",
+ },
+ },
+ },
+ "values": {},
+}
+`;
diff --git a/node_modules/@hookform/resolvers/class-validator/src/__tests__/class-validator.ts b/node_modules/@hookform/resolvers/class-validator/src/__tests__/class-validator.ts
new file mode 100644
index 00000000..7e253deb
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/__tests__/class-validator.ts
@@ -0,0 +1,199 @@
+import { Expose, Type } from 'class-transformer';
+import * as classValidator from 'class-validator';
+import { IsDefined, IsNumber, Max, Min } from 'class-validator';
+/* eslint-disable no-console, @typescript-eslint/ban-ts-comment */
+import { classValidatorResolver } from '..';
+import { Schema, fields, invalidData, validData } from './__fixtures__/data';
+
+const shouldUseNativeValidation = false;
+
+describe('classValidatorResolver', () => {
+ it('should return values from classValidatorResolver when validation pass', async () => {
+ const schemaSpy = vi.spyOn(classValidator, 'validate');
+ const schemaSyncSpy = vi.spyOn(classValidator, 'validateSync');
+
+ const result = await classValidatorResolver(Schema)(validData, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ });
+
+ expect(schemaSpy).toHaveBeenCalledTimes(1);
+ expect(schemaSyncSpy).not.toHaveBeenCalled();
+ expect(result).toEqual({ errors: {}, values: validData });
+ expect(result.values).toBeInstanceOf(Schema);
+ });
+
+ it('should return values as a raw object from classValidatorResolver when `rawValues` set to true', async () => {
+ const result = await classValidatorResolver(Schema, undefined, {
+ raw: true,
+ })(validData, undefined, {
+ fields,
+ shouldUseNativeValidation,
+ });
+
+ expect(result).toEqual({ errors: {}, values: validData });
+ expect(result.values).not.toBeInstanceOf(Schema);
+ });
+
+ it('should return values from classValidatorResolver with `mode: sync` when validation pass', async () => {
+ const validateSyncSpy = vi.spyOn(classValidator, 'validateSync');
+ const validateSpy = vi.spyOn(classValidator, 'validate');
+
+ const result = await classValidatorResolver(Schema, undefined, {
+ mode: 'sync',
+ })(validData, undefined, { fields, shouldUseNativeValidation });
+
+ expect(validateSyncSpy).toHaveBeenCalledTimes(1);
+ expect(validateSpy).not.toHaveBeenCalled();
+ expect(result).toEqual({ errors: {}, values: validData });
+ expect(result.values).toBeInstanceOf(Schema);
+ });
+
+ it('should return a single error from classValidatorResolver when validation fails', async () => {
+ const result = await classValidatorResolver(Schema)(
+ invalidData,
+ undefined,
+ {
+ fields,
+ shouldUseNativeValidation,
+ },
+ );
+
+ expect(result).toMatchSnapshot();
+ });
+
+ it('should return a single error from classValidatorResolver with `mode: sync` when validation fails', async () => {
+ const validateSyncSpy = vi.spyOn(classValidator, 'validateSync');
+ const validateSpy = vi.spyOn(classValidator, 'validate');
+
+ const result = await classValidatorResolver(Schema, undefined, {
+ mode: 'sync',
+ })(invalidData, undefined, { fields, shouldUseNativeValidation });
+
+ expect(validateSyncSpy).toHaveBeenCalledTimes(1);
+ expect(validateSpy).not.toHaveBeenCalled();
+ expect(result).toMatchSnapshot();
+ });
+
+ it('should return all the errors from classValidatorResolver when validation fails with `validateAllFieldCriteria` set to true', async () => {
+ const result = await classValidatorResolver(Schema)(
+ invalidData,
+ undefined,
+ {
+ fields,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ );
+
+ expect(result).toMatchSnapshot();
+ });
+
+ it('should return all the errors from classValidatorResolver when validation fails with `validateAllFieldCriteria` set to true and `mode: sync`', async () => {
+ const result = await classValidatorResolver(Schema, undefined, {
+ mode: 'sync',
+ })(invalidData, undefined, {
+ fields,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ });
+
+ expect(result).toMatchSnapshot();
+ });
+});
+
+it('validate data with transformer option', async () => {
+ class SchemaTest {
+ @Expose({ groups: ['find', 'create', 'update'] })
+ @Type(() => Number)
+ @IsDefined({
+ message: `All fields must be defined.`,
+ groups: ['publish'],
+ })
+ @IsNumber({}, { message: `Must be a number`, always: true })
+ @Min(0, { message: `Cannot be lower than 0`, always: true })
+ @Max(255, { message: `Cannot be greater than 255`, always: true })
+ random: number;
+ }
+
+ const result = await classValidatorResolver(
+ SchemaTest,
+ { transformer: { groups: ['update'] } },
+ {
+ mode: 'sync',
+ },
+ )(
+ // @ts-expect-error - Just for testing purposes
+ invalidData,
+ undefined,
+ {
+ fields,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ );
+
+ expect(result).toMatchSnapshot();
+});
+
+it('validate data with validator option', async () => {
+ class SchemaTest {
+ @Expose({ groups: ['find', 'create', 'update'] })
+ @Type(() => Number)
+ @IsDefined({
+ message: `All fields must be defined.`,
+ groups: ['publish'],
+ })
+ @IsNumber({}, { message: `Must be a number`, always: true })
+ @Min(0, { message: `Cannot be lower than 0`, always: true })
+ @Max(255, { message: `Cannot be greater than 255`, always: true })
+ random: number;
+ }
+
+ const result = await classValidatorResolver(
+ SchemaTest,
+ { validator: { stopAtFirstError: true } },
+ {
+ mode: 'sync',
+ },
+ )(
+ // @ts-expect-error - Just for testing purposes
+ invalidData,
+ undefined,
+ {
+ fields,
+ criteriaMode: 'all',
+ shouldUseNativeValidation,
+ },
+ );
+
+ expect(result).toMatchSnapshot();
+});
+
+it('should return from classValidatorResolver with `excludeExtraneousValues` set to true', async () => {
+ class SchemaTest {
+ @Expose()
+ @IsNumber({}, { message: `Must be a number`, always: true })
+ random: number;
+ }
+
+ const result = await classValidatorResolver(SchemaTest, {
+ transformer: {
+ excludeExtraneousValues: true,
+ },
+ })(
+ {
+ random: 10,
+ // @ts-expect-error - Just for testing purposes
+ extraneousField: true,
+ },
+ undefined,
+ {
+ fields,
+ shouldUseNativeValidation,
+ },
+ );
+
+ expect(result).toEqual({ errors: {}, values: { random: 10 } });
+ expect(result.values).toBeInstanceOf(SchemaTest);
+});
diff --git a/node_modules/@hookform/resolvers/class-validator/src/class-validator.ts b/node_modules/@hookform/resolvers/class-validator/src/class-validator.ts
new file mode 100644
index 00000000..d4dc4804
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/class-validator.ts
@@ -0,0 +1,101 @@
+import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';
+import {
+ ClassConstructor,
+ ClassTransformOptions,
+ plainToClass,
+} from 'class-transformer';
+import {
+ ValidationError,
+ ValidatorOptions,
+ validate,
+ validateSync,
+} from 'class-validator';
+import { FieldErrors, Resolver } from 'react-hook-form';
+
+function parseErrorSchema(
+ errors: ValidationError[],
+ validateAllFieldCriteria: boolean,
+ parsedErrors: FieldErrors = {},
+ path = '',
+) {
+ return errors.reduce((acc, error) => {
+ const _path = path ? `${path}.${error.property}` : error.property;
+
+ if (error.constraints) {
+ const key = Object.keys(error.constraints)[0];
+ acc[_path] = {
+ type: key,
+ message: error.constraints[key],
+ };
+
+ const _e = acc[_path];
+ if (validateAllFieldCriteria && _e) {
+ Object.assign(_e, { types: error.constraints });
+ }
+ }
+
+ if (error.children && error.children.length) {
+ parseErrorSchema(error.children, validateAllFieldCriteria, acc, _path);
+ }
+
+ return acc;
+ }, parsedErrors);
+}
+
+/**
+ * Creates a resolver for react-hook-form using class-validator schema validation
+ * @param {ClassConstructor} schema - The class-validator schema to validate against
+ * @param {Object} schemaOptions - Additional schema validation options
+ * @param {Object} resolverOptions - Additional resolver configuration
+ * @param {string} [resolverOptions.mode='async'] - Validation mode
+ * @returns {Resolver} A resolver function compatible with react-hook-form
+ * @example
+ * class Schema {
+ * @Matches(/^\w+$/)
+ * @Length(3, 30)
+ * username: string;
+ * age: number
+ * }
+ *
+ * useForm({
+ * resolver: classValidatorResolver(Schema)
+ * });
+ */
+export function classValidatorResolver>(
+ schema: ClassConstructor,
+ schemaOptions: {
+ validator?: ValidatorOptions;
+ transformer?: ClassTransformOptions;
+ } = {},
+ resolverOptions: { mode?: 'async' | 'sync'; raw?: boolean } = {},
+): Resolver {
+ return async (values, _, options) => {
+ const { transformer, validator } = schemaOptions;
+ const data = plainToClass(schema, values, transformer);
+
+ const rawErrors = await (resolverOptions.mode === 'sync'
+ ? validateSync
+ : validate)(data, validator);
+
+ if (rawErrors.length) {
+ return {
+ values: {},
+ errors: toNestErrors(
+ parseErrorSchema(
+ rawErrors,
+ !options.shouldUseNativeValidation &&
+ options.criteriaMode === 'all',
+ ),
+ options,
+ ),
+ };
+ }
+
+ options.shouldUseNativeValidation && validateFieldsNatively({}, options);
+
+ return {
+ values: resolverOptions.raw ? Object.assign({}, values) : data,
+ errors: {},
+ };
+ };
+}
diff --git a/node_modules/@hookform/resolvers/class-validator/src/index.ts b/node_modules/@hookform/resolvers/class-validator/src/index.ts
new file mode 100644
index 00000000..e1cc75cf
--- /dev/null
+++ b/node_modules/@hookform/resolvers/class-validator/src/index.ts
@@ -0,0 +1 @@
+export * from './class-validator';
diff --git a/node_modules/@hookform/resolvers/computed-types/dist/computed-types.d.ts b/node_modules/@hookform/resolvers/computed-types/dist/computed-types.d.ts
new file mode 100644
index 00000000..8bab87db
--- /dev/null
+++ b/node_modules/@hookform/resolvers/computed-types/dist/computed-types.d.ts
@@ -0,0 +1,17 @@
+import FunctionType from 'computed-types/lib/schema/FunctionType';
+import type { FieldValues, Resolver } from 'react-hook-form';
+/**
+ * Creates a resolver for react-hook-form using computed-types schema validation
+ * @param {Schema} schema - The computed-types schema to validate against
+ * @returns {Resolver>} A resolver function compatible with react-hook-form
+ * @example
+ * const schema = Schema({
+ * name: string,
+ * age: number
+ * });
+ *
+ * useForm({
+ * resolver: computedTypesResolver(schema)
+ * });
+ */
+export declare function computedTypesResolver(schema: FunctionType