From a0e1662e1de0229b6b2359dd800945d3edfe026b Mon Sep 17 00:00:00 2001
From: Simone Tesini
Date: Fri, 1 Aug 2025 19:13:09 +0200
Subject: [PATCH 001/114] pull
---
backend/src/app.py | 2 +-
backend/src/room.py | 33 +++++++++++++++++++++++++++++++--
ruff.toml | 1 +
3 files changed, 33 insertions(+), 3 deletions(-)
create mode 100644 ruff.toml
diff --git a/backend/src/app.py b/backend/src/app.py
index 2484d2c..39ff440 100644
--- a/backend/src/app.py
+++ b/backend/src/app.py
@@ -1,6 +1,6 @@
from flask import Flask, Response, jsonify, request
from flask_cors import CORS
-from room import Room
+from src.room import Room
app = Flask(__name__)
CORS(app)
diff --git a/backend/src/room.py b/backend/src/room.py
index bdf4026..a9ddd7c 100644
--- a/backend/src/room.py
+++ b/backend/src/room.py
@@ -2,7 +2,16 @@ from dataclasses import dataclass
from song import Song
-type UserScoredSong = tuple[Song, int]
+USER_SCORE_WEIGHT = 0.7
+GENRE_WEIGHT = 0.1
+RANDOM_WEIGHT = 0.1
+RECENT_PENALTY = 0.5
+RECENT_COUNT = 10
+
+
+@dataclass
+class UserScoredSong(Song):
+ user_score: int
@dataclass
@@ -14,5 +23,25 @@ class Room:
tags: set[str]
creative: bool
- playlist: set[UserScoredSong]
+ songs: dict[str, UserScoredSong]
history: list[Song]
+
+ def rank_song(
+ self,
+ song: UserScoredSong,
+ ) -> float:
+ rank = 0.0
+ song_items = self.songs.items()
+
+ lowest_score = min(song_items, key=lambda item: item[1].user_score)[1].user_score
+ highest_score = min(song_items, key=lambda item: item[1].user_score)[1].user_score
+
+ rank += translate(song.user_score, lowest_score, highest_score, 0.0, USER_SCORE_WEIGHT)
+
+ last10items = self.history[-10:]
+
+ return rank
+
+
+def translate(value: float, in_min: float, in_max: float, out_min: float, out_max: float):
+ return (value - in_min) / (in_max - in_min) * (out_max - out_min) + out_min
diff --git a/ruff.toml b/ruff.toml
new file mode 100644
index 0000000..d461c74
--- /dev/null
+++ b/ruff.toml
@@ -0,0 +1 @@
+line-length = 200
From adce5d7c65e745014002a6dfdf023decb0cd6e81 Mon Sep 17 00:00:00 2001
From: Leonardo Segala
Date: Fri, 1 Aug 2025 19:13:12 +0200
Subject: [PATCH 002/114] ops
---
backend/src/app.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backend/src/app.py b/backend/src/app.py
index 8602d86..41ecd9d 100644
--- a/backend/src/app.py
+++ b/backend/src/app.py
@@ -1,7 +1,11 @@
from flask import Flask, request, Response, jsonify
from flask_cors import CORS
+import dotenv
from .classes import Room
+# from . import song_fetch
+
+dotenv.load_dotenv()
app = Flask(__name__)
CORS(app)
From 4bb6254396e60f3aa2c22f36699e8a43777cb280 Mon Sep 17 00:00:00 2001
From: Simone Tesini
Date: Fri, 1 Aug 2025 19:14:07 +0200
Subject: [PATCH 003/114] add basic ranking algo
---
backend/src/room.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/room.py b/backend/src/room.py
index a9ddd7c..4c405c0 100644
--- a/backend/src/room.py
+++ b/backend/src/room.py
@@ -38,7 +38,7 @@ class Room:
rank += translate(song.user_score, lowest_score, highest_score, 0.0, USER_SCORE_WEIGHT)
- last10items = self.history[-10:]
+ # last10items = self.history[-10:]
return rank
From 7f6a36439f54cc2be580a81b65b0206743807398 Mon Sep 17 00:00:00 2001
From: panzerotto
Date: Fri, 1 Aug 2025 19:14:10 +0200
Subject: [PATCH 004/114] add db creation
---
backend/src/app.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backend/src/app.py b/backend/src/app.py
index 2484d2c..1326446 100644
--- a/backend/src/app.py
+++ b/backend/src/app.py
@@ -1,6 +1,7 @@
from flask import Flask, Response, jsonify, request
from flask_cors import CORS
from room import Room
+from song import init_db
app = Flask(__name__)
CORS(app)
@@ -38,4 +39,5 @@ def join():
if __name__ == "__main__":
+ init_db()
app.run(debug=True)
From 8bb582148df4a928e665ccd928468969bf3c2818 Mon Sep 17 00:00:00 2001
From: Leonardo Segala
Date: Fri, 1 Aug 2025 19:16:20 +0200
Subject: [PATCH 005/114] Add song fetch test
---
backend/Dockerfile | 4 +++
backend/requirements.txt | 2 ++
backend/src/app.py | 12 ++++----
backend/src/room.py | 2 +-
backend/src/song.py | 2 +-
backend/src/song_fetch.py | 63 +++++++++++++++++++++++++++++++++++++++
6 files changed, 76 insertions(+), 9 deletions(-)
create mode 100644 backend/src/song_fetch.py
diff --git a/backend/Dockerfile b/backend/Dockerfile
index 56023cb..dc8f66f 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -2,6 +2,10 @@ FROM python:3.13.5-alpine
WORKDIR /app
+RUN apk update && apk add git
+
+RUN git clone --depth 1 'https://github.com/yt-dlp/yt-dlp.git' /yt-dlp
+
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
diff --git a/backend/requirements.txt b/backend/requirements.txt
index 4b83363..7623d9f 100644
--- a/backend/requirements.txt
+++ b/backend/requirements.txt
@@ -1,2 +1,4 @@
Flask==3.1.0
flask-cors
+dotenv
+requests
\ No newline at end of file
diff --git a/backend/src/app.py b/backend/src/app.py
index 665603a..3fadaf6 100644
--- a/backend/src/app.py
+++ b/backend/src/app.py
@@ -1,15 +1,13 @@
from flask import Flask, Response, jsonify, request
from flask_cors import CORS
-<<<<<<< HEAD
-import dotenv
-from .classes import Room
-# from . import song_fetch
+import dotenv
+from .room import Room
+
+from . import song_fetch
dotenv.load_dotenv()
-=======
-from room import Room
->>>>>>> refs/remotes/origin/main
+
app = Flask(__name__)
CORS(app)
diff --git a/backend/src/room.py b/backend/src/room.py
index bdf4026..996a5a1 100644
--- a/backend/src/room.py
+++ b/backend/src/room.py
@@ -1,6 +1,6 @@
from dataclasses import dataclass
-from song import Song
+from .song import Song
type UserScoredSong = tuple[Song, int]
diff --git a/backend/src/song.py b/backend/src/song.py
index 2260838..8570033 100644
--- a/backend/src/song.py
+++ b/backend/src/song.py
@@ -1,5 +1,5 @@
from dataclasses import dataclass
-from connect import get_connection
+from .connect import get_connection
def init_db():
diff --git a/backend/src/song_fetch.py b/backend/src/song_fetch.py
new file mode 100644
index 0000000..96288e9
--- /dev/null
+++ b/backend/src/song_fetch.py
@@ -0,0 +1,63 @@
+import requests
+import urllib.parse
+import os.path
+import os
+import sys
+
+sys.path.append("/yt-dlp")
+import yt_dlp
+
+
+def lastfm_search(query: str) -> tuple[str, str]:
+ response = requests.get(
+ url="https://ws.audioscrobbler.com/2.0/?method=track.search&format=json",
+ params={"limit": 5, "track": query, "api_key": os.environ["LASTFM_API_KEY"]},
+ )
+
+ assert response.status_code == 200
+
+ track_info = response.json()["results"]["trackmatches"]["track"][0]
+
+ return track_info["name"], track_info["artist"]
+
+
+def lastfm_getinfo(
+ name: str, artist: str
+) -> tuple[str, str, str, str, list[str]]: # ( id, image_id, tags )
+ response = requests.get(
+ url="https://ws.audioscrobbler.com/2.0/?method=track.getInfo&format=json",
+ params={
+ "track": name,
+ "artist": artist,
+ "api_key": os.environ["LASTFM_API_KEY"],
+ },
+ )
+
+ track_info = response.json()["track"]
+
+ image_url = urllib.parse.urlparse(track_info["album"]["image"][0]["#text"])
+
+ return (
+ track_info["mbid"],
+ [t["name"] for t in track_info["toptags"]["tag"]],
+ os.path.splitext(os.path.basename(image_url.path))[0],
+ )
+
+
+print(yt_dlp, flush=True)
+
+# # def get_yt_mp3link(name: str, artist: str) -> str: ...
+# # os.popen("/yt-dlp ")
+
+# # /yt-dlp/yt-dlp.sh "ytsearch1:Never gonna give you up" --get-url -f "ba"
+
+# import json
+
+# print(json.dumps(lastfm_getinfo(*lastfm_search("money")), indent=2))
+# exit(1)
+
+
+# # def
+
+
+# ## query ==> lastfm ==> list of songs ==> take first ==> request song info ==> get YT link ==> save in DB ==>
From 036b64b51efc9188ec7bee86c825e6840c45ba97 Mon Sep 17 00:00:00 2001
From: Simone Tesini
Date: Fri, 1 Aug 2025 19:31:47 +0200
Subject: [PATCH 006/114] theoretically finish the algorithm
---
backend/src/room.py | 42 ++++++++++++++++++++++++++++++------------
1 file changed, 30 insertions(+), 12 deletions(-)
diff --git a/backend/src/room.py b/backend/src/room.py
index 92b0ee6..6332fd0 100644
--- a/backend/src/room.py
+++ b/backend/src/room.py
@@ -3,15 +3,14 @@ from dataclasses import dataclass
from .song import Song
USER_SCORE_WEIGHT = 0.7
-GENRE_WEIGHT = 0.1
+ARTIST_WEIGHT = 0.1
+TAG_WEIGHT = 0.1
RANDOM_WEIGHT = 0.1
RECENT_PENALTY = 0.5
RECENT_COUNT = 10
-@dataclass
-class UserScoredSong(Song):
- user_score: int
+type UserScoredSong = tuple[Song, int]
@dataclass
@@ -26,19 +25,38 @@ class Room:
songs: dict[str, UserScoredSong]
history: list[Song]
- def rank_song(
- self,
- song: UserScoredSong,
- ) -> float:
+ def rank_song(self, song: Song, user_score: int) -> float:
rank = 0.0
song_items = self.songs.items()
- lowest_score = min(song_items, key=lambda item: item[1].user_score)[1].user_score
- highest_score = min(song_items, key=lambda item: item[1].user_score)[1].user_score
+ lowest_score = min(song_items, key=lambda item: item[1][1])[1][1]
+ highest_score = min(song_items, key=lambda item: item[1][1])[1][1]
- rank += translate(song.user_score, lowest_score, highest_score, 0.0, USER_SCORE_WEIGHT)
+ rank += translate(user_score, lowest_score, highest_score, 0.0, USER_SCORE_WEIGHT)
- # last10items = self.history[-10:]
+ recent_songs = self.history[-RECENT_COUNT:]
+
+ tag_counts = {}
+ artist_counts = {}
+ for song in recent_songs:
+ for tag in song.tags:
+ if tag not in tag_counts:
+ tag_counts[tag] = 0
+ tag_counts[tag] += 1
+ if song.artist not in artist_counts:
+ artist_counts[song.artist] = 0
+ artist_counts[song.artist] += 1
+
+ tag_total = 0
+ for tag in song.tags:
+ if tag in tag_counts:
+ tag_total += tag_counts[tag]
+
+ rank += translate(tag_total, 0, RECENT_COUNT, 0, TAG_WEIGHT)
+ rank += translate(artist_counts[song.artist], 0, RECENT_COUNT, 0, ARTIST_WEIGHT)
+
+ if song in recent_songs:
+ rank -= RECENT_PENALTY
return rank
From 41f6f5ba1af381a00722501a94361a5c388ae465 Mon Sep 17 00:00:00 2001
From: Simone Tesini
Date: Fri, 1 Aug 2025 20:46:42 +0200
Subject: [PATCH 007/114] pull
---
backend/src/room.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/backend/src/room.py b/backend/src/room.py
index 6332fd0..51b96e2 100644
--- a/backend/src/room.py
+++ b/backend/src/room.py
@@ -20,7 +20,6 @@ class Room:
name: str
pin: int | None
tags: set[str]
- creative: bool
songs: dict[str, UserScoredSong]
history: list[Song]
From 248c9bc278d2e9491c7d5c0328fd835673374312 Mon Sep 17 00:00:00 2001
From: panzerotto
Date: Fri, 1 Aug 2025 20:56:48 +0200
Subject: [PATCH 008/114] fix db creation
---
backend/src/app.py | 2 +-
backend/src/connect.py | 2 +-
docker-compose.yml | 32 ++++++++++++++++----------------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/backend/src/app.py b/backend/src/app.py
index 9dda54a..2df573d 100644
--- a/backend/src/app.py
+++ b/backend/src/app.py
@@ -45,6 +45,6 @@ def join():
return {"success": True, "ws": f"/ws/{room_id}"}
+init_db()
if __name__ == "__main__":
- init_db()
app.run(debug=True)
diff --git a/backend/src/connect.py b/backend/src/connect.py
index 12e53d8..962528c 100644
--- a/backend/src/connect.py
+++ b/backend/src/connect.py
@@ -2,5 +2,5 @@ import sqlite3
def get_connection():
- conn = sqlite3.connect("jukebox.db")
+ conn = sqlite3.connect(".data/jukebox.db")
return conn
diff --git a/docker-compose.yml b/docker-compose.yml
index ea7e2ca..3b05616 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,18 +1,18 @@
services:
- backend:
- build: ./backend
- ports:
- - 5001:5000
- environment:
- NODE_ENV: development
- volumes:
- - ./backend:/app
- - ./.data/jukebox.sqlite3:/app/.data/jukebox.sqlite3
+ backend:
+ build: ./backend
+ ports:
+ - 5001:5000
+ environment:
+ NODE_ENV: development
+ volumes:
+ - ./backend:/app
+ - ./.data:/app/.data
- frontend:
- build: ./frontend
- ports:
- - 5173:5173
- volumes:
- - ./frontend:/app
- - /app/node_modules
+ frontend:
+ build: ./frontend
+ ports:
+ - 5173:5173
+ volumes:
+ - ./frontend:/app
+ - /app/node_modules
From 70f4b89d9e05ab608541ff4f8372c5296ca15ff3 Mon Sep 17 00:00:00 2001
From: Simone Tesini
Date: Fri, 1 Aug 2025 20:59:09 +0200
Subject: [PATCH 009/114] pull
---
backend/src/app.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/backend/src/app.py b/backend/src/app.py
index 9dda54a..645b827 100644
--- a/backend/src/app.py
+++ b/backend/src/app.py
@@ -1,12 +1,10 @@
+import dotenv
from flask import Flask, Response, jsonify, request
from flask_cors import CORS
-import dotenv
from .room import Room
from .song import init_db
-from . import song_fetch
-
dotenv.load_dotenv()
From ac7ef89b011e5a801acb27fe96fa91a9d308686d Mon Sep 17 00:00:00 2001
From: Mat12143
Date: Fri, 1 Aug 2025 21:10:03 +0200
Subject: [PATCH 010/114] feat: added queue slider & input field
---
.../src/lib/components/QueueSlider.svelte | 29 +
.../src/lib/components/SuggestionInput.svelte | 7 +
.../src/lib/components/SuggestionList.svelte | 2 +
frontend/src/lib/index.ts | 1 -
frontend/src/lib/types.ts | 8 +
frontend/src/routes/+layout.svelte | 4 +-
frontend/src/routes/+page.svelte | 40 +-
node_modules/.package-lock.json | 16 +
node_modules/zod/LICENSE | 21 +
node_modules/zod/README.md | 208 +
node_modules/zod/index.cjs | 33 +
node_modules/zod/index.d.cts | 4 +
node_modules/zod/index.d.ts | 4 +
node_modules/zod/index.js | 4 +
node_modules/zod/locales/index.cjs | 17 +
node_modules/zod/locales/index.d.cts | 1 +
node_modules/zod/locales/index.d.ts | 1 +
node_modules/zod/locales/index.js | 1 +
node_modules/zod/mini/index.cjs | 17 +
node_modules/zod/mini/index.d.cts | 1 +
node_modules/zod/mini/index.d.ts | 1 +
node_modules/zod/mini/index.js | 1 +
node_modules/zod/package.json | 134 +
node_modules/zod/src/index.ts | 4 +
node_modules/zod/src/locales/index.ts | 1 +
node_modules/zod/src/mini/index.ts | 1 +
node_modules/zod/src/v3/ZodError.ts | 330 ++
.../zod/src/v3/benchmarks/datetime.ts | 58 +
.../src/v3/benchmarks/discriminatedUnion.ts | 80 +
node_modules/zod/src/v3/benchmarks/index.ts | 59 +
node_modules/zod/src/v3/benchmarks/ipv4.ts | 57 +
node_modules/zod/src/v3/benchmarks/object.ts | 69 +
.../zod/src/v3/benchmarks/primitives.ts | 162 +
.../zod/src/v3/benchmarks/realworld.ts | 63 +
node_modules/zod/src/v3/benchmarks/string.ts | 55 +
node_modules/zod/src/v3/benchmarks/union.ts | 80 +
node_modules/zod/src/v3/errors.ts | 13 +
node_modules/zod/src/v3/external.ts | 6 +
node_modules/zod/src/v3/helpers/enumUtil.ts | 17 +
node_modules/zod/src/v3/helpers/errorUtil.ts | 8 +
node_modules/zod/src/v3/helpers/parseUtil.ts | 176 +
.../zod/src/v3/helpers/partialUtil.ts | 34 +
.../zod/src/v3/helpers/typeAliases.ts | 2 +
node_modules/zod/src/v3/helpers/util.ts | 224 +
node_modules/zod/src/v3/index.ts | 4 +
node_modules/zod/src/v3/locales/en.ts | 124 +
node_modules/zod/src/v3/standard-schema.ts | 113 +
node_modules/zod/src/v3/tests/Mocker.ts | 54 +
.../zod/src/v3/tests/all-errors.test.ts | 157 +
.../zod/src/v3/tests/anyunknown.test.ts | 28 +
node_modules/zod/src/v3/tests/array.test.ts | 71 +
.../zod/src/v3/tests/async-parsing.test.ts | 388 ++
.../src/v3/tests/async-refinements.test.ts | 46 +
node_modules/zod/src/v3/tests/base.test.ts | 29 +
node_modules/zod/src/v3/tests/bigint.test.ts | 55 +
node_modules/zod/src/v3/tests/branded.test.ts | 53 +
node_modules/zod/src/v3/tests/catch.test.ts | 220 +
node_modules/zod/src/v3/tests/coerce.test.ts | 133 +
node_modules/zod/src/v3/tests/complex.test.ts | 56 +
node_modules/zod/src/v3/tests/custom.test.ts | 31 +
node_modules/zod/src/v3/tests/date.test.ts | 32 +
.../zod/src/v3/tests/deepmasking.test.ts | 186 +
node_modules/zod/src/v3/tests/default.test.ts | 112 +
.../zod/src/v3/tests/description.test.ts | 33 +
.../src/v3/tests/discriminated-unions.test.ts | 315 +
node_modules/zod/src/v3/tests/enum.test.ts | 80 +
node_modules/zod/src/v3/tests/error.test.ts | 551 ++
.../zod/src/v3/tests/firstparty.test.ts | 87 +
.../v3/tests/firstpartyschematypes.test.ts | 21 +
.../zod/src/v3/tests/function.test.ts | 257 +
.../zod/src/v3/tests/generics.test.ts | 48 +
.../zod/src/v3/tests/instanceof.test.ts | 37 +
.../zod/src/v3/tests/intersection.test.ts | 110 +
.../src/v3/tests/language-server.source.ts | 76 +
.../zod/src/v3/tests/language-server.test.ts | 207 +
node_modules/zod/src/v3/tests/literal.test.ts | 36 +
node_modules/zod/src/v3/tests/map.test.ts | 110 +
node_modules/zod/src/v3/tests/masking.test.ts | 4 +
node_modules/zod/src/v3/tests/mocker.test.ts | 19 +
node_modules/zod/src/v3/tests/nan.test.ts | 21 +
.../zod/src/v3/tests/nativeEnum.test.ts | 87 +
.../zod/src/v3/tests/nullable.test.ts | 42 +
node_modules/zod/src/v3/tests/number.test.ts | 176 +
.../src/v3/tests/object-augmentation.test.ts | 29 +
.../src/v3/tests/object-in-es5-env.test.ts | 29 +
node_modules/zod/src/v3/tests/object.test.ts | 434 ++
.../zod/src/v3/tests/optional.test.ts | 42 +
.../zod/src/v3/tests/parseUtil.test.ts | 23 +
node_modules/zod/src/v3/tests/parser.test.ts | 41 +
.../zod/src/v3/tests/partials.test.ts | 243 +
.../zod/src/v3/tests/pickomit.test.ts | 111 +
.../zod/src/v3/tests/pipeline.test.ts | 29 +
.../zod/src/v3/tests/preprocess.test.ts | 186 +
.../zod/src/v3/tests/primitive.test.ts | 440 ++
node_modules/zod/src/v3/tests/promise.test.ts | 90 +
.../zod/src/v3/tests/readonly.test.ts | 194 +
node_modules/zod/src/v3/tests/record.test.ts | 171 +
.../zod/src/v3/tests/recursive.test.ts | 197 +
node_modules/zod/src/v3/tests/refine.test.ts | 313 +
.../zod/src/v3/tests/safeparse.test.ts | 27 +
node_modules/zod/src/v3/tests/set.test.ts | 142 +
.../zod/src/v3/tests/standard-schema.test.ts | 83 +
node_modules/zod/src/v3/tests/string.test.ts | 916 +++
.../zod/src/v3/tests/transformer.test.ts | 233 +
node_modules/zod/src/v3/tests/tuple.test.ts | 90 +
node_modules/zod/src/v3/tests/unions.test.ts | 57 +
.../zod/src/v3/tests/validations.test.ts | 133 +
node_modules/zod/src/v3/tests/void.test.ts | 15 +
node_modules/zod/src/v3/types.ts | 5138 +++++++++++++++++
node_modules/zod/src/v4-mini/index.ts | 1 +
node_modules/zod/src/v4/classic/checks.ts | 31 +
node_modules/zod/src/v4/classic/coerce.ts | 27 +
node_modules/zod/src/v4/classic/compat.ts | 70 +
node_modules/zod/src/v4/classic/errors.ts | 82 +
node_modules/zod/src/v4/classic/external.ts | 50 +
node_modules/zod/src/v4/classic/index.ts | 5 +
node_modules/zod/src/v4/classic/iso.ts | 90 +
node_modules/zod/src/v4/classic/parse.ts | 33 +
node_modules/zod/src/v4/classic/schemas.ts | 2031 +++++++
.../src/v4/classic/tests/anyunknown.test.ts | 26 +
.../zod/src/v4/classic/tests/array.test.ts | 264 +
.../v4/classic/tests/assignability.test.ts | 210 +
.../v4/classic/tests/async-parsing.test.ts | 381 ++
.../classic/tests/async-refinements.test.ts | 68 +
.../zod/src/v4/classic/tests/base.test.ts | 7 +
.../zod/src/v4/classic/tests/bigint.test.ts | 54 +
.../zod/src/v4/classic/tests/brand.test.ts | 63 +
.../zod/src/v4/classic/tests/catch.test.ts | 251 +
.../zod/src/v4/classic/tests/coalesce.test.ts | 20 +
.../zod/src/v4/classic/tests/coerce.test.ts | 160 +
.../v4/classic/tests/continuability.test.ts | 352 ++
.../zod/src/v4/classic/tests/custom.test.ts | 40 +
.../zod/src/v4/classic/tests/date.test.ts | 31 +
.../zod/src/v4/classic/tests/datetime.test.ts | 302 +
.../zod/src/v4/classic/tests/default.test.ts | 313 +
.../src/v4/classic/tests/description.test.ts | 32 +
.../tests/discriminated-unions.test.ts | 661 +++
.../zod/src/v4/classic/tests/enum.test.ts | 285 +
.../src/v4/classic/tests/error-utils.test.ts | 595 ++
.../zod/src/v4/classic/tests/error.test.ts | 711 +++
.../zod/src/v4/classic/tests/file.test.ts | 94 +
.../src/v4/classic/tests/firstparty.test.ts | 175 +
.../zod/src/v4/classic/tests/function.test.ts | 268 +
.../zod/src/v4/classic/tests/generics.test.ts | 72 +
.../zod/src/v4/classic/tests/index.test.ts | 829 +++
.../src/v4/classic/tests/instanceof.test.ts | 34 +
.../src/v4/classic/tests/intersection.test.ts | 171 +
.../zod/src/v4/classic/tests/json.test.ts | 108 +
.../zod/src/v4/classic/tests/lazy.test.ts | 227 +
.../zod/src/v4/classic/tests/literal.test.ts | 117 +
.../zod/src/v4/classic/tests/map.test.ts | 196 +
.../zod/src/v4/classic/tests/nan.test.ts | 21 +
.../v4/classic/tests/nested-refine.test.ts | 168 +
.../src/v4/classic/tests/nonoptional.test.ts | 86 +
.../zod/src/v4/classic/tests/nullable.test.ts | 22 +
.../zod/src/v4/classic/tests/number.test.ts | 270 +
.../zod/src/v4/classic/tests/object.test.ts | 563 ++
.../zod/src/v4/classic/tests/optional.test.ts | 136 +
.../zod/src/v4/classic/tests/partial.test.ts | 340 ++
.../zod/src/v4/classic/tests/pickomit.test.ts | 127 +
.../zod/src/v4/classic/tests/pipe.test.ts | 81 +
.../zod/src/v4/classic/tests/prefault.test.ts | 37 +
.../src/v4/classic/tests/preprocess.test.ts | 287 +
.../src/v4/classic/tests/primitive.test.ts | 175 +
.../zod/src/v4/classic/tests/promise.test.ts | 81 +
.../src/v4/classic/tests/prototypes.test.ts | 23 +
.../zod/src/v4/classic/tests/readonly.test.ts | 252 +
.../zod/src/v4/classic/tests/record.test.ts | 356 ++
.../v4/classic/tests/recursive-types.test.ts | 477 ++
.../zod/src/v4/classic/tests/refine.test.ts | 532 ++
.../src/v4/classic/tests/registries.test.ts | 204 +
.../zod/src/v4/classic/tests/set.test.ts | 179 +
.../v4/classic/tests/standard-schema.test.ts | 57 +
.../v4/classic/tests/string-formats.test.ts | 109 +
.../zod/src/v4/classic/tests/string.test.ts | 996 ++++
.../src/v4/classic/tests/stringbool.test.ts | 66 +
.../v4/classic/tests/template-literal.test.ts | 761 +++
.../v4/classic/tests/to-json-schema.test.ts | 2341 ++++++++
.../src/v4/classic/tests/transform.test.ts | 354 ++
.../zod/src/v4/classic/tests/tuple.test.ts | 163 +
.../zod/src/v4/classic/tests/union.test.ts | 181 +
.../src/v4/classic/tests/validations.test.ts | 283 +
.../zod/src/v4/classic/tests/void.test.ts | 12 +
node_modules/zod/src/v4/core/api.ts | 1628 ++++++
node_modules/zod/src/v4/core/checks.ts | 1285 +++++
node_modules/zod/src/v4/core/config.ts | 15 +
node_modules/zod/src/v4/core/core.ts | 134 +
node_modules/zod/src/v4/core/doc.ts | 44 +
node_modules/zod/src/v4/core/errors.ts | 423 ++
node_modules/zod/src/v4/core/function.ts | 176 +
node_modules/zod/src/v4/core/index.ts | 15 +
node_modules/zod/src/v4/core/json-schema.ts | 146 +
node_modules/zod/src/v4/core/parse.ts | 94 +
node_modules/zod/src/v4/core/regexes.ts | 138 +
node_modules/zod/src/v4/core/registries.ts | 97 +
node_modules/zod/src/v4/core/schemas.ts | 3900 +++++++++++++
.../zod/src/v4/core/standard-schema.ts | 64 +
.../zod/src/v4/core/tests/extend.test.ts | 18 +
.../zod/src/v4/core/tests/index.test.ts | 46 +
.../zod/src/v4/core/tests/locales/be.test.ts | 124 +
.../zod/src/v4/core/tests/locales/en.test.ts | 22 +
.../zod/src/v4/core/tests/locales/ru.test.ts | 128 +
.../zod/src/v4/core/tests/locales/tr.test.ts | 69 +
.../zod/src/v4/core/to-json-schema.ts | 1004 ++++
node_modules/zod/src/v4/core/util.ts | 827 +++
node_modules/zod/src/v4/core/versions.ts | 5 +
node_modules/zod/src/v4/core/zsf.ts | 323 ++
node_modules/zod/src/v4/index.ts | 4 +
node_modules/zod/src/v4/locales/ar.ts | 125 +
node_modules/zod/src/v4/locales/az.ts | 121 +
node_modules/zod/src/v4/locales/be.ts | 184 +
node_modules/zod/src/v4/locales/bg.ts | 136 +
node_modules/zod/src/v4/locales/ca.ts | 127 +
node_modules/zod/src/v4/locales/cs.ts | 142 +
node_modules/zod/src/v4/locales/da.ts | 141 +
node_modules/zod/src/v4/locales/de.ts | 124 +
node_modules/zod/src/v4/locales/en.ts | 127 +
node_modules/zod/src/v4/locales/eo.ts | 125 +
node_modules/zod/src/v4/locales/es.ts | 125 +
node_modules/zod/src/v4/locales/fa.ts | 134 +
node_modules/zod/src/v4/locales/fi.ts | 131 +
node_modules/zod/src/v4/locales/fr-CA.ts | 126 +
node_modules/zod/src/v4/locales/fr.ts | 124 +
node_modules/zod/src/v4/locales/he.ts | 125 +
node_modules/zod/src/v4/locales/hu.ts | 126 +
node_modules/zod/src/v4/locales/id.ts | 125 +
node_modules/zod/src/v4/locales/index.ts | 42 +
node_modules/zod/src/v4/locales/is.ts | 127 +
node_modules/zod/src/v4/locales/it.ts | 125 +
node_modules/zod/src/v4/locales/ja.ts | 122 +
node_modules/zod/src/v4/locales/kh.ts | 126 +
node_modules/zod/src/v4/locales/ko.ts | 131 +
node_modules/zod/src/v4/locales/mk.ts | 127 +
node_modules/zod/src/v4/locales/ms.ts | 124 +
node_modules/zod/src/v4/locales/nl.ts | 126 +
node_modules/zod/src/v4/locales/no.ts | 124 +
node_modules/zod/src/v4/locales/ota.ts | 125 +
node_modules/zod/src/v4/locales/pl.ts | 126 +
node_modules/zod/src/v4/locales/ps.ts | 133 +
node_modules/zod/src/v4/locales/pt.ts | 123 +
node_modules/zod/src/v4/locales/ru.ts | 184 +
node_modules/zod/src/v4/locales/sl.ts | 126 +
node_modules/zod/src/v4/locales/sv.ts | 127 +
node_modules/zod/src/v4/locales/ta.ts | 125 +
node_modules/zod/src/v4/locales/th.ts | 126 +
node_modules/zod/src/v4/locales/tr.ts | 121 +
node_modules/zod/src/v4/locales/ua.ts | 126 +
node_modules/zod/src/v4/locales/ur.ts | 126 +
node_modules/zod/src/v4/locales/vi.ts | 125 +
node_modules/zod/src/v4/locales/yo.ts | 131 +
node_modules/zod/src/v4/locales/zh-CN.ts | 123 +
node_modules/zod/src/v4/locales/zh-TW.ts | 125 +
node_modules/zod/src/v4/mini/checks.ts | 32 +
node_modules/zod/src/v4/mini/coerce.ts | 22 +
node_modules/zod/src/v4/mini/external.ts | 40 +
node_modules/zod/src/v4/mini/index.ts | 3 +
node_modules/zod/src/v4/mini/iso.ts | 62 +
node_modules/zod/src/v4/mini/parse.ts | 1 +
node_modules/zod/src/v4/mini/schemas.ts | 1592 +++++
.../src/v4/mini/tests/assignability.test.ts | 129 +
.../zod/src/v4/mini/tests/brand.test.ts | 51 +
.../zod/src/v4/mini/tests/checks.test.ts | 144 +
.../zod/src/v4/mini/tests/computed.test.ts | 36 +
.../zod/src/v4/mini/tests/error.test.ts | 22 +
.../zod/src/v4/mini/tests/functions.test.ts | 43 +
.../zod/src/v4/mini/tests/index.test.ts | 871 +++
.../zod/src/v4/mini/tests/number.test.ts | 95 +
.../zod/src/v4/mini/tests/object.test.ts | 185 +
.../zod/src/v4/mini/tests/prototypes.test.ts | 43 +
.../src/v4/mini/tests/recursive-types.test.ts | 275 +
.../zod/src/v4/mini/tests/string.test.ts | 299 +
node_modules/zod/v3/ZodError.cjs | 138 +
node_modules/zod/v3/ZodError.d.cts | 164 +
node_modules/zod/v3/ZodError.d.ts | 164 +
node_modules/zod/v3/ZodError.js | 133 +
node_modules/zod/v3/errors.cjs | 17 +
node_modules/zod/v3/errors.d.cts | 5 +
node_modules/zod/v3/errors.d.ts | 5 +
node_modules/zod/v3/errors.js | 9 +
node_modules/zod/v3/external.cjs | 22 +
node_modules/zod/v3/external.d.cts | 6 +
node_modules/zod/v3/external.d.ts | 6 +
node_modules/zod/v3/external.js | 6 +
node_modules/zod/v3/helpers/enumUtil.cjs | 2 +
node_modules/zod/v3/helpers/enumUtil.d.cts | 8 +
node_modules/zod/v3/helpers/enumUtil.d.ts | 8 +
node_modules/zod/v3/helpers/enumUtil.js | 1 +
node_modules/zod/v3/helpers/errorUtil.cjs | 9 +
node_modules/zod/v3/helpers/errorUtil.d.cts | 9 +
node_modules/zod/v3/helpers/errorUtil.d.ts | 9 +
node_modules/zod/v3/helpers/errorUtil.js | 6 +
node_modules/zod/v3/helpers/parseUtil.cjs | 124 +
node_modules/zod/v3/helpers/parseUtil.d.cts | 78 +
node_modules/zod/v3/helpers/parseUtil.d.ts | 78 +
node_modules/zod/v3/helpers/parseUtil.js | 109 +
node_modules/zod/v3/helpers/partialUtil.cjs | 2 +
node_modules/zod/v3/helpers/partialUtil.d.cts | 8 +
node_modules/zod/v3/helpers/partialUtil.d.ts | 8 +
node_modules/zod/v3/helpers/partialUtil.js | 1 +
node_modules/zod/v3/helpers/typeAliases.cjs | 2 +
node_modules/zod/v3/helpers/typeAliases.d.cts | 2 +
node_modules/zod/v3/helpers/typeAliases.d.ts | 2 +
node_modules/zod/v3/helpers/typeAliases.js | 1 +
node_modules/zod/v3/helpers/util.cjs | 137 +
node_modules/zod/v3/helpers/util.d.cts | 85 +
node_modules/zod/v3/helpers/util.d.ts | 85 +
node_modules/zod/v3/helpers/util.js | 133 +
node_modules/zod/v3/index.cjs | 33 +
node_modules/zod/v3/index.d.cts | 4 +
node_modules/zod/v3/index.d.ts | 4 +
node_modules/zod/v3/index.js | 4 +
node_modules/zod/v3/locales/en.cjs | 112 +
node_modules/zod/v3/locales/en.d.cts | 3 +
node_modules/zod/v3/locales/en.d.ts | 3 +
node_modules/zod/v3/locales/en.js | 109 +
node_modules/zod/v3/standard-schema.cjs | 2 +
node_modules/zod/v3/standard-schema.d.cts | 102 +
node_modules/zod/v3/standard-schema.d.ts | 102 +
node_modules/zod/v3/standard-schema.js | 1 +
node_modules/zod/v3/types.cjs | 3777 ++++++++++++
node_modules/zod/v3/types.d.cts | 1034 ++++
node_modules/zod/v3/types.d.ts | 1034 ++++
node_modules/zod/v3/types.js | 3695 ++++++++++++
node_modules/zod/v4-mini/index.cjs | 17 +
node_modules/zod/v4-mini/index.d.cts | 1 +
node_modules/zod/v4-mini/index.d.ts | 1 +
node_modules/zod/v4-mini/index.js | 1 +
node_modules/zod/v4/classic/checks.cjs | 32 +
node_modules/zod/v4/classic/checks.d.cts | 1 +
node_modules/zod/v4/classic/checks.d.ts | 1 +
node_modules/zod/v4/classic/checks.js | 1 +
node_modules/zod/v4/classic/coerce.cjs | 47 +
node_modules/zod/v4/classic/coerce.d.cts | 17 +
node_modules/zod/v4/classic/coerce.d.ts | 17 +
node_modules/zod/v4/classic/coerce.js | 17 +
node_modules/zod/v4/classic/compat.cjs | 61 +
node_modules/zod/v4/classic/compat.d.cts | 50 +
node_modules/zod/v4/classic/compat.d.ts | 50 +
node_modules/zod/v4/classic/compat.js | 31 +
node_modules/zod/v4/classic/errors.cjs | 74 +
node_modules/zod/v4/classic/errors.d.cts | 30 +
node_modules/zod/v4/classic/errors.d.ts | 30 +
node_modules/zod/v4/classic/errors.js | 48 +
node_modules/zod/v4/classic/external.cjs | 70 +
node_modules/zod/v4/classic/external.d.cts | 13 +
node_modules/zod/v4/classic/external.d.ts | 13 +
node_modules/zod/v4/classic/external.js | 18 +
node_modules/zod/v4/classic/index.cjs | 33 +
node_modules/zod/v4/classic/index.d.cts | 4 +
node_modules/zod/v4/classic/index.d.ts | 4 +
node_modules/zod/v4/classic/index.js | 4 +
node_modules/zod/v4/classic/iso.cjs | 60 +
node_modules/zod/v4/classic/iso.d.cts | 22 +
node_modules/zod/v4/classic/iso.d.ts | 22 +
node_modules/zod/v4/classic/iso.js | 30 +
node_modules/zod/v4/classic/parse.cjs | 32 +
node_modules/zod/v4/classic/parse.d.cts | 23 +
node_modules/zod/v4/classic/parse.d.ts | 23 +
node_modules/zod/v4/classic/parse.js | 6 +
node_modules/zod/v4/classic/schemas.cjs | 1096 ++++
node_modules/zod/v4/classic/schemas.d.cts | 619 ++
node_modules/zod/v4/classic/schemas.d.ts | 619 ++
node_modules/zod/v4/classic/schemas.js | 992 ++++
node_modules/zod/v4/core/api.cjs | 1065 ++++
node_modules/zod/v4/core/api.d.cts | 296 +
node_modules/zod/v4/core/api.d.ts | 296 +
node_modules/zod/v4/core/api.js | 930 +++
node_modules/zod/v4/core/checks.cjs | 593 ++
node_modules/zod/v4/core/checks.d.cts | 278 +
node_modules/zod/v4/core/checks.d.ts | 278 +
node_modules/zod/v4/core/checks.js | 567 ++
node_modules/zod/v4/core/core.cjs | 67 +
node_modules/zod/v4/core/core.d.cts | 49 +
node_modules/zod/v4/core/core.d.ts | 49 +
node_modules/zod/v4/core/core.js | 61 +
node_modules/zod/v4/core/doc.cjs | 39 +
node_modules/zod/v4/core/doc.d.cts | 14 +
node_modules/zod/v4/core/doc.d.ts | 14 +
node_modules/zod/v4/core/doc.js | 35 +
node_modules/zod/v4/core/errors.cjs | 221 +
node_modules/zod/v4/core/errors.d.cts | 210 +
node_modules/zod/v4/core/errors.d.ts | 210 +
node_modules/zod/v4/core/errors.js | 190 +
node_modules/zod/v4/core/function.cjs | 102 +
node_modules/zod/v4/core/function.d.cts | 52 +
node_modules/zod/v4/core/function.d.ts | 52 +
node_modules/zod/v4/core/function.js | 75 +
node_modules/zod/v4/core/index.cjs | 44 +
node_modules/zod/v4/core/index.d.cts | 15 +
node_modules/zod/v4/core/index.d.ts | 15 +
node_modules/zod/v4/core/index.js | 15 +
node_modules/zod/v4/core/json-schema.cjs | 2 +
node_modules/zod/v4/core/json-schema.d.cts | 87 +
node_modules/zod/v4/core/json-schema.d.ts | 87 +
node_modules/zod/v4/core/json-schema.js | 1 +
node_modules/zod/v4/core/parse.cjs | 87 +
node_modules/zod/v4/core/parse.d.cts | 25 +
node_modules/zod/v4/core/parse.d.ts | 25 +
node_modules/zod/v4/core/parse.js | 57 +
node_modules/zod/v4/core/regexes.cjs | 104 +
node_modules/zod/v4/core/regexes.d.cts | 62 +
node_modules/zod/v4/core/regexes.d.ts | 62 +
node_modules/zod/v4/core/regexes.js | 96 +
node_modules/zod/v4/core/registries.cjs | 57 +
node_modules/zod/v4/core/registries.d.cts | 35 +
node_modules/zod/v4/core/registries.d.ts | 35 +
node_modules/zod/v4/core/registries.js | 52 +
node_modules/zod/v4/core/schemas.cjs | 1734 ++++++
node_modules/zod/v4/core/schemas.d.cts | 1055 ++++
node_modules/zod/v4/core/schemas.d.ts | 1055 ++++
node_modules/zod/v4/core/schemas.js | 1703 ++++++
node_modules/zod/v4/core/standard-schema.cjs | 2 +
.../zod/v4/core/standard-schema.d.cts | 55 +
node_modules/zod/v4/core/standard-schema.d.ts | 55 +
node_modules/zod/v4/core/standard-schema.js | 1 +
node_modules/zod/v4/core/to-json-schema.cjs | 882 +++
node_modules/zod/v4/core/to-json-schema.d.cts | 89 +
node_modules/zod/v4/core/to-json-schema.d.ts | 89 +
node_modules/zod/v4/core/to-json-schema.js | 877 +++
node_modules/zod/v4/core/util.cjs | 577 ++
node_modules/zod/v4/core/util.d.cts | 185 +
node_modules/zod/v4/core/util.d.ts | 185 +
node_modules/zod/v4/core/util.js | 529 ++
node_modules/zod/v4/core/versions.cjs | 8 +
node_modules/zod/v4/core/versions.d.cts | 5 +
node_modules/zod/v4/core/versions.d.ts | 5 +
node_modules/zod/v4/core/versions.js | 5 +
node_modules/zod/v4/index.cjs | 22 +
node_modules/zod/v4/index.d.cts | 3 +
node_modules/zod/v4/index.d.ts | 3 +
node_modules/zod/v4/index.js | 3 +
node_modules/zod/v4/locales/ar.cjs | 143 +
node_modules/zod/v4/locales/ar.d.cts | 5 +
node_modules/zod/v4/locales/ar.d.ts | 4 +
node_modules/zod/v4/locales/ar.js | 116 +
node_modules/zod/v4/locales/az.cjs | 142 +
node_modules/zod/v4/locales/az.d.cts | 5 +
node_modules/zod/v4/locales/az.d.ts | 4 +
node_modules/zod/v4/locales/az.js | 115 +
node_modules/zod/v4/locales/be.cjs | 191 +
node_modules/zod/v4/locales/be.d.cts | 5 +
node_modules/zod/v4/locales/be.d.ts | 4 +
node_modules/zod/v4/locales/be.js | 164 +
node_modules/zod/v4/locales/bg.cjs | 156 +
node_modules/zod/v4/locales/bg.d.cts | 5 +
node_modules/zod/v4/locales/bg.d.ts | 5 +
node_modules/zod/v4/locales/bg.js | 128 +
node_modules/zod/v4/locales/ca.cjs | 145 +
node_modules/zod/v4/locales/ca.d.cts | 5 +
node_modules/zod/v4/locales/ca.d.ts | 4 +
node_modules/zod/v4/locales/ca.js | 118 +
node_modules/zod/v4/locales/cs.cjs | 162 +
node_modules/zod/v4/locales/cs.d.cts | 5 +
node_modules/zod/v4/locales/cs.d.ts | 4 +
node_modules/zod/v4/locales/cs.js | 135 +
node_modules/zod/v4/locales/da.cjs | 158 +
node_modules/zod/v4/locales/da.d.cts | 5 +
node_modules/zod/v4/locales/da.d.ts | 4 +
node_modules/zod/v4/locales/da.js | 131 +
node_modules/zod/v4/locales/de.cjs | 143 +
node_modules/zod/v4/locales/de.d.cts | 5 +
node_modules/zod/v4/locales/de.d.ts | 4 +
node_modules/zod/v4/locales/de.js | 116 +
node_modules/zod/v4/locales/en.cjs | 145 +
node_modules/zod/v4/locales/en.d.cts | 5 +
node_modules/zod/v4/locales/en.d.ts | 5 +
node_modules/zod/v4/locales/en.js | 117 +
node_modules/zod/v4/locales/eo.cjs | 144 +
node_modules/zod/v4/locales/eo.d.cts | 5 +
node_modules/zod/v4/locales/eo.d.ts | 5 +
node_modules/zod/v4/locales/eo.js | 116 +
node_modules/zod/v4/locales/es.cjs | 144 +
node_modules/zod/v4/locales/es.d.cts | 5 +
node_modules/zod/v4/locales/es.d.ts | 4 +
node_modules/zod/v4/locales/es.js | 117 +
node_modules/zod/v4/locales/fa.cjs | 149 +
node_modules/zod/v4/locales/fa.d.cts | 5 +
node_modules/zod/v4/locales/fa.d.ts | 4 +
node_modules/zod/v4/locales/fa.js | 122 +
node_modules/zod/v4/locales/fi.cjs | 149 +
node_modules/zod/v4/locales/fi.d.cts | 5 +
node_modules/zod/v4/locales/fi.d.ts | 4 +
node_modules/zod/v4/locales/fi.js | 122 +
node_modules/zod/v4/locales/fr-CA.cjs | 144 +
node_modules/zod/v4/locales/fr-CA.d.cts | 5 +
node_modules/zod/v4/locales/fr-CA.d.ts | 4 +
node_modules/zod/v4/locales/fr-CA.js | 117 +
node_modules/zod/v4/locales/fr.cjs | 143 +
node_modules/zod/v4/locales/fr.d.cts | 5 +
node_modules/zod/v4/locales/fr.d.ts | 4 +
node_modules/zod/v4/locales/fr.js | 116 +
node_modules/zod/v4/locales/he.cjs | 144 +
node_modules/zod/v4/locales/he.d.cts | 5 +
node_modules/zod/v4/locales/he.d.ts | 4 +
node_modules/zod/v4/locales/he.js | 117 +
node_modules/zod/v4/locales/hu.cjs | 144 +
node_modules/zod/v4/locales/hu.d.cts | 5 +
node_modules/zod/v4/locales/hu.d.ts | 4 +
node_modules/zod/v4/locales/hu.js | 117 +
node_modules/zod/v4/locales/id.cjs | 143 +
node_modules/zod/v4/locales/id.d.cts | 5 +
node_modules/zod/v4/locales/id.d.ts | 4 +
node_modules/zod/v4/locales/id.js | 116 +
node_modules/zod/v4/locales/index.cjs | 90 +
node_modules/zod/v4/locales/index.d.cts | 42 +
node_modules/zod/v4/locales/index.d.ts | 42 +
node_modules/zod/v4/locales/index.js | 42 +
node_modules/zod/v4/locales/is.cjs | 145 +
node_modules/zod/v4/locales/is.d.cts | 5 +
node_modules/zod/v4/locales/is.d.ts | 5 +
node_modules/zod/v4/locales/is.js | 117 +
node_modules/zod/v4/locales/it.cjs | 144 +
node_modules/zod/v4/locales/it.d.cts | 5 +
node_modules/zod/v4/locales/it.d.ts | 4 +
node_modules/zod/v4/locales/it.js | 117 +
node_modules/zod/v4/locales/ja.cjs | 142 +
node_modules/zod/v4/locales/ja.d.cts | 5 +
node_modules/zod/v4/locales/ja.d.ts | 4 +
node_modules/zod/v4/locales/ja.js | 115 +
node_modules/zod/v4/locales/kh.cjs | 144 +
node_modules/zod/v4/locales/kh.d.cts | 5 +
node_modules/zod/v4/locales/kh.d.ts | 4 +
node_modules/zod/v4/locales/kh.js | 117 +
node_modules/zod/v4/locales/ko.cjs | 148 +
node_modules/zod/v4/locales/ko.d.cts | 5 +
node_modules/zod/v4/locales/ko.d.ts | 4 +
node_modules/zod/v4/locales/ko.js | 121 +
node_modules/zod/v4/locales/mk.cjs | 145 +
node_modules/zod/v4/locales/mk.d.cts | 5 +
node_modules/zod/v4/locales/mk.d.ts | 4 +
node_modules/zod/v4/locales/mk.js | 118 +
node_modules/zod/v4/locales/ms.cjs | 143 +
node_modules/zod/v4/locales/ms.d.cts | 5 +
node_modules/zod/v4/locales/ms.d.ts | 4 +
node_modules/zod/v4/locales/ms.js | 116 +
node_modules/zod/v4/locales/nl.cjs | 144 +
node_modules/zod/v4/locales/nl.d.cts | 5 +
node_modules/zod/v4/locales/nl.d.ts | 4 +
node_modules/zod/v4/locales/nl.js | 117 +
node_modules/zod/v4/locales/no.cjs | 143 +
node_modules/zod/v4/locales/no.d.cts | 5 +
node_modules/zod/v4/locales/no.d.ts | 4 +
node_modules/zod/v4/locales/no.js | 116 +
node_modules/zod/v4/locales/ota.cjs | 144 +
node_modules/zod/v4/locales/ota.d.cts | 5 +
node_modules/zod/v4/locales/ota.d.ts | 4 +
node_modules/zod/v4/locales/ota.js | 117 +
node_modules/zod/v4/locales/pl.cjs | 144 +
node_modules/zod/v4/locales/pl.d.cts | 5 +
node_modules/zod/v4/locales/pl.d.ts | 4 +
node_modules/zod/v4/locales/pl.js | 117 +
node_modules/zod/v4/locales/ps.cjs | 149 +
node_modules/zod/v4/locales/ps.d.cts | 5 +
node_modules/zod/v4/locales/ps.d.ts | 4 +
node_modules/zod/v4/locales/ps.js | 122 +
node_modules/zod/v4/locales/pt.cjs | 143 +
node_modules/zod/v4/locales/pt.d.cts | 5 +
node_modules/zod/v4/locales/pt.d.ts | 4 +
node_modules/zod/v4/locales/pt.js | 116 +
node_modules/zod/v4/locales/ru.cjs | 191 +
node_modules/zod/v4/locales/ru.d.cts | 5 +
node_modules/zod/v4/locales/ru.d.ts | 4 +
node_modules/zod/v4/locales/ru.js | 164 +
node_modules/zod/v4/locales/sl.cjs | 144 +
node_modules/zod/v4/locales/sl.d.cts | 5 +
node_modules/zod/v4/locales/sl.d.ts | 4 +
node_modules/zod/v4/locales/sl.js | 117 +
node_modules/zod/v4/locales/sv.cjs | 145 +
node_modules/zod/v4/locales/sv.d.cts | 5 +
node_modules/zod/v4/locales/sv.d.ts | 4 +
node_modules/zod/v4/locales/sv.js | 118 +
node_modules/zod/v4/locales/ta.cjs | 144 +
node_modules/zod/v4/locales/ta.d.cts | 5 +
node_modules/zod/v4/locales/ta.d.ts | 4 +
node_modules/zod/v4/locales/ta.js | 117 +
node_modules/zod/v4/locales/th.cjs | 144 +
node_modules/zod/v4/locales/th.d.cts | 5 +
node_modules/zod/v4/locales/th.d.ts | 4 +
node_modules/zod/v4/locales/th.js | 117 +
node_modules/zod/v4/locales/tr.cjs | 143 +
node_modules/zod/v4/locales/tr.d.cts | 5 +
node_modules/zod/v4/locales/tr.d.ts | 5 +
node_modules/zod/v4/locales/tr.js | 115 +
node_modules/zod/v4/locales/ua.cjs | 144 +
node_modules/zod/v4/locales/ua.d.cts | 5 +
node_modules/zod/v4/locales/ua.d.ts | 4 +
node_modules/zod/v4/locales/ua.js | 117 +
node_modules/zod/v4/locales/ur.cjs | 144 +
node_modules/zod/v4/locales/ur.d.cts | 5 +
node_modules/zod/v4/locales/ur.d.ts | 4 +
node_modules/zod/v4/locales/ur.js | 117 +
node_modules/zod/v4/locales/vi.cjs | 143 +
node_modules/zod/v4/locales/vi.d.cts | 5 +
node_modules/zod/v4/locales/vi.d.ts | 4 +
node_modules/zod/v4/locales/vi.js | 116 +
node_modules/zod/v4/locales/yo.cjs | 142 +
node_modules/zod/v4/locales/yo.d.cts | 5 +
node_modules/zod/v4/locales/yo.d.ts | 4 +
node_modules/zod/v4/locales/yo.js | 115 +
node_modules/zod/v4/locales/zh-CN.cjs | 143 +
node_modules/zod/v4/locales/zh-CN.d.cts | 5 +
node_modules/zod/v4/locales/zh-CN.d.ts | 4 +
node_modules/zod/v4/locales/zh-CN.js | 116 +
node_modules/zod/v4/locales/zh-TW.cjs | 144 +
node_modules/zod/v4/locales/zh-TW.d.cts | 5 +
node_modules/zod/v4/locales/zh-TW.d.ts | 4 +
node_modules/zod/v4/locales/zh-TW.js | 117 +
node_modules/zod/v4/mini/checks.cjs | 34 +
node_modules/zod/v4/mini/checks.d.cts | 1 +
node_modules/zod/v4/mini/checks.d.ts | 1 +
node_modules/zod/v4/mini/checks.js | 1 +
node_modules/zod/v4/mini/coerce.cjs | 47 +
node_modules/zod/v4/mini/coerce.d.cts | 7 +
node_modules/zod/v4/mini/coerce.d.ts | 7 +
node_modules/zod/v4/mini/coerce.js | 17 +
node_modules/zod/v4/mini/external.cjs | 62 +
node_modules/zod/v4/mini/external.d.cts | 11 +
node_modules/zod/v4/mini/external.d.ts | 11 +
node_modules/zod/v4/mini/external.js | 13 +
node_modules/zod/v4/mini/index.cjs | 32 +
node_modules/zod/v4/mini/index.d.cts | 3 +
node_modules/zod/v4/mini/index.d.ts | 3 +
node_modules/zod/v4/mini/index.js | 3 +
node_modules/zod/v4/mini/iso.cjs | 60 +
node_modules/zod/v4/mini/iso.d.cts | 22 +
node_modules/zod/v4/mini/iso.d.ts | 22 +
node_modules/zod/v4/mini/iso.js | 30 +
node_modules/zod/v4/mini/parse.cjs | 8 +
node_modules/zod/v4/mini/parse.d.cts | 1 +
node_modules/zod/v4/mini/parse.d.ts | 1 +
node_modules/zod/v4/mini/parse.js | 1 +
node_modules/zod/v4/mini/schemas.cjs | 850 +++
node_modules/zod/v4/mini/schemas.d.cts | 358 ++
node_modules/zod/v4/mini/schemas.d.ts | 358 ++
node_modules/zod/v4/mini/schemas.js | 741 +++
package-lock.json | 21 +
package.json | 5 +
637 files changed, 101735 insertions(+), 12 deletions(-)
create mode 100644 frontend/src/lib/components/QueueSlider.svelte
create mode 100644 frontend/src/lib/components/SuggestionInput.svelte
create mode 100644 frontend/src/lib/components/SuggestionList.svelte
delete mode 100644 frontend/src/lib/index.ts
create mode 100644 frontend/src/lib/types.ts
create mode 100644 node_modules/.package-lock.json
create mode 100644 node_modules/zod/LICENSE
create mode 100644 node_modules/zod/README.md
create mode 100644 node_modules/zod/index.cjs
create mode 100644 node_modules/zod/index.d.cts
create mode 100644 node_modules/zod/index.d.ts
create mode 100644 node_modules/zod/index.js
create mode 100644 node_modules/zod/locales/index.cjs
create mode 100644 node_modules/zod/locales/index.d.cts
create mode 100644 node_modules/zod/locales/index.d.ts
create mode 100644 node_modules/zod/locales/index.js
create mode 100644 node_modules/zod/mini/index.cjs
create mode 100644 node_modules/zod/mini/index.d.cts
create mode 100644 node_modules/zod/mini/index.d.ts
create mode 100644 node_modules/zod/mini/index.js
create mode 100644 node_modules/zod/package.json
create mode 100644 node_modules/zod/src/index.ts
create mode 100644 node_modules/zod/src/locales/index.ts
create mode 100644 node_modules/zod/src/mini/index.ts
create mode 100644 node_modules/zod/src/v3/ZodError.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/datetime.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/index.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/ipv4.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/object.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/primitives.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/realworld.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/string.ts
create mode 100644 node_modules/zod/src/v3/benchmarks/union.ts
create mode 100644 node_modules/zod/src/v3/errors.ts
create mode 100644 node_modules/zod/src/v3/external.ts
create mode 100644 node_modules/zod/src/v3/helpers/enumUtil.ts
create mode 100644 node_modules/zod/src/v3/helpers/errorUtil.ts
create mode 100644 node_modules/zod/src/v3/helpers/parseUtil.ts
create mode 100644 node_modules/zod/src/v3/helpers/partialUtil.ts
create mode 100644 node_modules/zod/src/v3/helpers/typeAliases.ts
create mode 100644 node_modules/zod/src/v3/helpers/util.ts
create mode 100644 node_modules/zod/src/v3/index.ts
create mode 100644 node_modules/zod/src/v3/locales/en.ts
create mode 100644 node_modules/zod/src/v3/standard-schema.ts
create mode 100644 node_modules/zod/src/v3/tests/Mocker.ts
create mode 100644 node_modules/zod/src/v3/tests/all-errors.test.ts
create mode 100644 node_modules/zod/src/v3/tests/anyunknown.test.ts
create mode 100644 node_modules/zod/src/v3/tests/array.test.ts
create mode 100644 node_modules/zod/src/v3/tests/async-parsing.test.ts
create mode 100644 node_modules/zod/src/v3/tests/async-refinements.test.ts
create mode 100644 node_modules/zod/src/v3/tests/base.test.ts
create mode 100644 node_modules/zod/src/v3/tests/bigint.test.ts
create mode 100644 node_modules/zod/src/v3/tests/branded.test.ts
create mode 100644 node_modules/zod/src/v3/tests/catch.test.ts
create mode 100644 node_modules/zod/src/v3/tests/coerce.test.ts
create mode 100644 node_modules/zod/src/v3/tests/complex.test.ts
create mode 100644 node_modules/zod/src/v3/tests/custom.test.ts
create mode 100644 node_modules/zod/src/v3/tests/date.test.ts
create mode 100644 node_modules/zod/src/v3/tests/deepmasking.test.ts
create mode 100644 node_modules/zod/src/v3/tests/default.test.ts
create mode 100644 node_modules/zod/src/v3/tests/description.test.ts
create mode 100644 node_modules/zod/src/v3/tests/discriminated-unions.test.ts
create mode 100644 node_modules/zod/src/v3/tests/enum.test.ts
create mode 100644 node_modules/zod/src/v3/tests/error.test.ts
create mode 100644 node_modules/zod/src/v3/tests/firstparty.test.ts
create mode 100644 node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts
create mode 100644 node_modules/zod/src/v3/tests/function.test.ts
create mode 100644 node_modules/zod/src/v3/tests/generics.test.ts
create mode 100644 node_modules/zod/src/v3/tests/instanceof.test.ts
create mode 100644 node_modules/zod/src/v3/tests/intersection.test.ts
create mode 100644 node_modules/zod/src/v3/tests/language-server.source.ts
create mode 100644 node_modules/zod/src/v3/tests/language-server.test.ts
create mode 100644 node_modules/zod/src/v3/tests/literal.test.ts
create mode 100644 node_modules/zod/src/v3/tests/map.test.ts
create mode 100644 node_modules/zod/src/v3/tests/masking.test.ts
create mode 100644 node_modules/zod/src/v3/tests/mocker.test.ts
create mode 100644 node_modules/zod/src/v3/tests/nan.test.ts
create mode 100644 node_modules/zod/src/v3/tests/nativeEnum.test.ts
create mode 100644 node_modules/zod/src/v3/tests/nullable.test.ts
create mode 100644 node_modules/zod/src/v3/tests/number.test.ts
create mode 100644 node_modules/zod/src/v3/tests/object-augmentation.test.ts
create mode 100644 node_modules/zod/src/v3/tests/object-in-es5-env.test.ts
create mode 100644 node_modules/zod/src/v3/tests/object.test.ts
create mode 100644 node_modules/zod/src/v3/tests/optional.test.ts
create mode 100644 node_modules/zod/src/v3/tests/parseUtil.test.ts
create mode 100644 node_modules/zod/src/v3/tests/parser.test.ts
create mode 100644 node_modules/zod/src/v3/tests/partials.test.ts
create mode 100644 node_modules/zod/src/v3/tests/pickomit.test.ts
create mode 100644 node_modules/zod/src/v3/tests/pipeline.test.ts
create mode 100644 node_modules/zod/src/v3/tests/preprocess.test.ts
create mode 100644 node_modules/zod/src/v3/tests/primitive.test.ts
create mode 100644 node_modules/zod/src/v3/tests/promise.test.ts
create mode 100644 node_modules/zod/src/v3/tests/readonly.test.ts
create mode 100644 node_modules/zod/src/v3/tests/record.test.ts
create mode 100644 node_modules/zod/src/v3/tests/recursive.test.ts
create mode 100644 node_modules/zod/src/v3/tests/refine.test.ts
create mode 100644 node_modules/zod/src/v3/tests/safeparse.test.ts
create mode 100644 node_modules/zod/src/v3/tests/set.test.ts
create mode 100644 node_modules/zod/src/v3/tests/standard-schema.test.ts
create mode 100644 node_modules/zod/src/v3/tests/string.test.ts
create mode 100644 node_modules/zod/src/v3/tests/transformer.test.ts
create mode 100644 node_modules/zod/src/v3/tests/tuple.test.ts
create mode 100644 node_modules/zod/src/v3/tests/unions.test.ts
create mode 100644 node_modules/zod/src/v3/tests/validations.test.ts
create mode 100644 node_modules/zod/src/v3/tests/void.test.ts
create mode 100644 node_modules/zod/src/v3/types.ts
create mode 100644 node_modules/zod/src/v4-mini/index.ts
create mode 100644 node_modules/zod/src/v4/classic/checks.ts
create mode 100644 node_modules/zod/src/v4/classic/coerce.ts
create mode 100644 node_modules/zod/src/v4/classic/compat.ts
create mode 100644 node_modules/zod/src/v4/classic/errors.ts
create mode 100644 node_modules/zod/src/v4/classic/external.ts
create mode 100644 node_modules/zod/src/v4/classic/index.ts
create mode 100644 node_modules/zod/src/v4/classic/iso.ts
create mode 100644 node_modules/zod/src/v4/classic/parse.ts
create mode 100644 node_modules/zod/src/v4/classic/schemas.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/anyunknown.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/array.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/assignability.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/async-parsing.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/async-refinements.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/base.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/bigint.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/brand.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/catch.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/coalesce.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/coerce.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/continuability.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/custom.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/date.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/datetime.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/default.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/description.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/enum.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/error-utils.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/error.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/file.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/firstparty.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/function.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/generics.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/index.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/instanceof.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/intersection.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/json.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/lazy.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/literal.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/map.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/nan.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/nested-refine.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/nonoptional.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/nullable.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/number.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/object.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/optional.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/partial.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/pickomit.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/pipe.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/prefault.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/preprocess.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/primitive.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/promise.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/prototypes.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/readonly.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/record.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/recursive-types.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/refine.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/registries.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/set.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/standard-schema.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/string-formats.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/string.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/stringbool.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/template-literal.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/transform.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/tuple.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/union.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/validations.test.ts
create mode 100644 node_modules/zod/src/v4/classic/tests/void.test.ts
create mode 100644 node_modules/zod/src/v4/core/api.ts
create mode 100644 node_modules/zod/src/v4/core/checks.ts
create mode 100644 node_modules/zod/src/v4/core/config.ts
create mode 100644 node_modules/zod/src/v4/core/core.ts
create mode 100644 node_modules/zod/src/v4/core/doc.ts
create mode 100644 node_modules/zod/src/v4/core/errors.ts
create mode 100644 node_modules/zod/src/v4/core/function.ts
create mode 100644 node_modules/zod/src/v4/core/index.ts
create mode 100644 node_modules/zod/src/v4/core/json-schema.ts
create mode 100644 node_modules/zod/src/v4/core/parse.ts
create mode 100644 node_modules/zod/src/v4/core/regexes.ts
create mode 100644 node_modules/zod/src/v4/core/registries.ts
create mode 100644 node_modules/zod/src/v4/core/schemas.ts
create mode 100644 node_modules/zod/src/v4/core/standard-schema.ts
create mode 100644 node_modules/zod/src/v4/core/tests/extend.test.ts
create mode 100644 node_modules/zod/src/v4/core/tests/index.test.ts
create mode 100644 node_modules/zod/src/v4/core/tests/locales/be.test.ts
create mode 100644 node_modules/zod/src/v4/core/tests/locales/en.test.ts
create mode 100644 node_modules/zod/src/v4/core/tests/locales/ru.test.ts
create mode 100644 node_modules/zod/src/v4/core/tests/locales/tr.test.ts
create mode 100644 node_modules/zod/src/v4/core/to-json-schema.ts
create mode 100644 node_modules/zod/src/v4/core/util.ts
create mode 100644 node_modules/zod/src/v4/core/versions.ts
create mode 100644 node_modules/zod/src/v4/core/zsf.ts
create mode 100644 node_modules/zod/src/v4/index.ts
create mode 100644 node_modules/zod/src/v4/locales/ar.ts
create mode 100644 node_modules/zod/src/v4/locales/az.ts
create mode 100644 node_modules/zod/src/v4/locales/be.ts
create mode 100644 node_modules/zod/src/v4/locales/bg.ts
create mode 100644 node_modules/zod/src/v4/locales/ca.ts
create mode 100644 node_modules/zod/src/v4/locales/cs.ts
create mode 100644 node_modules/zod/src/v4/locales/da.ts
create mode 100644 node_modules/zod/src/v4/locales/de.ts
create mode 100644 node_modules/zod/src/v4/locales/en.ts
create mode 100644 node_modules/zod/src/v4/locales/eo.ts
create mode 100644 node_modules/zod/src/v4/locales/es.ts
create mode 100644 node_modules/zod/src/v4/locales/fa.ts
create mode 100644 node_modules/zod/src/v4/locales/fi.ts
create mode 100644 node_modules/zod/src/v4/locales/fr-CA.ts
create mode 100644 node_modules/zod/src/v4/locales/fr.ts
create mode 100644 node_modules/zod/src/v4/locales/he.ts
create mode 100644 node_modules/zod/src/v4/locales/hu.ts
create mode 100644 node_modules/zod/src/v4/locales/id.ts
create mode 100644 node_modules/zod/src/v4/locales/index.ts
create mode 100644 node_modules/zod/src/v4/locales/is.ts
create mode 100644 node_modules/zod/src/v4/locales/it.ts
create mode 100644 node_modules/zod/src/v4/locales/ja.ts
create mode 100644 node_modules/zod/src/v4/locales/kh.ts
create mode 100644 node_modules/zod/src/v4/locales/ko.ts
create mode 100644 node_modules/zod/src/v4/locales/mk.ts
create mode 100644 node_modules/zod/src/v4/locales/ms.ts
create mode 100644 node_modules/zod/src/v4/locales/nl.ts
create mode 100644 node_modules/zod/src/v4/locales/no.ts
create mode 100644 node_modules/zod/src/v4/locales/ota.ts
create mode 100644 node_modules/zod/src/v4/locales/pl.ts
create mode 100644 node_modules/zod/src/v4/locales/ps.ts
create mode 100644 node_modules/zod/src/v4/locales/pt.ts
create mode 100644 node_modules/zod/src/v4/locales/ru.ts
create mode 100644 node_modules/zod/src/v4/locales/sl.ts
create mode 100644 node_modules/zod/src/v4/locales/sv.ts
create mode 100644 node_modules/zod/src/v4/locales/ta.ts
create mode 100644 node_modules/zod/src/v4/locales/th.ts
create mode 100644 node_modules/zod/src/v4/locales/tr.ts
create mode 100644 node_modules/zod/src/v4/locales/ua.ts
create mode 100644 node_modules/zod/src/v4/locales/ur.ts
create mode 100644 node_modules/zod/src/v4/locales/vi.ts
create mode 100644 node_modules/zod/src/v4/locales/yo.ts
create mode 100644 node_modules/zod/src/v4/locales/zh-CN.ts
create mode 100644 node_modules/zod/src/v4/locales/zh-TW.ts
create mode 100644 node_modules/zod/src/v4/mini/checks.ts
create mode 100644 node_modules/zod/src/v4/mini/coerce.ts
create mode 100644 node_modules/zod/src/v4/mini/external.ts
create mode 100644 node_modules/zod/src/v4/mini/index.ts
create mode 100644 node_modules/zod/src/v4/mini/iso.ts
create mode 100644 node_modules/zod/src/v4/mini/parse.ts
create mode 100644 node_modules/zod/src/v4/mini/schemas.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/assignability.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/brand.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/checks.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/computed.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/error.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/functions.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/index.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/number.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/object.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/prototypes.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/recursive-types.test.ts
create mode 100644 node_modules/zod/src/v4/mini/tests/string.test.ts
create mode 100644 node_modules/zod/v3/ZodError.cjs
create mode 100644 node_modules/zod/v3/ZodError.d.cts
create mode 100644 node_modules/zod/v3/ZodError.d.ts
create mode 100644 node_modules/zod/v3/ZodError.js
create mode 100644 node_modules/zod/v3/errors.cjs
create mode 100644 node_modules/zod/v3/errors.d.cts
create mode 100644 node_modules/zod/v3/errors.d.ts
create mode 100644 node_modules/zod/v3/errors.js
create mode 100644 node_modules/zod/v3/external.cjs
create mode 100644 node_modules/zod/v3/external.d.cts
create mode 100644 node_modules/zod/v3/external.d.ts
create mode 100644 node_modules/zod/v3/external.js
create mode 100644 node_modules/zod/v3/helpers/enumUtil.cjs
create mode 100644 node_modules/zod/v3/helpers/enumUtil.d.cts
create mode 100644 node_modules/zod/v3/helpers/enumUtil.d.ts
create mode 100644 node_modules/zod/v3/helpers/enumUtil.js
create mode 100644 node_modules/zod/v3/helpers/errorUtil.cjs
create mode 100644 node_modules/zod/v3/helpers/errorUtil.d.cts
create mode 100644 node_modules/zod/v3/helpers/errorUtil.d.ts
create mode 100644 node_modules/zod/v3/helpers/errorUtil.js
create mode 100644 node_modules/zod/v3/helpers/parseUtil.cjs
create mode 100644 node_modules/zod/v3/helpers/parseUtil.d.cts
create mode 100644 node_modules/zod/v3/helpers/parseUtil.d.ts
create mode 100644 node_modules/zod/v3/helpers/parseUtil.js
create mode 100644 node_modules/zod/v3/helpers/partialUtil.cjs
create mode 100644 node_modules/zod/v3/helpers/partialUtil.d.cts
create mode 100644 node_modules/zod/v3/helpers/partialUtil.d.ts
create mode 100644 node_modules/zod/v3/helpers/partialUtil.js
create mode 100644 node_modules/zod/v3/helpers/typeAliases.cjs
create mode 100644 node_modules/zod/v3/helpers/typeAliases.d.cts
create mode 100644 node_modules/zod/v3/helpers/typeAliases.d.ts
create mode 100644 node_modules/zod/v3/helpers/typeAliases.js
create mode 100644 node_modules/zod/v3/helpers/util.cjs
create mode 100644 node_modules/zod/v3/helpers/util.d.cts
create mode 100644 node_modules/zod/v3/helpers/util.d.ts
create mode 100644 node_modules/zod/v3/helpers/util.js
create mode 100644 node_modules/zod/v3/index.cjs
create mode 100644 node_modules/zod/v3/index.d.cts
create mode 100644 node_modules/zod/v3/index.d.ts
create mode 100644 node_modules/zod/v3/index.js
create mode 100644 node_modules/zod/v3/locales/en.cjs
create mode 100644 node_modules/zod/v3/locales/en.d.cts
create mode 100644 node_modules/zod/v3/locales/en.d.ts
create mode 100644 node_modules/zod/v3/locales/en.js
create mode 100644 node_modules/zod/v3/standard-schema.cjs
create mode 100644 node_modules/zod/v3/standard-schema.d.cts
create mode 100644 node_modules/zod/v3/standard-schema.d.ts
create mode 100644 node_modules/zod/v3/standard-schema.js
create mode 100644 node_modules/zod/v3/types.cjs
create mode 100644 node_modules/zod/v3/types.d.cts
create mode 100644 node_modules/zod/v3/types.d.ts
create mode 100644 node_modules/zod/v3/types.js
create mode 100644 node_modules/zod/v4-mini/index.cjs
create mode 100644 node_modules/zod/v4-mini/index.d.cts
create mode 100644 node_modules/zod/v4-mini/index.d.ts
create mode 100644 node_modules/zod/v4-mini/index.js
create mode 100644 node_modules/zod/v4/classic/checks.cjs
create mode 100644 node_modules/zod/v4/classic/checks.d.cts
create mode 100644 node_modules/zod/v4/classic/checks.d.ts
create mode 100644 node_modules/zod/v4/classic/checks.js
create mode 100644 node_modules/zod/v4/classic/coerce.cjs
create mode 100644 node_modules/zod/v4/classic/coerce.d.cts
create mode 100644 node_modules/zod/v4/classic/coerce.d.ts
create mode 100644 node_modules/zod/v4/classic/coerce.js
create mode 100644 node_modules/zod/v4/classic/compat.cjs
create mode 100644 node_modules/zod/v4/classic/compat.d.cts
create mode 100644 node_modules/zod/v4/classic/compat.d.ts
create mode 100644 node_modules/zod/v4/classic/compat.js
create mode 100644 node_modules/zod/v4/classic/errors.cjs
create mode 100644 node_modules/zod/v4/classic/errors.d.cts
create mode 100644 node_modules/zod/v4/classic/errors.d.ts
create mode 100644 node_modules/zod/v4/classic/errors.js
create mode 100644 node_modules/zod/v4/classic/external.cjs
create mode 100644 node_modules/zod/v4/classic/external.d.cts
create mode 100644 node_modules/zod/v4/classic/external.d.ts
create mode 100644 node_modules/zod/v4/classic/external.js
create mode 100644 node_modules/zod/v4/classic/index.cjs
create mode 100644 node_modules/zod/v4/classic/index.d.cts
create mode 100644 node_modules/zod/v4/classic/index.d.ts
create mode 100644 node_modules/zod/v4/classic/index.js
create mode 100644 node_modules/zod/v4/classic/iso.cjs
create mode 100644 node_modules/zod/v4/classic/iso.d.cts
create mode 100644 node_modules/zod/v4/classic/iso.d.ts
create mode 100644 node_modules/zod/v4/classic/iso.js
create mode 100644 node_modules/zod/v4/classic/parse.cjs
create mode 100644 node_modules/zod/v4/classic/parse.d.cts
create mode 100644 node_modules/zod/v4/classic/parse.d.ts
create mode 100644 node_modules/zod/v4/classic/parse.js
create mode 100644 node_modules/zod/v4/classic/schemas.cjs
create mode 100644 node_modules/zod/v4/classic/schemas.d.cts
create mode 100644 node_modules/zod/v4/classic/schemas.d.ts
create mode 100644 node_modules/zod/v4/classic/schemas.js
create mode 100644 node_modules/zod/v4/core/api.cjs
create mode 100644 node_modules/zod/v4/core/api.d.cts
create mode 100644 node_modules/zod/v4/core/api.d.ts
create mode 100644 node_modules/zod/v4/core/api.js
create mode 100644 node_modules/zod/v4/core/checks.cjs
create mode 100644 node_modules/zod/v4/core/checks.d.cts
create mode 100644 node_modules/zod/v4/core/checks.d.ts
create mode 100644 node_modules/zod/v4/core/checks.js
create mode 100644 node_modules/zod/v4/core/core.cjs
create mode 100644 node_modules/zod/v4/core/core.d.cts
create mode 100644 node_modules/zod/v4/core/core.d.ts
create mode 100644 node_modules/zod/v4/core/core.js
create mode 100644 node_modules/zod/v4/core/doc.cjs
create mode 100644 node_modules/zod/v4/core/doc.d.cts
create mode 100644 node_modules/zod/v4/core/doc.d.ts
create mode 100644 node_modules/zod/v4/core/doc.js
create mode 100644 node_modules/zod/v4/core/errors.cjs
create mode 100644 node_modules/zod/v4/core/errors.d.cts
create mode 100644 node_modules/zod/v4/core/errors.d.ts
create mode 100644 node_modules/zod/v4/core/errors.js
create mode 100644 node_modules/zod/v4/core/function.cjs
create mode 100644 node_modules/zod/v4/core/function.d.cts
create mode 100644 node_modules/zod/v4/core/function.d.ts
create mode 100644 node_modules/zod/v4/core/function.js
create mode 100644 node_modules/zod/v4/core/index.cjs
create mode 100644 node_modules/zod/v4/core/index.d.cts
create mode 100644 node_modules/zod/v4/core/index.d.ts
create mode 100644 node_modules/zod/v4/core/index.js
create mode 100644 node_modules/zod/v4/core/json-schema.cjs
create mode 100644 node_modules/zod/v4/core/json-schema.d.cts
create mode 100644 node_modules/zod/v4/core/json-schema.d.ts
create mode 100644 node_modules/zod/v4/core/json-schema.js
create mode 100644 node_modules/zod/v4/core/parse.cjs
create mode 100644 node_modules/zod/v4/core/parse.d.cts
create mode 100644 node_modules/zod/v4/core/parse.d.ts
create mode 100644 node_modules/zod/v4/core/parse.js
create mode 100644 node_modules/zod/v4/core/regexes.cjs
create mode 100644 node_modules/zod/v4/core/regexes.d.cts
create mode 100644 node_modules/zod/v4/core/regexes.d.ts
create mode 100644 node_modules/zod/v4/core/regexes.js
create mode 100644 node_modules/zod/v4/core/registries.cjs
create mode 100644 node_modules/zod/v4/core/registries.d.cts
create mode 100644 node_modules/zod/v4/core/registries.d.ts
create mode 100644 node_modules/zod/v4/core/registries.js
create mode 100644 node_modules/zod/v4/core/schemas.cjs
create mode 100644 node_modules/zod/v4/core/schemas.d.cts
create mode 100644 node_modules/zod/v4/core/schemas.d.ts
create mode 100644 node_modules/zod/v4/core/schemas.js
create mode 100644 node_modules/zod/v4/core/standard-schema.cjs
create mode 100644 node_modules/zod/v4/core/standard-schema.d.cts
create mode 100644 node_modules/zod/v4/core/standard-schema.d.ts
create mode 100644 node_modules/zod/v4/core/standard-schema.js
create mode 100644 node_modules/zod/v4/core/to-json-schema.cjs
create mode 100644 node_modules/zod/v4/core/to-json-schema.d.cts
create mode 100644 node_modules/zod/v4/core/to-json-schema.d.ts
create mode 100644 node_modules/zod/v4/core/to-json-schema.js
create mode 100644 node_modules/zod/v4/core/util.cjs
create mode 100644 node_modules/zod/v4/core/util.d.cts
create mode 100644 node_modules/zod/v4/core/util.d.ts
create mode 100644 node_modules/zod/v4/core/util.js
create mode 100644 node_modules/zod/v4/core/versions.cjs
create mode 100644 node_modules/zod/v4/core/versions.d.cts
create mode 100644 node_modules/zod/v4/core/versions.d.ts
create mode 100644 node_modules/zod/v4/core/versions.js
create mode 100644 node_modules/zod/v4/index.cjs
create mode 100644 node_modules/zod/v4/index.d.cts
create mode 100644 node_modules/zod/v4/index.d.ts
create mode 100644 node_modules/zod/v4/index.js
create mode 100644 node_modules/zod/v4/locales/ar.cjs
create mode 100644 node_modules/zod/v4/locales/ar.d.cts
create mode 100644 node_modules/zod/v4/locales/ar.d.ts
create mode 100644 node_modules/zod/v4/locales/ar.js
create mode 100644 node_modules/zod/v4/locales/az.cjs
create mode 100644 node_modules/zod/v4/locales/az.d.cts
create mode 100644 node_modules/zod/v4/locales/az.d.ts
create mode 100644 node_modules/zod/v4/locales/az.js
create mode 100644 node_modules/zod/v4/locales/be.cjs
create mode 100644 node_modules/zod/v4/locales/be.d.cts
create mode 100644 node_modules/zod/v4/locales/be.d.ts
create mode 100644 node_modules/zod/v4/locales/be.js
create mode 100644 node_modules/zod/v4/locales/bg.cjs
create mode 100644 node_modules/zod/v4/locales/bg.d.cts
create mode 100644 node_modules/zod/v4/locales/bg.d.ts
create mode 100644 node_modules/zod/v4/locales/bg.js
create mode 100644 node_modules/zod/v4/locales/ca.cjs
create mode 100644 node_modules/zod/v4/locales/ca.d.cts
create mode 100644 node_modules/zod/v4/locales/ca.d.ts
create mode 100644 node_modules/zod/v4/locales/ca.js
create mode 100644 node_modules/zod/v4/locales/cs.cjs
create mode 100644 node_modules/zod/v4/locales/cs.d.cts
create mode 100644 node_modules/zod/v4/locales/cs.d.ts
create mode 100644 node_modules/zod/v4/locales/cs.js
create mode 100644 node_modules/zod/v4/locales/da.cjs
create mode 100644 node_modules/zod/v4/locales/da.d.cts
create mode 100644 node_modules/zod/v4/locales/da.d.ts
create mode 100644 node_modules/zod/v4/locales/da.js
create mode 100644 node_modules/zod/v4/locales/de.cjs
create mode 100644 node_modules/zod/v4/locales/de.d.cts
create mode 100644 node_modules/zod/v4/locales/de.d.ts
create mode 100644 node_modules/zod/v4/locales/de.js
create mode 100644 node_modules/zod/v4/locales/en.cjs
create mode 100644 node_modules/zod/v4/locales/en.d.cts
create mode 100644 node_modules/zod/v4/locales/en.d.ts
create mode 100644 node_modules/zod/v4/locales/en.js
create mode 100644 node_modules/zod/v4/locales/eo.cjs
create mode 100644 node_modules/zod/v4/locales/eo.d.cts
create mode 100644 node_modules/zod/v4/locales/eo.d.ts
create mode 100644 node_modules/zod/v4/locales/eo.js
create mode 100644 node_modules/zod/v4/locales/es.cjs
create mode 100644 node_modules/zod/v4/locales/es.d.cts
create mode 100644 node_modules/zod/v4/locales/es.d.ts
create mode 100644 node_modules/zod/v4/locales/es.js
create mode 100644 node_modules/zod/v4/locales/fa.cjs
create mode 100644 node_modules/zod/v4/locales/fa.d.cts
create mode 100644 node_modules/zod/v4/locales/fa.d.ts
create mode 100644 node_modules/zod/v4/locales/fa.js
create mode 100644 node_modules/zod/v4/locales/fi.cjs
create mode 100644 node_modules/zod/v4/locales/fi.d.cts
create mode 100644 node_modules/zod/v4/locales/fi.d.ts
create mode 100644 node_modules/zod/v4/locales/fi.js
create mode 100644 node_modules/zod/v4/locales/fr-CA.cjs
create mode 100644 node_modules/zod/v4/locales/fr-CA.d.cts
create mode 100644 node_modules/zod/v4/locales/fr-CA.d.ts
create mode 100644 node_modules/zod/v4/locales/fr-CA.js
create mode 100644 node_modules/zod/v4/locales/fr.cjs
create mode 100644 node_modules/zod/v4/locales/fr.d.cts
create mode 100644 node_modules/zod/v4/locales/fr.d.ts
create mode 100644 node_modules/zod/v4/locales/fr.js
create mode 100644 node_modules/zod/v4/locales/he.cjs
create mode 100644 node_modules/zod/v4/locales/he.d.cts
create mode 100644 node_modules/zod/v4/locales/he.d.ts
create mode 100644 node_modules/zod/v4/locales/he.js
create mode 100644 node_modules/zod/v4/locales/hu.cjs
create mode 100644 node_modules/zod/v4/locales/hu.d.cts
create mode 100644 node_modules/zod/v4/locales/hu.d.ts
create mode 100644 node_modules/zod/v4/locales/hu.js
create mode 100644 node_modules/zod/v4/locales/id.cjs
create mode 100644 node_modules/zod/v4/locales/id.d.cts
create mode 100644 node_modules/zod/v4/locales/id.d.ts
create mode 100644 node_modules/zod/v4/locales/id.js
create mode 100644 node_modules/zod/v4/locales/index.cjs
create mode 100644 node_modules/zod/v4/locales/index.d.cts
create mode 100644 node_modules/zod/v4/locales/index.d.ts
create mode 100644 node_modules/zod/v4/locales/index.js
create mode 100644 node_modules/zod/v4/locales/is.cjs
create mode 100644 node_modules/zod/v4/locales/is.d.cts
create mode 100644 node_modules/zod/v4/locales/is.d.ts
create mode 100644 node_modules/zod/v4/locales/is.js
create mode 100644 node_modules/zod/v4/locales/it.cjs
create mode 100644 node_modules/zod/v4/locales/it.d.cts
create mode 100644 node_modules/zod/v4/locales/it.d.ts
create mode 100644 node_modules/zod/v4/locales/it.js
create mode 100644 node_modules/zod/v4/locales/ja.cjs
create mode 100644 node_modules/zod/v4/locales/ja.d.cts
create mode 100644 node_modules/zod/v4/locales/ja.d.ts
create mode 100644 node_modules/zod/v4/locales/ja.js
create mode 100644 node_modules/zod/v4/locales/kh.cjs
create mode 100644 node_modules/zod/v4/locales/kh.d.cts
create mode 100644 node_modules/zod/v4/locales/kh.d.ts
create mode 100644 node_modules/zod/v4/locales/kh.js
create mode 100644 node_modules/zod/v4/locales/ko.cjs
create mode 100644 node_modules/zod/v4/locales/ko.d.cts
create mode 100644 node_modules/zod/v4/locales/ko.d.ts
create mode 100644 node_modules/zod/v4/locales/ko.js
create mode 100644 node_modules/zod/v4/locales/mk.cjs
create mode 100644 node_modules/zod/v4/locales/mk.d.cts
create mode 100644 node_modules/zod/v4/locales/mk.d.ts
create mode 100644 node_modules/zod/v4/locales/mk.js
create mode 100644 node_modules/zod/v4/locales/ms.cjs
create mode 100644 node_modules/zod/v4/locales/ms.d.cts
create mode 100644 node_modules/zod/v4/locales/ms.d.ts
create mode 100644 node_modules/zod/v4/locales/ms.js
create mode 100644 node_modules/zod/v4/locales/nl.cjs
create mode 100644 node_modules/zod/v4/locales/nl.d.cts
create mode 100644 node_modules/zod/v4/locales/nl.d.ts
create mode 100644 node_modules/zod/v4/locales/nl.js
create mode 100644 node_modules/zod/v4/locales/no.cjs
create mode 100644 node_modules/zod/v4/locales/no.d.cts
create mode 100644 node_modules/zod/v4/locales/no.d.ts
create mode 100644 node_modules/zod/v4/locales/no.js
create mode 100644 node_modules/zod/v4/locales/ota.cjs
create mode 100644 node_modules/zod/v4/locales/ota.d.cts
create mode 100644 node_modules/zod/v4/locales/ota.d.ts
create mode 100644 node_modules/zod/v4/locales/ota.js
create mode 100644 node_modules/zod/v4/locales/pl.cjs
create mode 100644 node_modules/zod/v4/locales/pl.d.cts
create mode 100644 node_modules/zod/v4/locales/pl.d.ts
create mode 100644 node_modules/zod/v4/locales/pl.js
create mode 100644 node_modules/zod/v4/locales/ps.cjs
create mode 100644 node_modules/zod/v4/locales/ps.d.cts
create mode 100644 node_modules/zod/v4/locales/ps.d.ts
create mode 100644 node_modules/zod/v4/locales/ps.js
create mode 100644 node_modules/zod/v4/locales/pt.cjs
create mode 100644 node_modules/zod/v4/locales/pt.d.cts
create mode 100644 node_modules/zod/v4/locales/pt.d.ts
create mode 100644 node_modules/zod/v4/locales/pt.js
create mode 100644 node_modules/zod/v4/locales/ru.cjs
create mode 100644 node_modules/zod/v4/locales/ru.d.cts
create mode 100644 node_modules/zod/v4/locales/ru.d.ts
create mode 100644 node_modules/zod/v4/locales/ru.js
create mode 100644 node_modules/zod/v4/locales/sl.cjs
create mode 100644 node_modules/zod/v4/locales/sl.d.cts
create mode 100644 node_modules/zod/v4/locales/sl.d.ts
create mode 100644 node_modules/zod/v4/locales/sl.js
create mode 100644 node_modules/zod/v4/locales/sv.cjs
create mode 100644 node_modules/zod/v4/locales/sv.d.cts
create mode 100644 node_modules/zod/v4/locales/sv.d.ts
create mode 100644 node_modules/zod/v4/locales/sv.js
create mode 100644 node_modules/zod/v4/locales/ta.cjs
create mode 100644 node_modules/zod/v4/locales/ta.d.cts
create mode 100644 node_modules/zod/v4/locales/ta.d.ts
create mode 100644 node_modules/zod/v4/locales/ta.js
create mode 100644 node_modules/zod/v4/locales/th.cjs
create mode 100644 node_modules/zod/v4/locales/th.d.cts
create mode 100644 node_modules/zod/v4/locales/th.d.ts
create mode 100644 node_modules/zod/v4/locales/th.js
create mode 100644 node_modules/zod/v4/locales/tr.cjs
create mode 100644 node_modules/zod/v4/locales/tr.d.cts
create mode 100644 node_modules/zod/v4/locales/tr.d.ts
create mode 100644 node_modules/zod/v4/locales/tr.js
create mode 100644 node_modules/zod/v4/locales/ua.cjs
create mode 100644 node_modules/zod/v4/locales/ua.d.cts
create mode 100644 node_modules/zod/v4/locales/ua.d.ts
create mode 100644 node_modules/zod/v4/locales/ua.js
create mode 100644 node_modules/zod/v4/locales/ur.cjs
create mode 100644 node_modules/zod/v4/locales/ur.d.cts
create mode 100644 node_modules/zod/v4/locales/ur.d.ts
create mode 100644 node_modules/zod/v4/locales/ur.js
create mode 100644 node_modules/zod/v4/locales/vi.cjs
create mode 100644 node_modules/zod/v4/locales/vi.d.cts
create mode 100644 node_modules/zod/v4/locales/vi.d.ts
create mode 100644 node_modules/zod/v4/locales/vi.js
create mode 100644 node_modules/zod/v4/locales/yo.cjs
create mode 100644 node_modules/zod/v4/locales/yo.d.cts
create mode 100644 node_modules/zod/v4/locales/yo.d.ts
create mode 100644 node_modules/zod/v4/locales/yo.js
create mode 100644 node_modules/zod/v4/locales/zh-CN.cjs
create mode 100644 node_modules/zod/v4/locales/zh-CN.d.cts
create mode 100644 node_modules/zod/v4/locales/zh-CN.d.ts
create mode 100644 node_modules/zod/v4/locales/zh-CN.js
create mode 100644 node_modules/zod/v4/locales/zh-TW.cjs
create mode 100644 node_modules/zod/v4/locales/zh-TW.d.cts
create mode 100644 node_modules/zod/v4/locales/zh-TW.d.ts
create mode 100644 node_modules/zod/v4/locales/zh-TW.js
create mode 100644 node_modules/zod/v4/mini/checks.cjs
create mode 100644 node_modules/zod/v4/mini/checks.d.cts
create mode 100644 node_modules/zod/v4/mini/checks.d.ts
create mode 100644 node_modules/zod/v4/mini/checks.js
create mode 100644 node_modules/zod/v4/mini/coerce.cjs
create mode 100644 node_modules/zod/v4/mini/coerce.d.cts
create mode 100644 node_modules/zod/v4/mini/coerce.d.ts
create mode 100644 node_modules/zod/v4/mini/coerce.js
create mode 100644 node_modules/zod/v4/mini/external.cjs
create mode 100644 node_modules/zod/v4/mini/external.d.cts
create mode 100644 node_modules/zod/v4/mini/external.d.ts
create mode 100644 node_modules/zod/v4/mini/external.js
create mode 100644 node_modules/zod/v4/mini/index.cjs
create mode 100644 node_modules/zod/v4/mini/index.d.cts
create mode 100644 node_modules/zod/v4/mini/index.d.ts
create mode 100644 node_modules/zod/v4/mini/index.js
create mode 100644 node_modules/zod/v4/mini/iso.cjs
create mode 100644 node_modules/zod/v4/mini/iso.d.cts
create mode 100644 node_modules/zod/v4/mini/iso.d.ts
create mode 100644 node_modules/zod/v4/mini/iso.js
create mode 100644 node_modules/zod/v4/mini/parse.cjs
create mode 100644 node_modules/zod/v4/mini/parse.d.cts
create mode 100644 node_modules/zod/v4/mini/parse.d.ts
create mode 100644 node_modules/zod/v4/mini/parse.js
create mode 100644 node_modules/zod/v4/mini/schemas.cjs
create mode 100644 node_modules/zod/v4/mini/schemas.d.cts
create mode 100644 node_modules/zod/v4/mini/schemas.d.ts
create mode 100644 node_modules/zod/v4/mini/schemas.js
create mode 100644 package-lock.json
create mode 100644 package.json
diff --git a/frontend/src/lib/components/QueueSlider.svelte b/frontend/src/lib/components/QueueSlider.svelte
new file mode 100644
index 0000000..ca36495
--- /dev/null
+++ b/frontend/src/lib/components/QueueSlider.svelte
@@ -0,0 +1,29 @@
+
+
+
+
+ {#each displaySongs as song, i}
+ {#if song.name != ""}
+
+
+ {#if i === 1}
+
{song.name}
+ {/if}
+
+ {/if}
+ {/each}
+
+
diff --git a/frontend/src/lib/components/SuggestionInput.svelte b/frontend/src/lib/components/SuggestionInput.svelte
new file mode 100644
index 0000000..c93c8b7
--- /dev/null
+++ b/frontend/src/lib/components/SuggestionInput.svelte
@@ -0,0 +1,7 @@
+
+
+
+
+ Send
+
diff --git a/frontend/src/lib/components/SuggestionList.svelte b/frontend/src/lib/components/SuggestionList.svelte
new file mode 100644
index 0000000..0fbba99
--- /dev/null
+++ b/frontend/src/lib/components/SuggestionList.svelte
@@ -0,0 +1,2 @@
+
diff --git a/frontend/src/lib/index.ts b/frontend/src/lib/index.ts
deleted file mode 100644
index 856f2b6..0000000
--- a/frontend/src/lib/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-// place files you want to import through the `$lib` alias in this folder.
diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts
new file mode 100644
index 0000000..328e641
--- /dev/null
+++ b/frontend/src/lib/types.ts
@@ -0,0 +1,8 @@
+import * as z from "zod"
+
+export const SongSchema = z.object({
+ name: z.string(),
+ image: z.string(),
+})
+
+export type Song = z.infer
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte
index ada8c4f..79a3f7e 100644
--- a/frontend/src/routes/+layout.svelte
+++ b/frontend/src/routes/+layout.svelte
@@ -4,6 +4,4 @@
let { children } = $props()
-
- {@render children()}
-
+{@render children()}
diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte
index 323ffa3..3ca5a15 100644
--- a/frontend/src/routes/+page.svelte
+++ b/frontend/src/routes/+page.svelte
@@ -1,12 +1,36 @@
-Welcome to SvelteKit
-{text}
+
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
new file mode 100644
index 0000000..411ffd3
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,16 @@
+{
+ "name": "team-1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/zod": {
+ "version": "4.0.14",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.0.14.tgz",
+ "integrity": "sha512-nGFJTnJN6cM2v9kXL+SOBq3AtjQby3Mv5ySGFof5UGRHrRioSJ5iG680cYNjE/yWk671nROcpPj4hAS8nyLhSw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/node_modules/zod/LICENSE b/node_modules/zod/LICENSE
new file mode 100644
index 0000000..c065796
--- /dev/null
+++ b/node_modules/zod/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 Colin McDonnell
+
+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/zod/README.md b/node_modules/zod/README.md
new file mode 100644
index 0000000..010708c
--- /dev/null
+++ b/node_modules/zod/README.md
@@ -0,0 +1,208 @@
+
+
+
Zod
+
+ TypeScript-first schema validation with static type inference
+
+ by @colinhacks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Featured sponsor: Jazz
+
+
+
+
+
+
+
+### [Read the docs →](https://zod.dev/api)
+
+
+
+
+## What is Zod?
+
+Zod is a TypeScript-first validation library. Define a schema and parse some data with it. You'll get back a strongly typed, validated result.
+
+```ts
+import * as z from "zod";
+
+const User = z.object({
+ name: z.string(),
+});
+
+// some untrusted data...
+const input = {
+ /* stuff */
+};
+
+// the parsed result is validated and type safe!
+const data = User.parse(input);
+
+// so you can use it with confidence :)
+console.log(data.name);
+```
+
+
+
+## Features
+
+- Zero external dependencies
+- Works in Node.js and all modern browsers
+- Tiny: `2kb` core bundle (gzipped)
+- Immutable API: methods return a new instance
+- Concise interface
+- Works with TypeScript and plain JS
+- Built-in JSON Schema conversion
+- Extensive ecosystem
+
+
+
+## Installation
+
+```sh
+npm install zod
+```
+
+
+
+## Basic usage
+
+Before you can do anything else, you need to define a schema. For the purposes of this guide, we'll use a simple object schema.
+
+```ts
+import * as z from "zod";
+
+const Player = z.object({
+ username: z.string(),
+ xp: z.number(),
+});
+```
+
+### Parsing data
+
+Given any Zod schema, use `.parse` to validate an input. If it's valid, Zod returns a strongly-typed _deep clone_ of the input.
+
+```ts
+Player.parse({ username: "billie", xp: 100 });
+// => returns { username: "billie", xp: 100 }
+```
+
+**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](#refine) or [transforms](#transform), you'll need to use the `.parseAsync()` method instead.
+
+```ts
+const schema = z.string().refine(async (val) => val.length <= 8);
+
+await schema.parseAsync("hello");
+// => "hello"
+```
+
+### Handling errors
+
+When validation fails, the `.parse()` method will throw a `ZodError` instance with granular information about the validation issues.
+
+```ts
+try {
+ Player.parse({ username: 42, xp: "100" });
+} catch (err) {
+ if (err instanceof z.ZodError) {
+ err.issues;
+ /* [
+ {
+ expected: 'string',
+ code: 'invalid_type',
+ path: [ 'username' ],
+ message: 'Invalid input: expected string'
+ },
+ {
+ expected: 'number',
+ code: 'invalid_type',
+ path: [ 'xp' ],
+ message: 'Invalid input: expected number'
+ }
+ ] */
+ }
+}
+```
+
+To avoid a `try/catch` block, you can use the `.safeParse()` method to get back a plain result object containing either the successfully parsed data or a `ZodError`. The result type is a [discriminated union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions), so you can handle both cases conveniently.
+
+```ts
+const result = Player.safeParse({ username: 42, xp: "100" });
+if (!result.success) {
+ result.error; // ZodError instance
+} else {
+ result.data; // { username: string; xp: number }
+}
+```
+
+**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](#refine) or [transforms](#transform), you'll need to use the `.safeParseAsync()` method instead.
+
+```ts
+const schema = z.string().refine(async (val) => val.length <= 8);
+
+await schema.safeParseAsync("hello");
+// => { success: true; data: "hello" }
+```
+
+### Inferring types
+
+Zod infers a static type from your schema definitions. You can extract this type with the `z.infer<>` utility and use it however you like.
+
+```ts
+const Player = z.object({
+ username: z.string(),
+ xp: z.number(),
+});
+
+// extract the inferred type
+type Player = z.infer;
+
+// use it in your code
+const player: Player = { username: "billie", xp: 100 };
+```
+
+In some cases, the input & output types of a schema can diverge. For instance, the `.transform()` API can convert the input from one type to another. In these cases, you can extract the input and output types independently:
+
+```ts
+const mySchema = z.string().transform((val) => val.length);
+
+type MySchemaIn = z.input;
+// => string
+
+type MySchemaOut = z.output; // equivalent to z.infer
+// number
+```
diff --git a/node_modules/zod/index.cjs b/node_modules/zod/index.cjs
new file mode 100644
index 0000000..3e30380
--- /dev/null
+++ b/node_modules/zod/index.cjs
@@ -0,0 +1,33 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.z = void 0;
+const z = __importStar(require("./v4/classic/external.cjs"));
+exports.z = z;
+__exportStar(require("./v4/classic/external.cjs"), exports);
+exports.default = z;
diff --git a/node_modules/zod/index.d.cts b/node_modules/zod/index.d.cts
new file mode 100644
index 0000000..ed2f3c3
--- /dev/null
+++ b/node_modules/zod/index.d.cts
@@ -0,0 +1,4 @@
+import * as z from "./v4/classic/external.cjs";
+export * from "./v4/classic/external.cjs";
+export { z };
+export default z;
diff --git a/node_modules/zod/index.d.ts b/node_modules/zod/index.d.ts
new file mode 100644
index 0000000..b0bbaef
--- /dev/null
+++ b/node_modules/zod/index.d.ts
@@ -0,0 +1,4 @@
+import * as z from "./v4/classic/external.js";
+export * from "./v4/classic/external.js";
+export { z };
+export default z;
diff --git a/node_modules/zod/index.js b/node_modules/zod/index.js
new file mode 100644
index 0000000..b0bbaef
--- /dev/null
+++ b/node_modules/zod/index.js
@@ -0,0 +1,4 @@
+import * as z from "./v4/classic/external.js";
+export * from "./v4/classic/external.js";
+export { z };
+export default z;
diff --git a/node_modules/zod/locales/index.cjs b/node_modules/zod/locales/index.cjs
new file mode 100644
index 0000000..65f2079
--- /dev/null
+++ b/node_modules/zod/locales/index.cjs
@@ -0,0 +1,17 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("../v4/locales/index.cjs"), exports);
diff --git a/node_modules/zod/locales/index.d.cts b/node_modules/zod/locales/index.d.cts
new file mode 100644
index 0000000..cd70ce6
--- /dev/null
+++ b/node_modules/zod/locales/index.d.cts
@@ -0,0 +1 @@
+export * from "../v4/locales/index.cjs";
diff --git a/node_modules/zod/locales/index.d.ts b/node_modules/zod/locales/index.d.ts
new file mode 100644
index 0000000..e6e7dd6
--- /dev/null
+++ b/node_modules/zod/locales/index.d.ts
@@ -0,0 +1 @@
+export * from "../v4/locales/index.js";
diff --git a/node_modules/zod/locales/index.js b/node_modules/zod/locales/index.js
new file mode 100644
index 0000000..e6e7dd6
--- /dev/null
+++ b/node_modules/zod/locales/index.js
@@ -0,0 +1 @@
+export * from "../v4/locales/index.js";
diff --git a/node_modules/zod/mini/index.cjs b/node_modules/zod/mini/index.cjs
new file mode 100644
index 0000000..fcc365e
--- /dev/null
+++ b/node_modules/zod/mini/index.cjs
@@ -0,0 +1,17 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("../v4/mini/index.cjs"), exports);
diff --git a/node_modules/zod/mini/index.d.cts b/node_modules/zod/mini/index.d.cts
new file mode 100644
index 0000000..511ff3a
--- /dev/null
+++ b/node_modules/zod/mini/index.d.cts
@@ -0,0 +1 @@
+export * from "../v4/mini/index.cjs";
diff --git a/node_modules/zod/mini/index.d.ts b/node_modules/zod/mini/index.d.ts
new file mode 100644
index 0000000..87b293a
--- /dev/null
+++ b/node_modules/zod/mini/index.d.ts
@@ -0,0 +1 @@
+export * from "../v4/mini/index.js";
diff --git a/node_modules/zod/mini/index.js b/node_modules/zod/mini/index.js
new file mode 100644
index 0000000..87b293a
--- /dev/null
+++ b/node_modules/zod/mini/index.js
@@ -0,0 +1 @@
+export * from "../v4/mini/index.js";
diff --git a/node_modules/zod/package.json b/node_modules/zod/package.json
new file mode 100644
index 0000000..9315f97
--- /dev/null
+++ b/node_modules/zod/package.json
@@ -0,0 +1,134 @@
+{
+ "name": "zod",
+ "version": "4.0.14",
+ "type": "module",
+ "license": "MIT",
+ "author": "Colin McDonnell ",
+ "description": "TypeScript-first schema declaration and validation library with static type inference",
+ "homepage": "https://zod.dev",
+ "llms": "https://zod.dev/llms.txt",
+ "llmsFull": "https://zod.dev/llms-full.txt",
+ "mcpServer": "https://mcp.inkeep.com/zod/mcp",
+ "funding": "https://github.com/sponsors/colinhacks",
+ "sideEffects": false,
+ "files": [
+ "src",
+ "**/*.js",
+ "**/*.mjs",
+ "**/*.cjs",
+ "**/*.d.ts",
+ "**/*.d.mts",
+ "**/*.d.cts"
+ ],
+ "keywords": [
+ "typescript",
+ "schema",
+ "validation",
+ "type",
+ "inference"
+ ],
+ "main": "./index.cjs",
+ "types": "./index.d.cts",
+ "module": "./index.js",
+ "zshy": {
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts",
+ "./mini": "./src/mini/index.ts",
+ "./locales": "./src/locales/index.ts",
+ "./v3": "./src/v3/index.ts",
+ "./v4": "./src/v4/index.ts",
+ "./v4-mini": "./src/v4-mini/index.ts",
+ "./v4/mini": "./src/v4/mini/index.ts",
+ "./v4/core": "./src/v4/core/index.ts",
+ "./v4/locales": "./src/v4/locales/index.ts",
+ "./v4/locales/*": "./src/v4/locales/*"
+ },
+ "conditions": {
+ "@zod/source": "src"
+ }
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "@zod/source": "./src/index.ts",
+ "types": "./index.d.cts",
+ "import": "./index.js",
+ "require": "./index.cjs"
+ },
+ "./mini": {
+ "@zod/source": "./src/mini/index.ts",
+ "types": "./mini/index.d.cts",
+ "import": "./mini/index.js",
+ "require": "./mini/index.cjs"
+ },
+ "./locales": {
+ "@zod/source": "./src/locales/index.ts",
+ "types": "./locales/index.d.cts",
+ "import": "./locales/index.js",
+ "require": "./locales/index.cjs"
+ },
+ "./v3": {
+ "@zod/source": "./src/v3/index.ts",
+ "types": "./v3/index.d.cts",
+ "import": "./v3/index.js",
+ "require": "./v3/index.cjs"
+ },
+ "./v4": {
+ "@zod/source": "./src/v4/index.ts",
+ "types": "./v4/index.d.cts",
+ "import": "./v4/index.js",
+ "require": "./v4/index.cjs"
+ },
+ "./v4-mini": {
+ "@zod/source": "./src/v4-mini/index.ts",
+ "types": "./v4-mini/index.d.cts",
+ "import": "./v4-mini/index.js",
+ "require": "./v4-mini/index.cjs"
+ },
+ "./v4/mini": {
+ "@zod/source": "./src/v4/mini/index.ts",
+ "types": "./v4/mini/index.d.cts",
+ "import": "./v4/mini/index.js",
+ "require": "./v4/mini/index.cjs"
+ },
+ "./v4/core": {
+ "@zod/source": "./src/v4/core/index.ts",
+ "types": "./v4/core/index.d.cts",
+ "import": "./v4/core/index.js",
+ "require": "./v4/core/index.cjs"
+ },
+ "./v4/locales": {
+ "@zod/source": "./src/v4/locales/index.ts",
+ "types": "./v4/locales/index.d.cts",
+ "import": "./v4/locales/index.js",
+ "require": "./v4/locales/index.cjs"
+ },
+ "./v4/locales/*": {
+ "@zod/source": "./src/v4/locales/*",
+ "types": "./v4/locales/*",
+ "import": "./v4/locales/*",
+ "require": "./v4/locales/*"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/colinhacks/zod.git"
+ },
+ "bugs": {
+ "url": "https://github.com/colinhacks/zod/issues"
+ },
+ "support": {
+ "backing": {
+ "npm-funding": true
+ }
+ },
+ "scripts": {
+ "clean": "git clean -xdf . -e node_modules",
+ "build": "zshy --project tsconfig.build.json",
+ "postbuild": "pnpm biome check --write .",
+ "test:watch": "pnpm vitest",
+ "test": "pnpm vitest run",
+ "prepublishOnly": "tsx ../../scripts/check-versions.ts"
+ }
+}
diff --git a/node_modules/zod/src/index.ts b/node_modules/zod/src/index.ts
new file mode 100644
index 0000000..b0bbaef
--- /dev/null
+++ b/node_modules/zod/src/index.ts
@@ -0,0 +1,4 @@
+import * as z from "./v4/classic/external.js";
+export * from "./v4/classic/external.js";
+export { z };
+export default z;
diff --git a/node_modules/zod/src/locales/index.ts b/node_modules/zod/src/locales/index.ts
new file mode 100644
index 0000000..e6e7dd6
--- /dev/null
+++ b/node_modules/zod/src/locales/index.ts
@@ -0,0 +1 @@
+export * from "../v4/locales/index.js";
diff --git a/node_modules/zod/src/mini/index.ts b/node_modules/zod/src/mini/index.ts
new file mode 100644
index 0000000..87b293a
--- /dev/null
+++ b/node_modules/zod/src/mini/index.ts
@@ -0,0 +1 @@
+export * from "../v4/mini/index.js";
diff --git a/node_modules/zod/src/v3/ZodError.ts b/node_modules/zod/src/v3/ZodError.ts
new file mode 100644
index 0000000..6ee33c1
--- /dev/null
+++ b/node_modules/zod/src/v3/ZodError.ts
@@ -0,0 +1,330 @@
+import type { Primitive } from "./helpers/typeAliases.js";
+import { util, type ZodParsedType } from "./helpers/util.js";
+import type { TypeOf, ZodType } from "./index.js";
+
+type allKeys = T extends any ? keyof T : never;
+
+export type inferFlattenedErrors, U = string> = typeToFlattenedError, U>;
+export type typeToFlattenedError = {
+ formErrors: U[];
+ fieldErrors: {
+ [P in allKeys]?: U[];
+ };
+};
+
+export const ZodIssueCode = util.arrayToEnum([
+ "invalid_type",
+ "invalid_literal",
+ "custom",
+ "invalid_union",
+ "invalid_union_discriminator",
+ "invalid_enum_value",
+ "unrecognized_keys",
+ "invalid_arguments",
+ "invalid_return_type",
+ "invalid_date",
+ "invalid_string",
+ "too_small",
+ "too_big",
+ "invalid_intersection_types",
+ "not_multiple_of",
+ "not_finite",
+]);
+
+export type ZodIssueCode = keyof typeof ZodIssueCode;
+
+export type ZodIssueBase = {
+ path: (string | number)[];
+ message?: string | undefined;
+};
+
+export interface ZodInvalidTypeIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_type;
+ expected: ZodParsedType;
+ received: ZodParsedType;
+}
+
+export interface ZodInvalidLiteralIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_literal;
+ expected: unknown;
+ received: unknown;
+}
+
+export interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.unrecognized_keys;
+ keys: string[];
+}
+
+export interface ZodInvalidUnionIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_union;
+ unionErrors: ZodError[];
+}
+
+export interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_union_discriminator;
+ options: Primitive[];
+}
+
+export interface ZodInvalidEnumValueIssue extends ZodIssueBase {
+ received: string | number;
+ code: typeof ZodIssueCode.invalid_enum_value;
+ options: (string | number)[];
+}
+
+export interface ZodInvalidArgumentsIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_arguments;
+ argumentsError: ZodError;
+}
+
+export interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_return_type;
+ returnTypeError: ZodError;
+}
+
+export interface ZodInvalidDateIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_date;
+}
+
+export type StringValidation =
+ | "email"
+ | "url"
+ | "emoji"
+ | "uuid"
+ | "nanoid"
+ | "regex"
+ | "cuid"
+ | "cuid2"
+ | "ulid"
+ | "datetime"
+ | "date"
+ | "time"
+ | "duration"
+ | "ip"
+ | "cidr"
+ | "base64"
+ | "jwt"
+ | "base64url"
+ | { includes: string; position?: number | undefined }
+ | { startsWith: string }
+ | { endsWith: string };
+
+export interface ZodInvalidStringIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_string;
+ validation: StringValidation;
+}
+
+export interface ZodTooSmallIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.too_small;
+ minimum: number | bigint;
+ inclusive: boolean;
+ exact?: boolean;
+ type: "array" | "string" | "number" | "set" | "date" | "bigint";
+}
+
+export interface ZodTooBigIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.too_big;
+ maximum: number | bigint;
+ inclusive: boolean;
+ exact?: boolean;
+ type: "array" | "string" | "number" | "set" | "date" | "bigint";
+}
+
+export interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.invalid_intersection_types;
+}
+
+export interface ZodNotMultipleOfIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.not_multiple_of;
+ multipleOf: number | bigint;
+}
+
+export interface ZodNotFiniteIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.not_finite;
+}
+
+export interface ZodCustomIssue extends ZodIssueBase {
+ code: typeof ZodIssueCode.custom;
+ params?: { [k: string]: any };
+}
+
+export type DenormalizedError = { [k: string]: DenormalizedError | string[] };
+
+export type ZodIssueOptionalMessage =
+ | ZodInvalidTypeIssue
+ | ZodInvalidLiteralIssue
+ | ZodUnrecognizedKeysIssue
+ | ZodInvalidUnionIssue
+ | ZodInvalidUnionDiscriminatorIssue
+ | ZodInvalidEnumValueIssue
+ | ZodInvalidArgumentsIssue
+ | ZodInvalidReturnTypeIssue
+ | ZodInvalidDateIssue
+ | ZodInvalidStringIssue
+ | ZodTooSmallIssue
+ | ZodTooBigIssue
+ | ZodInvalidIntersectionTypesIssue
+ | ZodNotMultipleOfIssue
+ | ZodNotFiniteIssue
+ | ZodCustomIssue;
+
+export type ZodIssue = ZodIssueOptionalMessage & {
+ fatal?: boolean | undefined;
+ message: string;
+};
+
+export const quotelessJson = (obj: any) => {
+ const json = JSON.stringify(obj, null, 2);
+ return json.replace(/"([^"]+)":/g, "$1:");
+};
+
+type recursiveZodFormattedError = T extends [any, ...any[]]
+ ? { [K in keyof T]?: ZodFormattedError }
+ : T extends any[]
+ ? { [k: number]: ZodFormattedError }
+ : T extends object
+ ? { [K in keyof T]?: ZodFormattedError }
+ : unknown;
+
+export type ZodFormattedError = {
+ _errors: U[];
+} & recursiveZodFormattedError>;
+
+export type inferFormattedError, U = string> = ZodFormattedError, U>;
+
+export class ZodError extends Error {
+ issues: ZodIssue[] = [];
+
+ get errors() {
+ return this.issues;
+ }
+
+ constructor(issues: ZodIssue[]) {
+ super();
+
+ const actualProto = new.target.prototype;
+ if (Object.setPrototypeOf) {
+ // eslint-disable-next-line ban/ban
+ Object.setPrototypeOf(this, actualProto);
+ } else {
+ (this as any).__proto__ = actualProto;
+ }
+ this.name = "ZodError";
+ this.issues = issues;
+ }
+
+ format(): ZodFormattedError;
+ format(mapper: (issue: ZodIssue) => U): ZodFormattedError;
+ format(_mapper?: any) {
+ const mapper: (issue: ZodIssue) => any =
+ _mapper ||
+ function (issue: ZodIssue) {
+ return issue.message;
+ };
+ const fieldErrors: ZodFormattedError = { _errors: [] } as any;
+ const processError = (error: ZodError) => {
+ for (const issue of error.issues) {
+ if (issue.code === "invalid_union") {
+ issue.unionErrors.map(processError);
+ } else if (issue.code === "invalid_return_type") {
+ processError(issue.returnTypeError);
+ } else if (issue.code === "invalid_arguments") {
+ processError(issue.argumentsError);
+ } else if (issue.path.length === 0) {
+ (fieldErrors as any)._errors.push(mapper(issue));
+ } else {
+ let curr: any = fieldErrors;
+ let i = 0;
+ while (i < issue.path.length) {
+ const el = issue.path[i]!;
+ const terminal = i === issue.path.length - 1;
+
+ if (!terminal) {
+ curr[el] = curr[el] || { _errors: [] };
+ // if (typeof el === "string") {
+ // curr[el] = curr[el] || { _errors: [] };
+ // } else if (typeof el === "number") {
+ // const errorArray: any = [];
+ // errorArray._errors = [];
+ // curr[el] = curr[el] || errorArray;
+ // }
+ } else {
+ curr[el] = curr[el] || { _errors: [] };
+ curr[el]._errors.push(mapper(issue));
+ }
+
+ curr = curr[el];
+ i++;
+ }
+ }
+ }
+ };
+
+ processError(this);
+ return fieldErrors;
+ }
+
+ static create = (issues: ZodIssue[]) => {
+ const error = new ZodError(issues);
+ return error;
+ };
+
+ static assert(value: unknown): asserts value is ZodError {
+ if (!(value instanceof ZodError)) {
+ throw new Error(`Not a ZodError: ${value}`);
+ }
+ }
+
+ override toString() {
+ return this.message;
+ }
+ override get message() {
+ return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
+ }
+
+ get isEmpty(): boolean {
+ return this.issues.length === 0;
+ }
+
+ addIssue = (sub: ZodIssue) => {
+ this.issues = [...this.issues, sub];
+ };
+
+ addIssues = (subs: ZodIssue[] = []) => {
+ this.issues = [...this.issues, ...subs];
+ };
+
+ flatten(): typeToFlattenedError;
+ flatten(mapper?: (issue: ZodIssue) => U): typeToFlattenedError;
+ flatten(mapper: (issue: ZodIssue) => U = (issue: ZodIssue) => issue.message as any): any {
+ const fieldErrors: any = {};
+ const formErrors: U[] = [];
+ for (const sub of this.issues) {
+ if (sub.path.length > 0) {
+ const firstEl = sub.path[0]!;
+ fieldErrors[firstEl] = fieldErrors[firstEl] || [];
+ fieldErrors[firstEl].push(mapper(sub));
+ } else {
+ formErrors.push(mapper(sub));
+ }
+ }
+ return { formErrors, fieldErrors };
+ }
+
+ get formErrors() {
+ return this.flatten();
+ }
+}
+
+type stripPath = T extends any ? util.OmitKeys : never;
+
+export type IssueData = stripPath & {
+ path?: (string | number)[];
+ fatal?: boolean | undefined;
+};
+
+export type ErrorMapCtx = {
+ defaultError: string;
+ data: any;
+};
+
+export type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => { message: string };
diff --git a/node_modules/zod/src/v3/benchmarks/datetime.ts b/node_modules/zod/src/v3/benchmarks/datetime.ts
new file mode 100644
index 0000000..85552c2
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/datetime.ts
@@ -0,0 +1,58 @@
+import Benchmark from "benchmark";
+
+const datetimeValidationSuite = new Benchmark.Suite("datetime");
+
+const DATA = "2021-01-01";
+const MONTHS_31 = new Set([1, 3, 5, 7, 8, 10, 12]);
+const MONTHS_30 = new Set([4, 6, 9, 11]);
+
+const simpleDatetimeRegex = /^(\d{4})-(\d{2})-(\d{2})$/;
+const datetimeRegexNoLeapYearValidation =
+ /^\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\d|2\d))$/;
+const datetimeRegexWithLeapYearValidation =
+ /^((\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(0[469]|11)-(0[1-9]|[12]\d|30)|(02)-(0[1-9]|1\d|2[0-8])))$/;
+
+datetimeValidationSuite
+ .add("new Date()", () => {
+ return !Number.isNaN(new Date(DATA).getTime());
+ })
+ .add("regex (no validation)", () => {
+ return simpleDatetimeRegex.test(DATA);
+ })
+ .add("regex (no leap year)", () => {
+ return datetimeRegexNoLeapYearValidation.test(DATA);
+ })
+ .add("regex (w/ leap year)", () => {
+ return datetimeRegexWithLeapYearValidation.test(DATA);
+ })
+ .add("capture groups + code", () => {
+ const match = DATA.match(simpleDatetimeRegex);
+ if (!match) return false;
+
+ // Extract year, month, and day from the capture groups
+ const year = Number.parseInt(match[1], 10);
+ const month = Number.parseInt(match[2], 10); // month is 0-indexed in JavaScript Date, so subtract 1
+ const day = Number.parseInt(match[3], 10);
+
+ if (month === 2) {
+ if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
+ return day <= 29;
+ }
+ return day <= 28;
+ }
+ if (MONTHS_30.has(month)) {
+ return day <= 30;
+ }
+ if (MONTHS_31.has(month)) {
+ return day <= 31;
+ }
+ return false;
+ })
+
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${datetimeValidationSuite.name!}: ${e.target}`);
+ });
+
+export default {
+ suites: [datetimeValidationSuite],
+};
diff --git a/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts b/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts
new file mode 100644
index 0000000..47737e6
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts
@@ -0,0 +1,80 @@
+import Benchmark from "benchmark";
+
+import { z } from "zod/v3";
+
+const doubleSuite = new Benchmark.Suite("z.discriminatedUnion: double");
+const manySuite = new Benchmark.Suite("z.discriminatedUnion: many");
+
+const aSchema = z.object({
+ type: z.literal("a"),
+});
+const objA = {
+ type: "a",
+};
+
+const bSchema = z.object({
+ type: z.literal("b"),
+});
+const objB = {
+ type: "b",
+};
+
+const cSchema = z.object({
+ type: z.literal("c"),
+});
+const objC = {
+ type: "c",
+};
+
+const dSchema = z.object({
+ type: z.literal("d"),
+});
+
+const double = z.discriminatedUnion("type", [aSchema, bSchema]);
+const many = z.discriminatedUnion("type", [aSchema, bSchema, cSchema, dSchema]);
+
+doubleSuite
+ .add("valid: a", () => {
+ double.parse(objA);
+ })
+ .add("valid: b", () => {
+ double.parse(objB);
+ })
+ .add("invalid: null", () => {
+ try {
+ double.parse(null);
+ } catch (_err) {}
+ })
+ .add("invalid: wrong shape", () => {
+ try {
+ double.parse(objC);
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(doubleSuite as any).name}: ${e.target}`);
+ });
+
+manySuite
+ .add("valid: a", () => {
+ many.parse(objA);
+ })
+ .add("valid: c", () => {
+ many.parse(objC);
+ })
+ .add("invalid: null", () => {
+ try {
+ many.parse(null);
+ } catch (_err) {}
+ })
+ .add("invalid: wrong shape", () => {
+ try {
+ many.parse({ type: "unknown" });
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(manySuite as any).name}: ${e.target}`);
+ });
+
+export default {
+ suites: [doubleSuite, manySuite],
+};
diff --git a/node_modules/zod/src/v3/benchmarks/index.ts b/node_modules/zod/src/v3/benchmarks/index.ts
new file mode 100644
index 0000000..ca81c5b
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/index.ts
@@ -0,0 +1,59 @@
+import type Benchmark from "benchmark";
+
+import datetimeBenchmarks from "./datetime.js";
+import discriminatedUnionBenchmarks from "./discriminatedUnion.js";
+import ipv4Benchmarks from "./ipv4.js";
+import objectBenchmarks from "./object.js";
+import primitiveBenchmarks from "./primitives.js";
+import realworld from "./realworld.js";
+import stringBenchmarks from "./string.js";
+import unionBenchmarks from "./union.js";
+
+const argv = process.argv.slice(2);
+let suites: Benchmark.Suite[] = [];
+
+if (!argv.length) {
+ suites = [
+ ...realworld.suites,
+ ...primitiveBenchmarks.suites,
+ ...stringBenchmarks.suites,
+ ...objectBenchmarks.suites,
+ ...unionBenchmarks.suites,
+ ...discriminatedUnionBenchmarks.suites,
+ ];
+} else {
+ if (argv.includes("--realworld")) {
+ suites.push(...realworld.suites);
+ }
+ if (argv.includes("--primitives")) {
+ suites.push(...primitiveBenchmarks.suites);
+ }
+ if (argv.includes("--string")) {
+ suites.push(...stringBenchmarks.suites);
+ }
+ if (argv.includes("--object")) {
+ suites.push(...objectBenchmarks.suites);
+ }
+ if (argv.includes("--union")) {
+ suites.push(...unionBenchmarks.suites);
+ }
+ if (argv.includes("--discriminatedUnion")) {
+ suites.push(...datetimeBenchmarks.suites);
+ }
+ if (argv.includes("--datetime")) {
+ suites.push(...datetimeBenchmarks.suites);
+ }
+ if (argv.includes("--ipv4")) {
+ suites.push(...ipv4Benchmarks.suites);
+ }
+}
+
+for (const suite of suites) {
+ suite.run({});
+}
+
+// exit on Ctrl-C
+process.on("SIGINT", function () {
+ console.log("Exiting...");
+ process.exit();
+});
diff --git a/node_modules/zod/src/v3/benchmarks/ipv4.ts b/node_modules/zod/src/v3/benchmarks/ipv4.ts
new file mode 100644
index 0000000..913ffd4
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/ipv4.ts
@@ -0,0 +1,57 @@
+import Benchmark from "benchmark";
+
+const suite = new Benchmark.Suite("ipv4");
+
+const DATA = "127.0.0.1";
+const ipv4RegexA =
+ /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
+const ipv4RegexB =
+ /^(?:(?:(?=(25[0-5]))\1|(?=(2[0-4][0-9]))\2|(?=(1[0-9]{2}))\3|(?=([0-9]{1,2}))\4)\.){3}(?:(?=(25[0-5]))\5|(?=(2[0-4][0-9]))\6|(?=(1[0-9]{2}))\7|(?=([0-9]{1,2}))\8)$/;
+const ipv4RegexC = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
+const ipv4RegexD = /^(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/;
+const ipv4RegexE = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.){3}(25[0-5]|(2[0-4]|1\d|[1-9]|)\d)$/;
+const ipv4RegexF = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
+const ipv4RegexG = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$/;
+const ipv4RegexH = /^((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\.(?!$)|$)){4}$/;
+const ipv4RegexI =
+ /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
+
+suite
+ .add("A", () => {
+ return ipv4RegexA.test(DATA);
+ })
+ .add("B", () => {
+ return ipv4RegexB.test(DATA);
+ })
+ .add("C", () => {
+ return ipv4RegexC.test(DATA);
+ })
+ .add("D", () => {
+ return ipv4RegexD.test(DATA);
+ })
+ .add("E", () => {
+ return ipv4RegexE.test(DATA);
+ })
+ .add("F", () => {
+ return ipv4RegexF.test(DATA);
+ })
+ .add("G", () => {
+ return ipv4RegexG.test(DATA);
+ })
+ .add("H", () => {
+ return ipv4RegexH.test(DATA);
+ })
+ .add("I", () => {
+ return ipv4RegexI.test(DATA);
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${suite.name!}: ${e.target}`);
+ });
+
+export default {
+ suites: [suite],
+};
+
+if (require.main === module) {
+ suite.run();
+}
diff --git a/node_modules/zod/src/v3/benchmarks/object.ts b/node_modules/zod/src/v3/benchmarks/object.ts
new file mode 100644
index 0000000..3c1da10
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/object.ts
@@ -0,0 +1,69 @@
+import Benchmark from "benchmark";
+
+import { z } from "zod/v3";
+
+const emptySuite = new Benchmark.Suite("z.object: empty");
+const shortSuite = new Benchmark.Suite("z.object: short");
+const longSuite = new Benchmark.Suite("z.object: long");
+
+const empty = z.object({});
+const short = z.object({
+ string: z.string(),
+});
+const long = z.object({
+ string: z.string(),
+ number: z.number(),
+ boolean: z.boolean(),
+});
+
+emptySuite
+ .add("valid", () => {
+ empty.parse({});
+ })
+ .add("valid: extra keys", () => {
+ empty.parse({ string: "string" });
+ })
+ .add("invalid: null", () => {
+ try {
+ empty.parse(null);
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(emptySuite as any).name}: ${e.target}`);
+ });
+
+shortSuite
+ .add("valid", () => {
+ short.parse({ string: "string" });
+ })
+ .add("valid: extra keys", () => {
+ short.parse({ string: "string", number: 42 });
+ })
+ .add("invalid: null", () => {
+ try {
+ short.parse(null);
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(shortSuite as any).name}: ${e.target}`);
+ });
+
+longSuite
+ .add("valid", () => {
+ long.parse({ string: "string", number: 42, boolean: true });
+ })
+ .add("valid: extra keys", () => {
+ long.parse({ string: "string", number: 42, boolean: true, list: [] });
+ })
+ .add("invalid: null", () => {
+ try {
+ long.parse(null);
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(longSuite as any).name}: ${e.target}`);
+ });
+
+export default {
+ suites: [emptySuite, shortSuite, longSuite],
+};
diff --git a/node_modules/zod/src/v3/benchmarks/primitives.ts b/node_modules/zod/src/v3/benchmarks/primitives.ts
new file mode 100644
index 0000000..fd61b38
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/primitives.ts
@@ -0,0 +1,162 @@
+import Benchmark from "benchmark";
+
+import { z } from "zod/v3";
+import { Mocker } from "../tests/Mocker.js";
+
+const val = new Mocker();
+
+const enumSuite = new Benchmark.Suite("z.enum");
+const enumSchema = z.enum(["a", "b", "c"]);
+
+enumSuite
+ .add("valid", () => {
+ enumSchema.parse("a");
+ })
+ .add("invalid", () => {
+ try {
+ enumSchema.parse("x");
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`z.enum: ${e.target}`);
+ });
+
+const longEnumSuite = new Benchmark.Suite("long z.enum");
+const longEnumSchema = z.enum([
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "ten",
+ "eleven",
+ "twelve",
+ "thirteen",
+ "fourteen",
+ "fifteen",
+ "sixteen",
+ "seventeen",
+]);
+
+longEnumSuite
+ .add("valid", () => {
+ longEnumSchema.parse("five");
+ })
+ .add("invalid", () => {
+ try {
+ longEnumSchema.parse("invalid");
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`long z.enum: ${e.target}`);
+ });
+
+const undefinedSuite = new Benchmark.Suite("z.undefined");
+const undefinedSchema = z.undefined();
+
+undefinedSuite
+ .add("valid", () => {
+ undefinedSchema.parse(undefined);
+ })
+ .add("invalid", () => {
+ try {
+ undefinedSchema.parse(1);
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`z.undefined: ${e.target}`);
+ });
+
+const literalSuite = new Benchmark.Suite("z.literal");
+const short = "short";
+const bad = "bad";
+const literalSchema = z.literal("short");
+
+literalSuite
+ .add("valid", () => {
+ literalSchema.parse(short);
+ })
+ .add("invalid", () => {
+ try {
+ literalSchema.parse(bad);
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`z.literal: ${e.target}`);
+ });
+
+const numberSuite = new Benchmark.Suite("z.number");
+const numberSchema = z.number().int();
+
+numberSuite
+ .add("valid", () => {
+ numberSchema.parse(1);
+ })
+ .add("invalid type", () => {
+ try {
+ numberSchema.parse("bad");
+ } catch (_e: any) {}
+ })
+ .add("invalid number", () => {
+ try {
+ numberSchema.parse(0.5);
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`z.number: ${e.target}`);
+ });
+
+const dateSuite = new Benchmark.Suite("z.date");
+
+const plainDate = z.date();
+const minMaxDate = z.date().min(new Date("2021-01-01")).max(new Date("2030-01-01"));
+
+dateSuite
+ .add("valid", () => {
+ plainDate.parse(new Date());
+ })
+ .add("invalid", () => {
+ try {
+ plainDate.parse(1);
+ } catch (_e: any) {}
+ })
+ .add("valid min and max", () => {
+ minMaxDate.parse(new Date("2023-01-01"));
+ })
+ .add("invalid min", () => {
+ try {
+ minMaxDate.parse(new Date("2019-01-01"));
+ } catch (_e: any) {}
+ })
+ .add("invalid max", () => {
+ try {
+ minMaxDate.parse(new Date("2031-01-01"));
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`z.date: ${e.target}`);
+ });
+
+const symbolSuite = new Benchmark.Suite("z.symbol");
+const symbolSchema = z.symbol();
+
+symbolSuite
+ .add("valid", () => {
+ symbolSchema.parse(val.symbol);
+ })
+ .add("invalid", () => {
+ try {
+ symbolSchema.parse(1);
+ } catch (_e: any) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`z.symbol: ${e.target}`);
+ });
+
+export default {
+ suites: [enumSuite, longEnumSuite, undefinedSuite, literalSuite, numberSuite, dateSuite, symbolSuite],
+};
diff --git a/node_modules/zod/src/v3/benchmarks/realworld.ts b/node_modules/zod/src/v3/benchmarks/realworld.ts
new file mode 100644
index 0000000..d64c4f0
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/realworld.ts
@@ -0,0 +1,63 @@
+import Benchmark from "benchmark";
+
+import { z } from "zod/v3";
+
+const shortSuite = new Benchmark.Suite("realworld");
+
+const People = z.array(
+ z.object({
+ type: z.literal("person"),
+ hair: z.enum(["blue", "brown"]),
+ active: z.boolean(),
+ name: z.string(),
+ age: z.number().int(),
+ hobbies: z.array(z.string()),
+ address: z.object({
+ street: z.string(),
+ zip: z.string(),
+ country: z.string(),
+ }),
+ })
+);
+
+let i = 0;
+
+function num() {
+ return ++i;
+}
+
+function str() {
+ return (++i % 100).toString(16);
+}
+
+function array(fn: () => T): T[] {
+ return Array.from({ length: ++i % 10 }, () => fn());
+}
+
+const people = Array.from({ length: 100 }, () => {
+ return {
+ type: "person",
+ hair: i % 2 ? "blue" : "brown",
+ active: !!(i % 2),
+ name: str(),
+ age: num(),
+ hobbies: array(str),
+ address: {
+ street: str(),
+ zip: str(),
+ country: str(),
+ },
+ };
+});
+
+shortSuite
+ .add("valid", () => {
+ People.parse(people);
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(shortSuite as any).name}: ${e.target}`);
+ });
+
+export default {
+ suites: [shortSuite],
+};
diff --git a/node_modules/zod/src/v3/benchmarks/string.ts b/node_modules/zod/src/v3/benchmarks/string.ts
new file mode 100644
index 0000000..6b3d29f
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/string.ts
@@ -0,0 +1,55 @@
+import Benchmark from "benchmark";
+
+import { z } from "zod/v3";
+
+const SUITE_NAME = "z.string";
+const suite = new Benchmark.Suite(SUITE_NAME);
+
+const empty = "";
+const short = "short";
+const long = "long".repeat(256);
+const manual = (str: unknown) => {
+ if (typeof str !== "string") {
+ throw new Error("Not a string");
+ }
+
+ return str;
+};
+const stringSchema = z.string();
+const optionalStringSchema = z.string().optional();
+const optionalNullableStringSchema = z.string().optional().nullable();
+
+suite
+ .add("empty string", () => {
+ stringSchema.parse(empty);
+ })
+ .add("short string", () => {
+ stringSchema.parse(short);
+ })
+ .add("long string", () => {
+ stringSchema.parse(long);
+ })
+ .add("optional string", () => {
+ optionalStringSchema.parse(long);
+ })
+ .add("nullable string", () => {
+ optionalNullableStringSchema.parse(long);
+ })
+ .add("nullable (null) string", () => {
+ optionalNullableStringSchema.parse(null);
+ })
+ .add("invalid: null", () => {
+ try {
+ stringSchema.parse(null);
+ } catch (_err) {}
+ })
+ .add("manual parser: long", () => {
+ manual(long);
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${SUITE_NAME}: ${e.target}`);
+ });
+
+export default {
+ suites: [suite],
+};
diff --git a/node_modules/zod/src/v3/benchmarks/union.ts b/node_modules/zod/src/v3/benchmarks/union.ts
new file mode 100644
index 0000000..d716dce
--- /dev/null
+++ b/node_modules/zod/src/v3/benchmarks/union.ts
@@ -0,0 +1,80 @@
+import Benchmark from "benchmark";
+
+import { z } from "zod/v3";
+
+const doubleSuite = new Benchmark.Suite("z.union: double");
+const manySuite = new Benchmark.Suite("z.union: many");
+
+const aSchema = z.object({
+ type: z.literal("a"),
+});
+const objA = {
+ type: "a",
+};
+
+const bSchema = z.object({
+ type: z.literal("b"),
+});
+const objB = {
+ type: "b",
+};
+
+const cSchema = z.object({
+ type: z.literal("c"),
+});
+const objC = {
+ type: "c",
+};
+
+const dSchema = z.object({
+ type: z.literal("d"),
+});
+
+const double = z.union([aSchema, bSchema]);
+const many = z.union([aSchema, bSchema, cSchema, dSchema]);
+
+doubleSuite
+ .add("valid: a", () => {
+ double.parse(objA);
+ })
+ .add("valid: b", () => {
+ double.parse(objB);
+ })
+ .add("invalid: null", () => {
+ try {
+ double.parse(null);
+ } catch (_err) {}
+ })
+ .add("invalid: wrong shape", () => {
+ try {
+ double.parse(objC);
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(doubleSuite as any).name}: ${e.target}`);
+ });
+
+manySuite
+ .add("valid: a", () => {
+ many.parse(objA);
+ })
+ .add("valid: c", () => {
+ many.parse(objC);
+ })
+ .add("invalid: null", () => {
+ try {
+ many.parse(null);
+ } catch (_err) {}
+ })
+ .add("invalid: wrong shape", () => {
+ try {
+ many.parse({ type: "unknown" });
+ } catch (_err) {}
+ })
+ .on("cycle", (e: Benchmark.Event) => {
+ console.log(`${(manySuite as any).name}: ${e.target}`);
+ });
+
+export default {
+ suites: [doubleSuite, manySuite],
+};
diff --git a/node_modules/zod/src/v3/errors.ts b/node_modules/zod/src/v3/errors.ts
new file mode 100644
index 0000000..3c0dae6
--- /dev/null
+++ b/node_modules/zod/src/v3/errors.ts
@@ -0,0 +1,13 @@
+import type { ZodErrorMap } from "./ZodError.js";
+import defaultErrorMap from "./locales/en.js";
+
+let overrideErrorMap = defaultErrorMap;
+export { defaultErrorMap };
+
+export function setErrorMap(map: ZodErrorMap) {
+ overrideErrorMap = map;
+}
+
+export function getErrorMap() {
+ return overrideErrorMap;
+}
diff --git a/node_modules/zod/src/v3/external.ts b/node_modules/zod/src/v3/external.ts
new file mode 100644
index 0000000..f0a4be4
--- /dev/null
+++ b/node_modules/zod/src/v3/external.ts
@@ -0,0 +1,6 @@
+export * from "./errors.js";
+export * from "./helpers/parseUtil.js";
+export * from "./helpers/typeAliases.js";
+export * from "./helpers/util.js";
+export * from "./types.js";
+export * from "./ZodError.js";
diff --git a/node_modules/zod/src/v3/helpers/enumUtil.ts b/node_modules/zod/src/v3/helpers/enumUtil.ts
new file mode 100644
index 0000000..526b227
--- /dev/null
+++ b/node_modules/zod/src/v3/helpers/enumUtil.ts
@@ -0,0 +1,17 @@
+export namespace enumUtil {
+ type UnionToIntersectionFn = (T extends unknown ? (k: () => T) => void : never) extends (
+ k: infer Intersection
+ ) => void
+ ? Intersection
+ : never;
+
+ type GetUnionLast = UnionToIntersectionFn extends () => infer Last ? Last : never;
+
+ type UnionToTuple = [T] extends [never]
+ ? Tuple
+ : UnionToTuple>, [GetUnionLast, ...Tuple]>;
+
+ type CastToStringTuple = T extends [string, ...string[]] ? T : never;
+
+ export type UnionToTupleString = CastToStringTuple>;
+}
diff --git a/node_modules/zod/src/v3/helpers/errorUtil.ts b/node_modules/zod/src/v3/helpers/errorUtil.ts
new file mode 100644
index 0000000..319ef6b
--- /dev/null
+++ b/node_modules/zod/src/v3/helpers/errorUtil.ts
@@ -0,0 +1,8 @@
+export namespace errorUtil {
+ export type ErrMessage = string | { message?: string | undefined };
+ export const errToObj = (message?: ErrMessage): { message?: string | undefined } =>
+ typeof message === "string" ? { message } : message || {};
+ // biome-ignore lint:
+ export const toString = (message?: ErrMessage): string | undefined =>
+ typeof message === "string" ? message : message?.message;
+}
diff --git a/node_modules/zod/src/v3/helpers/parseUtil.ts b/node_modules/zod/src/v3/helpers/parseUtil.ts
new file mode 100644
index 0000000..1076ad9
--- /dev/null
+++ b/node_modules/zod/src/v3/helpers/parseUtil.ts
@@ -0,0 +1,176 @@
+import type { IssueData, ZodErrorMap, ZodIssue } from "../ZodError.js";
+import { getErrorMap } from "../errors.js";
+import defaultErrorMap from "../locales/en.js";
+import type { ZodParsedType } from "./util.js";
+
+export const makeIssue = (params: {
+ data: any;
+ path: (string | number)[];
+ errorMaps: ZodErrorMap[];
+ issueData: IssueData;
+}): ZodIssue => {
+ const { data, path, errorMaps, issueData } = params;
+ const fullPath = [...path, ...(issueData.path || [])];
+ const fullIssue = {
+ ...issueData,
+ path: fullPath,
+ };
+
+ if (issueData.message !== undefined) {
+ return {
+ ...issueData,
+ path: fullPath,
+ message: issueData.message,
+ };
+ }
+
+ let errorMessage = "";
+ const maps = errorMaps
+ .filter((m) => !!m)
+ .slice()
+ .reverse();
+ for (const map of maps) {
+ errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
+ }
+
+ return {
+ ...issueData,
+ path: fullPath,
+ message: errorMessage,
+ };
+};
+
+export type ParseParams = {
+ path: (string | number)[];
+ errorMap: ZodErrorMap;
+ async: boolean;
+};
+
+export type ParsePathComponent = string | number;
+export type ParsePath = ParsePathComponent[];
+export const EMPTY_PATH: ParsePath = [];
+
+export interface ParseContext {
+ readonly common: {
+ readonly issues: ZodIssue[];
+ readonly contextualErrorMap?: ZodErrorMap | undefined;
+ readonly async: boolean;
+ };
+ readonly path: ParsePath;
+ readonly schemaErrorMap?: ZodErrorMap | undefined;
+ readonly parent: ParseContext | null;
+ readonly data: any;
+ readonly parsedType: ZodParsedType;
+}
+
+export type ParseInput = {
+ data: any;
+ path: (string | number)[];
+ parent: ParseContext;
+};
+
+export function addIssueToContext(ctx: ParseContext, issueData: IssueData): void {
+ const overrideMap = getErrorMap();
+ const issue = makeIssue({
+ issueData: issueData,
+ data: ctx.data,
+ path: ctx.path,
+ errorMaps: [
+ ctx.common.contextualErrorMap, // contextual error map is first priority
+ ctx.schemaErrorMap, // then schema-bound map if available
+ overrideMap, // then global override map
+ overrideMap === defaultErrorMap ? undefined : defaultErrorMap, // then global default map
+ ].filter((x) => !!x),
+ });
+ ctx.common.issues.push(issue);
+}
+
+export type ObjectPair = {
+ key: SyncParseReturnType;
+ value: SyncParseReturnType;
+};
+export class ParseStatus {
+ value: "aborted" | "dirty" | "valid" = "valid";
+ dirty(): void {
+ if (this.value === "valid") this.value = "dirty";
+ }
+ abort(): void {
+ if (this.value !== "aborted") this.value = "aborted";
+ }
+
+ static mergeArray(status: ParseStatus, results: SyncParseReturnType[]): SyncParseReturnType {
+ const arrayValue: any[] = [];
+ for (const s of results) {
+ if (s.status === "aborted") return INVALID;
+ if (s.status === "dirty") status.dirty();
+ arrayValue.push(s.value);
+ }
+
+ return { status: status.value, value: arrayValue };
+ }
+
+ static async mergeObjectAsync(
+ status: ParseStatus,
+ pairs: { key: ParseReturnType; value: ParseReturnType }[]
+ ): Promise> {
+ const syncPairs: ObjectPair[] = [];
+ for (const pair of pairs) {
+ const key = await pair.key;
+ const value = await pair.value;
+ syncPairs.push({
+ key,
+ value,
+ });
+ }
+ return ParseStatus.mergeObjectSync(status, syncPairs);
+ }
+
+ static mergeObjectSync(
+ status: ParseStatus,
+ pairs: {
+ key: SyncParseReturnType;
+ value: SyncParseReturnType;
+ alwaysSet?: boolean;
+ }[]
+ ): SyncParseReturnType {
+ const finalObject: any = {};
+ for (const pair of pairs) {
+ const { key, value } = pair;
+ if (key.status === "aborted") return INVALID;
+ if (value.status === "aborted") return INVALID;
+ if (key.status === "dirty") status.dirty();
+ if (value.status === "dirty") status.dirty();
+
+ if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
+ finalObject[key.value] = value.value;
+ }
+ }
+
+ return { status: status.value, value: finalObject };
+ }
+}
+export interface ParseResult {
+ status: "aborted" | "dirty" | "valid";
+ data: any;
+}
+
+export type INVALID = { status: "aborted" };
+export const INVALID: INVALID = Object.freeze({
+ status: "aborted",
+});
+
+export type DIRTY = { status: "dirty"; value: T };
+export const DIRTY = (value: T): DIRTY => ({ status: "dirty", value });
+
+export type OK = { status: "valid"; value: T };
+export const OK = (value: T): OK => ({ status: "valid", value });
+
+export type SyncParseReturnType = OK | DIRTY | INVALID;
+export type AsyncParseReturnType = Promise>;
+export type ParseReturnType = SyncParseReturnType | AsyncParseReturnType;
+
+export const isAborted = (x: ParseReturnType): x is INVALID => (x as any).status === "aborted";
+export const isDirty = (x: ParseReturnType): x is OK | DIRTY => (x as any).status === "dirty";
+export const isValid = (x: ParseReturnType): x is OK => (x as any).status === "valid";
+export const isAsync = (x: ParseReturnType): x is AsyncParseReturnType =>
+ typeof Promise !== "undefined" && x instanceof Promise;
diff --git a/node_modules/zod/src/v3/helpers/partialUtil.ts b/node_modules/zod/src/v3/helpers/partialUtil.ts
new file mode 100644
index 0000000..0eff8ff
--- /dev/null
+++ b/node_modules/zod/src/v3/helpers/partialUtil.ts
@@ -0,0 +1,34 @@
+import type {
+ ZodArray,
+ ZodNullable,
+ ZodObject,
+ ZodOptional,
+ ZodRawShape,
+ ZodTuple,
+ ZodTupleItems,
+ ZodTypeAny,
+} from "../types.js";
+
+export namespace partialUtil {
+ export type DeepPartial = T extends ZodObject
+ ? ZodObject<
+ { [k in keyof T["shape"]]: ZodOptional> },
+ T["_def"]["unknownKeys"],
+ T["_def"]["catchall"]
+ >
+ : T extends ZodArray
+ ? ZodArray, Card>
+ : T extends ZodOptional
+ ? ZodOptional>
+ : T extends ZodNullable
+ ? ZodNullable>
+ : T extends ZodTuple
+ ? {
+ [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial : never;
+ } extends infer PI
+ ? PI extends ZodTupleItems
+ ? ZodTuple
+ : never
+ : never
+ : T;
+}
diff --git a/node_modules/zod/src/v3/helpers/typeAliases.ts b/node_modules/zod/src/v3/helpers/typeAliases.ts
new file mode 100644
index 0000000..32df022
--- /dev/null
+++ b/node_modules/zod/src/v3/helpers/typeAliases.ts
@@ -0,0 +1,2 @@
+export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
+export type Scalars = Primitive | Primitive[];
diff --git a/node_modules/zod/src/v3/helpers/util.ts b/node_modules/zod/src/v3/helpers/util.ts
new file mode 100644
index 0000000..030ea82
--- /dev/null
+++ b/node_modules/zod/src/v3/helpers/util.ts
@@ -0,0 +1,224 @@
+export namespace util {
+ type AssertEqual = (() => V extends T ? 1 : 2) extends () => V extends U ? 1 : 2 ? true : false;
+
+ export type isAny = 0 extends 1 & T ? true : false;
+ export const assertEqual = (_: AssertEqual ): void => {};
+ export function assertIs(_arg: T): void {}
+ export function assertNever(_x: never): never {
+ throw new Error();
+ }
+
+ export type Omit = Pick>;
+ export type OmitKeys = Pick>;
+ export type MakePartial = Omit & Partial>;
+ export type Exactly = T & Record, never>;
+ export type InexactPartial = { [k in keyof T]?: T[k] | undefined };
+ export const arrayToEnum = (items: U): { [k in U[number]]: k } => {
+ const obj: any = {};
+ for (const item of items) {
+ obj[item] = item;
+ }
+ return obj;
+ };
+
+ export const getValidEnumValues = (obj: any): any[] => {
+ const validKeys = objectKeys(obj).filter((k: any) => typeof obj[obj[k]] !== "number");
+ const filtered: any = {};
+ for (const k of validKeys) {
+ filtered[k] = obj[k];
+ }
+ return objectValues(filtered);
+ };
+
+ export const objectValues = (obj: any): any[] => {
+ return objectKeys(obj).map(function (e) {
+ return obj[e];
+ });
+ };
+
+ export const objectKeys: ObjectConstructor["keys"] =
+ typeof Object.keys === "function" // eslint-disable-line ban/ban
+ ? (obj: any) => Object.keys(obj) // eslint-disable-line ban/ban
+ : (object: any) => {
+ const keys = [];
+ for (const key in object) {
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
+ keys.push(key);
+ }
+ }
+ return keys;
+ };
+
+ export const find = (arr: T[], checker: (arg: T) => any): T | undefined => {
+ for (const item of arr) {
+ if (checker(item)) return item;
+ }
+ return undefined;
+ };
+
+ export type identity = objectUtil.identity;
+ export type flatten = objectUtil.flatten;
+
+ export type noUndefined = T extends undefined ? never : T;
+
+ export const isInteger: NumberConstructor["isInteger"] =
+ typeof Number.isInteger === "function"
+ ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
+ : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
+
+ export function joinValues(array: T, separator = " | "): string {
+ return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator);
+ }
+
+ export const jsonStringifyReplacer = (_: string, value: any): any => {
+ if (typeof value === "bigint") {
+ return value.toString();
+ }
+ return value;
+ };
+}
+
+export namespace objectUtil {
+ export type MergeShapes =
+ // fast path when there is no keys overlap
+ keyof U & keyof V extends never
+ ? U & V
+ : {
+ [k in Exclude]: U[k];
+ } & V;
+
+ type optionalKeys = {
+ [k in keyof T]: undefined extends T[k] ? k : never;
+ }[keyof T];
+ type requiredKeys = {
+ [k in keyof T]: undefined extends T[k] ? never : k;
+ }[keyof T];
+ export type addQuestionMarks = {
+ [K in requiredKeys]: T[K];
+ } & {
+ [K in optionalKeys]?: T[K];
+ } & { [k in keyof T]?: unknown };
+
+ export type identity = T;
+ export type flatten = identity<{ [k in keyof T]: T[k] }>;
+
+ export type noNeverKeys = {
+ [k in keyof T]: [T[k]] extends [never] ? never : k;
+ }[keyof T];
+
+ export type noNever = identity<{
+ [k in noNeverKeys]: k extends keyof T ? T[k] : never;
+ }>;
+
+ export const mergeShapes = (first: U, second: T): T & U => {
+ return {
+ ...first,
+ ...second, // second overwrites first
+ };
+ };
+
+ export type extendShape = keyof A & keyof B extends never // fast path when there is no keys overlap
+ ? A & B
+ : {
+ [K in keyof A as K extends keyof B ? never : K]: A[K];
+ } & {
+ [K in keyof B]: B[K];
+ };
+}
+
+export const ZodParsedType: {
+ string: "string";
+ nan: "nan";
+ number: "number";
+ integer: "integer";
+ float: "float";
+ boolean: "boolean";
+ date: "date";
+ bigint: "bigint";
+ symbol: "symbol";
+ function: "function";
+ undefined: "undefined";
+ null: "null";
+ array: "array";
+ object: "object";
+ unknown: "unknown";
+ promise: "promise";
+ void: "void";
+ never: "never";
+ map: "map";
+ set: "set";
+} = util.arrayToEnum([
+ "string",
+ "nan",
+ "number",
+ "integer",
+ "float",
+ "boolean",
+ "date",
+ "bigint",
+ "symbol",
+ "function",
+ "undefined",
+ "null",
+ "array",
+ "object",
+ "unknown",
+ "promise",
+ "void",
+ "never",
+ "map",
+ "set",
+]);
+
+export type ZodParsedType = keyof typeof ZodParsedType;
+
+export const getParsedType = (data: any): ZodParsedType => {
+ const t = typeof data;
+
+ switch (t) {
+ case "undefined":
+ return ZodParsedType.undefined;
+
+ case "string":
+ return ZodParsedType.string;
+
+ case "number":
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
+
+ case "boolean":
+ return ZodParsedType.boolean;
+
+ case "function":
+ return ZodParsedType.function;
+
+ case "bigint":
+ return ZodParsedType.bigint;
+
+ case "symbol":
+ return ZodParsedType.symbol;
+
+ case "object":
+ if (Array.isArray(data)) {
+ return ZodParsedType.array;
+ }
+ if (data === null) {
+ return ZodParsedType.null;
+ }
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
+ return ZodParsedType.promise;
+ }
+ if (typeof Map !== "undefined" && data instanceof Map) {
+ return ZodParsedType.map;
+ }
+ if (typeof Set !== "undefined" && data instanceof Set) {
+ return ZodParsedType.set;
+ }
+ if (typeof Date !== "undefined" && data instanceof Date) {
+ return ZodParsedType.date;
+ }
+ return ZodParsedType.object;
+
+ default:
+ return ZodParsedType.unknown;
+ }
+};
diff --git a/node_modules/zod/src/v3/index.ts b/node_modules/zod/src/v3/index.ts
new file mode 100644
index 0000000..a9dab57
--- /dev/null
+++ b/node_modules/zod/src/v3/index.ts
@@ -0,0 +1,4 @@
+import * as z from "./external.js";
+export * from "./external.js";
+export { z };
+export default z;
diff --git a/node_modules/zod/src/v3/locales/en.ts b/node_modules/zod/src/v3/locales/en.ts
new file mode 100644
index 0000000..0264f82
--- /dev/null
+++ b/node_modules/zod/src/v3/locales/en.ts
@@ -0,0 +1,124 @@
+import { type ZodErrorMap, ZodIssueCode } from "../ZodError.js";
+import { util, ZodParsedType } from "../helpers/util.js";
+
+const errorMap: ZodErrorMap = (issue, _ctx) => {
+ let message: string;
+ switch (issue.code) {
+ case ZodIssueCode.invalid_type:
+ if (issue.received === ZodParsedType.undefined) {
+ message = "Required";
+ } else {
+ message = `Expected ${issue.expected}, received ${issue.received}`;
+ }
+ break;
+ case ZodIssueCode.invalid_literal:
+ message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
+ break;
+ case ZodIssueCode.unrecognized_keys:
+ message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
+ break;
+ case ZodIssueCode.invalid_union:
+ message = `Invalid input`;
+ break;
+ case ZodIssueCode.invalid_union_discriminator:
+ message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
+ break;
+ case ZodIssueCode.invalid_enum_value:
+ message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
+ break;
+ case ZodIssueCode.invalid_arguments:
+ message = `Invalid function arguments`;
+ break;
+ case ZodIssueCode.invalid_return_type:
+ message = `Invalid function return type`;
+ break;
+ case ZodIssueCode.invalid_date:
+ message = `Invalid date`;
+ break;
+ case ZodIssueCode.invalid_string:
+ if (typeof issue.validation === "object") {
+ if ("includes" in issue.validation) {
+ message = `Invalid input: must include "${issue.validation.includes}"`;
+
+ if (typeof issue.validation.position === "number") {
+ message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
+ }
+ } else if ("startsWith" in issue.validation) {
+ message = `Invalid input: must start with "${issue.validation.startsWith}"`;
+ } else if ("endsWith" in issue.validation) {
+ message = `Invalid input: must end with "${issue.validation.endsWith}"`;
+ } else {
+ util.assertNever(issue.validation);
+ }
+ } else if (issue.validation !== "regex") {
+ message = `Invalid ${issue.validation}`;
+ } else {
+ message = "Invalid";
+ }
+ break;
+ case ZodIssueCode.too_small:
+ if (issue.type === "array")
+ message = `Array must contain ${
+ issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`
+ } ${issue.minimum} element(s)`;
+ else if (issue.type === "string")
+ message = `String must contain ${
+ issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`
+ } ${issue.minimum} character(s)`;
+ else if (issue.type === "number")
+ message = `Number must be ${
+ issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `
+ }${issue.minimum}`;
+ else if (issue.type === "bigint")
+ message = `Number must be ${
+ issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `
+ }${issue.minimum}`;
+ else if (issue.type === "date")
+ message = `Date must be ${
+ issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `
+ }${new Date(Number(issue.minimum))}`;
+ else message = "Invalid input";
+ break;
+ case ZodIssueCode.too_big:
+ if (issue.type === "array")
+ message = `Array must contain ${
+ issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`
+ } ${issue.maximum} element(s)`;
+ else if (issue.type === "string")
+ message = `String must contain ${
+ issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`
+ } ${issue.maximum} character(s)`;
+ else if (issue.type === "number")
+ message = `Number must be ${
+ issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`
+ } ${issue.maximum}`;
+ else if (issue.type === "bigint")
+ message = `BigInt must be ${
+ issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`
+ } ${issue.maximum}`;
+ else if (issue.type === "date")
+ message = `Date must be ${
+ issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`
+ } ${new Date(Number(issue.maximum))}`;
+ else message = "Invalid input";
+ break;
+ case ZodIssueCode.custom:
+ message = `Invalid input`;
+ break;
+ case ZodIssueCode.invalid_intersection_types:
+ message = `Intersection results could not be merged`;
+ break;
+ case ZodIssueCode.not_multiple_of:
+ message = `Number must be a multiple of ${issue.multipleOf}`;
+ break;
+ case ZodIssueCode.not_finite:
+ message = "Number must be finite";
+ break;
+ default:
+ message = _ctx.defaultError;
+ util.assertNever(issue);
+ }
+ return { message };
+};
+
+export default errorMap;
diff --git a/node_modules/zod/src/v3/standard-schema.ts b/node_modules/zod/src/v3/standard-schema.ts
new file mode 100644
index 0000000..07193fd
--- /dev/null
+++ b/node_modules/zod/src/v3/standard-schema.ts
@@ -0,0 +1,113 @@
+/**
+ * The Standard Schema interface.
+ */
+export type StandardSchemaV1 = {
+ /**
+ * The Standard Schema properties.
+ */
+ readonly "~standard": StandardSchemaV1.Props ;
+};
+
+export declare namespace StandardSchemaV1 {
+ /**
+ * The Standard Schema properties interface.
+ */
+ export interface Props {
+ /**
+ * The version number of the standard.
+ */
+ readonly version: 1;
+ /**
+ * The vendor name of the schema library.
+ */
+ readonly vendor: string;
+ /**
+ * Validates unknown input values.
+ */
+ readonly validate: (value: unknown) => Result | Promise>;
+ /**
+ * Inferred types associated with the schema.
+ */
+ readonly types?: Types | undefined;
+ }
+
+ /**
+ * The result interface of the validate function.
+ */
+ export type Result = SuccessResult | FailureResult;
+
+ /**
+ * The result interface if validation succeeds.
+ */
+ export interface SuccessResult {
+ /**
+ * The typed output value.
+ */
+ readonly value: Output;
+ /**
+ * The non-existent issues.
+ */
+ readonly issues?: undefined;
+ }
+
+ /**
+ * The result interface if validation fails.
+ */
+ export interface FailureResult {
+ /**
+ * The issues of failed validation.
+ */
+ readonly issues: ReadonlyArray;
+ }
+
+ /**
+ * The issue interface of the failure output.
+ */
+ export interface Issue {
+ /**
+ * The error message of the issue.
+ */
+ readonly message: string;
+ /**
+ * The path of the issue, if any.
+ */
+ readonly path?: ReadonlyArray | undefined;
+ }
+
+ /**
+ * The path segment interface of the issue.
+ */
+ export interface PathSegment {
+ /**
+ * The key representing a path segment.
+ */
+ readonly key: PropertyKey;
+ }
+
+ /**
+ * The Standard Schema types interface.
+ */
+ export interface Types {
+ /**
+ * The input type of the schema.
+ */
+ readonly input: Input;
+ /**
+ * The output type of the schema.
+ */
+ readonly output: Output;
+ }
+
+ /**
+ * Infers the input type of a Standard Schema.
+ */
+ export type InferInput = NonNullable["input"];
+
+ /**
+ * Infers the output type of a Standard Schema.
+ */
+ export type InferOutput = NonNullable["output"];
+
+ // biome-ignore lint/complexity/noUselessEmptyExport: needed for granular visibility control of TS namespace
+ export {};
+}
diff --git a/node_modules/zod/src/v3/tests/Mocker.ts b/node_modules/zod/src/v3/tests/Mocker.ts
new file mode 100644
index 0000000..c9fbdd5
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/Mocker.ts
@@ -0,0 +1,54 @@
+function getRandomInt(max: number) {
+ return Math.floor(Math.random() * Math.floor(max));
+}
+
+const testSymbol = Symbol("test");
+
+export class Mocker {
+ pick = (...args: any[]): any => {
+ return args[getRandomInt(args.length)];
+ };
+
+ get string(): string {
+ return Math.random().toString(36).substring(7);
+ }
+ get number(): number {
+ return Math.random() * 100;
+ }
+ get bigint(): bigint {
+ return BigInt(Math.floor(Math.random() * 10000));
+ }
+ get boolean(): boolean {
+ return Math.random() < 0.5;
+ }
+ get date(): Date {
+ return new Date(Math.floor(Date.now() * Math.random()));
+ }
+ get symbol(): symbol {
+ return testSymbol;
+ }
+ get null(): null {
+ return null;
+ }
+ get undefined(): undefined {
+ return undefined;
+ }
+ get stringOptional(): string | undefined {
+ return this.pick(this.string, this.undefined);
+ }
+ get stringNullable(): string | null {
+ return this.pick(this.string, this.null);
+ }
+ get numberOptional(): number | undefined {
+ return this.pick(this.number, this.undefined);
+ }
+ get numberNullable(): number | null {
+ return this.pick(this.number, this.null);
+ }
+ get booleanOptional(): boolean | undefined {
+ return this.pick(this.boolean, this.undefined);
+ }
+ get booleanNullable(): boolean | null {
+ return this.pick(this.boolean, this.null);
+ }
+}
diff --git a/node_modules/zod/src/v3/tests/all-errors.test.ts b/node_modules/zod/src/v3/tests/all-errors.test.ts
new file mode 100644
index 0000000..8fdf8f4
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/all-errors.test.ts
@@ -0,0 +1,157 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+const Test = z.object({
+ f1: z.number(),
+ f2: z.string().optional(),
+ f3: z.string().nullable(),
+ f4: z.array(z.object({ t: z.union([z.string(), z.boolean()]) })),
+});
+type TestFlattenedErrors = z.inferFlattenedErrors;
+type TestFormErrors = z.inferFlattenedErrors;
+
+test("default flattened errors type inference", () => {
+ type TestTypeErrors = {
+ formErrors: string[];
+ fieldErrors: { [P in keyof z.TypeOf]?: string[] | undefined };
+ };
+
+ util.assertEqual, TestTypeErrors>(true);
+ util.assertEqual, TestTypeErrors>(false);
+});
+
+test("custom flattened errors type inference", () => {
+ type ErrorType = { message: string; code: number };
+ type TestTypeErrors = {
+ formErrors: ErrorType[];
+ fieldErrors: {
+ [P in keyof z.TypeOf]?: ErrorType[] | undefined;
+ };
+ };
+
+ util.assertEqual, TestTypeErrors>(false);
+ util.assertEqual, TestTypeErrors>(true);
+ util.assertEqual, TestTypeErrors>(false);
+});
+
+test("form errors type inference", () => {
+ type TestTypeErrors = {
+ formErrors: string[];
+ fieldErrors: { [P in keyof z.TypeOf]?: string[] | undefined };
+ };
+
+ util.assertEqual, TestTypeErrors>(true);
+});
+
+test(".flatten() type assertion", () => {
+ const parsed = Test.safeParse({}) as z.SafeParseError;
+ const validFlattenedErrors: TestFlattenedErrors = parsed.error.flatten(() => ({ message: "", code: 0 }));
+ // @ts-expect-error should fail assertion between `TestFlattenedErrors` and unmapped `flatten()`.
+ const invalidFlattenedErrors: TestFlattenedErrors = parsed.error.flatten();
+ const validFormErrors: TestFormErrors = parsed.error.flatten();
+ // @ts-expect-error should fail assertion between `TestFormErrors` and mapped `flatten()`.
+ const invalidFormErrors: TestFormErrors = parsed.error.flatten(() => ({
+ message: "string",
+ code: 0,
+ }));
+
+ [validFlattenedErrors, invalidFlattenedErrors, validFormErrors, invalidFormErrors];
+});
+
+test(".formErrors type assertion", () => {
+ const parsed = Test.safeParse({}) as z.SafeParseError;
+ const validFormErrors: TestFormErrors = parsed.error.formErrors;
+ // @ts-expect-error should fail assertion between `TestFlattenedErrors` and `.formErrors`.
+ const invalidFlattenedErrors: TestFlattenedErrors = parsed.error.formErrors;
+
+ [validFormErrors, invalidFlattenedErrors];
+});
+
+test("all errors", () => {
+ const propertySchema = z.string();
+ const schema = z
+ .object({
+ a: propertySchema,
+ b: propertySchema,
+ })
+ .refine(
+ (val) => {
+ return val.a === val.b;
+ },
+ { message: "Must be equal" }
+ );
+
+ try {
+ schema.parse({
+ a: "asdf",
+ b: "qwer",
+ });
+ } catch (error) {
+ if (error instanceof z.ZodError) {
+ expect(error.flatten()).toEqual({
+ formErrors: ["Must be equal"],
+ fieldErrors: {},
+ });
+ }
+ }
+
+ try {
+ schema.parse({
+ a: null,
+ b: null,
+ });
+ } catch (_error) {
+ const error = _error as z.ZodError;
+ expect(error.flatten()).toEqual({
+ formErrors: [],
+ fieldErrors: {
+ a: ["Expected string, received null"],
+ b: ["Expected string, received null"],
+ },
+ });
+
+ expect(error.flatten((iss) => iss.message.toUpperCase())).toEqual({
+ formErrors: [],
+ fieldErrors: {
+ a: ["EXPECTED STRING, RECEIVED NULL"],
+ b: ["EXPECTED STRING, RECEIVED NULL"],
+ },
+ });
+ // Test identity
+
+ expect(error.flatten((i: z.ZodIssue) => i)).toEqual({
+ formErrors: [],
+ fieldErrors: {
+ a: [
+ {
+ code: "invalid_type",
+ expected: "string",
+ message: "Expected string, received null",
+ path: ["a"],
+ received: "null",
+ },
+ ],
+ b: [
+ {
+ code: "invalid_type",
+ expected: "string",
+ message: "Expected string, received null",
+ path: ["b"],
+ received: "null",
+ },
+ ],
+ },
+ });
+ // Test mapping
+ expect(error.flatten((i: z.ZodIssue) => i.message.length)).toEqual({
+ formErrors: [],
+ fieldErrors: {
+ a: ["Expected string, received null".length],
+ b: ["Expected string, received null".length],
+ },
+ });
+ }
+});
diff --git a/node_modules/zod/src/v3/tests/anyunknown.test.ts b/node_modules/zod/src/v3/tests/anyunknown.test.ts
new file mode 100644
index 0000000..49d07db
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/anyunknown.test.ts
@@ -0,0 +1,28 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("check any inference", () => {
+ const t1 = z.any();
+ t1.optional();
+ t1.nullable();
+ type t1 = z.infer;
+ util.assertEqual(true);
+});
+
+test("check unknown inference", () => {
+ const t1 = z.unknown();
+ t1.optional();
+ t1.nullable();
+ type t1 = z.infer;
+ util.assertEqual(true);
+});
+
+test("check never inference", () => {
+ const t1 = z.never();
+ expect(() => t1.parse(undefined)).toThrow();
+ expect(() => t1.parse("asdf")).toThrow();
+ expect(() => t1.parse(null)).toThrow();
+});
diff --git a/node_modules/zod/src/v3/tests/array.test.ts b/node_modules/zod/src/v3/tests/array.test.ts
new file mode 100644
index 0000000..df5b9d3
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/array.test.ts
@@ -0,0 +1,71 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+const minTwo = z.string().array().min(2);
+const maxTwo = z.string().array().max(2);
+const justTwo = z.string().array().length(2);
+const intNum = z.string().array().nonempty();
+const nonEmptyMax = z.string().array().nonempty().max(2);
+
+type t1 = z.infer;
+util.assertEqual<[string, ...string[]], t1>(true);
+
+type t2 = z.infer;
+util.assertEqual(true);
+
+test("passing validations", () => {
+ minTwo.parse(["a", "a"]);
+ minTwo.parse(["a", "a", "a"]);
+ maxTwo.parse(["a", "a"]);
+ maxTwo.parse(["a"]);
+ justTwo.parse(["a", "a"]);
+ intNum.parse(["a"]);
+ nonEmptyMax.parse(["a"]);
+});
+
+test("failing validations", () => {
+ expect(() => minTwo.parse(["a"])).toThrow();
+ expect(() => maxTwo.parse(["a", "a", "a"])).toThrow();
+ expect(() => justTwo.parse(["a"])).toThrow();
+ expect(() => justTwo.parse(["a", "a", "a"])).toThrow();
+ expect(() => intNum.parse([])).toThrow();
+ expect(() => nonEmptyMax.parse([])).toThrow();
+ expect(() => nonEmptyMax.parse(["a", "a", "a"])).toThrow();
+});
+
+test("parse empty array in nonempty", () => {
+ expect(() =>
+ z
+ .array(z.string())
+ .nonempty()
+ .parse([] as any)
+ ).toThrow();
+});
+
+test("get element", () => {
+ justTwo.element.parse("asdf");
+ expect(() => justTwo.element.parse(12)).toThrow();
+});
+
+test("continue parsing despite array size error", () => {
+ const schema = z.object({
+ people: z.string().array().min(2),
+ });
+
+ const result = schema.safeParse({
+ people: [123],
+ });
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues.length).toEqual(2);
+ }
+});
+
+test("parse should fail given sparse array", () => {
+ const schema = z.array(z.string()).nonempty().min(1).max(3);
+
+ expect(() => schema.parse(new Array(3))).toThrow();
+});
diff --git a/node_modules/zod/src/v3/tests/async-parsing.test.ts b/node_modules/zod/src/v3/tests/async-parsing.test.ts
new file mode 100644
index 0000000..01dbc4f
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/async-parsing.test.ts
@@ -0,0 +1,388 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+/// string
+const stringSchema = z.string();
+
+test("string async parse", async () => {
+ const goodData = "XXX";
+ const badData = 12;
+
+ const goodResult = await stringSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await stringSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// number
+const numberSchema = z.number();
+test("number async parse", async () => {
+ const goodData = 1234.2353;
+ const badData = "1234";
+
+ const goodResult = await numberSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await numberSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// bigInt
+const bigIntSchema = z.bigint();
+test("bigInt async parse", async () => {
+ const goodData = BigInt(145);
+ const badData = 134;
+
+ const goodResult = await bigIntSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await bigIntSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// boolean
+const booleanSchema = z.boolean();
+test("boolean async parse", async () => {
+ const goodData = true;
+ const badData = 1;
+
+ const goodResult = await booleanSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await booleanSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// date
+const dateSchema = z.date();
+test("date async parse", async () => {
+ const goodData = new Date();
+ const badData = new Date().toISOString();
+
+ const goodResult = await dateSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await dateSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// undefined
+const undefinedSchema = z.undefined();
+test("undefined async parse", async () => {
+ const goodData = undefined;
+ const badData = "XXX";
+
+ const goodResult = await undefinedSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(undefined);
+
+ const badResult = await undefinedSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// null
+const nullSchema = z.null();
+test("null async parse", async () => {
+ const goodData = null;
+ const badData = undefined;
+
+ const goodResult = await nullSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await nullSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// any
+const anySchema = z.any();
+test("any async parse", async () => {
+ const goodData = [{}];
+ // const badData = 'XXX';
+
+ const goodResult = await anySchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ // const badResult = await anySchema.safeParseAsync(badData);
+ // expect(badResult.success).toBe(false);
+ // if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// unknown
+const unknownSchema = z.unknown();
+test("unknown async parse", async () => {
+ const goodData = ["asdf", 124, () => {}];
+ // const badData = 'XXX';
+
+ const goodResult = await unknownSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ // const badResult = await unknownSchema.safeParseAsync(badData);
+ // expect(badResult.success).toBe(false);
+ // if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// void
+const voidSchema = z.void();
+test("void async parse", async () => {
+ const goodData = undefined;
+ const badData = 0;
+
+ const goodResult = await voidSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await voidSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// array
+const arraySchema = z.array(z.string());
+test("array async parse", async () => {
+ const goodData = ["XXX"];
+ const badData = "XXX";
+
+ const goodResult = await arraySchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await arraySchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// object
+const objectSchema = z.object({ string: z.string() });
+test("object async parse", async () => {
+ const goodData = { string: "XXX" };
+ const badData = { string: 12 };
+
+ const goodResult = await objectSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await objectSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// union
+const unionSchema = z.union([z.string(), z.undefined()]);
+test("union async parse", async () => {
+ const goodData = undefined;
+ const badData = null;
+
+ const goodResult = await unionSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await unionSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// record
+const recordSchema = z.record(z.object({}));
+test("record async parse", async () => {
+ const goodData = { adsf: {}, asdf: {} };
+ const badData = [{}];
+
+ const goodResult = await recordSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await recordSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// function
+const functionSchema = z.function();
+test("function async parse", async () => {
+ const goodData = () => {};
+ const badData = "XXX";
+
+ const goodResult = await functionSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(typeof goodResult.data).toEqual("function");
+
+ const badResult = await functionSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// literal
+const literalSchema = z.literal("asdf");
+test("literal async parse", async () => {
+ const goodData = "asdf";
+ const badData = "asdff";
+
+ const goodResult = await literalSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await literalSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// enum
+const enumSchema = z.enum(["fish", "whale"]);
+test("enum async parse", async () => {
+ const goodData = "whale";
+ const badData = "leopard";
+
+ const goodResult = await enumSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await enumSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// nativeEnum
+enum nativeEnumTest {
+ asdf = "qwer",
+}
+// @ts-ignore
+const nativeEnumSchema = z.nativeEnum(nativeEnumTest);
+test("nativeEnum async parse", async () => {
+ const goodData = nativeEnumTest.asdf;
+ const badData = "asdf";
+
+ const goodResult = await nativeEnumSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) expect(goodResult.data).toEqual(goodData);
+
+ const badResult = await nativeEnumSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(false);
+ if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
+});
+
+/// promise
+const promiseSchema = z.promise(z.number());
+test("promise async parse good", async () => {
+ const goodData = Promise.resolve(123);
+
+ const goodResult = await promiseSchema.safeParseAsync(goodData);
+ expect(goodResult.success).toBe(true);
+ if (goodResult.success) {
+ expect(goodResult.data).toBeInstanceOf(Promise);
+ const data = await goodResult.data;
+ expect(data).toEqual(123);
+ // expect(goodResult.data).resolves.toEqual(124);
+ // return goodResult.data;
+ } else {
+ throw new Error("success should be true");
+ }
+});
+
+test("promise async parse bad", async () => {
+ const badData = Promise.resolve("XXX");
+ const badResult = await promiseSchema.safeParseAsync(badData);
+ expect(badResult.success).toBe(true);
+ if (badResult.success) {
+ await expect(badResult.data).rejects.toBeInstanceOf(z.ZodError);
+ } else {
+ throw new Error("success should be true");
+ }
+});
+
+test("async validation non-empty strings", async () => {
+ const base = z.object({
+ hello: z.string().refine((x) => x && x.length > 0),
+ foo: z.string().refine((x) => x && x.length > 0),
+ });
+
+ const testval = { hello: "", foo: "" };
+ const result1 = base.safeParse(testval);
+ const result2 = base.safeParseAsync(testval);
+
+ const r1 = result1;
+ await result2.then((r2) => {
+ if (r1.success === false && r2.success === false) expect(r1.error.issues.length).toBe(r2.error.issues.length); // <--- r1 has length 2, r2 has length 1
+ });
+});
+
+test("async validation multiple errors 1", async () => {
+ const base = z.object({
+ hello: z.string(),
+ foo: z.number(),
+ });
+
+ const testval = { hello: 3, foo: "hello" };
+ const result1 = base.safeParse(testval);
+ const result2 = base.safeParseAsync(testval);
+
+ const r1 = result1;
+ await result2.then((r2) => {
+ if (r1.success === false && r2.success === false) expect(r2.error.issues.length).toBe(r1.error.issues.length);
+ });
+});
+
+test("async validation multiple errors 2", async () => {
+ const base = (is_async?: boolean) =>
+ z.object({
+ hello: z.string(),
+ foo: z.object({
+ bar: z.number().refine(is_async ? async () => false : () => false),
+ }),
+ });
+
+ const testval = { hello: 3, foo: { bar: 4 } };
+ const result1 = base().safeParse(testval);
+ const result2 = base(true).safeParseAsync(testval);
+
+ const r1 = result1;
+ await result2.then((r2) => {
+ if (r1.success === false && r2.success === false) expect(r2.error.issues.length).toBe(r1.error.issues.length);
+ });
+});
+
+test("ensure early async failure prevents follow-up refinement checks", async () => {
+ let count = 0;
+ const base = z.object({
+ hello: z.string(),
+ foo: z
+ .number()
+ .refine(async () => {
+ count++;
+ return true;
+ })
+ .refine(async () => {
+ count++;
+ return true;
+ }, "Good"),
+ });
+
+ const testval = { hello: "bye", foo: 3 };
+ const result = await base.safeParseAsync(testval);
+ if (result.success === false) {
+ expect(result.error.issues.length).toBe(1);
+ expect(count).toBe(1);
+ }
+
+ // await result.then((r) => {
+ // if (r.success === false) expect(r.error.issues.length).toBe(1);
+ // expect(count).toBe(2);
+ // });
+});
diff --git a/node_modules/zod/src/v3/tests/async-refinements.test.ts b/node_modules/zod/src/v3/tests/async-refinements.test.ts
new file mode 100644
index 0000000..509475d
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/async-refinements.test.ts
@@ -0,0 +1,46 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+test("parse async test", async () => {
+ const schema1 = z.string().refine(async (_val) => false);
+ expect(() => schema1.parse("asdf")).toThrow();
+
+ const schema2 = z.string().refine((_val) => Promise.resolve(true));
+ return await expect(() => schema2.parse("asdf")).toThrow();
+});
+
+test("parseAsync async test", async () => {
+ const schema1 = z.string().refine(async (_val) => true);
+ await schema1.parseAsync("asdf");
+
+ const schema2 = z.string().refine(async (_val) => false);
+ return await expect(schema2.parseAsync("asdf")).rejects.toBeDefined();
+ // expect(async () => await schema2.parseAsync('asdf')).toThrow();
+});
+
+test("parseAsync async test", async () => {
+ // expect.assertions(2);
+
+ const schema1 = z.string().refine((_val) => Promise.resolve(true));
+ const v1 = await schema1.parseAsync("asdf");
+ expect(v1).toEqual("asdf");
+
+ const schema2 = z.string().refine((_val) => Promise.resolve(false));
+ await expect(schema2.parseAsync("asdf")).rejects.toBeDefined();
+
+ const schema3 = z.string().refine((_val) => Promise.resolve(true));
+ await expect(schema3.parseAsync("asdf")).resolves.toEqual("asdf");
+ return await expect(schema3.parseAsync("qwer")).resolves.toEqual("qwer");
+});
+
+test("parseAsync async with value", async () => {
+ const schema1 = z.string().refine(async (val) => {
+ return val.length > 5;
+ });
+ await expect(schema1.parseAsync("asdf")).rejects.toBeDefined();
+
+ const v = await schema1.parseAsync("asdf123");
+ return await expect(v).toEqual("asdf123");
+});
diff --git a/node_modules/zod/src/v3/tests/base.test.ts b/node_modules/zod/src/v3/tests/base.test.ts
new file mode 100644
index 0000000..ab743d5
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/base.test.ts
@@ -0,0 +1,29 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("type guard", () => {
+ const stringToNumber = z.string().transform((arg) => arg.length);
+
+ const s1 = z.object({
+ stringToNumber,
+ });
+ type t1 = z.input;
+
+ const data = { stringToNumber: "asdf" };
+ const parsed = s1.safeParse(data);
+ if (parsed.success) {
+ util.assertEqual(true);
+ }
+});
+
+test("test this binding", () => {
+ const callback = (predicate: (val: string) => boolean) => {
+ return predicate("hello");
+ };
+
+ expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
+ expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
+});
diff --git a/node_modules/zod/src/v3/tests/bigint.test.ts b/node_modules/zod/src/v3/tests/bigint.test.ts
new file mode 100644
index 0000000..9692f57
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/bigint.test.ts
@@ -0,0 +1,55 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+const gtFive = z.bigint().gt(BigInt(5));
+const gteFive = z.bigint().gte(BigInt(5));
+const ltFive = z.bigint().lt(BigInt(5));
+const lteFive = z.bigint().lte(BigInt(5));
+const positive = z.bigint().positive();
+const negative = z.bigint().negative();
+const nonnegative = z.bigint().nonnegative();
+const nonpositive = z.bigint().nonpositive();
+const multipleOfFive = z.bigint().multipleOf(BigInt(5));
+
+test("passing validations", () => {
+ z.bigint().parse(BigInt(1));
+ z.bigint().parse(BigInt(0));
+ z.bigint().parse(BigInt(-1));
+ gtFive.parse(BigInt(6));
+ gteFive.parse(BigInt(5));
+ gteFive.parse(BigInt(6));
+ ltFive.parse(BigInt(4));
+ lteFive.parse(BigInt(5));
+ lteFive.parse(BigInt(4));
+ positive.parse(BigInt(3));
+ negative.parse(BigInt(-2));
+ nonnegative.parse(BigInt(0));
+ nonnegative.parse(BigInt(7));
+ nonpositive.parse(BigInt(0));
+ nonpositive.parse(BigInt(-12));
+ multipleOfFive.parse(BigInt(15));
+});
+
+test("failing validations", () => {
+ expect(() => gtFive.parse(BigInt(5))).toThrow();
+ expect(() => gteFive.parse(BigInt(4))).toThrow();
+ expect(() => ltFive.parse(BigInt(5))).toThrow();
+ expect(() => lteFive.parse(BigInt(6))).toThrow();
+ expect(() => positive.parse(BigInt(0))).toThrow();
+ expect(() => positive.parse(BigInt(-2))).toThrow();
+ expect(() => negative.parse(BigInt(0))).toThrow();
+ expect(() => negative.parse(BigInt(3))).toThrow();
+ expect(() => nonnegative.parse(BigInt(-1))).toThrow();
+ expect(() => nonpositive.parse(BigInt(1))).toThrow();
+ expect(() => multipleOfFive.parse(BigInt(13))).toThrow();
+});
+
+test("min max getters", () => {
+ expect(z.bigint().min(BigInt(5)).minValue).toEqual(BigInt(5));
+ expect(z.bigint().min(BigInt(5)).min(BigInt(10)).minValue).toEqual(BigInt(10));
+
+ expect(z.bigint().max(BigInt(5)).maxValue).toEqual(BigInt(5));
+ expect(z.bigint().max(BigInt(5)).max(BigInt(1)).maxValue).toEqual(BigInt(1));
+});
diff --git a/node_modules/zod/src/v3/tests/branded.test.ts b/node_modules/zod/src/v3/tests/branded.test.ts
new file mode 100644
index 0000000..b19786c
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/branded.test.ts
@@ -0,0 +1,53 @@
+// @ts-ignore TS6133
+import { test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("branded types", () => {
+ const mySchema = z
+ .object({
+ name: z.string(),
+ })
+ .brand<"superschema">();
+
+ // simple branding
+ type MySchema = z.infer;
+ util.assertEqual(true);
+
+ const doStuff = (arg: MySchema) => arg;
+ doStuff(mySchema.parse({ name: "hello there" }));
+
+ // inheritance
+ const extendedSchema = mySchema.brand<"subschema">();
+ type ExtendedSchema = z.infer;
+ util.assertEqual & z.BRAND<"subschema">>(true);
+
+ doStuff(extendedSchema.parse({ name: "hello again" }));
+
+ // number branding
+ const numberSchema = z.number().brand<42>();
+ type NumberSchema = z.infer;
+ util.assertEqual(true);
+
+ // symbol branding
+ const MyBrand: unique symbol = Symbol("hello");
+ type MyBrand = typeof MyBrand;
+ const symbolBrand = z.number().brand<"sup">().brand();
+ type SymbolBrand = z.infer;
+ // number & { [z.BRAND]: { sup: true, [MyBrand]: true } }
+ util.assertEqual & z.BRAND>(true);
+
+ // keeping brands out of input types
+ const age = z.number().brand<"age">();
+
+ type Age = z.infer;
+ type AgeInput = z.input;
+
+ util.assertEqual(false);
+ util.assertEqual(true);
+ util.assertEqual, Age>(true);
+
+ // @ts-expect-error
+ doStuff({ name: "hello there!" });
+});
diff --git a/node_modules/zod/src/v3/tests/catch.test.ts b/node_modules/zod/src/v3/tests/catch.test.ts
new file mode 100644
index 0000000..94d12aa
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/catch.test.ts
@@ -0,0 +1,220 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import { z } from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("basic catch", () => {
+ expect(z.string().catch("default").parse(undefined)).toBe("default");
+});
+
+test("catch fn does not run when parsing succeeds", () => {
+ let isCalled = false;
+ const cb = () => {
+ isCalled = true;
+ return "asdf";
+ };
+ expect(z.string().catch(cb).parse("test")).toBe("test");
+ expect(isCalled).toEqual(false);
+});
+
+test("basic catch async", async () => {
+ const result = await z.string().catch("default").parseAsync(1243);
+ expect(result).toBe("default");
+});
+
+test("catch replace wrong types", () => {
+ expect(z.string().catch("default").parse(true)).toBe("default");
+ expect(z.string().catch("default").parse(true)).toBe("default");
+ expect(z.string().catch("default").parse(15)).toBe("default");
+ expect(z.string().catch("default").parse([])).toBe("default");
+ expect(z.string().catch("default").parse(new Map())).toBe("default");
+ expect(z.string().catch("default").parse(new Set())).toBe("default");
+ expect(z.string().catch("default").parse({})).toBe("default");
+});
+
+test("catch with transform", () => {
+ const stringWithDefault = z
+ .string()
+ .transform((val) => val.toUpperCase())
+ .catch("default");
+ expect(stringWithDefault.parse(undefined)).toBe("default");
+ expect(stringWithDefault.parse(15)).toBe("default");
+ expect(stringWithDefault).toBeInstanceOf(z.ZodCatch);
+ expect(stringWithDefault._def.innerType).toBeInstanceOf(z.ZodEffects);
+ expect(stringWithDefault._def.innerType._def.schema).toBeInstanceOf(z.ZodSchema);
+
+ type inp = z.input;
+ util.assertEqual(true);
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("catch on existing optional", () => {
+ const stringWithDefault = z.string().optional().catch("asdf");
+ expect(stringWithDefault.parse(undefined)).toBe(undefined);
+ expect(stringWithDefault.parse(15)).toBe("asdf");
+ expect(stringWithDefault).toBeInstanceOf(z.ZodCatch);
+ expect(stringWithDefault._def.innerType).toBeInstanceOf(z.ZodOptional);
+ expect(stringWithDefault._def.innerType._def.innerType).toBeInstanceOf(z.ZodString);
+
+ type inp = z.input;
+ util.assertEqual(true);
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("optional on catch", () => {
+ const stringWithDefault = z.string().catch("asdf").optional();
+
+ type inp = z.input;
+ util.assertEqual(true);
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("complex chain example", () => {
+ const complex = z
+ .string()
+ .catch("asdf")
+ .transform((val) => val + "!")
+ .transform((val) => val.toUpperCase())
+ .catch("qwer")
+ .removeCatch()
+ .optional()
+ .catch("asdfasdf");
+
+ expect(complex.parse("qwer")).toBe("QWER!");
+ expect(complex.parse(15)).toBe("ASDF!");
+ expect(complex.parse(true)).toBe("ASDF!");
+});
+
+test("removeCatch", () => {
+ const stringWithRemovedDefault = z.string().catch("asdf").removeCatch();
+
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("nested", () => {
+ const inner = z.string().catch("asdf");
+ const outer = z.object({ inner }).catch({
+ inner: "asdf",
+ });
+ type input = z.input;
+ util.assertEqual (true);
+ type out = z.output;
+ util.assertEqual(true);
+ expect(outer.parse(undefined)).toEqual({ inner: "asdf" });
+ expect(outer.parse({})).toEqual({ inner: "asdf" });
+ expect(outer.parse({ inner: undefined })).toEqual({ inner: "asdf" });
+});
+
+test("chained catch", () => {
+ const stringWithDefault = z.string().catch("inner").catch("outer");
+ const result = stringWithDefault.parse(undefined);
+ expect(result).toEqual("inner");
+ const resultDiff = stringWithDefault.parse(5);
+ expect(resultDiff).toEqual("inner");
+});
+
+test("factory", () => {
+ z.ZodCatch.create(z.string(), {
+ catch: "asdf",
+ }).parse(undefined);
+});
+
+test("native enum", () => {
+ enum Fruits {
+ apple = "apple",
+ orange = "orange",
+ }
+
+ const schema = z.object({
+ fruit: z.nativeEnum(Fruits).catch(Fruits.apple),
+ });
+
+ expect(schema.parse({})).toEqual({ fruit: Fruits.apple });
+ expect(schema.parse({ fruit: 15 })).toEqual({ fruit: Fruits.apple });
+});
+
+test("enum", () => {
+ const schema = z.object({
+ fruit: z.enum(["apple", "orange"]).catch("apple"),
+ });
+
+ expect(schema.parse({})).toEqual({ fruit: "apple" });
+ expect(schema.parse({ fruit: true })).toEqual({ fruit: "apple" });
+ expect(schema.parse({ fruit: 15 })).toEqual({ fruit: "apple" });
+});
+
+test("reported issues with nested usage", () => {
+ const schema = z.object({
+ string: z.string(),
+ obj: z.object({
+ sub: z.object({
+ lit: z.literal("a"),
+ subCatch: z.number().catch(23),
+ }),
+ midCatch: z.number().catch(42),
+ }),
+ number: z.number().catch(0),
+ bool: z.boolean(),
+ });
+
+ try {
+ schema.parse({
+ string: {},
+ obj: {
+ sub: {
+ lit: "b",
+ subCatch: "24",
+ },
+ midCatch: 444,
+ },
+ number: "",
+ bool: "yes",
+ });
+ } catch (error) {
+ const issues = (error as z.ZodError).issues;
+
+ expect(issues.length).toEqual(3);
+ expect(issues[0].message).toMatch("string");
+ expect(issues[1].message).toMatch("literal");
+ expect(issues[2].message).toMatch("boolean");
+ }
+});
+
+test("catch error", () => {
+ let catchError: z.ZodError | undefined = undefined;
+
+ const schema = z.object({
+ age: z.number(),
+ name: z.string().catch((ctx) => {
+ catchError = ctx.error;
+
+ return "John Doe";
+ }),
+ });
+
+ const result = schema.safeParse({
+ age: null,
+ name: null,
+ });
+
+ expect(result.success).toEqual(false);
+ expect(!result.success && result.error.issues.length).toEqual(1);
+ expect(!result.success && result.error.issues[0].message).toMatch("number");
+
+ expect(catchError).toBeInstanceOf(z.ZodError);
+ expect(catchError !== undefined && (catchError as z.ZodError).issues.length).toEqual(1);
+ expect(catchError !== undefined && (catchError as z.ZodError).issues[0].message).toMatch("string");
+});
+
+test("ctx.input", () => {
+ const schema = z.string().catch((ctx) => {
+ return String(ctx.input);
+ });
+
+ expect(schema.parse(123)).toEqual("123");
+});
diff --git a/node_modules/zod/src/v3/tests/coerce.test.ts b/node_modules/zod/src/v3/tests/coerce.test.ts
new file mode 100644
index 0000000..1f53004
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/coerce.test.ts
@@ -0,0 +1,133 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+test("string coercion", () => {
+ const schema = z.coerce.string();
+ expect(schema.parse("sup")).toEqual("sup");
+ expect(schema.parse("")).toEqual("");
+ expect(schema.parse(12)).toEqual("12");
+ expect(schema.parse(0)).toEqual("0");
+ expect(schema.parse(-12)).toEqual("-12");
+ expect(schema.parse(3.14)).toEqual("3.14");
+ expect(schema.parse(BigInt(15))).toEqual("15");
+ expect(schema.parse(Number.NaN)).toEqual("NaN");
+ expect(schema.parse(Number.POSITIVE_INFINITY)).toEqual("Infinity");
+ expect(schema.parse(Number.NEGATIVE_INFINITY)).toEqual("-Infinity");
+ expect(schema.parse(true)).toEqual("true");
+ expect(schema.parse(false)).toEqual("false");
+ expect(schema.parse(null)).toEqual("null");
+ expect(schema.parse(undefined)).toEqual("undefined");
+ expect(schema.parse({ hello: "world!" })).toEqual("[object Object]");
+ expect(schema.parse(["item", "another_item"])).toEqual("item,another_item");
+ expect(schema.parse([])).toEqual("");
+ expect(schema.parse(new Date("2022-01-01T00:00:00.000Z"))).toEqual(new Date("2022-01-01T00:00:00.000Z").toString());
+});
+
+test("number coercion", () => {
+ const schema = z.coerce.number();
+ expect(schema.parse("12")).toEqual(12);
+ expect(schema.parse("0")).toEqual(0);
+ expect(schema.parse("-12")).toEqual(-12);
+ expect(schema.parse("3.14")).toEqual(3.14);
+ expect(schema.parse("")).toEqual(0);
+ expect(() => schema.parse("NOT_A_NUMBER")).toThrow(); // z.ZodError
+ expect(schema.parse(12)).toEqual(12);
+ expect(schema.parse(0)).toEqual(0);
+ expect(schema.parse(-12)).toEqual(-12);
+ expect(schema.parse(3.14)).toEqual(3.14);
+ expect(schema.parse(BigInt(15))).toEqual(15);
+ expect(() => schema.parse(Number.NaN)).toThrow(); // z.ZodError
+ expect(schema.parse(Number.POSITIVE_INFINITY)).toEqual(Number.POSITIVE_INFINITY);
+ expect(schema.parse(Number.NEGATIVE_INFINITY)).toEqual(Number.NEGATIVE_INFINITY);
+ expect(schema.parse(true)).toEqual(1);
+ expect(schema.parse(false)).toEqual(0);
+ expect(schema.parse(null)).toEqual(0);
+ expect(() => schema.parse(undefined)).toThrow(); // z.ZodError
+ expect(() => schema.parse({ hello: "world!" })).toThrow(); // z.ZodError
+ expect(() => schema.parse(["item", "another_item"])).toThrow(); // z.ZodError
+ expect(schema.parse([])).toEqual(0);
+ expect(schema.parse(new Date(1670139203496))).toEqual(1670139203496);
+});
+
+test("boolean coercion", () => {
+ const schema = z.coerce.boolean();
+ expect(schema.parse("true")).toEqual(true);
+ expect(schema.parse("false")).toEqual(true);
+ expect(schema.parse("0")).toEqual(true);
+ expect(schema.parse("1")).toEqual(true);
+ expect(schema.parse("")).toEqual(false);
+ expect(schema.parse(1)).toEqual(true);
+ expect(schema.parse(0)).toEqual(false);
+ expect(schema.parse(-1)).toEqual(true);
+ expect(schema.parse(3.14)).toEqual(true);
+ expect(schema.parse(BigInt(15))).toEqual(true);
+ expect(schema.parse(Number.NaN)).toEqual(false);
+ expect(schema.parse(Number.POSITIVE_INFINITY)).toEqual(true);
+ expect(schema.parse(Number.NEGATIVE_INFINITY)).toEqual(true);
+ expect(schema.parse(true)).toEqual(true);
+ expect(schema.parse(false)).toEqual(false);
+ expect(schema.parse(null)).toEqual(false);
+ expect(schema.parse(undefined)).toEqual(false);
+ expect(schema.parse({ hello: "world!" })).toEqual(true);
+ expect(schema.parse(["item", "another_item"])).toEqual(true);
+ expect(schema.parse([])).toEqual(true);
+ expect(schema.parse(new Date(1670139203496))).toEqual(true);
+});
+
+test("bigint coercion", () => {
+ const schema = z.coerce.bigint();
+ expect(schema.parse("5")).toEqual(BigInt(5));
+ expect(schema.parse("0")).toEqual(BigInt(0));
+ expect(schema.parse("-5")).toEqual(BigInt(-5));
+ expect(() => schema.parse("3.14")).toThrow(); // not a z.ZodError!
+ expect(schema.parse("")).toEqual(BigInt(0));
+ expect(() => schema.parse("NOT_A_NUMBER")).toThrow(); // not a z.ZodError!
+ expect(schema.parse(5)).toEqual(BigInt(5));
+ expect(schema.parse(0)).toEqual(BigInt(0));
+ expect(schema.parse(-5)).toEqual(BigInt(-5));
+ expect(() => schema.parse(3.14)).toThrow(); // not a z.ZodError!
+ expect(schema.parse(BigInt(5))).toEqual(BigInt(5));
+ expect(() => schema.parse(Number.NaN)).toThrow(); // not a z.ZodError!
+ expect(() => schema.parse(Number.POSITIVE_INFINITY)).toThrow(); // not a z.ZodError!
+ expect(() => schema.parse(Number.NEGATIVE_INFINITY)).toThrow(); // not a z.ZodError!
+ expect(schema.parse(true)).toEqual(BigInt(1));
+ expect(schema.parse(false)).toEqual(BigInt(0));
+ expect(() => schema.parse(null)).toThrow(); // not a z.ZodError!
+ expect(() => schema.parse(undefined)).toThrow(); // not a z.ZodError!
+ expect(() => schema.parse({ hello: "world!" })).toThrow(); // not a z.ZodError!
+ expect(() => schema.parse(["item", "another_item"])).toThrow(); // not a z.ZodError!
+ expect(schema.parse([])).toEqual(BigInt(0));
+ expect(schema.parse(new Date(1670139203496))).toEqual(BigInt(1670139203496));
+});
+
+test("date coercion", () => {
+ const schema = z.coerce.date();
+ expect(schema.parse(new Date().toDateString())).toBeInstanceOf(Date);
+ expect(schema.parse(new Date().toISOString())).toBeInstanceOf(Date);
+ expect(schema.parse(new Date().toUTCString())).toBeInstanceOf(Date);
+ expect(schema.parse("5")).toBeInstanceOf(Date);
+ expect(schema.parse("2000-01-01")).toBeInstanceOf(Date);
+ // expect(schema.parse("0")).toBeInstanceOf(Date);
+ // expect(schema.parse("-5")).toBeInstanceOf(Date);
+ // expect(schema.parse("3.14")).toBeInstanceOf(Date);
+ expect(() => schema.parse("")).toThrow(); // z.ZodError
+ expect(() => schema.parse("NOT_A_DATE")).toThrow(); // z.ZodError
+ expect(schema.parse(5)).toBeInstanceOf(Date);
+ expect(schema.parse(0)).toBeInstanceOf(Date);
+ expect(schema.parse(-5)).toBeInstanceOf(Date);
+ expect(schema.parse(3.14)).toBeInstanceOf(Date);
+ expect(() => schema.parse(BigInt(5))).toThrow(); // not a z.ZodError!
+ expect(() => schema.parse(Number.NaN)).toThrow(); // z.ZodError
+ expect(() => schema.parse(Number.POSITIVE_INFINITY)).toThrow(); // z.ZodError
+ expect(() => schema.parse(Number.NEGATIVE_INFINITY)).toThrow(); // z.ZodError
+ expect(schema.parse(true)).toBeInstanceOf(Date);
+ expect(schema.parse(false)).toBeInstanceOf(Date);
+ expect(schema.parse(null)).toBeInstanceOf(Date);
+ expect(() => schema.parse(undefined)).toThrow(); // z.ZodError
+ expect(() => schema.parse({ hello: "world!" })).toThrow(); // z.ZodError
+ expect(() => schema.parse(["item", "another_item"])).toThrow(); // z.ZodError
+ expect(() => schema.parse([])).toThrow(); // z.ZodError
+ expect(schema.parse(new Date())).toBeInstanceOf(Date);
+});
diff --git a/node_modules/zod/src/v3/tests/complex.test.ts b/node_modules/zod/src/v3/tests/complex.test.ts
new file mode 100644
index 0000000..7807b2b
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/complex.test.ts
@@ -0,0 +1,56 @@
+import { test } from "vitest";
+import * as z from "zod/v3";
+
+const crazySchema = z.object({
+ tuple: z.tuple([
+ z.string().nullable().optional(),
+ z.number().nullable().optional(),
+ z.boolean().nullable().optional(),
+ z.null().nullable().optional(),
+ z.undefined().nullable().optional(),
+ z.literal("1234").nullable().optional(),
+ ]),
+ merged: z
+ .object({
+ k1: z.string().optional(),
+ })
+ .merge(z.object({ k1: z.string().nullable(), k2: z.number() })),
+ union: z.array(z.union([z.literal("asdf"), z.literal(12)])).nonempty(),
+ array: z.array(z.number()),
+ // sumTransformer: z.transformer(z.array(z.number()), z.number(), (arg) => {
+ // return arg.reduce((a, b) => a + b, 0);
+ // }),
+ sumMinLength: z.array(z.number()).refine((arg) => arg.length > 5),
+ intersection: z.intersection(z.object({ p1: z.string().optional() }), z.object({ p1: z.number().optional() })),
+ enum: z.intersection(z.enum(["zero", "one"]), z.enum(["one", "two"])),
+ nonstrict: z.object({ points: z.number() }).nonstrict(),
+ numProm: z.promise(z.number()),
+ lenfun: z.function(z.tuple([z.string()]), z.boolean()),
+});
+
+// const asyncCrazySchema = crazySchema.extend({
+// // async_transform: z.transformer(
+// // z.array(z.number()),
+// // z.number(),
+// // async (arg) => {
+// // return arg.reduce((a, b) => a + b, 0);
+// // }
+// // ),
+// async_refine: z.array(z.number()).refine(async (arg) => arg.length > 5),
+// });
+
+test("parse", () => {
+ crazySchema.parse({
+ tuple: ["asdf", 1234, true, null, undefined, "1234"],
+ merged: { k1: "asdf", k2: 12 },
+ union: ["asdf", 12, "asdf", 12, "asdf", 12],
+ array: [12, 15, 16],
+ // sumTransformer: [12, 15, 16],
+ sumMinLength: [12, 15, 16, 98, 24, 63],
+ intersection: {},
+ enum: "one",
+ nonstrict: { points: 1234 },
+ numProm: Promise.resolve(12),
+ lenfun: (x: string) => x.length,
+ });
+});
diff --git a/node_modules/zod/src/v3/tests/custom.test.ts b/node_modules/zod/src/v3/tests/custom.test.ts
new file mode 100644
index 0000000..b24b676
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/custom.test.ts
@@ -0,0 +1,31 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+test("passing validations", () => {
+ const example1 = z.custom((x) => typeof x === "number");
+ example1.parse(1234);
+ expect(() => example1.parse({})).toThrow();
+});
+
+test("string params", () => {
+ const example1 = z.custom((x) => typeof x !== "number", "customerr");
+ const result = example1.safeParse(1234);
+ expect(result.success).toEqual(false);
+ // @ts-ignore
+ expect(JSON.stringify(result.error).includes("customerr")).toEqual(true);
+});
+
+test("async validations", async () => {
+ const example1 = z.custom(async (x) => {
+ return typeof x === "number";
+ });
+ const r1 = await example1.safeParseAsync(1234);
+ expect(r1.success).toEqual(true);
+ expect(r1.data).toEqual(1234);
+
+ const r2 = await example1.safeParseAsync("asdf");
+ expect(r2.success).toEqual(false);
+ expect(r2.error!.issues.length).toEqual(1);
+});
diff --git a/node_modules/zod/src/v3/tests/date.test.ts b/node_modules/zod/src/v3/tests/date.test.ts
new file mode 100644
index 0000000..c86dc84
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/date.test.ts
@@ -0,0 +1,32 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+const beforeBenchmarkDate = new Date(2022, 10, 4);
+const benchmarkDate = new Date(2022, 10, 5);
+const afterBenchmarkDate = new Date(2022, 10, 6);
+
+const minCheck = z.date().min(benchmarkDate);
+const maxCheck = z.date().max(benchmarkDate);
+
+test("passing validations", () => {
+ minCheck.parse(benchmarkDate);
+ minCheck.parse(afterBenchmarkDate);
+
+ maxCheck.parse(benchmarkDate);
+ maxCheck.parse(beforeBenchmarkDate);
+});
+
+test("failing validations", () => {
+ expect(() => minCheck.parse(beforeBenchmarkDate)).toThrow();
+ expect(() => maxCheck.parse(afterBenchmarkDate)).toThrow();
+});
+
+test("min max getters", () => {
+ expect(minCheck.minDate).toEqual(benchmarkDate);
+ expect(minCheck.min(afterBenchmarkDate).minDate).toEqual(afterBenchmarkDate);
+
+ expect(maxCheck.maxDate).toEqual(benchmarkDate);
+ expect(maxCheck.max(beforeBenchmarkDate).maxDate).toEqual(beforeBenchmarkDate);
+});
diff --git a/node_modules/zod/src/v3/tests/deepmasking.test.ts b/node_modules/zod/src/v3/tests/deepmasking.test.ts
new file mode 100644
index 0000000..d707e79
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/deepmasking.test.ts
@@ -0,0 +1,186 @@
+// @ts-ignore TS6133
+import { test } from "vitest";
+
+import * as z from "zod/v3";
+
+test("test", () => {
+ z;
+});
+
+// const fish = z.object({
+// name: z.string(),
+// props: z.object({
+// color: z.string(),
+// numScales: z.number(),
+// }),
+// });
+
+// const nonStrict = z
+// .object({
+// name: z.string(),
+// color: z.string(),
+// })
+// .nonstrict();
+
+// test('object pick type', () => {
+// const modNonStrictFish = nonStrict.omit({ name: true });
+// modNonStrictFish.parse({ color: 'asdf' });
+
+// const bad1 = () => fish.pick({ props: { unknown: true } } as any);
+// const bad2 = () => fish.omit({ name: true, props: { unknown: true } } as any);
+
+// expect(bad1).toThrow();
+// expect(bad2).toThrow();
+// });
+
+// test('f1', () => {
+// const f1 = fish.pick(true);
+// f1.parse({ name: 'a', props: { color: 'b', numScales: 3 } });
+// });
+// test('f2', () => {
+// const f2 = fish.pick({ props: true });
+// f2.parse({ props: { color: 'asdf', numScales: 1 } });
+// const badcheck2 = () => f2.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
+// expect(badcheck2).toThrow();
+// });
+// test('f3', () => {
+// const f3 = fish.pick({ props: { color: true } });
+// f3.parse({ props: { color: 'b' } });
+// const badcheck3 = () => f3.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
+// expect(badcheck3).toThrow();
+// });
+// test('f4', () => {
+// const badcheck4 = () => fish.pick({ props: { color: true, unknown: true } });
+// expect(badcheck4).toThrow();
+// });
+// test('f6', () => {
+// const f6 = fish.omit({ props: true });
+// const badcheck6 = () => f6.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
+// f6.parse({ name: 'adsf' });
+// expect(badcheck6).toThrow();
+// });
+// test('f7', () => {
+// const f7 = fish.omit({ props: { color: true } });
+// f7.parse({ name: 'a', props: { numScales: 3 } });
+// const badcheck7 = () => f7.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
+// expect(badcheck7).toThrow();
+// });
+// test('f8', () => {
+// const badcheck8 = () => fish.omit({ props: { color: true, unknown: true } });
+// expect(badcheck8).toThrow();
+// });
+// test('f9', () => {
+// const f9 = nonStrict.pick(true);
+// f9.parse({ name: 'a', color: 'asdf' });
+// });
+// test('f10', () => {
+// const f10 = nonStrict.pick({ name: true });
+// f10.parse({ name: 'a' });
+// const val = f10.parse({ name: 'a', color: 'b' });
+// expect(val).toEqual({ name: 'a' });
+// });
+// test('f12', () => {
+// const badfcheck12 = () => nonStrict.omit({ color: true, asdf: true });
+// expect(badfcheck12).toThrow();
+// });
+
+// test('array masking', () => {
+// const fishArray = z.array(fish);
+// const modFishArray = fishArray.pick({
+// name: true,
+// props: {
+// numScales: true,
+// },
+// });
+
+// modFishArray.parse([{ name: 'fish', props: { numScales: 12 } }]);
+// const bad1 = () => modFishArray.parse([{ name: 'fish', props: { numScales: 12, color: 'asdf' } }] as any);
+// expect(bad1).toThrow();
+// });
+
+// test('array masking', () => {
+// const fishArray = z.array(fish);
+// const fail = () =>
+// fishArray.pick({
+// name: true,
+// props: {
+// whatever: true,
+// },
+// } as any);
+// expect(fail).toThrow();
+// });
+
+// test('array masking', () => {
+// const fishArray = z.array(fish);
+// const fail = () =>
+// fishArray.omit({
+// whateve: true,
+// } as any);
+// expect(fail).toThrow();
+// });
+
+// test('array masking', () => {
+// const fishArray = z.array(fish);
+// const modFishList = fishArray.omit({
+// name: true,
+// props: {
+// color: true,
+// },
+// });
+
+// modFishList.parse([{ props: { numScales: 12 } }]);
+// const fail = () => modFishList.parse([{ name: 'hello', props: { numScales: 12 } }] as any);
+// expect(fail).toThrow();
+// });
+
+// test('primitive array masking', () => {
+// const fishArray = z.array(z.number());
+// const fail = () => fishArray.pick({} as any);
+// expect(fail).toThrow();
+// });
+
+// test('other array masking', () => {
+// const fishArray = z.array(z.array(z.number()));
+// const fail = () => fishArray.pick({} as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #1', () => {
+// const fail = () => fish.pick(1 as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #2', () => {
+// const fail = () => fish.pick([] as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #3', () => {
+// const fail = () => fish.pick(false as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #4', () => {
+// const fail = () => fish.pick('asdf' as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #5', () => {
+// const fail = () => fish.omit(1 as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #6', () => {
+// const fail = () => fish.omit([] as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #7', () => {
+// const fail = () => fish.omit(false as any);
+// expect(fail).toThrow();
+// });
+
+// test('invalid mask #8', () => {
+// const fail = () => fish.omit('asdf' as any);
+// expect(fail).toThrow();
+// });
diff --git a/node_modules/zod/src/v3/tests/default.test.ts b/node_modules/zod/src/v3/tests/default.test.ts
new file mode 100644
index 0000000..29e007c
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/default.test.ts
@@ -0,0 +1,112 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import { z } from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("basic defaults", () => {
+ expect(z.string().default("default").parse(undefined)).toBe("default");
+});
+
+test("default with transform", () => {
+ const stringWithDefault = z
+ .string()
+ .transform((val) => val.toUpperCase())
+ .default("default");
+ expect(stringWithDefault.parse(undefined)).toBe("DEFAULT");
+ expect(stringWithDefault).toBeInstanceOf(z.ZodDefault);
+ expect(stringWithDefault._def.innerType).toBeInstanceOf(z.ZodEffects);
+ expect(stringWithDefault._def.innerType._def.schema).toBeInstanceOf(z.ZodSchema);
+
+ type inp = z.input;
+ util.assertEqual(true);
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("default on existing optional", () => {
+ const stringWithDefault = z.string().optional().default("asdf");
+ expect(stringWithDefault.parse(undefined)).toBe("asdf");
+ expect(stringWithDefault).toBeInstanceOf(z.ZodDefault);
+ expect(stringWithDefault._def.innerType).toBeInstanceOf(z.ZodOptional);
+ expect(stringWithDefault._def.innerType._def.innerType).toBeInstanceOf(z.ZodString);
+
+ type inp = z.input;
+ util.assertEqual(true);
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("optional on default", () => {
+ const stringWithDefault = z.string().default("asdf").optional();
+
+ type inp = z.input;
+ util.assertEqual(true);
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("complex chain example", () => {
+ const complex = z
+ .string()
+ .default("asdf")
+ .transform((val) => val.toUpperCase())
+ .default("qwer")
+ .removeDefault()
+ .optional()
+ .default("asdfasdf");
+
+ expect(complex.parse(undefined)).toBe("ASDFASDF");
+});
+
+test("removeDefault", () => {
+ const stringWithRemovedDefault = z.string().default("asdf").removeDefault();
+
+ type out = z.output;
+ util.assertEqual(true);
+});
+
+test("nested", () => {
+ const inner = z.string().default("asdf");
+ const outer = z.object({ inner }).default({
+ inner: undefined,
+ });
+ type input = z.input;
+ util.assertEqual (true);
+ type out = z.output;
+ util.assertEqual(true);
+ expect(outer.parse(undefined)).toEqual({ inner: "asdf" });
+ expect(outer.parse({})).toEqual({ inner: "asdf" });
+ expect(outer.parse({ inner: undefined })).toEqual({ inner: "asdf" });
+});
+
+test("chained defaults", () => {
+ const stringWithDefault = z.string().default("inner").default("outer");
+ const result = stringWithDefault.parse(undefined);
+ expect(result).toEqual("outer");
+});
+
+test("factory", () => {
+ expect(z.ZodDefault.create(z.string(), { default: "asdf" }).parse(undefined)).toEqual("asdf");
+});
+
+test("native enum", () => {
+ enum Fruits {
+ apple = "apple",
+ orange = "orange",
+ }
+
+ const schema = z.object({
+ fruit: z.nativeEnum(Fruits).default(Fruits.apple),
+ });
+
+ expect(schema.parse({})).toEqual({ fruit: Fruits.apple });
+});
+
+test("enum", () => {
+ const schema = z.object({
+ fruit: z.enum(["apple", "orange"]).default("apple"),
+ });
+
+ expect(schema.parse({})).toEqual({ fruit: "apple" });
+});
diff --git a/node_modules/zod/src/v3/tests/description.test.ts b/node_modules/zod/src/v3/tests/description.test.ts
new file mode 100644
index 0000000..1edaa1c
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/description.test.ts
@@ -0,0 +1,33 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+const description = "a description";
+
+test("passing `description` to schema should add a description", () => {
+ expect(z.string({ description }).description).toEqual(description);
+ expect(z.number({ description }).description).toEqual(description);
+ expect(z.boolean({ description }).description).toEqual(description);
+});
+
+test("`.describe` should add a description", () => {
+ expect(z.string().describe(description).description).toEqual(description);
+ expect(z.number().describe(description).description).toEqual(description);
+ expect(z.boolean().describe(description).description).toEqual(description);
+});
+
+test("description should carry over to chained schemas", () => {
+ const schema = z.string({ description });
+ expect(schema.description).toEqual(description);
+ expect(schema.optional().description).toEqual(description);
+ expect(schema.optional().nullable().default("default").description).toEqual(description);
+});
+
+test("description should not carry over to chained array schema", () => {
+ const schema = z.string().describe(description);
+
+ expect(schema.description).toEqual(description);
+ expect(schema.array().description).toEqual(undefined);
+ expect(z.array(schema).description).toEqual(undefined);
+});
diff --git a/node_modules/zod/src/v3/tests/discriminated-unions.test.ts b/node_modules/zod/src/v3/tests/discriminated-unions.test.ts
new file mode 100644
index 0000000..7fb5cfe
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/discriminated-unions.test.ts
@@ -0,0 +1,315 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+test("valid", () => {
+ expect(
+ z
+ .discriminatedUnion("type", [
+ z.object({ type: z.literal("a"), a: z.string() }),
+ z.object({ type: z.literal("b"), b: z.string() }),
+ ])
+ .parse({ type: "a", a: "abc" })
+ ).toEqual({ type: "a", a: "abc" });
+});
+
+test("valid - discriminator value of various primitive types", () => {
+ const schema = z.discriminatedUnion("type", [
+ z.object({ type: z.literal("1"), val: z.literal(1) }),
+ z.object({ type: z.literal(1), val: z.literal(2) }),
+ z.object({ type: z.literal(BigInt(1)), val: z.literal(3) }),
+ z.object({ type: z.literal("true"), val: z.literal(4) }),
+ z.object({ type: z.literal(true), val: z.literal(5) }),
+ z.object({ type: z.literal("null"), val: z.literal(6) }),
+ z.object({ type: z.literal(null), val: z.literal(7) }),
+ z.object({ type: z.literal("undefined"), val: z.literal(8) }),
+ z.object({ type: z.literal(undefined), val: z.literal(9) }),
+ z.object({ type: z.literal("transform"), val: z.literal(10) }),
+ z.object({ type: z.literal("refine"), val: z.literal(11) }),
+ z.object({ type: z.literal("superRefine"), val: z.literal(12) }),
+ ]);
+
+ expect(schema.parse({ type: "1", val: 1 })).toEqual({ type: "1", val: 1 });
+ expect(schema.parse({ type: 1, val: 2 })).toEqual({ type: 1, val: 2 });
+ expect(schema.parse({ type: BigInt(1), val: 3 })).toEqual({
+ type: BigInt(1),
+ val: 3,
+ });
+ expect(schema.parse({ type: "true", val: 4 })).toEqual({
+ type: "true",
+ val: 4,
+ });
+ expect(schema.parse({ type: true, val: 5 })).toEqual({
+ type: true,
+ val: 5,
+ });
+ expect(schema.parse({ type: "null", val: 6 })).toEqual({
+ type: "null",
+ val: 6,
+ });
+ expect(schema.parse({ type: null, val: 7 })).toEqual({
+ type: null,
+ val: 7,
+ });
+ expect(schema.parse({ type: "undefined", val: 8 })).toEqual({
+ type: "undefined",
+ val: 8,
+ });
+ expect(schema.parse({ type: undefined, val: 9 })).toEqual({
+ type: undefined,
+ val: 9,
+ });
+});
+
+test("invalid - null", () => {
+ try {
+ z.discriminatedUnion("type", [
+ z.object({ type: z.literal("a"), a: z.string() }),
+ z.object({ type: z.literal("b"), b: z.string() }),
+ ]).parse(null);
+ throw new Error();
+ } catch (e: any) {
+ expect(JSON.parse(e.message)).toEqual([
+ {
+ code: z.ZodIssueCode.invalid_type,
+ expected: z.ZodParsedType.object,
+ message: "Expected object, received null",
+ received: z.ZodParsedType.null,
+ path: [],
+ },
+ ]);
+ }
+});
+
+test("invalid discriminator value", () => {
+ try {
+ z.discriminatedUnion("type", [
+ z.object({ type: z.literal("a"), a: z.string() }),
+ z.object({ type: z.literal("b"), b: z.string() }),
+ ]).parse({ type: "x", a: "abc" });
+ throw new Error();
+ } catch (e: any) {
+ expect(JSON.parse(e.message)).toEqual([
+ {
+ code: z.ZodIssueCode.invalid_union_discriminator,
+ options: ["a", "b"],
+ message: "Invalid discriminator value. Expected 'a' | 'b'",
+ path: ["type"],
+ },
+ ]);
+ }
+});
+
+test("valid discriminator value, invalid data", () => {
+ try {
+ z.discriminatedUnion("type", [
+ z.object({ type: z.literal("a"), a: z.string() }),
+ z.object({ type: z.literal("b"), b: z.string() }),
+ ]).parse({ type: "a", b: "abc" });
+ throw new Error();
+ } catch (e: any) {
+ expect(JSON.parse(e.message)).toEqual([
+ {
+ code: z.ZodIssueCode.invalid_type,
+ expected: z.ZodParsedType.string,
+ message: "Required",
+ path: ["a"],
+ received: z.ZodParsedType.undefined,
+ },
+ ]);
+ }
+});
+
+test("wrong schema - missing discriminator", () => {
+ try {
+ z.discriminatedUnion("type", [
+ z.object({ type: z.literal("a"), a: z.string() }),
+ z.object({ b: z.string() }) as any,
+ ]);
+ throw new Error();
+ } catch (e: any) {
+ expect(e.message.includes("could not be extracted")).toBe(true);
+ }
+});
+
+test("wrong schema - duplicate discriminator values", () => {
+ try {
+ z.discriminatedUnion("type", [
+ z.object({ type: z.literal("a"), a: z.string() }),
+ z.object({ type: z.literal("a"), b: z.string() }),
+ ]);
+ throw new Error();
+ } catch (e: any) {
+ expect(e.message.includes("has duplicate value")).toEqual(true);
+ }
+});
+
+test("async - valid", async () => {
+ expect(
+ await z
+ .discriminatedUnion("type", [
+ z.object({
+ type: z.literal("a"),
+ a: z
+ .string()
+ .refine(async () => true)
+ .transform(async (val) => Number(val)),
+ }),
+ z.object({
+ type: z.literal("b"),
+ b: z.string(),
+ }),
+ ])
+ .parseAsync({ type: "a", a: "1" })
+ ).toEqual({ type: "a", a: 1 });
+});
+
+test("async - invalid", async () => {
+ try {
+ await z
+ .discriminatedUnion("type", [
+ z.object({
+ type: z.literal("a"),
+ a: z
+ .string()
+ .refine(async () => true)
+ .transform(async (val) => val),
+ }),
+ z.object({
+ type: z.literal("b"),
+ b: z.string(),
+ }),
+ ])
+ .parseAsync({ type: "a", a: 1 });
+ throw new Error();
+ } catch (e: any) {
+ expect(JSON.parse(e.message)).toEqual([
+ {
+ code: "invalid_type",
+ expected: "string",
+ received: "number",
+ path: ["a"],
+ message: "Expected string, received number",
+ },
+ ]);
+ }
+});
+
+test("valid - literals with .default or .preprocess", () => {
+ const schema = z.discriminatedUnion("type", [
+ z.object({
+ type: z.literal("foo").default("foo"),
+ a: z.string(),
+ }),
+ z.object({
+ type: z.literal("custom"),
+ method: z.string(),
+ }),
+ z.object({
+ type: z.preprocess((val) => String(val), z.literal("bar")),
+ c: z.string(),
+ }),
+ ]);
+ expect(schema.parse({ type: "foo", a: "foo" })).toEqual({
+ type: "foo",
+ a: "foo",
+ });
+});
+
+test("enum and nativeEnum", () => {
+ enum MyEnum {
+ d = 0,
+ e = "e",
+ }
+
+ const schema = z.discriminatedUnion("key", [
+ z.object({
+ key: z.literal("a"),
+ // Add other properties specific to this option
+ }),
+ z.object({
+ key: z.enum(["b", "c"]),
+ // Add other properties specific to this option
+ }),
+ z.object({
+ key: z.nativeEnum(MyEnum),
+ // Add other properties specific to this option
+ }),
+ ]);
+
+ // type schema = z.infer;
+
+ schema.parse({ key: "a" });
+ schema.parse({ key: "b" });
+ schema.parse({ key: "c" });
+ schema.parse({ key: MyEnum.d });
+ schema.parse({ key: MyEnum.e });
+ schema.parse({ key: "e" });
+});
+
+test("branded", () => {
+ const schema = z.discriminatedUnion("key", [
+ z.object({
+ key: z.literal("a"),
+ // Add other properties specific to this option
+ }),
+ z.object({
+ key: z.literal("b").brand("asdfaf"),
+ // Add other properties specific to this option
+ }),
+ ]);
+
+ // type schema = z.infer;
+
+ schema.parse({ key: "a" });
+ schema.parse({ key: "b" });
+ expect(() => {
+ schema.parse({ key: "c" });
+ }).toThrow();
+});
+
+test("optional and nullable", () => {
+ const schema = z.discriminatedUnion("key", [
+ z.object({
+ key: z.literal("a").optional(),
+ a: z.literal(true),
+ }),
+ z.object({
+ key: z.literal("b").nullable(),
+ b: z.literal(true),
+ // Add other properties specific to this option
+ }),
+ ]);
+
+ type schema = z.infer;
+ z.util.assertEqual(true);
+
+ schema.parse({ key: "a", a: true });
+ schema.parse({ key: undefined, a: true });
+ schema.parse({ key: "b", b: true });
+ schema.parse({ key: null, b: true });
+ expect(() => {
+ schema.parse({ key: null, a: true });
+ }).toThrow();
+ expect(() => {
+ schema.parse({ key: "b", a: true });
+ }).toThrow();
+
+ const value = schema.parse({ key: null, b: true });
+
+ if (!("key" in value)) value.a;
+ if (value.key === undefined) value.a;
+ if (value.key === "a") value.a;
+ if (value.key === "b") value.b;
+ if (value.key === null) value.b;
+});
+
+test("readonly array of options", () => {
+ const options = [
+ z.object({ type: z.literal("x"), val: z.literal(1) }),
+ z.object({ type: z.literal("y"), val: z.literal(2) }),
+ ] as const;
+
+ expect(z.discriminatedUnion("type", options).parse({ type: "x", val: 1 })).toEqual({ type: "x", val: 1 });
+});
diff --git a/node_modules/zod/src/v3/tests/enum.test.ts b/node_modules/zod/src/v3/tests/enum.test.ts
new file mode 100644
index 0000000..53f4a3e
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/enum.test.ts
@@ -0,0 +1,80 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("create enum", () => {
+ const MyEnum = z.enum(["Red", "Green", "Blue"]);
+ expect(MyEnum.Values.Red).toEqual("Red");
+ expect(MyEnum.Enum.Red).toEqual("Red");
+ expect(MyEnum.enum.Red).toEqual("Red");
+});
+
+test("infer enum", () => {
+ const MyEnum = z.enum(["Red", "Green", "Blue"]);
+ type MyEnum = z.infer;
+ util.assertEqual(true);
+});
+
+test("get options", () => {
+ expect(z.enum(["tuna", "trout"]).options).toEqual(["tuna", "trout"]);
+});
+
+test("readonly enum", () => {
+ const HTTP_SUCCESS = ["200", "201"] as const;
+ const arg = z.enum(HTTP_SUCCESS);
+ type arg = z.infer;
+ util.assertEqual(true);
+
+ arg.parse("201");
+ expect(() => arg.parse("202")).toThrow();
+});
+
+test("error params", () => {
+ const result = z.enum(["test"], { required_error: "REQUIRED" }).safeParse(undefined);
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues[0].message).toEqual("REQUIRED");
+ }
+});
+
+test("extract/exclude", () => {
+ const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
+ const FoodEnum = z.enum(foods);
+ const ItalianEnum = FoodEnum.extract(["Pasta", "Pizza"]);
+ const UnhealthyEnum = FoodEnum.exclude(["Salad"]);
+ const EmptyFoodEnum = FoodEnum.exclude(foods);
+
+ util.assertEqual, "Pasta" | "Pizza">(true);
+ util.assertEqual, "Pasta" | "Pizza" | "Tacos" | "Burgers">(true);
+ // @ts-expect-error TS2344
+ util.assertEqual>(true);
+ util.assertEqual, never>(true);
+});
+
+test("error map in extract/exclude", () => {
+ const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
+ const FoodEnum = z.enum(foods, {
+ errorMap: () => ({ message: "This is not food!" }),
+ });
+ const ItalianEnum = FoodEnum.extract(["Pasta", "Pizza"]);
+ const foodsError = FoodEnum.safeParse("Cucumbers");
+ const italianError = ItalianEnum.safeParse("Tacos");
+ if (!foodsError.success && !italianError.success) {
+ expect(foodsError.error.issues[0].message).toEqual(italianError.error.issues[0].message);
+ }
+
+ const UnhealthyEnum = FoodEnum.exclude(["Salad"], {
+ errorMap: () => ({ message: "This is not healthy food!" }),
+ });
+ const unhealthyError = UnhealthyEnum.safeParse("Salad");
+ if (!unhealthyError.success) {
+ expect(unhealthyError.error.issues[0].message).toEqual("This is not healthy food!");
+ }
+});
+
+test("readonly in ZodEnumDef", () => {
+ let _t!: z.ZodEnumDef;
+ _t;
+});
diff --git a/node_modules/zod/src/v3/tests/error.test.ts b/node_modules/zod/src/v3/tests/error.test.ts
new file mode 100644
index 0000000..5caaa6d
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/error.test.ts
@@ -0,0 +1,551 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { ZodError, ZodIssueCode } from "../ZodError.js";
+import { ZodParsedType } from "../helpers/util.js";
+
+test("error creation", () => {
+ const err1 = ZodError.create([]);
+ err1.addIssue({
+ code: ZodIssueCode.invalid_type,
+ expected: ZodParsedType.object,
+ received: ZodParsedType.string,
+ path: [],
+ message: "",
+ fatal: true,
+ });
+ err1.isEmpty;
+
+ const err2 = ZodError.create(err1.issues);
+ const err3 = new ZodError([]);
+ err3.addIssues(err1.issues);
+ err3.addIssue(err1.issues[0]);
+ err1.message;
+ err2.message;
+ err3.message;
+});
+
+const errorMap: z.ZodErrorMap = (error, ctx) => {
+ if (error.code === ZodIssueCode.invalid_type) {
+ if (error.expected === "string") {
+ return { message: "bad type!" };
+ }
+ }
+ if (error.code === ZodIssueCode.custom) {
+ return { message: `less-than-${error.params?.minimum}` };
+ }
+ return { message: ctx.defaultError };
+};
+
+test("type error with custom error map", () => {
+ try {
+ z.string().parse(234, { errorMap });
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+
+ expect(zerr.issues[0].code).toEqual(z.ZodIssueCode.invalid_type);
+ expect(zerr.issues[0].message).toEqual(`bad type!`);
+ }
+});
+
+test("refinement fail with params", () => {
+ try {
+ z.number()
+ .refine((val) => val >= 3, {
+ params: { minimum: 3 },
+ })
+ .parse(2, { errorMap });
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues[0].code).toEqual(z.ZodIssueCode.custom);
+ expect(zerr.issues[0].message).toEqual(`less-than-3`);
+ }
+});
+
+test("custom error with custom errormap", () => {
+ try {
+ z.string()
+ .refine((val) => val.length > 12, {
+ params: { minimum: 13 },
+ message: "override",
+ })
+ .parse("asdf", { errorMap });
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues[0].message).toEqual("override");
+ }
+});
+
+test("default error message", () => {
+ try {
+ z.number()
+ .refine((x) => x > 3)
+ .parse(2);
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual("Invalid input");
+ }
+});
+
+test("override error in refine", () => {
+ try {
+ z.number()
+ .refine((x) => x > 3, "override")
+ .parse(2);
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual("override");
+ }
+});
+
+test("override error in refinement", () => {
+ try {
+ z.number()
+ .refine((x) => x > 3, {
+ message: "override",
+ })
+ .parse(2);
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual("override");
+ }
+});
+
+test("array minimum", () => {
+ try {
+ z.array(z.string()).min(3, "tooshort").parse(["asdf", "qwer"]);
+ } catch (err) {
+ const zerr: ZodError = err as any;
+ expect(zerr.issues[0].code).toEqual(ZodIssueCode.too_small);
+ expect(zerr.issues[0].message).toEqual("tooshort");
+ }
+ try {
+ z.array(z.string()).min(3).parse(["asdf", "qwer"]);
+ } catch (err) {
+ const zerr: ZodError = err as any;
+ expect(zerr.issues[0].code).toEqual(ZodIssueCode.too_small);
+ expect(zerr.issues[0].message).toEqual(`Array must contain at least 3 element(s)`);
+ }
+});
+
+// implement test for semi-smart union logic that checks for type error on either left or right
+// test("union smart errors", () => {
+// // expect.assertions(2);
+
+// const p1 = z
+// .union([z.string(), z.number().refine((x) => x > 0)])
+// .safeParse(-3.2);
+
+// if (p1.success === true) throw new Error();
+// expect(p1.success).toBe(false);
+// expect(p1.error.issues[0].code).toEqual(ZodIssueCode.custom);
+
+// const p2 = z.union([z.string(), z.number()]).safeParse(false);
+// // .catch(err => expect(err.issues[0].code).toEqual(ZodIssueCode.invalid_union));
+// if (p2.success === true) throw new Error();
+// expect(p2.success).toBe(false);
+// expect(p2.error.issues[0].code).toEqual(ZodIssueCode.invalid_union);
+// });
+
+test("custom path in custom error map", () => {
+ const schema = z.object({
+ items: z.array(z.string()).refine((data) => data.length > 3, {
+ path: ["items-too-few"],
+ }),
+ });
+
+ const errorMap: z.ZodErrorMap = (error) => {
+ expect(error.path.length).toBe(2);
+ return { message: "doesnt matter" };
+ };
+ const result = schema.safeParse({ items: ["first"] }, { errorMap });
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues[0].path).toEqual(["items", "items-too-few"]);
+ }
+});
+
+test("error metadata from value", () => {
+ const dynamicRefine = z.string().refine(
+ (val) => val === val.toUpperCase(),
+ (val) => ({ params: { val } })
+ );
+
+ const result = dynamicRefine.safeParse("asdf");
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ const sub = result.error.issues[0];
+ expect(result.error.issues[0].code).toEqual("custom");
+ if (sub.code === "custom") {
+ expect(sub.params!.val).toEqual("asdf");
+ }
+ }
+});
+
+// test("don't call refine after validation failed", () => {
+// const asdf = z
+// .union([
+// z.number(),
+// z.string().transform(z.number(), (val) => {
+// return parseFloat(val);
+// }),
+// ])
+// .refine((v) => v >= 1);
+
+// expect(() => asdf.safeParse("foo")).not.toThrow();
+// });
+
+test("root level formatting", () => {
+ const schema = z.string().email();
+ const result = schema.safeParse("asdfsdf");
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.format()._errors).toEqual(["Invalid email"]);
+ }
+});
+
+test("custom path", () => {
+ const schema = z
+ .object({
+ password: z.string(),
+ confirm: z.string(),
+ })
+ .refine((val) => val.confirm === val.password, { path: ["confirm"] });
+
+ const result = schema.safeParse({
+ password: "peanuts",
+ confirm: "qeanuts",
+ });
+
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ // nested errors
+ const error = result.error.format();
+ expect(error._errors).toEqual([]);
+ expect(error.password?._errors).toEqual(undefined);
+ expect(error.confirm?._errors).toEqual(["Invalid input"]);
+ }
+});
+
+test("custom path", () => {
+ const schema = z
+ .object({
+ password: z.string().min(6),
+ confirm: z.string().min(6),
+ })
+ .refine((val) => val.confirm === val.password);
+
+ const result = schema.safeParse({
+ password: "qwer",
+ confirm: "asdf",
+ });
+
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues.length).toEqual(3);
+ }
+});
+
+const schema = z.object({
+ inner: z.object({
+ name: z
+ .string()
+ .refine((val) => val.length > 5)
+ .array()
+ .refine((val) => val.length <= 1),
+ }),
+});
+
+test("no abort early on refinements", () => {
+ const invalidItem = {
+ inner: { name: ["aasd", "asdfasdfasfd"] },
+ };
+
+ const result1 = schema.safeParse(invalidItem);
+ expect(result1.success).toEqual(false);
+ if (!result1.success) {
+ expect(result1.error.issues.length).toEqual(2);
+ }
+});
+test("formatting", () => {
+ const invalidItem = {
+ inner: { name: ["aasd", "asdfasdfasfd"] },
+ };
+ const invalidArray = {
+ inner: { name: ["asdfasdf", "asdfasdfasfd"] },
+ };
+ const result1 = schema.safeParse(invalidItem);
+ const result2 = schema.safeParse(invalidArray);
+
+ expect(result1.success).toEqual(false);
+ expect(result2.success).toEqual(false);
+ if (!result1.success) {
+ const error = result1.error.format();
+
+ expect(error._errors).toEqual([]);
+ expect(error.inner?._errors).toEqual([]);
+ // expect(error.inner?.name?._errors).toEqual(["Invalid input"]);
+ // expect(error.inner?.name?.[0]._errors).toEqual(["Invalid input"]);
+ expect(error.inner?.name?.[1]).toEqual(undefined);
+ }
+ if (!result2.success) {
+ type FormattedError = z.inferFormattedError;
+ const error: FormattedError = result2.error.format();
+ expect(error._errors).toEqual([]);
+ expect(error.inner?._errors).toEqual([]);
+ expect(error.inner?.name?._errors).toEqual(["Invalid input"]);
+ expect(error.inner?.name?.[0]).toEqual(undefined);
+ expect(error.inner?.name?.[1]).toEqual(undefined);
+ expect(error.inner?.name?.[2]).toEqual(undefined);
+ }
+
+ // test custom mapper
+ if (!result2.success) {
+ type FormattedError = z.inferFormattedError;
+ const error: FormattedError = result2.error.format(() => 5);
+ expect(error._errors).toEqual([]);
+ expect(error.inner?._errors).toEqual([]);
+ expect(error.inner?.name?._errors).toEqual([5]);
+ }
+});
+
+test("formatting with nullable and optional fields", () => {
+ const nameSchema = z.string().refine((val) => val.length > 5);
+ const schema = z.object({
+ nullableObject: z.object({ name: nameSchema }).nullable(),
+ nullableArray: z.array(nameSchema).nullable(),
+ nullableTuple: z.tuple([nameSchema, nameSchema, z.number()]).nullable(),
+ optionalObject: z.object({ name: nameSchema }).optional(),
+ optionalArray: z.array(nameSchema).optional(),
+ optionalTuple: z.tuple([nameSchema, nameSchema, z.number()]).optional(),
+ });
+ const invalidItem = {
+ nullableObject: { name: "abcd" },
+ nullableArray: ["abcd"],
+ nullableTuple: ["abcd", "abcd", 1],
+ optionalObject: { name: "abcd" },
+ optionalArray: ["abcd"],
+ optionalTuple: ["abcd", "abcd", 1],
+ };
+ const result = schema.safeParse(invalidItem);
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ type FormattedError = z.inferFormattedError;
+ const error: FormattedError = result.error.format();
+ expect(error._errors).toEqual([]);
+ expect(error.nullableObject?._errors).toEqual([]);
+ expect(error.nullableObject?.name?._errors).toEqual(["Invalid input"]);
+ expect(error.nullableArray?._errors).toEqual([]);
+ expect(error.nullableArray?.[0]?._errors).toEqual(["Invalid input"]);
+ expect(error.nullableTuple?._errors).toEqual([]);
+ expect(error.nullableTuple?.[0]?._errors).toEqual(["Invalid input"]);
+ expect(error.nullableTuple?.[1]?._errors).toEqual(["Invalid input"]);
+ expect(error.optionalObject?._errors).toEqual([]);
+ expect(error.optionalObject?.name?._errors).toEqual(["Invalid input"]);
+ expect(error.optionalArray?._errors).toEqual([]);
+ expect(error.optionalArray?.[0]?._errors).toEqual(["Invalid input"]);
+ expect(error.optionalTuple?._errors).toEqual([]);
+ expect(error.optionalTuple?.[0]?._errors).toEqual(["Invalid input"]);
+ expect(error.optionalTuple?.[1]?._errors).toEqual(["Invalid input"]);
+ }
+});
+
+const stringWithCustomError = z.string({
+ errorMap: (issue, ctx) => ({
+ message: issue.code === "invalid_type" ? (ctx.data ? "Invalid name" : "Name is required") : ctx.defaultError,
+ }),
+});
+
+test("schema-bound error map", () => {
+ const result = stringWithCustomError.safeParse(1234);
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues[0].message).toEqual("Invalid name");
+ }
+
+ const result2 = stringWithCustomError.safeParse(undefined);
+ expect(result2.success).toEqual(false);
+ if (!result2.success) {
+ expect(result2.error.issues[0].message).toEqual("Name is required");
+ }
+
+ // support contextual override
+ const result3 = stringWithCustomError.safeParse(undefined, {
+ errorMap: () => ({ message: "OVERRIDE" }),
+ });
+ expect(result3.success).toEqual(false);
+ if (!result3.success) {
+ expect(result3.error.issues[0].message).toEqual("OVERRIDE");
+ }
+});
+
+test("overrideErrorMap", () => {
+ // support overrideErrorMap
+ z.setErrorMap(() => ({ message: "OVERRIDE" }));
+ const result4 = stringWithCustomError.min(10).safeParse("tooshort");
+ expect(result4.success).toEqual(false);
+ if (!result4.success) {
+ expect(result4.error.issues[0].message).toEqual("OVERRIDE");
+ }
+ z.setErrorMap(z.defaultErrorMap);
+});
+
+test("invalid and required", () => {
+ const str = z.string({
+ invalid_type_error: "Invalid name",
+ required_error: "Name is required",
+ });
+ const result1 = str.safeParse(1234);
+ expect(result1.success).toEqual(false);
+ if (!result1.success) {
+ expect(result1.error.issues[0].message).toEqual("Invalid name");
+ }
+ const result2 = str.safeParse(undefined);
+ expect(result2.success).toEqual(false);
+ if (!result2.success) {
+ expect(result2.error.issues[0].message).toEqual("Name is required");
+ }
+});
+
+test("Fallback to default required error", () => {
+ const str = z.string({
+ invalid_type_error: "Invalid name",
+ // required_error: "Name is required",
+ });
+
+ const result2 = str.safeParse(undefined);
+ expect(result2.success).toEqual(false);
+ if (!result2.success) {
+ expect(result2.error.issues[0].message).toEqual("Required");
+ }
+});
+
+test("invalid and required and errorMap", () => {
+ expect(() => {
+ return z.string({
+ invalid_type_error: "Invalid name",
+ required_error: "Name is required",
+ errorMap: () => ({ message: "OVERRIDE" }),
+ });
+ }).toThrow();
+});
+
+test("strict error message", () => {
+ const errorMsg = "Invalid object";
+ const obj = z.object({ x: z.string() }).strict(errorMsg);
+ const result = obj.safeParse({ x: "a", y: "b" });
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues[0].message).toEqual(errorMsg);
+ }
+});
+
+test("enum error message, invalid enum elementstring", () => {
+ try {
+ z.enum(["Tuna", "Trout"]).parse("Salmon");
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual("Invalid enum value. Expected 'Tuna' | 'Trout', received 'Salmon'");
+ }
+});
+
+test("enum error message, invalid type", () => {
+ try {
+ z.enum(["Tuna", "Trout"]).parse(12);
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual("Expected 'Tuna' | 'Trout', received number");
+ }
+});
+
+test("nativeEnum default error message", () => {
+ enum Fish {
+ Tuna = "Tuna",
+ Trout = "Trout",
+ }
+ try {
+ z.nativeEnum(Fish).parse("Salmon");
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual("Invalid enum value. Expected 'Tuna' | 'Trout', received 'Salmon'");
+ }
+});
+
+test("literal default error message", () => {
+ try {
+ z.literal("Tuna").parse("Trout");
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual(`Invalid literal value, expected "Tuna"`);
+ }
+});
+
+test("literal bigint default error message", () => {
+ try {
+ z.literal(BigInt(12)).parse(BigInt(13));
+ } catch (err) {
+ const zerr: z.ZodError = err as any;
+ expect(zerr.issues.length).toEqual(1);
+ expect(zerr.issues[0].message).toEqual(`Invalid literal value, expected "12"`);
+ }
+});
+
+test("enum with message returns the custom error message", () => {
+ const schema = z.enum(["apple", "banana"], {
+ message: "the value provided is invalid",
+ });
+
+ const result1 = schema.safeParse("berries");
+ expect(result1.success).toEqual(false);
+ if (!result1.success) {
+ expect(result1.error.issues[0].message).toEqual("the value provided is invalid");
+ }
+
+ const result2 = schema.safeParse(undefined);
+ expect(result2.success).toEqual(false);
+ if (!result2.success) {
+ expect(result2.error.issues[0].message).toEqual("the value provided is invalid");
+ }
+
+ const result3 = schema.safeParse("banana");
+ expect(result3.success).toEqual(true);
+
+ const result4 = schema.safeParse(null);
+ expect(result4.success).toEqual(false);
+ if (!result4.success) {
+ expect(result4.error.issues[0].message).toEqual("the value provided is invalid");
+ }
+});
+
+test("when the message is falsy, it is used as is provided", () => {
+ const schema = z.string().max(1, { message: "" });
+ const result = schema.safeParse("asdf");
+ expect(result.success).toEqual(false);
+ if (!result.success) {
+ expect(result.error.issues[0].message).toEqual("");
+ }
+});
+
+// test("dont short circuit on continuable errors", () => {
+// const user = z
+// .object({
+// password: z.string().min(6),
+// confirm: z.string(),
+// })
+// .refine((data) => data.password === data.confirm, {
+// message: "Passwords don't match",
+// path: ["confirm"],
+// });
+// const result = user.safeParse({ password: "asdf", confirm: "qwer" });
+// if (!result.success) {
+// expect(result.error.issues.length).toEqual(2);
+// }
+// });
diff --git a/node_modules/zod/src/v3/tests/firstparty.test.ts b/node_modules/zod/src/v3/tests/firstparty.test.ts
new file mode 100644
index 0000000..017a1c1
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/firstparty.test.ts
@@ -0,0 +1,87 @@
+// @ts-ignore TS6133
+import { test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("first party switch", () => {
+ const myType = z.string() as z.ZodFirstPartySchemaTypes;
+ const def = myType._def;
+
+ switch (def.typeName) {
+ case z.ZodFirstPartyTypeKind.ZodString:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodNumber:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodNaN:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodBigInt:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodBoolean:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodDate:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodUndefined:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodNull:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodAny:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodUnknown:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodNever:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodVoid:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodArray:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodObject:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodUnion:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodIntersection:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodTuple:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodRecord:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodMap:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodSet:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodFunction:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodLazy:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodLiteral:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodEnum:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodEffects:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodNativeEnum:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodOptional:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodNullable:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodDefault:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodCatch:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodPromise:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodBranded:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodPipeline:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodSymbol:
+ break;
+ case z.ZodFirstPartyTypeKind.ZodReadonly:
+ break;
+ default:
+ util.assertNever(def);
+ }
+});
diff --git a/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts b/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts
new file mode 100644
index 0000000..ad397d8
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts
@@ -0,0 +1,21 @@
+// @ts-ignore TS6133
+import { test } from "vitest";
+
+import type { ZodFirstPartySchemaTypes, ZodFirstPartyTypeKind } from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("Identify missing [ZodFirstPartySchemaTypes]", () => {
+ type ZodFirstPartySchemaForType = ZodFirstPartySchemaTypes extends infer Schema
+ ? Schema extends { _def: { typeName: T } }
+ ? Schema
+ : never
+ : never;
+ type ZodMappedTypes = {
+ [key in ZodFirstPartyTypeKind]: ZodFirstPartySchemaForType;
+ };
+ type ZodFirstPartySchemaTypesMissingFromUnion = keyof {
+ [key in keyof ZodMappedTypes as ZodMappedTypes[key] extends { _def: never } ? key : never]: unknown;
+ };
+
+ util.assertEqual(true);
+});
diff --git a/node_modules/zod/src/v3/tests/function.test.ts b/node_modules/zod/src/v3/tests/function.test.ts
new file mode 100644
index 0000000..a0f03bb
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/function.test.ts
@@ -0,0 +1,257 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+const args1 = z.tuple([z.string()]);
+const returns1 = z.number();
+const func1 = z.function(args1, returns1);
+
+test("function parsing", () => {
+ const parsed = func1.parse((arg: any) => arg.length);
+ parsed("asdf");
+});
+
+test("parsed function fail 1", () => {
+ const parsed = func1.parse((x: string) => x);
+ expect(() => parsed("asdf")).toThrow();
+});
+
+test("parsed function fail 2", () => {
+ const parsed = func1.parse((x: string) => x);
+ expect(() => parsed(13 as any)).toThrow();
+});
+
+test("function inference 1", () => {
+ type func1 = z.TypeOf;
+ util.assertEqual number>(true);
+});
+
+test("method parsing", () => {
+ const methodObject = z.object({
+ property: z.number(),
+ method: z.function().args(z.string()).returns(z.number()),
+ });
+ const methodInstance = {
+ property: 3,
+ method: function (s: string) {
+ return s.length + this.property;
+ },
+ };
+ const parsed = methodObject.parse(methodInstance);
+ expect(parsed.method("length=8")).toBe(11); // 8 length + 3 property
+});
+
+test("async method parsing", async () => {
+ const methodObject = z.object({
+ property: z.number(),
+ method: z.function().args(z.string()).returns(z.promise(z.number())),
+ });
+ const methodInstance = {
+ property: 3,
+ method: async function (s: string) {
+ return s.length + this.property;
+ },
+ };
+ const parsed = methodObject.parse(methodInstance);
+ expect(await parsed.method("length=8")).toBe(11); // 8 length + 3 property
+});
+
+test("args method", () => {
+ const t1 = z.function();
+ type t1 = z.infer;
+ util.assertEqual unknown>(true);
+
+ const t2 = t1.args(z.string());
+ type t2 = z.infer;
+ util.assertEqual unknown>(true);
+
+ const t3 = t2.returns(z.boolean());
+ type t3 = z.infer;
+ util.assertEqual boolean>(true);
+});
+
+const args2 = z.tuple([
+ z.object({
+ f1: z.number(),
+ f2: z.string().nullable(),
+ f3: z.array(z.boolean().optional()).optional(),
+ }),
+]);
+const returns2 = z.union([z.string(), z.number()]);
+
+const func2 = z.function(args2, returns2);
+
+test("function inference 2", () => {
+ type func2 = z.TypeOf;
+ util.assertEqual<
+ func2,
+ (arg: {
+ f1: number;
+ f2: string | null;
+ f3?: (boolean | undefined)[] | undefined;
+ }) => string | number
+ >(true);
+});
+
+test("valid function run", () => {
+ const validFunc2Instance = func2.validate((_x) => {
+ return "adf" as any;
+ });
+
+ const checker = () => {
+ validFunc2Instance({
+ f1: 21,
+ f2: "asdf",
+ f3: [true, false],
+ });
+ };
+
+ checker();
+});
+
+test("input validation error", () => {
+ const invalidFuncInstance = func2.validate((_x) => {
+ return "adf" as any;
+ });
+
+ const checker = () => {
+ invalidFuncInstance("Invalid_input" as any);
+ };
+
+ expect(checker).toThrow();
+});
+
+test("output validation error", () => {
+ const invalidFuncInstance = func2.validate((_x) => {
+ return ["this", "is", "not", "valid", "output"] as any;
+ });
+
+ const checker = () => {
+ invalidFuncInstance({
+ f1: 21,
+ f2: "asdf",
+ f3: [true, false],
+ });
+ };
+
+ expect(checker).toThrow();
+});
+
+z.function(z.tuple([z.string()])).args()._def.args;
+
+test("special function error codes", () => {
+ const checker = z.function(z.tuple([z.string()]), z.boolean()).implement((arg) => {
+ return arg.length as any;
+ });
+ try {
+ checker("12" as any);
+ } catch (err) {
+ const zerr = err as z.ZodError;
+ const first = zerr.issues[0];
+ if (first.code !== z.ZodIssueCode.invalid_return_type) throw new Error();
+
+ expect(first.returnTypeError).toBeInstanceOf(z.ZodError);
+ }
+
+ try {
+ checker(12 as any);
+ } catch (err) {
+ const zerr = err as z.ZodError;
+ const first = zerr.issues[0];
+ if (first.code !== z.ZodIssueCode.invalid_arguments) throw new Error();
+ expect(first.argumentsError).toBeInstanceOf(z.ZodError);
+ }
+});
+
+test("function with async refinements", async () => {
+ const func = z
+ .function()
+ .args(z.string().refine(async (val) => val.length > 10))
+ .returns(z.promise(z.number().refine(async (val) => val > 10)))
+ .implement(async (val) => {
+ return val.length;
+ });
+ const results = [];
+ try {
+ await func("asdfasdf");
+ results.push("success");
+ } catch (_err) {
+ results.push("fail");
+ }
+ try {
+ await func("asdflkjasdflkjsf");
+ results.push("success");
+ } catch (_err) {
+ results.push("fail");
+ }
+
+ expect(results).toEqual(["fail", "success"]);
+});
+
+test("non async function with async refinements should fail", async () => {
+ const func = z
+ .function()
+ .args(z.string().refine(async (val) => val.length > 10))
+ .returns(z.number().refine(async (val) => val > 10))
+ .implement((val) => {
+ return val.length;
+ });
+
+ const results = [];
+ try {
+ await func("asdasdfasdffasdf");
+ results.push("success");
+ } catch (_err) {
+ results.push("fail");
+ }
+
+ expect(results).toEqual(["fail"]);
+});
+
+test("allow extra parameters", () => {
+ const maxLength5 = z
+ .function()
+ .args(z.string())
+ .returns(z.boolean())
+ .implement((str, _arg, _qewr) => {
+ return str.length <= 5;
+ });
+
+ const filteredList = ["apple", "orange", "pear", "banana", "strawberry"].filter(maxLength5);
+ expect(filteredList.length).toEqual(2);
+});
+
+test("params and returnType getters", () => {
+ const func = z.function().args(z.string()).returns(z.string());
+
+ func.parameters().items[0].parse("asdf");
+ func.returnType().parse("asdf");
+});
+
+test("inference with transforms", () => {
+ const funcSchema = z
+ .function()
+ .args(z.string().transform((val) => val.length))
+ .returns(z.object({ val: z.number() }));
+ const myFunc = funcSchema.implement((val) => {
+ return { val, extra: "stuff" };
+ });
+ myFunc("asdf");
+
+ util.assertEqual { val: number; extra: string }>(true);
+});
+
+test("fallback to OuterTypeOfFunction", () => {
+ const funcSchema = z
+ .function()
+ .args(z.string().transform((val) => val.length))
+ .returns(z.object({ arg: z.number() }).transform((val) => val.arg));
+
+ const myFunc = funcSchema.implement((val) => {
+ return { arg: val, arg2: false };
+ });
+
+ util.assertEqual number>(true);
+});
diff --git a/node_modules/zod/src/v3/tests/generics.test.ts b/node_modules/zod/src/v3/tests/generics.test.ts
new file mode 100644
index 0000000..e0af470
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/generics.test.ts
@@ -0,0 +1,48 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("generics", () => {
+ async function stripOuter(schema: TData, data: unknown) {
+ return z
+ .object({
+ nested: schema, // as z.ZodTypeAny,
+ })
+ .transform((data) => {
+ return data.nested!;
+ })
+ .parse({ nested: data });
+ }
+
+ const result = stripOuter(z.object({ a: z.string() }), { a: "asdf" });
+ util.assertEqual>(true);
+});
+
+// test("assignability", () => {
+// const createSchemaAndParse = (
+// key: K,
+// valueSchema: VS,
+// data: unknown
+// ) => {
+// const schema = z.object({
+// [key]: valueSchema,
+// } as { [k in K]: VS });
+// return { [key]: valueSchema };
+// const parsed = schema.parse(data);
+// return parsed;
+// // const inferred: z.infer> = parsed;
+// // return inferred;
+// };
+// const parsed = createSchemaAndParse("foo", z.string(), { foo: "" });
+// util.assertEqual(true);
+// });
+
+test("nested no undefined", () => {
+ const inner = z.string().or(z.array(z.string()));
+ const outer = z.object({ inner });
+ type outerSchema = z.infer;
+ z.util.assertEqual(true);
+ expect(outer.safeParse({ inner: undefined }).success).toEqual(false);
+});
diff --git a/node_modules/zod/src/v3/tests/instanceof.test.ts b/node_modules/zod/src/v3/tests/instanceof.test.ts
new file mode 100644
index 0000000..de66f3f
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/instanceof.test.ts
@@ -0,0 +1,37 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { util } from "../helpers/util.js";
+
+test("instanceof", async () => {
+ class Test {}
+ class Subtest extends Test {}
+ abstract class AbstractBar {
+ constructor(public val: string) {}
+ }
+ class Bar extends AbstractBar {}
+
+ const TestSchema = z.instanceof(Test);
+ const SubtestSchema = z.instanceof(Subtest);
+ const AbstractSchema = z.instanceof(AbstractBar);
+ const BarSchema = z.instanceof(Bar);
+
+ TestSchema.parse(new Test());
+ TestSchema.parse(new Subtest());
+ SubtestSchema.parse(new Subtest());
+ AbstractSchema.parse(new Bar("asdf"));
+ const bar = BarSchema.parse(new Bar("asdf"));
+ expect(bar.val).toEqual("asdf");
+
+ await expect(() => SubtestSchema.parse(new Test())).toThrow(/Input not instance of Subtest/);
+ await expect(() => TestSchema.parse(12)).toThrow(/Input not instance of Test/);
+
+ util.assertEqual>(true);
+});
+
+test("instanceof fatal", () => {
+ const schema = z.instanceof(Date).refine((d) => d.toString());
+ const res = schema.safeParse(null);
+ expect(res.success).toBe(false);
+});
diff --git a/node_modules/zod/src/v3/tests/intersection.test.ts b/node_modules/zod/src/v3/tests/intersection.test.ts
new file mode 100644
index 0000000..6d7936c
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/intersection.test.ts
@@ -0,0 +1,110 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+test("object intersection", () => {
+ const BaseTeacher = z.object({
+ subjects: z.array(z.string()),
+ });
+ const HasID = z.object({ id: z.string() });
+
+ const Teacher = z.intersection(BaseTeacher.passthrough(), HasID); // BaseTeacher.merge(HasID);
+ const data = {
+ subjects: ["math"],
+ id: "asdfasdf",
+ };
+ expect(Teacher.parse(data)).toEqual(data);
+ expect(() => Teacher.parse({ subject: data.subjects })).toThrow();
+ expect(Teacher.parse({ ...data, extra: 12 })).toEqual({ ...data, extra: 12 });
+
+ expect(() => z.intersection(BaseTeacher.strict(), HasID).parse({ ...data, extra: 12 })).toThrow();
+});
+
+test("deep intersection", () => {
+ const Animal = z.object({
+ properties: z.object({
+ is_animal: z.boolean(),
+ }),
+ });
+ const Cat = z
+ .object({
+ properties: z.object({
+ jumped: z.boolean(),
+ }),
+ })
+ .and(Animal);
+
+ type _Cat = z.infer;
+ // const cat:Cat = 'asdf' as any;
+ const cat = Cat.parse({ properties: { is_animal: true, jumped: true } });
+ expect(cat.properties).toEqual({ is_animal: true, jumped: true });
+});
+
+test("deep intersection of arrays", async () => {
+ const Author = z.object({
+ posts: z.array(
+ z.object({
+ post_id: z.number(),
+ })
+ ),
+ });
+ const Registry = z
+ .object({
+ posts: z.array(
+ z.object({
+ title: z.string(),
+ })
+ ),
+ })
+ .and(Author);
+
+ const posts = [
+ { post_id: 1, title: "Novels" },
+ { post_id: 2, title: "Fairy tales" },
+ ];
+ const cat = Registry.parse({ posts });
+ expect(cat.posts).toEqual(posts);
+ const asyncCat = await Registry.parseAsync({ posts });
+ expect(asyncCat.posts).toEqual(posts);
+});
+
+test("invalid intersection types", async () => {
+ const numberIntersection = z.intersection(
+ z.number(),
+ z.number().transform((x) => x + 1)
+ );
+
+ const syncResult = numberIntersection.safeParse(1234);
+ expect(syncResult.success).toEqual(false);
+ if (!syncResult.success) {
+ expect(syncResult.error.issues[0].code).toEqual(z.ZodIssueCode.invalid_intersection_types);
+ }
+
+ const asyncResult = await numberIntersection.spa(1234);
+ expect(asyncResult.success).toEqual(false);
+ if (!asyncResult.success) {
+ expect(asyncResult.error.issues[0].code).toEqual(z.ZodIssueCode.invalid_intersection_types);
+ }
+});
+
+test("invalid array merge", async () => {
+ const stringArrInt = z.intersection(
+ z.string().array(),
+ z
+ .string()
+ .array()
+ .transform((val) => [...val, "asdf"])
+ );
+ const syncResult = stringArrInt.safeParse(["asdf", "qwer"]);
+ expect(syncResult.success).toEqual(false);
+ if (!syncResult.success) {
+ expect(syncResult.error.issues[0].code).toEqual(z.ZodIssueCode.invalid_intersection_types);
+ }
+
+ const asyncResult = await stringArrInt.spa(["asdf", "qwer"]);
+ expect(asyncResult.success).toEqual(false);
+ if (!asyncResult.success) {
+ expect(asyncResult.error.issues[0].code).toEqual(z.ZodIssueCode.invalid_intersection_types);
+ }
+});
diff --git a/node_modules/zod/src/v3/tests/language-server.source.ts b/node_modules/zod/src/v3/tests/language-server.source.ts
new file mode 100644
index 0000000..cbe818b
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/language-server.source.ts
@@ -0,0 +1,76 @@
+import * as z from "zod/v3";
+
+export const filePath = __filename;
+
+// z.object()
+
+export const Test = z.object({
+ f1: z.number(),
+});
+
+export type Test = z.infer;
+
+export const instanceOfTest: Test = {
+ f1: 1,
+};
+
+// z.object().merge()
+
+export const TestMerge = z
+ .object({
+ f2: z.string().optional(),
+ })
+ .merge(Test);
+
+export type TestMerge = z.infer;
+
+export const instanceOfTestMerge: TestMerge = {
+ f1: 1,
+ f2: "string",
+};
+
+// z.union()
+
+export const TestUnion = z.union([
+ z.object({
+ f2: z.string().optional(),
+ }),
+ Test,
+]);
+
+export type TestUnion = z.infer;
+
+export const instanceOfTestUnion: TestUnion = {
+ f1: 1,
+ f2: "string",
+};
+
+// z.object().partial()
+
+export const TestPartial = Test.partial();
+
+export type TestPartial = z.infer;
+
+export const instanceOfTestPartial: TestPartial = {
+ f1: 1,
+};
+
+// z.object().pick()
+
+export const TestPick = TestMerge.pick({ f1: true });
+
+export type TestPick = z.infer;
+
+export const instanceOfTestPick: TestPick = {
+ f1: 1,
+};
+
+// z.object().omit()
+
+export const TestOmit = TestMerge.omit({ f2: true });
+
+export type TestOmit = z.infer;
+
+export const instanceOfTestOmit: TestOmit = {
+ f1: 1,
+};
diff --git a/node_modules/zod/src/v3/tests/language-server.test.ts b/node_modules/zod/src/v3/tests/language-server.test.ts
new file mode 100644
index 0000000..851fdc4
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/language-server.test.ts
@@ -0,0 +1,207 @@
+import { test } from "vitest";
+// import path from "path";
+// import { Node, Project, SyntaxKind } from "ts-morph";
+
+// import { filePath } from "./language-server.source";
+
+// The following tool is helpful for understanding the TypeScript AST associated with these tests:
+// https://ts-ast-viewer.com/ (just copy the contents of language-server.source into the viewer)
+
+test("", () => {});
+// describe("Executing Go To Definition (and therefore Find Usages and Rename Refactoring) using an IDE works on inferred object properties", () => {
+// // Compile file developmentEnvironment.source
+// const project = new Project({
+// tsConfigFilePath: path.join(__dirname, "..", "..", "tsconfig.json"),
+// skipAddingFilesFromTsConfig: true,
+// });
+// const sourceFile = project.addSourceFileAtPath(filePath);
+
+// test("works for object properties inferred from z.object()", () => {
+// // Find usage of Test.f1 property
+// const instanceVariable =
+// sourceFile.getVariableDeclarationOrThrow("instanceOfTest");
+// const propertyBeingAssigned = getPropertyBeingAssigned(
+// instanceVariable,
+// "f1"
+// );
+
+// // Find definition of Test.f1 property
+// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// SyntaxKind.VariableDeclaration
+// );
+
+// // Assert that find definition returned the Zod definition of Test
+// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
+// expect(parentOfProperty?.getName()).toEqual("Test");
+// });
+
+// // test("works for first object properties inferred from z.object().merge()", () => {
+// // // Find usage of TestMerge.f1 property
+// // const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
+// // "instanceOfTestMerge"
+// // );
+// // const propertyBeingAssigned = getPropertyBeingAssigned(
+// // instanceVariable,
+// // "f1"
+// // );
+
+// // // Find definition of TestMerge.f1 property
+// // const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// // const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// // SyntaxKind.VariableDeclaration
+// // );
+
+// // // Assert that find definition returned the Zod definition of Test
+// // expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
+// // expect(parentOfProperty?.getName()).toEqual("Test");
+// // });
+
+// // test("works for second object properties inferred from z.object().merge()", () => {
+// // // Find usage of TestMerge.f2 property
+// // const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
+// // "instanceOfTestMerge"
+// // );
+// // const propertyBeingAssigned = getPropertyBeingAssigned(
+// // instanceVariable,
+// // "f2"
+// // );
+
+// // // Find definition of TestMerge.f2 property
+// // const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// // const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// // SyntaxKind.VariableDeclaration
+// // );
+
+// // // Assert that find definition returned the Zod definition of TestMerge
+// // expect(definitionOfProperty?.getText()).toEqual(
+// // "f2: z.string().optional()"
+// // );
+// // expect(parentOfProperty?.getName()).toEqual("TestMerge");
+// // });
+
+// test("works for first object properties inferred from z.union()", () => {
+// // Find usage of TestUnion.f1 property
+// const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
+// "instanceOfTestUnion"
+// );
+// const propertyBeingAssigned = getPropertyBeingAssigned(
+// instanceVariable,
+// "f1"
+// );
+
+// // Find definition of TestUnion.f1 property
+// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// SyntaxKind.VariableDeclaration
+// );
+
+// // Assert that find definition returned the Zod definition of Test
+// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
+// expect(parentOfProperty?.getName()).toEqual("Test");
+// });
+
+// test("works for second object properties inferred from z.union()", () => {
+// // Find usage of TestUnion.f2 property
+// const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
+// "instanceOfTestUnion"
+// );
+// const propertyBeingAssigned = getPropertyBeingAssigned(
+// instanceVariable,
+// "f2"
+// );
+
+// // Find definition of TestUnion.f2 property
+// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// SyntaxKind.VariableDeclaration
+// );
+
+// // Assert that find definition returned the Zod definition of TestUnion
+// expect(definitionOfProperty?.getText()).toEqual(
+// "f2: z.string().optional()"
+// );
+// expect(parentOfProperty?.getName()).toEqual("TestUnion");
+// });
+
+// test("works for object properties inferred from z.object().partial()", () => {
+// // Find usage of TestPartial.f1 property
+// const instanceVariable = sourceFile.getVariableDeclarationOrThrow(
+// "instanceOfTestPartial"
+// );
+// const propertyBeingAssigned = getPropertyBeingAssigned(
+// instanceVariable,
+// "f1"
+// );
+
+// // Find definition of TestPartial.f1 property
+// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// SyntaxKind.VariableDeclaration
+// );
+
+// // Assert that find definition returned the Zod definition of Test
+// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
+// expect(parentOfProperty?.getName()).toEqual("Test");
+// });
+
+// test("works for object properties inferred from z.object().pick()", () => {
+// // Find usage of TestPick.f1 property
+// const instanceVariable =
+// sourceFile.getVariableDeclarationOrThrow("instanceOfTestPick");
+// const propertyBeingAssigned = getPropertyBeingAssigned(
+// instanceVariable,
+// "f1"
+// );
+
+// // Find definition of TestPick.f1 property
+// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// SyntaxKind.VariableDeclaration
+// );
+
+// // Assert that find definition returned the Zod definition of Test
+// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
+// expect(parentOfProperty?.getName()).toEqual("Test");
+// });
+
+// test("works for object properties inferred from z.object().omit()", () => {
+// // Find usage of TestOmit.f1 property
+// const instanceVariable =
+// sourceFile.getVariableDeclarationOrThrow("instanceOfTestOmit");
+// const propertyBeingAssigned = getPropertyBeingAssigned(
+// instanceVariable,
+// "f1"
+// );
+
+// // Find definition of TestOmit.f1 property
+// const definitionOfProperty = propertyBeingAssigned?.getDefinitionNodes()[0];
+// const parentOfProperty = definitionOfProperty?.getFirstAncestorByKind(
+// SyntaxKind.VariableDeclaration
+// );
+
+// // Assert that find definition returned the Zod definition of Test
+// expect(definitionOfProperty?.getText()).toEqual("f1: z.number()");
+// expect(parentOfProperty?.getName()).toEqual("Test");
+// });
+// });
+
+// const getPropertyBeingAssigned = (node: Node, name: string) => {
+// const propertyAssignment = node.forEachDescendant((descendent) =>
+// Node.isPropertyAssignment(descendent) && descendent.getName() == name
+// ? descendent
+// : undefined
+// );
+
+// if (propertyAssignment == null)
+// fail(`Could not find property assignment with name ${name}`);
+
+// const propertyLiteral = propertyAssignment.getFirstDescendantByKind(
+// SyntaxKind.Identifier
+// );
+
+// if (propertyLiteral == null)
+// fail(`Could not find property literal with name ${name}`);
+
+// return propertyLiteral;
+// };
diff --git a/node_modules/zod/src/v3/tests/literal.test.ts b/node_modules/zod/src/v3/tests/literal.test.ts
new file mode 100644
index 0000000..d166a24
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/literal.test.ts
@@ -0,0 +1,36 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+
+const literalTuna = z.literal("tuna");
+const literalFortyTwo = z.literal(42);
+const literalTrue = z.literal(true);
+
+const terrificSymbol = Symbol("terrific");
+const literalTerrificSymbol = z.literal(terrificSymbol);
+
+test("passing validations", () => {
+ literalTuna.parse("tuna");
+ literalFortyTwo.parse(42);
+ literalTrue.parse(true);
+ literalTerrificSymbol.parse(terrificSymbol);
+});
+
+test("failing validations", () => {
+ expect(() => literalTuna.parse("shark")).toThrow();
+ expect(() => literalFortyTwo.parse(43)).toThrow();
+ expect(() => literalTrue.parse(false)).toThrow();
+ expect(() => literalTerrificSymbol.parse(Symbol("terrific"))).toThrow();
+});
+
+test("invalid_literal should have `received` field with data", () => {
+ const data = "shark";
+ const result = literalTuna.safeParse(data);
+ if (!result.success) {
+ const issue = result.error.issues[0];
+ if (issue.code === "invalid_literal") {
+ expect(issue.received).toBe(data);
+ }
+ }
+});
diff --git a/node_modules/zod/src/v3/tests/map.test.ts b/node_modules/zod/src/v3/tests/map.test.ts
new file mode 100644
index 0000000..9471819
--- /dev/null
+++ b/node_modules/zod/src/v3/tests/map.test.ts
@@ -0,0 +1,110 @@
+// @ts-ignore TS6133
+import { expect, test } from "vitest";
+
+import * as z from "zod/v3";
+import { ZodIssueCode } from "zod/v3";
+import { util } from "../helpers/util.js";
+
+const stringMap = z.map(z.string(), z.string());
+type stringMap = z.infer