diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ba89535..b521815 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,6 +2,9 @@ name: Checks on: [push, pull_request] permissions: contents: read +concurrency: + group: threadboard-checks-${{ github.ref }} + cancel-in-progress: true jobs: verify: runs-on: ubuntu-latest @@ -17,6 +20,8 @@ jobs: - run: npm ci - run: npm run typecheck - run: npm run build + # Gzip byte counts in build-info vary with Node's zlib version. + - run: git diff --exit-code -- plugins/threadboard/dist THIRD_PARTY_NOTICES.md ':(exclude)plugins/threadboard/dist/build-info.json' - run: npm test - run: npx playwright install --with-deps chromium - run: npm run test:ui diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index a8d3bca..1e90ed1 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -2,9 +2,9 @@ name: Website on: push: branches: [main] - paths: ['site/**', 'src/ui/**', 'src/types.ts', 'docs/images/**', 'plugins/threadboard/**', 'scripts/release.mjs', 'package.json', '.github/workflows/website.yml'] + paths: ['site/**', 'src/**', 'docs/**', 'plugins/threadboard/**', 'scripts/**', '*.json', '*.md', 'LICENSE', '.agents/**', '.github/workflows/website.yml'] pull_request: - paths: ['site/**', 'src/ui/**', 'src/types.ts', 'docs/images/**', 'plugins/threadboard/**', 'scripts/release.mjs', 'package.json', '.github/workflows/website.yml'] + paths: ['site/**', 'src/**', 'docs/**', 'plugins/threadboard/**', 'scripts/**', '*.json', '*.md', 'LICENSE', '.agents/**', '.github/workflows/website.yml'] permissions: contents: read concurrency: @@ -22,7 +22,13 @@ jobs: with: node-version-file: site/.node-version cache: npm - cache-dependency-path: site/package-lock.json + cache-dependency-path: | + package-lock.json + site/package-lock.json + - run: npm ci + working-directory: . + - run: npm run build + working-directory: . - run: npm ci - run: npx playwright install --with-deps chromium - run: npm test diff --git a/PRIVACY.md b/PRIVACY.md index 2946e1f..936a916 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -2,13 +2,13 @@ Last updated: 4 October 2026. -Threadboard's first release is a fully local Codex plugin. It operates a stdio MCP server and an embedded board. It has no hosted service, login, analytics, advertisements, telemetry, or model API integration. Its runtime makes no outbound network requests. +Threadboard is a local Codex plugin. It operates a stdio MCP server and an embedded board. It has no hosted service, login, analytics, advertisements, telemetry, or model API integration. Its runtime makes no outbound network requests. ## Local data -The plugin stores native project IDs, names and canonical workspace paths; named boards, their companion chat IDs and setup request IDs; task titles, descriptions, acceptance criteria, priorities and states; prerequisites; deliberate activity notes; and task ownership handles. When supplied explicitly, a native Codex chat ID is stored to enable an Open chat link. Claim tokens are hashed in storage. The plugin does not open Codex transcript files, query chat-content tables, copy conversation history, or read repository file contents. A task's workspace directory is checked for existence before a new-chat launch. +The plugin stores native project IDs, names and canonical workspace paths; named boards, their companion chat IDs and setup request IDs; task titles, descriptions, acceptance criteria, priorities and states; prerequisites; activity notes; and task ownership handles. When supplied explicitly, a native Codex chat ID is stored to enable an Open chat link. Claim tokens are hashed in storage. The plugin does not open Codex transcript files, query chat-content tables, copy conversation history, or read repository file contents. A task's workspace directory is checked for existence before a new-chat launch. -The working-tree preview discovers projects from Codex's local metadata. Its read-only adapter extracts only project IDs, names, and root paths from the desktop state file, excluding ChatGPT cloud project mirrors. Unrelated desktop state is not returned or stored. Threadboard never modifies this source and does not open Codex's conversation database. Project metadata remains local, alongside task data. The published 0.1.1 release instead uses manually associated workspace boards. +The repository and website preview discovers projects from Codex's local metadata. Its read-only adapter extracts only project IDs, names, and root paths from the desktop state file, excluding ChatGPT cloud project mirrors. Unrelated desktop state is not returned or stored. Threadboard never modifies this source and does not open Codex's conversation database. Project metadata remains local, alongside task data. The published 0.1.1 release instead uses manually associated workspace boards. While the board is visible, its embedded UI checks an opaque local revision token once per second and reloads local board data only after changes. Checks pause for hidden documents and panels, with retries backing off after failures. These app-only MCP checks contain no task or chat content, do not start model turns, and do not upload or sync conversations. Task states reflect explicit Threadboard tool updates; the plugin does not monitor chat transcripts. @@ -20,9 +20,9 @@ Task information returned by MCP tools can become context in a Codex chat. Selec ## Export and removal -Export creates a local JSON snapshot with task content, all deliberate activity notes, workspace paths, prerequisites, and current chat/run references. It does not upload the snapshot or export chat transcripts. JSON import is not provided in this release. Keep exports private if they contain private project information. +Export creates a local JSON snapshot with task content, all activity notes, workspace paths, prerequisites, and current chat/run references. It does not upload the snapshot or export chat transcripts. JSON import is not provided in this release. Keep exports private if they contain private project information. -Archiving a card preserves it for restoration. Uninstalling the plugin preserves the database. To remove all Threadboard data, first stop the plugin and delete its application data directory using your operating system's file manager. See README.md for the platform-specific locations and backup instructions. +Archiving a card preserves it for restoration. Uninstalling the plugin preserves the database. To remove all Threadboard data, first stop the plugin and delete its application data directory using your operating system's file manager. See [the user guide](docs/usage.md#data-and-updates) for platform-specific locations and backup instructions. ## Support diff --git a/README.md b/README.md index e6d19cf..7857006 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,59 @@ -Threadboard — Give every task a home. Local boards for your Codex projects. -Threadboard — Give every task a home. Local boards for your Codex projects. +Threadboard — Task boards inside Codex +Threadboard — Task boards inside Codex -Plan work across your Codex projects, give each task a chat, and bring the result back for review. Threadboard keeps your boards on your device and opens inside Codex. +Threadboard adds local task boards to Codex. Plan work in your existing projects, assign cards to chats, and review the results before marking them Done. -[Product page and preview download](https://threadboard.vrnrn.com/) · **Current source preview: `0.1.4-dev.6`** · [Installation](#install-the-current-preview) · [User guide](docs/usage.md) · [Development](docs/development.md) · [MIT license](LICENSE) +[Website and interactive demo](https://threadboard.vrnrn.com/) · [Install](#install-the-current-preview) · [User guide](docs/usage.md) · [Development](docs/development.md) · [Release notes](RELEASE_NOTES.md) Orbit's Product board, with tasks across Backlog, Ready, In progress, Review, and Done Orbit's Product board, with tasks across Backlog, Ready, In progress, Review, and Done -## From plan to review +## What it does -- **Your Codex projects.** Existing local projects appear automatically, each with an empty General board. Create and manage projects in Codex. -- **Room for more than one board.** Organize a project into named boards such as Product, Release, and Editorial. The overview shows every board and its task counts. -- **Work shared across chats.** Pick up a card in an existing chat or start a new chat from it. Atomic ownership keeps one chat responsible for the work. -- **Results come back for review.** Read deliberate progress notes, review the result, and explicitly accept it into Done or request changes. -- **Lightweight live updates.** Visible boards check a small local revision once per second and reload only after changes. Hidden panels pause; open drafts are preserved. -- **A familiar surface.** The board follows Codex's theme and font settings, supports keyboard navigation, and adapts to narrower panels. +- **Uses your Codex projects.** Each gets a General board. Add named boards for features, releases, or other work. +- **Connects tasks to chats.** Start a new chat from a card or ask an existing chat to claim it. One chat owns a task at a time. +- **Keeps the result on the card.** Chats add progress notes and submit work to Review. You accept it into Done or request changes. +- **Updates as you work.** Visible boards check for local changes. Hidden panels pause, and refreshes preserve open drafts. +- **Fits inside Codex.** Host themes, keyboard controls, and layouts for narrow panels are supported. -Task content stays in a local SQLite database. The plugin uses a bundled stdio MCP server, with no hosted backend or transcript synchronization. Using task information in Codex still uses your normal Codex account and model allowance. [Privacy details](PRIVACY.md). +Boards live in a local SQLite database. The plugin has no hosted backend, telemetry, or transcript access. Task information used in a chat goes through your normal Codex account and model service. [Privacy details](PRIVACY.md). - - + +
Every project, every board

The Your boards overview groups General, Product, Release, and Editorial boards by projectThe Your boards overview groups General, Product, Release, and Editorial boards by project
Review, then move forward

A task in Review with its goal, acceptance criteria, owner notes, and explicit acceptance controlsA task in Review with its goal, acceptance criteria, owner notes, and explicit acceptance controls
Projects and boards

Boards grouped by Codex projectBoards grouped by Codex project
Task review

A task's goal, checks, activity, and review controlsA task's goal, checks, activity, and review controls
-*Product captures use isolated demonstration data. [More screenshots and editable graphics](docs/graphics.md).* +Screenshots use example projects. [More captures and editable artwork](docs/graphics.md). ## Install the current preview -You need a Codex desktop version with plugin/MCP App entrypoints, the Codex CLI, and **Node.js 22.13 or newer**. +Requires **Codex desktop with plugin/MCP App support**, the **Codex CLI**, and **Node.js 22.13 or newer**. ```sh codex plugin marketplace add vrnrn/Threadboard --ref main codex plugin add threadboard@threadboard-plugins ``` -Fully quit and reopen Codex, then open **Threadboard** from the sidebar. Your existing projects and boards appear in **Your boards**. Repository installation uses `node` from Codex's PATH; the source includes compiled assets, so consumers do not need npm or a build step. +Fully quit and reopen Codex, then open **Threadboard** from the sidebar. The repository includes compiled assets; no npm install or build step is needed. Node must be available on Codex's PATH. -### Install a release - -The latest downloadable package is still [the `0.1.1` preview](https://github.com/vrnrn/Threadboard/releases/tag/v0.1.1). It uses manual workspace association and manual refresh; it predates the native project discovery, named boards, and live updates shown above. +You can also [download the website preview](https://threadboard.vrnrn.com/#install), extract the ZIP, and run `node install.mjs` from that folder. The installer checks the package, finds Node, and preserves existing task data during updates. -Download its ZIP, extract it, and run `node install.mjs`. The installer discovers Node, verifies checksums, and keeps plugin files separate from task storage. Reopen Codex and follow that release's included README. Installing a newer package preserves task data. - -## A few useful details +### Install a release -A new card chat opens with a prefilled prompt: **send it to begin**. Creating a named board can also request a companion chat named ` Threadboard` through Codex's native project-aware tools. Threadboard stores the chat reference and deliberate task state, without reading conversation history. +The older [GitHub release, 0.1.1](https://github.com/vrnrn/Threadboard/releases/tag/v0.1.1), uses manual workspace association and refresh. Use the website or repository preview for the native projects, named boards, and live updates shown here. -If Codex leaves the board in a split pane after Back, **Open full view** beside Refresh requests the sidebar app and carries the selected project, board, and archive view. Codex owns its navigation and pane layout; this new recovery control still needs native-host verification. +## Using the board -Shortcuts: **N** creates a task, **⌘/Ctrl K** focuses search, and **Escape** closes a dialog. [The user guide](docs/usage.md) covers board navigation, claims, companion chats, exports, backups, and removal. +Open a card and choose **Start in new chat**, then **send the prepared prompt** in Codex to begin. A named board can also have a companion chat. [The user guide](docs/usage.md) covers ownership, review, exports, backups, and recovery. -## Build and contribute +**N** creates a task, **⌘/Ctrl K** focuses search, and **Escape** closes a dialog. Search covers loaded cards; boards with more than 200 tasks offer **Load more tasks**. -See [the development guide](docs/development.md) for local setup, tests, performance checks, packaging, and installation verification. Regenerate the current product captures and social artwork with `npm run graphics`. +This is preview software. Native board opening has been tested locally. Card-launch project placement, sidebar icons after a host restart, and **Open full view** recovery still need native-host verification. Browser tests cannot confirm Codex's window layout. Threadboard is independently distributed and is not listed in OpenAI's universal directory. -Native board opening has been confirmed locally. The preview's browser workflows, packaged MCP execution, and clean installation are tested; card-launch project placement and the full-view recovery control have separate native-host checks remaining. Threadboard is independently distributed through its repository marketplace; it has not been submitted to OpenAI's universal directory. +## Development -The design was inspired by [Cline Kanban](https://github.com/cline/kanban); this implementation is original. [Release notes](RELEASE_NOTES.md) track shipped and source previews. [The vision](https://github.com/vrnrn/Threadboard/blob/main/VISION.md) and [architecture](https://github.com/vrnrn/Threadboard/blob/main/ARCHITECTURE.md) describe the longer-term product. +See [development and verification](docs/development.md) for builds, tests, benchmarks, and packaging. The website lives in [`site/`](site/README.md). Run `npm run graphics` to update product screenshots and repository artwork. -MIT licensed. Bundled dependencies retain their own licenses in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). [Report a bug](https://github.com/vrnrn/Threadboard/issues). +Inspired by [Cline Kanban](https://github.com/cline/kanban). MIT licensed; bundled dependency licenses are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). [Report a bug](https://github.com/vrnrn/Threadboard/issues). diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1f928e2..8d06c1d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,17 @@ # Release notes +## Unreleased — 0.1.4-dev.8 + +- Collect each dependency license once on both case-sensitive and case-insensitive filesystems. + +- Delayed task reads no longer replace a newer card or reopen a closed dialog. Manual refresh preserves loaded pages, and pagination retries when the board changes between reads. +- Moving or reordering a task within its current column preserves its prepared chat. Launch binding rechecks blockers and prerequisites. Review cards consistently show their most recent submission. +- Dialogs make background controls inactive. Task shortcuts respect modifier keys, and cancelling a drag resumes live updates. +- Website and repository copy is shorter, installation links point to the current preview, and artwork uses a consistent neutral palette. Small-screen explanatory text is larger; obsolete screenshot styles are removed. +- The website demo matches task ownership and activity ordering in the app, and its transport is included in TypeScript checks. +- Project metadata refresh skips unchanged database rows. Installer failures clean up their staging directory. CI checks compiled assets and all website package inputs. + + ## Current source and website preview — 0.1.4-dev.7 The three-line Threadboard icon now appears in the package's light and dark assets and in MCP server/tool discovery for the sidebar app. The icon is embedded locally and needs no remote asset. Close Threadboard and fully quit and reopen Codex after updating so the host reloads discovery metadata. diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 8287ce0..c0de9d1 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -227,340 +227,7 @@ CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for the full license text. ``` -### license - -```text -The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. - -Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. - -No rights beyond those granted by the applicable original license are conveyed for such contributions. - ---- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to the Licensor for inclusion in the Work by the copyright - owner or by an individual or Legal Entity authorized to submit on behalf - of the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - ---- - -MIT License - -Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. - -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. - ---- - -Creative Commons Attribution 4.0 International (CC-BY-4.0) - -Documentation in this project (excluding specifications) is licensed under -CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for -the full license text. -``` - -## @modelcontextprotocol/sdk 1.32.0 - -License: MIT - -### LICENSE - -```text -MIT License - -Copyright (c) 2024 Anthropic, PBC - -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. -``` - -### license - -```text -MIT License - -Copyright (c) 2024 Anthropic, PBC - -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. -``` - -## ajv 8.20.0 - -License: MIT - -### LICENSE - -```text -The MIT License (MIT) - -Copyright (c) 2015-2021 Evgeny Poberezkin - -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. -``` - -### license - -```text -The MIT License (MIT) - -Copyright (c) 2015-2021 Evgeny Poberezkin - -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. -``` - -## ajv-formats 3.0.1 +## @modelcontextprotocol/sdk 1.32.0 License: MIT @@ -569,7 +236,7 @@ License: MIT ```text MIT License -Copyright (c) 2020 Evgeny Poberezkin +Copyright (c) 2024 Anthropic, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -590,12 +257,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license +## ajv 8.20.0 + +License: MIT + +### LICENSE ```text -MIT License +The MIT License (MIT) -Copyright (c) 2020 Evgeny Poberezkin +Copyright (c) 2015-2021 Evgeny Poberezkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -616,7 +287,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -## fast-deep-equal 3.1.3 +## ajv-formats 3.0.1 License: MIT @@ -625,7 +296,7 @@ License: MIT ```text MIT License -Copyright (c) 2017 Evgeny Poberezkin +Copyright (c) 2020 Evgeny Poberezkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -646,7 +317,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license +## fast-deep-equal 3.1.3 + +License: MIT + +### LICENSE ```text MIT License @@ -711,41 +386,6 @@ The complete list of contributors can be found at: - https://github.com/garycourt/uri-js/graphs/contributors ``` -### license - -```text -Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae -Copyright (c) 2021-present The Fastify team -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: -- https://github.com/garycourt/uri-js/graphs/contributors -``` - ## json-schema-traverse 1.0.0 License: MIT @@ -776,32 +416,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license - -```text -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -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. -``` - ## lucide-react 0.577.0 License: ISC @@ -850,50 +464,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license - -```text -ISC License - -Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2026 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2026. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---- - -The MIT License (MIT) (for portions derived from Feather) - -Copyright (c) 2013-2026 Cole Bemis - -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. -``` - ## react 19.3.0 License: MIT @@ -924,32 +494,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license - -```text -MIT License - -Copyright (c) Meta Platforms, Inc. and affiliates. - -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. -``` - ## react-dom 19.3.0 License: MIT @@ -980,32 +524,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license - -```text -MIT License - -Copyright (c) Meta Platforms, Inc. and affiliates. - -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. -``` - ## scheduler 0.28.0 License: MIT @@ -1036,32 +554,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license - -```text -MIT License - -Copyright (c) Meta Platforms, Inc. and affiliates. - -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. -``` - ## zod 3.25.76 License: MIT @@ -1092,32 +584,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -### license - -```text -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. -``` - ## zod-to-json-schema 3.25.2 License: ISC @@ -1141,23 +607,3 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ``` - -### license - -```text -ISC License - -Copyright (c) 2020, Stefan Terdell - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -``` diff --git a/docs/development.md b/docs/development.md index 0b5aefb..c1a96a6 100644 --- a/docs/development.md +++ b/docs/development.md @@ -11,7 +11,6 @@ npm run build npm test npx playwright install chromium npm run test:ui -npm run screenshots npm run graphics npm run benchmark npm run benchmark:startup @@ -32,6 +31,8 @@ The UI and stdio server are bundled, including licenses. The board loads no remo `npm run screenshots` seeds temporary projects and tasks, captures the current UI, and checks control layouts at desktop, tablet, and phone widths. It never uses your saved boards. `npm run graphics` runs those captures and renders the repository social image from `docs/graphics.html`. See [the graphics guide](graphics.md) for the asset map. +Run `npm ci --prefix site` and `npm test --prefix site` to verify the website, demo, download checksum, responsive layouts, and accessibility. The root typecheck also checks the demo transport. + Run Playwright suites sequentially: each suite owns `test-results/`. Screenshots show the actual browser-rendered interface with demonstration data, without simulated Codex window chrome. ## Release checks @@ -40,7 +41,7 @@ Build before testing the packaged protocol. Then run the release audit, packagin The installer keeps plugin files and task storage separate. Installer tests run with an isolated Codex home and verify cached MCP execution, cached resource URLs, and task persistence. `THREADBOARD_PREVIOUS_RELEASE` can point to an older extracted package to verify an upgrade. -The preview has 26 backend tests and 22 UI tests. Native board opening has been confirmed locally; the new full-view recovery control and card-launch project placement still need native-host verification. Browser and protocol checks cannot establish those behaviors. +The test suites cover storage, protocol, UI workflows, and the website demo. Native board opening has been confirmed locally; the new full-view recovery control and card-launch project placement still need native-host verification. Browser and protocol checks cannot establish those behaviors. ## Planning and history diff --git a/docs/graphics.html b/docs/graphics.html index 6500f68..04c2a5e 100644 --- a/docs/graphics.html +++ b/docs/graphics.html @@ -23,10 +23,10 @@
Threadboard
-

Give every
task a home.

Local boards for your Codex projects.

+

Task boards.
Inside Codex.

Local boards for your Codex projects.

Multiple boards per projectLightweight live updatesStored on your device
The Product board with tasks across five columns
-
github.com/vrnrn/Threadboard
+
threadboard.vrnrn.com
diff --git a/docs/images/board-dark.png b/docs/images/board-dark.png index c9de59e..08ffda4 100644 Binary files a/docs/images/board-dark.png and b/docs/images/board-dark.png differ diff --git a/docs/images/board-mobile-dark.png b/docs/images/board-mobile-dark.png index 01ae9ef..9c358ac 100644 Binary files a/docs/images/board-mobile-dark.png and b/docs/images/board-mobile-dark.png differ diff --git a/docs/images/board.png b/docs/images/board.png index 0a8905b..e1155f7 100644 Binary files a/docs/images/board.png and b/docs/images/board.png differ diff --git a/docs/images/cover-dark.svg b/docs/images/cover-dark.svg index ed8608b..f8eb0eb 100644 --- a/docs/images/cover-dark.svg +++ b/docs/images/cover-dark.svg @@ -7,7 +7,7 @@ Threadboard - Give every task a home. + Task boards. Inside Codex. Local boards for your Codex projects. PLAN · START A CHAT · REVIEW diff --git a/docs/images/cover.svg b/docs/images/cover.svg index 0ac50c5..9e668f7 100644 --- a/docs/images/cover.svg +++ b/docs/images/cover.svg @@ -7,7 +7,7 @@ Threadboard - Give every task a home. + Task boards. Inside Codex. Local boards for your Codex projects. PLAN · START A CHAT · REVIEW diff --git a/docs/images/empty-board-dark.png b/docs/images/empty-board-dark.png index b41aebf..56547af 100644 Binary files a/docs/images/empty-board-dark.png and b/docs/images/empty-board-dark.png differ diff --git a/docs/images/empty-projects-dark.png b/docs/images/empty-projects-dark.png index 33d9e0d..b205283 100644 Binary files a/docs/images/empty-projects-dark.png and b/docs/images/empty-projects-dark.png differ diff --git a/docs/images/overview-dark.png b/docs/images/overview-dark.png index 151dde1..c52ff76 100644 Binary files a/docs/images/overview-dark.png and b/docs/images/overview-dark.png differ diff --git a/docs/images/overview.png b/docs/images/overview.png index 019c52f..a3bfd96 100644 Binary files a/docs/images/overview.png and b/docs/images/overview.png differ diff --git a/docs/images/project-boards-dark.png b/docs/images/project-boards-dark.png index b547e44..69cfc18 100644 Binary files a/docs/images/project-boards-dark.png and b/docs/images/project-boards-dark.png differ diff --git a/docs/images/project-boards.png b/docs/images/project-boards.png index 68c8bcd..f7e0136 100644 Binary files a/docs/images/project-boards.png and b/docs/images/project-boards.png differ diff --git a/docs/images/social-preview.png b/docs/images/social-preview.png index 03406fe..59cc782 100644 Binary files a/docs/images/social-preview.png and b/docs/images/social-preview.png differ diff --git a/docs/images/task-detail-dark.png b/docs/images/task-detail-dark.png index 55654a4..d825486 100644 Binary files a/docs/images/task-detail-dark.png and b/docs/images/task-detail-dark.png differ diff --git a/docs/images/task-detail.png b/docs/images/task-detail.png index fc3b708..7590476 100644 Binary files a/docs/images/task-detail.png and b/docs/images/task-detail.png differ diff --git a/docs/images/task-review-dark.png b/docs/images/task-review-dark.png index 4b59b7e..9421200 100644 Binary files a/docs/images/task-review-dark.png and b/docs/images/task-review-dark.png differ diff --git a/docs/images/task-review.png b/docs/images/task-review.png index a96ae48..b9dcf02 100644 Binary files a/docs/images/task-review.png and b/docs/images/task-review.png differ diff --git a/docs/usage.md b/docs/usage.md index 5682097..4e83161 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,15 +1,16 @@ # Using Threadboard -This guide describes the current `0.1.4-dev.6` preview. The downloadable `0.1.1` release uses manually associated workspace boards and manual refresh. +This guide covers the current repository and [website preview](https://threadboard.vrnrn.com/). The older GitHub release, `0.1.1`, uses manually associated workspace boards and manual refresh. ## Open your projects - In the current preview, the **Your boards** overview lists boards grouped by existing Codex projects. Select a project in the sidebar to see its boards, then choose a board. The sidebar and breadcrumb provide a path back to the overview. Threadboard uses Codex's project IDs, names, and workspace roots. Renames update on refresh. Removing a project hides its board and retains its saved tasks; a different native project gets a separate board even if it uses the same directory. Older workspace boards migrate automatically when exactly one native project matches their directory. Unmatched or ambiguous older boards remain saved instead of being merged. Each project can have multiple named boards. Use the **Board** picker to switch. Existing cards stay on **General**; task numbers remain unique across the project. Cards, archives, dependencies, and exports belong to their selected board. -If Codex leaves Threadboard beside a blank chat after navigating Back, use **Open full view** (the expand icon beside Refresh). It opens Threadboard’s sidebar app through the [documented app deep link](https://github.com/openai/mcp-extensions/blob/main/docs/spec.md#deep-links), restoring the current project, named board, and archive view. Links contain only IDs and the archive flag. Codex controls its native Back history and pane arrangement; both a side panel and a sidebar app can report the `fullscreen` display mode. This control requests navigation to the sidebar app; its native layout still needs host verification. Incoming links wait for an open dialog to close, preserving unfinished drafts in that instance. +If Codex leaves Threadboard beside a blank chat after navigating Back, use **Open full view** (the expand icon beside Refresh). It requests the sidebar app with the selected project, board, and archive view. Codex controls the resulting pane layout; this recovery control still needs native-host verification. Incoming links wait for an open dialog to close, preserving unfinished drafts in that instance. + +## Work on a task The workflow is **Backlog → Ready → In progress → Review → Done**. Cards support descriptions, acceptance criteria, priorities, blocked reasons, prerequisites, activity notes, archiving and local JSON export. Use the card's move menu or the detail panel for keyboard-accessible moves; drag between columns with a pointer. @@ -18,10 +19,12 @@ The workflow is **Backlog → Ready → In progress → Review → Done**. Cards - **Review:** Read the owner's result and validation. Choose **Accept into Done** or **Request changes**. - **Board companion chat:** Creating a board asks Codex to create ` Threadboard` inside its native project through Codex’s own project-aware chat tool. The board saves only its chat ID. **Open board chat** becomes available when linked and navigates to it. Existing General boards have **Create board chat**. Interrupted setup offers **Finish chat setup**, which checks for an existing chat before recovery. This experiment requires the native host chat tools; unsupported hosts copy a setup prompt for you to send in Codex. It uses a normal Codex model turn, with no separate API integration. - **Floating chat context:** The native chat bubble receives the selected board and project IDs, names, and workspace as context. Switching boards replaces that context and clears a previously shared card. Automatic task contents are not attached. This context does not assign the host-created chat to the native project or change its working directory; use the chat's **Project** menu for membership. The current extension API has no native project destination parameter. -- **Other chats' changes:** Visible boards check a small local revision token once per second and reload cards only after local storage or project metadata changes. Checks pause when the document or panel is hidden and resume immediately on returning. Open drafts, unsent notes, and loaded pages are preserved. Temporary failures back off to 30 seconds; **Refresh board** remains available. This updates states reported through Threadboard tools; it does not infer progress from chat content or generate model turns. +- **Other chats' changes:** Visible boards check a small local revision token once per second and reload cards only after local storage or project metadata changes. Checks pause when the document or panel is hidden and resume immediately on returning. Open drafts, unsent notes, and loaded pages are preserved, including during manual refresh. If the board changes between page reads, Threadboard reloads the pages together. Temporary failures back off to 30 seconds; **Refresh board** remains available. This updates states reported through Threadboard tools; it does not infer progress from chat content or generate model turns. Chat links use explicitly supplied native chat IDs. The plugin does not inspect transcripts. If a launch is interrupted, reopen its prepared link while the board remains open or copy its prompt. After reopening the board, release the old reservation and start again if its prompt is unavailable. Reservations expire for binding after 15 minutes and require explicit release to reuse the task. Quiet running chats keep ownership until submission or explicit release. +## Keyboard and search + Shortcuts: **N** creates a task, **⌘/Ctrl K** focuses search, **Escape** closes a dialog. Search and filters apply to loaded cards; use **Load more tasks** for boards above 200 cards. Task detail displays the latest 50 activity events; export includes all events. ## Data and updates diff --git a/package-lock.json b/package-lock.json index 930f047..271e519 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "threadboard", - "version": "0.1.4-dev.7", + "version": "0.1.4-dev.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "threadboard", - "version": "0.1.4-dev.7", + "version": "0.1.4-dev.8", "license": "MIT", "dependencies": { "@modelcontextprotocol/ext-apps": "1.7.5", diff --git a/package.json b/package.json index c4d7827..b6bccdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "threadboard", - "version": "0.1.4-dev.7", + "version": "0.1.4-dev.8", "private": true, "type": "module", "description": "A fully local Kanban board inside Codex.", diff --git a/plugins/threadboard/.codex-plugin/plugin.json b/plugins/threadboard/.codex-plugin/plugin.json index d34a86d..e4dd694 100644 --- a/plugins/threadboard/.codex-plugin/plugin.json +++ b/plugins/threadboard/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "threadboard", - "version": "0.1.4-dev.7", + "version": "0.1.4-dev.8", "description": "A fully local Kanban board inside Codex. Create tasks, coordinate chats, and review completed work without a hosted service.", "author": { "name": "Threadboard contributors" diff --git a/plugins/threadboard/dist/board.html b/plugins/threadboard/dist/board.html index 654d729..b85eb2b 100644 --- a/plugins/threadboard/dist/board.html +++ b/plugins/threadboard/dist/board.html @@ -1,5 +1,5 @@ Threadboard
\ No newline at end of file diff --git a/plugins/threadboard/dist/build-info.json b/plugins/threadboard/dist/build-info.json index 18c916a..84ba3a1 100644 --- a/plugins/threadboard/dist/build-info.json +++ b/plugins/threadboard/dist/build-info.json @@ -1,6 +1,6 @@ { - "version": "0.1.4-dev.7", - "uiGzipBytes": 153368, - "htmlBytes": 609378, + "version": "0.1.4-dev.8", + "uiGzipBytes": 153485, + "htmlBytes": 609790, "runtime": "Node >=22.13" } diff --git a/plugins/threadboard/dist/server.mjs b/plugins/threadboard/dist/server.mjs index dc7204e..04414ac 100644 --- a/plugins/threadboard/dist/server.mjs +++ b/plugins/threadboard/dist/server.mjs @@ -1,5 +1,5 @@ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url); -var Ax=Object.create;var rl=Object.defineProperty;var Dx=Object.getOwnPropertyDescriptor;var Ux=Object.getOwnPropertyNames;var Mx=Object.getPrototypeOf,Zx=Object.prototype.hasOwnProperty;var br=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var O=(t,e)=>()=>(t&&(e=t(t=0)),e);var j=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Gt=(t,e)=>{for(var r in e)rl(t,r,{get:e[r],enumerable:!0})},Lx=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ux(e))!Zx.call(t,n)&&n!==r&&rl(t,n,{get:()=>e[n],enumerable:!(o=Dx(e,n))||o.enumerable});return t};var ph=(t,e,r)=>(r=t!=null?Ax(Mx(t)):{},Lx(e||!t||!t.__esModule?rl(r,"default",{value:t,enumerable:!0}):r,t));function v(t,e,r){function o(s,c){var u;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(u=s._zod).traits??(u.traits=new Set),s._zod.traits.add(t),e(s,c);for(let l in a.prototype)l in s||Object.defineProperty(s,l,{value:a.prototype[l].bind(s)});s._zod.constr=a,s._zod.def=c}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:t});function a(s){var c;let u=r?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}function xe(t){return t&&Object.assign($o,t),$o}var Ta,za,zt,$o,bn=O(()=>{Ta=Object.freeze({status:"aborted"});za=Symbol("zod_brand"),zt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$o={}});var E={};Gt(E,{BIGINT_FORMAT_RANGES:()=>gl,Class:()=>cl,NUMBER_FORMAT_RANGES:()=>hl,aborted:()=>Ur,allowsEval:()=>pl,assert:()=>tw,assertEqual:()=>Xk,assertIs:()=>Qk,assertNever:()=>ew,assertNotEqual:()=>Yk,assignProp:()=>dl,cached:()=>wo,captureStackTrace:()=>ja,cleanEnum:()=>fw,cleanRegex:()=>So,clone:()=>Ce,createTransparentProxy:()=>sw,defineLazy:()=>ue,esc:()=>Dr,escapeRegex:()=>Zt,extend:()=>lw,finalizeIssue:()=>ot,floatSafeRemainder:()=>ll,getElementAtPath:()=>rw,getEnumValues:()=>ko,getLengthableOrigin:()=>To,getParsedType:()=>aw,getSizableOrigin:()=>Eo,isObject:()=>$n,isPlainObject:()=>xn,issue:()=>vl,joinValues:()=>b,jsonStringifyReplacer:()=>ul,merge:()=>dw,normalizeParams:()=>I,nullish:()=>er,numKeys:()=>iw,omit:()=>uw,optionalKeys:()=>fl,partial:()=>pw,pick:()=>cw,prefixIssues:()=>Xe,primitiveTypes:()=>ml,promiseAllObject:()=>nw,propertyKeyTypes:()=>Io,randomString:()=>ow,required:()=>mw,stringifyPrimitive:()=>T,unwrapMessage:()=>xo});function Xk(t){return t}function Yk(t){return t}function Qk(t){}function ew(t){throw new Error}function tw(t){}function ko(t){let e=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,n])=>e.indexOf(+o)===-1).map(([o,n])=>n)}function b(t,e="|"){return t.map(r=>T(r)).join(e)}function ul(t,e){return typeof e=="bigint"?e.toString():e}function wo(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function er(t){return t==null}function So(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function ll(t,e){let r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return i%a/10**n}function ue(t,e,r){Object.defineProperty(t,e,{get(){{let n=r();return t[e]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function dl(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function rw(t,e){return e?e.reduce((r,o)=>r?.[o],t):t}function nw(t){let e=Object.keys(t),r=e.map(o=>t[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;ie};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function sw(t){let e;return new Proxy({},{get(r,o,n){return e??(e=t()),Reflect.get(e,o,n)},set(r,o,n,i){return e??(e=t()),Reflect.set(e,o,n,i)},has(r,o){return e??(e=t()),Reflect.has(e,o)},deleteProperty(r,o){return e??(e=t()),Reflect.deleteProperty(e,o)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,o){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,o)},defineProperty(r,o,n){return e??(e=t()),Reflect.defineProperty(e,o,n)}})}function T(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function fl(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function cw(t,e){let r={},o=t._zod.def;for(let n in e){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&(r[n]=o.shape[n])}return Ce(t,{...t._zod.def,shape:r,checks:[]})}function uw(t,e){let r={...t._zod.def.shape},o=t._zod.def;for(let n in e){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&delete r[n]}return Ce(t,{...t._zod.def,shape:r,checks:[]})}function lw(t,e){if(!xn(e))throw new Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let o={...t._zod.def.shape,...e};return dl(this,"shape",o),o},checks:[]};return Ce(t,r)}function dw(t,e){return Ce(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return dl(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function pw(t,e,r){let o=e._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=t?new t({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)n[i]=t?new t({type:"optional",innerType:o[i]}):o[i];return Ce(e,{...e._zod.def,shape:n,checks:[]})}function mw(t,e,r){let o=e._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new t({type:"nonoptional",innerType:o[i]}))}else for(let i in o)n[i]=new t({type:"nonoptional",innerType:o[i]});return Ce(e,{...e._zod.def,shape:n,checks:[]})}function Ur(t,e=0){for(let r=e;r{var o;return(o=r).path??(o.path=[]),r.path.unshift(t),r})}function xo(t){return typeof t=="string"?t:t?.message}function ot(t,e,r){let o={...t,path:t.path??[]};if(!t.message){let n=xo(t.inst?._zod.def?.error?.(t))??xo(e?.error?.(t))??xo(r.customError?.(t))??xo(r.localeError?.(t))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,e?.reportInput||delete o.input,o}function Eo(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function To(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function vl(...t){let[e,r,o]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:o}:{...e}}function fw(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var ja,pl,aw,Io,ml,hl,gl,cl,V=O(()=>{ja=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};pl=wo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});aw=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Io=new Set(["string","number","symbol"]),ml=new Set(["string","number","bigint","boolean","symbol","undefined"]);hl={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},gl={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};cl=class{constructor(...e){}}});function wn(t,e=r=>r.message){let r={},o=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):o.push(e(n));return{formErrors:o,fieldErrors:r}}function Sn(t,e){let r=e||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)o._errors.push(r(a));else{let s=o,c=0;for(;c{var s,c;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>n({issues:l},u.path));else if(u.code==="invalid_key")n({issues:u.issues},u.path);else if(u.code==="invalid_element")n({issues:u.issues},u.path);else{let l=[...a,...u.path];if(l.length===0){o.errors.push(r(u));continue}let d=o,g=0;for(;go.path.length-n.path.length);for(let o of r)e.push(`\u2716 ${o.message}`),o.path?.length&&e.push(` \u2192 at ${Sh(o.path)}`);return e.join(` +var Ax=Object.create;var rl=Object.defineProperty;var Dx=Object.getOwnPropertyDescriptor;var Ux=Object.getOwnPropertyNames;var Mx=Object.getPrototypeOf,Zx=Object.prototype.hasOwnProperty;var br=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var O=(t,e)=>()=>(t&&(e=t(t=0)),e);var j=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Gt=(t,e)=>{for(var r in e)rl(t,r,{get:e[r],enumerable:!0})},Lx=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ux(e))!Zx.call(t,n)&&n!==r&&rl(t,n,{get:()=>e[n],enumerable:!(o=Dx(e,n))||o.enumerable});return t};var ph=(t,e,r)=>(r=t!=null?Ax(Mx(t)):{},Lx(e||!t||!t.__esModule?rl(r,"default",{value:t,enumerable:!0}):r,t));function v(t,e,r){function o(s,c){var u;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(u=s._zod).traits??(u.traits=new Set),s._zod.traits.add(t),e(s,c);for(let l in a.prototype)l in s||Object.defineProperty(s,l,{value:a.prototype[l].bind(s)});s._zod.constr=a,s._zod.def=c}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:t});function a(s){var c;let u=r?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}function xe(t){return t&&Object.assign($o,t),$o}var Ta,za,zt,$o,bn=O(()=>{Ta=Object.freeze({status:"aborted"});za=Symbol("zod_brand"),zt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$o={}});var E={};Gt(E,{BIGINT_FORMAT_RANGES:()=>gl,Class:()=>cl,NUMBER_FORMAT_RANGES:()=>hl,aborted:()=>Ur,allowsEval:()=>pl,assert:()=>tw,assertEqual:()=>Xk,assertIs:()=>Qk,assertNever:()=>ew,assertNotEqual:()=>Yk,assignProp:()=>dl,cached:()=>wo,captureStackTrace:()=>ja,cleanEnum:()=>fw,cleanRegex:()=>So,clone:()=>Ae,createTransparentProxy:()=>sw,defineLazy:()=>ue,esc:()=>Dr,escapeRegex:()=>Zt,extend:()=>lw,finalizeIssue:()=>ot,floatSafeRemainder:()=>ll,getElementAtPath:()=>rw,getEnumValues:()=>ko,getLengthableOrigin:()=>To,getParsedType:()=>aw,getSizableOrigin:()=>Eo,isObject:()=>$n,isPlainObject:()=>xn,issue:()=>vl,joinValues:()=>b,jsonStringifyReplacer:()=>ul,merge:()=>dw,normalizeParams:()=>I,nullish:()=>er,numKeys:()=>iw,omit:()=>uw,optionalKeys:()=>fl,partial:()=>pw,pick:()=>cw,prefixIssues:()=>Xe,primitiveTypes:()=>ml,promiseAllObject:()=>nw,propertyKeyTypes:()=>Io,randomString:()=>ow,required:()=>mw,stringifyPrimitive:()=>T,unwrapMessage:()=>xo});function Xk(t){return t}function Yk(t){return t}function Qk(t){}function ew(t){throw new Error}function tw(t){}function ko(t){let e=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,n])=>e.indexOf(+o)===-1).map(([o,n])=>n)}function b(t,e="|"){return t.map(r=>T(r)).join(e)}function ul(t,e){return typeof e=="bigint"?e.toString():e}function wo(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function er(t){return t==null}function So(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function ll(t,e){let r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return i%a/10**n}function ue(t,e,r){Object.defineProperty(t,e,{get(){{let n=r();return t[e]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function dl(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function rw(t,e){return e?e.reduce((r,o)=>r?.[o],t):t}function nw(t){let e=Object.keys(t),r=e.map(o=>t[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;ie};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function sw(t){let e;return new Proxy({},{get(r,o,n){return e??(e=t()),Reflect.get(e,o,n)},set(r,o,n,i){return e??(e=t()),Reflect.set(e,o,n,i)},has(r,o){return e??(e=t()),Reflect.has(e,o)},deleteProperty(r,o){return e??(e=t()),Reflect.deleteProperty(e,o)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,o){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,o)},defineProperty(r,o,n){return e??(e=t()),Reflect.defineProperty(e,o,n)}})}function T(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function fl(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function cw(t,e){let r={},o=t._zod.def;for(let n in e){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&(r[n]=o.shape[n])}return Ae(t,{...t._zod.def,shape:r,checks:[]})}function uw(t,e){let r={...t._zod.def.shape},o=t._zod.def;for(let n in e){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&delete r[n]}return Ae(t,{...t._zod.def,shape:r,checks:[]})}function lw(t,e){if(!xn(e))throw new Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let o={...t._zod.def.shape,...e};return dl(this,"shape",o),o},checks:[]};return Ae(t,r)}function dw(t,e){return Ae(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return dl(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function pw(t,e,r){let o=e._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=t?new t({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)n[i]=t?new t({type:"optional",innerType:o[i]}):o[i];return Ae(e,{...e._zod.def,shape:n,checks:[]})}function mw(t,e,r){let o=e._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new t({type:"nonoptional",innerType:o[i]}))}else for(let i in o)n[i]=new t({type:"nonoptional",innerType:o[i]});return Ae(e,{...e._zod.def,shape:n,checks:[]})}function Ur(t,e=0){for(let r=e;r{var o;return(o=r).path??(o.path=[]),r.path.unshift(t),r})}function xo(t){return typeof t=="string"?t:t?.message}function ot(t,e,r){let o={...t,path:t.path??[]};if(!t.message){let n=xo(t.inst?._zod.def?.error?.(t))??xo(e?.error?.(t))??xo(r.customError?.(t))??xo(r.localeError?.(t))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,e?.reportInput||delete o.input,o}function Eo(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function To(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function vl(...t){let[e,r,o]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:o}:{...e}}function fw(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var ja,pl,aw,Io,ml,hl,gl,cl,V=O(()=>{ja=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};pl=wo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});aw=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Io=new Set(["string","number","symbol"]),ml=new Set(["string","number","bigint","boolean","symbol","undefined"]);hl={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},gl={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};cl=class{constructor(...e){}}});function wn(t,e=r=>r.message){let r={},o=[];for(let n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):o.push(e(n));return{formErrors:o,fieldErrors:r}}function Sn(t,e){let r=e||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)o._errors.push(r(a));else{let s=o,c=0;for(;c{var s,c;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>n({issues:l},u.path));else if(u.code==="invalid_key")n({issues:u.issues},u.path);else if(u.code==="invalid_element")n({issues:u.issues},u.path);else{let l=[...a,...u.path];if(l.length===0){o.errors.push(r(u));continue}let d=o,g=0;for(;go.path.length-n.path.length);for(let o of r)e.push(`\u2716 ${o.message}`),o.path?.length&&e.push(` \u2192 at ${Sh(o.path)}`);return e.join(` `)}var wh,zo,kn,_l=O(()=>{bn();V();wh=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,ul,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},zo=v("$ZodError",wh),kn=v("$ZodError",wh,{Parent:Error})});var Na,Mr,Oa,Zr,Ca,tr,Aa,rr,Da=O(()=>{bn();_l();V();Na=t=>(e,r,o,n)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new zt;if(a.issues.length){let s=new(n?.Err??t)(a.issues.map(c=>ot(c,i,xe())));throw ja(s,n?.callee),s}return a.value},Mr=Na(kn),Oa=t=>async(e,r,o,n)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??t)(a.issues.map(c=>ot(c,i,xe())));throw ja(s,n?.callee),s}return a.value},Zr=Oa(kn),Ca=t=>(e,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=e._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new zt;return i.issues.length?{success:!1,error:new(t??zo)(i.issues.map(a=>ot(a,n,xe())))}:{success:!0,data:i.value}},tr=Ca(kn),Aa=t=>async(e,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=e._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(a=>ot(a,n,xe())))}:{success:!0,data:i.value}},rr=Aa(kn)});var nr={};Gt(nr,{_emoji:()=>Ih,base64:()=>Nl,base64url:()=>Ua,bigint:()=>Zl,boolean:()=>Fl,browserEmail:()=>kw,cidrv4:()=>Pl,cidrv6:()=>Rl,cuid:()=>yl,cuid2:()=>bl,date:()=>Al,datetime:()=>Ul,domain:()=>ww,duration:()=>Sl,e164:()=>Cl,email:()=>El,emoji:()=>Tl,extendedDuration:()=>gw,guid:()=>Il,hostname:()=>Ol,html5Email:()=>bw,integer:()=>Ll,ipv4:()=>zl,ipv6:()=>jl,ksuid:()=>kl,lowercase:()=>Bl,nanoid:()=>wl,null:()=>Vl,number:()=>ql,rfc5322Email:()=>$w,string:()=>Ml,time:()=>Dl,ulid:()=>$l,undefined:()=>Hl,unicodeEmail:()=>xw,uppercase:()=>Wl,uuid:()=>Lr,uuid4:()=>vw,uuid6:()=>_w,uuid7:()=>yw,xid:()=>xl});function Tl(){return new RegExp(Ih,"u")}function Th(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Dl(t){return new RegExp(`^${Th(t)}$`)}function Ul(t){let e=Th({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let o=`${e}(?:${r.join("|")})`;return new RegExp(`^${Eh}T(?:${o})$`)}var yl,bl,$l,xl,kl,wl,Sl,gw,Il,Lr,vw,_w,yw,El,bw,$w,xw,kw,Ih,zl,jl,Pl,Rl,Nl,Ua,Ol,ww,Cl,Eh,Al,Ml,Zl,Ll,ql,Fl,Vl,Hl,Bl,Wl,Ma=O(()=>{yl=/^[cC][^\s-]{8,}$/,bl=/^[0-9a-z]+$/,$l=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xl=/^[0-9a-vA-V]{20}$/,kl=/^[A-Za-z0-9]{27}$/,wl=/^[a-zA-Z0-9_-]{21}$/,Sl=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gw=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Il=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Lr=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,vw=Lr(4),_w=Lr(6),yw=Lr(7),El=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bw=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,$w=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,xw=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,kw=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ih="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";zl=/^(?:(?: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])$/,jl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Pl=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Rl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ua=/^[A-Za-z0-9_-]*$/,Ol=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,ww=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Cl=/^\+(?:[0-9]){6,14}[0-9]$/,Eh="(?:(?:\\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])))",Al=new RegExp(`^${Eh}$`);Ml=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Zl=/^\d+n?$/,Ll=/^\d+$/,ql=/^-?\d+(?:\.\d+)?/i,Fl=/true|false/i,Vl=/null/i,Hl=/undefined/i,Bl=/^[^A-Z]*$/,Wl=/^[^a-z]*$/});function zh(t,e,r){t.issues.length&&e.issues.push(...Xe(r,t.issues))}var be,jh,Za,La,Jl,Gl,Kl,Xl,Yl,Ql,ed,td,rd,In,nd,od,id,ad,sd,cd,ud,ld,dd,qa=O(()=>{bn();Ma();V();be=v("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),jh={number:"number",bigint:"bigint",object:"date"},Za=v("$ZodCheckLessThan",(t,e)=>{be.init(t,e);let r=jh[typeof e.value];t._zod.onattach.push(o=>{let n=o._zod.bag,i=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value{(e.inclusive?o.value<=e.value:o.value{be.init(t,e);let r=jh[typeof e.value];t._zod.onattach.push(o=>{let n=o._zod.bag,i=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value>=e.value:o.value>e.value)||o.issues.push({origin:r,code:"too_small",minimum:e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Jl=v("$ZodCheckMultipleOf",(t,e)=>{be.init(t,e),t._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):ll(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),Gl=v("$ZodCheckNumberFormat",(t,e)=>{be.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),o=r?"int":"number",[n,i]=hl[e.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Ll)}),t._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:e.format,code:"invalid_type",input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,continue:!e.abort});return}}si&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:t})}}),Kl=v("$ZodCheckBigIntFormat",(t,e)=>{be.init(t,e);let[r,o]=gl[e.format];t._zod.onattach.push(n=>{let i=n._zod.bag;i.format=e.format,i.minimum=r,i.maximum=o}),t._zod.check=n=>{let i=n.value;io&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:t})}}),Xl=v("$ZodCheckMaxSize",(t,e)=>{var r;be.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!er(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let n=o.value;n.size<=e.maximum||o.issues.push({origin:Eo(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),Yl=v("$ZodCheckMinSize",(t,e)=>{var r;be.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!er(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{let n=o.value;n.size>=e.minimum||o.issues.push({origin:Eo(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),Ql=v("$ZodCheckSizeEquals",(t,e)=>{var r;be.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!er(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=o=>{let n=o.value,i=n.size;if(i===e.size)return;let a=i>e.size;o.issues.push({origin:Eo(n),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),ed=v("$ZodCheckMaxLength",(t,e)=>{var r;be.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!er(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let n=o.value;if(n.length<=e.maximum)return;let a=To(n);o.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),td=v("$ZodCheckMinLength",(t,e)=>{var r;be.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!er(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{let n=o.value;if(n.length>=e.minimum)return;let a=To(n);o.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),rd=v("$ZodCheckLengthEquals",(t,e)=>{var r;be.init(t,e),(r=t._zod.def).when??(r.when=o=>{let n=o.value;return!er(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=o=>{let n=o.value,i=n.length;if(i===e.length)return;let a=To(n),s=i>e.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),In=v("$ZodCheckStringFormat",(t,e)=>{var r,o;be.init(t,e),t._zod.onattach.push(n=>{let i=n._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(o=t._zod).check??(o.check=()=>{})}),nd=v("$ZodCheckRegex",(t,e)=>{In.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),od=v("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Bl),In.init(t,e)}),id=v("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Wl),In.init(t,e)}),ad=v("$ZodCheckIncludes",(t,e)=>{be.init(t,e);let r=Zt(e.includes),o=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=o,t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),sd=v("$ZodCheckStartsWith",(t,e)=>{be.init(t,e);let r=new RegExp(`^${Zt(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=o=>{o.value.startsWith(e.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:o.value,inst:t,continue:!e.abort})}}),cd=v("$ZodCheckEndsWith",(t,e)=>{be.init(t,e);let r=new RegExp(`.*${Zt(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=o=>{o.value.endsWith(e.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:o.value,inst:t,continue:!e.abort})}});ud=v("$ZodCheckProperty",(t,e)=>{be.init(t,e),t._zod.check=r=>{let o=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>zh(n,r,e.property));zh(o,r,e.property)}}),ld=v("$ZodCheckMimeType",(t,e)=>{be.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=e.mime}),t._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:e.mime,input:o.value.type,inst:t})}}),dd=v("$ZodCheckOverwrite",(t,e)=>{be.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var jo,pd=O(()=>{jo=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let o=e.split(` `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(` `))}}});var md,fd=O(()=>{md={major:4,minor:0,patch:0}});function bd(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Fh(t){if(!Ua.test(t))return!1;let e=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return bd(r)}function Vh(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}function Rh(t,e,r){t.issues.length&&e.issues.push(...Xe(r,t.issues)),e.value[r]=t.value}function Fa(t,e,r){t.issues.length&&e.issues.push(...Xe(r,t.issues)),e.value[r]=t.value}function Nh(t,e,r,o){t.issues.length?o[r]===void 0?r in o?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...Xe(r,t.issues)):t.value===void 0?r in o&&(e.value[r]=void 0):e.value[r]=t.value}function Oh(t,e,r,o){for(let n of t)if(n.issues.length===0)return e.value=n.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(n=>n.issues.map(i=>ot(i,o,xe())))}),e}function hd(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(xn(t)&&xn(e)){let r=Object.keys(e),o=Object.keys(t).filter(i=>r.indexOf(i)!==-1),n={...t,...e};for(let i of o){let a=hd(t[i],e[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;oot(s,a,xe()))})),e.issues.length&&(Io.has(typeof o)?r.issues.push(...Xe(o,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:e.issues.map(s=>ot(s,a,xe()))})),r.value.set(t.value,e.value)}function Dh(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function Uh(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function Mh(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function Zh(t,e,r){return Ur(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}function Lh(t){return t.value=Object.freeze(t.value),t}function qh(t,e,r,o){if(!t){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),e.issues.push(vl(n))}}var H,or,le,Ha,Ba,Wa,Ja,Ga,Ka,Xa,Ya,Qa,es,ts,gd,vd,_d,yd,rs,ns,os,is,as,ss,cs,us,ls,Po,ds,En,Ro,ps,ms,fs,hs,gs,qr,vs,_s,ys,Tn,No,Oo,bs,$s,ir,xs,ks,ws,Ss,Is,Es,zn,Ts,zs,js,Ps,Rs,Ns,Os,Cs,jn,As,Ds,Us,Ms,Zs,Co=O(()=>{qa();bn();pd();Da();Ma();V();fd();V();H=v("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=md;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let n of o)for(let i of n._zod.onattach)i(t);if(o.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(i,a,s)=>{let c=Ur(i),u;for(let l of a){if(l._zod.def.when){if(!l._zod.def.when(i))continue}else if(c)continue;let d=i.issues.length,g=l._zod.check(i);if(g instanceof Promise&&s?.async===!1)throw new zt;if(u||g instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await g,i.issues.length!==d&&(c||(c=Ur(i,d)))});else{if(i.issues.length===d)continue;c||(c=Ur(i,d))}}return u?u.then(()=>i):i};t._zod.run=(i,a)=>{let s=t._zod.parse(i,a);if(s instanceof Promise){if(a.async===!1)throw new zt;return s.then(c=>n(c,o,a))}return n(s,o,a)}}t["~standard"]={validate:n=>{try{let i=tr(t,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return rr(t,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),or=v("$ZodString",(t,e)=>{H.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Ml(t._zod.bag),t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),le=v("$ZodStringFormat",(t,e)=>{In.init(t,e),or.init(t,e)}),Ha=v("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Il),le.init(t,e)}),Ba=v("$ZodUUID",(t,e)=>{if(e.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(o===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Lr(o))}else e.pattern??(e.pattern=Lr());le.init(t,e)}),Wa=v("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=El),le.init(t,e)}),Ja=v("$ZodURL",(t,e)=>{le.init(t,e),t._zod.check=r=>{try{let o=r.value,n=new URL(o),i=n.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Ol.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!o.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Ga=v("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Tl()),le.init(t,e)}),Ka=v("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=wl),le.init(t,e)}),Xa=v("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=yl),le.init(t,e)}),Ya=v("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=bl),le.init(t,e)}),Qa=v("$ZodULID",(t,e)=>{e.pattern??(e.pattern=$l),le.init(t,e)}),es=v("$ZodXID",(t,e)=>{e.pattern??(e.pattern=xl),le.init(t,e)}),ts=v("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=kl),le.init(t,e)}),gd=v("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Ul(e)),le.init(t,e)}),vd=v("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Al),le.init(t,e)}),_d=v("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Dl(e)),le.init(t,e)}),yd=v("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Sl),le.init(t,e)}),rs=v("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=zl),le.init(t,e),t._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4"})}),ns=v("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=jl),le.init(t,e),t._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),os=v("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Pl),le.init(t,e)}),is=v("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Rl),le.init(t,e),t._zod.check=r=>{let[o,n]=r.value.split("/");try{if(!n)throw new Error;let i=Number(n);if(`${i}`!==n)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});as=v("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Nl),le.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{bd(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});ss=v("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ua),le.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Fh(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),cs=v("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Cl),le.init(t,e)});us=v("$ZodJWT",(t,e)=>{le.init(t,e),t._zod.check=r=>{Vh(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),ls=v("$ZodCustomStringFormat",(t,e)=>{le.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Po=v("$ZodNumber",(t,e)=>{H.init(t,e),t._zod.pattern=t._zod.bag.pattern??ql,t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...i?{received:i}:{}}),r}}),ds=v("$ZodNumber",(t,e)=>{Gl.init(t,e),Po.init(t,e)}),En=v("$ZodBoolean",(t,e)=>{H.init(t,e),t._zod.pattern=Fl,t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),r}}),Ro=v("$ZodBigInt",(t,e)=>{H.init(t,e),t._zod.pattern=Zl,t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),ps=v("$ZodBigInt",(t,e)=>{Kl.init(t,e),Ro.init(t,e)}),ms=v("$ZodSymbol",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),fs=v("$ZodUndefined",(t,e)=>{H.init(t,e),t._zod.pattern=Hl,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),hs=v("$ZodNull",(t,e)=>{H.init(t,e),t._zod.pattern=Vl,t._zod.values=new Set([null]),t._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),gs=v("$ZodAny",(t,e)=>{H.init(t,e),t._zod.parse=r=>r}),qr=v("$ZodUnknown",(t,e)=>{H.init(t,e),t._zod.parse=r=>r}),vs=v("$ZodNever",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),_s=v("$ZodVoid",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),ys=v("$ZodDate",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:t}),r}});Tn=v("$ZodArray",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);let i=[];for(let a=0;aRh(u,r,a))):Rh(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});No=v("$ZodObject",(t,e)=>{H.init(t,e);let r=wo(()=>{let d=Object.keys(e.shape);for(let h of d)if(!(e.shape[h]instanceof H))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let g=fl(e.shape);return{shape:e.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(g)}});ue(t._zod,"propValues",()=>{let d=e.shape,g={};for(let h in d){let m=d[h]._zod;if(m.values){g[h]??(g[h]=new Set);for(let f of m.values)g[h].add(f)}}return g});let o=d=>{let g=new jo(["shape","payload","ctx"]),h=r.value,m=$=>{let k=Dr($);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};g.write("const input = payload.value;");let f=Object.create(null),_=0;for(let $ of h.keys)f[$]=`key_${_++}`;g.write("const newResult = {}");for(let $ of h.keys)if(h.optionalKeys.has($)){let k=f[$];g.write(`const ${k} = ${m($)};`);let C=Dr($);g.write(` @@ -27,15 +27,15 @@ var Ax=Object.create;var rl=Object.defineProperty;var Dx=Object.getOwnPropertyDe path: iss.path ? [${Dr($)}, ...iss.path] : [${Dr($)}] })));`),g.write(`newResult[${Dr($)}] = ${k}.value`)}g.write("payload.value = newResult;"),g.write("return payload;");let x=g.compile();return($,k)=>x(d,$,k)},n,i=$n,a=!$o.jitless,c=a&&pl.value,u=e.catchall,l;t._zod.parse=(d,g)=>{l??(l=r.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d;let m=[];if(a&&c&&g?.async===!1&&g.jitless!==!0)n||(n=o(e.shape)),d=n(d,g);else{d.value={};let k=l.shape;for(let C of l.keys){let L=k[C],qe=L._zod.run({value:h[C],issues:[]},g),at=L._zod.optin==="optional"&&L._zod.optout==="optional";qe instanceof Promise?m.push(qe.then(dn=>at?Nh(dn,d,C,h):Fa(dn,d,C))):at?Nh(qe,d,C,h):Fa(qe,d,C)}}if(!u)return m.length?Promise.all(m).then(()=>d):d;let f=[],_=l.keySet,x=u._zod,$=x.def.type;for(let k of Object.keys(h)){if(_.has(k))continue;if($==="never"){f.push(k);continue}let C=x.run({value:h[k],issues:[]},g);C instanceof Promise?m.push(C.then(L=>Fa(L,d,k))):Fa(C,d,k)}return f.length&&d.issues.push({code:"unrecognized_keys",keys:f,input:h,inst:t}),m.length?Promise.all(m).then(()=>d):d}});Oo=v("$ZodUnion",(t,e)=>{H.init(t,e),ue(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ue(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ue(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),ue(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>So(o.source)).join("|")})$`)}}),t._zod.parse=(r,o)=>{let n=!1,i=[];for(let a of e.options){let s=a._zod.run({value:r.value,issues:[]},o);if(s instanceof Promise)i.push(s),n=!0;else{if(s.issues.length===0)return s;i.push(s)}}return n?Promise.all(i).then(a=>Oh(a,r,t,o)):Oh(i,r,t,o)}}),bs=v("$ZodDiscriminatedUnion",(t,e)=>{Oo.init(t,e);let r=t._zod.parse;ue(t._zod,"propValues",()=>{let n={};for(let i of e.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let u of c)n[s].add(u)}}return n});let o=wo(()=>{let n=e.options,i=new Map;for(let a of n){let s=a._zod.propValues[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});t._zod.parse=(n,i)=>{let a=n.value;if(!$n(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),n;let s=o.value.get(a?.[e.discriminator]);return s?s._zod.run(n,i):e.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[e.discriminator],inst:t}),n)}}),$s=v("$ZodIntersection",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value,i=e.left._zod.run({value:n,issues:[]},o),a=e.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>Ch(r,c,u)):Ch(r,i,a)}});ir=v("$ZodTuple",(t,e)=>{H.init(t,e);let r=e.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");t._zod.parse=(n,i)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[];if(!e.rest){let u=a.length>r.length,l=a.length=a.length&&c>=o)continue;let l=u._zod.run({value:a[c],issues:[]},i);l instanceof Promise?s.push(l.then(d=>Va(d,n,c))):Va(l,n,c)}if(e.rest){let u=a.slice(r.length);for(let l of u){c++;let d=e.rest._zod.run({value:l,issues:[]},i);d instanceof Promise?s.push(d.then(g=>Va(g,n,c))):Va(d,n,c)}}return s.length?Promise.all(s).then(()=>n):n}});xs=v("$ZodRecord",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!xn(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;let i=[];if(e.keyType._zod.values){let a=e.keyType._zod.values;r.value={};for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=e.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(l=>{l.issues.length&&r.issues.push(...Xe(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...Xe(c,u.issues)),r.value[c]=u.value)}let s;for(let c in n)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:s})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__")continue;let s=e.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:s.issues.map(u=>ot(u,o,xe())),input:a,path:[a],inst:t}),r.value[s.value]=s.value;continue}let c=e.valueType._zod.run({value:n[a],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...Xe(a,u.issues)),r.value[s.value]=u.value})):(c.issues.length&&r.issues.push(...Xe(a,c.issues)),r.value[s.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),ks=v("$ZodMap",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;let i=[];r.value=new Map;for(let[a,s]of n){let c=e.keyType._zod.run({value:a,issues:[]},o),u=e.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{Ah(l,d,r,a,n,t,o)})):Ah(c,u,r,a,n,t,o)}return i.length?Promise.all(i).then(()=>r):r}});ws=v("$ZodSet",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of n){let s=e.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>Dh(c,r))):Dh(s,r)}return i.length?Promise.all(i).then(()=>r):r}});Ss=v("$ZodEnum",(t,e)=>{H.init(t,e);let r=ko(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(o=>Io.has(typeof o)).map(o=>typeof o=="string"?Zt(o):o.toString()).join("|")})$`),t._zod.parse=(o,n)=>{let i=o.value;return t._zod.values.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:t}),o}}),Is=v("$ZodLiteral",(t,e)=>{H.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?Zt(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,o)=>{let n=r.value;return t._zod.values.has(n)||r.issues.push({code:"invalid_value",values:e.values,input:n,inst:t}),r}}),Es=v("$ZodFile",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),zn=v("$ZodTransform",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=e.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new zt;return r.value=n,r}}),Ts=v("$ZodOptional",(t,e)=>{H.init(t,e),t._zod.optin="optional",t._zod.optout="optional",ue(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),ue(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${So(r.source)})?$`):void 0}),t._zod.parse=(r,o)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,o):r.value===void 0?r:e.innerType._zod.run(r,o)}),zs=v("$ZodNullable",(t,e)=>{H.init(t,e),ue(t._zod,"optin",()=>e.innerType._zod.optin),ue(t._zod,"optout",()=>e.innerType._zod.optout),ue(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${So(r.source)}|null)$`):void 0}),ue(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,o)=>r.value===null?r:e.innerType._zod.run(r,o)}),js=v("$ZodDefault",(t,e)=>{H.init(t,e),t._zod.optin="optional",ue(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Uh(i,e)):Uh(n,e)}});Ps=v("$ZodPrefault",(t,e)=>{H.init(t,e),t._zod.optin="optional",ue(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,o))}),Rs=v("$ZodNonOptional",(t,e)=>{H.init(t,e),ue(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(r,o)=>{let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Mh(i,t)):Mh(n,t)}});Ns=v("$ZodSuccess",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>{let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Os=v("$ZodCatch",(t,e)=>{H.init(t,e),t._zod.optin="optional",ue(t._zod,"optout",()=>e.innerType._zod.optout),ue(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>{let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>ot(a,o,xe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(i=>ot(i,o,xe()))},input:r.value}),r.issues=[]),r)}}),Cs=v("$ZodNaN",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),jn=v("$ZodPipe",(t,e)=>{H.init(t,e),ue(t._zod,"values",()=>e.in._zod.values),ue(t._zod,"optin",()=>e.in._zod.optin),ue(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,o)=>{let n=e.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Zh(i,e,o)):Zh(n,e,o)}});As=v("$ZodReadonly",(t,e)=>{H.init(t,e),ue(t._zod,"propValues",()=>e.innerType._zod.propValues),ue(t._zod,"values",()=>e.innerType._zod.values),ue(t._zod,"optin",()=>e.innerType._zod.optin),ue(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,o)=>{let n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(Lh):Lh(n)}});Ds=v("$ZodTemplateLiteral",(t,e)=>{H.init(t,e);let r=[];for(let o of e.parts)if(o instanceof H){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||ml.has(typeof o))r.push(Zt(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:t,expected:"template_literal",code:"invalid_type"}),o):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),o)}),Us=v("$ZodPromise",(t,e)=>{H.init(t,e),t._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},o))}),Ms=v("$ZodLazy",(t,e)=>{H.init(t,e),ue(t._zod,"innerType",()=>e.getter()),ue(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),ue(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),ue(t._zod,"optin",()=>t._zod.innerType._zod.optin),ue(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,o)=>t._zod.innerType._zod.run(r,o)}),Zs=v("$ZodCustom",(t,e)=>{be.init(t,e),H.init(t,e),t._zod.parse=(r,o)=>r,t._zod.check=r=>{let o=r.value,n=e.fn(o);if(n instanceof Promise)return n.then(i=>qh(i,r,o,t));qh(n,r,o,t)}})});function Bh(){return{localeError:Sw()}}var Sw,Wh=O(()=>{V();Sw=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${T(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${b(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function Jh(){return{localeError:Iw()}}var Iw,Gh=O(()=>{V();Iw=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${T(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function Kh(t,e,r,o){let n=Math.abs(t),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?e:i>=2&&i<=4?r:o}function Xh(){return{localeError:Ew()}}var Ew,Yh=O(()=>{V();Ew=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0456\u045E";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${T(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);if(a){let s=Number(n.maximum),c=Kh(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);if(a){let s=Number(n.minimum),c=Kh(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function Qh(){return{localeError:Tw()}}var Tw,eg=O(()=>{V();Tw=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${T(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${b(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=e(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=e(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}}});function tg(){return{localeError:zw()}}var zw,rg=O(()=>{V();zw=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${T(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${b(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}}});function ng(){return{localeError:jw()}}var jw,og=O(()=>{V();jw=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${T(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function Ls(){return{localeError:Rw()}}var Pw,Rw,$d=O(()=>{V();Pw=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Rw=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(o){return t[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${Pw(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${T(o.values[0])}`:`Invalid option: expected one of ${b(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=e(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=e(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${b(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}}});function ig(){return{localeError:Ow()}}var Nw,Ow,ag=O(()=>{V();Nw=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Ow=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(o){return t[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${Nw(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${T(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${b(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=e(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=e(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${b(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}}});function sg(){return{localeError:Cw()}}var Cw,cg=O(()=>{V();Cw=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return i},o={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${T(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Demasiado peque\xF1o: se esperaba que ${n.origin} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${n.origin} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${o[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n.origin}`;default:return"Entrada inv\xE1lida"}}}});function ug(){return{localeError:Aw()}}var Aw,lg=O(()=>{V();Aw=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0622\u0631\u0627\u06CC\u0647";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${T(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${b(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${b(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function dg(){return{localeError:Dw()}}var Dw,pg=O(()=>{V();Dw=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${T(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${b(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function mg(){return{localeError:Uw()}}var Uw,fg=O(()=>{V();Uw=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${T(n.values[0])} attendu`:`Option invalide : une valeur parmi ${b(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function hg(){return{localeError:Mw()}}var Mw,gg=O(()=>{V();Mw=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${T(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=e(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=e(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function vg(){return{localeError:Zw()}}var Zw,_g=O(()=>{V();Zw=()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${T(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${a.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function yg(){return{localeError:Lw()}}var Lw,bg=O(()=>{V();Lw=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(n))return"t\xF6mb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${T(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function $g(){return{localeError:qw()}}var qw,xg=O(()=>{V();qw=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${T(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}}});function kg(){return{localeError:Fw()}}var Fw,wg=O(()=>{V();Fw=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${T(n.values[0])}`:`Opzione non valida: atteso uno tra ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${b(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}}});function Sg(){return{localeError:Vw()}}var Vw,Ig=O(()=>{V();Vw=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(n))return"\u914D\u5217";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${T(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${b(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=e(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=e(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${b(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function Eg(){return{localeError:Hw()}}var Hw,Tg=O(()=>{V();Hw=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(n))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${T(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${b(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function zg(){return{localeError:Bw()}}var Bw,jg=O(()=>{V();Bw=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${T(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${b(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${b(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function Pg(){return{localeError:Ww()}}var Ww,Rg=O(()=>{V();Ww=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(n))return"\u043D\u0438\u0437\u0430";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${T(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function Ng(){return{localeError:Jw()}}var Jw,Og=O(()=>{V();Jw=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${T(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}}});function Cg(){return{localeError:Gw()}}var Gw,Ag=O(()=>{V();Gw=()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${T(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}}});function Dg(){return{localeError:Kw()}}var Kw,Ug=O(()=>{V();Kw=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${T(n.values[0])}`:`Ugyldig valg: forventet en av ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}}});function Mg(){return{localeError:Xw()}}var Xw,Zg=O(()=>{V();Xw=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${T(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Lg(){return{localeError:Yw()}}var Yw,qg=O(()=>{V();Yw=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0627\u0631\u06D0";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${T(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${b(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function Fg(){return{localeError:Qw()}}var Qw,Vg=O(()=>{V();Qw=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${T(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function Hg(){return{localeError:eS()}}var eS,Bg=O(()=>{V();eS=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${T(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}}});function Wg(t,e,r,o){let n=Math.abs(t),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?e:i>=2&&i<=4?r:o}function Jg(){return{localeError:tS()}}var tS,Gg=O(()=>{V();tS=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${T(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);if(a){let s=Number(n.maximum),c=Wg(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);if(a){let s=Number(n.minimum),c=Wg(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function Kg(){return{localeError:rS()}}var rS,Xg=O(()=>{V();rS=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${T(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${b(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}}});function Yg(){return{localeError:nS()}}var nS,Qg=O(()=>{V();nS=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${T(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function ev(){return{localeError:oS()}}var oS,tv=O(()=>{V();oS=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(n))return"\u0B85\u0BA3\u0BBF";if(n===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${T(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${b(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function rv(){return{localeError:iS()}}var iS,nv=O(()=>{V();iS=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(n))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${T(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=e(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=e(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${b(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function ov(){return{localeError:sS()}}var aS,sS,iv=O(()=>{V();aS=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},sS=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(o){return t[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${aS(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${T(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${b(o.values,"|")}`;case"too_big":{let n=o.inclusive?"<=":"<",i=e(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case"too_small":{let n=o.inclusive?">=":">",i=e(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case"invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${b(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function av(){return{localeError:cS()}}var cS,sv=O(()=>{V();cS=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${T(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function cv(){return{localeError:uS()}}var uS,uv=O(()=>{V();uS=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(n))return"\u0622\u0631\u06D2";if(n===null)return"\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${T(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${b(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${b(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function lv(){return{localeError:lS()}}var lS,dv=O(()=>{V();lS=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(n))return"m\u1EA3ng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${T(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${b(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function pv(){return{localeError:dS()}}var dS,mv=O(()=>{V();dS=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(n))return"\u6570\u7EC4";if(n===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${T(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function fv(){return{localeError:pS()}}var pS,hv=O(()=>{V();pS=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(n){return t[n]??null}let r=n=>{let i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${T(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${b(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});var Pn={};Gt(Pn,{ar:()=>Bh,az:()=>Jh,be:()=>Xh,ca:()=>Qh,cs:()=>tg,de:()=>ng,en:()=>Ls,eo:()=>ig,es:()=>sg,fa:()=>ug,fi:()=>dg,fr:()=>mg,frCA:()=>hg,he:()=>vg,hu:()=>yg,id:()=>$g,it:()=>kg,ja:()=>Sg,kh:()=>Eg,ko:()=>zg,mk:()=>Pg,ms:()=>Ng,nl:()=>Cg,no:()=>Dg,ota:()=>Mg,pl:()=>Fg,ps:()=>Lg,pt:()=>Hg,ru:()=>Jg,sl:()=>Kg,sv:()=>Yg,ta:()=>ev,th:()=>rv,tr:()=>ov,ua:()=>av,ur:()=>cv,vi:()=>lv,zhCN:()=>pv,zhTW:()=>fv});var qs=O(()=>{Wh();Gh();Yh();eg();rg();og();$d();ag();cg();lg();pg();fg();gg();_g();bg();xg();wg();Ig();Tg();jg();Rg();Og();Ag();Ug();Zg();qg();Vg();Bg();Gg();Xg();Qg();tv();nv();iv();sv();uv();dv();mv();hv()});function Ao(){return new Rn}var Fs,Vs,Rn,vt,xd=O(()=>{Fs=Symbol("ZodOutput"),Vs=Symbol("ZodInput"),Rn=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...r){let o=r[0];if(this._map.set(e,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let o={...this.get(r)??{}};return delete o.id,{...o,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};vt=Ao()});function Hs(t,e){return new t({type:"string",...I(e)})}function kd(t,e){return new t({type:"string",coerce:!0,...I(e)})}function Do(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...I(e)})}function Nn(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...I(e)})}function Uo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...I(e)})}function Mo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(e)})}function Zo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(e)})}function Lo(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(e)})}function qo(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...I(e)})}function Fo(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...I(e)})}function Vo(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(e)})}function Ho(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...I(e)})}function Bo(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(e)})}function Wo(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...I(e)})}function Jo(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...I(e)})}function Go(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(e)})}function Ko(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(e)})}function Xo(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(e)})}function Yo(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(e)})}function Qo(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(e)})}function ei(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...I(e)})}function ti(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...I(e)})}function ri(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...I(e)})}function ni(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...I(e)})}function wd(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(e)})}function Sd(t,e){return new t({type:"string",format:"date",check:"string_format",...I(e)})}function Id(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...I(e)})}function Ed(t,e){return new t({type:"string",format:"duration",check:"string_format",...I(e)})}function Ws(t,e){return new t({type:"number",checks:[],...I(e)})}function Td(t,e){return new t({type:"number",coerce:!0,checks:[],...I(e)})}function Js(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...I(e)})}function Gs(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...I(e)})}function Ks(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...I(e)})}function Xs(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...I(e)})}function Ys(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...I(e)})}function Qs(t,e){return new t({type:"boolean",...I(e)})}function zd(t,e){return new t({type:"boolean",coerce:!0,...I(e)})}function ec(t,e){return new t({type:"bigint",...I(e)})}function jd(t,e){return new t({type:"bigint",coerce:!0,...I(e)})}function tc(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...I(e)})}function rc(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...I(e)})}function nc(t,e){return new t({type:"symbol",...I(e)})}function oc(t,e){return new t({type:"undefined",...I(e)})}function ic(t,e){return new t({type:"null",...I(e)})}function ac(t){return new t({type:"any"})}function Fr(t){return new t({type:"unknown"})}function sc(t,e){return new t({type:"never",...I(e)})}function cc(t,e){return new t({type:"void",...I(e)})}function uc(t,e){return new t({type:"date",...I(e)})}function Pd(t,e){return new t({type:"date",coerce:!0,...I(e)})}function lc(t,e){return new t({type:"nan",...I(e)})}function Lt(t,e){return new Za({check:"less_than",...I(e),value:t,inclusive:!1})}function ut(t,e){return new Za({check:"less_than",...I(e),value:t,inclusive:!0})}function qt(t,e){return new La({check:"greater_than",...I(e),value:t,inclusive:!1})}function Ye(t,e){return new La({check:"greater_than",...I(e),value:t,inclusive:!0})}function Rd(t){return qt(0,t)}function Nd(t){return Lt(0,t)}function Od(t){return ut(0,t)}function Cd(t){return Ye(0,t)}function Vr(t,e){return new Jl({check:"multiple_of",...I(e),value:t})}function On(t,e){return new Xl({check:"max_size",...I(e),maximum:t})}function Hr(t,e){return new Yl({check:"min_size",...I(e),minimum:t})}function oi(t,e){return new Ql({check:"size_equals",...I(e),size:t})}function Cn(t,e){return new ed({check:"max_length",...I(e),maximum:t})}function ar(t,e){return new td({check:"min_length",...I(e),minimum:t})}function An(t,e){return new rd({check:"length_equals",...I(e),length:t})}function ii(t,e){return new nd({check:"string_format",format:"regex",...I(e),pattern:t})}function ai(t){return new od({check:"string_format",format:"lowercase",...I(t)})}function si(t){return new id({check:"string_format",format:"uppercase",...I(t)})}function ci(t,e){return new ad({check:"string_format",format:"includes",...I(e),includes:t})}function ui(t,e){return new sd({check:"string_format",format:"starts_with",...I(e),prefix:t})}function li(t,e){return new cd({check:"string_format",format:"ends_with",...I(e),suffix:t})}function Ad(t,e,r){return new ud({check:"property",property:t,schema:e,...I(r)})}function di(t,e){return new ld({check:"mime_type",mime:t,...I(e)})}function Ft(t){return new dd({check:"overwrite",tx:t})}function pi(t){return Ft(e=>e.normalize(t))}function mi(){return Ft(t=>t.trim())}function fi(){return Ft(t=>t.toLowerCase())}function hi(){return Ft(t=>t.toUpperCase())}function gi(t,e,r){return new t({type:"array",element:e,...I(r)})}function mS(t,e,r){return new t({type:"union",options:e,...I(r)})}function fS(t,e,r,o){return new t({type:"union",options:r,discriminator:e,...I(o)})}function hS(t,e,r){return new t({type:"intersection",left:e,right:r})}function Dd(t,e,r,o){let n=r instanceof H,i=n?o:r,a=n?r:null;return new t({type:"tuple",items:e,rest:a,...I(i)})}function gS(t,e,r,o){return new t({type:"record",keyType:e,valueType:r,...I(o)})}function vS(t,e,r,o){return new t({type:"map",keyType:e,valueType:r,...I(o)})}function _S(t,e,r){return new t({type:"set",valueType:e,...I(r)})}function yS(t,e,r){let o=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:o,...I(r)})}function bS(t,e,r){return new t({type:"enum",entries:e,...I(r)})}function $S(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...I(r)})}function dc(t,e){return new t({type:"file",...I(e)})}function xS(t,e){return new t({type:"transform",transform:e})}function kS(t,e){return new t({type:"optional",innerType:e})}function wS(t,e){return new t({type:"nullable",innerType:e})}function SS(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function IS(t,e,r){return new t({type:"nonoptional",innerType:e,...I(r)})}function ES(t,e){return new t({type:"success",innerType:e})}function TS(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function zS(t,e,r){return new t({type:"pipe",in:e,out:r})}function jS(t,e){return new t({type:"readonly",innerType:e})}function PS(t,e,r){return new t({type:"template_literal",parts:e,...I(r)})}function RS(t,e){return new t({type:"lazy",getter:e})}function NS(t,e){return new t({type:"promise",innerType:e})}function pc(t,e,r){let o=I(r);return o.abort??(o.abort=!0),new t({type:"custom",check:"custom",fn:e,...o})}function mc(t,e,r){return new t({type:"custom",check:"custom",fn:e,...I(r)})}function fc(t,e){let r=I(e),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(o),a=new Set(n),s=t.Pipe??jn,c=t.Boolean??En,u=t.String??or,l=t.Transform??zn,d=new l({type:"transform",transform:(m,f)=>{let _=m;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:a.has(_)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:f.value,inst:d}),{})},error:r.error}),g=new s({type:"pipe",in:new u({type:"string",error:r.error}),out:d,error:r.error});return new s({type:"pipe",in:g,out:new c({type:"boolean",error:r.error}),error:r.error})}function hc(t,e,r,o={}){let n=I(o),i={...I(o),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new t(i)}var Bs,Ud=O(()=>{qa();Co();V();Bs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function vc(t){return new gc({type:"function",input:Array.isArray(t?.input)?Dd(ir,t?.input):t?.input??gi(Tn,Fr(qr)),output:t?.output??Fr(qr)})}var gc,gv=O(()=>{Ud();Da();Co();Co();gc=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let r=((...o)=>{let n=this._def.input?Mr(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=e(...n);return this._def.output?Mr(this._def.output,i,void 0,{callee:r}):i});return r}implementAsync(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let r=(async(...o)=>{let n=this._def.input?await Zr(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=await e(...n);return this._def.output?Zr(this._def.output,i,void 0,{callee:r}):i});return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new ir({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){let r=this.constructor;return new r({type:"function",input:this._def.input,output:e})}}});function Dn(t,e){if(t instanceof Rn){let o=new vi(e),n={};for(let s of t._idmap.entries()){let[c,u]=s;o.process(u)}let i={},a={registry:t,uri:e?.uri,defs:n};for(let s of t._idmap.entries()){let[c,u]=s;i[c]=o.emit(u,{...e,external:a})}if(Object.keys(n).length>0){let s=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:n}}return{schemas:i}}let r=new vi(e);return r.process(t),r.emit(t,e)}function Se(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Se(n.element,r);case"object":{for(let i in n.shape)if(Se(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(Se(i,r))return!0;return!1}case"intersection":return Se(n.left,r)||Se(n.right,r);case"tuple":{for(let i of n.items)if(Se(i,r))return!0;return!!(n.rest&&Se(n.rest,r))}case"record":return Se(n.keyType,r)||Se(n.valueType,r);case"map":return Se(n.keyType,r)||Se(n.valueType,r);case"set":return Se(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Se(n.innerType,r);case"lazy":return Se(n.getter(),r);case"default":return Se(n.innerType,r);case"prefault":return Se(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Se(n.in,r)||Se(n.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${n.type}`)}var vi,vv=O(()=>{xd();V();vi=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??vt,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path},g=e._zod.parent;if(g)s.ref=g,this.process(g,d),this.seen.get(g).isParent=!0;else{let h=s.schema;switch(n.type){case"string":{let m=h;m.type="string";let{minimum:f,maximum:_,format:x,patterns:$,contentEncoding:k}=e._zod.bag;if(typeof f=="number"&&(m.minLength=f),typeof _=="number"&&(m.maxLength=_),x&&(m.format=i[x]??x,m.format===""&&delete m.format),k&&(m.contentEncoding=k),$&&$.size>0){let C=[...$];C.length===1?m.pattern=C[0].source:C.length>1&&(s.schema.allOf=[...C.map(L=>({...this.target==="draft-7"?{type:"string"}:{},pattern:L.source}))])}break}case"number":{let m=h,{minimum:f,maximum:_,format:x,multipleOf:$,exclusiveMaximum:k,exclusiveMinimum:C}=e._zod.bag;typeof x=="string"&&x.includes("int")?m.type="integer":m.type="number",typeof C=="number"&&(m.exclusiveMinimum=C),typeof f=="number"&&(m.minimum=f,typeof C=="number"&&(C>=f?delete m.minimum:delete m.exclusiveMinimum)),typeof k=="number"&&(m.exclusiveMaximum=k),typeof _=="number"&&(m.maximum=_,typeof k=="number"&&(k<=_?delete m.maximum:delete m.exclusiveMaximum)),typeof $=="number"&&(m.multipleOf=$);break}case"boolean":{let m=h;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{h.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{h.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let m=h,{minimum:f,maximum:_}=e._zod.bag;typeof f=="number"&&(m.minItems=f),typeof _=="number"&&(m.maxItems=_),m.type="array",m.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{let m=h;m.type="object",m.properties={};let f=n.shape;for(let $ in f)m.properties[$]=this.process(f[$],{...d,path:[...d.path,"properties",$]});let _=new Set(Object.keys(f)),x=new Set([..._].filter($=>{let k=n.shape[$]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));x.size>0&&(m.required=Array.from(x)),n.catchall?._zod.def.type==="never"?m.additionalProperties=!1:n.catchall?n.catchall&&(m.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{let m=h;m.anyOf=n.options.map((f,_)=>this.process(f,{...d,path:[...d.path,"anyOf",_]}));break}case"intersection":{let m=h,f=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),_=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),x=k=>"allOf"in k&&Object.keys(k).length===1,$=[...x(f)?f.allOf:[f],...x(_)?_.allOf:[_]];m.allOf=$;break}case"tuple":{let m=h;m.type="array";let f=n.items.map(($,k)=>this.process($,{...d,path:[...d.path,"prefixItems",k]}));if(this.target==="draft-2020-12"?m.prefixItems=f:m.items=f,n.rest){let $=this.process(n.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?m.items=$:m.additionalItems=$}n.rest&&(m.items=this.process(n.rest,{...d,path:[...d.path,"items"]}));let{minimum:_,maximum:x}=e._zod.bag;typeof _=="number"&&(m.minItems=_),typeof x=="number"&&(m.maxItems=x);break}case"record":{let m=h;m.type="object",m.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]}),m.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let m=h,f=ko(n.entries);f.every(_=>typeof _=="number")&&(m.type="number"),f.every(_=>typeof _=="string")&&(m.type="string"),m.enum=f;break}case"literal":{let m=h,f=[];for(let _ of n.values)if(_===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof _=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");f.push(Number(_))}else f.push(_);if(f.length!==0)if(f.length===1){let _=f[0];m.type=_===null?"null":typeof _,m.const=_}else f.every(_=>typeof _=="number")&&(m.type="number"),f.every(_=>typeof _=="string")&&(m.type="string"),f.every(_=>typeof _=="boolean")&&(m.type="string"),f.every(_=>_===null)&&(m.type="null"),m.enum=f;break}case"file":{let m=h,f={type:"string",format:"binary",contentEncoding:"binary"},{minimum:_,maximum:x,mime:$}=e._zod.bag;_!==void 0&&(f.minLength=_),x!==void 0&&(f.maxLength=x),$?$.length===1?(f.contentMediaType=$[0],Object.assign(m,f)):m.anyOf=$.map(k=>({...f,contentMediaType:k})):Object.assign(m,f);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let m=this.process(n.innerType,d);h.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),s.ref=n.innerType;break}case"success":{let m=h;m.type="boolean";break}case"default":{this.process(n.innerType,d),s.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),s.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),s.ref=n.innerType;let m;try{m=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let m=h,f=e._zod.pattern;if(!f)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=f.source;break}case"pipe":{let m=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(m,d),s.ref=m;break}case"readonly":{this.process(n.innerType,d),s.ref=n.innerType,h.readOnly=!0;break}case"promise":{this.process(n.innerType,d),s.ref=n.innerType;break}case"optional":{this.process(n.innerType,d),s.ref=n.innerType;break}case"lazy":{let m=e._zod.innerType;this.process(m,d),s.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),this.io==="input"&&Se(e)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(e).schema}emit(e,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let f=o.external.registry.get(l[0])?.id,_=o.external.uri??($=>$);if(f)return{ref:_(f)};let x=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=x,{defId:x,ref:`${_("__shared")}#/${d}/${x}`}}if(l[1]===n)return{ref:"#"};let h=`#/${d}/`,m=l[1].schema.id??`__schema${this.counter++}`;return{defId:m,ref:h+m}},a=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:g,defId:h}=i(l);d.def={...d.schema},h&&(d.defId=h);let m=d.schema;for(let f in m)delete m[f];m.$ref=g};if(o.cycles==="throw")for(let l of this.seen.entries()){let d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let l of this.seen.entries()){let d=l[1];if(e===l[0]){a(l);continue}if(o.external){let h=o.external.registry.get(l[0])?.id;if(e!==l[0]&&h){a(l);continue}}if(this.metadataRegistry.get(l[0])?.id){a(l);continue}if(d.cycle){a(l);continue}if(d.count>1&&o.reused==="ref"){a(l);continue}}let s=(l,d)=>{let g=this.seen.get(l),h=g.def??g.schema,m={...h};if(g.ref===null)return;let f=g.ref;if(g.ref=null,f){s(f,d);let _=this.seen.get(f).schema;_.$ref&&d.target==="draft-7"?(h.allOf=h.allOf??[],h.allOf.push(_)):(Object.assign(h,_),Object.assign(h,m))}g.isParent||this.override({zodSchema:l,jsonSchema:h,path:g.path??[]})};for(let l of[...this.seen.entries()].reverse())s(l[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){let l=o.external.registry.get(e)?.id;if(!l)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(l)}Object.assign(c,n.def);let u=o.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}});var _v={};var yv=O(()=>{});var _t={};Gt(_t,{$ZodAny:()=>gs,$ZodArray:()=>Tn,$ZodAsyncError:()=>zt,$ZodBase64:()=>as,$ZodBase64URL:()=>ss,$ZodBigInt:()=>Ro,$ZodBigIntFormat:()=>ps,$ZodBoolean:()=>En,$ZodCIDRv4:()=>os,$ZodCIDRv6:()=>is,$ZodCUID:()=>Xa,$ZodCUID2:()=>Ya,$ZodCatch:()=>Os,$ZodCheck:()=>be,$ZodCheckBigIntFormat:()=>Kl,$ZodCheckEndsWith:()=>cd,$ZodCheckGreaterThan:()=>La,$ZodCheckIncludes:()=>ad,$ZodCheckLengthEquals:()=>rd,$ZodCheckLessThan:()=>Za,$ZodCheckLowerCase:()=>od,$ZodCheckMaxLength:()=>ed,$ZodCheckMaxSize:()=>Xl,$ZodCheckMimeType:()=>ld,$ZodCheckMinLength:()=>td,$ZodCheckMinSize:()=>Yl,$ZodCheckMultipleOf:()=>Jl,$ZodCheckNumberFormat:()=>Gl,$ZodCheckOverwrite:()=>dd,$ZodCheckProperty:()=>ud,$ZodCheckRegex:()=>nd,$ZodCheckSizeEquals:()=>Ql,$ZodCheckStartsWith:()=>sd,$ZodCheckStringFormat:()=>In,$ZodCheckUpperCase:()=>id,$ZodCustom:()=>Zs,$ZodCustomStringFormat:()=>ls,$ZodDate:()=>ys,$ZodDefault:()=>js,$ZodDiscriminatedUnion:()=>bs,$ZodE164:()=>cs,$ZodEmail:()=>Wa,$ZodEmoji:()=>Ga,$ZodEnum:()=>Ss,$ZodError:()=>zo,$ZodFile:()=>Es,$ZodFunction:()=>gc,$ZodGUID:()=>Ha,$ZodIPv4:()=>rs,$ZodIPv6:()=>ns,$ZodISODate:()=>vd,$ZodISODateTime:()=>gd,$ZodISODuration:()=>yd,$ZodISOTime:()=>_d,$ZodIntersection:()=>$s,$ZodJWT:()=>us,$ZodKSUID:()=>ts,$ZodLazy:()=>Ms,$ZodLiteral:()=>Is,$ZodMap:()=>ks,$ZodNaN:()=>Cs,$ZodNanoID:()=>Ka,$ZodNever:()=>vs,$ZodNonOptional:()=>Rs,$ZodNull:()=>hs,$ZodNullable:()=>zs,$ZodNumber:()=>Po,$ZodNumberFormat:()=>ds,$ZodObject:()=>No,$ZodOptional:()=>Ts,$ZodPipe:()=>jn,$ZodPrefault:()=>Ps,$ZodPromise:()=>Us,$ZodReadonly:()=>As,$ZodRealError:()=>kn,$ZodRecord:()=>xs,$ZodRegistry:()=>Rn,$ZodSet:()=>ws,$ZodString:()=>or,$ZodStringFormat:()=>le,$ZodSuccess:()=>Ns,$ZodSymbol:()=>ms,$ZodTemplateLiteral:()=>Ds,$ZodTransform:()=>zn,$ZodTuple:()=>ir,$ZodType:()=>H,$ZodULID:()=>Qa,$ZodURL:()=>Ja,$ZodUUID:()=>Ba,$ZodUndefined:()=>fs,$ZodUnion:()=>Oo,$ZodUnknown:()=>qr,$ZodVoid:()=>_s,$ZodXID:()=>es,$brand:()=>za,$constructor:()=>v,$input:()=>Vs,$output:()=>Fs,Doc:()=>jo,JSONSchema:()=>_v,JSONSchemaGenerator:()=>vi,NEVER:()=>Ta,TimePrecision:()=>Bs,_any:()=>ac,_array:()=>gi,_base64:()=>ei,_base64url:()=>ti,_bigint:()=>ec,_boolean:()=>Qs,_catch:()=>TS,_cidrv4:()=>Yo,_cidrv6:()=>Qo,_coercedBigint:()=>jd,_coercedBoolean:()=>zd,_coercedDate:()=>Pd,_coercedNumber:()=>Td,_coercedString:()=>kd,_cuid:()=>Ho,_cuid2:()=>Bo,_custom:()=>pc,_date:()=>uc,_default:()=>SS,_discriminatedUnion:()=>fS,_e164:()=>ri,_email:()=>Do,_emoji:()=>Fo,_endsWith:()=>li,_enum:()=>yS,_file:()=>dc,_float32:()=>Gs,_float64:()=>Ks,_gt:()=>qt,_gte:()=>Ye,_guid:()=>Nn,_includes:()=>ci,_int:()=>Js,_int32:()=>Xs,_int64:()=>tc,_intersection:()=>hS,_ipv4:()=>Ko,_ipv6:()=>Xo,_isoDate:()=>Sd,_isoDateTime:()=>wd,_isoDuration:()=>Ed,_isoTime:()=>Id,_jwt:()=>ni,_ksuid:()=>Go,_lazy:()=>RS,_length:()=>An,_literal:()=>$S,_lowercase:()=>ai,_lt:()=>Lt,_lte:()=>ut,_map:()=>vS,_max:()=>ut,_maxLength:()=>Cn,_maxSize:()=>On,_mime:()=>di,_min:()=>Ye,_minLength:()=>ar,_minSize:()=>Hr,_multipleOf:()=>Vr,_nan:()=>lc,_nanoid:()=>Vo,_nativeEnum:()=>bS,_negative:()=>Nd,_never:()=>sc,_nonnegative:()=>Cd,_nonoptional:()=>IS,_nonpositive:()=>Od,_normalize:()=>pi,_null:()=>ic,_nullable:()=>wS,_number:()=>Ws,_optional:()=>kS,_overwrite:()=>Ft,_parse:()=>Na,_parseAsync:()=>Oa,_pipe:()=>zS,_positive:()=>Rd,_promise:()=>NS,_property:()=>Ad,_readonly:()=>jS,_record:()=>gS,_refine:()=>mc,_regex:()=>ii,_safeParse:()=>Ca,_safeParseAsync:()=>Aa,_set:()=>_S,_size:()=>oi,_startsWith:()=>ui,_string:()=>Hs,_stringFormat:()=>hc,_stringbool:()=>fc,_success:()=>ES,_symbol:()=>nc,_templateLiteral:()=>PS,_toLowerCase:()=>fi,_toUpperCase:()=>hi,_transform:()=>xS,_trim:()=>mi,_tuple:()=>Dd,_uint32:()=>Ys,_uint64:()=>rc,_ulid:()=>Wo,_undefined:()=>oc,_union:()=>mS,_unknown:()=>Fr,_uppercase:()=>si,_url:()=>qo,_uuid:()=>Uo,_uuidv4:()=>Mo,_uuidv6:()=>Zo,_uuidv7:()=>Lo,_void:()=>cc,_xid:()=>Jo,clone:()=>Ce,config:()=>xe,flattenError:()=>wn,formatError:()=>Sn,function:()=>vc,globalConfig:()=>$o,globalRegistry:()=>vt,isValidBase64:()=>bd,isValidBase64URL:()=>Fh,isValidJWT:()=>Vh,locales:()=>Pn,parse:()=>Mr,parseAsync:()=>Zr,prettifyError:()=>Ra,regexes:()=>nr,registry:()=>Ao,safeParse:()=>tr,safeParseAsync:()=>rr,toDotPath:()=>Sh,toJSONSchema:()=>Dn,treeifyError:()=>Pa,util:()=>E,version:()=>md});var Ee=O(()=>{bn();Da();_l();Co();qa();fd();V();Ma();qs();xd();pd();gv();Ud();vv();yv()});var Zd=O(()=>{Ee()});var Zn={};Gt(Zn,{ZodISODate:()=>$c,ZodISODateTime:()=>bc,ZodISODuration:()=>kc,ZodISOTime:()=>xc,date:()=>qd,datetime:()=>Ld,duration:()=>Vd,time:()=>Fd});function Ld(t){return wd(bc,t)}function qd(t){return Sd($c,t)}function Fd(t){return Id(xc,t)}function Vd(t){return Ed(kc,t)}var bc,$c,xc,kc,wc=O(()=>{Ee();Sc();bc=v("ZodISODateTime",(t,e)=>{gd.init(t,e),he.init(t,e)});$c=v("ZodISODate",(t,e)=>{vd.init(t,e),he.init(t,e)});xc=v("ZodISOTime",(t,e)=>{_d.init(t,e),he.init(t,e)});kc=v("ZodISODuration",(t,e)=>{yd.init(t,e),he.init(t,e)})});var kv,ZS,Ln,Hd=O(()=>{Ee();Ee();kv=(t,e)=>{zo.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Sn(t,r)},flatten:{value:r=>wn(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},ZS=v("ZodError",kv),Ln=v("ZodError",kv,{Parent:Error})});var Bd,Wd,Jd,Gd,Kd=O(()=>{Ee();Hd();Bd=Na(Ln),Wd=Oa(Ln),Jd=Ca(Ln),Gd=Aa(Ln)});function y(t){return Hs(yi,t)}function qS(t){return Do(Qd,t)}function FS(t){return Nn(Ic,t)}function VS(t){return Uo(Vt,t)}function HS(t){return Mo(Vt,t)}function BS(t){return Zo(Vt,t)}function WS(t){return Lo(Vt,t)}function JS(t){return qo(ep,t)}function GS(t){return Fo(tp,t)}function KS(t){return Vo(rp,t)}function XS(t){return Ho(np,t)}function YS(t){return Bo(op,t)}function QS(t){return Wo(ip,t)}function e0(t){return Jo(ap,t)}function t0(t){return Go(sp,t)}function r0(t){return Ko(cp,t)}function n0(t){return Xo(up,t)}function o0(t){return Yo(lp,t)}function i0(t){return Qo(dp,t)}function a0(t){return ei(pp,t)}function s0(t){return ti(mp,t)}function c0(t){return ri(fp,t)}function u0(t){return ni(hp,t)}function l0(t,e,r={}){return hc(wv,t,e,r)}function ce(t){return Ws(bi,t)}function Xd(t){return Js(qn,t)}function d0(t){return Gs(qn,t)}function p0(t){return Ks(qn,t)}function m0(t){return Xs(qn,t)}function f0(t){return Ys(qn,t)}function we(t){return Qs($i,t)}function h0(t){return ec(xi,t)}function g0(t){return tc(gp,t)}function v0(t){return rc(gp,t)}function _0(t){return nc(Sv,t)}function y0(t){return oc(Iv,t)}function zc(t){return ic(Ev,t)}function b0(){return ac(Tv)}function ve(){return Fr(zv)}function jc(t){return sc(jv,t)}function $0(t){return cc(Pv,t)}function x0(t){return uc(Pc,t)}function re(t,e){return gi(Rv,t,e)}function k0(t){let e=t._zod.def.shape;return U(Object.keys(e))}function R(t,e){let r={type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},...E.normalizeParams(e)};return new Rc(r)}function w0(t,e){return new Rc({type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},catchall:jc(),...E.normalizeParams(e)})}function Ae(t,e){return new Rc({type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},catchall:ve(),...E.normalizeParams(e)})}function de(t,e){return new vp({type:"union",options:t,...E.normalizeParams(e)})}function Nc(t,e,r){return new Nv({type:"union",options:e,discriminator:t,...E.normalizeParams(r)})}function ki(t,e){return new Ov({type:"intersection",left:t,right:e})}function S0(t,e,r){let o=e instanceof H,n=o?r:e,i=o?e:null;return new Cv({type:"tuple",items:t,rest:i,...E.normalizeParams(n)})}function pe(t,e,r){return new _p({type:"record",keyType:t,valueType:e,...E.normalizeParams(r)})}function I0(t,e,r){return new _p({type:"record",keyType:de([t,jc()]),valueType:e,...E.normalizeParams(r)})}function E0(t,e,r){return new Av({type:"map",keyType:t,valueType:e,...E.normalizeParams(r)})}function T0(t,e){return new Dv({type:"set",valueType:t,...E.normalizeParams(e)})}function Fe(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new _i({type:"enum",entries:r,...E.normalizeParams(e)})}function z0(t,e){return new _i({type:"enum",entries:t,...E.normalizeParams(e)})}function U(t,e){return new Uv({type:"literal",values:Array.isArray(t)?t:[t],...E.normalizeParams(e)})}function j0(t){return dc(Mv,t)}function bp(t){return new yp({type:"transform",transform:t})}function ge(t){return new $p({type:"optional",innerType:t})}function Ec(t){return new Zv({type:"nullable",innerType:t})}function P0(t){return ge(Ec(t))}function qv(t,e){return new Lv({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function Vv(t,e){return new Fv({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function Hv(t,e){return new xp({type:"nonoptional",innerType:t,...E.normalizeParams(e)})}function R0(t){return new Bv({type:"success",innerType:t})}function Jv(t,e){return new Wv({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function N0(t){return lc(Gv,t)}function Tc(t,e){return new kp({type:"pipe",in:t,out:e})}function Xv(t){return new Kv({type:"readonly",innerType:t})}function O0(t,e){return new Yv({type:"template_literal",parts:t,...E.normalizeParams(e)})}function e_(t){return new Qv({type:"lazy",getter:t})}function C0(t){return new t_({type:"promise",innerType:t})}function r_(t){let e=new be({check:"custom"});return e._zod.check=t,e}function wp(t,e){return pc(Oc,t??(()=>!0),e)}function n_(t,e={}){return mc(Oc,t,e)}function o_(t){let e=r_(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(E.issue(o,r.value,e._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(E.issue(n))}},t(r.value,r)));return e}function A0(t,e={error:`Input not instance of ${t.name}`}){let r=new Oc({type:"custom",check:"custom",fn:o=>o instanceof t,abort:!0,...E.normalizeParams(e)});return r._zod.bag.Class=t,r}function U0(t){let e=e_(()=>de([y(t),ce(),we(),zc(),re(e),pe(y(),e)]));return e}function Cc(t,e){return Tc(bp(t),e)}var X,Yd,yi,he,Qd,Ic,Vt,ep,tp,rp,np,op,ip,ap,sp,cp,up,lp,dp,pp,mp,fp,hp,wv,bi,qn,$i,xi,gp,Sv,Iv,Ev,Tv,zv,jv,Pv,Pc,Rv,Rc,vp,Nv,Ov,Cv,_p,Av,Dv,_i,Uv,Mv,yp,$p,Zv,Lv,Fv,xp,Bv,Wv,Gv,kp,Kv,Yv,Qv,t_,Oc,D0,Sc=O(()=>{Ee();Ee();Zd();wc();Kd();X=v("ZodType",(t,e)=>(H.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),t.clone=(r,o)=>Ce(t,r,o),t.brand=()=>t,t.register=((r,o)=>(r.add(t,o),t)),t.parse=(r,o)=>Bd(t,r,o,{callee:t.parse}),t.safeParse=(r,o)=>Jd(t,r,o),t.parseAsync=async(r,o)=>Wd(t,r,o,{callee:t.parseAsync}),t.safeParseAsync=async(r,o)=>Gd(t,r,o),t.spa=t.safeParseAsync,t.refine=(r,o)=>t.check(n_(r,o)),t.superRefine=r=>t.check(o_(r)),t.overwrite=r=>t.check(Ft(r)),t.optional=()=>ge(t),t.nullable=()=>Ec(t),t.nullish=()=>ge(Ec(t)),t.nonoptional=r=>Hv(t,r),t.array=()=>re(t),t.or=r=>de([t,r]),t.and=r=>ki(t,r),t.transform=r=>Tc(t,bp(r)),t.default=r=>qv(t,r),t.prefault=r=>Vv(t,r),t.catch=r=>Jv(t,r),t.pipe=r=>Tc(t,r),t.readonly=()=>Xv(t),t.describe=r=>{let o=t.clone();return vt.add(o,{description:r}),o},Object.defineProperty(t,"description",{get(){return vt.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return vt.get(t);let o=t.clone();return vt.add(o,r[0]),o},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),Yd=v("_ZodString",(t,e)=>{or.init(t,e),X.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...o)=>t.check(ii(...o)),t.includes=(...o)=>t.check(ci(...o)),t.startsWith=(...o)=>t.check(ui(...o)),t.endsWith=(...o)=>t.check(li(...o)),t.min=(...o)=>t.check(ar(...o)),t.max=(...o)=>t.check(Cn(...o)),t.length=(...o)=>t.check(An(...o)),t.nonempty=(...o)=>t.check(ar(1,...o)),t.lowercase=o=>t.check(ai(o)),t.uppercase=o=>t.check(si(o)),t.trim=()=>t.check(mi()),t.normalize=(...o)=>t.check(pi(...o)),t.toLowerCase=()=>t.check(fi()),t.toUpperCase=()=>t.check(hi())}),yi=v("ZodString",(t,e)=>{or.init(t,e),Yd.init(t,e),t.email=r=>t.check(Do(Qd,r)),t.url=r=>t.check(qo(ep,r)),t.jwt=r=>t.check(ni(hp,r)),t.emoji=r=>t.check(Fo(tp,r)),t.guid=r=>t.check(Nn(Ic,r)),t.uuid=r=>t.check(Uo(Vt,r)),t.uuidv4=r=>t.check(Mo(Vt,r)),t.uuidv6=r=>t.check(Zo(Vt,r)),t.uuidv7=r=>t.check(Lo(Vt,r)),t.nanoid=r=>t.check(Vo(rp,r)),t.guid=r=>t.check(Nn(Ic,r)),t.cuid=r=>t.check(Ho(np,r)),t.cuid2=r=>t.check(Bo(op,r)),t.ulid=r=>t.check(Wo(ip,r)),t.base64=r=>t.check(ei(pp,r)),t.base64url=r=>t.check(ti(mp,r)),t.xid=r=>t.check(Jo(ap,r)),t.ksuid=r=>t.check(Go(sp,r)),t.ipv4=r=>t.check(Ko(cp,r)),t.ipv6=r=>t.check(Xo(up,r)),t.cidrv4=r=>t.check(Yo(lp,r)),t.cidrv6=r=>t.check(Qo(dp,r)),t.e164=r=>t.check(ri(fp,r)),t.datetime=r=>t.check(Ld(r)),t.date=r=>t.check(qd(r)),t.time=r=>t.check(Fd(r)),t.duration=r=>t.check(Vd(r))});he=v("ZodStringFormat",(t,e)=>{le.init(t,e),Yd.init(t,e)}),Qd=v("ZodEmail",(t,e)=>{Wa.init(t,e),he.init(t,e)});Ic=v("ZodGUID",(t,e)=>{Ha.init(t,e),he.init(t,e)});Vt=v("ZodUUID",(t,e)=>{Ba.init(t,e),he.init(t,e)});ep=v("ZodURL",(t,e)=>{Ja.init(t,e),he.init(t,e)});tp=v("ZodEmoji",(t,e)=>{Ga.init(t,e),he.init(t,e)});rp=v("ZodNanoID",(t,e)=>{Ka.init(t,e),he.init(t,e)});np=v("ZodCUID",(t,e)=>{Xa.init(t,e),he.init(t,e)});op=v("ZodCUID2",(t,e)=>{Ya.init(t,e),he.init(t,e)});ip=v("ZodULID",(t,e)=>{Qa.init(t,e),he.init(t,e)});ap=v("ZodXID",(t,e)=>{es.init(t,e),he.init(t,e)});sp=v("ZodKSUID",(t,e)=>{ts.init(t,e),he.init(t,e)});cp=v("ZodIPv4",(t,e)=>{rs.init(t,e),he.init(t,e)});up=v("ZodIPv6",(t,e)=>{ns.init(t,e),he.init(t,e)});lp=v("ZodCIDRv4",(t,e)=>{os.init(t,e),he.init(t,e)});dp=v("ZodCIDRv6",(t,e)=>{is.init(t,e),he.init(t,e)});pp=v("ZodBase64",(t,e)=>{as.init(t,e),he.init(t,e)});mp=v("ZodBase64URL",(t,e)=>{ss.init(t,e),he.init(t,e)});fp=v("ZodE164",(t,e)=>{cs.init(t,e),he.init(t,e)});hp=v("ZodJWT",(t,e)=>{us.init(t,e),he.init(t,e)});wv=v("ZodCustomStringFormat",(t,e)=>{ls.init(t,e),he.init(t,e)});bi=v("ZodNumber",(t,e)=>{Po.init(t,e),X.init(t,e),t.gt=(o,n)=>t.check(qt(o,n)),t.gte=(o,n)=>t.check(Ye(o,n)),t.min=(o,n)=>t.check(Ye(o,n)),t.lt=(o,n)=>t.check(Lt(o,n)),t.lte=(o,n)=>t.check(ut(o,n)),t.max=(o,n)=>t.check(ut(o,n)),t.int=o=>t.check(Xd(o)),t.safe=o=>t.check(Xd(o)),t.positive=o=>t.check(qt(0,o)),t.nonnegative=o=>t.check(Ye(0,o)),t.negative=o=>t.check(Lt(0,o)),t.nonpositive=o=>t.check(ut(0,o)),t.multipleOf=(o,n)=>t.check(Vr(o,n)),t.step=(o,n)=>t.check(Vr(o,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});qn=v("ZodNumberFormat",(t,e)=>{ds.init(t,e),bi.init(t,e)});$i=v("ZodBoolean",(t,e)=>{En.init(t,e),X.init(t,e)});xi=v("ZodBigInt",(t,e)=>{Ro.init(t,e),X.init(t,e),t.gte=(o,n)=>t.check(Ye(o,n)),t.min=(o,n)=>t.check(Ye(o,n)),t.gt=(o,n)=>t.check(qt(o,n)),t.gte=(o,n)=>t.check(Ye(o,n)),t.min=(o,n)=>t.check(Ye(o,n)),t.lt=(o,n)=>t.check(Lt(o,n)),t.lte=(o,n)=>t.check(ut(o,n)),t.max=(o,n)=>t.check(ut(o,n)),t.positive=o=>t.check(qt(BigInt(0),o)),t.negative=o=>t.check(Lt(BigInt(0),o)),t.nonpositive=o=>t.check(ut(BigInt(0),o)),t.nonnegative=o=>t.check(Ye(BigInt(0),o)),t.multipleOf=(o,n)=>t.check(Vr(o,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});gp=v("ZodBigIntFormat",(t,e)=>{ps.init(t,e),xi.init(t,e)});Sv=v("ZodSymbol",(t,e)=>{ms.init(t,e),X.init(t,e)});Iv=v("ZodUndefined",(t,e)=>{fs.init(t,e),X.init(t,e)});Ev=v("ZodNull",(t,e)=>{hs.init(t,e),X.init(t,e)});Tv=v("ZodAny",(t,e)=>{gs.init(t,e),X.init(t,e)});zv=v("ZodUnknown",(t,e)=>{qr.init(t,e),X.init(t,e)});jv=v("ZodNever",(t,e)=>{vs.init(t,e),X.init(t,e)});Pv=v("ZodVoid",(t,e)=>{_s.init(t,e),X.init(t,e)});Pc=v("ZodDate",(t,e)=>{ys.init(t,e),X.init(t,e),t.min=(o,n)=>t.check(Ye(o,n)),t.max=(o,n)=>t.check(ut(o,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});Rv=v("ZodArray",(t,e)=>{Tn.init(t,e),X.init(t,e),t.element=e.element,t.min=(r,o)=>t.check(ar(r,o)),t.nonempty=r=>t.check(ar(1,r)),t.max=(r,o)=>t.check(Cn(r,o)),t.length=(r,o)=>t.check(An(r,o)),t.unwrap=()=>t.element});Rc=v("ZodObject",(t,e)=>{No.init(t,e),X.init(t,e),E.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Fe(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:ve()}),t.loose=()=>t.clone({...t._zod.def,catchall:ve()}),t.strict=()=>t.clone({...t._zod.def,catchall:jc()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>E.extend(t,r),t.merge=r=>E.merge(t,r),t.pick=r=>E.pick(t,r),t.omit=r=>E.omit(t,r),t.partial=(...r)=>E.partial($p,t,r[0]),t.required=(...r)=>E.required(xp,t,r[0])});vp=v("ZodUnion",(t,e)=>{Oo.init(t,e),X.init(t,e),t.options=e.options});Nv=v("ZodDiscriminatedUnion",(t,e)=>{vp.init(t,e),bs.init(t,e)});Ov=v("ZodIntersection",(t,e)=>{$s.init(t,e),X.init(t,e)});Cv=v("ZodTuple",(t,e)=>{ir.init(t,e),X.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});_p=v("ZodRecord",(t,e)=>{xs.init(t,e),X.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});Av=v("ZodMap",(t,e)=>{ks.init(t,e),X.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});Dv=v("ZodSet",(t,e)=>{ws.init(t,e),X.init(t,e),t.min=(...r)=>t.check(Hr(...r)),t.nonempty=r=>t.check(Hr(1,r)),t.max=(...r)=>t.check(On(...r)),t.size=(...r)=>t.check(oi(...r))});_i=v("ZodEnum",(t,e)=>{Ss.init(t,e),X.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new _i({...e,checks:[],...E.normalizeParams(n),entries:i})},t.exclude=(o,n)=>{let i={...e.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new _i({...e,checks:[],...E.normalizeParams(n),entries:i})}});Uv=v("ZodLiteral",(t,e)=>{Is.init(t,e),X.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});Mv=v("ZodFile",(t,e)=>{Es.init(t,e),X.init(t,e),t.min=(r,o)=>t.check(Hr(r,o)),t.max=(r,o)=>t.check(On(r,o)),t.mime=(r,o)=>t.check(di(Array.isArray(r)?r:[r],o))});yp=v("ZodTransform",(t,e)=>{zn.init(t,e),X.init(t,e),t._zod.parse=(r,o)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(E.issue(i,r.value,e));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!0),r.issues.push(E.issue(a))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});$p=v("ZodOptional",(t,e)=>{Ts.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Zv=v("ZodNullable",(t,e)=>{zs.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Lv=v("ZodDefault",(t,e)=>{js.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});Fv=v("ZodPrefault",(t,e)=>{Ps.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});xp=v("ZodNonOptional",(t,e)=>{Rs.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Bv=v("ZodSuccess",(t,e)=>{Ns.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Wv=v("ZodCatch",(t,e)=>{Os.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});Gv=v("ZodNaN",(t,e)=>{Cs.init(t,e),X.init(t,e)});kp=v("ZodPipe",(t,e)=>{jn.init(t,e),X.init(t,e),t.in=e.in,t.out=e.out});Kv=v("ZodReadonly",(t,e)=>{As.init(t,e),X.init(t,e)});Yv=v("ZodTemplateLiteral",(t,e)=>{Ds.init(t,e),X.init(t,e)});Qv=v("ZodLazy",(t,e)=>{Ms.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.getter()});t_=v("ZodPromise",(t,e)=>{Us.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Oc=v("ZodCustom",(t,e)=>{Zs.init(t,e),X.init(t,e)});D0=(...t)=>fc({Pipe:kp,Boolean:$i,String:yi,Transform:yp},...t)});function Z0(t){xe({customError:t})}function L0(){return xe().customError}var M0,i_=O(()=>{Ee();M0={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"}});var Sp={};Gt(Sp,{bigint:()=>H0,boolean:()=>V0,date:()=>B0,number:()=>F0,string:()=>q0});function q0(t){return kd(yi,t)}function F0(t){return Td(bi,t)}function V0(t){return zd($i,t)}function H0(t){return jd(xi,t)}function B0(t){return Pd(Pc,t)}var a_=O(()=>{Ee();Sc()});var p={};Gt(p,{$brand:()=>za,$input:()=>Vs,$output:()=>Fs,NEVER:()=>Ta,TimePrecision:()=>Bs,ZodAny:()=>Tv,ZodArray:()=>Rv,ZodBase64:()=>pp,ZodBase64URL:()=>mp,ZodBigInt:()=>xi,ZodBigIntFormat:()=>gp,ZodBoolean:()=>$i,ZodCIDRv4:()=>lp,ZodCIDRv6:()=>dp,ZodCUID:()=>np,ZodCUID2:()=>op,ZodCatch:()=>Wv,ZodCustom:()=>Oc,ZodCustomStringFormat:()=>wv,ZodDate:()=>Pc,ZodDefault:()=>Lv,ZodDiscriminatedUnion:()=>Nv,ZodE164:()=>fp,ZodEmail:()=>Qd,ZodEmoji:()=>tp,ZodEnum:()=>_i,ZodError:()=>ZS,ZodFile:()=>Mv,ZodGUID:()=>Ic,ZodIPv4:()=>cp,ZodIPv6:()=>up,ZodISODate:()=>$c,ZodISODateTime:()=>bc,ZodISODuration:()=>kc,ZodISOTime:()=>xc,ZodIntersection:()=>Ov,ZodIssueCode:()=>M0,ZodJWT:()=>hp,ZodKSUID:()=>sp,ZodLazy:()=>Qv,ZodLiteral:()=>Uv,ZodMap:()=>Av,ZodNaN:()=>Gv,ZodNanoID:()=>rp,ZodNever:()=>jv,ZodNonOptional:()=>xp,ZodNull:()=>Ev,ZodNullable:()=>Zv,ZodNumber:()=>bi,ZodNumberFormat:()=>qn,ZodObject:()=>Rc,ZodOptional:()=>$p,ZodPipe:()=>kp,ZodPrefault:()=>Fv,ZodPromise:()=>t_,ZodReadonly:()=>Kv,ZodRealError:()=>Ln,ZodRecord:()=>_p,ZodSet:()=>Dv,ZodString:()=>yi,ZodStringFormat:()=>he,ZodSuccess:()=>Bv,ZodSymbol:()=>Sv,ZodTemplateLiteral:()=>Yv,ZodTransform:()=>yp,ZodTuple:()=>Cv,ZodType:()=>X,ZodULID:()=>ip,ZodURL:()=>ep,ZodUUID:()=>Vt,ZodUndefined:()=>Iv,ZodUnion:()=>vp,ZodUnknown:()=>zv,ZodVoid:()=>Pv,ZodXID:()=>ap,_ZodString:()=>Yd,_default:()=>qv,any:()=>b0,array:()=>re,base64:()=>a0,base64url:()=>s0,bigint:()=>h0,boolean:()=>we,catch:()=>Jv,check:()=>r_,cidrv4:()=>o0,cidrv6:()=>i0,clone:()=>Ce,coerce:()=>Sp,config:()=>xe,core:()=>_t,cuid:()=>XS,cuid2:()=>YS,custom:()=>wp,date:()=>x0,discriminatedUnion:()=>Nc,e164:()=>c0,email:()=>qS,emoji:()=>GS,endsWith:()=>li,enum:()=>Fe,file:()=>j0,flattenError:()=>wn,float32:()=>d0,float64:()=>p0,formatError:()=>Sn,function:()=>vc,getErrorMap:()=>L0,globalRegistry:()=>vt,gt:()=>qt,gte:()=>Ye,guid:()=>FS,includes:()=>ci,instanceof:()=>A0,int:()=>Xd,int32:()=>m0,int64:()=>g0,intersection:()=>ki,ipv4:()=>r0,ipv6:()=>n0,iso:()=>Zn,json:()=>U0,jwt:()=>u0,keyof:()=>k0,ksuid:()=>t0,lazy:()=>e_,length:()=>An,literal:()=>U,locales:()=>Pn,looseObject:()=>Ae,lowercase:()=>ai,lt:()=>Lt,lte:()=>ut,map:()=>E0,maxLength:()=>Cn,maxSize:()=>On,mime:()=>di,minLength:()=>ar,minSize:()=>Hr,multipleOf:()=>Vr,nan:()=>N0,nanoid:()=>KS,nativeEnum:()=>z0,negative:()=>Nd,never:()=>jc,nonnegative:()=>Cd,nonoptional:()=>Hv,nonpositive:()=>Od,normalize:()=>pi,null:()=>zc,nullable:()=>Ec,nullish:()=>P0,number:()=>ce,object:()=>R,optional:()=>ge,overwrite:()=>Ft,parse:()=>Bd,parseAsync:()=>Wd,partialRecord:()=>I0,pipe:()=>Tc,positive:()=>Rd,prefault:()=>Vv,preprocess:()=>Cc,prettifyError:()=>Ra,promise:()=>C0,property:()=>Ad,readonly:()=>Xv,record:()=>pe,refine:()=>n_,regex:()=>ii,regexes:()=>nr,registry:()=>Ao,safeParse:()=>Jd,safeParseAsync:()=>Gd,set:()=>T0,setErrorMap:()=>Z0,size:()=>oi,startsWith:()=>ui,strictObject:()=>w0,string:()=>y,stringFormat:()=>l0,stringbool:()=>D0,success:()=>R0,superRefine:()=>o_,symbol:()=>_0,templateLiteral:()=>O0,toJSONSchema:()=>Dn,toLowerCase:()=>fi,toUpperCase:()=>hi,transform:()=>bp,treeifyError:()=>Pa,trim:()=>mi,tuple:()=>S0,uint32:()=>f0,uint64:()=>v0,ulid:()=>QS,undefined:()=>y0,union:()=>de,unknown:()=>ve,uppercase:()=>si,url:()=>JS,uuid:()=>VS,uuidv4:()=>HS,uuidv6:()=>BS,uuidv7:()=>WS,void:()=>$0,xid:()=>e0});var Ip=O(()=>{Ee();Sc();Zd();Hd();Kd();i_();Ee();$d();Ee();qs();wc();wc();a_();xe(Ls())});var s_=O(()=>{Ip();Ip()});var Ep=O(()=>{s_()});var Li=j(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.regexpCode=se.getEsmExportName=se.getProperty=se.safeStringify=se.stringify=se.strConcat=se.addCodeArg=se.str=se._=se.nil=se._Code=se.Name=se.IDENTIFIER=se._CodeOrName=void 0;var Mi=class{};se._CodeOrName=Mi;se.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Kr=class extends Mi{constructor(e){if(super(),!se.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};se.Name=Kr;var pt=class extends Mi{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,o)=>`${r}${o}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,o)=>(o instanceof Kr&&(r[o.str]=(r[o.str]||0)+1),r),{})}};se._Code=pt;se.nil=new pt("");function oy(t,...e){let r=[t[0]],o=0;for(;o{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.ValueScope=et.ValueScopeName=et.Scope=et.varKinds=et.UsedValueState=void 0;var Qe=Li(),rm=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},nu;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(nu||(et.UsedValueState=nu={}));et.varKinds={const:new Qe.Name("const"),let:new Qe.Name("let"),var:new Qe.Name("var")};var ou=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Qe.Name?e:this.name(e)}name(e){return new Qe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||o===void 0)&&o.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};et.Scope=ou;var iu=class extends Qe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:o}){this.value=e,this.scopePath=(0,Qe._)`.${new Qe.Name(r)}[${o}]`}};et.ValueScopeName=iu;var OE=(0,Qe._)`\n`,nm=class extends ou{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?OE:Qe.nil}}get(){return this._scope}name(e){return new iu(e,this._newName(e))}value(e,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,a=(o=r.key)!==null&&o!==void 0?o:r.ref,s=this._values[i];if(s){let l=s.get(a);if(l)return l}else s=this._values[i]=new Map;s.set(a,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(e,r){let o=this._values[e];if(o)return o.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,Qe._)`${e}${o.scopePath}`})}scopeCode(e=this._values,r,o){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(e,r,o={},n){let i=Qe.nil;for(let a in e){let s=e[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,nu.Started);let l=r(u);if(l){let d=this.opts.es5?et.varKinds.var:et.varKinds.const;i=(0,Qe._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,Qe._)`${i}${l}${this.opts._n}`;else throw new rm(u);c.set(u,nu.Completed)})}return i}};et.ValueScope=nm});var K=j(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.or=Y.and=Y.not=Y.CodeGen=Y.operators=Y.varKinds=Y.ValueScopeName=Y.ValueScope=Y.Scope=Y.Name=Y.regexpCode=Y.stringify=Y.getProperty=Y.nil=Y.strConcat=Y.str=Y._=void 0;var oe=Li(),$t=om(),dr=Li();Object.defineProperty(Y,"_",{enumerable:!0,get:function(){return dr._}});Object.defineProperty(Y,"str",{enumerable:!0,get:function(){return dr.str}});Object.defineProperty(Y,"strConcat",{enumerable:!0,get:function(){return dr.strConcat}});Object.defineProperty(Y,"nil",{enumerable:!0,get:function(){return dr.nil}});Object.defineProperty(Y,"getProperty",{enumerable:!0,get:function(){return dr.getProperty}});Object.defineProperty(Y,"stringify",{enumerable:!0,get:function(){return dr.stringify}});Object.defineProperty(Y,"regexpCode",{enumerable:!0,get:function(){return dr.regexpCode}});Object.defineProperty(Y,"Name",{enumerable:!0,get:function(){return dr.Name}});var uu=om();Object.defineProperty(Y,"Scope",{enumerable:!0,get:function(){return uu.Scope}});Object.defineProperty(Y,"ValueScope",{enumerable:!0,get:function(){return uu.ValueScope}});Object.defineProperty(Y,"ValueScopeName",{enumerable:!0,get:function(){return uu.ValueScopeName}});Object.defineProperty(Y,"varKinds",{enumerable:!0,get:function(){return uu.varKinds}});Y.operators={GT:new oe._Code(">"),GTE:new oe._Code(">="),LT:new oe._Code("<"),LTE:new oe._Code("<="),EQ:new oe._Code("==="),NEQ:new oe._Code("!=="),NOT:new oe._Code("!"),OR:new oe._Code("||"),AND:new oe._Code("&&"),ADD:new oe._Code("+")};var Ht=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},im=class extends Ht{constructor(e,r,o){super(),this.varKind=e,this.name=r,this.rhs=o}render({es5:e,_n:r}){let o=e?$t.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Yn(this.rhs,e,r)),this}get names(){return this.rhs instanceof oe._CodeOrName?this.rhs.names:{}}},au=class extends Ht{constructor(e,r,o){super(),this.lhs=e,this.rhs=r,this.sideEffects=o}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof oe.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Yn(this.rhs,e,r),this}get names(){let e=this.lhs instanceof oe.Name?{}:{...this.lhs.names};return cu(e,this.rhs)}},am=class extends au{constructor(e,r,o,n){super(e,o,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},sm=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},cm=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},um=class extends Ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},lm=class extends Ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Yn(this.code,e,r),this}get names(){return this.code instanceof oe._CodeOrName?this.code.names:{}}},qi=class extends Ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,o)=>r+o.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let o=e[r].optimizeNodes();Array.isArray(o)?e.splice(r,1,...o):o?e[r]=o:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(e,r)||(CE(e,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Qr(e,r.names),{})}},Bt=class extends qi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},dm=class extends qi{},Xn=class extends Bt{};Xn.kind="else";var Xr=class t extends Bt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new Xn(o):o}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(ay(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Yn(this.condition,e,r),this}get names(){let e=super.names;return cu(e,this.condition),this.else&&Qr(e,this.else.names),e}};Xr.kind="if";var Yr=class extends Bt{};Yr.kind="for";var pm=class extends Yr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Yn(this.iteration,e,r),this}get names(){return Qr(super.names,this.iteration.names)}},mm=class extends Yr{constructor(e,r,o,n){super(),this.varKind=e,this.name=r,this.from=o,this.to=n}render(e){let r=e.es5?$t.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(e)}get names(){let e=cu(super.names,this.from);return cu(e,this.to)}},su=class extends Yr{constructor(e,r,o,n){super(),this.loop=e,this.varKind=r,this.name=o,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Yn(this.iterable,e,r),this}get names(){return Qr(super.names,this.iterable.names)}},Fi=class extends Bt{constructor(e,r,o){super(),this.name=e,this.args=r,this.async=o}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Fi.kind="func";var Vi=class extends qi{render(e){return"return "+super.render(e)}};Vi.kind="return";var fm=class extends Bt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var o,n;return super.optimizeNames(e,r),(o=this.catch)===null||o===void 0||o.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Qr(e,this.catch.names),this.finally&&Qr(e,this.finally.names),e}},Hi=class extends Bt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Hi.kind="catch";var Bi=class extends Bt{render(e){return"finally"+super.render(e)}};Bi.kind="finally";var hm=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` -`:""},this._extScope=e,this._scope=new $t.Scope({parent:e}),this._nodes=[new dm]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let o=this._extScope.value(e,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new im(e,i,o)),i}const(e,r,o){return this._def($t.varKinds.const,e,r,o)}let(e,r,o){return this._def($t.varKinds.let,e,r,o)}var(e,r,o){return this._def($t.varKinds.var,e,r,o)}assign(e,r,o){return this._leafNode(new au(e,r,o))}add(e,r){return this._leafNode(new am(e,Y.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==oe.nil&&this._leafNode(new lm(e)),this}object(...e){let r=["{"];for(let[o,n]of e)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,oe.addCodeArg)(r,n));return r.push("}"),new oe._Code(r)}if(e,r,o){if(this._blockNode(new Xr(e)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Xr(e))}else(){return this._elseNode(new Xn)}endIf(){return this._endBlockNode(Xr,Xn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new pm(e),r)}forRange(e,r,o,n,i=this.opts.es5?$t.varKinds.var:$t.varKinds.let){let a=this._scope.toName(e);return this._for(new mm(i,a,r,o),()=>n(a))}forOf(e,r,o,n=$t.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=r instanceof oe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,oe._)`${a}.length`,s=>{this.var(i,(0,oe._)`${a}[${s}]`),o(i)})}return this._for(new su("of",n,i,r),()=>o(i))}forIn(e,r,o,n=this.opts.es5?$t.varKinds.var:$t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,oe._)`Object.keys(${r})`,o);let i=this._scope.toName(e);return this._for(new su("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(Yr)}label(e){return this._leafNode(new sm(e))}break(e){return this._leafNode(new cm(e))}return(e){let r=new Vi;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vi)}try(e,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new fm;if(this._blockNode(n),this.code(e),r){let i=this.name("e");this._currNode=n.catch=new Hi(i),r(i)}return o&&(this._currNode=n.finally=new Bi,this.code(o)),this._endBlockNode(Hi,Bi)}throw(e){return this._leafNode(new um(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||e!==void 0&&o!==e)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=oe.nil,o,n){return this._blockNode(new Fi(e,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Fi)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let o=this._currNode;if(o instanceof e||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Xr))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Y.CodeGen=hm;function Qr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function cu(t,e){return e instanceof oe._CodeOrName?Qr(t,e.names):t}function Yn(t,e,r){if(t instanceof oe.Name)return o(t);if(!n(t))return t;return new oe._Code(t._items.reduce((i,a)=>(a instanceof oe.Name&&(a=o(a)),a instanceof oe._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=r[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function n(i){return i instanceof oe._Code&&i._items.some(a=>a instanceof oe.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function CE(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function ay(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,oe._)`!${gm(t)}`}Y.not=ay;var AE=sy(Y.operators.AND);function DE(...t){return t.reduce(AE)}Y.and=DE;var UE=sy(Y.operators.OR);function ME(...t){return t.reduce(UE)}Y.or=ME;function sy(t){return(e,r)=>e===oe.nil?r:r===oe.nil?e:(0,oe._)`${gm(e)} ${t} ${gm(r)}`}function gm(t){return t instanceof oe.Name?t:(0,oe._)`(${t})`}});var ie=j(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.checkStrictMode=Q.getErrorPath=Q.Type=Q.useFunc=Q.setEvaluated=Q.evaluatedPropsToName=Q.mergeEvaluated=Q.eachItem=Q.unescapeJsonPointer=Q.escapeJsonPointer=Q.escapeFragment=Q.unescapeFragment=Q.schemaRefOrVal=Q.schemaHasRulesButRef=Q.schemaHasRules=Q.checkUnknownRules=Q.alwaysValidSchema=Q.toHash=void 0;var fe=K(),ZE=Li();function LE(t){let e={};for(let r of t)e[r]=!0;return e}Q.toHash=LE;function qE(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ly(t,e),!dy(e,t.self.RULES.all))}Q.alwaysValidSchema=qE;function ly(t,e=t.schema){let{opts:r,self:o}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=o.RULES.keywords;for(let i in e)n[i]||fy(t,`unknown keyword: "${i}"`)}Q.checkUnknownRules=ly;function dy(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Q.schemaHasRules=dy;function FE(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Q.schemaHasRulesButRef=FE;function VE({topSchemaRef:t,schemaPath:e},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,fe._)`${r}`}return(0,fe._)`${t}${e}${(0,fe.getProperty)(o)}`}Q.schemaRefOrVal=VE;function HE(t){return py(decodeURIComponent(t))}Q.unescapeFragment=HE;function BE(t){return encodeURIComponent(_m(t))}Q.escapeFragment=BE;function _m(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Q.escapeJsonPointer=_m;function py(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Q.unescapeJsonPointer=py;function WE(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Q.eachItem=WE;function cy({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:o}){return(n,i,a,s)=>{let c=a===void 0?i:a instanceof fe.Name?(i instanceof fe.Name?t(n,i,a):e(n,i,a),a):i instanceof fe.Name?(e(n,a,i),i):r(i,a);return s===fe.Name&&!(c instanceof fe.Name)?o(n,c):c}}Q.mergeEvaluated={props:cy({mergeNames:(t,e,r)=>t.if((0,fe._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,fe._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,fe._)`${r} || {}`).code((0,fe._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,fe._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,fe._)`${r} || {}`),ym(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:my}),items:cy({mergeNames:(t,e,r)=>t.if((0,fe._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,fe._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,fe._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,fe._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function my(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,fe._)`{}`);return e!==void 0&&ym(t,r,e),r}Q.evaluatedPropsToName=my;function ym(t,e,r){Object.keys(r).forEach(o=>t.assign((0,fe._)`${e}${(0,fe.getProperty)(o)}`,!0))}Q.setEvaluated=ym;var uy={};function JE(t,e){return t.scopeValue("func",{ref:e,code:uy[e.code]||(uy[e.code]=new ZE._Code(e.code))})}Q.useFunc=JE;var vm;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vm||(Q.Type=vm={}));function GE(t,e,r){if(t instanceof fe.Name){let o=e===vm.Num;return r?o?(0,fe._)`"[" + ${t} + "]"`:(0,fe._)`"['" + ${t} + "']"`:o?(0,fe._)`"/" + ${t}`:(0,fe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,fe.getProperty)(t).toString():"/"+_m(t)}Q.getErrorPath=GE;function fy(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Q.checkStrictMode=fy});var Wt=j(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var De=K(),KE={data:new De.Name("data"),valCxt:new De.Name("valCxt"),instancePath:new De.Name("instancePath"),parentData:new De.Name("parentData"),parentDataProperty:new De.Name("parentDataProperty"),rootData:new De.Name("rootData"),dynamicAnchors:new De.Name("dynamicAnchors"),vErrors:new De.Name("vErrors"),errors:new De.Name("errors"),this:new De.Name("this"),self:new De.Name("self"),scope:new De.Name("scope"),json:new De.Name("json"),jsonPos:new De.Name("jsonPos"),jsonLen:new De.Name("jsonLen"),jsonPart:new De.Name("jsonPart")};bm.default=KE});var Wi=j(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.extendErrors=Ue.resetErrorsCount=Ue.reportExtraError=Ue.reportError=Ue.keyword$DataError=Ue.keywordError=void 0;var ae=K(),lu=ie(),He=Wt();Ue.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Ue.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function XE(t,e=Ue.keywordError,r,o){let{it:n}=t,{gen:i,compositeRule:a,allErrors:s}=n,c=vy(t,e,r);o??(a||s)?hy(i,c):gy(n,(0,ae._)`[${c}]`)}Ue.reportError=XE;function YE(t,e=Ue.keywordError,r){let{it:o}=t,{gen:n,compositeRule:i,allErrors:a}=o,s=vy(t,e,r);hy(n,s),i||a||gy(o,He.default.vErrors)}Ue.reportExtraError=YE;function QE(t,e){t.assign(He.default.errors,e),t.if((0,ae._)`${He.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${He.default.vErrors}.length`,e),()=>t.assign(He.default.vErrors,null)))}Ue.resetErrorsCount=QE;function eT({gen:t,keyword:e,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",n,He.default.errors,s=>{t.const(a,(0,ae._)`${He.default.vErrors}[${s}]`),t.if((0,ae._)`${a}.instancePath === undefined`,()=>t.assign((0,ae._)`${a}.instancePath`,(0,ae.strConcat)(He.default.instancePath,i.errorPath))),t.assign((0,ae._)`${a}.schemaPath`,(0,ae.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,ae._)`${a}.schema`,r),t.assign((0,ae._)`${a}.data`,o))})}Ue.extendErrors=eT;function hy(t,e){let r=t.const("err",e);t.if((0,ae._)`${He.default.vErrors} === null`,()=>t.assign(He.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${He.default.vErrors}.push(${r})`),t.code((0,ae._)`${He.default.errors}++`)}function gy(t,e){let{gen:r,validateName:o,schemaEnv:n}=t;n.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${o}.errors`,e),r.return(!1))}var en={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function vy(t,e,r){let{createErrors:o}=t.it;return o===!1?(0,ae._)`{}`:tT(t,e,r)}function tT(t,e,r={}){let{gen:o,it:n}=t,i=[rT(n,r),nT(t,r)];return oT(t,e,i),o.object(...i)}function rT({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,lu.getErrorPath)(e,lu.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,r)]}function nT({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:o}){let n=o?e:(0,ae.str)`${e}/${t}`;return r&&(n=(0,ae.str)`${n}${(0,lu.getErrorPath)(r,lu.Type.Str)}`),[en.schemaPath,n]}function oT(t,{params:e,message:r},o){let{keyword:n,data:i,schemaValue:a,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;o.push([en.keyword,n],[en.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&o.push([en.message,typeof r=="function"?r(t):r]),c.verbose&&o.push([en.schema,a],[en.parentSchema,(0,ae._)`${l}${d}`],[He.default.data,i]),u&&o.push([en.propertyName,u])}});var yy=j(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.boolOrEmptySchema=Qn.topBoolOrEmptySchema=void 0;var iT=Wi(),aT=K(),sT=Wt(),cT={message:"boolean schema is false"};function uT(t){let{gen:e,schema:r,validateName:o}=t;r===!1?_y(t,!1):typeof r=="object"&&r.$async===!0?e.return(sT.default.data):(e.assign((0,aT._)`${o}.errors`,null),e.return(!0))}Qn.topBoolOrEmptySchema=uT;function lT(t,e){let{gen:r,schema:o}=t;o===!1?(r.var(e,!1),_y(t)):r.var(e,!0)}Qn.boolOrEmptySchema=lT;function _y(t,e){let{gen:r,data:o}=t,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iT.reportError)(n,cT,void 0,e)}});var $m=j(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.getRules=eo.isJSONType=void 0;var dT=["string","number","integer","boolean","null","object","array"],pT=new Set(dT);function mT(t){return typeof t=="string"&&pT.has(t)}eo.isJSONType=mT;function fT(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}eo.getRules=fT});var xm=j(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.shouldUseRule=pr.shouldUseGroup=pr.schemaHasRulesForType=void 0;function hT({schema:t,self:e},r){let o=e.RULES.types[r];return o&&o!==!0&&by(t,o)}pr.schemaHasRulesForType=hT;function by(t,e){return e.rules.some(r=>$y(t,r))}pr.shouldUseGroup=by;function $y(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(o=>t[o]!==void 0))}pr.shouldUseRule=$y});var Ji=j(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;var gT=$m(),vT=xm(),_T=Wi(),J=K(),xy=ie(),to;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(to||(Me.DataType=to={}));function yT(t){let e=ky(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Me.getSchemaTypes=yT;function ky(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(gT.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Me.getJSONTypes=ky;function bT(t,e){let{gen:r,data:o,opts:n}=t,i=$T(e,n.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,vT.schemaHasRulesForType)(t,e[0]));if(a){let s=wm(e,o,n.strictNumbers,to.Wrong);r.if(s,()=>{i.length?xT(t,e,i):Sm(t)})}return a}Me.coerceAndCheckDataType=bT;var wy=new Set(["string","number","integer","boolean","null"]);function $T(t,e){return e?t.filter(r=>wy.has(r)||e==="array"&&r==="array"):[]}function xT(t,e,r){let{gen:o,data:n,opts:i}=t,a=o.let("dataType",(0,J._)`typeof ${n}`),s=o.let("coerced",(0,J._)`undefined`);i.coerceTypes==="array"&&o.if((0,J._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,J._)`${n}[0]`).assign(a,(0,J._)`typeof ${n}`).if(wm(e,n,i.strictNumbers),()=>o.assign(s,n))),o.if((0,J._)`${s} !== undefined`);for(let u of r)(wy.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),Sm(t),o.endIf(),o.if((0,J._)`${s} !== undefined`,()=>{o.assign(n,s),kT(t,s)});function c(u){switch(u){case"string":o.elseIf((0,J._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,J._)`"" + ${n}`).elseIf((0,J._)`${n} === null`).assign(s,(0,J._)`""`);return;case"number":o.elseIf((0,J._)`${a} == "boolean" || ${n} === null +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let l of this.seen.entries()){let d=l[1];if(e===l[0]){a(l);continue}if(o.external){let h=o.external.registry.get(l[0])?.id;if(e!==l[0]&&h){a(l);continue}}if(this.metadataRegistry.get(l[0])?.id){a(l);continue}if(d.cycle){a(l);continue}if(d.count>1&&o.reused==="ref"){a(l);continue}}let s=(l,d)=>{let g=this.seen.get(l),h=g.def??g.schema,m={...h};if(g.ref===null)return;let f=g.ref;if(g.ref=null,f){s(f,d);let _=this.seen.get(f).schema;_.$ref&&d.target==="draft-7"?(h.allOf=h.allOf??[],h.allOf.push(_)):(Object.assign(h,_),Object.assign(h,m))}g.isParent||this.override({zodSchema:l,jsonSchema:h,path:g.path??[]})};for(let l of[...this.seen.entries()].reverse())s(l[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){let l=o.external.registry.get(e)?.id;if(!l)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(l)}Object.assign(c,n.def);let u=o.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}});var _v={};var yv=O(()=>{});var _t={};Gt(_t,{$ZodAny:()=>gs,$ZodArray:()=>Tn,$ZodAsyncError:()=>zt,$ZodBase64:()=>as,$ZodBase64URL:()=>ss,$ZodBigInt:()=>Ro,$ZodBigIntFormat:()=>ps,$ZodBoolean:()=>En,$ZodCIDRv4:()=>os,$ZodCIDRv6:()=>is,$ZodCUID:()=>Xa,$ZodCUID2:()=>Ya,$ZodCatch:()=>Os,$ZodCheck:()=>be,$ZodCheckBigIntFormat:()=>Kl,$ZodCheckEndsWith:()=>cd,$ZodCheckGreaterThan:()=>La,$ZodCheckIncludes:()=>ad,$ZodCheckLengthEquals:()=>rd,$ZodCheckLessThan:()=>Za,$ZodCheckLowerCase:()=>od,$ZodCheckMaxLength:()=>ed,$ZodCheckMaxSize:()=>Xl,$ZodCheckMimeType:()=>ld,$ZodCheckMinLength:()=>td,$ZodCheckMinSize:()=>Yl,$ZodCheckMultipleOf:()=>Jl,$ZodCheckNumberFormat:()=>Gl,$ZodCheckOverwrite:()=>dd,$ZodCheckProperty:()=>ud,$ZodCheckRegex:()=>nd,$ZodCheckSizeEquals:()=>Ql,$ZodCheckStartsWith:()=>sd,$ZodCheckStringFormat:()=>In,$ZodCheckUpperCase:()=>id,$ZodCustom:()=>Zs,$ZodCustomStringFormat:()=>ls,$ZodDate:()=>ys,$ZodDefault:()=>js,$ZodDiscriminatedUnion:()=>bs,$ZodE164:()=>cs,$ZodEmail:()=>Wa,$ZodEmoji:()=>Ga,$ZodEnum:()=>Ss,$ZodError:()=>zo,$ZodFile:()=>Es,$ZodFunction:()=>gc,$ZodGUID:()=>Ha,$ZodIPv4:()=>rs,$ZodIPv6:()=>ns,$ZodISODate:()=>vd,$ZodISODateTime:()=>gd,$ZodISODuration:()=>yd,$ZodISOTime:()=>_d,$ZodIntersection:()=>$s,$ZodJWT:()=>us,$ZodKSUID:()=>ts,$ZodLazy:()=>Ms,$ZodLiteral:()=>Is,$ZodMap:()=>ks,$ZodNaN:()=>Cs,$ZodNanoID:()=>Ka,$ZodNever:()=>vs,$ZodNonOptional:()=>Rs,$ZodNull:()=>hs,$ZodNullable:()=>zs,$ZodNumber:()=>Po,$ZodNumberFormat:()=>ds,$ZodObject:()=>No,$ZodOptional:()=>Ts,$ZodPipe:()=>jn,$ZodPrefault:()=>Ps,$ZodPromise:()=>Us,$ZodReadonly:()=>As,$ZodRealError:()=>kn,$ZodRecord:()=>xs,$ZodRegistry:()=>Rn,$ZodSet:()=>ws,$ZodString:()=>or,$ZodStringFormat:()=>le,$ZodSuccess:()=>Ns,$ZodSymbol:()=>ms,$ZodTemplateLiteral:()=>Ds,$ZodTransform:()=>zn,$ZodTuple:()=>ir,$ZodType:()=>H,$ZodULID:()=>Qa,$ZodURL:()=>Ja,$ZodUUID:()=>Ba,$ZodUndefined:()=>fs,$ZodUnion:()=>Oo,$ZodUnknown:()=>qr,$ZodVoid:()=>_s,$ZodXID:()=>es,$brand:()=>za,$constructor:()=>v,$input:()=>Vs,$output:()=>Fs,Doc:()=>jo,JSONSchema:()=>_v,JSONSchemaGenerator:()=>vi,NEVER:()=>Ta,TimePrecision:()=>Bs,_any:()=>ac,_array:()=>gi,_base64:()=>ei,_base64url:()=>ti,_bigint:()=>ec,_boolean:()=>Qs,_catch:()=>TS,_cidrv4:()=>Yo,_cidrv6:()=>Qo,_coercedBigint:()=>jd,_coercedBoolean:()=>zd,_coercedDate:()=>Pd,_coercedNumber:()=>Td,_coercedString:()=>kd,_cuid:()=>Ho,_cuid2:()=>Bo,_custom:()=>pc,_date:()=>uc,_default:()=>SS,_discriminatedUnion:()=>fS,_e164:()=>ri,_email:()=>Do,_emoji:()=>Fo,_endsWith:()=>li,_enum:()=>yS,_file:()=>dc,_float32:()=>Gs,_float64:()=>Ks,_gt:()=>qt,_gte:()=>Ye,_guid:()=>Nn,_includes:()=>ci,_int:()=>Js,_int32:()=>Xs,_int64:()=>tc,_intersection:()=>hS,_ipv4:()=>Ko,_ipv6:()=>Xo,_isoDate:()=>Sd,_isoDateTime:()=>wd,_isoDuration:()=>Ed,_isoTime:()=>Id,_jwt:()=>ni,_ksuid:()=>Go,_lazy:()=>RS,_length:()=>An,_literal:()=>$S,_lowercase:()=>ai,_lt:()=>Lt,_lte:()=>ut,_map:()=>vS,_max:()=>ut,_maxLength:()=>Cn,_maxSize:()=>On,_mime:()=>di,_min:()=>Ye,_minLength:()=>ar,_minSize:()=>Hr,_multipleOf:()=>Vr,_nan:()=>lc,_nanoid:()=>Vo,_nativeEnum:()=>bS,_negative:()=>Nd,_never:()=>sc,_nonnegative:()=>Cd,_nonoptional:()=>IS,_nonpositive:()=>Od,_normalize:()=>pi,_null:()=>ic,_nullable:()=>wS,_number:()=>Ws,_optional:()=>kS,_overwrite:()=>Ft,_parse:()=>Na,_parseAsync:()=>Oa,_pipe:()=>zS,_positive:()=>Rd,_promise:()=>NS,_property:()=>Ad,_readonly:()=>jS,_record:()=>gS,_refine:()=>mc,_regex:()=>ii,_safeParse:()=>Ca,_safeParseAsync:()=>Aa,_set:()=>_S,_size:()=>oi,_startsWith:()=>ui,_string:()=>Hs,_stringFormat:()=>hc,_stringbool:()=>fc,_success:()=>ES,_symbol:()=>nc,_templateLiteral:()=>PS,_toLowerCase:()=>fi,_toUpperCase:()=>hi,_transform:()=>xS,_trim:()=>mi,_tuple:()=>Dd,_uint32:()=>Ys,_uint64:()=>rc,_ulid:()=>Wo,_undefined:()=>oc,_union:()=>mS,_unknown:()=>Fr,_uppercase:()=>si,_url:()=>qo,_uuid:()=>Uo,_uuidv4:()=>Mo,_uuidv6:()=>Zo,_uuidv7:()=>Lo,_void:()=>cc,_xid:()=>Jo,clone:()=>Ae,config:()=>xe,flattenError:()=>wn,formatError:()=>Sn,function:()=>vc,globalConfig:()=>$o,globalRegistry:()=>vt,isValidBase64:()=>bd,isValidBase64URL:()=>Fh,isValidJWT:()=>Vh,locales:()=>Pn,parse:()=>Mr,parseAsync:()=>Zr,prettifyError:()=>Ra,regexes:()=>nr,registry:()=>Ao,safeParse:()=>tr,safeParseAsync:()=>rr,toDotPath:()=>Sh,toJSONSchema:()=>Dn,treeifyError:()=>Pa,util:()=>E,version:()=>md});var Ee=O(()=>{bn();Da();_l();Co();qa();fd();V();Ma();qs();xd();pd();gv();Ud();vv();yv()});var Zd=O(()=>{Ee()});var Zn={};Gt(Zn,{ZodISODate:()=>$c,ZodISODateTime:()=>bc,ZodISODuration:()=>kc,ZodISOTime:()=>xc,date:()=>qd,datetime:()=>Ld,duration:()=>Vd,time:()=>Fd});function Ld(t){return wd(bc,t)}function qd(t){return Sd($c,t)}function Fd(t){return Id(xc,t)}function Vd(t){return Ed(kc,t)}var bc,$c,xc,kc,wc=O(()=>{Ee();Sc();bc=v("ZodISODateTime",(t,e)=>{gd.init(t,e),he.init(t,e)});$c=v("ZodISODate",(t,e)=>{vd.init(t,e),he.init(t,e)});xc=v("ZodISOTime",(t,e)=>{_d.init(t,e),he.init(t,e)});kc=v("ZodISODuration",(t,e)=>{yd.init(t,e),he.init(t,e)})});var kv,ZS,Ln,Hd=O(()=>{Ee();Ee();kv=(t,e)=>{zo.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Sn(t,r)},flatten:{value:r=>wn(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},ZS=v("ZodError",kv),Ln=v("ZodError",kv,{Parent:Error})});var Bd,Wd,Jd,Gd,Kd=O(()=>{Ee();Hd();Bd=Na(Ln),Wd=Oa(Ln),Jd=Ca(Ln),Gd=Aa(Ln)});function y(t){return Hs(yi,t)}function qS(t){return Do(Qd,t)}function FS(t){return Nn(Ic,t)}function VS(t){return Uo(Vt,t)}function HS(t){return Mo(Vt,t)}function BS(t){return Zo(Vt,t)}function WS(t){return Lo(Vt,t)}function JS(t){return qo(ep,t)}function GS(t){return Fo(tp,t)}function KS(t){return Vo(rp,t)}function XS(t){return Ho(np,t)}function YS(t){return Bo(op,t)}function QS(t){return Wo(ip,t)}function e0(t){return Jo(ap,t)}function t0(t){return Go(sp,t)}function r0(t){return Ko(cp,t)}function n0(t){return Xo(up,t)}function o0(t){return Yo(lp,t)}function i0(t){return Qo(dp,t)}function a0(t){return ei(pp,t)}function s0(t){return ti(mp,t)}function c0(t){return ri(fp,t)}function u0(t){return ni(hp,t)}function l0(t,e,r={}){return hc(wv,t,e,r)}function ce(t){return Ws(bi,t)}function Xd(t){return Js(qn,t)}function d0(t){return Gs(qn,t)}function p0(t){return Ks(qn,t)}function m0(t){return Xs(qn,t)}function f0(t){return Ys(qn,t)}function we(t){return Qs($i,t)}function h0(t){return ec(xi,t)}function g0(t){return tc(gp,t)}function v0(t){return rc(gp,t)}function _0(t){return nc(Sv,t)}function y0(t){return oc(Iv,t)}function zc(t){return ic(Ev,t)}function b0(){return ac(Tv)}function ve(){return Fr(zv)}function jc(t){return sc(jv,t)}function $0(t){return cc(Pv,t)}function x0(t){return uc(Pc,t)}function re(t,e){return gi(Rv,t,e)}function k0(t){let e=t._zod.def.shape;return U(Object.keys(e))}function R(t,e){let r={type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},...E.normalizeParams(e)};return new Rc(r)}function w0(t,e){return new Rc({type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},catchall:jc(),...E.normalizeParams(e)})}function De(t,e){return new Rc({type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},catchall:ve(),...E.normalizeParams(e)})}function de(t,e){return new vp({type:"union",options:t,...E.normalizeParams(e)})}function Nc(t,e,r){return new Nv({type:"union",options:e,discriminator:t,...E.normalizeParams(r)})}function ki(t,e){return new Ov({type:"intersection",left:t,right:e})}function S0(t,e,r){let o=e instanceof H,n=o?r:e,i=o?e:null;return new Cv({type:"tuple",items:t,rest:i,...E.normalizeParams(n)})}function pe(t,e,r){return new _p({type:"record",keyType:t,valueType:e,...E.normalizeParams(r)})}function I0(t,e,r){return new _p({type:"record",keyType:de([t,jc()]),valueType:e,...E.normalizeParams(r)})}function E0(t,e,r){return new Av({type:"map",keyType:t,valueType:e,...E.normalizeParams(r)})}function T0(t,e){return new Dv({type:"set",valueType:t,...E.normalizeParams(e)})}function Fe(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new _i({type:"enum",entries:r,...E.normalizeParams(e)})}function z0(t,e){return new _i({type:"enum",entries:t,...E.normalizeParams(e)})}function U(t,e){return new Uv({type:"literal",values:Array.isArray(t)?t:[t],...E.normalizeParams(e)})}function j0(t){return dc(Mv,t)}function bp(t){return new yp({type:"transform",transform:t})}function ge(t){return new $p({type:"optional",innerType:t})}function Ec(t){return new Zv({type:"nullable",innerType:t})}function P0(t){return ge(Ec(t))}function qv(t,e){return new Lv({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function Vv(t,e){return new Fv({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function Hv(t,e){return new xp({type:"nonoptional",innerType:t,...E.normalizeParams(e)})}function R0(t){return new Bv({type:"success",innerType:t})}function Jv(t,e){return new Wv({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function N0(t){return lc(Gv,t)}function Tc(t,e){return new kp({type:"pipe",in:t,out:e})}function Xv(t){return new Kv({type:"readonly",innerType:t})}function O0(t,e){return new Yv({type:"template_literal",parts:t,...E.normalizeParams(e)})}function e_(t){return new Qv({type:"lazy",getter:t})}function C0(t){return new t_({type:"promise",innerType:t})}function r_(t){let e=new be({check:"custom"});return e._zod.check=t,e}function wp(t,e){return pc(Oc,t??(()=>!0),e)}function n_(t,e={}){return mc(Oc,t,e)}function o_(t){let e=r_(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(E.issue(o,r.value,e._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(E.issue(n))}},t(r.value,r)));return e}function A0(t,e={error:`Input not instance of ${t.name}`}){let r=new Oc({type:"custom",check:"custom",fn:o=>o instanceof t,abort:!0,...E.normalizeParams(e)});return r._zod.bag.Class=t,r}function U0(t){let e=e_(()=>de([y(t),ce(),we(),zc(),re(e),pe(y(),e)]));return e}function Cc(t,e){return Tc(bp(t),e)}var X,Yd,yi,he,Qd,Ic,Vt,ep,tp,rp,np,op,ip,ap,sp,cp,up,lp,dp,pp,mp,fp,hp,wv,bi,qn,$i,xi,gp,Sv,Iv,Ev,Tv,zv,jv,Pv,Pc,Rv,Rc,vp,Nv,Ov,Cv,_p,Av,Dv,_i,Uv,Mv,yp,$p,Zv,Lv,Fv,xp,Bv,Wv,Gv,kp,Kv,Yv,Qv,t_,Oc,D0,Sc=O(()=>{Ee();Ee();Zd();wc();Kd();X=v("ZodType",(t,e)=>(H.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),t.clone=(r,o)=>Ae(t,r,o),t.brand=()=>t,t.register=((r,o)=>(r.add(t,o),t)),t.parse=(r,o)=>Bd(t,r,o,{callee:t.parse}),t.safeParse=(r,o)=>Jd(t,r,o),t.parseAsync=async(r,o)=>Wd(t,r,o,{callee:t.parseAsync}),t.safeParseAsync=async(r,o)=>Gd(t,r,o),t.spa=t.safeParseAsync,t.refine=(r,o)=>t.check(n_(r,o)),t.superRefine=r=>t.check(o_(r)),t.overwrite=r=>t.check(Ft(r)),t.optional=()=>ge(t),t.nullable=()=>Ec(t),t.nullish=()=>ge(Ec(t)),t.nonoptional=r=>Hv(t,r),t.array=()=>re(t),t.or=r=>de([t,r]),t.and=r=>ki(t,r),t.transform=r=>Tc(t,bp(r)),t.default=r=>qv(t,r),t.prefault=r=>Vv(t,r),t.catch=r=>Jv(t,r),t.pipe=r=>Tc(t,r),t.readonly=()=>Xv(t),t.describe=r=>{let o=t.clone();return vt.add(o,{description:r}),o},Object.defineProperty(t,"description",{get(){return vt.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return vt.get(t);let o=t.clone();return vt.add(o,r[0]),o},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),Yd=v("_ZodString",(t,e)=>{or.init(t,e),X.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...o)=>t.check(ii(...o)),t.includes=(...o)=>t.check(ci(...o)),t.startsWith=(...o)=>t.check(ui(...o)),t.endsWith=(...o)=>t.check(li(...o)),t.min=(...o)=>t.check(ar(...o)),t.max=(...o)=>t.check(Cn(...o)),t.length=(...o)=>t.check(An(...o)),t.nonempty=(...o)=>t.check(ar(1,...o)),t.lowercase=o=>t.check(ai(o)),t.uppercase=o=>t.check(si(o)),t.trim=()=>t.check(mi()),t.normalize=(...o)=>t.check(pi(...o)),t.toLowerCase=()=>t.check(fi()),t.toUpperCase=()=>t.check(hi())}),yi=v("ZodString",(t,e)=>{or.init(t,e),Yd.init(t,e),t.email=r=>t.check(Do(Qd,r)),t.url=r=>t.check(qo(ep,r)),t.jwt=r=>t.check(ni(hp,r)),t.emoji=r=>t.check(Fo(tp,r)),t.guid=r=>t.check(Nn(Ic,r)),t.uuid=r=>t.check(Uo(Vt,r)),t.uuidv4=r=>t.check(Mo(Vt,r)),t.uuidv6=r=>t.check(Zo(Vt,r)),t.uuidv7=r=>t.check(Lo(Vt,r)),t.nanoid=r=>t.check(Vo(rp,r)),t.guid=r=>t.check(Nn(Ic,r)),t.cuid=r=>t.check(Ho(np,r)),t.cuid2=r=>t.check(Bo(op,r)),t.ulid=r=>t.check(Wo(ip,r)),t.base64=r=>t.check(ei(pp,r)),t.base64url=r=>t.check(ti(mp,r)),t.xid=r=>t.check(Jo(ap,r)),t.ksuid=r=>t.check(Go(sp,r)),t.ipv4=r=>t.check(Ko(cp,r)),t.ipv6=r=>t.check(Xo(up,r)),t.cidrv4=r=>t.check(Yo(lp,r)),t.cidrv6=r=>t.check(Qo(dp,r)),t.e164=r=>t.check(ri(fp,r)),t.datetime=r=>t.check(Ld(r)),t.date=r=>t.check(qd(r)),t.time=r=>t.check(Fd(r)),t.duration=r=>t.check(Vd(r))});he=v("ZodStringFormat",(t,e)=>{le.init(t,e),Yd.init(t,e)}),Qd=v("ZodEmail",(t,e)=>{Wa.init(t,e),he.init(t,e)});Ic=v("ZodGUID",(t,e)=>{Ha.init(t,e),he.init(t,e)});Vt=v("ZodUUID",(t,e)=>{Ba.init(t,e),he.init(t,e)});ep=v("ZodURL",(t,e)=>{Ja.init(t,e),he.init(t,e)});tp=v("ZodEmoji",(t,e)=>{Ga.init(t,e),he.init(t,e)});rp=v("ZodNanoID",(t,e)=>{Ka.init(t,e),he.init(t,e)});np=v("ZodCUID",(t,e)=>{Xa.init(t,e),he.init(t,e)});op=v("ZodCUID2",(t,e)=>{Ya.init(t,e),he.init(t,e)});ip=v("ZodULID",(t,e)=>{Qa.init(t,e),he.init(t,e)});ap=v("ZodXID",(t,e)=>{es.init(t,e),he.init(t,e)});sp=v("ZodKSUID",(t,e)=>{ts.init(t,e),he.init(t,e)});cp=v("ZodIPv4",(t,e)=>{rs.init(t,e),he.init(t,e)});up=v("ZodIPv6",(t,e)=>{ns.init(t,e),he.init(t,e)});lp=v("ZodCIDRv4",(t,e)=>{os.init(t,e),he.init(t,e)});dp=v("ZodCIDRv6",(t,e)=>{is.init(t,e),he.init(t,e)});pp=v("ZodBase64",(t,e)=>{as.init(t,e),he.init(t,e)});mp=v("ZodBase64URL",(t,e)=>{ss.init(t,e),he.init(t,e)});fp=v("ZodE164",(t,e)=>{cs.init(t,e),he.init(t,e)});hp=v("ZodJWT",(t,e)=>{us.init(t,e),he.init(t,e)});wv=v("ZodCustomStringFormat",(t,e)=>{ls.init(t,e),he.init(t,e)});bi=v("ZodNumber",(t,e)=>{Po.init(t,e),X.init(t,e),t.gt=(o,n)=>t.check(qt(o,n)),t.gte=(o,n)=>t.check(Ye(o,n)),t.min=(o,n)=>t.check(Ye(o,n)),t.lt=(o,n)=>t.check(Lt(o,n)),t.lte=(o,n)=>t.check(ut(o,n)),t.max=(o,n)=>t.check(ut(o,n)),t.int=o=>t.check(Xd(o)),t.safe=o=>t.check(Xd(o)),t.positive=o=>t.check(qt(0,o)),t.nonnegative=o=>t.check(Ye(0,o)),t.negative=o=>t.check(Lt(0,o)),t.nonpositive=o=>t.check(ut(0,o)),t.multipleOf=(o,n)=>t.check(Vr(o,n)),t.step=(o,n)=>t.check(Vr(o,n)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});qn=v("ZodNumberFormat",(t,e)=>{ds.init(t,e),bi.init(t,e)});$i=v("ZodBoolean",(t,e)=>{En.init(t,e),X.init(t,e)});xi=v("ZodBigInt",(t,e)=>{Ro.init(t,e),X.init(t,e),t.gte=(o,n)=>t.check(Ye(o,n)),t.min=(o,n)=>t.check(Ye(o,n)),t.gt=(o,n)=>t.check(qt(o,n)),t.gte=(o,n)=>t.check(Ye(o,n)),t.min=(o,n)=>t.check(Ye(o,n)),t.lt=(o,n)=>t.check(Lt(o,n)),t.lte=(o,n)=>t.check(ut(o,n)),t.max=(o,n)=>t.check(ut(o,n)),t.positive=o=>t.check(qt(BigInt(0),o)),t.negative=o=>t.check(Lt(BigInt(0),o)),t.nonpositive=o=>t.check(ut(BigInt(0),o)),t.nonnegative=o=>t.check(Ye(BigInt(0),o)),t.multipleOf=(o,n)=>t.check(Vr(o,n));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});gp=v("ZodBigIntFormat",(t,e)=>{ps.init(t,e),xi.init(t,e)});Sv=v("ZodSymbol",(t,e)=>{ms.init(t,e),X.init(t,e)});Iv=v("ZodUndefined",(t,e)=>{fs.init(t,e),X.init(t,e)});Ev=v("ZodNull",(t,e)=>{hs.init(t,e),X.init(t,e)});Tv=v("ZodAny",(t,e)=>{gs.init(t,e),X.init(t,e)});zv=v("ZodUnknown",(t,e)=>{qr.init(t,e),X.init(t,e)});jv=v("ZodNever",(t,e)=>{vs.init(t,e),X.init(t,e)});Pv=v("ZodVoid",(t,e)=>{_s.init(t,e),X.init(t,e)});Pc=v("ZodDate",(t,e)=>{ys.init(t,e),X.init(t,e),t.min=(o,n)=>t.check(Ye(o,n)),t.max=(o,n)=>t.check(ut(o,n));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});Rv=v("ZodArray",(t,e)=>{Tn.init(t,e),X.init(t,e),t.element=e.element,t.min=(r,o)=>t.check(ar(r,o)),t.nonempty=r=>t.check(ar(1,r)),t.max=(r,o)=>t.check(Cn(r,o)),t.length=(r,o)=>t.check(An(r,o)),t.unwrap=()=>t.element});Rc=v("ZodObject",(t,e)=>{No.init(t,e),X.init(t,e),E.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Fe(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:ve()}),t.loose=()=>t.clone({...t._zod.def,catchall:ve()}),t.strict=()=>t.clone({...t._zod.def,catchall:jc()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>E.extend(t,r),t.merge=r=>E.merge(t,r),t.pick=r=>E.pick(t,r),t.omit=r=>E.omit(t,r),t.partial=(...r)=>E.partial($p,t,r[0]),t.required=(...r)=>E.required(xp,t,r[0])});vp=v("ZodUnion",(t,e)=>{Oo.init(t,e),X.init(t,e),t.options=e.options});Nv=v("ZodDiscriminatedUnion",(t,e)=>{vp.init(t,e),bs.init(t,e)});Ov=v("ZodIntersection",(t,e)=>{$s.init(t,e),X.init(t,e)});Cv=v("ZodTuple",(t,e)=>{ir.init(t,e),X.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});_p=v("ZodRecord",(t,e)=>{xs.init(t,e),X.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});Av=v("ZodMap",(t,e)=>{ks.init(t,e),X.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});Dv=v("ZodSet",(t,e)=>{ws.init(t,e),X.init(t,e),t.min=(...r)=>t.check(Hr(...r)),t.nonempty=r=>t.check(Hr(1,r)),t.max=(...r)=>t.check(On(...r)),t.size=(...r)=>t.check(oi(...r))});_i=v("ZodEnum",(t,e)=>{Ss.init(t,e),X.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new _i({...e,checks:[],...E.normalizeParams(n),entries:i})},t.exclude=(o,n)=>{let i={...e.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new _i({...e,checks:[],...E.normalizeParams(n),entries:i})}});Uv=v("ZodLiteral",(t,e)=>{Is.init(t,e),X.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});Mv=v("ZodFile",(t,e)=>{Es.init(t,e),X.init(t,e),t.min=(r,o)=>t.check(Hr(r,o)),t.max=(r,o)=>t.check(On(r,o)),t.mime=(r,o)=>t.check(di(Array.isArray(r)?r:[r],o))});yp=v("ZodTransform",(t,e)=>{zn.init(t,e),X.init(t,e),t._zod.parse=(r,o)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(E.issue(i,r.value,e));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!0),r.issues.push(E.issue(a))}};let n=e.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});$p=v("ZodOptional",(t,e)=>{Ts.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Zv=v("ZodNullable",(t,e)=>{zs.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Lv=v("ZodDefault",(t,e)=>{js.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});Fv=v("ZodPrefault",(t,e)=>{Ps.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});xp=v("ZodNonOptional",(t,e)=>{Rs.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Bv=v("ZodSuccess",(t,e)=>{Ns.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Wv=v("ZodCatch",(t,e)=>{Os.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});Gv=v("ZodNaN",(t,e)=>{Cs.init(t,e),X.init(t,e)});kp=v("ZodPipe",(t,e)=>{jn.init(t,e),X.init(t,e),t.in=e.in,t.out=e.out});Kv=v("ZodReadonly",(t,e)=>{As.init(t,e),X.init(t,e)});Yv=v("ZodTemplateLiteral",(t,e)=>{Ds.init(t,e),X.init(t,e)});Qv=v("ZodLazy",(t,e)=>{Ms.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.getter()});t_=v("ZodPromise",(t,e)=>{Us.init(t,e),X.init(t,e),t.unwrap=()=>t._zod.def.innerType});Oc=v("ZodCustom",(t,e)=>{Zs.init(t,e),X.init(t,e)});D0=(...t)=>fc({Pipe:kp,Boolean:$i,String:yi,Transform:yp},...t)});function Z0(t){xe({customError:t})}function L0(){return xe().customError}var M0,i_=O(()=>{Ee();M0={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"}});var Sp={};Gt(Sp,{bigint:()=>H0,boolean:()=>V0,date:()=>B0,number:()=>F0,string:()=>q0});function q0(t){return kd(yi,t)}function F0(t){return Td(bi,t)}function V0(t){return zd($i,t)}function H0(t){return jd(xi,t)}function B0(t){return Pd(Pc,t)}var a_=O(()=>{Ee();Sc()});var p={};Gt(p,{$brand:()=>za,$input:()=>Vs,$output:()=>Fs,NEVER:()=>Ta,TimePrecision:()=>Bs,ZodAny:()=>Tv,ZodArray:()=>Rv,ZodBase64:()=>pp,ZodBase64URL:()=>mp,ZodBigInt:()=>xi,ZodBigIntFormat:()=>gp,ZodBoolean:()=>$i,ZodCIDRv4:()=>lp,ZodCIDRv6:()=>dp,ZodCUID:()=>np,ZodCUID2:()=>op,ZodCatch:()=>Wv,ZodCustom:()=>Oc,ZodCustomStringFormat:()=>wv,ZodDate:()=>Pc,ZodDefault:()=>Lv,ZodDiscriminatedUnion:()=>Nv,ZodE164:()=>fp,ZodEmail:()=>Qd,ZodEmoji:()=>tp,ZodEnum:()=>_i,ZodError:()=>ZS,ZodFile:()=>Mv,ZodGUID:()=>Ic,ZodIPv4:()=>cp,ZodIPv6:()=>up,ZodISODate:()=>$c,ZodISODateTime:()=>bc,ZodISODuration:()=>kc,ZodISOTime:()=>xc,ZodIntersection:()=>Ov,ZodIssueCode:()=>M0,ZodJWT:()=>hp,ZodKSUID:()=>sp,ZodLazy:()=>Qv,ZodLiteral:()=>Uv,ZodMap:()=>Av,ZodNaN:()=>Gv,ZodNanoID:()=>rp,ZodNever:()=>jv,ZodNonOptional:()=>xp,ZodNull:()=>Ev,ZodNullable:()=>Zv,ZodNumber:()=>bi,ZodNumberFormat:()=>qn,ZodObject:()=>Rc,ZodOptional:()=>$p,ZodPipe:()=>kp,ZodPrefault:()=>Fv,ZodPromise:()=>t_,ZodReadonly:()=>Kv,ZodRealError:()=>Ln,ZodRecord:()=>_p,ZodSet:()=>Dv,ZodString:()=>yi,ZodStringFormat:()=>he,ZodSuccess:()=>Bv,ZodSymbol:()=>Sv,ZodTemplateLiteral:()=>Yv,ZodTransform:()=>yp,ZodTuple:()=>Cv,ZodType:()=>X,ZodULID:()=>ip,ZodURL:()=>ep,ZodUUID:()=>Vt,ZodUndefined:()=>Iv,ZodUnion:()=>vp,ZodUnknown:()=>zv,ZodVoid:()=>Pv,ZodXID:()=>ap,_ZodString:()=>Yd,_default:()=>qv,any:()=>b0,array:()=>re,base64:()=>a0,base64url:()=>s0,bigint:()=>h0,boolean:()=>we,catch:()=>Jv,check:()=>r_,cidrv4:()=>o0,cidrv6:()=>i0,clone:()=>Ae,coerce:()=>Sp,config:()=>xe,core:()=>_t,cuid:()=>XS,cuid2:()=>YS,custom:()=>wp,date:()=>x0,discriminatedUnion:()=>Nc,e164:()=>c0,email:()=>qS,emoji:()=>GS,endsWith:()=>li,enum:()=>Fe,file:()=>j0,flattenError:()=>wn,float32:()=>d0,float64:()=>p0,formatError:()=>Sn,function:()=>vc,getErrorMap:()=>L0,globalRegistry:()=>vt,gt:()=>qt,gte:()=>Ye,guid:()=>FS,includes:()=>ci,instanceof:()=>A0,int:()=>Xd,int32:()=>m0,int64:()=>g0,intersection:()=>ki,ipv4:()=>r0,ipv6:()=>n0,iso:()=>Zn,json:()=>U0,jwt:()=>u0,keyof:()=>k0,ksuid:()=>t0,lazy:()=>e_,length:()=>An,literal:()=>U,locales:()=>Pn,looseObject:()=>De,lowercase:()=>ai,lt:()=>Lt,lte:()=>ut,map:()=>E0,maxLength:()=>Cn,maxSize:()=>On,mime:()=>di,minLength:()=>ar,minSize:()=>Hr,multipleOf:()=>Vr,nan:()=>N0,nanoid:()=>KS,nativeEnum:()=>z0,negative:()=>Nd,never:()=>jc,nonnegative:()=>Cd,nonoptional:()=>Hv,nonpositive:()=>Od,normalize:()=>pi,null:()=>zc,nullable:()=>Ec,nullish:()=>P0,number:()=>ce,object:()=>R,optional:()=>ge,overwrite:()=>Ft,parse:()=>Bd,parseAsync:()=>Wd,partialRecord:()=>I0,pipe:()=>Tc,positive:()=>Rd,prefault:()=>Vv,preprocess:()=>Cc,prettifyError:()=>Ra,promise:()=>C0,property:()=>Ad,readonly:()=>Xv,record:()=>pe,refine:()=>n_,regex:()=>ii,regexes:()=>nr,registry:()=>Ao,safeParse:()=>Jd,safeParseAsync:()=>Gd,set:()=>T0,setErrorMap:()=>Z0,size:()=>oi,startsWith:()=>ui,strictObject:()=>w0,string:()=>y,stringFormat:()=>l0,stringbool:()=>D0,success:()=>R0,superRefine:()=>o_,symbol:()=>_0,templateLiteral:()=>O0,toJSONSchema:()=>Dn,toLowerCase:()=>fi,toUpperCase:()=>hi,transform:()=>bp,treeifyError:()=>Pa,trim:()=>mi,tuple:()=>S0,uint32:()=>f0,uint64:()=>v0,ulid:()=>QS,undefined:()=>y0,union:()=>de,unknown:()=>ve,uppercase:()=>si,url:()=>JS,uuid:()=>VS,uuidv4:()=>HS,uuidv6:()=>BS,uuidv7:()=>WS,void:()=>$0,xid:()=>e0});var Ip=O(()=>{Ee();Sc();Zd();Hd();Kd();i_();Ee();$d();Ee();qs();wc();wc();a_();xe(Ls())});var s_=O(()=>{Ip();Ip()});var Ep=O(()=>{s_()});var Li=j(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.regexpCode=se.getEsmExportName=se.getProperty=se.safeStringify=se.stringify=se.strConcat=se.addCodeArg=se.str=se._=se.nil=se._Code=se.Name=se.IDENTIFIER=se._CodeOrName=void 0;var Mi=class{};se._CodeOrName=Mi;se.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Kr=class extends Mi{constructor(e){if(super(),!se.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};se.Name=Kr;var pt=class extends Mi{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,o)=>`${r}${o}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,o)=>(o instanceof Kr&&(r[o.str]=(r[o.str]||0)+1),r),{})}};se._Code=pt;se.nil=new pt("");function oy(t,...e){let r=[t[0]],o=0;for(;o{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.ValueScope=et.ValueScopeName=et.Scope=et.varKinds=et.UsedValueState=void 0;var Qe=Li(),rm=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},nu;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(nu||(et.UsedValueState=nu={}));et.varKinds={const:new Qe.Name("const"),let:new Qe.Name("let"),var:new Qe.Name("var")};var ou=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Qe.Name?e:this.name(e)}name(e){return new Qe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||o===void 0)&&o.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};et.Scope=ou;var iu=class extends Qe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:o}){this.value=e,this.scopePath=(0,Qe._)`.${new Qe.Name(r)}[${o}]`}};et.ValueScopeName=iu;var OE=(0,Qe._)`\n`,nm=class extends ou{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?OE:Qe.nil}}get(){return this._scope}name(e){return new iu(e,this._newName(e))}value(e,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,a=(o=r.key)!==null&&o!==void 0?o:r.ref,s=this._values[i];if(s){let l=s.get(a);if(l)return l}else s=this._values[i]=new Map;s.set(a,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(e,r){let o=this._values[e];if(o)return o.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,Qe._)`${e}${o.scopePath}`})}scopeCode(e=this._values,r,o){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(e,r,o={},n){let i=Qe.nil;for(let a in e){let s=e[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,nu.Started);let l=r(u);if(l){let d=this.opts.es5?et.varKinds.var:et.varKinds.const;i=(0,Qe._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,Qe._)`${i}${l}${this.opts._n}`;else throw new rm(u);c.set(u,nu.Completed)})}return i}};et.ValueScope=nm});var K=j(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.or=Y.and=Y.not=Y.CodeGen=Y.operators=Y.varKinds=Y.ValueScopeName=Y.ValueScope=Y.Scope=Y.Name=Y.regexpCode=Y.stringify=Y.getProperty=Y.nil=Y.strConcat=Y.str=Y._=void 0;var oe=Li(),$t=om(),dr=Li();Object.defineProperty(Y,"_",{enumerable:!0,get:function(){return dr._}});Object.defineProperty(Y,"str",{enumerable:!0,get:function(){return dr.str}});Object.defineProperty(Y,"strConcat",{enumerable:!0,get:function(){return dr.strConcat}});Object.defineProperty(Y,"nil",{enumerable:!0,get:function(){return dr.nil}});Object.defineProperty(Y,"getProperty",{enumerable:!0,get:function(){return dr.getProperty}});Object.defineProperty(Y,"stringify",{enumerable:!0,get:function(){return dr.stringify}});Object.defineProperty(Y,"regexpCode",{enumerable:!0,get:function(){return dr.regexpCode}});Object.defineProperty(Y,"Name",{enumerable:!0,get:function(){return dr.Name}});var uu=om();Object.defineProperty(Y,"Scope",{enumerable:!0,get:function(){return uu.Scope}});Object.defineProperty(Y,"ValueScope",{enumerable:!0,get:function(){return uu.ValueScope}});Object.defineProperty(Y,"ValueScopeName",{enumerable:!0,get:function(){return uu.ValueScopeName}});Object.defineProperty(Y,"varKinds",{enumerable:!0,get:function(){return uu.varKinds}});Y.operators={GT:new oe._Code(">"),GTE:new oe._Code(">="),LT:new oe._Code("<"),LTE:new oe._Code("<="),EQ:new oe._Code("==="),NEQ:new oe._Code("!=="),NOT:new oe._Code("!"),OR:new oe._Code("||"),AND:new oe._Code("&&"),ADD:new oe._Code("+")};var Ht=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},im=class extends Ht{constructor(e,r,o){super(),this.varKind=e,this.name=r,this.rhs=o}render({es5:e,_n:r}){let o=e?$t.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Yn(this.rhs,e,r)),this}get names(){return this.rhs instanceof oe._CodeOrName?this.rhs.names:{}}},au=class extends Ht{constructor(e,r,o){super(),this.lhs=e,this.rhs=r,this.sideEffects=o}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof oe.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Yn(this.rhs,e,r),this}get names(){let e=this.lhs instanceof oe.Name?{}:{...this.lhs.names};return cu(e,this.rhs)}},am=class extends au{constructor(e,r,o,n){super(e,o,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},sm=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},cm=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},um=class extends Ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},lm=class extends Ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Yn(this.code,e,r),this}get names(){return this.code instanceof oe._CodeOrName?this.code.names:{}}},qi=class extends Ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,o)=>r+o.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let o=e[r].optimizeNodes();Array.isArray(o)?e.splice(r,1,...o):o?e[r]=o:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(e,r)||(CE(e,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Qr(e,r.names),{})}},Bt=class extends qi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},dm=class extends qi{},Xn=class extends Bt{};Xn.kind="else";var Xr=class t extends Bt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new Xn(o):o}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(ay(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Yn(this.condition,e,r),this}get names(){let e=super.names;return cu(e,this.condition),this.else&&Qr(e,this.else.names),e}};Xr.kind="if";var Yr=class extends Bt{};Yr.kind="for";var pm=class extends Yr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Yn(this.iteration,e,r),this}get names(){return Qr(super.names,this.iteration.names)}},mm=class extends Yr{constructor(e,r,o,n){super(),this.varKind=e,this.name=r,this.from=o,this.to=n}render(e){let r=e.es5?$t.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(e)}get names(){let e=cu(super.names,this.from);return cu(e,this.to)}},su=class extends Yr{constructor(e,r,o,n){super(),this.loop=e,this.varKind=r,this.name=o,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Yn(this.iterable,e,r),this}get names(){return Qr(super.names,this.iterable.names)}},Fi=class extends Bt{constructor(e,r,o){super(),this.name=e,this.args=r,this.async=o}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Fi.kind="func";var Vi=class extends qi{render(e){return"return "+super.render(e)}};Vi.kind="return";var fm=class extends Bt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var o,n;return super.optimizeNames(e,r),(o=this.catch)===null||o===void 0||o.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Qr(e,this.catch.names),this.finally&&Qr(e,this.finally.names),e}},Hi=class extends Bt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Hi.kind="catch";var Bi=class extends Bt{render(e){return"finally"+super.render(e)}};Bi.kind="finally";var hm=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` +`:""},this._extScope=e,this._scope=new $t.Scope({parent:e}),this._nodes=[new dm]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let o=this._extScope.value(e,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new im(e,i,o)),i}const(e,r,o){return this._def($t.varKinds.const,e,r,o)}let(e,r,o){return this._def($t.varKinds.let,e,r,o)}var(e,r,o){return this._def($t.varKinds.var,e,r,o)}assign(e,r,o){return this._leafNode(new au(e,r,o))}add(e,r){return this._leafNode(new am(e,Y.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==oe.nil&&this._leafNode(new lm(e)),this}object(...e){let r=["{"];for(let[o,n]of e)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,oe.addCodeArg)(r,n));return r.push("}"),new oe._Code(r)}if(e,r,o){if(this._blockNode(new Xr(e)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Xr(e))}else(){return this._elseNode(new Xn)}endIf(){return this._endBlockNode(Xr,Xn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new pm(e),r)}forRange(e,r,o,n,i=this.opts.es5?$t.varKinds.var:$t.varKinds.let){let a=this._scope.toName(e);return this._for(new mm(i,a,r,o),()=>n(a))}forOf(e,r,o,n=$t.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=r instanceof oe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,oe._)`${a}.length`,s=>{this.var(i,(0,oe._)`${a}[${s}]`),o(i)})}return this._for(new su("of",n,i,r),()=>o(i))}forIn(e,r,o,n=this.opts.es5?$t.varKinds.var:$t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,oe._)`Object.keys(${r})`,o);let i=this._scope.toName(e);return this._for(new su("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(Yr)}label(e){return this._leafNode(new sm(e))}break(e){return this._leafNode(new cm(e))}return(e){let r=new Vi;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vi)}try(e,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new fm;if(this._blockNode(n),this.code(e),r){let i=this.name("e");this._currNode=n.catch=new Hi(i),r(i)}return o&&(this._currNode=n.finally=new Bi,this.code(o)),this._endBlockNode(Hi,Bi)}throw(e){return this._leafNode(new um(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||e!==void 0&&o!==e)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=oe.nil,o,n){return this._blockNode(new Fi(e,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Fi)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let o=this._currNode;if(o instanceof e||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Xr))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Y.CodeGen=hm;function Qr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function cu(t,e){return e instanceof oe._CodeOrName?Qr(t,e.names):t}function Yn(t,e,r){if(t instanceof oe.Name)return o(t);if(!n(t))return t;return new oe._Code(t._items.reduce((i,a)=>(a instanceof oe.Name&&(a=o(a)),a instanceof oe._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=r[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function n(i){return i instanceof oe._Code&&i._items.some(a=>a instanceof oe.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function CE(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function ay(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,oe._)`!${gm(t)}`}Y.not=ay;var AE=sy(Y.operators.AND);function DE(...t){return t.reduce(AE)}Y.and=DE;var UE=sy(Y.operators.OR);function ME(...t){return t.reduce(UE)}Y.or=ME;function sy(t){return(e,r)=>e===oe.nil?r:r===oe.nil?e:(0,oe._)`${gm(e)} ${t} ${gm(r)}`}function gm(t){return t instanceof oe.Name?t:(0,oe._)`(${t})`}});var ie=j(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.checkStrictMode=Q.getErrorPath=Q.Type=Q.useFunc=Q.setEvaluated=Q.evaluatedPropsToName=Q.mergeEvaluated=Q.eachItem=Q.unescapeJsonPointer=Q.escapeJsonPointer=Q.escapeFragment=Q.unescapeFragment=Q.schemaRefOrVal=Q.schemaHasRulesButRef=Q.schemaHasRules=Q.checkUnknownRules=Q.alwaysValidSchema=Q.toHash=void 0;var fe=K(),ZE=Li();function LE(t){let e={};for(let r of t)e[r]=!0;return e}Q.toHash=LE;function qE(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ly(t,e),!dy(e,t.self.RULES.all))}Q.alwaysValidSchema=qE;function ly(t,e=t.schema){let{opts:r,self:o}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=o.RULES.keywords;for(let i in e)n[i]||fy(t,`unknown keyword: "${i}"`)}Q.checkUnknownRules=ly;function dy(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Q.schemaHasRules=dy;function FE(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Q.schemaHasRulesButRef=FE;function VE({topSchemaRef:t,schemaPath:e},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,fe._)`${r}`}return(0,fe._)`${t}${e}${(0,fe.getProperty)(o)}`}Q.schemaRefOrVal=VE;function HE(t){return py(decodeURIComponent(t))}Q.unescapeFragment=HE;function BE(t){return encodeURIComponent(_m(t))}Q.escapeFragment=BE;function _m(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Q.escapeJsonPointer=_m;function py(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Q.unescapeJsonPointer=py;function WE(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Q.eachItem=WE;function cy({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:o}){return(n,i,a,s)=>{let c=a===void 0?i:a instanceof fe.Name?(i instanceof fe.Name?t(n,i,a):e(n,i,a),a):i instanceof fe.Name?(e(n,a,i),i):r(i,a);return s===fe.Name&&!(c instanceof fe.Name)?o(n,c):c}}Q.mergeEvaluated={props:cy({mergeNames:(t,e,r)=>t.if((0,fe._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,fe._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,fe._)`${r} || {}`).code((0,fe._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,fe._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,fe._)`${r} || {}`),ym(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:my}),items:cy({mergeNames:(t,e,r)=>t.if((0,fe._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,fe._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,fe._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,fe._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function my(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,fe._)`{}`);return e!==void 0&&ym(t,r,e),r}Q.evaluatedPropsToName=my;function ym(t,e,r){Object.keys(r).forEach(o=>t.assign((0,fe._)`${e}${(0,fe.getProperty)(o)}`,!0))}Q.setEvaluated=ym;var uy={};function JE(t,e){return t.scopeValue("func",{ref:e,code:uy[e.code]||(uy[e.code]=new ZE._Code(e.code))})}Q.useFunc=JE;var vm;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vm||(Q.Type=vm={}));function GE(t,e,r){if(t instanceof fe.Name){let o=e===vm.Num;return r?o?(0,fe._)`"[" + ${t} + "]"`:(0,fe._)`"['" + ${t} + "']"`:o?(0,fe._)`"/" + ${t}`:(0,fe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,fe.getProperty)(t).toString():"/"+_m(t)}Q.getErrorPath=GE;function fy(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Q.checkStrictMode=fy});var Wt=j(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var Ue=K(),KE={data:new Ue.Name("data"),valCxt:new Ue.Name("valCxt"),instancePath:new Ue.Name("instancePath"),parentData:new Ue.Name("parentData"),parentDataProperty:new Ue.Name("parentDataProperty"),rootData:new Ue.Name("rootData"),dynamicAnchors:new Ue.Name("dynamicAnchors"),vErrors:new Ue.Name("vErrors"),errors:new Ue.Name("errors"),this:new Ue.Name("this"),self:new Ue.Name("self"),scope:new Ue.Name("scope"),json:new Ue.Name("json"),jsonPos:new Ue.Name("jsonPos"),jsonLen:new Ue.Name("jsonLen"),jsonPart:new Ue.Name("jsonPart")};bm.default=KE});var Wi=j(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.extendErrors=Me.resetErrorsCount=Me.reportExtraError=Me.reportError=Me.keyword$DataError=Me.keywordError=void 0;var ae=K(),lu=ie(),He=Wt();Me.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Me.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function XE(t,e=Me.keywordError,r,o){let{it:n}=t,{gen:i,compositeRule:a,allErrors:s}=n,c=vy(t,e,r);o??(a||s)?hy(i,c):gy(n,(0,ae._)`[${c}]`)}Me.reportError=XE;function YE(t,e=Me.keywordError,r){let{it:o}=t,{gen:n,compositeRule:i,allErrors:a}=o,s=vy(t,e,r);hy(n,s),i||a||gy(o,He.default.vErrors)}Me.reportExtraError=YE;function QE(t,e){t.assign(He.default.errors,e),t.if((0,ae._)`${He.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${He.default.vErrors}.length`,e),()=>t.assign(He.default.vErrors,null)))}Me.resetErrorsCount=QE;function eT({gen:t,keyword:e,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",n,He.default.errors,s=>{t.const(a,(0,ae._)`${He.default.vErrors}[${s}]`),t.if((0,ae._)`${a}.instancePath === undefined`,()=>t.assign((0,ae._)`${a}.instancePath`,(0,ae.strConcat)(He.default.instancePath,i.errorPath))),t.assign((0,ae._)`${a}.schemaPath`,(0,ae.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,ae._)`${a}.schema`,r),t.assign((0,ae._)`${a}.data`,o))})}Me.extendErrors=eT;function hy(t,e){let r=t.const("err",e);t.if((0,ae._)`${He.default.vErrors} === null`,()=>t.assign(He.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${He.default.vErrors}.push(${r})`),t.code((0,ae._)`${He.default.errors}++`)}function gy(t,e){let{gen:r,validateName:o,schemaEnv:n}=t;n.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${o}.errors`,e),r.return(!1))}var en={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function vy(t,e,r){let{createErrors:o}=t.it;return o===!1?(0,ae._)`{}`:tT(t,e,r)}function tT(t,e,r={}){let{gen:o,it:n}=t,i=[rT(n,r),nT(t,r)];return oT(t,e,i),o.object(...i)}function rT({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,lu.getErrorPath)(e,lu.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,r)]}function nT({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:o}){let n=o?e:(0,ae.str)`${e}/${t}`;return r&&(n=(0,ae.str)`${n}${(0,lu.getErrorPath)(r,lu.Type.Str)}`),[en.schemaPath,n]}function oT(t,{params:e,message:r},o){let{keyword:n,data:i,schemaValue:a,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;o.push([en.keyword,n],[en.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&o.push([en.message,typeof r=="function"?r(t):r]),c.verbose&&o.push([en.schema,a],[en.parentSchema,(0,ae._)`${l}${d}`],[He.default.data,i]),u&&o.push([en.propertyName,u])}});var yy=j(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.boolOrEmptySchema=Qn.topBoolOrEmptySchema=void 0;var iT=Wi(),aT=K(),sT=Wt(),cT={message:"boolean schema is false"};function uT(t){let{gen:e,schema:r,validateName:o}=t;r===!1?_y(t,!1):typeof r=="object"&&r.$async===!0?e.return(sT.default.data):(e.assign((0,aT._)`${o}.errors`,null),e.return(!0))}Qn.topBoolOrEmptySchema=uT;function lT(t,e){let{gen:r,schema:o}=t;o===!1?(r.var(e,!1),_y(t)):r.var(e,!0)}Qn.boolOrEmptySchema=lT;function _y(t,e){let{gen:r,data:o}=t,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iT.reportError)(n,cT,void 0,e)}});var $m=j(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.getRules=eo.isJSONType=void 0;var dT=["string","number","integer","boolean","null","object","array"],pT=new Set(dT);function mT(t){return typeof t=="string"&&pT.has(t)}eo.isJSONType=mT;function fT(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}eo.getRules=fT});var xm=j(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.shouldUseRule=pr.shouldUseGroup=pr.schemaHasRulesForType=void 0;function hT({schema:t,self:e},r){let o=e.RULES.types[r];return o&&o!==!0&&by(t,o)}pr.schemaHasRulesForType=hT;function by(t,e){return e.rules.some(r=>$y(t,r))}pr.shouldUseGroup=by;function $y(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(o=>t[o]!==void 0))}pr.shouldUseRule=$y});var Ji=j(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.reportTypeError=Ze.checkDataTypes=Ze.checkDataType=Ze.coerceAndCheckDataType=Ze.getJSONTypes=Ze.getSchemaTypes=Ze.DataType=void 0;var gT=$m(),vT=xm(),_T=Wi(),J=K(),xy=ie(),to;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(to||(Ze.DataType=to={}));function yT(t){let e=ky(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Ze.getSchemaTypes=yT;function ky(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(gT.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ze.getJSONTypes=ky;function bT(t,e){let{gen:r,data:o,opts:n}=t,i=$T(e,n.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,vT.schemaHasRulesForType)(t,e[0]));if(a){let s=wm(e,o,n.strictNumbers,to.Wrong);r.if(s,()=>{i.length?xT(t,e,i):Sm(t)})}return a}Ze.coerceAndCheckDataType=bT;var wy=new Set(["string","number","integer","boolean","null"]);function $T(t,e){return e?t.filter(r=>wy.has(r)||e==="array"&&r==="array"):[]}function xT(t,e,r){let{gen:o,data:n,opts:i}=t,a=o.let("dataType",(0,J._)`typeof ${n}`),s=o.let("coerced",(0,J._)`undefined`);i.coerceTypes==="array"&&o.if((0,J._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,J._)`${n}[0]`).assign(a,(0,J._)`typeof ${n}`).if(wm(e,n,i.strictNumbers),()=>o.assign(s,n))),o.if((0,J._)`${s} !== undefined`);for(let u of r)(wy.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),Sm(t),o.endIf(),o.if((0,J._)`${s} !== undefined`,()=>{o.assign(n,s),kT(t,s)});function c(u){switch(u){case"string":o.elseIf((0,J._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,J._)`"" + ${n}`).elseIf((0,J._)`${n} === null`).assign(s,(0,J._)`""`);return;case"number":o.elseIf((0,J._)`${a} == "boolean" || ${n} === null || (${a} == "string" && ${n} && ${n} == +${n})`).assign(s,(0,J._)`+${n}`);return;case"integer":o.elseIf((0,J._)`${a} === "boolean" || ${n} === null || (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(s,(0,J._)`+${n}`);return;case"boolean":o.elseIf((0,J._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(s,!1).elseIf((0,J._)`${n} === "true" || ${n} === 1`).assign(s,!0);return;case"null":o.elseIf((0,J._)`${n} === "" || ${n} === 0 || ${n} === false`),o.assign(s,null);return;case"array":o.elseIf((0,J._)`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${n} === null`).assign(s,(0,J._)`[${n}]`)}}}function kT({gen:t,parentData:e,parentDataProperty:r},o){t.if((0,J._)`${e} !== undefined`,()=>t.assign((0,J._)`${e}[${r}]`,o))}function km(t,e,r,o=to.Correct){let n=o===to.Correct?J.operators.EQ:J.operators.NEQ,i;switch(t){case"null":return(0,J._)`${e} ${n} null`;case"array":i=(0,J._)`Array.isArray(${e})`;break;case"object":i=(0,J._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=a((0,J._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=a();break;default:return(0,J._)`typeof ${e} ${n} ${t}`}return o===to.Correct?i:(0,J.not)(i);function a(s=J.nil){return(0,J.and)((0,J._)`typeof ${e} == "number"`,s,r?(0,J._)`isFinite(${e})`:J.nil)}}Me.checkDataType=km;function wm(t,e,r,o){if(t.length===1)return km(t[0],e,r,o);let n,i=(0,xy.toHash)(t);if(i.array&&i.object){let a=(0,J._)`typeof ${e} != "object"`;n=i.null?a:(0,J._)`!${e} || ${a}`,delete i.null,delete i.array,delete i.object}else n=J.nil;i.number&&delete i.integer;for(let a in i)n=(0,J.and)(n,km(a,e,r,o));return n}Me.checkDataTypes=wm;var wT={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,J._)`{type: ${t}}`:(0,J._)`{type: ${e}}`};function Sm(t){let e=ST(t);(0,_T.reportError)(e,wT)}Me.reportTypeError=Sm;function ST(t){let{gen:e,data:r,schema:o}=t,n=(0,xy.schemaRefOrVal)(t,o,"type");return{gen:e,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:t}}});var Iy=j(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.assignDefaults=void 0;var ro=K(),IT=ie();function ET(t,e){let{properties:r,items:o}=t.schema;if(e==="object"&&r)for(let n in r)Sy(t,n,r[n].default);else e==="array"&&Array.isArray(o)&&o.forEach((n,i)=>Sy(t,i,n.default))}du.assignDefaults=ET;function Sy(t,e,r){let{gen:o,compositeRule:n,data:i,opts:a}=t;if(r===void 0)return;let s=(0,ro._)`${i}${(0,ro.getProperty)(e)}`;if(n){(0,IT.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,ro._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,ro._)`${c} || ${s} === null || ${s} === ""`),o.if(c,(0,ro._)`${s} = ${(0,ro.stringify)(r)}`)}});var mt=j(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.validateUnion=me.validateArray=me.usePattern=me.callValidateCode=me.schemaProperties=me.allSchemaProperties=me.noPropertyInData=me.propertyInData=me.isOwnProperty=me.hasPropFunc=me.reportMissingProp=me.checkMissingProp=me.checkReportMissingProp=void 0;var _e=K(),Im=ie(),mr=Wt(),TT=ie();function zT(t,e){let{gen:r,data:o,it:n}=t;r.if(Tm(r,o,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,_e._)`${e}`},!0),t.error()})}me.checkReportMissingProp=zT;function jT({gen:t,data:e,it:{opts:r}},o,n){return(0,_e.or)(...o.map(i=>(0,_e.and)(Tm(t,e,i,r.ownProperties),(0,_e._)`${n} = ${i}`)))}me.checkMissingProp=jT;function PT(t,e){t.setParams({missingProperty:e},!0),t.error()}me.reportMissingProp=PT;function Ey(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,_e._)`Object.prototype.hasOwnProperty`})}me.hasPropFunc=Ey;function Em(t,e,r){return(0,_e._)`${Ey(t)}.call(${e}, ${r})`}me.isOwnProperty=Em;function RT(t,e,r,o){let n=(0,_e._)`${e}${(0,_e.getProperty)(r)} !== undefined`;return o?(0,_e._)`${n} && ${Em(t,e,r)}`:n}me.propertyInData=RT;function Tm(t,e,r,o){let n=(0,_e._)`${e}${(0,_e.getProperty)(r)} === undefined`;return o?(0,_e.or)(n,(0,_e.not)(Em(t,e,r))):n}me.noPropertyInData=Tm;function Ty(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}me.allSchemaProperties=Ty;function NT(t,e){return Ty(e).filter(r=>!(0,Im.alwaysValidSchema)(t,e[r]))}me.schemaProperties=NT;function OT({schemaCode:t,data:e,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:a},s,c,u){let l=u?(0,_e._)`${t}, ${e}, ${o}${n}`:e,d=[[mr.default.instancePath,(0,_e.strConcat)(mr.default.instancePath,i)],[mr.default.parentData,a.parentData],[mr.default.parentDataProperty,a.parentDataProperty],[mr.default.rootData,mr.default.rootData]];a.opts.dynamicRef&&d.push([mr.default.dynamicAnchors,mr.default.dynamicAnchors]);let g=(0,_e._)`${l}, ${r.object(...d)}`;return c!==_e.nil?(0,_e._)`${s}.call(${c}, ${g})`:(0,_e._)`${s}(${g})`}me.callValidateCode=OT;var CT=(0,_e._)`new RegExp`;function AT({gen:t,it:{opts:e}},r){let o=e.unicodeRegExp?"u":"",{regExp:n}=e.code,i=n(r,o);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,_e._)`${n.code==="new RegExp"?CT:(0,TT.useFunc)(t,n)}(${r}, ${o})`})}me.usePattern=AT;function DT(t){let{gen:e,data:r,keyword:o,it:n}=t,i=e.name("valid");if(n.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(i,!0),a(()=>e.break()),i;function a(s){let c=e.const("len",(0,_e._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:Im.Type.Num},i),e.if((0,_e.not)(i),s)})}}me.validateArray=DT;function UT(t){let{gen:e,schema:r,keyword:o,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Im.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:o,schemaProp:u,compositeRule:!0},s);e.assign(a,(0,_e._)`${a} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,_e.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}me.validateUnion=UT});var Py=j(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateKeywordUsage=Pt.validSchemaType=Pt.funcKeywordCode=Pt.macroKeywordCode=void 0;var Be=K(),tn=Wt(),MT=mt(),ZT=Wi();function LT(t,e){let{gen:r,keyword:o,schema:n,parentSchema:i,it:a}=t,s=e.macro.call(a.self,n,i,a),c=jy(r,o,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:Be.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Pt.macroKeywordCode=LT;function qT(t,e){var r;let{gen:o,keyword:n,schema:i,parentSchema:a,$data:s,it:c}=t;VT(c,e);let u=!s&&e.compile?e.compile.call(c.self,i,a,c):e.validate,l=jy(o,n,u),d=o.let("valid");t.block$data(d,g),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function g(){if(e.errors===!1)f(),e.modifying&&zy(t),_(()=>t.error());else{let x=e.async?h():m();e.modifying&&zy(t),_(()=>FT(t,x))}}function h(){let x=o.let("ruleErrs",null);return o.try(()=>f((0,Be._)`await `),$=>o.assign(d,!1).if((0,Be._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(x,(0,Be._)`${$}.errors`),()=>o.throw($))),x}function m(){let x=(0,Be._)`${l}.errors`;return o.assign(x,null),f(Be.nil),x}function f(x=e.async?(0,Be._)`await `:Be.nil){let $=c.opts.passContext?tn.default.this:tn.default.self,k=!("compile"in e&&!s||e.schema===!1);o.assign(d,(0,Be._)`${x}${(0,MT.callValidateCode)(t,l,$,k)}`,e.modifying)}function _(x){var $;o.if((0,Be.not)(($=e.valid)!==null&&$!==void 0?$:d),x)}}Pt.funcKeywordCode=qT;function zy(t){let{gen:e,data:r,it:o}=t;e.if(o.parentData,()=>e.assign(r,(0,Be._)`${o.parentData}[${o.parentDataProperty}]`))}function FT(t,e){let{gen:r}=t;r.if((0,Be._)`Array.isArray(${e})`,()=>{r.assign(tn.default.vErrors,(0,Be._)`${tn.default.vErrors} === null ? ${e} : ${tn.default.vErrors}.concat(${e})`).assign(tn.default.errors,(0,Be._)`${tn.default.vErrors}.length`),(0,ZT.extendErrors)(t)},()=>t.error())}function VT({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function jy(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Be.stringify)(r)})}function HT(t,e,r=!1){return!e.length||e.some(o=>o==="array"?Array.isArray(t):o==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==o||r&&typeof t>"u")}Pt.validSchemaType=HT;function BT({schema:t,opts:e,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let a=n.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Pt.validateKeywordUsage=BT});var Ny=j(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.extendSubschemaMode=fr.extendSubschemaData=fr.getSubschema=void 0;var Rt=K(),Ry=ie();function WT(t,{keyword:e,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:a}){if(e!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Ry.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}fr.getSubschema=WT;function JT(t,e,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:a}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,g=s.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(r)}`,!0);c(g),t.errorPath=(0,Rt.str)`${u}${(0,Ry.getErrorPath)(r,o,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(n!==void 0){let u=n instanceof Rt.Name?n:s.let("data",n,!0);c(u),a!==void 0&&(t.propertyName=a)}i&&(t.dataTypes=i);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}fr.extendSubschemaData=JT;function GT(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(t.compositeRule=o),n!==void 0&&(t.createErrors=n),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=r}fr.extendSubschemaMode=GT});var zm=j((JU,Oy)=>{"use strict";Oy.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var Ay=j((GU,Cy)=>{"use strict";var hr=Cy.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};pu(e,o,n,t,"",t)};hr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};hr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};hr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};hr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function pu(t,e,r,o,n,i,a,s,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){e(o,n,i,a,s,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in hr.arrayKeywords)for(var g=0;g{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.getSchemaRefs=tt.resolveUrl=tt.normalizeId=tt._getFullPath=tt.getFullPath=tt.inlineRef=void 0;var XT=ie(),YT=zm(),QT=Ay(),ez=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function tz(t,e=!0){return typeof t=="boolean"?!0:e===!0?!jm(t):e?Dy(t)<=e:!1}tt.inlineRef=tz;var rz=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function jm(t){for(let e in t){if(rz.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(jm)||typeof r=="object"&&jm(r))return!0}return!1}function Dy(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!ez.has(r)&&(typeof t[r]=="object"&&(0,XT.eachItem)(t[r],o=>e+=Dy(o)),e===1/0))return 1/0}return e}function Uy(t,e="",r){r!==!1&&(e=no(e));let o=t.parse(e);return My(t,o)}tt.getFullPath=Uy;function My(t,e){return t.serialize(e).split("#")[0]+"#"}tt._getFullPath=My;var nz=/#\/?$/;function no(t){return t?t.replace(nz,""):""}tt.normalizeId=no;function oz(t,e,r){return r=no(r),t.resolve(e,r)}tt.resolveUrl=oz;var iz=/^[a-z_][-a-z0-9._]*$/i;function az(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=no(t[r]||e),i={"":n},a=Uy(o,n,!1),s={},c=new Set;return QT(t,{allKeys:!0},(d,g,h,m)=>{if(m===void 0)return;let f=a+g,_=i[m];typeof d[r]=="string"&&(_=x.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[g]=_;function x(k){let C=this.opts.uriResolver.resolve;if(k=no(_?C(_,k):k),c.has(k))throw l(k);c.add(k);let L=this.refs[k];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?u(d,L.schema,k):k!==no(f)&&(k[0]==="#"?(u(d,s[k],k),s[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!iz.test(k))throw new Error(`invalid anchor "${k}"`);x.call(this,`#${k}`)}}}),s;function u(d,g,h){if(g!==void 0&&!YT(d,g))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}tt.getSchemaRefs=az});var Yi=j(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.getData=gr.KeywordCxt=gr.validateFunctionCode=void 0;var Vy=yy(),Zy=Ji(),Rm=xm(),mu=Ji(),sz=Iy(),Xi=Py(),Pm=Ny(),M=K(),B=Wt(),cz=Gi(),Jt=ie(),Ki=Wi();function uz(t){if(Wy(t)&&(Jy(t),By(t))){pz(t);return}Hy(t,()=>(0,Vy.topBoolOrEmptySchema)(t))}gr.validateFunctionCode=uz;function Hy({gen:t,validateName:e,schema:r,schemaEnv:o,opts:n},i){n.code.es5?t.func(e,(0,M._)`${B.default.data}, ${B.default.valCxt}`,o.$async,()=>{t.code((0,M._)`"use strict"; ${Ly(r,n)}`),dz(t,n),t.code(i)}):t.func(e,(0,M._)`${B.default.data}, ${lz(n)}`,o.$async,()=>t.code(Ly(r,n)).code(i))}function lz(t){return(0,M._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${t.dynamicRef?(0,M._)`, ${B.default.dynamicAnchors}={}`:M.nil}}={}`}function dz(t,e){t.if(B.default.valCxt,()=>{t.var(B.default.instancePath,(0,M._)`${B.default.valCxt}.${B.default.instancePath}`),t.var(B.default.parentData,(0,M._)`${B.default.valCxt}.${B.default.parentData}`),t.var(B.default.parentDataProperty,(0,M._)`${B.default.valCxt}.${B.default.parentDataProperty}`),t.var(B.default.rootData,(0,M._)`${B.default.valCxt}.${B.default.rootData}`),e.dynamicRef&&t.var(B.default.dynamicAnchors,(0,M._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{t.var(B.default.instancePath,(0,M._)`""`),t.var(B.default.parentData,(0,M._)`undefined`),t.var(B.default.parentDataProperty,(0,M._)`undefined`),t.var(B.default.rootData,B.default.data),e.dynamicRef&&t.var(B.default.dynamicAnchors,(0,M._)`{}`)})}function pz(t){let{schema:e,opts:r,gen:o}=t;Hy(t,()=>{r.$comment&&e.$comment&&Ky(t),vz(t),o.let(B.default.vErrors,null),o.let(B.default.errors,0),r.unevaluated&&mz(t),Gy(t),bz(t)})}function mz(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,M._)`${r}.evaluated`),e.if((0,M._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,M._)`${t.evaluated}.props`,(0,M._)`undefined`)),e.if((0,M._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,M._)`${t.evaluated}.items`,(0,M._)`undefined`))}function Ly(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,M._)`/*# sourceURL=${r} */`:M.nil}function fz(t,e){if(Wy(t)&&(Jy(t),By(t))){hz(t,e);return}(0,Vy.boolOrEmptySchema)(t,e)}function By({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Wy(t){return typeof t.schema!="boolean"}function hz(t,e){let{schema:r,gen:o,opts:n}=t;n.$comment&&r.$comment&&Ky(t),_z(t),yz(t);let i=o.const("_errs",B.default.errors);Gy(t,i),o.var(e,(0,M._)`${i} === ${B.default.errors}`)}function Jy(t){(0,Jt.checkUnknownRules)(t),gz(t)}function Gy(t,e){if(t.opts.jtd)return qy(t,[],!1,e);let r=(0,Zy.getSchemaTypes)(t.schema),o=(0,Zy.coerceAndCheckDataType)(t,r);qy(t,r,!o,e)}function gz(t){let{schema:e,errSchemaPath:r,opts:o,self:n}=t;e.$ref&&o.ignoreKeywordsWithRef&&(0,Jt.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function vz(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Jt.checkStrictMode)(t,"default is ignored in the schema root")}function _z(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,cz.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function yz(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ky({gen:t,schemaEnv:e,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)t.code((0,M._)`${B.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let a=(0,M.str)`${o}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,M._)`${B.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function bz(t){let{gen:e,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=t;r.$async?e.if((0,M._)`${B.default.errors} === 0`,()=>e.return(B.default.data),()=>e.throw((0,M._)`new ${n}(${B.default.vErrors})`)):(e.assign((0,M._)`${o}.errors`,B.default.vErrors),i.unevaluated&&$z(t),e.return((0,M._)`${B.default.errors} === 0`))}function $z({gen:t,evaluated:e,props:r,items:o}){r instanceof M.Name&&t.assign((0,M._)`${e}.props`,r),o instanceof M.Name&&t.assign((0,M._)`${e}.items`,o)}function qy(t,e,r,o){let{gen:n,schema:i,data:a,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Jt.schemaHasRulesButRef)(i,l))){n.block(()=>Yy(t,"$ref",l.all.$ref.definition));return}c.jtd||xz(t,e),n.block(()=>{for(let g of l.rules)d(g);d(l.post)});function d(g){(0,Rm.shouldUseGroup)(i,g)&&(g.type?(n.if((0,mu.checkDataType)(g.type,a,c.strictNumbers)),Fy(t,g),e.length===1&&e[0]===g.type&&r&&(n.else(),(0,mu.reportTypeError)(t)),n.endIf()):Fy(t,g),s||n.if((0,M._)`${B.default.errors} === ${o||0}`))}}function Fy(t,e){let{gen:r,schema:o,opts:{useDefaults:n}}=t;n&&(0,sz.assignDefaults)(t,e.type),r.block(()=>{for(let i of e.rules)(0,Rm.shouldUseRule)(o,i)&&Yy(t,i.keyword,i.definition,e.type)})}function xz(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(kz(t,e),t.opts.allowUnionTypes||wz(t,e),Sz(t,t.dataTypes))}function kz(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Xy(t.dataTypes,r)||Nm(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Ez(t,e)}}function wz(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Nm(t,"use allowUnionTypes to allow union type keyword")}function Sz(t,e){let r=t.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,Rm.shouldUseRule)(t.schema,n)){let{type:i}=n.definition;i.length&&!i.some(a=>Iz(e,a))&&Nm(t,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function Iz(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Xy(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Ez(t,e){let r=[];for(let o of t.dataTypes)Xy(e,o)?r.push(o):e.includes("integer")&&o==="number"&&r.push("integer");t.dataTypes=r}function Nm(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Jt.checkStrictMode)(t,e,t.opts.strictTypes)}var fu=class{constructor(e,r,o){if((0,Xi.validateKeywordUsage)(e,r,o),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=o,this.data=e.data,this.schema=e.schema[o],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Jt.schemaRefOrVal)(e,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Qy(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Xi.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",B.default.errors))}result(e,r,o){this.failResult((0,M.not)(e),r,o)}failResult(e,r,o){this.gen.if(e),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,M.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,M._)`${r} !== undefined && (${(0,M.or)(this.invalid$data(),e)})`)}error(e,r,o){if(r){this.setParams(r),this._error(e,o),this.setParams({});return}this._error(e,o)}_error(e,r){(e?Ki.reportExtraError:Ki.reportError)(this,this.def.error,r)}$dataError(){(0,Ki.reportError)(this,this.def.$dataError||Ki.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ki.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,o=M.nil){this.gen.block(()=>{this.check$data(e,o),r()})}check$data(e=M.nil,r=M.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:a}=this;o.if((0,M.or)((0,M._)`${n} === undefined`,r)),e!==M.nil&&o.assign(e,!0),(i.length||a.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),e!==M.nil&&o.assign(e,!1)),o.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,M.or)(a(),s());function a(){if(o.length){if(!(r instanceof M.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,M._)`${(0,mu.checkDataTypes)(c,r,i.opts.strictNumbers,mu.DataType.Wrong)}`}return M.nil}function s(){if(n.validateSchema){let c=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,M._)`!${c}(${r})`}return M.nil}}subschema(e,r){let o=(0,Pm.getSubschema)(this.it,e);(0,Pm.extendSubschemaData)(o,this.it,e),(0,Pm.extendSubschemaMode)(o,e);let n={...this.it,...o,items:void 0,props:void 0};return fz(n,r),n}mergeEvaluated(e,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&e.props!==void 0&&(o.props=Jt.mergeEvaluated.props(n,e.props,o.props,r)),o.items!==!0&&e.items!==void 0&&(o.items=Jt.mergeEvaluated.items(n,e.items,o.items,r)))}mergeValidEvaluated(e,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,M.Name)),!0}};gr.KeywordCxt=fu;function Yy(t,e,r,o){let n=new fu(t,r,e);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Xi.funcKeywordCode)(n,r):"macro"in r?(0,Xi.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Xi.funcKeywordCode)(n,r)}var Tz=/^\/(?:[^~]|~0|~1)*$/,zz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Qy(t,{dataLevel:e,dataNames:r,dataPathArr:o}){let n,i;if(t==="")return B.default.rootData;if(t[0]==="/"){if(!Tz.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,i=B.default.rootData}else{let u=zz.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(n=u[2],n==="#"){if(l>=e)throw new Error(c("property/index",l));return o[e-l]}if(l>e)throw new Error(c("data",l));if(i=r[e-l],!n)return i}let a=i,s=n.split("/");for(let u of s)u&&(i=(0,M._)`${i}${(0,M.getProperty)((0,Jt.unescapeJsonPointer)(u))}`,a=(0,M._)`${a} && ${i}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}gr.getData=Qy});var hu=j(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Om=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Cm.default=Om});var Qi=j(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Am=Gi(),Dm=class extends Error{constructor(e,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,Am.resolveUrl)(e,r,o),this.missingSchema=(0,Am.normalizeId)((0,Am.getFullPath)(e,this.missingRef))}};Um.default=Dm});var vu=j(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var xt=K(),jz=hu(),rn=Wt(),kt=Gi(),eb=ie(),Pz=Yi(),oo=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let o;typeof e.schema=="object"&&(o=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,kt.normalizeId)(o?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=o?.$async,this.refs={}}};ft.SchemaEnv=oo;function Zm(t){let e=tb.call(this,t);if(e)return e;let r=(0,kt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,a=new xt.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),s;t.$async&&(s=a.scopeValue("Error",{ref:jz.default,code:(0,xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:rn.default.data,parentData:rn.default.parentData,parentDataProperty:rn.default.parentDataProperty,dataNames:[rn.default.data],dataPathArr:[xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:xt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,Pz.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(rn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let h=new Function(`${rn.default.self}`,`${rn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:f}=u;h.evaluated={props:m instanceof xt.Name?void 0:m,items:f instanceof xt.Name?void 0:f,dynamicProps:m instanceof xt.Name,dynamicItems:f instanceof xt.Name},h.source&&(h.source.evaluated=(0,xt.stringify)(h.evaluated))}return t.validate=h,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}ft.compileSchema=Zm;function Rz(t,e,r){var o;r=(0,kt.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let i=Cz.call(this,t,r);if(i===void 0){let a=(o=t.localRefs)===null||o===void 0?void 0:o[r],{schemaId:s}=this.opts;a&&(i=new oo({schema:a,schemaId:s,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=Nz.call(this,i)}ft.resolveRef=Rz;function Nz(t){return(0,kt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Zm.call(this,t)}function tb(t){for(let e of this._compilations)if(Oz(e,t))return e}ft.getCompilingSchema=tb;function Oz(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Cz(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||gu.call(this,t,e)}function gu(t,e){let r=this.opts.uriResolver.parse(e),o=(0,kt._getFullPath)(this.opts.uriResolver,r),n=(0,kt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&o===n)return Mm.call(this,r,t);let i=(0,kt.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=gu.call(this,t,a);return typeof s?.schema!="object"?void 0:Mm.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||Zm.call(this,a),i===(0,kt.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,kt.resolveUrl)(this.opts.uriResolver,n,u)),new oo({schema:s,schemaId:c,root:t,baseId:n})}return Mm.call(this,r,a)}}ft.resolveSchema=gu;var Az=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Mm(t,{baseId:e,schema:r,root:o}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,eb.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Az.has(s)&&u&&(e=(0,kt.resolveUrl)(this.opts.uriResolver,e,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,eb.schemaHasRulesButRef)(r,this.RULES)){let s=(0,kt.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=gu.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new oo({schema:r,schemaId:a,root:o,baseId:e}),i.schema!==i.root.schema)return i}});var rb=j((tM,Dz)=>{Dz.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Bm=j((rM,ub)=>{"use strict";var Uz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),qm=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Mz=RegExp.prototype.test.bind(/^\d*$/u),nn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Fm=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ob=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Vm=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Zz=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),rt=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)rt[e]="%"+t[e>>4]+t[e&15]}function Ze(t){return t<2048?rt[192|t>>6]+rt[128|t&63]:t<65536?rt[224|t>>12]+rt[128|t>>6&63]+rt[128|t&63]:rt[240|t>>18]+rt[128|t>>12&63]+rt[128|t>>6&63]+rt[128|t&63]}function Lz(t){let e="",r=0,o=0;for(o=0;o=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[o];break}for(o+=1;o=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[o]}return e}var qz=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Fz=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),Vz=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Hz=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Bz(t){if(t.length===0)return!1;for(let e=0;er&&(r=n,e=o)):(o=-1,n=0);if(r<2)return t.join(":");let i=t.slice(0,e).join(":"),a=t.slice(e+r).join(":");return i+"::"+a}function Wz(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let r=e===-1?t.split(":"):t.slice(0,e).split(":"),o=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(r.length===1&&r[0]===""&&(r.length=0),o.length===1&&o[0]===""&&(o.length=0));let n=r.concat(o),i=0;for(let s=0;s=8)return;let a=n.slice(0,r.length);for(let s=i;s<8;s++)a.push("0");for(let s=r.length;sKz[o])}function ab(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let o=0;o57343)e+=Ze(n);else if(n<=56319&&r+1=56320&&i<=57343?(e+=Ze(65536+(n-55296<<10)+(i-56320)),r++):e+=Ze(65533)}else e+=Ze(65533)}}return e}function ej(t,e=!1){let r="",o=e&&t[0]!=="/";for(let n=0;n57343)r+=Ze(a);else if(a<=56319&&n+1=56320&&s<=57343?(r+=Ze(65536+(a-55296<<10)+(s-56320)),n++):r+=Ze(65533)}else r+=Ze(65533)}}return r}function Hm(t,e){let r="";for(let o=0;o57343)r+=Ze(i);else if(i<=56319&&o+1=56320&&a<=57343?(r+=Ze(65536+(i-55296<<10)+(a-56320)),o++):r+=Ze(65533)}else r+=Ze(65533)}}return r}function sb(t){return Hm(t,Zz)}function tj(t){return Hm(t,Vm)}function rj(t){return Hm(t,Vm)}function cb(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function nj(t){let e="";for(let r=0;r57343)e+=Ze(n);else if(n<=56319&&r+1=56320&&i<=57343?(e+=Ze(65536+(n-55296<<10)+(i-56320)),r++):e+=Ze(65533)}else e+=Ze(65533)}}return e}function oj(t){let e="";for(let r=0;r{"use strict";var{isUUID:aj}=Bm(),sj=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,cj=["http","https","ws","wss","urn","urn:uuid"];function uj(t){return cj.indexOf(t)!==-1}function Wm(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function lb(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function db(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function lj(t){return t.secure=Wm(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function dj(t){if((t.port===(Wm(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let e=t.resourceName.indexOf("?"),r=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=r&&r!=="/"?r:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function pj(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(sj);if(r&&r[0]===t.path){let o=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${o}:${e.nid||t.nid}`,i=Jm(n);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function mj(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",o=t.nid.toLowerCase(),n=`${r}:${e.nid||o}`,i=Jm(n);i&&(t=i.serialize(t,e));let a=t,s=t.nss;return a.path=`${o||e.nid}:${s}`,e.skipEscape=!0,a}function fj(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!aj(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function hj(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var pb={scheme:"http",domainHost:!0,parse:lb,serialize:db},gj={scheme:"https",domainHost:pb.domainHost,parse:lb,serialize:db},_u={scheme:"ws",domainHost:!0,parse:lj,serialize:dj},vj={scheme:"wss",domainHost:_u.domainHost,parse:_u.parse,serialize:_u.serialize},_j={scheme:"urn",parse:pj,serialize:mj,skipNormalize:!0},yj={scheme:"urn:uuid",parse:fj,serialize:hj,skipNormalize:!0},yu={http:pb,https:gj,ws:_u,wss:vj,urn:_j,"urn:uuid":yj};Object.setPrototypeOf(yu,null);function Jm(t){return t&&(yu[t]||yu[t.toLowerCase()])||void 0}mb.exports={wsIsSecure:Wm,SCHEMES:yu,isValidSchemeName:uj,getSchemeHandler:Jm}});var Eb=j((oM,xu)=>{"use strict";var{normalizeIPv6:yb,removeDotSegments:ta,recomposeAuthority:bj,normalizePercentEncoding:Gm,normalizePathEncoding:$j,serializePathEncoding:hb,normalizeQueryFragmentEncoding:gb,encodeQuery:xj,encodeFragment:kj,reescapeHostDelimiters:wj,isIPv4:bb,nonSimpleDomain:Sj}=Bm(),{SCHEMES:$b,getSchemeHandler:Km}=fb(),xb=/^[A-Za-z][A-Za-z0-9+.-]*$/u,kb="URI scheme is malformed.";function vb(t){let e=unescape(String(t));if(!xb.test(e))throw new TypeError(kb);return e}function Ij(t,e){return typeof t=="string"?t=Oj(t,e):typeof t=="object"&&(t=$u(on(t,e),e)),t}function Ej(t,e,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=bu(t,o),{parsed:l,malformedAuthorityOrPort:d,malformedPercentEncoding:g,malformedSchemeSpecific:h,malformedHost:m,malformedScheme:f}=bu(e,o);if(i||d||a||g||s||h||c||m||u||f)throw new Error(n.error||l.error||"URI is malformed.");let _=wb(n,l,o,!0),x=Km(r&&r.scheme||_.scheme),$=_.host,k=$!==void 0&&$!==""&&(bb($)||yb($).isIPV6);Sb(_,r||{},x,k);let C=$&&$.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test($);if(_.error&&!C)throw new Error(_.error);return o.skipEscape=!0,on(_,o)}function wb(t,e,r,o){let n={};return o||(t=$u(on(t,r),r),e=$u(on(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ta(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ta(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=ta(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=ta(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function Tj(t,e,r){let o=_b(t,r),n=_b(e,r);return o!==void 0&&n!==void 0&&o===n}function on(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},o=Object.assign({},e),n=[];r.scheme&&(r.scheme=vb(r.scheme));let i=Km(o.scheme||r.scheme);i&&i.serialize&&i.serialize(r,o);let a=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,s=!o.skipEscape&&r.scheme===void 0&&!a;r.path!==void 0&&(o.skipEscape?r.path=Gm(r.path):r.path=hb(r.path,s)),o.reference!=="suffix"&&r.scheme&&(r.scheme=vb(r.scheme),n.push(r.scheme,":"));let c=bj(r);if(c!==void 0&&(o.reference!=="suffix"&&n.push("//"),n.push(c),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let u=r.path;!o.absolutePath&&(!i||!i.absolutePath)&&(u=ta(u)),s&&(u=hb(u,!0)),c===void 0&&u[0]==="/"&&u[1]==="/"&&(u="/%2F"+u.slice(2)),n.push(u)}return r.query!==void 0&&n.push("?",xj(r.query)),r.fragment!==void 0&&n.push("#",kj(r.fragment)),n.join("")}var zj=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,jj=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Pj=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Rj(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function ea(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function Xm(t){return t[0]==="["&&t[t.length-1]==="]"}function Nj(t){let e=t[4];return ea(t[3])||e!==void 0&&!Xm(e)&&ea(e)||ea(t[6])||ea(t[7])||ea(t[8])}function Sb(t,e,r,o){if(!e.unicodeSupport&&(!r||!r.unicodeSupport)&&t.host&&!Xm(t.host)&&(e.domainHost||r&&r.domainHost)&&o===!1&&Sj(t.host))try{t.host=new URL("http://"+t.host).hostname}catch(n){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}function bu(t,e){let r=Object.assign({},e),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,i=!1,a=!1,s=!1,c=!1,u=!1,l=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let d=t.match(jj);d!==null&&d[1].indexOf("\\")!==-1&&(o.error="URI authority must not contain a literal backslash.",n=!0);let g=t.match(Pj);if(g!==null){let m=g[1],f=m.replace(/[\t\n\r]/g,"");f.length>=2&&(f.slice(0,2)!=="//"?(o.error=o.error||"URI authority must not contain a literal backslash.",n=!0):m.length!==f.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",n=!0))}let h=t.match(zj);if(h){if(o.scheme=h[1],o.userinfo=h[3],o.host=h[4],o.port=parseInt(h[5],10),o.path=h[6]||"",o.query=h[7],o.fragment=h[8],o.scheme!==void 0){let _=unescape(o.scheme);xb.test(_)?o.scheme=_.toLowerCase():(o.error=o.error||kb,u=!0)}i=Nj(h),i&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=h[5]);let m=Rj(o,h);if(m!==void 0&&(o.error=o.error||m,n=!0),o.host)if(bb(o.host)===!1){let x=Xm(o.host),$=o.host.indexOf("[")!==-1||o.host.indexOf("]")!==-1,k=yb(o.host);l=k.isIPV6||k.isIPVFuture===!0,c=$&&(!x||k.error===!0),o.host=l?k.host:k.host.toLowerCase(),c&&(o.error=o.error||"URI host is malformed.",n=!0)}else l=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");let f=Km(r.scheme||o.scheme);if(c||(s=Sb(o,r,f,l)),t.indexOf("%")!==-1&&o.host!==void 0&&!c){let _=l?o.host:Gm(o.host,!0);l||(_=Gm(_.toLowerCase())),o.host=wj(_,l)}(!f||f&&!f.skipNormalize)&&(o.path&&(o.path=$j(o.path)),o.query&&(o.query=gb(o.query)),o.fragment&&(o.fragment=gb(o.fragment))),f&&f.parse&&(f.parse(o,r),f===$b.urn&&o.nid===void 0&&(a=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:u}}function $u(t,e){return bu(t,e).parsed}function Oj(t,e){return Ib(t,e).normalized}function Ib(t,e){let{parsed:r,malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:s}=bu(t,e);return{normalized:o||n||i||a||s?t:on(r,e),malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:s}}function _b(t,e){if(typeof t!="string"&&typeof t!="object")return;let r;try{r=typeof t=="string"?t:on(t,e)}catch{return}let{normalized:o,malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=Ib(r,e);return n||i||a||s||c?void 0:o}var Ym={SCHEMES:$b,normalize:Ij,resolve:Ej,resolveComponent:wb,equal:Tj,serialize:on,parse:$u};xu.exports=Ym;xu.exports.default=Ym;xu.exports.fastUri=Ym});var zb=j(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var Tb=Eb();Tb.code='require("ajv/dist/runtime/uri").default';Qm.default=Tb});var Db=j(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.CodeGen=Pe.Name=Pe.nil=Pe.stringify=Pe.str=Pe._=Pe.KeywordCxt=void 0;var Cj=Yi();Object.defineProperty(Pe,"KeywordCxt",{enumerable:!0,get:function(){return Cj.KeywordCxt}});var io=K();Object.defineProperty(Pe,"_",{enumerable:!0,get:function(){return io._}});Object.defineProperty(Pe,"str",{enumerable:!0,get:function(){return io.str}});Object.defineProperty(Pe,"stringify",{enumerable:!0,get:function(){return io.stringify}});Object.defineProperty(Pe,"nil",{enumerable:!0,get:function(){return io.nil}});Object.defineProperty(Pe,"Name",{enumerable:!0,get:function(){return io.Name}});Object.defineProperty(Pe,"CodeGen",{enumerable:!0,get:function(){return io.CodeGen}});var Aj=hu(),Ob=Qi(),Dj=$m(),ra=vu(),Uj=K(),na=Gi(),ku=Ji(),tf=ie(),jb=rb(),Mj=zb(),Cb=(t,e)=>new RegExp(t,e);Cb.code="new RegExp";var Zj=["removeAdditional","useDefaults","coerceTypes"],Lj=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),qj={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Fj={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Pb=200;function Vj(t){var e,r,o,n,i,a,s,c,u,l,d,g,h,m,f,_,x,$,k,C,L,qe,at,dn,el;let vo=t.strict,tl=(e=t.code)===null||e===void 0?void 0:e.optimize,lh=tl===!0||tl===void 0?1:tl||0,dh=(o=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:Cb,Cx=(n=t.uriResolver)!==null&&n!==void 0?n:Mj.default;return{strictSchema:(a=(i=t.strictSchema)!==null&&i!==void 0?i:vo)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:vo)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:vo)!==null&&l!==void 0?l:"log",strictTuples:(g=(d=t.strictTuples)!==null&&d!==void 0?d:vo)!==null&&g!==void 0?g:"log",strictRequired:(m=(h=t.strictRequired)!==null&&h!==void 0?h:vo)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:lh,regExp:dh}:{optimize:lh,regExp:dh},loopRequired:(f=t.loopRequired)!==null&&f!==void 0?f:Pb,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:Pb,meta:(x=t.meta)!==null&&x!==void 0?x:!0,messages:($=t.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=t.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(C=t.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(L=t.addUsedSchema)!==null&&L!==void 0?L:!0,validateSchema:(qe=t.validateSchema)!==null&&qe!==void 0?qe:!0,validateFormats:(at=t.validateFormats)!==null&&at!==void 0?at:!0,unicodeRegExp:(dn=t.unicodeRegExp)!==null&&dn!==void 0?dn:!0,int32range:(el=t.int32range)!==null&&el!==void 0?el:!0,uriResolver:Cx}}var oa=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Vj(e)};let{es5:r,lines:o}=this.opts.code;this.scope=new Uj.ValueScope({scope:{},prefixes:Lj,es5:r,lines:o}),this.logger=Kj(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Dj.getRules)(),Rb.call(this,qj,e,"NOT SUPPORTED"),Rb.call(this,Fj,e,"DEPRECATED","warn"),this._metaOpts=Jj.call(this),e.formats&&Bj.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Wj.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Hj.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:o}=this.opts,n=jb;o==="id"&&(n={...jb},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let o;if(typeof e=="string"){if(o=this.getSchema(e),!o)throw new Error(`no schema with key or ref "${e}"`)}else o=this.compile(e);let n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(e,r){let o=this._addSchema(e,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,e,r);async function n(l,d){await i.call(this,l.$schema);let g=this._addSchema(l,d);return g.validate||a.call(this,g)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Ob.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=o(l))}finally{delete this._loading[l]}}}addSchema(e,r,o,n=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,o,n);return this}let i;if(typeof e=="object"){let{schemaId:a}=this.opts;if(i=e[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return r=(0,na.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(e,o,r,n,!0),this}addMetaSchema(e,r,o=this.opts.validateSchema){return this.addSchema(e,r,!0,o),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let o;if(o=e.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(o,e);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(e){let r;for(;typeof(r=Nb.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:o}=this.opts,n=new ra.SchemaEnv({schema:{},schemaId:o});if(r=ra.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Nb.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let o=e[this.opts.schemaId];return o&&(o=(0,na.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let o;if(typeof e=="string")o=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof e=="object"&&r===void 0){if(r=e,o=r.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Yj.call(this,o,r),!r)return(0,tf.eachItem)(o,i=>ef.call(this,i)),this;eP.call(this,r);let n={...r,type:(0,ku.getJSONTypes)(r.type),schemaType:(0,ku.getJSONTypes)(r.schemaType)};return(0,tf.eachItem)(o,n.type.length===0?i=>ef.call(this,i,n):i=>n.type.forEach(a=>ef.call(this,i,n,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===e);n>=0&&o.rules.splice(n,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(e,r){let o=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let i=n.split("/").slice(1),a=e;for(let s of i)a=a[s];for(let s in o){let c=o[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=Ab(l))}}return e}_removeAllSchemas(e,r){for(let o in e){let n=e[o];(!r||r.test(o))&&(typeof n=="string"?delete e[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[o]))}}_addSchema(e,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;o=(0,na.normalizeId)(a||o);let u=na.getSchemaRefs.call(this,e,o);return c=new ra.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ra.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ra.compileSchema.call(this,e)}finally{this.opts=r}}};oa.ValidationError=Aj.default;oa.MissingRefError=Ob.default;Pe.default=oa;function Rb(t,e,r,o="error"){for(let n in t){let i=n;i in e&&this.logger[o](`${r}: option ${n}. ${t[i]}`)}}function Nb(t){return t=(0,na.normalizeId)(t),this.schemas[t]||this.refs[t]}function Hj(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Bj(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Wj(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Jj(){let t={...this.opts};for(let e of Zj)delete t[e];return t}var Gj={log(){},warn(){},error(){}};function Kj(t){if(t===!1)return Gj;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Xj=/^[a-z_$][a-z0-9_$:-]*$/i;function Yj(t,e){let{RULES:r}=this;if((0,tf.eachItem)(t,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!Xj.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ef(t,e,r){var o;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=n?i.post:i.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,ku.getJSONTypes)(e.type),schemaType:(0,ku.getJSONTypes)(e.schemaType)}};e.before?Qj.call(this,a,s,e.before):a.rules.push(s),i.all[t]=s,(o=e.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function Qj(t,e,r){let o=t.rules.findIndex(n=>n.keyword===r);o>=0?t.rules.splice(o,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function eP(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Ab(e)),t.validateSchema=this.compile(e,!0))}var tP={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ab(t){return{anyOf:[t,tP]}}});var Ub=j(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var rP={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rf.default=rP});var qb=j(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.callRef=an.getValidate=void 0;var nP=Qi(),Mb=mt(),nt=K(),ao=Wt(),Zb=vu(),wu=ie(),oP={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:o}=t,{baseId:n,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=Zb.resolveRef.call(c,u,n,r);if(l===void 0)throw new nP.default(o.opts.uriResolver,n,r);if(l instanceof Zb.SchemaEnv)return g(l);return h(l);function d(){if(i===u)return Su(t,a,i,i.$async);let m=e.scopeValue("root",{ref:u});return Su(t,(0,nt._)`${m}.validate`,u,u.$async)}function g(m){let f=Lb(t,m);Su(t,f,m,m.$async)}function h(m){let f=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,nt.stringify)(m)}:{ref:m}),_=e.name("valid"),x=t.subschema({schema:m,dataTypes:[],schemaPath:nt.nil,topSchemaRef:f,errSchemaPath:r},_);t.mergeEvaluated(x),t.ok(_)}}};function Lb(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,nt._)`${r.scopeValue("wrapper",{ref:e})}.validate`}an.getValidate=Lb;function Su(t,e,r,o){let{gen:n,it:i}=t,{allErrors:a,schemaEnv:s,opts:c}=i,u=c.passContext?ao.default.this:nt.nil;o?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=n.let("valid");n.try(()=>{n.code((0,nt._)`await ${(0,Mb.callValidateCode)(t,e,u)}`),h(e),a||n.assign(m,!0)},f=>{n.if((0,nt._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),g(f),a||n.assign(m,!1)}),t.ok(m)}function d(){t.result((0,Mb.callValidateCode)(t,e,u),()=>h(e),()=>g(e))}function g(m){let f=(0,nt._)`${m}.errors`;n.assign(ao.default.vErrors,(0,nt._)`${ao.default.vErrors} === null ? ${f} : ${ao.default.vErrors}.concat(${f})`),n.assign(ao.default.errors,(0,nt._)`${ao.default.vErrors}.length`)}function h(m){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=wu.mergeEvaluated.props(n,_.props,i.props));else{let x=n.var("props",(0,nt._)`${m}.evaluated.props`);i.props=wu.mergeEvaluated.props(n,x,i.props,nt.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=wu.mergeEvaluated.items(n,_.items,i.items));else{let x=n.var("items",(0,nt._)`${m}.evaluated.items`);i.items=wu.mergeEvaluated.items(n,x,i.items,nt.Name)}}}an.callRef=Su;an.default=oP});var Fb=j(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var iP=Ub(),aP=qb(),sP=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",iP.default,aP.default];nf.default=sP});var Vb=j(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var Iu=K(),vr=Iu.operators,Eu={maximum:{okStr:"<=",ok:vr.LTE,fail:vr.GT},minimum:{okStr:">=",ok:vr.GTE,fail:vr.LT},exclusiveMaximum:{okStr:"<",ok:vr.LT,fail:vr.GTE},exclusiveMinimum:{okStr:">",ok:vr.GT,fail:vr.LTE}},cP={message:({keyword:t,schemaCode:e})=>(0,Iu.str)`must be ${Eu[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Iu._)`{comparison: ${Eu[t].okStr}, limit: ${e}}`},uP={keyword:Object.keys(Eu),type:"number",schemaType:"number",$data:!0,error:cP,code(t){let{keyword:e,data:r,schemaCode:o}=t;t.fail$data((0,Iu._)`${r} ${Eu[e].fail} ${o} || isNaN(${r})`)}};of.default=uP});var Hb=j(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var ia=K(),lP={message:({schemaCode:t})=>(0,ia.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ia._)`{multipleOf: ${t}}`},dP={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:lP,code(t){let{gen:e,data:r,schemaCode:o,it:n}=t,i=n.opts.multipleOfPrecision,a=e.let("res"),s=i?(0,ia._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,ia._)`${a} !== parseInt(${a})`;t.fail$data((0,ia._)`(${o} === 0 || (${a} = ${r}/${o}, ${s}))`)}};af.default=dP});var Wb=j(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});function Bb(t){let e=t.length,r=0,o=0,n;for(;o=55296&&n<=56319&&o{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var sn=K(),pP=ie(),mP=Wb(),fP={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,sn.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,sn._)`{limit: ${t}}`},hP={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:fP,code(t){let{keyword:e,data:r,schemaCode:o,it:n}=t,i=e==="maxLength"?sn.operators.GT:sn.operators.LT,a=n.opts.unicode===!1?(0,sn._)`${r}.length`:(0,sn._)`${(0,pP.useFunc)(t.gen,mP.default)}(${r})`;t.fail$data((0,sn._)`${a} ${i} ${o}`)}};cf.default=hP});var Gb=j(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var gP=mt(),vP=ie(),so=K(),_P={message:({schemaCode:t})=>(0,so.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,so._)`{pattern: ${t}}`},yP={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:_P,code(t){let{gen:e,data:r,$data:o,schema:n,schemaCode:i,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,so._)`new RegExp`:(0,vP.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,so._)`${u}(${i}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,so._)`!${l}`)}else{let c=(0,gP.usePattern)(t,n);t.fail$data((0,so._)`!${c}.test(${r})`)}}};uf.default=yP});var Kb=j(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var aa=K(),bP={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,aa.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,aa._)`{limit: ${t}}`},$P={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:bP,code(t){let{keyword:e,data:r,schemaCode:o}=t,n=e==="maxProperties"?aa.operators.GT:aa.operators.LT;t.fail$data((0,aa._)`Object.keys(${r}).length ${n} ${o}`)}};lf.default=$P});var Xb=j(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var sa=mt(),ca=K(),xP=ie(),kP={message:({params:{missingProperty:t}})=>(0,ca.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,ca._)`{missingProperty: ${t}}`},wP={keyword:"required",type:"object",schemaType:"array",$data:!0,error:kP,code(t){let{gen:e,schema:r,schemaCode:o,data:n,$data:i,it:a}=t,{opts:s}=a;if(!i&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let h=t.parentSchema.properties,{definedProperties:m}=t.it;for(let f of r)if(h?.[f]===void 0&&!m.has(f)){let _=a.schemaEnv.baseId+a.errSchemaPath,x=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,xP.checkStrictMode)(a,x,a.opts.strictRequired)}}function u(){if(c||i)t.block$data(ca.nil,d);else for(let h of r)(0,sa.checkReportMissingProp)(t,h)}function l(){let h=e.let("missing");if(c||i){let m=e.let("valid",!0);t.block$data(m,()=>g(h,m)),t.ok(m)}else e.if((0,sa.checkMissingProp)(t,r,h)),(0,sa.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",o,h=>{t.setParams({missingProperty:h}),e.if((0,sa.noPropertyInData)(e,n,h,s.ownProperties),()=>t.error())})}function g(h,m){t.setParams({missingProperty:h}),e.forOf(h,o,()=>{e.assign(m,(0,sa.propertyInData)(e,n,h,s.ownProperties)),e.if((0,ca.not)(m),()=>{t.error(),e.break()})},ca.nil)}}};df.default=wP});var Yb=j(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var ua=K(),SP={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ua.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ua._)`{limit: ${t}}`},IP={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:SP,code(t){let{keyword:e,data:r,schemaCode:o}=t,n=e==="maxItems"?ua.operators.GT:ua.operators.LT;t.fail$data((0,ua._)`${r}.length ${n} ${o}`)}};pf.default=IP});var Tu=j(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var Qb=zm();Qb.code='require("ajv/dist/runtime/equal").default';mf.default=Qb});var e$=j(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var ff=Ji(),Re=K(),EP=ie(),TP=Tu(),zP={message:({params:{i:t,j:e}})=>(0,Re.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Re._)`{i: ${t}, j: ${e}}`},jP={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:zP,code(t){let{gen:e,data:r,$data:o,schema:n,parentSchema:i,schemaCode:a,it:s}=t;if(!o&&!n)return;let c=e.let("valid"),u=i.items?(0,ff.getSchemaTypes)(i.items):[];t.block$data(c,l,(0,Re._)`${a} === false`),t.ok(c);function l(){let m=e.let("i",(0,Re._)`${r}.length`),f=e.let("j");t.setParams({i:m,j:f}),e.assign(c,!0),e.if((0,Re._)`${m} > 1`,()=>(d()?g:h)(m,f))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function g(m,f){let _=e.name("item"),x=(0,ff.checkDataTypes)(u,_,s.opts.strictNumbers,ff.DataType.Wrong),$=e.const("indices",(0,Re._)`{}`);e.for((0,Re._)`;${m}--;`,()=>{e.let(_,(0,Re._)`${r}[${m}]`),e.if(x,(0,Re._)`continue`),u.length>1&&e.if((0,Re._)`typeof ${_} == "string"`,(0,Re._)`${_} += "_"`),e.if((0,Re._)`typeof ${$}[${_}] == "number"`,()=>{e.assign(f,(0,Re._)`${$}[${_}]`),t.error(),e.assign(c,!1).break()}).code((0,Re._)`${$}[${_}] = ${m}`)})}function h(m,f){let _=(0,EP.useFunc)(e,TP.default),x=e.name("outer");e.label(x).for((0,Re._)`;${m}--;`,()=>e.for((0,Re._)`${f} = ${m}; ${f}--;`,()=>e.if((0,Re._)`${_}(${r}[${m}], ${r}[${f}])`,()=>{t.error(),e.assign(c,!1).break(x)})))}}};hf.default=jP});var t$=j(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var gf=K(),PP=ie(),RP=Tu(),NP={message:"must be equal to constant",params:({schemaCode:t})=>(0,gf._)`{allowedValue: ${t}}`},OP={keyword:"const",$data:!0,error:NP,code(t){let{gen:e,data:r,$data:o,schemaCode:n,schema:i}=t;o||i&&typeof i=="object"?t.fail$data((0,gf._)`!${(0,PP.useFunc)(e,RP.default)}(${r}, ${n})`):t.fail((0,gf._)`${i} !== ${r}`)}};vf.default=OP});var r$=j(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var la=K(),CP=ie(),AP=Tu(),DP={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,la._)`{allowedValues: ${t}}`},UP={keyword:"enum",schemaType:"array",$data:!0,error:DP,code(t){let{gen:e,data:r,$data:o,schema:n,schemaCode:i,it:a}=t;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let s=n.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,CP.useFunc)(e,AP.default)),l;if(s||o)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let h=e.const("vSchema",i);l=(0,la.or)(...n.map((m,f)=>g(h,f)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",i,h=>e.if((0,la._)`${u()}(${r}, ${h})`,()=>e.assign(l,!0).break()))}function g(h,m){let f=n[m];return typeof f=="object"&&f!==null?(0,la._)`${u()}(${r}, ${h}[${m}])`:(0,la._)`${r} === ${f}`}}};_f.default=UP});var n$=j(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var MP=Vb(),ZP=Hb(),LP=Jb(),qP=Gb(),FP=Kb(),VP=Xb(),HP=Yb(),BP=e$(),WP=t$(),JP=r$(),GP=[MP.default,ZP.default,LP.default,qP.default,FP.default,VP.default,HP.default,BP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},WP.default,JP.default];yf.default=GP});var $f=j(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.validateAdditionalItems=void 0;var cn=K(),bf=ie(),KP={message:({params:{len:t}})=>(0,cn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,cn._)`{limit: ${t}}`},XP={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:KP,code(t){let{parentSchema:e,it:r}=t,{items:o}=e;if(!Array.isArray(o)){(0,bf.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}o$(t,o)}};function o$(t,e){let{gen:r,schema:o,data:n,keyword:i,it:a}=t;a.items=!0;let s=r.const("len",(0,cn._)`${n}.length`);if(o===!1)t.setParams({len:e.length}),t.pass((0,cn._)`${s} <= ${e.length}`);else if(typeof o=="object"&&!(0,bf.alwaysValidSchema)(a,o)){let u=r.var("valid",(0,cn._)`${s} <= ${e.length}`);r.if((0,cn.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:i,dataProp:l,dataPropType:bf.Type.Num},u),a.allErrors||r.if((0,cn.not)(u),()=>r.break())})}}da.validateAdditionalItems=o$;da.default=XP});var xf=j(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateTuple=void 0;var i$=K(),zu=ie(),YP=mt(),QP={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return a$(t,"additionalItems",e);r.items=!0,!(0,zu.alwaysValidSchema)(r,e)&&t.ok((0,YP.validateArray)(t))}};function a$(t,e,r=t.schema){let{gen:o,parentSchema:n,data:i,keyword:a,it:s}=t;l(n),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=zu.mergeEvaluated.items(o,r.length,s.items));let c=o.name("valid"),u=o.const("len",(0,i$._)`${i}.length`);r.forEach((d,g)=>{(0,zu.alwaysValidSchema)(s,d)||(o.if((0,i$._)`${u} > ${g}`,()=>t.subschema({keyword:a,schemaProp:g,dataProp:g},c)),t.ok(c))});function l(d){let{opts:g,errSchemaPath:h}=s,m=r.length,f=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(g.strictTuples&&!f){let _=`"${a}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,zu.checkStrictMode)(s,_,g.strictTuples)}}}pa.validateTuple=a$;pa.default=QP});var s$=j(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var eR=xf(),tR={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,eR.validateTuple)(t,"items")};kf.default=tR});var u$=j(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var c$=K(),rR=ie(),nR=mt(),oR=$f(),iR={message:({params:{len:t}})=>(0,c$.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,c$._)`{limit: ${t}}`},aR={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:iR,code(t){let{schema:e,parentSchema:r,it:o}=t,{prefixItems:n}=r;o.items=!0,!(0,rR.alwaysValidSchema)(o,e)&&(n?(0,oR.validateAdditionalItems)(t,n):t.ok((0,nR.validateArray)(t)))}};wf.default=aR});var l$=j(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var ht=K(),ju=ie(),sR={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},cR={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:sR,code(t){let{gen:e,schema:r,parentSchema:o,data:n,it:i}=t,a,s,{minContains:c,maxContains:u}=o;i.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=e.const("len",(0,ht._)`${n}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,ju.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,ju.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ju.alwaysValidSchema)(i,r)){let f=(0,ht._)`${l} >= ${a}`;s!==void 0&&(f=(0,ht._)`${f} && ${l} <= ${s}`),t.pass(f);return}i.items=!0;let d=e.name("valid");s===void 0&&a===1?h(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,ht._)`${n}.length > 0`,g)):(e.let(d,!1),g()),t.result(d,()=>t.reset());function g(){let f=e.name("_valid"),_=e.let("count",0);h(f,()=>e.if(f,()=>m(_)))}function h(f,_){e.forRange("i",0,l,x=>{t.subschema({keyword:"contains",dataProp:x,dataPropType:ju.Type.Num,compositeRule:!0},f),_()})}function m(f){e.code((0,ht._)`${f}++`),s===void 0?e.if((0,ht._)`${f} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,ht._)`${f} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,ht._)`${f} >= ${a}`,()=>e.assign(d,!0)))}}};Sf.default=cR});var m$=j(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateSchemaDeps=Nt.validatePropertyDeps=Nt.error=void 0;var If=K(),uR=ie(),ma=mt();Nt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let o=e===1?"property":"properties";return(0,If.str)`must have ${o} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:o}})=>(0,If._)`{property: ${t}, + || ${a} === "boolean" || ${n} === null`).assign(s,(0,J._)`[${n}]`)}}}function kT({gen:t,parentData:e,parentDataProperty:r},o){t.if((0,J._)`${e} !== undefined`,()=>t.assign((0,J._)`${e}[${r}]`,o))}function km(t,e,r,o=to.Correct){let n=o===to.Correct?J.operators.EQ:J.operators.NEQ,i;switch(t){case"null":return(0,J._)`${e} ${n} null`;case"array":i=(0,J._)`Array.isArray(${e})`;break;case"object":i=(0,J._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=a((0,J._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=a();break;default:return(0,J._)`typeof ${e} ${n} ${t}`}return o===to.Correct?i:(0,J.not)(i);function a(s=J.nil){return(0,J.and)((0,J._)`typeof ${e} == "number"`,s,r?(0,J._)`isFinite(${e})`:J.nil)}}Ze.checkDataType=km;function wm(t,e,r,o){if(t.length===1)return km(t[0],e,r,o);let n,i=(0,xy.toHash)(t);if(i.array&&i.object){let a=(0,J._)`typeof ${e} != "object"`;n=i.null?a:(0,J._)`!${e} || ${a}`,delete i.null,delete i.array,delete i.object}else n=J.nil;i.number&&delete i.integer;for(let a in i)n=(0,J.and)(n,km(a,e,r,o));return n}Ze.checkDataTypes=wm;var wT={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,J._)`{type: ${t}}`:(0,J._)`{type: ${e}}`};function Sm(t){let e=ST(t);(0,_T.reportError)(e,wT)}Ze.reportTypeError=Sm;function ST(t){let{gen:e,data:r,schema:o}=t,n=(0,xy.schemaRefOrVal)(t,o,"type");return{gen:e,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:t}}});var Iy=j(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.assignDefaults=void 0;var ro=K(),IT=ie();function ET(t,e){let{properties:r,items:o}=t.schema;if(e==="object"&&r)for(let n in r)Sy(t,n,r[n].default);else e==="array"&&Array.isArray(o)&&o.forEach((n,i)=>Sy(t,i,n.default))}du.assignDefaults=ET;function Sy(t,e,r){let{gen:o,compositeRule:n,data:i,opts:a}=t;if(r===void 0)return;let s=(0,ro._)`${i}${(0,ro.getProperty)(e)}`;if(n){(0,IT.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,ro._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,ro._)`${c} || ${s} === null || ${s} === ""`),o.if(c,(0,ro._)`${s} = ${(0,ro.stringify)(r)}`)}});var mt=j(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.validateUnion=me.validateArray=me.usePattern=me.callValidateCode=me.schemaProperties=me.allSchemaProperties=me.noPropertyInData=me.propertyInData=me.isOwnProperty=me.hasPropFunc=me.reportMissingProp=me.checkMissingProp=me.checkReportMissingProp=void 0;var _e=K(),Im=ie(),mr=Wt(),TT=ie();function zT(t,e){let{gen:r,data:o,it:n}=t;r.if(Tm(r,o,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,_e._)`${e}`},!0),t.error()})}me.checkReportMissingProp=zT;function jT({gen:t,data:e,it:{opts:r}},o,n){return(0,_e.or)(...o.map(i=>(0,_e.and)(Tm(t,e,i,r.ownProperties),(0,_e._)`${n} = ${i}`)))}me.checkMissingProp=jT;function PT(t,e){t.setParams({missingProperty:e},!0),t.error()}me.reportMissingProp=PT;function Ey(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,_e._)`Object.prototype.hasOwnProperty`})}me.hasPropFunc=Ey;function Em(t,e,r){return(0,_e._)`${Ey(t)}.call(${e}, ${r})`}me.isOwnProperty=Em;function RT(t,e,r,o){let n=(0,_e._)`${e}${(0,_e.getProperty)(r)} !== undefined`;return o?(0,_e._)`${n} && ${Em(t,e,r)}`:n}me.propertyInData=RT;function Tm(t,e,r,o){let n=(0,_e._)`${e}${(0,_e.getProperty)(r)} === undefined`;return o?(0,_e.or)(n,(0,_e.not)(Em(t,e,r))):n}me.noPropertyInData=Tm;function Ty(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}me.allSchemaProperties=Ty;function NT(t,e){return Ty(e).filter(r=>!(0,Im.alwaysValidSchema)(t,e[r]))}me.schemaProperties=NT;function OT({schemaCode:t,data:e,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:a},s,c,u){let l=u?(0,_e._)`${t}, ${e}, ${o}${n}`:e,d=[[mr.default.instancePath,(0,_e.strConcat)(mr.default.instancePath,i)],[mr.default.parentData,a.parentData],[mr.default.parentDataProperty,a.parentDataProperty],[mr.default.rootData,mr.default.rootData]];a.opts.dynamicRef&&d.push([mr.default.dynamicAnchors,mr.default.dynamicAnchors]);let g=(0,_e._)`${l}, ${r.object(...d)}`;return c!==_e.nil?(0,_e._)`${s}.call(${c}, ${g})`:(0,_e._)`${s}(${g})`}me.callValidateCode=OT;var CT=(0,_e._)`new RegExp`;function AT({gen:t,it:{opts:e}},r){let o=e.unicodeRegExp?"u":"",{regExp:n}=e.code,i=n(r,o);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,_e._)`${n.code==="new RegExp"?CT:(0,TT.useFunc)(t,n)}(${r}, ${o})`})}me.usePattern=AT;function DT(t){let{gen:e,data:r,keyword:o,it:n}=t,i=e.name("valid");if(n.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(i,!0),a(()=>e.break()),i;function a(s){let c=e.const("len",(0,_e._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:Im.Type.Num},i),e.if((0,_e.not)(i),s)})}}me.validateArray=DT;function UT(t){let{gen:e,schema:r,keyword:o,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Im.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:o,schemaProp:u,compositeRule:!0},s);e.assign(a,(0,_e._)`${a} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,_e.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}me.validateUnion=UT});var Py=j(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateKeywordUsage=Pt.validSchemaType=Pt.funcKeywordCode=Pt.macroKeywordCode=void 0;var Be=K(),tn=Wt(),MT=mt(),ZT=Wi();function LT(t,e){let{gen:r,keyword:o,schema:n,parentSchema:i,it:a}=t,s=e.macro.call(a.self,n,i,a),c=jy(r,o,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:Be.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Pt.macroKeywordCode=LT;function qT(t,e){var r;let{gen:o,keyword:n,schema:i,parentSchema:a,$data:s,it:c}=t;VT(c,e);let u=!s&&e.compile?e.compile.call(c.self,i,a,c):e.validate,l=jy(o,n,u),d=o.let("valid");t.block$data(d,g),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function g(){if(e.errors===!1)f(),e.modifying&&zy(t),_(()=>t.error());else{let x=e.async?h():m();e.modifying&&zy(t),_(()=>FT(t,x))}}function h(){let x=o.let("ruleErrs",null);return o.try(()=>f((0,Be._)`await `),$=>o.assign(d,!1).if((0,Be._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(x,(0,Be._)`${$}.errors`),()=>o.throw($))),x}function m(){let x=(0,Be._)`${l}.errors`;return o.assign(x,null),f(Be.nil),x}function f(x=e.async?(0,Be._)`await `:Be.nil){let $=c.opts.passContext?tn.default.this:tn.default.self,k=!("compile"in e&&!s||e.schema===!1);o.assign(d,(0,Be._)`${x}${(0,MT.callValidateCode)(t,l,$,k)}`,e.modifying)}function _(x){var $;o.if((0,Be.not)(($=e.valid)!==null&&$!==void 0?$:d),x)}}Pt.funcKeywordCode=qT;function zy(t){let{gen:e,data:r,it:o}=t;e.if(o.parentData,()=>e.assign(r,(0,Be._)`${o.parentData}[${o.parentDataProperty}]`))}function FT(t,e){let{gen:r}=t;r.if((0,Be._)`Array.isArray(${e})`,()=>{r.assign(tn.default.vErrors,(0,Be._)`${tn.default.vErrors} === null ? ${e} : ${tn.default.vErrors}.concat(${e})`).assign(tn.default.errors,(0,Be._)`${tn.default.vErrors}.length`),(0,ZT.extendErrors)(t)},()=>t.error())}function VT({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function jy(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Be.stringify)(r)})}function HT(t,e,r=!1){return!e.length||e.some(o=>o==="array"?Array.isArray(t):o==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==o||r&&typeof t>"u")}Pt.validSchemaType=HT;function BT({schema:t,opts:e,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let a=n.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Pt.validateKeywordUsage=BT});var Ny=j(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.extendSubschemaMode=fr.extendSubschemaData=fr.getSubschema=void 0;var Rt=K(),Ry=ie();function WT(t,{keyword:e,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:a}){if(e!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Ry.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}fr.getSubschema=WT;function JT(t,e,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:a}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,g=s.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(r)}`,!0);c(g),t.errorPath=(0,Rt.str)`${u}${(0,Ry.getErrorPath)(r,o,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(n!==void 0){let u=n instanceof Rt.Name?n:s.let("data",n,!0);c(u),a!==void 0&&(t.propertyName=a)}i&&(t.dataTypes=i);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}fr.extendSubschemaData=JT;function GT(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(t.compositeRule=o),n!==void 0&&(t.createErrors=n),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=r}fr.extendSubschemaMode=GT});var zm=j((JU,Oy)=>{"use strict";Oy.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var Ay=j((GU,Cy)=>{"use strict";var hr=Cy.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};pu(e,o,n,t,"",t)};hr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};hr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};hr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};hr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function pu(t,e,r,o,n,i,a,s,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){e(o,n,i,a,s,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in hr.arrayKeywords)for(var g=0;g{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.getSchemaRefs=tt.resolveUrl=tt.normalizeId=tt._getFullPath=tt.getFullPath=tt.inlineRef=void 0;var XT=ie(),YT=zm(),QT=Ay(),ez=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function tz(t,e=!0){return typeof t=="boolean"?!0:e===!0?!jm(t):e?Dy(t)<=e:!1}tt.inlineRef=tz;var rz=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function jm(t){for(let e in t){if(rz.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(jm)||typeof r=="object"&&jm(r))return!0}return!1}function Dy(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!ez.has(r)&&(typeof t[r]=="object"&&(0,XT.eachItem)(t[r],o=>e+=Dy(o)),e===1/0))return 1/0}return e}function Uy(t,e="",r){r!==!1&&(e=no(e));let o=t.parse(e);return My(t,o)}tt.getFullPath=Uy;function My(t,e){return t.serialize(e).split("#")[0]+"#"}tt._getFullPath=My;var nz=/#\/?$/;function no(t){return t?t.replace(nz,""):""}tt.normalizeId=no;function oz(t,e,r){return r=no(r),t.resolve(e,r)}tt.resolveUrl=oz;var iz=/^[a-z_][-a-z0-9._]*$/i;function az(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=no(t[r]||e),i={"":n},a=Uy(o,n,!1),s={},c=new Set;return QT(t,{allKeys:!0},(d,g,h,m)=>{if(m===void 0)return;let f=a+g,_=i[m];typeof d[r]=="string"&&(_=x.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[g]=_;function x(k){let C=this.opts.uriResolver.resolve;if(k=no(_?C(_,k):k),c.has(k))throw l(k);c.add(k);let L=this.refs[k];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?u(d,L.schema,k):k!==no(f)&&(k[0]==="#"?(u(d,s[k],k),s[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!iz.test(k))throw new Error(`invalid anchor "${k}"`);x.call(this,`#${k}`)}}}),s;function u(d,g,h){if(g!==void 0&&!YT(d,g))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}tt.getSchemaRefs=az});var Yi=j(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.getData=gr.KeywordCxt=gr.validateFunctionCode=void 0;var Vy=yy(),Zy=Ji(),Rm=xm(),mu=Ji(),sz=Iy(),Xi=Py(),Pm=Ny(),M=K(),B=Wt(),cz=Gi(),Jt=ie(),Ki=Wi();function uz(t){if(Wy(t)&&(Jy(t),By(t))){pz(t);return}Hy(t,()=>(0,Vy.topBoolOrEmptySchema)(t))}gr.validateFunctionCode=uz;function Hy({gen:t,validateName:e,schema:r,schemaEnv:o,opts:n},i){n.code.es5?t.func(e,(0,M._)`${B.default.data}, ${B.default.valCxt}`,o.$async,()=>{t.code((0,M._)`"use strict"; ${Ly(r,n)}`),dz(t,n),t.code(i)}):t.func(e,(0,M._)`${B.default.data}, ${lz(n)}`,o.$async,()=>t.code(Ly(r,n)).code(i))}function lz(t){return(0,M._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${t.dynamicRef?(0,M._)`, ${B.default.dynamicAnchors}={}`:M.nil}}={}`}function dz(t,e){t.if(B.default.valCxt,()=>{t.var(B.default.instancePath,(0,M._)`${B.default.valCxt}.${B.default.instancePath}`),t.var(B.default.parentData,(0,M._)`${B.default.valCxt}.${B.default.parentData}`),t.var(B.default.parentDataProperty,(0,M._)`${B.default.valCxt}.${B.default.parentDataProperty}`),t.var(B.default.rootData,(0,M._)`${B.default.valCxt}.${B.default.rootData}`),e.dynamicRef&&t.var(B.default.dynamicAnchors,(0,M._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{t.var(B.default.instancePath,(0,M._)`""`),t.var(B.default.parentData,(0,M._)`undefined`),t.var(B.default.parentDataProperty,(0,M._)`undefined`),t.var(B.default.rootData,B.default.data),e.dynamicRef&&t.var(B.default.dynamicAnchors,(0,M._)`{}`)})}function pz(t){let{schema:e,opts:r,gen:o}=t;Hy(t,()=>{r.$comment&&e.$comment&&Ky(t),vz(t),o.let(B.default.vErrors,null),o.let(B.default.errors,0),r.unevaluated&&mz(t),Gy(t),bz(t)})}function mz(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,M._)`${r}.evaluated`),e.if((0,M._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,M._)`${t.evaluated}.props`,(0,M._)`undefined`)),e.if((0,M._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,M._)`${t.evaluated}.items`,(0,M._)`undefined`))}function Ly(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,M._)`/*# sourceURL=${r} */`:M.nil}function fz(t,e){if(Wy(t)&&(Jy(t),By(t))){hz(t,e);return}(0,Vy.boolOrEmptySchema)(t,e)}function By({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Wy(t){return typeof t.schema!="boolean"}function hz(t,e){let{schema:r,gen:o,opts:n}=t;n.$comment&&r.$comment&&Ky(t),_z(t),yz(t);let i=o.const("_errs",B.default.errors);Gy(t,i),o.var(e,(0,M._)`${i} === ${B.default.errors}`)}function Jy(t){(0,Jt.checkUnknownRules)(t),gz(t)}function Gy(t,e){if(t.opts.jtd)return qy(t,[],!1,e);let r=(0,Zy.getSchemaTypes)(t.schema),o=(0,Zy.coerceAndCheckDataType)(t,r);qy(t,r,!o,e)}function gz(t){let{schema:e,errSchemaPath:r,opts:o,self:n}=t;e.$ref&&o.ignoreKeywordsWithRef&&(0,Jt.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function vz(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Jt.checkStrictMode)(t,"default is ignored in the schema root")}function _z(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,cz.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function yz(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ky({gen:t,schemaEnv:e,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)t.code((0,M._)`${B.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let a=(0,M.str)`${o}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,M._)`${B.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function bz(t){let{gen:e,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=t;r.$async?e.if((0,M._)`${B.default.errors} === 0`,()=>e.return(B.default.data),()=>e.throw((0,M._)`new ${n}(${B.default.vErrors})`)):(e.assign((0,M._)`${o}.errors`,B.default.vErrors),i.unevaluated&&$z(t),e.return((0,M._)`${B.default.errors} === 0`))}function $z({gen:t,evaluated:e,props:r,items:o}){r instanceof M.Name&&t.assign((0,M._)`${e}.props`,r),o instanceof M.Name&&t.assign((0,M._)`${e}.items`,o)}function qy(t,e,r,o){let{gen:n,schema:i,data:a,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Jt.schemaHasRulesButRef)(i,l))){n.block(()=>Yy(t,"$ref",l.all.$ref.definition));return}c.jtd||xz(t,e),n.block(()=>{for(let g of l.rules)d(g);d(l.post)});function d(g){(0,Rm.shouldUseGroup)(i,g)&&(g.type?(n.if((0,mu.checkDataType)(g.type,a,c.strictNumbers)),Fy(t,g),e.length===1&&e[0]===g.type&&r&&(n.else(),(0,mu.reportTypeError)(t)),n.endIf()):Fy(t,g),s||n.if((0,M._)`${B.default.errors} === ${o||0}`))}}function Fy(t,e){let{gen:r,schema:o,opts:{useDefaults:n}}=t;n&&(0,sz.assignDefaults)(t,e.type),r.block(()=>{for(let i of e.rules)(0,Rm.shouldUseRule)(o,i)&&Yy(t,i.keyword,i.definition,e.type)})}function xz(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(kz(t,e),t.opts.allowUnionTypes||wz(t,e),Sz(t,t.dataTypes))}function kz(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Xy(t.dataTypes,r)||Nm(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Ez(t,e)}}function wz(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Nm(t,"use allowUnionTypes to allow union type keyword")}function Sz(t,e){let r=t.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,Rm.shouldUseRule)(t.schema,n)){let{type:i}=n.definition;i.length&&!i.some(a=>Iz(e,a))&&Nm(t,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function Iz(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Xy(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Ez(t,e){let r=[];for(let o of t.dataTypes)Xy(e,o)?r.push(o):e.includes("integer")&&o==="number"&&r.push("integer");t.dataTypes=r}function Nm(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Jt.checkStrictMode)(t,e,t.opts.strictTypes)}var fu=class{constructor(e,r,o){if((0,Xi.validateKeywordUsage)(e,r,o),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=o,this.data=e.data,this.schema=e.schema[o],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Jt.schemaRefOrVal)(e,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Qy(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Xi.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",B.default.errors))}result(e,r,o){this.failResult((0,M.not)(e),r,o)}failResult(e,r,o){this.gen.if(e),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,M.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,M._)`${r} !== undefined && (${(0,M.or)(this.invalid$data(),e)})`)}error(e,r,o){if(r){this.setParams(r),this._error(e,o),this.setParams({});return}this._error(e,o)}_error(e,r){(e?Ki.reportExtraError:Ki.reportError)(this,this.def.error,r)}$dataError(){(0,Ki.reportError)(this,this.def.$dataError||Ki.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ki.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,o=M.nil){this.gen.block(()=>{this.check$data(e,o),r()})}check$data(e=M.nil,r=M.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:a}=this;o.if((0,M.or)((0,M._)`${n} === undefined`,r)),e!==M.nil&&o.assign(e,!0),(i.length||a.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),e!==M.nil&&o.assign(e,!1)),o.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,M.or)(a(),s());function a(){if(o.length){if(!(r instanceof M.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,M._)`${(0,mu.checkDataTypes)(c,r,i.opts.strictNumbers,mu.DataType.Wrong)}`}return M.nil}function s(){if(n.validateSchema){let c=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,M._)`!${c}(${r})`}return M.nil}}subschema(e,r){let o=(0,Pm.getSubschema)(this.it,e);(0,Pm.extendSubschemaData)(o,this.it,e),(0,Pm.extendSubschemaMode)(o,e);let n={...this.it,...o,items:void 0,props:void 0};return fz(n,r),n}mergeEvaluated(e,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&e.props!==void 0&&(o.props=Jt.mergeEvaluated.props(n,e.props,o.props,r)),o.items!==!0&&e.items!==void 0&&(o.items=Jt.mergeEvaluated.items(n,e.items,o.items,r)))}mergeValidEvaluated(e,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,M.Name)),!0}};gr.KeywordCxt=fu;function Yy(t,e,r,o){let n=new fu(t,r,e);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Xi.funcKeywordCode)(n,r):"macro"in r?(0,Xi.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Xi.funcKeywordCode)(n,r)}var Tz=/^\/(?:[^~]|~0|~1)*$/,zz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Qy(t,{dataLevel:e,dataNames:r,dataPathArr:o}){let n,i;if(t==="")return B.default.rootData;if(t[0]==="/"){if(!Tz.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,i=B.default.rootData}else{let u=zz.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(n=u[2],n==="#"){if(l>=e)throw new Error(c("property/index",l));return o[e-l]}if(l>e)throw new Error(c("data",l));if(i=r[e-l],!n)return i}let a=i,s=n.split("/");for(let u of s)u&&(i=(0,M._)`${i}${(0,M.getProperty)((0,Jt.unescapeJsonPointer)(u))}`,a=(0,M._)`${a} && ${i}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}gr.getData=Qy});var hu=j(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Om=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Cm.default=Om});var Qi=j(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Am=Gi(),Dm=class extends Error{constructor(e,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,Am.resolveUrl)(e,r,o),this.missingSchema=(0,Am.normalizeId)((0,Am.getFullPath)(e,this.missingRef))}};Um.default=Dm});var vu=j(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var xt=K(),jz=hu(),rn=Wt(),kt=Gi(),eb=ie(),Pz=Yi(),oo=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let o;typeof e.schema=="object"&&(o=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,kt.normalizeId)(o?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=o?.$async,this.refs={}}};ft.SchemaEnv=oo;function Zm(t){let e=tb.call(this,t);if(e)return e;let r=(0,kt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,a=new xt.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),s;t.$async&&(s=a.scopeValue("Error",{ref:jz.default,code:(0,xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:rn.default.data,parentData:rn.default.parentData,parentDataProperty:rn.default.parentDataProperty,dataNames:[rn.default.data],dataPathArr:[xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:xt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,Pz.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(rn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let h=new Function(`${rn.default.self}`,`${rn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:f}=u;h.evaluated={props:m instanceof xt.Name?void 0:m,items:f instanceof xt.Name?void 0:f,dynamicProps:m instanceof xt.Name,dynamicItems:f instanceof xt.Name},h.source&&(h.source.evaluated=(0,xt.stringify)(h.evaluated))}return t.validate=h,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}ft.compileSchema=Zm;function Rz(t,e,r){var o;r=(0,kt.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let i=Cz.call(this,t,r);if(i===void 0){let a=(o=t.localRefs)===null||o===void 0?void 0:o[r],{schemaId:s}=this.opts;a&&(i=new oo({schema:a,schemaId:s,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=Nz.call(this,i)}ft.resolveRef=Rz;function Nz(t){return(0,kt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Zm.call(this,t)}function tb(t){for(let e of this._compilations)if(Oz(e,t))return e}ft.getCompilingSchema=tb;function Oz(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Cz(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||gu.call(this,t,e)}function gu(t,e){let r=this.opts.uriResolver.parse(e),o=(0,kt._getFullPath)(this.opts.uriResolver,r),n=(0,kt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&o===n)return Mm.call(this,r,t);let i=(0,kt.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=gu.call(this,t,a);return typeof s?.schema!="object"?void 0:Mm.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||Zm.call(this,a),i===(0,kt.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,kt.resolveUrl)(this.opts.uriResolver,n,u)),new oo({schema:s,schemaId:c,root:t,baseId:n})}return Mm.call(this,r,a)}}ft.resolveSchema=gu;var Az=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Mm(t,{baseId:e,schema:r,root:o}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,eb.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Az.has(s)&&u&&(e=(0,kt.resolveUrl)(this.opts.uriResolver,e,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,eb.schemaHasRulesButRef)(r,this.RULES)){let s=(0,kt.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=gu.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new oo({schema:r,schemaId:a,root:o,baseId:e}),i.schema!==i.root.schema)return i}});var rb=j((tM,Dz)=>{Dz.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Bm=j((rM,ub)=>{"use strict";var Uz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),qm=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Mz=RegExp.prototype.test.bind(/^\d*$/u),nn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Fm=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ob=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Vm=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Zz=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),rt=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)rt[e]="%"+t[e>>4]+t[e&15]}function Le(t){return t<2048?rt[192|t>>6]+rt[128|t&63]:t<65536?rt[224|t>>12]+rt[128|t>>6&63]+rt[128|t&63]:rt[240|t>>18]+rt[128|t>>12&63]+rt[128|t>>6&63]+rt[128|t&63]}function Lz(t){let e="",r=0,o=0;for(o=0;o=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[o];break}for(o+=1;o=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[o]}return e}var qz=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Fz=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),Vz=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Hz=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Bz(t){if(t.length===0)return!1;for(let e=0;er&&(r=n,e=o)):(o=-1,n=0);if(r<2)return t.join(":");let i=t.slice(0,e).join(":"),a=t.slice(e+r).join(":");return i+"::"+a}function Wz(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let r=e===-1?t.split(":"):t.slice(0,e).split(":"),o=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(r.length===1&&r[0]===""&&(r.length=0),o.length===1&&o[0]===""&&(o.length=0));let n=r.concat(o),i=0;for(let s=0;s=8)return;let a=n.slice(0,r.length);for(let s=i;s<8;s++)a.push("0");for(let s=r.length;sKz[o])}function ab(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let o=0;o57343)e+=Le(n);else if(n<=56319&&r+1=56320&&i<=57343?(e+=Le(65536+(n-55296<<10)+(i-56320)),r++):e+=Le(65533)}else e+=Le(65533)}}return e}function ej(t,e=!1){let r="",o=e&&t[0]!=="/";for(let n=0;n57343)r+=Le(a);else if(a<=56319&&n+1=56320&&s<=57343?(r+=Le(65536+(a-55296<<10)+(s-56320)),n++):r+=Le(65533)}else r+=Le(65533)}}return r}function Hm(t,e){let r="";for(let o=0;o57343)r+=Le(i);else if(i<=56319&&o+1=56320&&a<=57343?(r+=Le(65536+(i-55296<<10)+(a-56320)),o++):r+=Le(65533)}else r+=Le(65533)}}return r}function sb(t){return Hm(t,Zz)}function tj(t){return Hm(t,Vm)}function rj(t){return Hm(t,Vm)}function cb(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function nj(t){let e="";for(let r=0;r57343)e+=Le(n);else if(n<=56319&&r+1=56320&&i<=57343?(e+=Le(65536+(n-55296<<10)+(i-56320)),r++):e+=Le(65533)}else e+=Le(65533)}}return e}function oj(t){let e="";for(let r=0;r{"use strict";var{isUUID:aj}=Bm(),sj=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,cj=["http","https","ws","wss","urn","urn:uuid"];function uj(t){return cj.indexOf(t)!==-1}function Wm(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function lb(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function db(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function lj(t){return t.secure=Wm(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function dj(t){if((t.port===(Wm(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let e=t.resourceName.indexOf("?"),r=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=r&&r!=="/"?r:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function pj(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(sj);if(r&&r[0]===t.path){let o=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${o}:${e.nid||t.nid}`,i=Jm(n);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function mj(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",o=t.nid.toLowerCase(),n=`${r}:${e.nid||o}`,i=Jm(n);i&&(t=i.serialize(t,e));let a=t,s=t.nss;return a.path=`${o||e.nid}:${s}`,e.skipEscape=!0,a}function fj(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!aj(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function hj(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var pb={scheme:"http",domainHost:!0,parse:lb,serialize:db},gj={scheme:"https",domainHost:pb.domainHost,parse:lb,serialize:db},_u={scheme:"ws",domainHost:!0,parse:lj,serialize:dj},vj={scheme:"wss",domainHost:_u.domainHost,parse:_u.parse,serialize:_u.serialize},_j={scheme:"urn",parse:pj,serialize:mj,skipNormalize:!0},yj={scheme:"urn:uuid",parse:fj,serialize:hj,skipNormalize:!0},yu={http:pb,https:gj,ws:_u,wss:vj,urn:_j,"urn:uuid":yj};Object.setPrototypeOf(yu,null);function Jm(t){return t&&(yu[t]||yu[t.toLowerCase()])||void 0}mb.exports={wsIsSecure:Wm,SCHEMES:yu,isValidSchemeName:uj,getSchemeHandler:Jm}});var Eb=j((oM,xu)=>{"use strict";var{normalizeIPv6:yb,removeDotSegments:ta,recomposeAuthority:bj,normalizePercentEncoding:Gm,normalizePathEncoding:$j,serializePathEncoding:hb,normalizeQueryFragmentEncoding:gb,encodeQuery:xj,encodeFragment:kj,reescapeHostDelimiters:wj,isIPv4:bb,nonSimpleDomain:Sj}=Bm(),{SCHEMES:$b,getSchemeHandler:Km}=fb(),xb=/^[A-Za-z][A-Za-z0-9+.-]*$/u,kb="URI scheme is malformed.";function vb(t){let e=unescape(String(t));if(!xb.test(e))throw new TypeError(kb);return e}function Ij(t,e){return typeof t=="string"?t=Oj(t,e):typeof t=="object"&&(t=$u(on(t,e),e)),t}function Ej(t,e,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=bu(t,o),{parsed:l,malformedAuthorityOrPort:d,malformedPercentEncoding:g,malformedSchemeSpecific:h,malformedHost:m,malformedScheme:f}=bu(e,o);if(i||d||a||g||s||h||c||m||u||f)throw new Error(n.error||l.error||"URI is malformed.");let _=wb(n,l,o,!0),x=Km(r&&r.scheme||_.scheme),$=_.host,k=$!==void 0&&$!==""&&(bb($)||yb($).isIPV6);Sb(_,r||{},x,k);let C=$&&$.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test($);if(_.error&&!C)throw new Error(_.error);return o.skipEscape=!0,on(_,o)}function wb(t,e,r,o){let n={};return o||(t=$u(on(t,r),r),e=$u(on(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ta(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ta(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=ta(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=ta(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function Tj(t,e,r){let o=_b(t,r),n=_b(e,r);return o!==void 0&&n!==void 0&&o===n}function on(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},o=Object.assign({},e),n=[];r.scheme&&(r.scheme=vb(r.scheme));let i=Km(o.scheme||r.scheme);i&&i.serialize&&i.serialize(r,o);let a=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,s=!o.skipEscape&&r.scheme===void 0&&!a;r.path!==void 0&&(o.skipEscape?r.path=Gm(r.path):r.path=hb(r.path,s)),o.reference!=="suffix"&&r.scheme&&(r.scheme=vb(r.scheme),n.push(r.scheme,":"));let c=bj(r);if(c!==void 0&&(o.reference!=="suffix"&&n.push("//"),n.push(c),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let u=r.path;!o.absolutePath&&(!i||!i.absolutePath)&&(u=ta(u)),s&&(u=hb(u,!0)),c===void 0&&u[0]==="/"&&u[1]==="/"&&(u="/%2F"+u.slice(2)),n.push(u)}return r.query!==void 0&&n.push("?",xj(r.query)),r.fragment!==void 0&&n.push("#",kj(r.fragment)),n.join("")}var zj=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,jj=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Pj=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Rj(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function ea(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function Xm(t){return t[0]==="["&&t[t.length-1]==="]"}function Nj(t){let e=t[4];return ea(t[3])||e!==void 0&&!Xm(e)&&ea(e)||ea(t[6])||ea(t[7])||ea(t[8])}function Sb(t,e,r,o){if(!e.unicodeSupport&&(!r||!r.unicodeSupport)&&t.host&&!Xm(t.host)&&(e.domainHost||r&&r.domainHost)&&o===!1&&Sj(t.host))try{t.host=new URL("http://"+t.host).hostname}catch(n){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}function bu(t,e){let r=Object.assign({},e),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,i=!1,a=!1,s=!1,c=!1,u=!1,l=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let d=t.match(jj);d!==null&&d[1].indexOf("\\")!==-1&&(o.error="URI authority must not contain a literal backslash.",n=!0);let g=t.match(Pj);if(g!==null){let m=g[1],f=m.replace(/[\t\n\r]/g,"");f.length>=2&&(f.slice(0,2)!=="//"?(o.error=o.error||"URI authority must not contain a literal backslash.",n=!0):m.length!==f.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",n=!0))}let h=t.match(zj);if(h){if(o.scheme=h[1],o.userinfo=h[3],o.host=h[4],o.port=parseInt(h[5],10),o.path=h[6]||"",o.query=h[7],o.fragment=h[8],o.scheme!==void 0){let _=unescape(o.scheme);xb.test(_)?o.scheme=_.toLowerCase():(o.error=o.error||kb,u=!0)}i=Nj(h),i&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=h[5]);let m=Rj(o,h);if(m!==void 0&&(o.error=o.error||m,n=!0),o.host)if(bb(o.host)===!1){let x=Xm(o.host),$=o.host.indexOf("[")!==-1||o.host.indexOf("]")!==-1,k=yb(o.host);l=k.isIPV6||k.isIPVFuture===!0,c=$&&(!x||k.error===!0),o.host=l?k.host:k.host.toLowerCase(),c&&(o.error=o.error||"URI host is malformed.",n=!0)}else l=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");let f=Km(r.scheme||o.scheme);if(c||(s=Sb(o,r,f,l)),t.indexOf("%")!==-1&&o.host!==void 0&&!c){let _=l?o.host:Gm(o.host,!0);l||(_=Gm(_.toLowerCase())),o.host=wj(_,l)}(!f||f&&!f.skipNormalize)&&(o.path&&(o.path=$j(o.path)),o.query&&(o.query=gb(o.query)),o.fragment&&(o.fragment=gb(o.fragment))),f&&f.parse&&(f.parse(o,r),f===$b.urn&&o.nid===void 0&&(a=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:u}}function $u(t,e){return bu(t,e).parsed}function Oj(t,e){return Ib(t,e).normalized}function Ib(t,e){let{parsed:r,malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:s}=bu(t,e);return{normalized:o||n||i||a||s?t:on(r,e),malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:s}}function _b(t,e){if(typeof t!="string"&&typeof t!="object")return;let r;try{r=typeof t=="string"?t:on(t,e)}catch{return}let{normalized:o,malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=Ib(r,e);return n||i||a||s||c?void 0:o}var Ym={SCHEMES:$b,normalize:Ij,resolve:Ej,resolveComponent:wb,equal:Tj,serialize:on,parse:$u};xu.exports=Ym;xu.exports.default=Ym;xu.exports.fastUri=Ym});var zb=j(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var Tb=Eb();Tb.code='require("ajv/dist/runtime/uri").default';Qm.default=Tb});var Db=j(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.CodeGen=Pe.Name=Pe.nil=Pe.stringify=Pe.str=Pe._=Pe.KeywordCxt=void 0;var Cj=Yi();Object.defineProperty(Pe,"KeywordCxt",{enumerable:!0,get:function(){return Cj.KeywordCxt}});var io=K();Object.defineProperty(Pe,"_",{enumerable:!0,get:function(){return io._}});Object.defineProperty(Pe,"str",{enumerable:!0,get:function(){return io.str}});Object.defineProperty(Pe,"stringify",{enumerable:!0,get:function(){return io.stringify}});Object.defineProperty(Pe,"nil",{enumerable:!0,get:function(){return io.nil}});Object.defineProperty(Pe,"Name",{enumerable:!0,get:function(){return io.Name}});Object.defineProperty(Pe,"CodeGen",{enumerable:!0,get:function(){return io.CodeGen}});var Aj=hu(),Ob=Qi(),Dj=$m(),ra=vu(),Uj=K(),na=Gi(),ku=Ji(),tf=ie(),jb=rb(),Mj=zb(),Cb=(t,e)=>new RegExp(t,e);Cb.code="new RegExp";var Zj=["removeAdditional","useDefaults","coerceTypes"],Lj=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),qj={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Fj={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Pb=200;function Vj(t){var e,r,o,n,i,a,s,c,u,l,d,g,h,m,f,_,x,$,k,C,L,qe,at,dn,el;let vo=t.strict,tl=(e=t.code)===null||e===void 0?void 0:e.optimize,lh=tl===!0||tl===void 0?1:tl||0,dh=(o=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:Cb,Cx=(n=t.uriResolver)!==null&&n!==void 0?n:Mj.default;return{strictSchema:(a=(i=t.strictSchema)!==null&&i!==void 0?i:vo)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:vo)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:vo)!==null&&l!==void 0?l:"log",strictTuples:(g=(d=t.strictTuples)!==null&&d!==void 0?d:vo)!==null&&g!==void 0?g:"log",strictRequired:(m=(h=t.strictRequired)!==null&&h!==void 0?h:vo)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:lh,regExp:dh}:{optimize:lh,regExp:dh},loopRequired:(f=t.loopRequired)!==null&&f!==void 0?f:Pb,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:Pb,meta:(x=t.meta)!==null&&x!==void 0?x:!0,messages:($=t.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=t.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(C=t.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(L=t.addUsedSchema)!==null&&L!==void 0?L:!0,validateSchema:(qe=t.validateSchema)!==null&&qe!==void 0?qe:!0,validateFormats:(at=t.validateFormats)!==null&&at!==void 0?at:!0,unicodeRegExp:(dn=t.unicodeRegExp)!==null&&dn!==void 0?dn:!0,int32range:(el=t.int32range)!==null&&el!==void 0?el:!0,uriResolver:Cx}}var oa=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Vj(e)};let{es5:r,lines:o}=this.opts.code;this.scope=new Uj.ValueScope({scope:{},prefixes:Lj,es5:r,lines:o}),this.logger=Kj(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Dj.getRules)(),Rb.call(this,qj,e,"NOT SUPPORTED"),Rb.call(this,Fj,e,"DEPRECATED","warn"),this._metaOpts=Jj.call(this),e.formats&&Bj.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Wj.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Hj.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:o}=this.opts,n=jb;o==="id"&&(n={...jb},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let o;if(typeof e=="string"){if(o=this.getSchema(e),!o)throw new Error(`no schema with key or ref "${e}"`)}else o=this.compile(e);let n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(e,r){let o=this._addSchema(e,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,e,r);async function n(l,d){await i.call(this,l.$schema);let g=this._addSchema(l,d);return g.validate||a.call(this,g)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Ob.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=o(l))}finally{delete this._loading[l]}}}addSchema(e,r,o,n=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,o,n);return this}let i;if(typeof e=="object"){let{schemaId:a}=this.opts;if(i=e[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return r=(0,na.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(e,o,r,n,!0),this}addMetaSchema(e,r,o=this.opts.validateSchema){return this.addSchema(e,r,!0,o),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let o;if(o=e.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(o,e);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(e){let r;for(;typeof(r=Nb.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:o}=this.opts,n=new ra.SchemaEnv({schema:{},schemaId:o});if(r=ra.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Nb.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let o=e[this.opts.schemaId];return o&&(o=(0,na.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let o;if(typeof e=="string")o=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof e=="object"&&r===void 0){if(r=e,o=r.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Yj.call(this,o,r),!r)return(0,tf.eachItem)(o,i=>ef.call(this,i)),this;eP.call(this,r);let n={...r,type:(0,ku.getJSONTypes)(r.type),schemaType:(0,ku.getJSONTypes)(r.schemaType)};return(0,tf.eachItem)(o,n.type.length===0?i=>ef.call(this,i,n):i=>n.type.forEach(a=>ef.call(this,i,n,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===e);n>=0&&o.rules.splice(n,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(e,r){let o=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let i=n.split("/").slice(1),a=e;for(let s of i)a=a[s];for(let s in o){let c=o[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=Ab(l))}}return e}_removeAllSchemas(e,r){for(let o in e){let n=e[o];(!r||r.test(o))&&(typeof n=="string"?delete e[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[o]))}}_addSchema(e,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;o=(0,na.normalizeId)(a||o);let u=na.getSchemaRefs.call(this,e,o);return c=new ra.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ra.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ra.compileSchema.call(this,e)}finally{this.opts=r}}};oa.ValidationError=Aj.default;oa.MissingRefError=Ob.default;Pe.default=oa;function Rb(t,e,r,o="error"){for(let n in t){let i=n;i in e&&this.logger[o](`${r}: option ${n}. ${t[i]}`)}}function Nb(t){return t=(0,na.normalizeId)(t),this.schemas[t]||this.refs[t]}function Hj(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Bj(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Wj(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Jj(){let t={...this.opts};for(let e of Zj)delete t[e];return t}var Gj={log(){},warn(){},error(){}};function Kj(t){if(t===!1)return Gj;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Xj=/^[a-z_$][a-z0-9_$:-]*$/i;function Yj(t,e){let{RULES:r}=this;if((0,tf.eachItem)(t,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!Xj.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ef(t,e,r){var o;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=n?i.post:i.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,ku.getJSONTypes)(e.type),schemaType:(0,ku.getJSONTypes)(e.schemaType)}};e.before?Qj.call(this,a,s,e.before):a.rules.push(s),i.all[t]=s,(o=e.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function Qj(t,e,r){let o=t.rules.findIndex(n=>n.keyword===r);o>=0?t.rules.splice(o,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function eP(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Ab(e)),t.validateSchema=this.compile(e,!0))}var tP={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ab(t){return{anyOf:[t,tP]}}});var Ub=j(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var rP={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rf.default=rP});var qb=j(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.callRef=an.getValidate=void 0;var nP=Qi(),Mb=mt(),nt=K(),ao=Wt(),Zb=vu(),wu=ie(),oP={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:o}=t,{baseId:n,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=Zb.resolveRef.call(c,u,n,r);if(l===void 0)throw new nP.default(o.opts.uriResolver,n,r);if(l instanceof Zb.SchemaEnv)return g(l);return h(l);function d(){if(i===u)return Su(t,a,i,i.$async);let m=e.scopeValue("root",{ref:u});return Su(t,(0,nt._)`${m}.validate`,u,u.$async)}function g(m){let f=Lb(t,m);Su(t,f,m,m.$async)}function h(m){let f=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,nt.stringify)(m)}:{ref:m}),_=e.name("valid"),x=t.subschema({schema:m,dataTypes:[],schemaPath:nt.nil,topSchemaRef:f,errSchemaPath:r},_);t.mergeEvaluated(x),t.ok(_)}}};function Lb(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,nt._)`${r.scopeValue("wrapper",{ref:e})}.validate`}an.getValidate=Lb;function Su(t,e,r,o){let{gen:n,it:i}=t,{allErrors:a,schemaEnv:s,opts:c}=i,u=c.passContext?ao.default.this:nt.nil;o?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=n.let("valid");n.try(()=>{n.code((0,nt._)`await ${(0,Mb.callValidateCode)(t,e,u)}`),h(e),a||n.assign(m,!0)},f=>{n.if((0,nt._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),g(f),a||n.assign(m,!1)}),t.ok(m)}function d(){t.result((0,Mb.callValidateCode)(t,e,u),()=>h(e),()=>g(e))}function g(m){let f=(0,nt._)`${m}.errors`;n.assign(ao.default.vErrors,(0,nt._)`${ao.default.vErrors} === null ? ${f} : ${ao.default.vErrors}.concat(${f})`),n.assign(ao.default.errors,(0,nt._)`${ao.default.vErrors}.length`)}function h(m){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=wu.mergeEvaluated.props(n,_.props,i.props));else{let x=n.var("props",(0,nt._)`${m}.evaluated.props`);i.props=wu.mergeEvaluated.props(n,x,i.props,nt.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=wu.mergeEvaluated.items(n,_.items,i.items));else{let x=n.var("items",(0,nt._)`${m}.evaluated.items`);i.items=wu.mergeEvaluated.items(n,x,i.items,nt.Name)}}}an.callRef=Su;an.default=oP});var Fb=j(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var iP=Ub(),aP=qb(),sP=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",iP.default,aP.default];nf.default=sP});var Vb=j(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var Iu=K(),vr=Iu.operators,Eu={maximum:{okStr:"<=",ok:vr.LTE,fail:vr.GT},minimum:{okStr:">=",ok:vr.GTE,fail:vr.LT},exclusiveMaximum:{okStr:"<",ok:vr.LT,fail:vr.GTE},exclusiveMinimum:{okStr:">",ok:vr.GT,fail:vr.LTE}},cP={message:({keyword:t,schemaCode:e})=>(0,Iu.str)`must be ${Eu[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Iu._)`{comparison: ${Eu[t].okStr}, limit: ${e}}`},uP={keyword:Object.keys(Eu),type:"number",schemaType:"number",$data:!0,error:cP,code(t){let{keyword:e,data:r,schemaCode:o}=t;t.fail$data((0,Iu._)`${r} ${Eu[e].fail} ${o} || isNaN(${r})`)}};of.default=uP});var Hb=j(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var ia=K(),lP={message:({schemaCode:t})=>(0,ia.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ia._)`{multipleOf: ${t}}`},dP={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:lP,code(t){let{gen:e,data:r,schemaCode:o,it:n}=t,i=n.opts.multipleOfPrecision,a=e.let("res"),s=i?(0,ia._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,ia._)`${a} !== parseInt(${a})`;t.fail$data((0,ia._)`(${o} === 0 || (${a} = ${r}/${o}, ${s}))`)}};af.default=dP});var Wb=j(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});function Bb(t){let e=t.length,r=0,o=0,n;for(;o=55296&&n<=56319&&o{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var sn=K(),pP=ie(),mP=Wb(),fP={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,sn.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,sn._)`{limit: ${t}}`},hP={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:fP,code(t){let{keyword:e,data:r,schemaCode:o,it:n}=t,i=e==="maxLength"?sn.operators.GT:sn.operators.LT,a=n.opts.unicode===!1?(0,sn._)`${r}.length`:(0,sn._)`${(0,pP.useFunc)(t.gen,mP.default)}(${r})`;t.fail$data((0,sn._)`${a} ${i} ${o}`)}};cf.default=hP});var Gb=j(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var gP=mt(),vP=ie(),so=K(),_P={message:({schemaCode:t})=>(0,so.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,so._)`{pattern: ${t}}`},yP={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:_P,code(t){let{gen:e,data:r,$data:o,schema:n,schemaCode:i,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,so._)`new RegExp`:(0,vP.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,so._)`${u}(${i}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,so._)`!${l}`)}else{let c=(0,gP.usePattern)(t,n);t.fail$data((0,so._)`!${c}.test(${r})`)}}};uf.default=yP});var Kb=j(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var aa=K(),bP={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,aa.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,aa._)`{limit: ${t}}`},$P={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:bP,code(t){let{keyword:e,data:r,schemaCode:o}=t,n=e==="maxProperties"?aa.operators.GT:aa.operators.LT;t.fail$data((0,aa._)`Object.keys(${r}).length ${n} ${o}`)}};lf.default=$P});var Xb=j(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var sa=mt(),ca=K(),xP=ie(),kP={message:({params:{missingProperty:t}})=>(0,ca.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,ca._)`{missingProperty: ${t}}`},wP={keyword:"required",type:"object",schemaType:"array",$data:!0,error:kP,code(t){let{gen:e,schema:r,schemaCode:o,data:n,$data:i,it:a}=t,{opts:s}=a;if(!i&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let h=t.parentSchema.properties,{definedProperties:m}=t.it;for(let f of r)if(h?.[f]===void 0&&!m.has(f)){let _=a.schemaEnv.baseId+a.errSchemaPath,x=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,xP.checkStrictMode)(a,x,a.opts.strictRequired)}}function u(){if(c||i)t.block$data(ca.nil,d);else for(let h of r)(0,sa.checkReportMissingProp)(t,h)}function l(){let h=e.let("missing");if(c||i){let m=e.let("valid",!0);t.block$data(m,()=>g(h,m)),t.ok(m)}else e.if((0,sa.checkMissingProp)(t,r,h)),(0,sa.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",o,h=>{t.setParams({missingProperty:h}),e.if((0,sa.noPropertyInData)(e,n,h,s.ownProperties),()=>t.error())})}function g(h,m){t.setParams({missingProperty:h}),e.forOf(h,o,()=>{e.assign(m,(0,sa.propertyInData)(e,n,h,s.ownProperties)),e.if((0,ca.not)(m),()=>{t.error(),e.break()})},ca.nil)}}};df.default=wP});var Yb=j(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var ua=K(),SP={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ua.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ua._)`{limit: ${t}}`},IP={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:SP,code(t){let{keyword:e,data:r,schemaCode:o}=t,n=e==="maxItems"?ua.operators.GT:ua.operators.LT;t.fail$data((0,ua._)`${r}.length ${n} ${o}`)}};pf.default=IP});var Tu=j(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var Qb=zm();Qb.code='require("ajv/dist/runtime/equal").default';mf.default=Qb});var e$=j(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var ff=Ji(),Re=K(),EP=ie(),TP=Tu(),zP={message:({params:{i:t,j:e}})=>(0,Re.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Re._)`{i: ${t}, j: ${e}}`},jP={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:zP,code(t){let{gen:e,data:r,$data:o,schema:n,parentSchema:i,schemaCode:a,it:s}=t;if(!o&&!n)return;let c=e.let("valid"),u=i.items?(0,ff.getSchemaTypes)(i.items):[];t.block$data(c,l,(0,Re._)`${a} === false`),t.ok(c);function l(){let m=e.let("i",(0,Re._)`${r}.length`),f=e.let("j");t.setParams({i:m,j:f}),e.assign(c,!0),e.if((0,Re._)`${m} > 1`,()=>(d()?g:h)(m,f))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function g(m,f){let _=e.name("item"),x=(0,ff.checkDataTypes)(u,_,s.opts.strictNumbers,ff.DataType.Wrong),$=e.const("indices",(0,Re._)`{}`);e.for((0,Re._)`;${m}--;`,()=>{e.let(_,(0,Re._)`${r}[${m}]`),e.if(x,(0,Re._)`continue`),u.length>1&&e.if((0,Re._)`typeof ${_} == "string"`,(0,Re._)`${_} += "_"`),e.if((0,Re._)`typeof ${$}[${_}] == "number"`,()=>{e.assign(f,(0,Re._)`${$}[${_}]`),t.error(),e.assign(c,!1).break()}).code((0,Re._)`${$}[${_}] = ${m}`)})}function h(m,f){let _=(0,EP.useFunc)(e,TP.default),x=e.name("outer");e.label(x).for((0,Re._)`;${m}--;`,()=>e.for((0,Re._)`${f} = ${m}; ${f}--;`,()=>e.if((0,Re._)`${_}(${r}[${m}], ${r}[${f}])`,()=>{t.error(),e.assign(c,!1).break(x)})))}}};hf.default=jP});var t$=j(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var gf=K(),PP=ie(),RP=Tu(),NP={message:"must be equal to constant",params:({schemaCode:t})=>(0,gf._)`{allowedValue: ${t}}`},OP={keyword:"const",$data:!0,error:NP,code(t){let{gen:e,data:r,$data:o,schemaCode:n,schema:i}=t;o||i&&typeof i=="object"?t.fail$data((0,gf._)`!${(0,PP.useFunc)(e,RP.default)}(${r}, ${n})`):t.fail((0,gf._)`${i} !== ${r}`)}};vf.default=OP});var r$=j(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var la=K(),CP=ie(),AP=Tu(),DP={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,la._)`{allowedValues: ${t}}`},UP={keyword:"enum",schemaType:"array",$data:!0,error:DP,code(t){let{gen:e,data:r,$data:o,schema:n,schemaCode:i,it:a}=t;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let s=n.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,CP.useFunc)(e,AP.default)),l;if(s||o)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let h=e.const("vSchema",i);l=(0,la.or)(...n.map((m,f)=>g(h,f)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",i,h=>e.if((0,la._)`${u()}(${r}, ${h})`,()=>e.assign(l,!0).break()))}function g(h,m){let f=n[m];return typeof f=="object"&&f!==null?(0,la._)`${u()}(${r}, ${h}[${m}])`:(0,la._)`${r} === ${f}`}}};_f.default=UP});var n$=j(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var MP=Vb(),ZP=Hb(),LP=Jb(),qP=Gb(),FP=Kb(),VP=Xb(),HP=Yb(),BP=e$(),WP=t$(),JP=r$(),GP=[MP.default,ZP.default,LP.default,qP.default,FP.default,VP.default,HP.default,BP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},WP.default,JP.default];yf.default=GP});var $f=j(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.validateAdditionalItems=void 0;var cn=K(),bf=ie(),KP={message:({params:{len:t}})=>(0,cn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,cn._)`{limit: ${t}}`},XP={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:KP,code(t){let{parentSchema:e,it:r}=t,{items:o}=e;if(!Array.isArray(o)){(0,bf.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}o$(t,o)}};function o$(t,e){let{gen:r,schema:o,data:n,keyword:i,it:a}=t;a.items=!0;let s=r.const("len",(0,cn._)`${n}.length`);if(o===!1)t.setParams({len:e.length}),t.pass((0,cn._)`${s} <= ${e.length}`);else if(typeof o=="object"&&!(0,bf.alwaysValidSchema)(a,o)){let u=r.var("valid",(0,cn._)`${s} <= ${e.length}`);r.if((0,cn.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:i,dataProp:l,dataPropType:bf.Type.Num},u),a.allErrors||r.if((0,cn.not)(u),()=>r.break())})}}da.validateAdditionalItems=o$;da.default=XP});var xf=j(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateTuple=void 0;var i$=K(),zu=ie(),YP=mt(),QP={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return a$(t,"additionalItems",e);r.items=!0,!(0,zu.alwaysValidSchema)(r,e)&&t.ok((0,YP.validateArray)(t))}};function a$(t,e,r=t.schema){let{gen:o,parentSchema:n,data:i,keyword:a,it:s}=t;l(n),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=zu.mergeEvaluated.items(o,r.length,s.items));let c=o.name("valid"),u=o.const("len",(0,i$._)`${i}.length`);r.forEach((d,g)=>{(0,zu.alwaysValidSchema)(s,d)||(o.if((0,i$._)`${u} > ${g}`,()=>t.subschema({keyword:a,schemaProp:g,dataProp:g},c)),t.ok(c))});function l(d){let{opts:g,errSchemaPath:h}=s,m=r.length,f=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(g.strictTuples&&!f){let _=`"${a}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,zu.checkStrictMode)(s,_,g.strictTuples)}}}pa.validateTuple=a$;pa.default=QP});var s$=j(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var eR=xf(),tR={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,eR.validateTuple)(t,"items")};kf.default=tR});var u$=j(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var c$=K(),rR=ie(),nR=mt(),oR=$f(),iR={message:({params:{len:t}})=>(0,c$.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,c$._)`{limit: ${t}}`},aR={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:iR,code(t){let{schema:e,parentSchema:r,it:o}=t,{prefixItems:n}=r;o.items=!0,!(0,rR.alwaysValidSchema)(o,e)&&(n?(0,oR.validateAdditionalItems)(t,n):t.ok((0,nR.validateArray)(t)))}};wf.default=aR});var l$=j(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var ht=K(),ju=ie(),sR={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},cR={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:sR,code(t){let{gen:e,schema:r,parentSchema:o,data:n,it:i}=t,a,s,{minContains:c,maxContains:u}=o;i.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=e.const("len",(0,ht._)`${n}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,ju.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,ju.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ju.alwaysValidSchema)(i,r)){let f=(0,ht._)`${l} >= ${a}`;s!==void 0&&(f=(0,ht._)`${f} && ${l} <= ${s}`),t.pass(f);return}i.items=!0;let d=e.name("valid");s===void 0&&a===1?h(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,ht._)`${n}.length > 0`,g)):(e.let(d,!1),g()),t.result(d,()=>t.reset());function g(){let f=e.name("_valid"),_=e.let("count",0);h(f,()=>e.if(f,()=>m(_)))}function h(f,_){e.forRange("i",0,l,x=>{t.subschema({keyword:"contains",dataProp:x,dataPropType:ju.Type.Num,compositeRule:!0},f),_()})}function m(f){e.code((0,ht._)`${f}++`),s===void 0?e.if((0,ht._)`${f} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,ht._)`${f} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,ht._)`${f} >= ${a}`,()=>e.assign(d,!0)))}}};Sf.default=cR});var m$=j(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateSchemaDeps=Nt.validatePropertyDeps=Nt.error=void 0;var If=K(),uR=ie(),ma=mt();Nt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let o=e===1?"property":"properties";return(0,If.str)`must have ${o} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:o}})=>(0,If._)`{property: ${t}, missingProperty: ${o}, depsCount: ${e}, - deps: ${r}}`};var lR={keyword:"dependencies",type:"object",schemaType:"object",error:Nt.error,code(t){let[e,r]=dR(t);d$(t,e),p$(t,r)}};function dR({schema:t}){let e={},r={};for(let o in t){if(o==="__proto__")continue;let n=Array.isArray(t[o])?e:r;n[o]=t[o]}return[e,r]}function d$(t,e=t.schema){let{gen:r,data:o,it:n}=t;if(Object.keys(e).length===0)return;let i=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let c=(0,ma.propertyInData)(r,o,a,n.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of s)(0,ma.checkReportMissingProp)(t,u)}):(r.if((0,If._)`${c} && (${(0,ma.checkMissingProp)(t,s,i)})`),(0,ma.reportMissingProp)(t,i),r.else())}}Nt.validatePropertyDeps=d$;function p$(t,e=t.schema){let{gen:r,data:o,keyword:n,it:i}=t,a=r.name("valid");for(let s in e)(0,uR.alwaysValidSchema)(i,e[s])||(r.if((0,ma.propertyInData)(r,o,s,i.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),t.ok(a))}Nt.validateSchemaDeps=p$;Nt.default=lR});var h$=j(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var f$=K(),pR=ie(),mR={message:"property name must be valid",params:({params:t})=>(0,f$._)`{propertyName: ${t.propertyName}}`},fR={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:mR,code(t){let{gen:e,schema:r,data:o,it:n}=t;if((0,pR.alwaysValidSchema)(n,r))return;let i=e.name("valid");e.forIn("key",o,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,f$.not)(i),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(i)}};Ef.default=fR});var zf=j(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var Pu=mt(),wt=K(),hR=Wt(),Ru=ie(),gR={message:"must NOT have additional properties",params:({params:t})=>(0,wt._)`{additionalProperty: ${t.additionalProperty}}`},vR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:gR,code(t){let{gen:e,schema:r,parentSchema:o,data:n,errsCount:i,it:a}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Ru.alwaysValidSchema)(a,r))return;let u=(0,Pu.allSchemaProperties)(o.properties),l=(0,Pu.allSchemaProperties)(o.patternProperties);d(),t.ok((0,wt._)`${i} === ${hR.default.errors}`);function d(){e.forIn("key",n,_=>{!u.length&&!l.length?m(_):e.if(g(_),()=>m(_))})}function g(_){let x;if(u.length>8){let $=(0,Ru.schemaRefOrVal)(a,o.properties,"properties");x=(0,Pu.isOwnProperty)(e,$,_)}else u.length?x=(0,wt.or)(...u.map($=>(0,wt._)`${_} === ${$}`)):x=wt.nil;return l.length&&(x=(0,wt.or)(x,...l.map($=>(0,wt._)`${(0,Pu.usePattern)(t,$)}.test(${_})`))),(0,wt.not)(x)}function h(_){e.code((0,wt._)`delete ${n}[${_}]`)}function m(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){h(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,Ru.alwaysValidSchema)(a,r)){let x=e.name("valid");c.removeAdditional==="failing"?(f(_,x,!1),e.if((0,wt.not)(x),()=>{t.reset(),h(_)})):(f(_,x),s||e.if((0,wt.not)(x),()=>e.break()))}}function f(_,x,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Ru.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,x)}}};Tf.default=vR});var _$=j(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var _R=Yi(),g$=mt(),jf=ie(),v$=zf(),yR={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:o,data:n,it:i}=t;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&v$.default.code(new _R.KeywordCxt(i,v$.default,"additionalProperties"));let a=(0,g$.allSchemaProperties)(r);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=jf.mergeEvaluated.props(e,(0,jf.toHash)(a),i.props));let s=a.filter(d=>!(0,jf.alwaysValidSchema)(i,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,g$.propertyInData)(e,n,d,i.opts.ownProperties)),l(d),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Pf.default=yR});var x$=j(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var y$=mt(),Nu=K(),b$=ie(),$$=ie(),bR={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:o,parentSchema:n,it:i}=t,{opts:a}=i,s=(0,y$.allSchemaProperties)(r),c=s.filter(f=>(0,b$.alwaysValidSchema)(i,r[f]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof Nu.Name)&&(i.props=(0,$$.evaluatedPropsToName)(e,i.props));let{props:d}=i;g();function g(){for(let f of s)u&&h(f),i.allErrors?m(f):(e.var(l,!0),m(f),e.if(l))}function h(f){for(let _ in u)new RegExp(f).test(_)&&(0,b$.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function m(f){e.forIn("key",o,_=>{e.if((0,Nu._)`${(0,y$.usePattern)(t,f)}.test(${_})`,()=>{let x=c.includes(f);x||t.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:$$.Type.Str},l),i.opts.unevaluated&&d!==!0?e.assign((0,Nu._)`${d}[${_}]`,!0):!x&&!i.allErrors&&e.if((0,Nu.not)(l),()=>e.break())})})}}};Rf.default=bR});var k$=j(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var $R=ie(),xR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:o}=t;if((0,$R.alwaysValidSchema)(o,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Nf.default=xR});var w$=j(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var kR=mt(),wR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kR.validateUnion,error:{message:"must match a schema in anyOf"}};Of.default=wR});var S$=j(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var Ou=K(),SR=ie(),IR={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ou._)`{passingSchemas: ${t.passing}}`},ER={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:IR,code(t){let{gen:e,schema:r,parentSchema:o,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(a,()=>t.reset(),()=>t.error(!0));function u(){i.forEach((l,d)=>{let g;(0,SR.alwaysValidSchema)(n,l)?e.var(c,!0):g=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Ou._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Ou._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),g&&t.mergeEvaluated(g,Ou.Name)})})}}};Cf.default=ER});var I$=j(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var TR=ie(),zR={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((i,a)=>{if((0,TR.alwaysValidSchema)(o,i))return;let s=t.subschema({keyword:"allOf",schemaProp:a},n);t.ok(n),t.mergeEvaluated(s)})}};Af.default=zR});var z$=j(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var Cu=K(),T$=ie(),jR={message:({params:t})=>(0,Cu.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Cu._)`{failingKeyword: ${t.ifClause}}`},PR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:jR,code(t){let{gen:e,parentSchema:r,it:o}=t;r.then===void 0&&r.else===void 0&&(0,T$.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=E$(o,"then"),i=E$(o,"else");if(!n&&!i)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),n&&i){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else n?e.if(s,u("then")):e.if((0,Cu.not)(s),u("else"));t.pass(a,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let g=t.subschema({keyword:l},s);e.assign(a,s),t.mergeValidEvaluated(g,a),d?e.assign(d,(0,Cu._)`${l}`):t.setParams({ifClause:l})}}}};function E$(t,e){let r=t.schema[e];return r!==void 0&&!(0,T$.alwaysValidSchema)(t,r)}Df.default=PR});var j$=j(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var RR=ie(),NR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,RR.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Uf.default=NR});var P$=j(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var OR=$f(),CR=s$(),AR=xf(),DR=u$(),UR=l$(),MR=m$(),ZR=h$(),LR=zf(),qR=_$(),FR=x$(),VR=k$(),HR=w$(),BR=S$(),WR=I$(),JR=z$(),GR=j$();function KR(t=!1){let e=[VR.default,HR.default,BR.default,WR.default,JR.default,GR.default,ZR.default,LR.default,MR.default,qR.default,FR.default];return t?e.push(CR.default,DR.default):e.push(OR.default,AR.default),e.push(UR.default),e}Mf.default=KR});var R$=j(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var ke=K(),XR={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},YR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:XR,code(t,e){let{gen:r,data:o,$data:n,schema:i,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;n?g():h();function g(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,ke._)`${m}[${a}]`),_=r.let("fType"),x=r.let("format");r.if((0,ke._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,ke._)`${f}.type || "string"`).assign(x,(0,ke._)`${f}.validate`),()=>r.assign(_,(0,ke._)`"string"`).assign(x,f)),t.fail$data((0,ke.or)($(),k()));function $(){return c.strictSchema===!1?ke.nil:(0,ke._)`${a} && !${x}`}function k(){let C=l.$async?(0,ke._)`(${f}.async ? await ${x}(${o}) : ${x}(${o}))`:(0,ke._)`${x}(${o})`,L=(0,ke._)`(typeof ${x} == "function" ? ${C} : ${x}.test(${o}))`;return(0,ke._)`${x} && ${x} !== true && ${_} === ${e} && !${L}`}}function h(){let m=d.formats[i];if(!m){$();return}if(m===!0)return;let[f,_,x]=k(m);f===e&&t.pass(C());function $(){if(c.strictSchema===!1){d.logger.warn(L());return}throw new Error(L());function L(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(L){let qe=L instanceof RegExp?(0,ke.regexpCode)(L):c.code.formats?(0,ke._)`${c.code.formats}${(0,ke.getProperty)(i)}`:void 0,at=r.scopeValue("formats",{key:i,ref:L,code:qe});return typeof L=="object"&&!(L instanceof RegExp)?[L.type||"string",L.validate,(0,ke._)`${at}.validate`]:["string",L,at]}function C(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${x}(${o})`}return typeof _=="function"?(0,ke._)`${x}(${o})`:(0,ke._)`${x}.test(${o})`}}}};Zf.default=YR});var N$=j(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var QR=R$(),eN=[QR.default];Lf.default=eN});var O$=j(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.contentVocabulary=co.metadataVocabulary=void 0;co.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];co.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var A$=j(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var tN=Fb(),rN=n$(),nN=P$(),oN=N$(),C$=O$(),iN=[tN.default,rN.default,(0,nN.default)(),oN.default,C$.metadataVocabulary,C$.contentVocabulary];qf.default=iN});var U$=j(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.DiscrError=void 0;var D$;(function(t){t.Tag="tag",t.Mapping="mapping"})(D$||(Au.DiscrError=D$={}))});var Z$=j(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});var uo=K(),Ff=U$(),M$=vu(),aN=Qi(),sN=ie(),cN={message:({params:{discrError:t,tagName:e}})=>t===Ff.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,uo._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},uN={keyword:"discriminator",type:"object",schemaType:"object",error:cN,code(t){let{gen:e,data:r,schema:o,parentSchema:n,it:i}=t,{oneOf:a}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,uo._)`${r}${(0,uo.getProperty)(s)}`);e.if((0,uo._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:Ff.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let h=g();e.if(!1);for(let m in h)e.elseIf((0,uo._)`${u} === ${m}`),e.assign(c,d(h[m]));e.else(),t.error(!1,{discrError:Ff.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(h){let m=e.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:h},m);return t.mergeEvaluated(f,uo.Name),m}function g(){var h;let m={},f=x(n),_=!0;for(let C=0;C{lN.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Bf=j((ye,Hf)=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.MissingRefError=ye.ValidationError=ye.CodeGen=ye.Name=ye.nil=ye.stringify=ye.str=ye._=ye.KeywordCxt=ye.Ajv=void 0;var dN=Db(),pN=A$(),mN=Z$(),q$=L$(),fN=["/properties"],Du="http://json-schema.org/draft-07/schema",lo=class extends dN.default{_addVocabularies(){super._addVocabularies(),pN.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(mN.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(q$,fN):q$;this.addMetaSchema(e,Du,!1),this.refs["http://json-schema.org/schema"]=Du}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Du)?Du:void 0)}};ye.Ajv=lo;Hf.exports=ye=lo;Hf.exports.Ajv=lo;Object.defineProperty(ye,"__esModule",{value:!0});ye.default=lo;var hN=Yi();Object.defineProperty(ye,"KeywordCxt",{enumerable:!0,get:function(){return hN.KeywordCxt}});var po=K();Object.defineProperty(ye,"_",{enumerable:!0,get:function(){return po._}});Object.defineProperty(ye,"str",{enumerable:!0,get:function(){return po.str}});Object.defineProperty(ye,"stringify",{enumerable:!0,get:function(){return po.stringify}});Object.defineProperty(ye,"nil",{enumerable:!0,get:function(){return po.nil}});Object.defineProperty(ye,"Name",{enumerable:!0,get:function(){return po.Name}});Object.defineProperty(ye,"CodeGen",{enumerable:!0,get:function(){return po.CodeGen}});var gN=hu();Object.defineProperty(ye,"ValidationError",{enumerable:!0,get:function(){return gN.default}});var vN=Qi();Object.defineProperty(ye,"MissingRefError",{enumerable:!0,get:function(){return vN.default}})});var K$=j(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.formatNames=Ct.fastFormats=Ct.fullFormats=void 0;function Ot(t,e){return{validate:t,compare:e}}Ct.fullFormats={date:Ot(B$,Kf),time:Ot(Jf(!0),Xf),"date-time":Ot(F$(!0),J$),"iso-time":Ot(Jf(),W$),"iso-date-time":Ot(F$(),G$),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kN,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?: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)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:jN,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:wN,int32:{type:"number",validate:EN},int64:{type:"number",validate:TN},float:{type:"number",validate:H$},double:{type:"number",validate:H$},password:!0,binary:!0};Ct.fastFormats={...Ct.fullFormats,date:Ot(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Kf),time:Ot(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xf),"date-time":Ot(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,J$),"iso-time":Ot(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,W$),"iso-date-time":Ot(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,G$),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Ct.formatNames=Object.keys(Ct.fullFormats);function _N(t){return t%4===0&&(t%100!==0||t%400===0)}var yN=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bN=[0,31,28,31,30,31,30,31,31,30,31,30,31];function B$(t){let e=yN.exec(t);if(!e)return!1;let r=+e[1],o=+e[2],n=+e[3];return o>=1&&o<=12&&n>=1&&n<=(o===2&&_N(r)?29:bN[o])}function Kf(t,e){if(t&&e)return t>e?1:t23||l>59||t&&!s)return!1;if(n<=23&&i<=59&&a<60)return!0;let d=i-l*c,g=n-u*c-(d<0?1:0);return(g===23||g===-1)&&(d===59||d===-1)&&a<61}}function Xf(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),o=new Date("2020-01-01T"+e).valueOf();if(r&&o)return r-o}function W$(t,e){if(!(t&&e))return;let r=Wf.exec(t),o=Wf.exec(e);if(r&&o)return t=r[1]+r[2]+r[3],e=o[1]+o[2]+o[3],t>e?1:t=SN}function TN(t){return Number.isInteger(t)}function H$(){return!0}var zN=/[^\\]\\Z/;function jN(t){if(zN.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var X$=j(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.formatLimitDefinition=void 0;var PN=Bf(),St=K(),_r=St.operators,Uu={formatMaximum:{okStr:"<=",ok:_r.LTE,fail:_r.GT},formatMinimum:{okStr:">=",ok:_r.GTE,fail:_r.LT},formatExclusiveMaximum:{okStr:"<",ok:_r.LT,fail:_r.GTE},formatExclusiveMinimum:{okStr:">",ok:_r.GT,fail:_r.LTE}},RN={message:({keyword:t,schemaCode:e})=>(0,St.str)`should be ${Uu[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,St._)`{comparison: ${Uu[t].okStr}, limit: ${e}}`};mo.formatLimitDefinition={keyword:Object.keys(Uu),type:"string",schemaType:"string",$data:!0,error:RN,code(t){let{gen:e,data:r,schemaCode:o,keyword:n,it:i}=t,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new PN.KeywordCxt(i,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let g=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),h=e.const("fmt",(0,St._)`${g}[${c.schemaCode}]`);t.fail$data((0,St.or)((0,St._)`typeof ${h} != "object"`,(0,St._)`${h} instanceof RegExp`,(0,St._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let g=c.schema,h=s.formats[g];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${n}": format "${g}" does not define "compare" function`);let m=e.scopeValue("formats",{key:g,ref:h,code:a.code.formats?(0,St._)`${a.code.formats}${(0,St.getProperty)(g)}`:void 0});t.fail$data(d(m))}function d(g){return(0,St._)`${g}.compare(${r}, ${o}) ${Uu[n].fail} 0`}},dependencies:["format"]};var NN=t=>(t.addKeyword(mo.formatLimitDefinition),t);mo.default=NN});var tx=j((fa,ex)=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});var fo=K$(),ON=X$(),Yf=K(),Y$=new Yf.Name("fullFormats"),CN=new Yf.Name("fastFormats"),Qf=(t,e={keywords:!0})=>{if(Array.isArray(e))return Q$(t,e,fo.fullFormats,Y$),t;let[r,o]=e.mode==="fast"?[fo.fastFormats,CN]:[fo.fullFormats,Y$],n=e.formats||fo.formatNames;return Q$(t,n,r,o),e.keywords&&(0,ON.default)(t),t};Qf.get=(t,e="full")=>{let o=(e==="fast"?fo.fastFormats:fo.fullFormats)[t];if(!o)throw new Error(`Unknown format "${t}"`);return o};function Q$(t,e,r,o){var n,i;(n=(i=t.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,Yf._)`require("ajv-formats/dist/formats").${o}`);for(let a of e)t.addFormat(a,r[a])}ex.exports=fa=Qf;Object.defineProperty(fa,"__esModule",{value:!0});fa.default=Qf});var Z={};Gt(Z,{BRAND:()=>mk,DIRTY:()=>$r,EMPTY_PATH:()=>Hx,INVALID:()=>q,NEVER:()=>Kk,OK:()=>Oe,ParseStatus:()=>Te,Schema:()=>G,ZodAny:()=>Yt,ZodArray:()=>Mt,ZodBigInt:()=>kr,ZodBoolean:()=>wr,ZodBranded:()=>yo,ZodCatch:()=>Cr,ZodDate:()=>Sr,ZodDefault:()=>Or,ZodDiscriminatedUnion:()=>Sa,ZodEffects:()=>ct,ZodEnum:()=>Rr,ZodError:()=>Je,ZodFirstPartyTypeKind:()=>S,ZodFunction:()=>Ea,ZodIntersection:()=>zr,ZodIssueCode:()=>w,ZodLazy:()=>jr,ZodLiteral:()=>Pr,ZodMap:()=>vn,ZodNaN:()=>yn,ZodNativeEnum:()=>Nr,ZodNever:()=>gt,ZodNull:()=>Er,ZodNullable:()=>Tt,ZodNumber:()=>xr,ZodObject:()=>Ke,ZodOptional:()=>Ge,ZodParsedType:()=>P,ZodPipeline:()=>bo,ZodPromise:()=>Qt,ZodReadonly:()=>Ar,ZodRecord:()=>Ia,ZodSchema:()=>G,ZodSet:()=>_n,ZodString:()=>Xt,ZodSymbol:()=>hn,ZodTransformer:()=>ct,ZodTuple:()=>Et,ZodType:()=>G,ZodUndefined:()=>Ir,ZodUnion:()=>Tr,ZodUnknown:()=>Ut,ZodVoid:()=>gn,addIssueToContext:()=>z,any:()=>xk,array:()=>Ik,bigint:()=>vk,boolean:()=>kh,coerce:()=>Gk,custom:()=>bh,date:()=>_k,datetimeRegex:()=>_h,defaultErrorMap:()=>At,discriminatedUnion:()=>zk,effect:()=>Lk,enum:()=>Uk,function:()=>Ck,getErrorMap:()=>pn,getParsedType:()=>It,instanceof:()=>hk,intersection:()=>jk,isAborted:()=>ka,isAsync:()=>mn,isDirty:()=>wa,isValid:()=>Kt,late:()=>fk,lazy:()=>Ak,literal:()=>Dk,makeIssue:()=>_o,map:()=>Nk,nan:()=>gk,nativeEnum:()=>Mk,never:()=>wk,null:()=>$k,nullable:()=>Fk,number:()=>xh,object:()=>al,objectUtil:()=>nl,oboolean:()=>Jk,onumber:()=>Wk,optional:()=>qk,ostring:()=>Bk,pipeline:()=>Hk,preprocess:()=>Vk,promise:()=>Zk,quotelessJson:()=>qx,record:()=>Rk,set:()=>Ok,setErrorMap:()=>Vx,strictObject:()=>Ek,string:()=>$h,symbol:()=>yk,transformer:()=>Lk,tuple:()=>Pk,undefined:()=>bk,union:()=>Tk,unknown:()=>kk,util:()=>te,void:()=>Sk});var te;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let i={};for(let a of n)i[a]=a;return i},t.getValidEnumValues=n=>{let i=t.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),a={};for(let s of i)a[s]=n[s];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(i){return n[i]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},t.find=(n,i)=>{for(let a of n)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=o,t.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(te||(te={}));var nl;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(nl||(nl={}));var P=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),It=t=>{switch(typeof t){case"undefined":return P.undefined;case"string":return P.string;case"number":return Number.isNaN(t)?P.nan:P.number;case"boolean":return P.boolean;case"function":return P.function;case"bigint":return P.bigint;case"symbol":return P.symbol;case"object":return Array.isArray(t)?P.array:t===null?P.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?P.promise:typeof Map<"u"&&t instanceof Map?P.map:typeof Set<"u"&&t instanceof Set?P.set:typeof Date<"u"&&t instanceof Date?P.date:P.object;default:return P.unknown}};var w=te.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"]),qx=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Je=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)o._errors.push(r(a));else{let s=o,c=0;for(;cr.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(e(n))}else o.push(e(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Je.create=t=>new Je(t);var Fx=(t,e)=>{let r;switch(t.code){case w.invalid_type:t.received===P.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,te.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${te.joinValues(t.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${te.joinValues(t.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${te.joinValues(t.options)}, received '${t.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:te.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case w.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case w.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=e.defaultError,te.assertNever(t)}return{message:r}},At=Fx;var mh=At;function Vx(t){mh=t}function pn(){return mh}var _o=t=>{let{data:e,path:r,errorMaps:o,issueData:n}=t,i=[...r,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let s="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:e,defaultError:s}).message;return{...n,path:i,message:s}},Hx=[];function z(t,e){let r=pn(),o=_o({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===At?void 0:At].filter(n=>!!n)});t.common.issues.push(o)}var Te=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let o=[];for(let n of r){if(n.status==="aborted")return q;n.status==="dirty"&&e.dirty(),o.push(n.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){let o=[];for(let n of r){let i=await n.key,a=await n.value;o.push({key:i,value:a})}return t.mergeObjectSync(e,o)}static mergeObjectSync(e,r){let o={};for(let n of r){let{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return q;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(o[i.value]=a.value)}return{status:e.value,value:o}}},q=Object.freeze({status:"aborted"}),$r=t=>({status:"dirty",value:t}),Oe=t=>({status:"valid",value:t}),ka=t=>t.status==="aborted",wa=t=>t.status==="dirty",Kt=t=>t.status==="valid",mn=t=>typeof Promise<"u"&&t instanceof Promise;var A;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(A||(A={}));var st=class{constructor(e,r,o,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},fh=(t,e)=>{if(Kt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Je(t.common.issues);return this._error=r,this._error}}};function W(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:o,description:n}=t;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,s)=>{let{message:c}=t;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:n}}var G=class{get description(){return this._def.description}_getType(e){return It(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:It(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Te,ctx:{common:e.parent.common,data:e.data,parsedType:It(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(mn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:It(e)},n=this._parseSync({data:e,path:o.path,parent:o});return fh(o,n)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:It(e)};if(!this["~standard"].async)try{let o=this._parseSync({data:e,path:[],parent:r});return Kt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(o=>Kt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(e,r){let o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:It(e)},n=this._parse({data:e,path:o.path,parent:o}),i=await(mn(n)?n:Promise.resolve(n));return fh(o,i)}refine(e,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let a=e(n),s=()=>i.addIssue({code:w.custom,...o(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((o,n)=>e(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(e){return new ct({schema:this,typeName:S.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ge.create(this,this._def)}nullable(){return Tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mt.create(this)}promise(){return Qt.create(this,this._def)}or(e){return Tr.create([this,e],this._def)}and(e){return zr.create(this,e,this._def)}transform(e){return new ct({...W(this._def),schema:this,typeName:S.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Or({...W(this._def),innerType:this,defaultValue:r,typeName:S.ZodDefault})}brand(){return new yo({typeName:S.ZodBranded,type:this,...W(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Cr({...W(this._def),innerType:this,catchValue:r,typeName:S.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return bo.create(this,e)}readonly(){return Ar.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Bx=/^c[^\s-]{8,}$/i,Wx=/^[0-9a-z]+$/,Jx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Gx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Kx=/^[a-z0-9_-]{21}$/i,Xx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ek="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ol,tk=/^(?:(?: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])$/,rk=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,nk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ok=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ik=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ak=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gh="((\\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])))",sk=new RegExp(`^${gh}$`);function vh(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function ck(t){return new RegExp(`^${vh(t)}$`)}function _h(t){let e=`${gh}T${vh(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function uk(t,e){return!!((e==="v4"||!e)&&tk.test(t)||(e==="v6"||!e)&&nk.test(t))}function lk(t,e){if(!Xx.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function dk(t,e){return!!((e==="v4"||!e)&&rk.test(t)||(e==="v6"||!e)&&ok.test(t))}var Xt=class t extends G{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_type,expected:P.string,received:i.parsedType}),q}let o=new Te,n;for(let i of this._def.checks)if(i.kind==="min")e.data.lengthi.value&&(n=this._getOrReturnCtx(e,n),z(n,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,s=e.data.lengthe.test(n),{validation:r,code:w.invalid_string,...A.errToObj(o)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...A.errToObj(e)})}url(e){return this._addCheck({kind:"url",...A.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...A.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...A.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...A.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...A.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...A.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...A.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...A.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...A.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...A.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...A.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...A.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...A.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...A.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...A.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...A.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...A.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...A.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...A.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...A.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...A.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...A.errToObj(r)})}nonempty(e){return this.min(1,A.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew Xt({checks:[],typeName:S.ZodString,coerce:t?.coerce??!1,...W(t)});function pk(t,e){let r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return i%a/10**n}var xr=class t extends G{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_type,expected:P.number,received:i.parsedType}),q}let o,n=new Te;for(let i of this._def.checks)i.kind==="int"?te.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),z(o,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.datai.value:e.data>=i.value)&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?pk(e.data,i.value)!==0&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),z(o,{code:w.not_finite,message:i.message}),n.dirty()):te.assertNever(i);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,A.toString(r))}gt(e,r){return this.setLimit("min",e,!1,A.toString(r))}lte(e,r){return this.setLimit("max",e,!0,A.toString(r))}lt(e,r){return this.setLimit("max",e,!1,A.toString(r))}setLimit(e,r,o,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:A.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:A.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:A.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuee.kind==="int"||e.kind==="multipleOf"&&te.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.valuenew xr({checks:[],typeName:S.ZodNumber,coerce:t?.coerce||!1,...W(t)});var kr=class t extends G{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P.bigint)return this._getInvalidInput(e);let o,n=new Te;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.datai.value:e.data>=i.value)&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):te.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return z(r,{code:w.invalid_type,expected:P.bigint,received:r.parsedType}),q}gte(e,r){return this.setLimit("min",e,!0,A.toString(r))}gt(e,r){return this.setLimit("min",e,!1,A.toString(r))}lte(e,r){return this.setLimit("max",e,!0,A.toString(r))}lt(e,r){return this.setLimit("max",e,!1,A.toString(r))}setLimit(e,r,o,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:A.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew kr({checks:[],typeName:S.ZodBigInt,coerce:t?.coerce??!1,...W(t)});var wr=class extends G{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.boolean,received:o.parsedType}),q}return Oe(e.data)}};wr.create=t=>new wr({typeName:S.ZodBoolean,coerce:t?.coerce||!1,...W(t)});var Sr=class t extends G{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_type,expected:P.date,received:i.parsedType}),q}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_date}),q}let o=new Te,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()i.value&&(n=this._getOrReturnCtx(e,n),z(n,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):te.assertNever(i);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:A.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:A.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew Sr({checks:[],coerce:t?.coerce||!1,typeName:S.ZodDate,...W(t)});var hn=class extends G{_parse(e){if(this._getType(e)!==P.symbol){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.symbol,received:o.parsedType}),q}return Oe(e.data)}};hn.create=t=>new hn({typeName:S.ZodSymbol,...W(t)});var Ir=class extends G{_parse(e){if(this._getType(e)!==P.undefined){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.undefined,received:o.parsedType}),q}return Oe(e.data)}};Ir.create=t=>new Ir({typeName:S.ZodUndefined,...W(t)});var Er=class extends G{_parse(e){if(this._getType(e)!==P.null){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.null,received:o.parsedType}),q}return Oe(e.data)}};Er.create=t=>new Er({typeName:S.ZodNull,...W(t)});var Yt=class extends G{constructor(){super(...arguments),this._any=!0}_parse(e){return Oe(e.data)}};Yt.create=t=>new Yt({typeName:S.ZodAny,...W(t)});var Ut=class extends G{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Oe(e.data)}};Ut.create=t=>new Ut({typeName:S.ZodUnknown,...W(t)});var gt=class extends G{_parse(e){let r=this._getOrReturnCtx(e);return z(r,{code:w.invalid_type,expected:P.never,received:r.parsedType}),q}};gt.create=t=>new gt({typeName:S.ZodNever,...W(t)});var gn=class extends G{_parse(e){if(this._getType(e)!==P.undefined){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.void,received:o.parsedType}),q}return Oe(e.data)}};gn.create=t=>new gn({typeName:S.ZodVoid,...W(t)});var Mt=class t extends G{_parse(e){let{ctx:r,status:o}=this._processInputParams(e),n=this._def;if(r.parsedType!==P.array)return z(r,{code:w.invalid_type,expected:P.array,received:r.parsedType}),q;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,s=r.data.lengthn.maxLength.value&&(z(r,{code:w.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>n.type._parseAsync(new st(r,a,r.path,s)))).then(a=>Te.mergeArray(o,a));let i=[...r.data].map((a,s)=>n.type._parseSync(new st(r,a,r.path,s)));return Te.mergeArray(o,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:A.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:A.toString(r)}})}nonempty(e){return this.min(1,e)}};Mt.create=(t,e)=>new Mt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:S.ZodArray,...W(e)});function fn(t){if(t instanceof Ke){let e={};for(let r in t.shape){let o=t.shape[r];e[r]=Ge.create(fn(o))}return new Ke({...t._def,shape:()=>e})}else return t instanceof Mt?new Mt({...t._def,type:fn(t.element)}):t instanceof Ge?Ge.create(fn(t.unwrap())):t instanceof Tt?Tt.create(fn(t.unwrap())):t instanceof Et?Et.create(t.items.map(e=>fn(e))):t}var Ke=class t extends G{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=te.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==P.object){let u=this._getOrReturnCtx(e);return z(u,{code:w.invalid_type,expected:P.object,received:u.parsedType}),q}let{status:o,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gt&&this._def.unknownKeys==="strip"))for(let u in n.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new st(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof gt){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")s.length>0&&(z(n,{code:w.unrecognized_keys,keys:s}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new st(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,g=await l.value;u.push({key:d,value:g,alwaysSet:l.alwaysSet})}return u}).then(u=>Te.mergeObjectSync(o,u)):Te.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(e){return A.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:S.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let o of te.objectKeys(e))e[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let o of te.objectKeys(this.shape))e[o]||(r[o]=this.shape[o]);return new t({...this._def,shape:()=>r})}deepPartial(){return fn(this)}partial(e){let r={};for(let o of te.objectKeys(this.shape)){let n=this.shape[o];e&&!e[o]?r[o]=n:r[o]=n.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let o of te.objectKeys(this.shape))if(e&&!e[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Ge;)i=i._def.innerType;r[o]=i}return new t({...this._def,shape:()=>r})}keyof(){return yh(te.objectKeys(this.shape))}};Ke.create=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strip",catchall:gt.create(),typeName:S.ZodObject,...W(e)});Ke.strictCreate=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strict",catchall:gt.create(),typeName:S.ZodObject,...W(e)});Ke.lazycreate=(t,e)=>new Ke({shape:t,unknownKeys:"strip",catchall:gt.create(),typeName:S.ZodObject,...W(e)});var Tr=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o=this._def.options;function n(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new Je(s.ctx.common.issues));return z(r,{code:w.invalid_union,unionErrors:a}),q}if(r.common.async)return Promise.all(o.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let i,a=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new Je(c));return z(r,{code:w.invalid_union,unionErrors:s}),q}}get options(){return this._def.options}};Tr.create=(t,e)=>new Tr({options:t,typeName:S.ZodUnion,...W(e)});var Dt=t=>t instanceof jr?Dt(t.schema):t instanceof ct?Dt(t.innerType()):t instanceof Pr?[t.value]:t instanceof Rr?t.options:t instanceof Nr?te.objectValues(t.enum):t instanceof Or?Dt(t._def.innerType):t instanceof Ir?[void 0]:t instanceof Er?[null]:t instanceof Ge?[void 0,...Dt(t.unwrap())]:t instanceof Tt?[null,...Dt(t.unwrap())]:t instanceof yo||t instanceof Ar?Dt(t.unwrap()):t instanceof Cr?Dt(t._def.innerType):[],Sa=class t extends G{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.object)return z(r,{code:w.invalid_type,expected:P.object,received:r.parsedType}),q;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(z(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){let n=new Map;for(let i of r){let a=Dt(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(n.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,i)}}return new t({typeName:S.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...W(o)})}};function il(t,e){let r=It(t),o=It(e);if(t===e)return{valid:!0,data:t};if(r===P.object&&o===P.object){let n=te.objectKeys(e),i=te.objectKeys(t).filter(s=>n.indexOf(s)!==-1),a={...t,...e};for(let s of i){let c=il(t[s],e[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===P.array&&o===P.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let i=0;i{if(ka(i)||ka(a))return q;let s=il(i.value,a.value);return s.valid?((wa(i)||wa(a))&&r.dirty(),{status:r.value,value:s.data}):(z(o,{code:w.invalid_intersection_types}),q)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>n(i,a)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};zr.create=(t,e,r)=>new zr({left:t,right:e,typeName:S.ZodIntersection,...W(r)});var Et=class t extends G{_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.array)return z(o,{code:w.invalid_type,expected:P.array,received:o.parsedType}),q;if(o.data.lengththis._def.items.length&&(z(o,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new st(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>Te.mergeArray(r,a)):Te.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Et.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Et({items:t,typeName:S.ZodTuple,rest:null,...W(e)})};var Ia=class t extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.object)return z(o,{code:w.invalid_type,expected:P.object,received:o.parsedType}),q;let n=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)n.push({key:i._parse(new st(o,s,o.path,s)),value:a._parse(new st(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?Te.mergeObjectAsync(r,n):Te.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof G?new t({keyType:e,valueType:r,typeName:S.ZodRecord,...W(o)}):new t({keyType:Xt.create(),valueType:e,typeName:S.ZodRecord,...W(r)})}},vn=class extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.map)return z(o,{code:w.invalid_type,expected:P.map,received:o.parsedType}),q;let n=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],u)=>({key:n._parse(new st(o,s,o.path,[u,"key"])),value:i._parse(new st(o,c,o.path,[u,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return q;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return q;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};vn.create=(t,e,r)=>new vn({valueType:e,keyType:t,typeName:S.ZodMap,...W(r)});var _n=class t extends G{_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.set)return z(o,{code:w.invalid_type,expected:P.set,received:o.parsedType}),q;let n=this._def;n.minSize!==null&&o.data.sizen.maxSize.value&&(z(o,{code:w.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return q;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...o.data.values()].map((c,u)=>i._parse(new st(o,c,o.path,u)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:A.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};_n.create=(t,e)=>new _n({valueType:t,minSize:null,maxSize:null,typeName:S.ZodSet,...W(e)});var Ea=class t extends G{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.function)return z(r,{code:w.invalid_type,expected:P.function,received:r.parsedType}),q;function o(s,c){return _o({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pn(),At].filter(u=>!!u),issueData:{code:w.invalid_arguments,argumentsError:c}})}function n(s,c){return _o({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pn(),At].filter(u=>!!u),issueData:{code:w.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Qt){let s=this;return Oe(async function(...c){let u=new Je([]),l=await s._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else{let s=this;return Oe(function(...c){let u=s._def.args.safeParse(c,i);if(!u.success)throw new Je([o(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,i);if(!d.success)throw new Je([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Et.create(e).rest(Ut.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new t({args:e||Et.create([]).rest(Ut.create()),returns:r||Ut.create(),typeName:S.ZodFunction,...W(o)})}},jr=class extends G{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};jr.create=(t,e)=>new jr({getter:t,typeName:S.ZodLazy,...W(e)});var Pr=class extends G{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return z(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}};Pr.create=(t,e)=>new Pr({value:t,typeName:S.ZodLiteral,...W(e)});function yh(t,e){return new Rr({values:t,typeName:S.ZodEnum,...W(e)})}var Rr=class t extends G{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),o=this._def.values;return z(r,{expected:te.joinValues(o),received:r.parsedType,code:w.invalid_type}),q}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),o=this._def.values;return z(r,{received:r.data,code:w.invalid_enum_value,options:o}),q}return Oe(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}};Rr.create=yh;var Nr=class extends G{_parse(e){let r=te.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==P.string&&o.parsedType!==P.number){let n=te.objectValues(r);return z(o,{expected:te.joinValues(n),received:o.parsedType,code:w.invalid_type}),q}if(this._cache||(this._cache=new Set(te.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=te.objectValues(r);return z(o,{received:o.data,code:w.invalid_enum_value,options:n}),q}return Oe(e.data)}get enum(){return this._def.values}};Nr.create=(t,e)=>new Nr({values:t,typeName:S.ZodNativeEnum,...W(e)});var Qt=class extends G{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.promise&&r.common.async===!1)return z(r,{code:w.invalid_type,expected:P.promise,received:r.parsedType}),q;let o=r.parsedType===P.promise?r.data:Promise.resolve(r.data);return Oe(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Qt.create=(t,e)=>new Qt({type:t,typeName:S.ZodPromise,...W(e)});var ct=class extends G{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===S.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:o}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:a=>{z(o,a),a.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let a=n.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return q;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?q:c.status==="dirty"?$r(c.value):r.value==="dirty"?$r(c.value):c});{if(r.value==="aborted")return q;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?q:s.status==="dirty"?$r(s.value):r.value==="dirty"?$r(s.value):s}}if(n.type==="refinement"){let a=s=>{let c=n.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(n.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Kt(a))return q;let s=n.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>Kt(a)?Promise.resolve(n.transform(a.value,i)).then(s=>({status:r.value,value:s})):q);te.assertNever(n)}};ct.create=(t,e,r)=>new ct({schema:t,typeName:S.ZodEffects,effect:e,...W(r)});ct.createWithPreprocess=(t,e,r)=>new ct({schema:e,effect:{type:"preprocess",transform:t},typeName:S.ZodEffects,...W(r)});var Ge=class extends G{_parse(e){return this._getType(e)===P.undefined?Oe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ge.create=(t,e)=>new Ge({innerType:t,typeName:S.ZodOptional,...W(e)});var Tt=class extends G{_parse(e){return this._getType(e)===P.null?Oe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Tt.create=(t,e)=>new Tt({innerType:t,typeName:S.ZodNullable,...W(e)});var Or=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o=r.data;return r.parsedType===P.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Or.create=(t,e)=>new Or({innerType:t,typeName:S.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...W(e)});var Cr=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return mn(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Je(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Je(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};Cr.create=(t,e)=>new Cr({innerType:t,typeName:S.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...W(e)});var yn=class extends G{_parse(e){if(this._getType(e)!==P.nan){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.nan,received:o.parsedType}),q}return{status:"valid",value:e.data}}};yn.create=t=>new yn({typeName:S.ZodNaN,...W(t)});var mk=Symbol("zod_brand"),yo=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},bo=class t extends G{_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?q:i.status==="dirty"?(r.dirty(),$r(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?q:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(e,r){return new t({in:e,out:r,typeName:S.ZodPipeline})}},Ar=class extends G{_parse(e){let r=this._def.innerType._parse(e),o=n=>(Kt(n)&&(n.value=Object.freeze(n.value)),n);return mn(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};Ar.create=(t,e)=>new Ar({innerType:t,typeName:S.ZodReadonly,...W(e)});function hh(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function bh(t,e={},r){return t?Yt.create().superRefine((o,n)=>{let i=t(o);if(i instanceof Promise)return i.then(a=>{if(!a){let s=hh(e,o),c=s.fatal??r??!0;n.addIssue({code:"custom",...s,fatal:c})}});if(!i){let a=hh(e,o),s=a.fatal??r??!0;n.addIssue({code:"custom",...a,fatal:s})}}):Yt.create()}var fk={object:Ke.lazycreate},S;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(S||(S={}));var hk=(t,e={message:`Input not instance of ${t.name}`})=>bh(r=>r instanceof t,e),$h=Xt.create,xh=xr.create,gk=yn.create,vk=kr.create,kh=wr.create,_k=Sr.create,yk=hn.create,bk=Ir.create,$k=Er.create,xk=Yt.create,kk=Ut.create,wk=gt.create,Sk=gn.create,Ik=Mt.create,al=Ke.create,Ek=Ke.strictCreate,Tk=Tr.create,zk=Sa.create,jk=zr.create,Pk=Et.create,Rk=Ia.create,Nk=vn.create,Ok=_n.create,Ck=Ea.create,Ak=jr.create,Dk=Pr.create,Uk=Rr.create,Mk=Nr.create,Zk=Qt.create,Lk=ct.create,qk=Ge.create,Fk=Tt.create,Vk=ct.createWithPreprocess,Hk=bo.create,Bk=()=>$h().optional(),Wk=()=>xh().optional(),Jk=()=>kh().optional(),Gk={string:(t=>Xt.create({...t,coerce:!0})),number:(t=>xr.create({...t,coerce:!0})),boolean:(t=>wr.create({...t,coerce:!0})),bigint:(t=>kr.create({...t,coerce:!0})),date:(t=>Sr.create({...t,coerce:!0}))};var Kk=q;Ee();Ee();Ee();Ee();var CS=v("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(t,e),t.def=e,t.parse=(r,o)=>Mr(t,r,o,{callee:t.parse}),t.safeParse=(r,o)=>tr(t,r,o),t.parseAsync=async(r,o)=>Zr(t,r,o,{callee:t.parseAsync}),t.safeParseAsync=async(r,o)=>rr(t,r,o),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),t.clone=(r,o)=>Ce(t,r,o),t.brand=()=>t,t.register=((r,o)=>(r.add(t,o),t))});var AS=v("ZodMiniObject",(t,e)=>{No.init(t,e),CS.init(t,e),E.defineLazy(t,"shape",()=>e.shape)});function Md(t,e){let r={type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},...E.normalizeParams(e)};return new AS(r)}Ee();qs();function jt(t){return!!t._zod}function Br(t){let e=Object.values(t);if(e.length===0)return Md({});let r=e.every(jt),o=e.every(n=>!jt(n));if(r)return Md(t);if(o)return al(t);throw new Error("Mixed Zod versions detected in object shape.")}function sr(t,e){return jt(t)?tr(t,e):t.safeParse(e)}async function _c(t,e){return jt(t)?await rr(t,e):await t.safeParseAsync(e)}function cr(t){if(!t)return;let e;if(jt(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Un(t){if(t){if(typeof t=="object"){let e=t,r=t;if(!e._def&&!r._zod){let o=Object.values(t);if(o.length>0&&o.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return Br(t)}}if(jt(t)){let r=t._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function US(t){return t.length===0?"object root":t.reduce((e,r,o)=>o===0?String(r):typeof r=="number"?`${e}[${r}]`:`${e}.${r}`,"")}function yc(t){if(t&&typeof t=="object"){if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0)return t.issues.map(e=>e.path?.length?`${e.message} at ${US(e.path)}`:e.message).join(` -`);if("message"in t&&typeof t.message=="string")return t.message;try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function bv(t){return t.description}function $v(t){if(jt(t))return t._zod?.def?.type==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():e._def?.typeName==="ZodOptional"}function Mn(t){if(jt(t)){let i=t._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let o=t.value;if(o!==void 0)return o}Ep();var zp="2025-11-25";var c_=[zp,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],ur="io.modelcontextprotocol/related-task",Dc="2.0",Ie=wp(t=>t!==null&&(typeof t=="object"||typeof t=="function")),u_=de([y(),ce().int()]),l_=y(),xA=Ae({ttl:ce().optional(),pollInterval:ce().optional()}),J0=R({ttl:ce().optional()}),G0=R({taskId:y()}),jp=Ae({progressToken:u_.optional(),[ur]:G0.optional()}),it=R({_meta:jp.optional()}),wi=it.extend({task:J0.optional()}),d_=t=>wi.safeParse(t).success,ze=R({method:y(),params:it.loose().optional()}),lt=R({_meta:jp.optional()}),dt=R({method:y(),params:lt.loose().optional()}),je=Ae({_meta:jp.optional()}),Vn=de([y(),ce().int()]),p_=R({jsonrpc:U(Dc),id:Vn,...ze.shape}).strict(),Pp=t=>p_.safeParse(t).success,m_=R({jsonrpc:U(Dc),...dt.shape}).strict(),f_=t=>m_.safeParse(t).success,Rp=R({jsonrpc:U(Dc),id:Vn,result:je}).strict(),Si=t=>Rp.safeParse(t).success;var D;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(D||(D={}));var Np=R({jsonrpc:U(Dc),id:Vn.optional(),error:R({code:ce().int(),message:y(),data:ve().optional()})}).strict();var h_=t=>Np.safeParse(t).success;var Op=de([p_,m_,Rp,Np]),kA=de([Rp,Np]),Ii=je.strict(),K0=lt.extend({requestId:Vn.optional(),reason:y().optional()}),Uc=dt.extend({method:U("notifications/cancelled"),params:K0}),X0=R({src:y(),mimeType:y().optional(),sizes:re(y()).optional(),theme:Fe(["light","dark"]).optional()}),Ei=R({icons:re(X0).optional()}),Fn=R({name:y(),title:y().optional()}),Ti=Fn.extend({...Fn.shape,...Ei.shape,version:y(),websiteUrl:y().optional(),description:y().optional()}),Y0=ki(R({applyDefaults:we().optional()}),pe(y(),ve())),Q0=Cc(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,ki(R({form:Y0.optional(),url:Ie.optional()}),pe(y(),ve()).optional())),eI=Ae({list:Ie.optional(),cancel:Ie.optional(),requests:Ae({sampling:Ae({createMessage:Ie.optional()}).optional(),elicitation:Ae({create:Ie.optional()}).optional()}).optional()}),tI=Ae({list:Ie.optional(),cancel:Ie.optional(),requests:Ae({tools:Ae({call:Ie.optional()}).optional()}).optional()}),rI=R({experimental:pe(y(),Ie).optional(),sampling:R({context:Ie.optional(),tools:Ie.optional()}).optional(),elicitation:Q0.optional(),roots:R({listChanged:we().optional()}).optional(),tasks:eI.optional(),extensions:pe(y(),Ie).optional()}),nI=it.extend({protocolVersion:y(),capabilities:rI,clientInfo:Ti}),Cp=ze.extend({method:U("initialize"),params:nI});var oI=R({experimental:pe(y(),Ie).optional(),logging:Ie.optional(),completions:Ie.optional(),prompts:R({listChanged:we().optional()}).optional(),resources:R({subscribe:we().optional(),listChanged:we().optional()}).optional(),tools:R({listChanged:we().optional()}).optional(),tasks:tI.optional(),extensions:pe(y(),Ie).optional()}),iI=je.extend({protocolVersion:y(),capabilities:oI,serverInfo:Ti,instructions:y().optional()}),Ap=dt.extend({method:U("notifications/initialized"),params:lt.optional()});var zi=ze.extend({method:U("ping"),params:it.optional()}),aI=R({progress:ce(),total:ge(ce()),message:ge(y())}),sI=R({...lt.shape,...aI.shape,progressToken:u_}),Mc=dt.extend({method:U("notifications/progress"),params:sI}),cI=it.extend({cursor:l_.optional()}),ji=ze.extend({params:cI.optional()}),Pi=je.extend({nextCursor:l_.optional()}),uI=Fe(["working","input_required","completed","failed","cancelled"]),Ri=R({taskId:y(),status:uI,ttl:de([ce(),zc()]),createdAt:y(),lastUpdatedAt:y(),pollInterval:ge(ce()),statusMessage:ge(y())}),Hn=je.extend({task:Ri}),lI=lt.merge(Ri),Ni=dt.extend({method:U("notifications/tasks/status"),params:lI}),Zc=ze.extend({method:U("tasks/get"),params:it.extend({taskId:y()})}),Lc=je.merge(Ri),qc=ze.extend({method:U("tasks/result"),params:it.extend({taskId:y()})}),wA=je.loose(),Fc=ji.extend({method:U("tasks/list")}),Vc=Pi.extend({tasks:re(Ri)}),Hc=ze.extend({method:U("tasks/cancel"),params:it.extend({taskId:y()})}),g_=je.merge(Ri),v_=R({uri:y(),mimeType:ge(y()),_meta:pe(y(),ve()).optional()}),__=v_.extend({text:y()}),Dp=y().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),y_=v_.extend({blob:Dp}),Oi=Fe(["user","assistant"]),Bn=R({audience:re(Oi).optional(),priority:ce().min(0).max(1).optional(),lastModified:Zn.datetime({offset:!0}).optional()}),b_=R({...Fn.shape,...Ei.shape,uri:y(),description:ge(y()),mimeType:ge(y()),size:ge(ce()),annotations:Bn.optional(),_meta:ge(Ae({}))}),dI=R({...Fn.shape,...Ei.shape,uriTemplate:y(),description:ge(y()),mimeType:ge(y()),annotations:Bn.optional(),_meta:ge(Ae({}))}),Bc=ji.extend({method:U("resources/list")}),$_=Pi.extend({resources:re(b_)}),Wc=ji.extend({method:U("resources/templates/list")}),pI=Pi.extend({resourceTemplates:re(dI)}),Up=it.extend({uri:y()}),mI=Up,Jc=ze.extend({method:U("resources/read"),params:mI}),x_=je.extend({contents:re(de([__,y_]))}),fI=dt.extend({method:U("notifications/resources/list_changed"),params:lt.optional()}),hI=Up,gI=ze.extend({method:U("resources/subscribe"),params:hI}),vI=Up,_I=ze.extend({method:U("resources/unsubscribe"),params:vI}),yI=lt.extend({uri:y()}),bI=dt.extend({method:U("notifications/resources/updated"),params:yI}),$I=R({name:y(),description:ge(y()),required:ge(we())}),xI=R({...Fn.shape,...Ei.shape,description:ge(y()),arguments:ge(re($I)),_meta:ge(Ae({}))}),Gc=ji.extend({method:U("prompts/list")}),kI=Pi.extend({prompts:re(xI)}),wI=it.extend({name:y(),arguments:pe(y(),y()).optional()}),Kc=ze.extend({method:U("prompts/get"),params:wI}),Mp=R({type:U("text"),text:y(),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),Zp=R({type:U("image"),data:Dp,mimeType:y(),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),Lp=R({type:U("audio"),data:Dp,mimeType:y(),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),SI=R({type:U("tool_use"),name:y(),id:y(),input:pe(y(),ve()),_meta:pe(y(),ve()).optional()}),qp=R({type:U("resource"),resource:de([__,y_]),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),Fp=b_.extend({type:U("resource_link")}),Wn=de([Mp,Zp,Lp,Fp,qp]),II=R({role:Oi,content:Wn}),EI=je.extend({description:y().optional(),messages:re(II)}),TI=dt.extend({method:U("notifications/prompts/list_changed"),params:lt.optional()}),zI=R({title:y().optional(),readOnlyHint:we().optional(),destructiveHint:we().optional(),idempotentHint:we().optional(),openWorldHint:we().optional()}),jI=R({taskSupport:Fe(["required","optional","forbidden"]).optional()}),Jn=R({...Fn.shape,...Ei.shape,description:y().optional(),inputSchema:R({type:U("object"),properties:pe(y(),Ie).optional(),required:re(y()).optional()}).catchall(ve()),outputSchema:R({type:U("object"),properties:pe(y(),Ie).optional(),required:re(y()).optional()}).catchall(ve()).optional(),annotations:zI.optional(),execution:jI.optional(),_meta:pe(y(),ve()).optional()}),Wr=ji.extend({method:U("tools/list")}),PI=Pi.extend({tools:re(Jn)}),Jr=je.extend({content:re(Wn).default([]),structuredContent:pe(y(),ve()).optional(),isError:we().optional()}),SA=Jr.or(je.extend({toolResult:ve()})),RI=wi.extend({name:y(),arguments:pe(y(),ve()).optional()}),Gr=ze.extend({method:U("tools/call"),params:RI}),NI=dt.extend({method:U("notifications/tools/list_changed"),params:lt.optional()}),IA=R({autoRefresh:we().default(!0),debounceMs:ce().int().nonnegative().default(300)}),Ci=Fe(["debug","info","notice","warning","error","critical","alert","emergency"]),OI=it.extend({level:Ci}),Vp=ze.extend({method:U("logging/setLevel"),params:OI}),CI=lt.extend({level:Ci,logger:y().optional(),data:ve()}),AI=dt.extend({method:U("notifications/message"),params:CI}),DI=R({name:y().optional()}),UI=R({hints:re(DI).optional(),costPriority:ce().min(0).max(1).optional(),speedPriority:ce().min(0).max(1).optional(),intelligencePriority:ce().min(0).max(1).optional()}),MI=R({mode:Fe(["auto","required","none"]).optional()}),ZI=R({type:U("tool_result"),toolUseId:y().describe("The unique identifier for the corresponding tool call."),content:re(Wn).default([]),structuredContent:R({}).loose().optional(),isError:we().optional(),_meta:pe(y(),ve()).optional()}),LI=Nc("type",[Mp,Zp,Lp]),Ac=Nc("type",[Mp,Zp,Lp,SI,ZI]),qI=R({role:Oi,content:de([Ac,re(Ac)]),_meta:pe(y(),ve()).optional()}),FI=wi.extend({messages:re(qI),modelPreferences:UI.optional(),systemPrompt:y().optional(),includeContext:Fe(["none","thisServer","allServers"]).optional(),temperature:ce().optional(),maxTokens:ce().int(),stopSequences:re(y()).optional(),metadata:Ie.optional(),tools:re(Jn).optional(),toolChoice:MI.optional()}),VI=ze.extend({method:U("sampling/createMessage"),params:FI}),Gn=je.extend({model:y(),stopReason:ge(Fe(["endTurn","stopSequence","maxTokens"]).or(y())),role:Oi,content:LI}),Xc=je.extend({model:y(),stopReason:ge(Fe(["endTurn","stopSequence","maxTokens","toolUse"]).or(y())),role:Oi,content:de([Ac,re(Ac)])}),HI=R({type:U("boolean"),title:y().optional(),description:y().optional(),default:we().optional()}),BI=R({type:U("string"),title:y().optional(),description:y().optional(),minLength:ce().optional(),maxLength:ce().optional(),format:Fe(["email","uri","date","date-time"]).optional(),default:y().optional()}),WI=R({type:Fe(["number","integer"]),title:y().optional(),description:y().optional(),minimum:ce().optional(),maximum:ce().optional(),default:ce().optional()}),JI=R({type:U("string"),title:y().optional(),description:y().optional(),enum:re(y()),default:y().optional()}),GI=R({type:U("string"),title:y().optional(),description:y().optional(),oneOf:re(R({const:y(),title:y()})),default:y().optional()}),KI=R({type:U("string"),title:y().optional(),description:y().optional(),enum:re(y()),enumNames:re(y()).optional(),default:y().optional()}),XI=de([JI,GI]),YI=R({type:U("array"),title:y().optional(),description:y().optional(),minItems:ce().optional(),maxItems:ce().optional(),items:R({type:U("string"),enum:re(y())}),default:re(y()).optional()}),QI=R({type:U("array"),title:y().optional(),description:y().optional(),minItems:ce().optional(),maxItems:ce().optional(),items:R({anyOf:re(R({const:y(),title:y()}))}),default:re(y()).optional()}),eE=de([YI,QI]),tE=de([KI,XI,eE]),rE=de([tE,HI,BI,WI]),nE=wi.extend({mode:U("form").optional(),message:y(),requestedSchema:R({type:U("object"),properties:pe(y(),rE),required:re(y()).optional()})}),oE=wi.extend({mode:U("url"),message:y(),elicitationId:y(),url:y().url()}),iE=de([nE,oE]),aE=ze.extend({method:U("elicitation/create"),params:iE}),sE=lt.extend({elicitationId:y()}),cE=dt.extend({method:U("notifications/elicitation/complete"),params:sE}),Kn=je.extend({action:Fe(["accept","decline","cancel"]),content:Cc(t=>t===null?void 0:t,pe(y(),de([y(),ce(),we(),re(y())])).optional())}),uE=R({type:U("ref/resource"),uri:y()});var lE=R({type:U("ref/prompt"),name:y()}),dE=it.extend({ref:de([lE,uE]),argument:R({name:y(),value:y()}),context:R({arguments:pe(y(),y()).optional()}).optional()}),Yc=ze.extend({method:U("completion/complete"),params:dE});function k_(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function w_(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var pE=je.extend({completion:Ae({values:re(y()).max(100),total:ge(ce().int()),hasMore:ge(we())})}),mE=R({uri:y().startsWith("file://"),name:y().optional(),_meta:pe(y(),ve()).optional()}),fE=ze.extend({method:U("roots/list"),params:it.optional()}),Hp=je.extend({roots:re(mE)}),hE=dt.extend({method:U("notifications/roots/list_changed"),params:lt.optional()}),EA=de([zi,Cp,Yc,Vp,Kc,Gc,Bc,Wc,Jc,gI,_I,Gr,Wr,Zc,qc,Fc,Hc]),TA=de([Uc,Mc,Ap,hE,Ni]),zA=de([Ii,Gn,Xc,Kn,Hp,Lc,Vc,Hn]),jA=de([zi,VI,aE,fE,Zc,qc,Fc,Hc]),PA=de([Uc,Mc,AI,bI,fI,NI,TI,Ni,cE]),RA=de([Ii,iI,pE,EI,kI,$_,pI,x_,Jr,PI,Lc,Vc,Hn]),N=class t extends Error{constructor(e,r,o){super(`MCP error ${e}: ${r}`),this.code=e,this.data=o,this.name="McpError"}static fromError(e,r,o){if(e===D.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new Tp(n.elicitations,r)}return new t(e,r,o)}},Tp=class extends N{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(D.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function lr(t){return t==="completed"||t==="failed"||t==="cancelled"}var I_=Symbol("Let zodToJsonSchema decide on which parser to use");var S_={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},E_=t=>typeof t=="string"?{...S_,name:t}:{...S_,...t};var T_=t=>{let e=E_(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...e.basePath,e.definitionPath,o],jsonSchema:void 0}]))}};function Bp(t,e,r,o){o?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function ne(t,e,r,o,n){t[e]=r,Bp(t,e,o,n)}var Qc=(t,e)=>{let r=0;for(;rF(t.innerType._def,e);function Wp(t,e,r){let o=r??e.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>Wp(t,e,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return gE(t,e)}}var gE=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let o of t.checks)switch(o.kind){case"min":ne(r,"minimum",o.value,o.message,e);break;case"max":ne(r,"maximum",o.value,o.message,e);break}return r};function N_(t,e){return{...F(t.innerType._def,e),default:t.defaultValue()}}function O_(t,e){return e.effectStrategy==="input"?F(t.schema._def,e):$e(e)}function C_(t){return{type:"string",enum:Array.from(t.values)}}var vE=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function A_(t,e){let r=[F(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),F(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),o=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(i=>{if(vE(i))n.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:s,...c}=i;a=c}else o=void 0;n.push(a)}}),n.length?{allOf:n,...o}:void 0}function D_(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var Jp,yt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Jp===void 0&&(Jp=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Jp),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((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})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function tu(t,e){let r={type:"string"};if(t.checks)for(let o of t.checks)switch(o.kind){case"min":ne(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,e);break;case"max":ne(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,e);break;case"email":switch(e.emailStrategy){case"format:email":bt(r,"email",o.message,e);break;case"format:idn-email":bt(r,"idn-email",o.message,e);break;case"pattern:zod":Ve(r,yt.email,o.message,e);break}break;case"url":bt(r,"uri",o.message,e);break;case"uuid":bt(r,"uuid",o.message,e);break;case"regex":Ve(r,o.regex,o.message,e);break;case"cuid":Ve(r,yt.cuid,o.message,e);break;case"cuid2":Ve(r,yt.cuid2,o.message,e);break;case"startsWith":Ve(r,RegExp(`^${Gp(o.value,e)}`),o.message,e);break;case"endsWith":Ve(r,RegExp(`${Gp(o.value,e)}$`),o.message,e);break;case"datetime":bt(r,"date-time",o.message,e);break;case"date":bt(r,"date",o.message,e);break;case"time":bt(r,"time",o.message,e);break;case"duration":bt(r,"duration",o.message,e);break;case"length":ne(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,e),ne(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,e);break;case"includes":{Ve(r,RegExp(Gp(o.value,e)),o.message,e);break}case"ip":{o.version!=="v6"&&bt(r,"ipv4",o.message,e),o.version!=="v4"&&bt(r,"ipv6",o.message,e);break}case"base64url":Ve(r,yt.base64url,o.message,e);break;case"jwt":Ve(r,yt.jwt,o.message,e);break;case"cidr":{o.version!=="v6"&&Ve(r,yt.ipv4Cidr,o.message,e),o.version!=="v4"&&Ve(r,yt.ipv6Cidr,o.message,e);break}case"emoji":Ve(r,yt.emoji(),o.message,e);break;case"ulid":{Ve(r,yt.ulid,o.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{bt(r,"binary",o.message,e);break}case"contentEncoding:base64":{ne(r,"contentEncoding","base64",o.message,e);break}case"pattern:zod":{Ve(r,yt.base64,o.message,e);break}}break}case"nanoid":Ve(r,yt.nanoid,o.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Gp(t,e){return e.patternStrategy==="escape"?yE(t):t}var _E=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function yE(t){let e="";for(let r=0;rn.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&o.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&o.errorMessages&&{errorMessage:{format:r}}})):ne(t,"format",e,r,o)}function Ve(t,e,r,o){t.pattern||t.allOf?.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&o.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:U_(e,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ne(t,"pattern",U_(e,o),r,o)}function U_(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},o=r.i?t.source.toLowerCase():t.source,n="",i=!1,a=!1,s=!1;for(let c=0;c{for(let u of s)(0,ma.checkReportMissingProp)(t,u)}):(r.if((0,If._)`${c} && (${(0,ma.checkMissingProp)(t,s,i)})`),(0,ma.reportMissingProp)(t,i),r.else())}}Nt.validatePropertyDeps=d$;function p$(t,e=t.schema){let{gen:r,data:o,keyword:n,it:i}=t,a=r.name("valid");for(let s in e)(0,uR.alwaysValidSchema)(i,e[s])||(r.if((0,ma.propertyInData)(r,o,s,i.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),t.ok(a))}Nt.validateSchemaDeps=p$;Nt.default=lR});var h$=j(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var f$=K(),pR=ie(),mR={message:"property name must be valid",params:({params:t})=>(0,f$._)`{propertyName: ${t.propertyName}}`},fR={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:mR,code(t){let{gen:e,schema:r,data:o,it:n}=t;if((0,pR.alwaysValidSchema)(n,r))return;let i=e.name("valid");e.forIn("key",o,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,f$.not)(i),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(i)}};Ef.default=fR});var zf=j(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var Pu=mt(),wt=K(),hR=Wt(),Ru=ie(),gR={message:"must NOT have additional properties",params:({params:t})=>(0,wt._)`{additionalProperty: ${t.additionalProperty}}`},vR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:gR,code(t){let{gen:e,schema:r,parentSchema:o,data:n,errsCount:i,it:a}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Ru.alwaysValidSchema)(a,r))return;let u=(0,Pu.allSchemaProperties)(o.properties),l=(0,Pu.allSchemaProperties)(o.patternProperties);d(),t.ok((0,wt._)`${i} === ${hR.default.errors}`);function d(){e.forIn("key",n,_=>{!u.length&&!l.length?m(_):e.if(g(_),()=>m(_))})}function g(_){let x;if(u.length>8){let $=(0,Ru.schemaRefOrVal)(a,o.properties,"properties");x=(0,Pu.isOwnProperty)(e,$,_)}else u.length?x=(0,wt.or)(...u.map($=>(0,wt._)`${_} === ${$}`)):x=wt.nil;return l.length&&(x=(0,wt.or)(x,...l.map($=>(0,wt._)`${(0,Pu.usePattern)(t,$)}.test(${_})`))),(0,wt.not)(x)}function h(_){e.code((0,wt._)`delete ${n}[${_}]`)}function m(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){h(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,Ru.alwaysValidSchema)(a,r)){let x=e.name("valid");c.removeAdditional==="failing"?(f(_,x,!1),e.if((0,wt.not)(x),()=>{t.reset(),h(_)})):(f(_,x),s||e.if((0,wt.not)(x),()=>e.break()))}}function f(_,x,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Ru.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,x)}}};Tf.default=vR});var _$=j(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var _R=Yi(),g$=mt(),jf=ie(),v$=zf(),yR={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:o,data:n,it:i}=t;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&v$.default.code(new _R.KeywordCxt(i,v$.default,"additionalProperties"));let a=(0,g$.allSchemaProperties)(r);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=jf.mergeEvaluated.props(e,(0,jf.toHash)(a),i.props));let s=a.filter(d=>!(0,jf.alwaysValidSchema)(i,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,g$.propertyInData)(e,n,d,i.opts.ownProperties)),l(d),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Pf.default=yR});var x$=j(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var y$=mt(),Nu=K(),b$=ie(),$$=ie(),bR={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:o,parentSchema:n,it:i}=t,{opts:a}=i,s=(0,y$.allSchemaProperties)(r),c=s.filter(f=>(0,b$.alwaysValidSchema)(i,r[f]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof Nu.Name)&&(i.props=(0,$$.evaluatedPropsToName)(e,i.props));let{props:d}=i;g();function g(){for(let f of s)u&&h(f),i.allErrors?m(f):(e.var(l,!0),m(f),e.if(l))}function h(f){for(let _ in u)new RegExp(f).test(_)&&(0,b$.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function m(f){e.forIn("key",o,_=>{e.if((0,Nu._)`${(0,y$.usePattern)(t,f)}.test(${_})`,()=>{let x=c.includes(f);x||t.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:$$.Type.Str},l),i.opts.unevaluated&&d!==!0?e.assign((0,Nu._)`${d}[${_}]`,!0):!x&&!i.allErrors&&e.if((0,Nu.not)(l),()=>e.break())})})}}};Rf.default=bR});var k$=j(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var $R=ie(),xR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:o}=t;if((0,$R.alwaysValidSchema)(o,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Nf.default=xR});var w$=j(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var kR=mt(),wR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kR.validateUnion,error:{message:"must match a schema in anyOf"}};Of.default=wR});var S$=j(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var Ou=K(),SR=ie(),IR={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ou._)`{passingSchemas: ${t.passing}}`},ER={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:IR,code(t){let{gen:e,schema:r,parentSchema:o,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(a,()=>t.reset(),()=>t.error(!0));function u(){i.forEach((l,d)=>{let g;(0,SR.alwaysValidSchema)(n,l)?e.var(c,!0):g=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Ou._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Ou._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),g&&t.mergeEvaluated(g,Ou.Name)})})}}};Cf.default=ER});var I$=j(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var TR=ie(),zR={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((i,a)=>{if((0,TR.alwaysValidSchema)(o,i))return;let s=t.subschema({keyword:"allOf",schemaProp:a},n);t.ok(n),t.mergeEvaluated(s)})}};Af.default=zR});var z$=j(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var Cu=K(),T$=ie(),jR={message:({params:t})=>(0,Cu.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Cu._)`{failingKeyword: ${t.ifClause}}`},PR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:jR,code(t){let{gen:e,parentSchema:r,it:o}=t;r.then===void 0&&r.else===void 0&&(0,T$.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=E$(o,"then"),i=E$(o,"else");if(!n&&!i)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),n&&i){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else n?e.if(s,u("then")):e.if((0,Cu.not)(s),u("else"));t.pass(a,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let g=t.subschema({keyword:l},s);e.assign(a,s),t.mergeValidEvaluated(g,a),d?e.assign(d,(0,Cu._)`${l}`):t.setParams({ifClause:l})}}}};function E$(t,e){let r=t.schema[e];return r!==void 0&&!(0,T$.alwaysValidSchema)(t,r)}Df.default=PR});var j$=j(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var RR=ie(),NR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,RR.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Uf.default=NR});var P$=j(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var OR=$f(),CR=s$(),AR=xf(),DR=u$(),UR=l$(),MR=m$(),ZR=h$(),LR=zf(),qR=_$(),FR=x$(),VR=k$(),HR=w$(),BR=S$(),WR=I$(),JR=z$(),GR=j$();function KR(t=!1){let e=[VR.default,HR.default,BR.default,WR.default,JR.default,GR.default,ZR.default,LR.default,MR.default,qR.default,FR.default];return t?e.push(CR.default,DR.default):e.push(OR.default,AR.default),e.push(UR.default),e}Mf.default=KR});var R$=j(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var ke=K(),XR={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},YR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:XR,code(t,e){let{gen:r,data:o,$data:n,schema:i,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;n?g():h();function g(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,ke._)`${m}[${a}]`),_=r.let("fType"),x=r.let("format");r.if((0,ke._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,ke._)`${f}.type || "string"`).assign(x,(0,ke._)`${f}.validate`),()=>r.assign(_,(0,ke._)`"string"`).assign(x,f)),t.fail$data((0,ke.or)($(),k()));function $(){return c.strictSchema===!1?ke.nil:(0,ke._)`${a} && !${x}`}function k(){let C=l.$async?(0,ke._)`(${f}.async ? await ${x}(${o}) : ${x}(${o}))`:(0,ke._)`${x}(${o})`,L=(0,ke._)`(typeof ${x} == "function" ? ${C} : ${x}.test(${o}))`;return(0,ke._)`${x} && ${x} !== true && ${_} === ${e} && !${L}`}}function h(){let m=d.formats[i];if(!m){$();return}if(m===!0)return;let[f,_,x]=k(m);f===e&&t.pass(C());function $(){if(c.strictSchema===!1){d.logger.warn(L());return}throw new Error(L());function L(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(L){let qe=L instanceof RegExp?(0,ke.regexpCode)(L):c.code.formats?(0,ke._)`${c.code.formats}${(0,ke.getProperty)(i)}`:void 0,at=r.scopeValue("formats",{key:i,ref:L,code:qe});return typeof L=="object"&&!(L instanceof RegExp)?[L.type||"string",L.validate,(0,ke._)`${at}.validate`]:["string",L,at]}function C(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${x}(${o})`}return typeof _=="function"?(0,ke._)`${x}(${o})`:(0,ke._)`${x}.test(${o})`}}}};Zf.default=YR});var N$=j(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var QR=R$(),eN=[QR.default];Lf.default=eN});var O$=j(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.contentVocabulary=co.metadataVocabulary=void 0;co.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];co.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var A$=j(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var tN=Fb(),rN=n$(),nN=P$(),oN=N$(),C$=O$(),iN=[tN.default,rN.default,(0,nN.default)(),oN.default,C$.metadataVocabulary,C$.contentVocabulary];qf.default=iN});var U$=j(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.DiscrError=void 0;var D$;(function(t){t.Tag="tag",t.Mapping="mapping"})(D$||(Au.DiscrError=D$={}))});var Z$=j(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});var uo=K(),Ff=U$(),M$=vu(),aN=Qi(),sN=ie(),cN={message:({params:{discrError:t,tagName:e}})=>t===Ff.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,uo._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},uN={keyword:"discriminator",type:"object",schemaType:"object",error:cN,code(t){let{gen:e,data:r,schema:o,parentSchema:n,it:i}=t,{oneOf:a}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,uo._)`${r}${(0,uo.getProperty)(s)}`);e.if((0,uo._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:Ff.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let h=g();e.if(!1);for(let m in h)e.elseIf((0,uo._)`${u} === ${m}`),e.assign(c,d(h[m]));e.else(),t.error(!1,{discrError:Ff.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(h){let m=e.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:h},m);return t.mergeEvaluated(f,uo.Name),m}function g(){var h;let m={},f=x(n),_=!0;for(let C=0;C{lN.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Bf=j((ye,Hf)=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.MissingRefError=ye.ValidationError=ye.CodeGen=ye.Name=ye.nil=ye.stringify=ye.str=ye._=ye.KeywordCxt=ye.Ajv=void 0;var dN=Db(),pN=A$(),mN=Z$(),q$=L$(),fN=["/properties"],Du="http://json-schema.org/draft-07/schema",lo=class extends dN.default{_addVocabularies(){super._addVocabularies(),pN.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(mN.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(q$,fN):q$;this.addMetaSchema(e,Du,!1),this.refs["http://json-schema.org/schema"]=Du}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Du)?Du:void 0)}};ye.Ajv=lo;Hf.exports=ye=lo;Hf.exports.Ajv=lo;Object.defineProperty(ye,"__esModule",{value:!0});ye.default=lo;var hN=Yi();Object.defineProperty(ye,"KeywordCxt",{enumerable:!0,get:function(){return hN.KeywordCxt}});var po=K();Object.defineProperty(ye,"_",{enumerable:!0,get:function(){return po._}});Object.defineProperty(ye,"str",{enumerable:!0,get:function(){return po.str}});Object.defineProperty(ye,"stringify",{enumerable:!0,get:function(){return po.stringify}});Object.defineProperty(ye,"nil",{enumerable:!0,get:function(){return po.nil}});Object.defineProperty(ye,"Name",{enumerable:!0,get:function(){return po.Name}});Object.defineProperty(ye,"CodeGen",{enumerable:!0,get:function(){return po.CodeGen}});var gN=hu();Object.defineProperty(ye,"ValidationError",{enumerable:!0,get:function(){return gN.default}});var vN=Qi();Object.defineProperty(ye,"MissingRefError",{enumerable:!0,get:function(){return vN.default}})});var K$=j(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.formatNames=Ct.fastFormats=Ct.fullFormats=void 0;function Ot(t,e){return{validate:t,compare:e}}Ct.fullFormats={date:Ot(B$,Kf),time:Ot(Jf(!0),Xf),"date-time":Ot(F$(!0),J$),"iso-time":Ot(Jf(),W$),"iso-date-time":Ot(F$(),G$),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kN,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?: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)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:jN,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:wN,int32:{type:"number",validate:EN},int64:{type:"number",validate:TN},float:{type:"number",validate:H$},double:{type:"number",validate:H$},password:!0,binary:!0};Ct.fastFormats={...Ct.fullFormats,date:Ot(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Kf),time:Ot(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xf),"date-time":Ot(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,J$),"iso-time":Ot(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,W$),"iso-date-time":Ot(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,G$),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Ct.formatNames=Object.keys(Ct.fullFormats);function _N(t){return t%4===0&&(t%100!==0||t%400===0)}var yN=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bN=[0,31,28,31,30,31,30,31,31,30,31,30,31];function B$(t){let e=yN.exec(t);if(!e)return!1;let r=+e[1],o=+e[2],n=+e[3];return o>=1&&o<=12&&n>=1&&n<=(o===2&&_N(r)?29:bN[o])}function Kf(t,e){if(t&&e)return t>e?1:t23||l>59||t&&!s)return!1;if(n<=23&&i<=59&&a<60)return!0;let d=i-l*c,g=n-u*c-(d<0?1:0);return(g===23||g===-1)&&(d===59||d===-1)&&a<61}}function Xf(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),o=new Date("2020-01-01T"+e).valueOf();if(r&&o)return r-o}function W$(t,e){if(!(t&&e))return;let r=Wf.exec(t),o=Wf.exec(e);if(r&&o)return t=r[1]+r[2]+r[3],e=o[1]+o[2]+o[3],t>e?1:t=SN}function TN(t){return Number.isInteger(t)}function H$(){return!0}var zN=/[^\\]\\Z/;function jN(t){if(zN.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var X$=j(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.formatLimitDefinition=void 0;var PN=Bf(),St=K(),_r=St.operators,Uu={formatMaximum:{okStr:"<=",ok:_r.LTE,fail:_r.GT},formatMinimum:{okStr:">=",ok:_r.GTE,fail:_r.LT},formatExclusiveMaximum:{okStr:"<",ok:_r.LT,fail:_r.GTE},formatExclusiveMinimum:{okStr:">",ok:_r.GT,fail:_r.LTE}},RN={message:({keyword:t,schemaCode:e})=>(0,St.str)`should be ${Uu[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,St._)`{comparison: ${Uu[t].okStr}, limit: ${e}}`};mo.formatLimitDefinition={keyword:Object.keys(Uu),type:"string",schemaType:"string",$data:!0,error:RN,code(t){let{gen:e,data:r,schemaCode:o,keyword:n,it:i}=t,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new PN.KeywordCxt(i,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let g=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),h=e.const("fmt",(0,St._)`${g}[${c.schemaCode}]`);t.fail$data((0,St.or)((0,St._)`typeof ${h} != "object"`,(0,St._)`${h} instanceof RegExp`,(0,St._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let g=c.schema,h=s.formats[g];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${n}": format "${g}" does not define "compare" function`);let m=e.scopeValue("formats",{key:g,ref:h,code:a.code.formats?(0,St._)`${a.code.formats}${(0,St.getProperty)(g)}`:void 0});t.fail$data(d(m))}function d(g){return(0,St._)`${g}.compare(${r}, ${o}) ${Uu[n].fail} 0`}},dependencies:["format"]};var NN=t=>(t.addKeyword(mo.formatLimitDefinition),t);mo.default=NN});var tx=j((fa,ex)=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});var fo=K$(),ON=X$(),Yf=K(),Y$=new Yf.Name("fullFormats"),CN=new Yf.Name("fastFormats"),Qf=(t,e={keywords:!0})=>{if(Array.isArray(e))return Q$(t,e,fo.fullFormats,Y$),t;let[r,o]=e.mode==="fast"?[fo.fastFormats,CN]:[fo.fullFormats,Y$],n=e.formats||fo.formatNames;return Q$(t,n,r,o),e.keywords&&(0,ON.default)(t),t};Qf.get=(t,e="full")=>{let o=(e==="fast"?fo.fastFormats:fo.fullFormats)[t];if(!o)throw new Error(`Unknown format "${t}"`);return o};function Q$(t,e,r,o){var n,i;(n=(i=t.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,Yf._)`require("ajv-formats/dist/formats").${o}`);for(let a of e)t.addFormat(a,r[a])}ex.exports=fa=Qf;Object.defineProperty(fa,"__esModule",{value:!0});fa.default=Qf});var Z={};Gt(Z,{BRAND:()=>mk,DIRTY:()=>$r,EMPTY_PATH:()=>Hx,INVALID:()=>q,NEVER:()=>Kk,OK:()=>Ce,ParseStatus:()=>Te,Schema:()=>G,ZodAny:()=>Yt,ZodArray:()=>Mt,ZodBigInt:()=>kr,ZodBoolean:()=>wr,ZodBranded:()=>yo,ZodCatch:()=>Cr,ZodDate:()=>Sr,ZodDefault:()=>Or,ZodDiscriminatedUnion:()=>Sa,ZodEffects:()=>ct,ZodEnum:()=>Rr,ZodError:()=>Je,ZodFirstPartyTypeKind:()=>S,ZodFunction:()=>Ea,ZodIntersection:()=>zr,ZodIssueCode:()=>w,ZodLazy:()=>jr,ZodLiteral:()=>Pr,ZodMap:()=>vn,ZodNaN:()=>yn,ZodNativeEnum:()=>Nr,ZodNever:()=>gt,ZodNull:()=>Er,ZodNullable:()=>Tt,ZodNumber:()=>xr,ZodObject:()=>Ke,ZodOptional:()=>Ge,ZodParsedType:()=>P,ZodPipeline:()=>bo,ZodPromise:()=>Qt,ZodReadonly:()=>Ar,ZodRecord:()=>Ia,ZodSchema:()=>G,ZodSet:()=>_n,ZodString:()=>Xt,ZodSymbol:()=>hn,ZodTransformer:()=>ct,ZodTuple:()=>Et,ZodType:()=>G,ZodUndefined:()=>Ir,ZodUnion:()=>Tr,ZodUnknown:()=>Ut,ZodVoid:()=>gn,addIssueToContext:()=>z,any:()=>xk,array:()=>Ik,bigint:()=>vk,boolean:()=>kh,coerce:()=>Gk,custom:()=>bh,date:()=>_k,datetimeRegex:()=>_h,defaultErrorMap:()=>At,discriminatedUnion:()=>zk,effect:()=>Lk,enum:()=>Uk,function:()=>Ck,getErrorMap:()=>pn,getParsedType:()=>It,instanceof:()=>hk,intersection:()=>jk,isAborted:()=>ka,isAsync:()=>mn,isDirty:()=>wa,isValid:()=>Kt,late:()=>fk,lazy:()=>Ak,literal:()=>Dk,makeIssue:()=>_o,map:()=>Nk,nan:()=>gk,nativeEnum:()=>Mk,never:()=>wk,null:()=>$k,nullable:()=>Fk,number:()=>xh,object:()=>al,objectUtil:()=>nl,oboolean:()=>Jk,onumber:()=>Wk,optional:()=>qk,ostring:()=>Bk,pipeline:()=>Hk,preprocess:()=>Vk,promise:()=>Zk,quotelessJson:()=>qx,record:()=>Rk,set:()=>Ok,setErrorMap:()=>Vx,strictObject:()=>Ek,string:()=>$h,symbol:()=>yk,transformer:()=>Lk,tuple:()=>Pk,undefined:()=>bk,union:()=>Tk,unknown:()=>kk,util:()=>te,void:()=>Sk});var te;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let i={};for(let a of n)i[a]=a;return i},t.getValidEnumValues=n=>{let i=t.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),a={};for(let s of i)a[s]=n[s];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(i){return n[i]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},t.find=(n,i)=>{for(let a of n)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=o,t.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(te||(te={}));var nl;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(nl||(nl={}));var P=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),It=t=>{switch(typeof t){case"undefined":return P.undefined;case"string":return P.string;case"number":return Number.isNaN(t)?P.nan:P.number;case"boolean":return P.boolean;case"function":return P.function;case"bigint":return P.bigint;case"symbol":return P.symbol;case"object":return Array.isArray(t)?P.array:t===null?P.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?P.promise:typeof Map<"u"&&t instanceof Map?P.map:typeof Set<"u"&&t instanceof Set?P.set:typeof Date<"u"&&t instanceof Date?P.date:P.object;default:return P.unknown}};var w=te.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"]),qx=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Je=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)o._errors.push(r(a));else{let s=o,c=0;for(;cr.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(e(n))}else o.push(e(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Je.create=t=>new Je(t);var Fx=(t,e)=>{let r;switch(t.code){case w.invalid_type:t.received===P.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,te.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${te.joinValues(t.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${te.joinValues(t.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${te.joinValues(t.options)}, received '${t.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:te.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case w.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case w.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=e.defaultError,te.assertNever(t)}return{message:r}},At=Fx;var mh=At;function Vx(t){mh=t}function pn(){return mh}var _o=t=>{let{data:e,path:r,errorMaps:o,issueData:n}=t,i=[...r,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let s="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:e,defaultError:s}).message;return{...n,path:i,message:s}},Hx=[];function z(t,e){let r=pn(),o=_o({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===At?void 0:At].filter(n=>!!n)});t.common.issues.push(o)}var Te=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let o=[];for(let n of r){if(n.status==="aborted")return q;n.status==="dirty"&&e.dirty(),o.push(n.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){let o=[];for(let n of r){let i=await n.key,a=await n.value;o.push({key:i,value:a})}return t.mergeObjectSync(e,o)}static mergeObjectSync(e,r){let o={};for(let n of r){let{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return q;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(o[i.value]=a.value)}return{status:e.value,value:o}}},q=Object.freeze({status:"aborted"}),$r=t=>({status:"dirty",value:t}),Ce=t=>({status:"valid",value:t}),ka=t=>t.status==="aborted",wa=t=>t.status==="dirty",Kt=t=>t.status==="valid",mn=t=>typeof Promise<"u"&&t instanceof Promise;var A;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(A||(A={}));var st=class{constructor(e,r,o,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},fh=(t,e)=>{if(Kt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Je(t.common.issues);return this._error=r,this._error}}};function W(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:o,description:n}=t;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,s)=>{let{message:c}=t;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:n}}var G=class{get description(){return this._def.description}_getType(e){return It(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:It(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Te,ctx:{common:e.parent.common,data:e.data,parsedType:It(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(mn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:It(e)},n=this._parseSync({data:e,path:o.path,parent:o});return fh(o,n)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:It(e)};if(!this["~standard"].async)try{let o=this._parseSync({data:e,path:[],parent:r});return Kt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(o=>Kt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(e,r){let o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:It(e)},n=this._parse({data:e,path:o.path,parent:o}),i=await(mn(n)?n:Promise.resolve(n));return fh(o,i)}refine(e,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let a=e(n),s=()=>i.addIssue({code:w.custom,...o(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((o,n)=>e(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(e){return new ct({schema:this,typeName:S.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ge.create(this,this._def)}nullable(){return Tt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mt.create(this)}promise(){return Qt.create(this,this._def)}or(e){return Tr.create([this,e],this._def)}and(e){return zr.create(this,e,this._def)}transform(e){return new ct({...W(this._def),schema:this,typeName:S.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Or({...W(this._def),innerType:this,defaultValue:r,typeName:S.ZodDefault})}brand(){return new yo({typeName:S.ZodBranded,type:this,...W(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Cr({...W(this._def),innerType:this,catchValue:r,typeName:S.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return bo.create(this,e)}readonly(){return Ar.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Bx=/^c[^\s-]{8,}$/i,Wx=/^[0-9a-z]+$/,Jx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Gx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Kx=/^[a-z0-9_-]{21}$/i,Xx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ek="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ol,tk=/^(?:(?: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])$/,rk=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,nk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ok=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ik=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ak=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gh="((\\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])))",sk=new RegExp(`^${gh}$`);function vh(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function ck(t){return new RegExp(`^${vh(t)}$`)}function _h(t){let e=`${gh}T${vh(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function uk(t,e){return!!((e==="v4"||!e)&&tk.test(t)||(e==="v6"||!e)&&nk.test(t))}function lk(t,e){if(!Xx.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function dk(t,e){return!!((e==="v4"||!e)&&rk.test(t)||(e==="v6"||!e)&&ok.test(t))}var Xt=class t extends G{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_type,expected:P.string,received:i.parsedType}),q}let o=new Te,n;for(let i of this._def.checks)if(i.kind==="min")e.data.lengthi.value&&(n=this._getOrReturnCtx(e,n),z(n,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,s=e.data.lengthe.test(n),{validation:r,code:w.invalid_string,...A.errToObj(o)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...A.errToObj(e)})}url(e){return this._addCheck({kind:"url",...A.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...A.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...A.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...A.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...A.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...A.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...A.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...A.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...A.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...A.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...A.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...A.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...A.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...A.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...A.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...A.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...A.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...A.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...A.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...A.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...A.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...A.errToObj(r)})}nonempty(e){return this.min(1,A.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew Xt({checks:[],typeName:S.ZodString,coerce:t?.coerce??!1,...W(t)});function pk(t,e){let r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return i%a/10**n}var xr=class t extends G{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_type,expected:P.number,received:i.parsedType}),q}let o,n=new Te;for(let i of this._def.checks)i.kind==="int"?te.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),z(o,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.datai.value:e.data>=i.value)&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?pk(e.data,i.value)!==0&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),z(o,{code:w.not_finite,message:i.message}),n.dirty()):te.assertNever(i);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,A.toString(r))}gt(e,r){return this.setLimit("min",e,!1,A.toString(r))}lte(e,r){return this.setLimit("max",e,!0,A.toString(r))}lt(e,r){return this.setLimit("max",e,!1,A.toString(r))}setLimit(e,r,o,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:A.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:A.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:A.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuee.kind==="int"||e.kind==="multipleOf"&&te.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.valuenew xr({checks:[],typeName:S.ZodNumber,coerce:t?.coerce||!1,...W(t)});var kr=class t extends G{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P.bigint)return this._getInvalidInput(e);let o,n=new Te;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.datai.value:e.data>=i.value)&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),z(o,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):te.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return z(r,{code:w.invalid_type,expected:P.bigint,received:r.parsedType}),q}gte(e,r){return this.setLimit("min",e,!0,A.toString(r))}gt(e,r){return this.setLimit("min",e,!1,A.toString(r))}lte(e,r){return this.setLimit("max",e,!0,A.toString(r))}lt(e,r){return this.setLimit("max",e,!1,A.toString(r))}setLimit(e,r,o,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:A.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:A.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew kr({checks:[],typeName:S.ZodBigInt,coerce:t?.coerce??!1,...W(t)});var wr=class extends G{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.boolean,received:o.parsedType}),q}return Ce(e.data)}};wr.create=t=>new wr({typeName:S.ZodBoolean,coerce:t?.coerce||!1,...W(t)});var Sr=class t extends G{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_type,expected:P.date,received:i.parsedType}),q}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return z(i,{code:w.invalid_date}),q}let o=new Te,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()i.value&&(n=this._getOrReturnCtx(e,n),z(n,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):te.assertNever(i);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:A.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:A.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew Sr({checks:[],coerce:t?.coerce||!1,typeName:S.ZodDate,...W(t)});var hn=class extends G{_parse(e){if(this._getType(e)!==P.symbol){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.symbol,received:o.parsedType}),q}return Ce(e.data)}};hn.create=t=>new hn({typeName:S.ZodSymbol,...W(t)});var Ir=class extends G{_parse(e){if(this._getType(e)!==P.undefined){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.undefined,received:o.parsedType}),q}return Ce(e.data)}};Ir.create=t=>new Ir({typeName:S.ZodUndefined,...W(t)});var Er=class extends G{_parse(e){if(this._getType(e)!==P.null){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.null,received:o.parsedType}),q}return Ce(e.data)}};Er.create=t=>new Er({typeName:S.ZodNull,...W(t)});var Yt=class extends G{constructor(){super(...arguments),this._any=!0}_parse(e){return Ce(e.data)}};Yt.create=t=>new Yt({typeName:S.ZodAny,...W(t)});var Ut=class extends G{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ce(e.data)}};Ut.create=t=>new Ut({typeName:S.ZodUnknown,...W(t)});var gt=class extends G{_parse(e){let r=this._getOrReturnCtx(e);return z(r,{code:w.invalid_type,expected:P.never,received:r.parsedType}),q}};gt.create=t=>new gt({typeName:S.ZodNever,...W(t)});var gn=class extends G{_parse(e){if(this._getType(e)!==P.undefined){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.void,received:o.parsedType}),q}return Ce(e.data)}};gn.create=t=>new gn({typeName:S.ZodVoid,...W(t)});var Mt=class t extends G{_parse(e){let{ctx:r,status:o}=this._processInputParams(e),n=this._def;if(r.parsedType!==P.array)return z(r,{code:w.invalid_type,expected:P.array,received:r.parsedType}),q;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,s=r.data.lengthn.maxLength.value&&(z(r,{code:w.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>n.type._parseAsync(new st(r,a,r.path,s)))).then(a=>Te.mergeArray(o,a));let i=[...r.data].map((a,s)=>n.type._parseSync(new st(r,a,r.path,s)));return Te.mergeArray(o,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:A.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:A.toString(r)}})}nonempty(e){return this.min(1,e)}};Mt.create=(t,e)=>new Mt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:S.ZodArray,...W(e)});function fn(t){if(t instanceof Ke){let e={};for(let r in t.shape){let o=t.shape[r];e[r]=Ge.create(fn(o))}return new Ke({...t._def,shape:()=>e})}else return t instanceof Mt?new Mt({...t._def,type:fn(t.element)}):t instanceof Ge?Ge.create(fn(t.unwrap())):t instanceof Tt?Tt.create(fn(t.unwrap())):t instanceof Et?Et.create(t.items.map(e=>fn(e))):t}var Ke=class t extends G{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=te.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==P.object){let u=this._getOrReturnCtx(e);return z(u,{code:w.invalid_type,expected:P.object,received:u.parsedType}),q}let{status:o,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gt&&this._def.unknownKeys==="strip"))for(let u in n.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new st(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof gt){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")s.length>0&&(z(n,{code:w.unrecognized_keys,keys:s}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new st(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,g=await l.value;u.push({key:d,value:g,alwaysSet:l.alwaysSet})}return u}).then(u=>Te.mergeObjectSync(o,u)):Te.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(e){return A.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:S.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let o of te.objectKeys(e))e[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let o of te.objectKeys(this.shape))e[o]||(r[o]=this.shape[o]);return new t({...this._def,shape:()=>r})}deepPartial(){return fn(this)}partial(e){let r={};for(let o of te.objectKeys(this.shape)){let n=this.shape[o];e&&!e[o]?r[o]=n:r[o]=n.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let o of te.objectKeys(this.shape))if(e&&!e[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Ge;)i=i._def.innerType;r[o]=i}return new t({...this._def,shape:()=>r})}keyof(){return yh(te.objectKeys(this.shape))}};Ke.create=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strip",catchall:gt.create(),typeName:S.ZodObject,...W(e)});Ke.strictCreate=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strict",catchall:gt.create(),typeName:S.ZodObject,...W(e)});Ke.lazycreate=(t,e)=>new Ke({shape:t,unknownKeys:"strip",catchall:gt.create(),typeName:S.ZodObject,...W(e)});var Tr=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o=this._def.options;function n(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new Je(s.ctx.common.issues));return z(r,{code:w.invalid_union,unionErrors:a}),q}if(r.common.async)return Promise.all(o.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let i,a=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new Je(c));return z(r,{code:w.invalid_union,unionErrors:s}),q}}get options(){return this._def.options}};Tr.create=(t,e)=>new Tr({options:t,typeName:S.ZodUnion,...W(e)});var Dt=t=>t instanceof jr?Dt(t.schema):t instanceof ct?Dt(t.innerType()):t instanceof Pr?[t.value]:t instanceof Rr?t.options:t instanceof Nr?te.objectValues(t.enum):t instanceof Or?Dt(t._def.innerType):t instanceof Ir?[void 0]:t instanceof Er?[null]:t instanceof Ge?[void 0,...Dt(t.unwrap())]:t instanceof Tt?[null,...Dt(t.unwrap())]:t instanceof yo||t instanceof Ar?Dt(t.unwrap()):t instanceof Cr?Dt(t._def.innerType):[],Sa=class t extends G{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.object)return z(r,{code:w.invalid_type,expected:P.object,received:r.parsedType}),q;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(z(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){let n=new Map;for(let i of r){let a=Dt(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(n.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,i)}}return new t({typeName:S.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...W(o)})}};function il(t,e){let r=It(t),o=It(e);if(t===e)return{valid:!0,data:t};if(r===P.object&&o===P.object){let n=te.objectKeys(e),i=te.objectKeys(t).filter(s=>n.indexOf(s)!==-1),a={...t,...e};for(let s of i){let c=il(t[s],e[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===P.array&&o===P.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let i=0;i{if(ka(i)||ka(a))return q;let s=il(i.value,a.value);return s.valid?((wa(i)||wa(a))&&r.dirty(),{status:r.value,value:s.data}):(z(o,{code:w.invalid_intersection_types}),q)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>n(i,a)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};zr.create=(t,e,r)=>new zr({left:t,right:e,typeName:S.ZodIntersection,...W(r)});var Et=class t extends G{_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.array)return z(o,{code:w.invalid_type,expected:P.array,received:o.parsedType}),q;if(o.data.lengththis._def.items.length&&(z(o,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new st(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>Te.mergeArray(r,a)):Te.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Et.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Et({items:t,typeName:S.ZodTuple,rest:null,...W(e)})};var Ia=class t extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.object)return z(o,{code:w.invalid_type,expected:P.object,received:o.parsedType}),q;let n=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)n.push({key:i._parse(new st(o,s,o.path,s)),value:a._parse(new st(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?Te.mergeObjectAsync(r,n):Te.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof G?new t({keyType:e,valueType:r,typeName:S.ZodRecord,...W(o)}):new t({keyType:Xt.create(),valueType:e,typeName:S.ZodRecord,...W(r)})}},vn=class extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.map)return z(o,{code:w.invalid_type,expected:P.map,received:o.parsedType}),q;let n=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],u)=>({key:n._parse(new st(o,s,o.path,[u,"key"])),value:i._parse(new st(o,c,o.path,[u,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return q;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return q;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};vn.create=(t,e,r)=>new vn({valueType:e,keyType:t,typeName:S.ZodMap,...W(r)});var _n=class t extends G{_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==P.set)return z(o,{code:w.invalid_type,expected:P.set,received:o.parsedType}),q;let n=this._def;n.minSize!==null&&o.data.sizen.maxSize.value&&(z(o,{code:w.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return q;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...o.data.values()].map((c,u)=>i._parse(new st(o,c,o.path,u)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:A.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:A.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};_n.create=(t,e)=>new _n({valueType:t,minSize:null,maxSize:null,typeName:S.ZodSet,...W(e)});var Ea=class t extends G{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.function)return z(r,{code:w.invalid_type,expected:P.function,received:r.parsedType}),q;function o(s,c){return _o({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pn(),At].filter(u=>!!u),issueData:{code:w.invalid_arguments,argumentsError:c}})}function n(s,c){return _o({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pn(),At].filter(u=>!!u),issueData:{code:w.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Qt){let s=this;return Ce(async function(...c){let u=new Je([]),l=await s._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else{let s=this;return Ce(function(...c){let u=s._def.args.safeParse(c,i);if(!u.success)throw new Je([o(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,i);if(!d.success)throw new Je([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Et.create(e).rest(Ut.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new t({args:e||Et.create([]).rest(Ut.create()),returns:r||Ut.create(),typeName:S.ZodFunction,...W(o)})}},jr=class extends G{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};jr.create=(t,e)=>new jr({getter:t,typeName:S.ZodLazy,...W(e)});var Pr=class extends G{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return z(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:e.data}}get value(){return this._def.value}};Pr.create=(t,e)=>new Pr({value:t,typeName:S.ZodLiteral,...W(e)});function yh(t,e){return new Rr({values:t,typeName:S.ZodEnum,...W(e)})}var Rr=class t extends G{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),o=this._def.values;return z(r,{expected:te.joinValues(o),received:r.parsedType,code:w.invalid_type}),q}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),o=this._def.values;return z(r,{received:r.data,code:w.invalid_enum_value,options:o}),q}return Ce(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}};Rr.create=yh;var Nr=class extends G{_parse(e){let r=te.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==P.string&&o.parsedType!==P.number){let n=te.objectValues(r);return z(o,{expected:te.joinValues(n),received:o.parsedType,code:w.invalid_type}),q}if(this._cache||(this._cache=new Set(te.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=te.objectValues(r);return z(o,{received:o.data,code:w.invalid_enum_value,options:n}),q}return Ce(e.data)}get enum(){return this._def.values}};Nr.create=(t,e)=>new Nr({values:t,typeName:S.ZodNativeEnum,...W(e)});var Qt=class extends G{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.promise&&r.common.async===!1)return z(r,{code:w.invalid_type,expected:P.promise,received:r.parsedType}),q;let o=r.parsedType===P.promise?r.data:Promise.resolve(r.data);return Ce(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Qt.create=(t,e)=>new Qt({type:t,typeName:S.ZodPromise,...W(e)});var ct=class extends G{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===S.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:o}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:a=>{z(o,a),a.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let a=n.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return q;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?q:c.status==="dirty"?$r(c.value):r.value==="dirty"?$r(c.value):c});{if(r.value==="aborted")return q;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?q:s.status==="dirty"?$r(s.value):r.value==="dirty"?$r(s.value):s}}if(n.type==="refinement"){let a=s=>{let c=n.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(n.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Kt(a))return q;let s=n.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>Kt(a)?Promise.resolve(n.transform(a.value,i)).then(s=>({status:r.value,value:s})):q);te.assertNever(n)}};ct.create=(t,e,r)=>new ct({schema:t,typeName:S.ZodEffects,effect:e,...W(r)});ct.createWithPreprocess=(t,e,r)=>new ct({schema:e,effect:{type:"preprocess",transform:t},typeName:S.ZodEffects,...W(r)});var Ge=class extends G{_parse(e){return this._getType(e)===P.undefined?Ce(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ge.create=(t,e)=>new Ge({innerType:t,typeName:S.ZodOptional,...W(e)});var Tt=class extends G{_parse(e){return this._getType(e)===P.null?Ce(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Tt.create=(t,e)=>new Tt({innerType:t,typeName:S.ZodNullable,...W(e)});var Or=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o=r.data;return r.parsedType===P.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Or.create=(t,e)=>new Or({innerType:t,typeName:S.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...W(e)});var Cr=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return mn(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Je(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Je(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};Cr.create=(t,e)=>new Cr({innerType:t,typeName:S.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...W(e)});var yn=class extends G{_parse(e){if(this._getType(e)!==P.nan){let o=this._getOrReturnCtx(e);return z(o,{code:w.invalid_type,expected:P.nan,received:o.parsedType}),q}return{status:"valid",value:e.data}}};yn.create=t=>new yn({typeName:S.ZodNaN,...W(t)});var mk=Symbol("zod_brand"),yo=class extends G{_parse(e){let{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},bo=class t extends G{_parse(e){let{status:r,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?q:i.status==="dirty"?(r.dirty(),$r(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?q:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(e,r){return new t({in:e,out:r,typeName:S.ZodPipeline})}},Ar=class extends G{_parse(e){let r=this._def.innerType._parse(e),o=n=>(Kt(n)&&(n.value=Object.freeze(n.value)),n);return mn(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};Ar.create=(t,e)=>new Ar({innerType:t,typeName:S.ZodReadonly,...W(e)});function hh(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function bh(t,e={},r){return t?Yt.create().superRefine((o,n)=>{let i=t(o);if(i instanceof Promise)return i.then(a=>{if(!a){let s=hh(e,o),c=s.fatal??r??!0;n.addIssue({code:"custom",...s,fatal:c})}});if(!i){let a=hh(e,o),s=a.fatal??r??!0;n.addIssue({code:"custom",...a,fatal:s})}}):Yt.create()}var fk={object:Ke.lazycreate},S;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(S||(S={}));var hk=(t,e={message:`Input not instance of ${t.name}`})=>bh(r=>r instanceof t,e),$h=Xt.create,xh=xr.create,gk=yn.create,vk=kr.create,kh=wr.create,_k=Sr.create,yk=hn.create,bk=Ir.create,$k=Er.create,xk=Yt.create,kk=Ut.create,wk=gt.create,Sk=gn.create,Ik=Mt.create,al=Ke.create,Ek=Ke.strictCreate,Tk=Tr.create,zk=Sa.create,jk=zr.create,Pk=Et.create,Rk=Ia.create,Nk=vn.create,Ok=_n.create,Ck=Ea.create,Ak=jr.create,Dk=Pr.create,Uk=Rr.create,Mk=Nr.create,Zk=Qt.create,Lk=ct.create,qk=Ge.create,Fk=Tt.create,Vk=ct.createWithPreprocess,Hk=bo.create,Bk=()=>$h().optional(),Wk=()=>xh().optional(),Jk=()=>kh().optional(),Gk={string:(t=>Xt.create({...t,coerce:!0})),number:(t=>xr.create({...t,coerce:!0})),boolean:(t=>wr.create({...t,coerce:!0})),bigint:(t=>kr.create({...t,coerce:!0})),date:(t=>Sr.create({...t,coerce:!0}))};var Kk=q;Ee();Ee();Ee();Ee();var CS=v("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(t,e),t.def=e,t.parse=(r,o)=>Mr(t,r,o,{callee:t.parse}),t.safeParse=(r,o)=>tr(t,r,o),t.parseAsync=async(r,o)=>Zr(t,r,o,{callee:t.parseAsync}),t.safeParseAsync=async(r,o)=>rr(t,r,o),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),t.clone=(r,o)=>Ae(t,r,o),t.brand=()=>t,t.register=((r,o)=>(r.add(t,o),t))});var AS=v("ZodMiniObject",(t,e)=>{No.init(t,e),CS.init(t,e),E.defineLazy(t,"shape",()=>e.shape)});function Md(t,e){let r={type:"object",get shape(){return E.assignProp(this,"shape",{...t}),this.shape},...E.normalizeParams(e)};return new AS(r)}Ee();qs();function jt(t){return!!t._zod}function Br(t){let e=Object.values(t);if(e.length===0)return Md({});let r=e.every(jt),o=e.every(n=>!jt(n));if(r)return Md(t);if(o)return al(t);throw new Error("Mixed Zod versions detected in object shape.")}function sr(t,e){return jt(t)?tr(t,e):t.safeParse(e)}async function _c(t,e){return jt(t)?await rr(t,e):await t.safeParseAsync(e)}function cr(t){if(!t)return;let e;if(jt(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Un(t){if(t){if(typeof t=="object"){let e=t,r=t;if(!e._def&&!r._zod){let o=Object.values(t);if(o.length>0&&o.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return Br(t)}}if(jt(t)){let r=t._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function US(t){return t.length===0?"object root":t.reduce((e,r,o)=>o===0?String(r):typeof r=="number"?`${e}[${r}]`:`${e}.${r}`,"")}function yc(t){if(t&&typeof t=="object"){if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0)return t.issues.map(e=>e.path?.length?`${e.message} at ${US(e.path)}`:e.message).join(` +`);if("message"in t&&typeof t.message=="string")return t.message;try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function bv(t){return t.description}function $v(t){if(jt(t))return t._zod?.def?.type==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():e._def?.typeName==="ZodOptional"}function Mn(t){if(jt(t)){let i=t._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let o=t.value;if(o!==void 0)return o}Ep();var zp="2025-11-25";var c_=[zp,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],ur="io.modelcontextprotocol/related-task",Dc="2.0",Ie=wp(t=>t!==null&&(typeof t=="object"||typeof t=="function")),u_=de([y(),ce().int()]),l_=y(),xA=De({ttl:ce().optional(),pollInterval:ce().optional()}),J0=R({ttl:ce().optional()}),G0=R({taskId:y()}),jp=De({progressToken:u_.optional(),[ur]:G0.optional()}),it=R({_meta:jp.optional()}),wi=it.extend({task:J0.optional()}),d_=t=>wi.safeParse(t).success,ze=R({method:y(),params:it.loose().optional()}),lt=R({_meta:jp.optional()}),dt=R({method:y(),params:lt.loose().optional()}),je=De({_meta:jp.optional()}),Vn=de([y(),ce().int()]),p_=R({jsonrpc:U(Dc),id:Vn,...ze.shape}).strict(),Pp=t=>p_.safeParse(t).success,m_=R({jsonrpc:U(Dc),...dt.shape}).strict(),f_=t=>m_.safeParse(t).success,Rp=R({jsonrpc:U(Dc),id:Vn,result:je}).strict(),Si=t=>Rp.safeParse(t).success;var D;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(D||(D={}));var Np=R({jsonrpc:U(Dc),id:Vn.optional(),error:R({code:ce().int(),message:y(),data:ve().optional()})}).strict();var h_=t=>Np.safeParse(t).success;var Op=de([p_,m_,Rp,Np]),kA=de([Rp,Np]),Ii=je.strict(),K0=lt.extend({requestId:Vn.optional(),reason:y().optional()}),Uc=dt.extend({method:U("notifications/cancelled"),params:K0}),X0=R({src:y(),mimeType:y().optional(),sizes:re(y()).optional(),theme:Fe(["light","dark"]).optional()}),Ei=R({icons:re(X0).optional()}),Fn=R({name:y(),title:y().optional()}),Ti=Fn.extend({...Fn.shape,...Ei.shape,version:y(),websiteUrl:y().optional(),description:y().optional()}),Y0=ki(R({applyDefaults:we().optional()}),pe(y(),ve())),Q0=Cc(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,ki(R({form:Y0.optional(),url:Ie.optional()}),pe(y(),ve()).optional())),eI=De({list:Ie.optional(),cancel:Ie.optional(),requests:De({sampling:De({createMessage:Ie.optional()}).optional(),elicitation:De({create:Ie.optional()}).optional()}).optional()}),tI=De({list:Ie.optional(),cancel:Ie.optional(),requests:De({tools:De({call:Ie.optional()}).optional()}).optional()}),rI=R({experimental:pe(y(),Ie).optional(),sampling:R({context:Ie.optional(),tools:Ie.optional()}).optional(),elicitation:Q0.optional(),roots:R({listChanged:we().optional()}).optional(),tasks:eI.optional(),extensions:pe(y(),Ie).optional()}),nI=it.extend({protocolVersion:y(),capabilities:rI,clientInfo:Ti}),Cp=ze.extend({method:U("initialize"),params:nI});var oI=R({experimental:pe(y(),Ie).optional(),logging:Ie.optional(),completions:Ie.optional(),prompts:R({listChanged:we().optional()}).optional(),resources:R({subscribe:we().optional(),listChanged:we().optional()}).optional(),tools:R({listChanged:we().optional()}).optional(),tasks:tI.optional(),extensions:pe(y(),Ie).optional()}),iI=je.extend({protocolVersion:y(),capabilities:oI,serverInfo:Ti,instructions:y().optional()}),Ap=dt.extend({method:U("notifications/initialized"),params:lt.optional()});var zi=ze.extend({method:U("ping"),params:it.optional()}),aI=R({progress:ce(),total:ge(ce()),message:ge(y())}),sI=R({...lt.shape,...aI.shape,progressToken:u_}),Mc=dt.extend({method:U("notifications/progress"),params:sI}),cI=it.extend({cursor:l_.optional()}),ji=ze.extend({params:cI.optional()}),Pi=je.extend({nextCursor:l_.optional()}),uI=Fe(["working","input_required","completed","failed","cancelled"]),Ri=R({taskId:y(),status:uI,ttl:de([ce(),zc()]),createdAt:y(),lastUpdatedAt:y(),pollInterval:ge(ce()),statusMessage:ge(y())}),Hn=je.extend({task:Ri}),lI=lt.merge(Ri),Ni=dt.extend({method:U("notifications/tasks/status"),params:lI}),Zc=ze.extend({method:U("tasks/get"),params:it.extend({taskId:y()})}),Lc=je.merge(Ri),qc=ze.extend({method:U("tasks/result"),params:it.extend({taskId:y()})}),wA=je.loose(),Fc=ji.extend({method:U("tasks/list")}),Vc=Pi.extend({tasks:re(Ri)}),Hc=ze.extend({method:U("tasks/cancel"),params:it.extend({taskId:y()})}),g_=je.merge(Ri),v_=R({uri:y(),mimeType:ge(y()),_meta:pe(y(),ve()).optional()}),__=v_.extend({text:y()}),Dp=y().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),y_=v_.extend({blob:Dp}),Oi=Fe(["user","assistant"]),Bn=R({audience:re(Oi).optional(),priority:ce().min(0).max(1).optional(),lastModified:Zn.datetime({offset:!0}).optional()}),b_=R({...Fn.shape,...Ei.shape,uri:y(),description:ge(y()),mimeType:ge(y()),size:ge(ce()),annotations:Bn.optional(),_meta:ge(De({}))}),dI=R({...Fn.shape,...Ei.shape,uriTemplate:y(),description:ge(y()),mimeType:ge(y()),annotations:Bn.optional(),_meta:ge(De({}))}),Bc=ji.extend({method:U("resources/list")}),$_=Pi.extend({resources:re(b_)}),Wc=ji.extend({method:U("resources/templates/list")}),pI=Pi.extend({resourceTemplates:re(dI)}),Up=it.extend({uri:y()}),mI=Up,Jc=ze.extend({method:U("resources/read"),params:mI}),x_=je.extend({contents:re(de([__,y_]))}),fI=dt.extend({method:U("notifications/resources/list_changed"),params:lt.optional()}),hI=Up,gI=ze.extend({method:U("resources/subscribe"),params:hI}),vI=Up,_I=ze.extend({method:U("resources/unsubscribe"),params:vI}),yI=lt.extend({uri:y()}),bI=dt.extend({method:U("notifications/resources/updated"),params:yI}),$I=R({name:y(),description:ge(y()),required:ge(we())}),xI=R({...Fn.shape,...Ei.shape,description:ge(y()),arguments:ge(re($I)),_meta:ge(De({}))}),Gc=ji.extend({method:U("prompts/list")}),kI=Pi.extend({prompts:re(xI)}),wI=it.extend({name:y(),arguments:pe(y(),y()).optional()}),Kc=ze.extend({method:U("prompts/get"),params:wI}),Mp=R({type:U("text"),text:y(),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),Zp=R({type:U("image"),data:Dp,mimeType:y(),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),Lp=R({type:U("audio"),data:Dp,mimeType:y(),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),SI=R({type:U("tool_use"),name:y(),id:y(),input:pe(y(),ve()),_meta:pe(y(),ve()).optional()}),qp=R({type:U("resource"),resource:de([__,y_]),annotations:Bn.optional(),_meta:pe(y(),ve()).optional()}),Fp=b_.extend({type:U("resource_link")}),Wn=de([Mp,Zp,Lp,Fp,qp]),II=R({role:Oi,content:Wn}),EI=je.extend({description:y().optional(),messages:re(II)}),TI=dt.extend({method:U("notifications/prompts/list_changed"),params:lt.optional()}),zI=R({title:y().optional(),readOnlyHint:we().optional(),destructiveHint:we().optional(),idempotentHint:we().optional(),openWorldHint:we().optional()}),jI=R({taskSupport:Fe(["required","optional","forbidden"]).optional()}),Jn=R({...Fn.shape,...Ei.shape,description:y().optional(),inputSchema:R({type:U("object"),properties:pe(y(),Ie).optional(),required:re(y()).optional()}).catchall(ve()),outputSchema:R({type:U("object"),properties:pe(y(),Ie).optional(),required:re(y()).optional()}).catchall(ve()).optional(),annotations:zI.optional(),execution:jI.optional(),_meta:pe(y(),ve()).optional()}),Wr=ji.extend({method:U("tools/list")}),PI=Pi.extend({tools:re(Jn)}),Jr=je.extend({content:re(Wn).default([]),structuredContent:pe(y(),ve()).optional(),isError:we().optional()}),SA=Jr.or(je.extend({toolResult:ve()})),RI=wi.extend({name:y(),arguments:pe(y(),ve()).optional()}),Gr=ze.extend({method:U("tools/call"),params:RI}),NI=dt.extend({method:U("notifications/tools/list_changed"),params:lt.optional()}),IA=R({autoRefresh:we().default(!0),debounceMs:ce().int().nonnegative().default(300)}),Ci=Fe(["debug","info","notice","warning","error","critical","alert","emergency"]),OI=it.extend({level:Ci}),Vp=ze.extend({method:U("logging/setLevel"),params:OI}),CI=lt.extend({level:Ci,logger:y().optional(),data:ve()}),AI=dt.extend({method:U("notifications/message"),params:CI}),DI=R({name:y().optional()}),UI=R({hints:re(DI).optional(),costPriority:ce().min(0).max(1).optional(),speedPriority:ce().min(0).max(1).optional(),intelligencePriority:ce().min(0).max(1).optional()}),MI=R({mode:Fe(["auto","required","none"]).optional()}),ZI=R({type:U("tool_result"),toolUseId:y().describe("The unique identifier for the corresponding tool call."),content:re(Wn).default([]),structuredContent:R({}).loose().optional(),isError:we().optional(),_meta:pe(y(),ve()).optional()}),LI=Nc("type",[Mp,Zp,Lp]),Ac=Nc("type",[Mp,Zp,Lp,SI,ZI]),qI=R({role:Oi,content:de([Ac,re(Ac)]),_meta:pe(y(),ve()).optional()}),FI=wi.extend({messages:re(qI),modelPreferences:UI.optional(),systemPrompt:y().optional(),includeContext:Fe(["none","thisServer","allServers"]).optional(),temperature:ce().optional(),maxTokens:ce().int(),stopSequences:re(y()).optional(),metadata:Ie.optional(),tools:re(Jn).optional(),toolChoice:MI.optional()}),VI=ze.extend({method:U("sampling/createMessage"),params:FI}),Gn=je.extend({model:y(),stopReason:ge(Fe(["endTurn","stopSequence","maxTokens"]).or(y())),role:Oi,content:LI}),Xc=je.extend({model:y(),stopReason:ge(Fe(["endTurn","stopSequence","maxTokens","toolUse"]).or(y())),role:Oi,content:de([Ac,re(Ac)])}),HI=R({type:U("boolean"),title:y().optional(),description:y().optional(),default:we().optional()}),BI=R({type:U("string"),title:y().optional(),description:y().optional(),minLength:ce().optional(),maxLength:ce().optional(),format:Fe(["email","uri","date","date-time"]).optional(),default:y().optional()}),WI=R({type:Fe(["number","integer"]),title:y().optional(),description:y().optional(),minimum:ce().optional(),maximum:ce().optional(),default:ce().optional()}),JI=R({type:U("string"),title:y().optional(),description:y().optional(),enum:re(y()),default:y().optional()}),GI=R({type:U("string"),title:y().optional(),description:y().optional(),oneOf:re(R({const:y(),title:y()})),default:y().optional()}),KI=R({type:U("string"),title:y().optional(),description:y().optional(),enum:re(y()),enumNames:re(y()).optional(),default:y().optional()}),XI=de([JI,GI]),YI=R({type:U("array"),title:y().optional(),description:y().optional(),minItems:ce().optional(),maxItems:ce().optional(),items:R({type:U("string"),enum:re(y())}),default:re(y()).optional()}),QI=R({type:U("array"),title:y().optional(),description:y().optional(),minItems:ce().optional(),maxItems:ce().optional(),items:R({anyOf:re(R({const:y(),title:y()}))}),default:re(y()).optional()}),eE=de([YI,QI]),tE=de([KI,XI,eE]),rE=de([tE,HI,BI,WI]),nE=wi.extend({mode:U("form").optional(),message:y(),requestedSchema:R({type:U("object"),properties:pe(y(),rE),required:re(y()).optional()})}),oE=wi.extend({mode:U("url"),message:y(),elicitationId:y(),url:y().url()}),iE=de([nE,oE]),aE=ze.extend({method:U("elicitation/create"),params:iE}),sE=lt.extend({elicitationId:y()}),cE=dt.extend({method:U("notifications/elicitation/complete"),params:sE}),Kn=je.extend({action:Fe(["accept","decline","cancel"]),content:Cc(t=>t===null?void 0:t,pe(y(),de([y(),ce(),we(),re(y())])).optional())}),uE=R({type:U("ref/resource"),uri:y()});var lE=R({type:U("ref/prompt"),name:y()}),dE=it.extend({ref:de([lE,uE]),argument:R({name:y(),value:y()}),context:R({arguments:pe(y(),y()).optional()}).optional()}),Yc=ze.extend({method:U("completion/complete"),params:dE});function k_(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function w_(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var pE=je.extend({completion:De({values:re(y()).max(100),total:ge(ce().int()),hasMore:ge(we())})}),mE=R({uri:y().startsWith("file://"),name:y().optional(),_meta:pe(y(),ve()).optional()}),fE=ze.extend({method:U("roots/list"),params:it.optional()}),Hp=je.extend({roots:re(mE)}),hE=dt.extend({method:U("notifications/roots/list_changed"),params:lt.optional()}),EA=de([zi,Cp,Yc,Vp,Kc,Gc,Bc,Wc,Jc,gI,_I,Gr,Wr,Zc,qc,Fc,Hc]),TA=de([Uc,Mc,Ap,hE,Ni]),zA=de([Ii,Gn,Xc,Kn,Hp,Lc,Vc,Hn]),jA=de([zi,VI,aE,fE,Zc,qc,Fc,Hc]),PA=de([Uc,Mc,AI,bI,fI,NI,TI,Ni,cE]),RA=de([Ii,iI,pE,EI,kI,$_,pI,x_,Jr,PI,Lc,Vc,Hn]),N=class t extends Error{constructor(e,r,o){super(`MCP error ${e}: ${r}`),this.code=e,this.data=o,this.name="McpError"}static fromError(e,r,o){if(e===D.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new Tp(n.elicitations,r)}return new t(e,r,o)}},Tp=class extends N{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(D.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function lr(t){return t==="completed"||t==="failed"||t==="cancelled"}var I_=Symbol("Let zodToJsonSchema decide on which parser to use");var S_={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},E_=t=>typeof t=="string"?{...S_,name:t}:{...S_,...t};var T_=t=>{let e=E_(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...e.basePath,e.definitionPath,o],jsonSchema:void 0}]))}};function Bp(t,e,r,o){o?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function ne(t,e,r,o,n){t[e]=r,Bp(t,e,o,n)}var Qc=(t,e)=>{let r=0;for(;rF(t.innerType._def,e);function Wp(t,e,r){let o=r??e.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>Wp(t,e,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return gE(t,e)}}var gE=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let o of t.checks)switch(o.kind){case"min":ne(r,"minimum",o.value,o.message,e);break;case"max":ne(r,"maximum",o.value,o.message,e);break}return r};function N_(t,e){return{...F(t.innerType._def,e),default:t.defaultValue()}}function O_(t,e){return e.effectStrategy==="input"?F(t.schema._def,e):$e(e)}function C_(t){return{type:"string",enum:Array.from(t.values)}}var vE=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function A_(t,e){let r=[F(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),F(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),o=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(i=>{if(vE(i))n.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:s,...c}=i;a=c}else o=void 0;n.push(a)}}),n.length?{allOf:n,...o}:void 0}function D_(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var Jp,yt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Jp===void 0&&(Jp=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Jp),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((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})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function tu(t,e){let r={type:"string"};if(t.checks)for(let o of t.checks)switch(o.kind){case"min":ne(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,e);break;case"max":ne(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,e);break;case"email":switch(e.emailStrategy){case"format:email":bt(r,"email",o.message,e);break;case"format:idn-email":bt(r,"idn-email",o.message,e);break;case"pattern:zod":Ve(r,yt.email,o.message,e);break}break;case"url":bt(r,"uri",o.message,e);break;case"uuid":bt(r,"uuid",o.message,e);break;case"regex":Ve(r,o.regex,o.message,e);break;case"cuid":Ve(r,yt.cuid,o.message,e);break;case"cuid2":Ve(r,yt.cuid2,o.message,e);break;case"startsWith":Ve(r,RegExp(`^${Gp(o.value,e)}`),o.message,e);break;case"endsWith":Ve(r,RegExp(`${Gp(o.value,e)}$`),o.message,e);break;case"datetime":bt(r,"date-time",o.message,e);break;case"date":bt(r,"date",o.message,e);break;case"time":bt(r,"time",o.message,e);break;case"duration":bt(r,"duration",o.message,e);break;case"length":ne(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,e),ne(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,e);break;case"includes":{Ve(r,RegExp(Gp(o.value,e)),o.message,e);break}case"ip":{o.version!=="v6"&&bt(r,"ipv4",o.message,e),o.version!=="v4"&&bt(r,"ipv6",o.message,e);break}case"base64url":Ve(r,yt.base64url,o.message,e);break;case"jwt":Ve(r,yt.jwt,o.message,e);break;case"cidr":{o.version!=="v6"&&Ve(r,yt.ipv4Cidr,o.message,e),o.version!=="v4"&&Ve(r,yt.ipv6Cidr,o.message,e);break}case"emoji":Ve(r,yt.emoji(),o.message,e);break;case"ulid":{Ve(r,yt.ulid,o.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{bt(r,"binary",o.message,e);break}case"contentEncoding:base64":{ne(r,"contentEncoding","base64",o.message,e);break}case"pattern:zod":{Ve(r,yt.base64,o.message,e);break}}break}case"nanoid":Ve(r,yt.nanoid,o.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Gp(t,e){return e.patternStrategy==="escape"?yE(t):t}var _E=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function yE(t){let e="";for(let r=0;rn.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&o.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&o.errorMessages&&{errorMessage:{format:r}}})):ne(t,"format",e,r,o)}function Ve(t,e,r,o){t.pattern||t.allOf?.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&o.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:U_(e,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ne(t,"pattern",U_(e,o),r,o)}function U_(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},o=r.i?t.source.toLowerCase():t.source,n="",i=!1,a=!1,s=!1;for(let c=0;c1e4)throw new Error("Project registry is too large");let o=new Set;return r.filter(i=>!(typeof i?.id=="string"&&i.id.startsWith("g-p-"))).map(i=>{if(!i||typeof i.id!="string"||!i.id||i.id.length>200||/[\x00-\x1f]/.test(i.id)||typeof i.name!="string"||!Array.isArray(i.rootPaths)||!i.rootPaths.length||i.rootPaths.some(s=>typeof s!="string"||!Ix(s)||s.length>4096)||o.has(i.id))throw new Error("Unrecognised project record");o.add(i.id);let a=[...new Set(i.rootPaths.map(Xu))];return{id:i.id,name:i.name.trim()||iO(a[0]),rootPaths:a}})}remember(e,r){let o=JSON.stringify(e);return o!==this.projectJson&&(this.cached=e,this.projectJson=o),this.signature=r,this.cached}list(){try{let e=Ex(this.directory,".codex-global-state.json"),r=this.fileSignature(e);if(!r)return this.remember([],"");if(this.signature===r)return this.cached;if(Sx(e).size>16*1024*1024)throw new Error("Project registry is too large");let o=JSON.parse(rO(e,"utf8"));if(!o||!Object.hasOwn(o,"local-projects"))throw new Error("Unrecognised project registry");return this.remember(this.records(o["local-projects"]),r)}catch(e){if(e.code==="ENOENT")return this.remember([],"");throw new We("CODEX_PROJECTS_UNAVAILABLE","Codex projects could not be read. Open Codex, then refresh the board. Your saved tasks have been preserved.")}}};var Le=()=>new Date().toISOString(),$a=t=>cO("sha256").update(t).digest("hex");function ee(t,e){throw new We(t,e)}function mO(){return process.env.THREADBOARD_DATA_DIR?(pO(process.env.THREADBOARD_DATA_DIR)||ee("INVALID_DIRECTORY","THREADBOARD_DATA_DIR must be an absolute path."),process.env.THREADBOARD_DATA_DIR):process.platform==="darwin"?go(ch(),"Library","Application Support","Threadboard"):process.platform==="win32"?go(process.env.LOCALAPPDATA||go(ch(),"AppData","Local"),"Threadboard"):go(process.env.XDG_DATA_HOME||go(ch(),".local","share"),"threadboard")}var Yu=class{constructor(e=mO(),r=new Ku){this.projectSource=r;lO(e,{recursive:!0,mode:448});let o=go(e,"threadboard.sqlite");this.db=new sO(o),dO(o,384),this.db.exec("PRAGMA busy_timeout=5000; PRAGMA journal_mode=WAL; PRAGMA foreign_keys=OFF;"),this.transaction(()=>{let n=this.prepare("PRAGMA user_version").get();if(n.user_version>3&&ee("NEWER_DATABASE","This board was created by a newer Threadboard version. Update the plugin."),n.user_version===1&&this.db.exec(`CREATE TABLE projects_native ( +First call the Threadboard bind_task_run tool with projectId=${o.projectId}, runId=${a.run.id}, token=${a.token}, and an owner label. If CODEX_THREAD_ID is available from your shell environment, use it as threadId; never guess. Then use get_task to read the local task details and acceptance criteria. Work only on this task, report concise progress, and submit_task with a result summary and validation evidence for the user's review. Do not mark it Done yourself.`,c=`codex://threads/new?path=${encodeURIComponent(n.root)}&prompt=${encodeURIComponent(s)}`;return{...a,prompt:s,url:c}}case"bind_task_run":return t.bind(o);case"release_task":return{task:t.release(o)};case"add_comment":return t.note(o);case"report_progress":return t.note(o);case"submit_task":return t.note({...o,submit:!0});case"export_board":return t.exportProject(o.projectId,o.boardId)}}import{DatabaseSync as sO}from"node:sqlite";import{randomUUID as ho,createHash as cO,timingSafeEqual as uO}from"node:crypto";import{mkdirSync as lO,chmodSync as dO}from"node:fs";import{homedir as ch}from"node:os";import{join as go,isAbsolute as pO}from"node:path";import{readFileSync as rO,realpathSync as nO,statSync as Sx}from"node:fs";import{homedir as oO}from"node:os";import{basename as iO,isAbsolute as Ix,join as Ex,resolve as aO}from"node:path";function Xu(t){try{return nO(t)}catch{return aO(t)}}var Ku=class{constructor(e=process.env.THREADBOARD_CODEX_HOME||process.env.CODEX_HOME||Ex(oO(),".codex")){this.directory=e;if(!Ix(e))throw new We("INVALID_DIRECTORY","The Codex data directory must be an absolute path.")}signature="";cached=[];projectJson="[]";fileSignature(e){try{let r=Sx(e);return`${e}:${r.ino}:${r.mtimeMs}:${r.size}`}catch(r){if(r.code==="ENOENT")return"";throw r}}records(e){if(!e||typeof e!="object")throw new Error("Unrecognised project registry");let r=Object.values(e);if(r.length>1e4)throw new Error("Project registry is too large");let o=new Set;return r.filter(i=>!(typeof i?.id=="string"&&i.id.startsWith("g-p-"))).map(i=>{if(!i||typeof i.id!="string"||!i.id||i.id.length>200||/[\x00-\x1f]/.test(i.id)||typeof i.name!="string"||!Array.isArray(i.rootPaths)||!i.rootPaths.length||i.rootPaths.some(s=>typeof s!="string"||!Ix(s)||s.length>4096)||o.has(i.id))throw new Error("Unrecognised project record");o.add(i.id);let a=[...new Set(i.rootPaths.map(Xu))];return{id:i.id,name:i.name.trim()||iO(a[0]),rootPaths:a}})}remember(e,r){let o=JSON.stringify(e);return o!==this.projectJson&&(this.cached=e,this.projectJson=o),this.signature=r,this.cached}list(){try{let e=Ex(this.directory,".codex-global-state.json"),r=this.fileSignature(e);if(!r)return this.remember([],"");if(this.signature===r)return this.cached;if(Sx(e).size>16*1024*1024)throw new Error("Project registry is too large");let o=JSON.parse(rO(e,"utf8"));if(!o||!Object.hasOwn(o,"local-projects"))throw new Error("Unrecognised project registry");return this.remember(this.records(o["local-projects"]),r)}catch(e){if(e.code==="ENOENT")return this.remember([],"");throw new We("CODEX_PROJECTS_UNAVAILABLE","Codex projects could not be read. Open Codex, then refresh the board. Your saved tasks have been preserved.")}}};var Oe=()=>new Date().toISOString(),$a=t=>cO("sha256").update(t).digest("hex");function ee(t,e){throw new We(t,e)}function mO(){return process.env.THREADBOARD_DATA_DIR?(pO(process.env.THREADBOARD_DATA_DIR)||ee("INVALID_DIRECTORY","THREADBOARD_DATA_DIR must be an absolute path."),process.env.THREADBOARD_DATA_DIR):process.platform==="darwin"?go(ch(),"Library","Application Support","Threadboard"):process.platform==="win32"?go(process.env.LOCALAPPDATA||go(ch(),"AppData","Local"),"Threadboard"):go(process.env.XDG_DATA_HOME||go(ch(),".local","share"),"threadboard")}var Yu=class{constructor(e=mO(),r=new Ku){this.projectSource=r;lO(e,{recursive:!0,mode:448});let o=go(e,"threadboard.sqlite");this.db=new sO(o),dO(o,384),this.db.exec("PRAGMA busy_timeout=5000; PRAGMA journal_mode=WAL; PRAGMA foreign_keys=OFF;"),this.transaction(()=>{let n=this.prepare("PRAGMA user_version").get();if(n.user_version>3&&ee("NEWER_DATABASE","This board was created by a newer Threadboard version. Update the plugin."),n.user_version===1&&this.db.exec(`CREATE TABLE projects_native ( id TEXT PRIMARY KEY, name TEXT NOT NULL, root TEXT NOT NULL, roots TEXT NOT NULL DEFAULT '[]', codex_bound INTEGER NOT NULL DEFAULT 0, revision INTEGER NOT NULL DEFAULT 0, next_number INTEGER NOT NULL DEFAULT 1, created_at TEXT NOT NULL @@ -147,12 +147,12 @@ First call the Threadboard bind_task_run tool with projectId=${o.projectId}, run CREATE TRIGGER IF NOT EXISTS task_board_update BEFORE UPDATE OF board_id,project_id ON tasks WHEN NEW.board_id IS NULL OR NOT EXISTS(SELECT 1 FROM boards WHERE id=NEW.board_id AND project_id=NEW.project_id) BEGIN SELECT RAISE(ABORT, 'Task board must belong to its project'); END; - PRAGMA user_version=3;`),this.prepare("PRAGMA foreign_key_check").all().length&&ee("STORAGE_ERROR","The board database could not be upgraded safely. Restore its backup before retrying.")}),this.db.exec("PRAGMA foreign_keys=ON;")}db;statements=new Map;transactionActive=!1;nativeIds;projectSnapshot;revisionSession=ho();catalogRevision=$a("[]").slice(0,16);prepare(e){let r=this.statements.get(e);return r||(r=this.db.prepare(e),this.statements.set(e,r)),r}close(){this.db.close()}revision(){let e=this.prepare("PRAGMA data_version").get().data_version,r=this.prepare("SELECT total_changes() AS n").get().n;return`${this.revisionSession}:${e}:${r}:${this.catalogRevision}`}ensureDefaultBoard(e){this.prepare("SELECT id FROM boards WHERE project_id=? AND is_default=1").get(e)||this.prepare("INSERT INTO boards(id,project_id,name,is_default,created_at) VALUES(?,?,?,1,?)").run(ho(),e,"General",Le())}boardRow(e,r){let o=r?this.prepare("SELECT * FROM boards WHERE id=? AND project_id=?").get(r,e):this.prepare("SELECT * FROM boards WHERE project_id=? AND is_default=1").get(e);return o||ee("BOARD_NOT_FOUND","That board does not belong to this Codex project."),o}boards(e){return this.prepare(`SELECT b.*,COUNT(t.id) AS task_count,COALESCE(SUM(t.status='done'),0) AS done_count + PRAGMA user_version=3;`),this.prepare("PRAGMA foreign_key_check").all().length&&ee("STORAGE_ERROR","The board database could not be upgraded safely. Restore its backup before retrying.")}),this.db.exec("PRAGMA foreign_keys=ON;")}db;statements=new Map;transactionActive=!1;nativeIds;projectSnapshot;revisionSession=ho();catalogRevision=$a("[]").slice(0,16);prepare(e){let r=this.statements.get(e);return r||(r=this.db.prepare(e),this.statements.set(e,r)),r}close(){this.db.close()}revision(){let e=this.prepare("PRAGMA data_version").get().data_version,r=this.prepare("SELECT total_changes() AS n").get().n;return`${this.revisionSession}:${e}:${r}:${this.catalogRevision}`}ensureDefaultBoard(e){this.prepare("SELECT id FROM boards WHERE project_id=? AND is_default=1").get(e)||this.prepare("INSERT INTO boards(id,project_id,name,is_default,created_at) VALUES(?,?,?,1,?)").run(ho(),e,"General",Oe())}boardRow(e,r){let o=r?this.prepare("SELECT * FROM boards WHERE id=? AND project_id=?").get(r,e):this.prepare("SELECT * FROM boards WHERE project_id=? AND is_default=1").get(e);return o||ee("BOARD_NOT_FOUND","That board does not belong to this Codex project."),o}boards(e){return this.prepare(`SELECT b.*,COUNT(t.id) AS task_count,COALESCE(SUM(t.status='done'),0) AS done_count FROM boards b LEFT JOIN tasks t ON t.board_id=b.id AND t.archived=0 ${e?"WHERE b.project_id=?":""} - GROUP BY b.id ORDER BY b.is_default DESC,b.created_at,b.id`).all(...e?[e]:[]).filter(r=>this.nativeIds?.has(r.project_id)).map(r=>({id:r.id,projectId:r.project_id,name:r.name,isDefault:!!r.is_default,taskCount:r.task_count,doneCount:r.done_count,threadId:r.thread_id,chatRequestId:r.chat_request_id,createdAt:r.created_at}))}createBoard(e){return this.transaction(()=>{let r=this.prepare("SELECT * FROM boards WHERE operation_id=?").get(e.operationId);if(r)return r.project_id!==e.projectId&&ee("OPERATION_CONFLICT","That operation belongs to another project."),this.boards(e.projectId).find(n=>n.id===r.id);this.projects(e.projectId).length||ee("NOT_FOUND","Select an existing Codex project first."),this.prepare("SELECT id FROM boards WHERE project_id=? AND name=? COLLATE NOCASE").get(e.projectId,e.name.trim())&&ee("BOARD_NAME_EXISTS","This project already has a board with that name.");let o=ho();return this.prepare("INSERT INTO boards(id,project_id,name,operation_id,created_at) VALUES(?,?,?,?,?)").run(o,e.projectId,e.name.trim(),e.operationId,Le()),this.boards(e.projectId).find(n=>n.id===o)})}prepareBoardChat(e,r){return this.transaction(()=>{let o=this.boardRow(e,r),n=!o.thread_id&&!o.chat_request_id;return n&&this.prepare("UPDATE boards SET chat_request_id=? WHERE id=?").run(ho(),o.id),{board:this.boards(e).find(i=>i.id===o.id),shouldCreate:n}})}bindBoardChat(e){return this.transaction(()=>{let r=this.boardRow(e.projectId,e.boardId);return r.chat_request_id!==e.requestId&&ee("INVALID_CHAT_REQUEST","Use the current companion chat request for this board."),r.thread_id&&r.thread_id!==e.threadId&&ee("ALREADY_BOUND","This board already has a companion chat."),this.prepare("SELECT id FROM boards WHERE thread_id=? AND id<>?").get(e.threadId,r.id)&&ee("ALREADY_BOUND","This chat is already linked to another board."),this.prepare("UPDATE boards SET thread_id=? WHERE id=?").run(e.threadId,r.id),this.boards(e.projectId).find(n=>n.id===r.id)})}transaction(e,r=!1){if(this.transactionActive)return e();this.db.exec(r?"BEGIN":"BEGIN IMMEDIATE"),this.transactionActive=!0;try{let o=e();return this.db.exec("COMMIT"),o}catch(o){throw this.db.exec("ROLLBACK"),o}finally{this.transactionActive=!1}}row(e,r){let o=this.prepare("SELECT * FROM tasks WHERE id=?").get(e);return(!o||r&&o.project_id!==r)&&ee("NOT_FOUND","That task is not on this board."),o}checkVersion(e,r){e.version!==r&&ee("VERSION_CONFLICT","This task changed in another chat. Refresh to review the latest version; your draft is preserved.")}event(e,r,o,n=""){this.prepare("INSERT INTO events(project_id,task_id,kind,actor,note,created_at) VALUES(?,?,?,?,?,?)").run(e.project_id,e.id,r,o,n,Le()),this.prepare("UPDATE projects SET revision=revision+1 WHERE id=?").run(e.project_id)}activeRun(e){return this.prepare("SELECT * FROM runs WHERE task_id=? AND state IN ('launching','running')").get(e)}run(e){return{id:e.id,taskId:e.task_id,state:e.state,owner:e.owner,threadId:e.thread_id,createdAt:e.created_at,expiresAt:e.expires_at}}task(e,r=!0,o){let n=o?o.run:this.prepare("SELECT * FROM runs WHERE task_id=? AND (state IN ('launching','running') OR (state='submitted' AND ? IN ('review','done'))) ORDER BY created_at DESC LIMIT 1").get(e.id,e.status),i=o?o.dependencies:this.prepare("SELECT t.id,t.number,t.title,t.status FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id=? ORDER BY t.number").all(e.id);return{id:e.id,projectId:e.project_id,boardId:e.board_id,number:e.number,title:e.title,description:r?e.description:e.description.slice(0,140),criteria:r?e.criteria:"",status:e.status,priority:e.priority,blockedReason:e.blocked_reason,rank:e.rank,version:e.version,archived:!!e.archived,createdAt:e.created_at,updatedAt:e.updated_at,run:n?this.run(n):null,dependencies:i}}summaries(e){if(!e.length)return[];let r=e.map(()=>"?").join(","),o=e.map(c=>c.id),n=this.prepare(`SELECT r.* FROM runs r JOIN tasks t ON t.id=r.task_id WHERE r.task_id IN (${r}) AND (r.state IN ('launching','running') OR (r.state='submitted' AND t.status IN ('review','done'))) ORDER BY r.created_at DESC,r.id`).all(...o),i=new Map;for(let c of n)i.has(c.task_id)||i.set(c.task_id,c);let a=this.prepare(`SELECT d.task_id,t.id,t.number,t.title,t.status FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id IN (${r}) ORDER BY t.number`).all(...o),s=new Map;for(let c of a){let u=s.get(c.task_id)||[];u.push({id:c.id,number:c.number,title:c.title,status:c.status}),s.set(c.task_id,u)}return e.map(c=>this.task(c,!1,{run:i.get(c.id),dependencies:s.get(c.id)||[]}))}projects(e){if(this.nativeIds&&(!this.nativeIds.size||e&&!this.nativeIds.has(e)))return[];let r=this.nativeIds?[...this.nativeIds]:[];return this.prepare(`SELECT p.*, COUNT(t.project_id) AS task_count, + GROUP BY b.id ORDER BY b.is_default DESC,b.created_at,b.id`).all(...e?[e]:[]).filter(r=>this.nativeIds?.has(r.project_id)).map(r=>({id:r.id,projectId:r.project_id,name:r.name,isDefault:!!r.is_default,taskCount:r.task_count,doneCount:r.done_count,threadId:r.thread_id,chatRequestId:r.chat_request_id,createdAt:r.created_at}))}createBoard(e){return this.transaction(()=>{let r=this.prepare("SELECT * FROM boards WHERE operation_id=?").get(e.operationId);if(r)return r.project_id!==e.projectId&&ee("OPERATION_CONFLICT","That operation belongs to another project."),this.boards(e.projectId).find(n=>n.id===r.id);this.projects(e.projectId).length||ee("NOT_FOUND","Select an existing Codex project first."),this.prepare("SELECT id FROM boards WHERE project_id=? AND name=? COLLATE NOCASE").get(e.projectId,e.name.trim())&&ee("BOARD_NAME_EXISTS","This project already has a board with that name.");let o=ho();return this.prepare("INSERT INTO boards(id,project_id,name,operation_id,created_at) VALUES(?,?,?,?,?)").run(o,e.projectId,e.name.trim(),e.operationId,Oe()),this.boards(e.projectId).find(n=>n.id===o)})}prepareBoardChat(e,r){return this.transaction(()=>{let o=this.boardRow(e,r),n=!o.thread_id&&!o.chat_request_id;return n&&this.prepare("UPDATE boards SET chat_request_id=? WHERE id=?").run(ho(),o.id),{board:this.boards(e).find(i=>i.id===o.id),shouldCreate:n}})}bindBoardChat(e){return this.transaction(()=>{let r=this.boardRow(e.projectId,e.boardId);return r.chat_request_id!==e.requestId&&ee("INVALID_CHAT_REQUEST","Use the current companion chat request for this board."),r.thread_id&&r.thread_id!==e.threadId&&ee("ALREADY_BOUND","This board already has a companion chat."),this.prepare("SELECT id FROM boards WHERE thread_id=? AND id<>?").get(e.threadId,r.id)&&ee("ALREADY_BOUND","This chat is already linked to another board."),this.prepare("UPDATE boards SET thread_id=? WHERE id=?").run(e.threadId,r.id),this.boards(e.projectId).find(n=>n.id===r.id)})}transaction(e,r=!1){if(this.transactionActive)return e();this.db.exec(r?"BEGIN":"BEGIN IMMEDIATE"),this.transactionActive=!0;try{let o=e();return this.db.exec("COMMIT"),o}catch(o){throw this.db.exec("ROLLBACK"),o}finally{this.transactionActive=!1}}row(e,r){let o=this.prepare("SELECT * FROM tasks WHERE id=?").get(e);return(!o||r&&o.project_id!==r)&&ee("NOT_FOUND","That task is not on this board."),o}checkVersion(e,r){e.version!==r&&ee("VERSION_CONFLICT","This task changed in another chat. Refresh to review the latest version; your draft is preserved.")}event(e,r,o,n=""){this.prepare("INSERT INTO events(project_id,task_id,kind,actor,note,created_at) VALUES(?,?,?,?,?,?)").run(e.project_id,e.id,r,o,n,Oe()),this.prepare("UPDATE projects SET revision=revision+1 WHERE id=?").run(e.project_id)}activeRun(e){return this.prepare("SELECT * FROM runs WHERE task_id=? AND state IN ('launching','running')").get(e)}run(e){return{id:e.id,taskId:e.task_id,state:e.state,owner:e.owner,threadId:e.thread_id,createdAt:e.created_at,expiresAt:e.expires_at}}task(e,r=!0,o){let n=o?o.run:this.prepare("SELECT * FROM runs WHERE task_id=? AND (state IN ('launching','running') OR (state='submitted' AND ? IN ('review','done'))) ORDER BY rowid DESC LIMIT 1").get(e.id,e.status),i=o?o.dependencies:this.prepare("SELECT t.id,t.number,t.title,t.status FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id=? ORDER BY t.number").all(e.id);return{id:e.id,projectId:e.project_id,boardId:e.board_id,number:e.number,title:e.title,description:r?e.description:e.description.slice(0,140),criteria:r?e.criteria:"",status:e.status,priority:e.priority,blockedReason:e.blocked_reason,rank:e.rank,version:e.version,archived:!!e.archived,createdAt:e.created_at,updatedAt:e.updated_at,run:n?this.run(n):null,dependencies:i}}summaries(e){if(!e.length)return[];let r=e.map(()=>"?").join(","),o=e.map(c=>c.id),n=this.prepare(`SELECT r.* FROM runs r JOIN tasks t ON t.id=r.task_id WHERE r.task_id IN (${r}) AND (r.state IN ('launching','running') OR (r.state='submitted' AND t.status IN ('review','done'))) ORDER BY r.rowid DESC`).all(...o),i=new Map;for(let c of n)i.has(c.task_id)||i.set(c.task_id,c);let a=this.prepare(`SELECT d.task_id,t.id,t.number,t.title,t.status FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id IN (${r}) ORDER BY t.number`).all(...o),s=new Map;for(let c of a){let u=s.get(c.task_id)||[];u.push({id:c.id,number:c.number,title:c.title,status:c.status}),s.set(c.task_id,u)}return e.map(c=>this.task(c,!1,{run:i.get(c.id),dependencies:s.get(c.id)||[]}))}projects(e){if(this.nativeIds&&(!this.nativeIds.size||e&&!this.nativeIds.has(e)))return[];let r=this.nativeIds?[...this.nativeIds]:[];return this.prepare(`SELECT p.*, COUNT(t.project_id) AS task_count, COALESCE(SUM(CASE WHEN t.status='done' THEN 1 ELSE 0 END),0) AS done_count FROM projects p LEFT JOIN tasks t ON t.project_id=p.id AND t.archived=0 - ${e?"WHERE p.id=?":r.length?`WHERE p.id IN (${r.map(()=>"?").join(",")})`:""} GROUP BY p.id ORDER BY p.name COLLATE NOCASE,p.id`).all(...e?[e]:r).map(o=>{let n=JSON.parse(o.roots);return{id:o.id,name:o.name,root:o.root,rootPaths:n.length?n:[o.root],revision:o.revision,taskCount:o.task_count,doneCount:o.done_count}})}syncProjects(e){if(e===this.projectSnapshot)return;let r=new Set(e.map(n=>n.id)),o=new Map;for(let n of e)for(let i of n.rootPaths){let a=o.get(i)||new Set;a.add(n.id),o.set(i,a)}this.transaction(()=>{let n=this.prepare("SELECT * FROM projects WHERE codex_bound=0").all().map(i=>({...i,canonicalRoot:Xu(i.root)}));for(let i of e){let a=this.prepare("SELECT * FROM projects WHERE id=?").get(i.id);if(a){let s=i.rootPaths.includes(a.root)?a.root:i.rootPaths[0];this.prepare("UPDATE projects SET name=?,root=?,roots=?,codex_bound=1 WHERE id=?").run(i.name,s,JSON.stringify(i.rootPaths),i.id)}else{let s=n.filter(u=>!r.has(u.id)&&i.rootPaths.includes(u.canonicalRoot)&&o.get(u.canonicalRoot)?.size===1),c=s.length===1?s[0]:void 0;this.prepare("INSERT INTO projects(id,name,root,roots,codex_bound,revision,next_number,created_at) VALUES(?,?,?,?,1,?,?,?)").run(i.id,i.name,i.rootPaths[0],JSON.stringify(i.rootPaths),c?.revision||0,c?.next_number||1,c?.created_at||Le()),c&&(this.prepare("UPDATE boards SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("UPDATE tasks SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("UPDATE events SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("UPDATE project_aliases SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("INSERT OR REPLACE INTO project_aliases(alias_id,project_id) VALUES(?,?)").run(c.id,i.id),this.prepare("DELETE FROM projects WHERE id=?").run(c.id))}this.ensureDefaultBoard(i.id)}}),this.nativeIds=r,this.projectSnapshot=e,this.catalogRevision=$a(JSON.stringify(e)).slice(0,16)}nativeProjectId(e){if(this.nativeIds?.has(e))return e;let r=this.prepare("SELECT project_id FROM project_aliases WHERE alias_id=?").get(e);return r&&this.nativeIds?.has(r.project_id)?r.project_id:ee("PROJECT_NOT_IN_CODEX","Choose an existing project from Codex. Create and manage projects in Codex itself.")}projectAt(e){let r=this.projects().filter(o=>o.rootPaths.includes(Xu(e)));return r.length>1&&ee("AMBIGUOUS_PROJECT","More than one Codex project uses this directory. Select the project by its ID."),r[0]}board(e,r=0,o=!1,n){let i=this.revision();return this.transaction(()=>{let a=this.projects(e)[0];a||ee("NOT_FOUND","That project board does not exist.");let s=this.boardRow(e,n),c=this.boards(e),u=c.find(m=>m.id===s.id),d=this.summaries(this.prepare("SELECT id,project_id,board_id,number,title,substr(description,1,140) AS description,'' AS criteria,status,priority,blocked_reason,rank,version,archived,created_at,updated_at FROM tasks WHERE board_id=? AND archived=? ORDER BY rank,number LIMIT ? OFFSET ?").all(s.id,o?1:0,200,r)),g=this.prepare("SELECT COUNT(*) AS n FROM tasks WHERE board_id=? AND archived=?").get(s.id,o?1:0).n,h=Object.fromEntries(Gu.map(m=>[m,0]));for(let m of this.prepare("SELECT status,COUNT(*) AS n FROM tasks WHERE board_id=? AND archived=? GROUP BY status").all(s.id,o?1:0))h[m.status]=m.n;return{project:a,board:u,boards:c,tasks:d,total:g,nextOffset:r+d.length{let o=this.task(this.row(r,e)),n=this.prepare("SELECT * FROM events WHERE task_id=? ORDER BY id DESC LIMIT 50").all(r).map(i=>({id:i.id,taskId:i.task_id,kind:i.kind,actor:i.actor,note:i.note,createdAt:i.created_at}));return{task:o,events:n}},!0)}createTask(e){return this.transaction(()=>{let r=this.boardRow(e.projectId,e.boardId),o=this.prepare("SELECT task_id FROM operations WHERE id=?").get(e.operationId);if(o){let c=this.row(o.task_id,e.projectId);return c.board_id!==r.id&&ee("OPERATION_CONFLICT","That operation belongs to another board."),this.task(c)}let n=this.prepare("SELECT * FROM projects WHERE id=?").get(e.projectId);n||ee("NOT_FOUND","Select an existing Codex project first."),(e.status==="in_progress"||e.status==="review")&&ee("CLAIM_REQUIRED","New tasks start in Backlog or Ready. Claim work before starting it.");let i=ho(),a=Le();this.prepare(`INSERT INTO tasks(id,project_id,board_id,number,title,description,criteria,priority,status,rank,created_at,updated_at) - VALUES(?,?,?,?,?,?,?,?,?,?,?,?)`).run(i,e.projectId,r.id,n.next_number,e.title.trim(),e.description||"",e.criteria||"",e.priority||"normal",e.status||"backlog",n.next_number*1024,a,a),this.prepare("UPDATE projects SET next_number=next_number+1 WHERE id=?").run(e.projectId),this.prepare("INSERT INTO operations(id,task_id) VALUES(?,?)").run(e.operationId,i);let s=this.row(i);return this.event(s,"created","You"),this.task(s)})}edit(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);return this.checkVersion(r,e.version),this.prepare("UPDATE tasks SET title=?,description=?,criteria=?,priority=?,blocked_reason=?,version=version+1,updated_at=? WHERE id=?").run(e.title?.trim()??r.title,e.description??r.description,e.criteria??r.criteria,e.priority??r.priority,e.blockedReason??r.blocked_reason,Le(),r.id),this.event(r,"edited","You"),this.task(this.row(r.id))})}move(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);this.checkVersion(r,e.version),r.archived&&ee("ARCHIVED","Restore this task before moving it.");let o=this.activeRun(r.id);return e.status==="in_progress"&&o?.state!=="running"&&ee("CLAIM_REQUIRED","Start this task in Codex or claim it from an existing chat."),e.status==="review"&&o?.state==="launching"&&ee("NOT_RUNNING","The new chat must bind to its task before submitting work."),e.status!=="in_progress"&&o&&this.prepare("UPDATE runs SET state=? WHERE id=?").run(e.status==="review"?"submitted":"released",o.id),this.prepare("UPDATE tasks SET status=?,rank=?,version=version+1,updated_at=? WHERE id=?").run(e.status,e.rank??r.rank,Le(),r.id),this.event(r,e.status==="done"?"accepted":"moved","You",`Moved to ${e.status.replaceAll("_"," ")}`),this.task(this.row(r.id))})}archive(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);return this.checkVersion(r,e.version),this.activeRun(r.id)&&ee("ACTIVE_RUN","Release or finish the active run before archiving this task."),this.prepare("UPDATE tasks SET archived=?,version=version+1,updated_at=? WHERE id=?").run(e.archived?1:0,Le(),r.id),this.event(r,e.archived?"archived":"restored","You"),this.task(this.row(r.id))})}dependency(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);return this.checkVersion(r,e.version),this.row(e.prerequisiteId,e.projectId).board_id!==r.board_id&&ee("CROSS_BOARD_DEPENDENCY","Prerequisites must be on the same board."),e.remove?this.prepare("DELETE FROM dependencies WHERE task_id=? AND prerequisite_id=?").run(r.id,e.prerequisiteId):(this.prepare("WITH RECURSIVE chain(id) AS (SELECT ? UNION SELECT prerequisite_id FROM dependencies d JOIN chain c ON d.task_id=c.id) SELECT 1 FROM chain WHERE id=? LIMIT 1").get(e.prerequisiteId,r.id)&&ee("DEPENDENCY_CYCLE","That dependency would create a cycle."),this.prepare("INSERT OR IGNORE INTO dependencies(task_id,prerequisite_id) VALUES(?,?)").run(r.id,e.prerequisiteId)),this.prepare("UPDATE tasks SET version=version+1,updated_at=? WHERE id=?").run(Le(),r.id),this.event(r,"dependency","You",e.remove?"Removed prerequisite":"Added prerequisite"),this.task(this.row(r.id))})}eligible(e){(e.archived||e.status==="done"||e.status==="review")&&ee("NOT_READY","Restore this task or move it to Ready before starting work."),e.blocked_reason&&ee("BLOCKED","This task is blocked. Resolve its blocked reason first.");let r=this.prepare("SELECT t.number FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id=? AND t.status <> 'done' LIMIT 1").get(e.id);r&&ee("PREREQUISITE",`Finish TB-${r.number} before starting this task.`),this.activeRun(e.id)&&ee("ALREADY_CLAIMED","Another chat already owns this task. Open its chat or explicitly release it.")}claim(e){return this.transaction(()=>{let r=this.prepare("SELECT * FROM runs WHERE attempt_id=?").get(e.attemptId);if(r)return this.row(r.task_id,e.projectId),(r.task_id!==e.taskId||r.token_hash!==$a(e.token))&&ee("OPERATION_CONFLICT","That attempt ID belongs to another claim."),{task:this.task(this.row(r.task_id)),run:this.run(r),token:e.token};let o=this.row(e.taskId,e.projectId);this.eligible(o),this.checkVersion(o,e.version);let n=ho(),i=Le(),a=e.launching?new Date(Date.now()+15*6e4).toISOString():null;return this.prepare("INSERT INTO runs(id,task_id,state,owner,thread_id,token_hash,attempt_id,created_at,expires_at) VALUES(?,?,?,?,?,?,?,?,?)").run(n,o.id,e.launching?"launching":"running",e.owner,e.threadId||null,$a(e.token),e.attemptId,i,a),this.prepare("UPDATE tasks SET status=?,version=version+1,updated_at=? WHERE id=?").run(e.launching?o.status:"in_progress",i,o.id),this.event(o,e.launching?"launch_prepared":"claimed",e.owner),{task:this.task(this.row(o.id)),run:this.run(this.prepare("SELECT * FROM runs WHERE id=?").get(n)),token:e.token}})}authorized(e,r,o){let n=this.prepare("SELECT * FROM runs WHERE id=?").get(e);n||ee("NOT_FOUND","That task run does not exist."),this.row(n.task_id,o);let i=Buffer.from(n.token_hash),a=Buffer.from($a(r));return(i.length!==a.length||!uO(i,a))&&ee("INVALID_CLAIM","This chat does not have the task claim handle."),n}bind(e){return this.transaction(()=>{let r=this.authorized(e.runId,e.token,e.projectId);return r.state==="running"?(e.threadId&&r.thread_id&&e.threadId!==r.thread_id&&ee("ALREADY_BOUND","This launch is bound to another chat."),{task:this.task(this.row(r.task_id)),run:this.run(r)}):(r.state!=="launching"&&ee("INVALID_RUN","This reservation is no longer active. Start a new run explicitly."),r.expires_at{let r=this.row(e.taskId,e.projectId);this.checkVersion(r,e.version);let o=this.activeRun(r.id);return o||ee("NOT_RUNNING","There is no active claim to release."),this.prepare("UPDATE runs SET state='released' WHERE id=?").run(o.id),this.prepare("UPDATE tasks SET status='ready',version=version+1,updated_at=? WHERE id=?").run(Le(),r.id),this.event(r,"released","You"),this.task(this.row(r.id))})}note(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);if(e.runId){let o=this.authorized(e.runId,e.token||"",e.projectId);(o.task_id!==r.id||o.state!=="running")&&ee("INVALID_RUN","Only the active owner can report progress or submit this task."),e.submit&&(this.prepare("UPDATE runs SET state='submitted' WHERE id=?").run(o.id),this.prepare("UPDATE tasks SET status='review',version=version+1,updated_at=? WHERE id=?").run(Le(),r.id)),this.event(r,e.submit?"submitted":"progress",o.owner,e.note)}else e.submit&&ee("CLAIM_REQUIRED","An active owner must submit the task."),this.event(r,"comment",e.actor||"You",e.note);return this.detail(e.projectId,r.id)})}exportProject(e,r){return this.transaction(()=>{let o=this.projects(e)[0];o||ee("NOT_FOUND","That project board does not exist.");let n=this.boardRow(e,r),i=this.boards(e).find(s=>s.id===n.id),a=this.prepare("SELECT * FROM tasks WHERE board_id=? ORDER BY number").all(n.id);return{format:"threadboard-export",version:2,exportedAt:Le(),project:o,board:i,tasks:a.map(s=>({task:this.task(s),events:this.prepare("SELECT * FROM events WHERE task_id=? ORDER BY id DESC").all(s.id).map(c=>({id:c.id,taskId:c.task_id,kind:c.kind,actor:c.actor,note:c.note,createdAt:c.created_at}))}))}},!0)}};var Tx=` + ${e?"WHERE p.id=?":r.length?`WHERE p.id IN (${r.map(()=>"?").join(",")})`:""} GROUP BY p.id ORDER BY p.name COLLATE NOCASE,p.id`).all(...e?[e]:r).map(o=>{let n=JSON.parse(o.roots);return{id:o.id,name:o.name,root:o.root,rootPaths:n.length?n:[o.root],revision:o.revision,taskCount:o.task_count,doneCount:o.done_count}})}syncProjects(e){if(e===this.projectSnapshot)return;let r=new Set(e.map(n=>n.id)),o=new Map;for(let n of e)for(let i of n.rootPaths){let a=o.get(i)||new Set;a.add(n.id),o.set(i,a)}this.transaction(()=>{let n=this.prepare("SELECT * FROM projects WHERE codex_bound=0").all().map(i=>({...i,canonicalRoot:Xu(i.root)}));for(let i of e){let a=this.prepare("SELECT * FROM projects WHERE id=?").get(i.id);if(a){let s=i.rootPaths.includes(a.root)?a.root:i.rootPaths[0],c=JSON.stringify(i.rootPaths);(a.name!==i.name||a.root!==s||a.roots!==c||!a.codex_bound)&&this.prepare("UPDATE projects SET name=?,root=?,roots=?,codex_bound=1 WHERE id=?").run(i.name,s,c,i.id)}else{let s=n.filter(u=>!r.has(u.id)&&i.rootPaths.includes(u.canonicalRoot)&&o.get(u.canonicalRoot)?.size===1),c=s.length===1?s[0]:void 0;this.prepare("INSERT INTO projects(id,name,root,roots,codex_bound,revision,next_number,created_at) VALUES(?,?,?,?,1,?,?,?)").run(i.id,i.name,i.rootPaths[0],JSON.stringify(i.rootPaths),c?.revision||0,c?.next_number||1,c?.created_at||Oe()),c&&(this.prepare("UPDATE boards SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("UPDATE tasks SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("UPDATE events SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("UPDATE project_aliases SET project_id=? WHERE project_id=?").run(i.id,c.id),this.prepare("INSERT OR REPLACE INTO project_aliases(alias_id,project_id) VALUES(?,?)").run(c.id,i.id),this.prepare("DELETE FROM projects WHERE id=?").run(c.id))}this.ensureDefaultBoard(i.id)}}),this.nativeIds=r,this.projectSnapshot=e,this.catalogRevision=$a(JSON.stringify(e)).slice(0,16)}nativeProjectId(e){if(this.nativeIds?.has(e))return e;let r=this.prepare("SELECT project_id FROM project_aliases WHERE alias_id=?").get(e);return r&&this.nativeIds?.has(r.project_id)?r.project_id:ee("PROJECT_NOT_IN_CODEX","Choose an existing project from Codex. Create and manage projects in Codex itself.")}projectAt(e){let r=this.projects().filter(o=>o.rootPaths.includes(Xu(e)));return r.length>1&&ee("AMBIGUOUS_PROJECT","More than one Codex project uses this directory. Select the project by its ID."),r[0]}board(e,r=0,o=!1,n){let i=this.revision();return this.transaction(()=>{let a=this.projects(e)[0];a||ee("NOT_FOUND","That project board does not exist.");let s=this.boardRow(e,n),c=this.boards(e),u=c.find(m=>m.id===s.id),d=this.summaries(this.prepare("SELECT id,project_id,board_id,number,title,substr(description,1,140) AS description,'' AS criteria,status,priority,blocked_reason,rank,version,archived,created_at,updated_at FROM tasks WHERE board_id=? AND archived=? ORDER BY rank,number LIMIT ? OFFSET ?").all(s.id,o?1:0,200,r)),g=this.prepare("SELECT COUNT(*) AS n FROM tasks WHERE board_id=? AND archived=?").get(s.id,o?1:0).n,h=Object.fromEntries(Gu.map(m=>[m,0]));for(let m of this.prepare("SELECT status,COUNT(*) AS n FROM tasks WHERE board_id=? AND archived=? GROUP BY status").all(s.id,o?1:0))h[m.status]=m.n;return{project:a,board:u,boards:c,tasks:d,total:g,nextOffset:r+d.length{let o=this.task(this.row(r,e)),n=this.prepare("SELECT * FROM events WHERE task_id=? ORDER BY id DESC LIMIT 50").all(r).map(i=>({id:i.id,taskId:i.task_id,kind:i.kind,actor:i.actor,note:i.note,createdAt:i.created_at}));return{task:o,events:n}},!0)}createTask(e){return this.transaction(()=>{let r=this.boardRow(e.projectId,e.boardId),o=this.prepare("SELECT task_id FROM operations WHERE id=?").get(e.operationId);if(o){let c=this.row(o.task_id,e.projectId);return c.board_id!==r.id&&ee("OPERATION_CONFLICT","That operation belongs to another board."),this.task(c)}let n=this.prepare("SELECT * FROM projects WHERE id=?").get(e.projectId);n||ee("NOT_FOUND","Select an existing Codex project first."),(e.status==="in_progress"||e.status==="review")&&ee("CLAIM_REQUIRED","New tasks start in Backlog or Ready. Claim work before starting it.");let i=ho(),a=Oe();this.prepare(`INSERT INTO tasks(id,project_id,board_id,number,title,description,criteria,priority,status,rank,created_at,updated_at) + VALUES(?,?,?,?,?,?,?,?,?,?,?,?)`).run(i,e.projectId,r.id,n.next_number,e.title.trim(),e.description||"",e.criteria||"",e.priority||"normal",e.status||"backlog",n.next_number*1024,a,a),this.prepare("UPDATE projects SET next_number=next_number+1 WHERE id=?").run(e.projectId),this.prepare("INSERT INTO operations(id,task_id) VALUES(?,?)").run(e.operationId,i);let s=this.row(i);return this.event(s,"created","You"),this.task(s)})}edit(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);return this.checkVersion(r,e.version),this.prepare("UPDATE tasks SET title=?,description=?,criteria=?,priority=?,blocked_reason=?,version=version+1,updated_at=? WHERE id=?").run(e.title?.trim()??r.title,e.description??r.description,e.criteria??r.criteria,e.priority??r.priority,e.blockedReason??r.blocked_reason,Oe(),r.id),this.event(r,"edited","You"),this.task(this.row(r.id))})}move(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);if(this.checkVersion(r,e.version),r.archived&&ee("ARCHIVED","Restore this task before moving it."),e.status===r.status)return e.rank===void 0||e.rank===r.rank?this.task(r):(this.prepare("UPDATE tasks SET rank=?,version=version+1,updated_at=? WHERE id=?").run(e.rank,Oe(),r.id),this.event(r,"reordered","You"),this.task(this.row(r.id)));let o=this.activeRun(r.id);return e.status==="in_progress"&&o?.state!=="running"&&ee("CLAIM_REQUIRED","Start this task in Codex or claim it from an existing chat."),e.status==="review"&&o?.state==="launching"&&ee("NOT_RUNNING","The new chat must bind to its task before submitting work."),e.status!=="in_progress"&&o&&this.prepare("UPDATE runs SET state=? WHERE id=?").run(e.status==="review"?"submitted":"released",o.id),this.prepare("UPDATE tasks SET status=?,rank=?,version=version+1,updated_at=? WHERE id=?").run(e.status,e.rank??r.rank,Oe(),r.id),this.event(r,e.status==="done"?"accepted":"moved","You",`Moved to ${e.status.replaceAll("_"," ")}`),this.task(this.row(r.id))})}archive(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);return this.checkVersion(r,e.version),this.activeRun(r.id)&&ee("ACTIVE_RUN","Release or finish the active run before archiving this task."),this.prepare("UPDATE tasks SET archived=?,version=version+1,updated_at=? WHERE id=?").run(e.archived?1:0,Oe(),r.id),this.event(r,e.archived?"archived":"restored","You"),this.task(this.row(r.id))})}dependency(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);return this.checkVersion(r,e.version),this.row(e.prerequisiteId,e.projectId).board_id!==r.board_id&&ee("CROSS_BOARD_DEPENDENCY","Prerequisites must be on the same board."),e.remove?this.prepare("DELETE FROM dependencies WHERE task_id=? AND prerequisite_id=?").run(r.id,e.prerequisiteId):(this.prepare("WITH RECURSIVE chain(id) AS (SELECT ? UNION SELECT prerequisite_id FROM dependencies d JOIN chain c ON d.task_id=c.id) SELECT 1 FROM chain WHERE id=? LIMIT 1").get(e.prerequisiteId,r.id)&&ee("DEPENDENCY_CYCLE","That dependency would create a cycle."),this.prepare("INSERT OR IGNORE INTO dependencies(task_id,prerequisite_id) VALUES(?,?)").run(r.id,e.prerequisiteId)),this.prepare("UPDATE tasks SET version=version+1,updated_at=? WHERE id=?").run(Oe(),r.id),this.event(r,"dependency","You",e.remove?"Removed prerequisite":"Added prerequisite"),this.task(this.row(r.id))})}readyToStart(e){(e.archived||e.status==="done"||e.status==="review")&&ee("NOT_READY","Restore this task or move it to Ready before starting work."),e.blocked_reason&&ee("BLOCKED","This task is blocked. Resolve its blocked reason first.");let r=this.prepare("SELECT t.number FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id=? AND t.status <> 'done' LIMIT 1").get(e.id);r&&ee("PREREQUISITE",`Finish TB-${r.number} before starting this task.`)}claim(e){return this.transaction(()=>{let r=this.prepare("SELECT * FROM runs WHERE attempt_id=?").get(e.attemptId);if(r)return this.row(r.task_id,e.projectId),(r.task_id!==e.taskId||r.token_hash!==$a(e.token))&&ee("OPERATION_CONFLICT","That attempt ID belongs to another claim."),{task:this.task(this.row(r.task_id)),run:this.run(r),token:e.token};let o=this.row(e.taskId,e.projectId);this.readyToStart(o),this.activeRun(o.id)&&ee("ALREADY_CLAIMED","Another chat already owns this task. Open its chat or explicitly release it."),this.checkVersion(o,e.version);let n=ho(),i=Oe(),a=e.launching?new Date(Date.now()+15*6e4).toISOString():null;return this.prepare("INSERT INTO runs(id,task_id,state,owner,thread_id,token_hash,attempt_id,created_at,expires_at) VALUES(?,?,?,?,?,?,?,?,?)").run(n,o.id,e.launching?"launching":"running",e.owner,e.threadId||null,$a(e.token),e.attemptId,i,a),this.prepare("UPDATE tasks SET status=?,version=version+1,updated_at=? WHERE id=?").run(e.launching?o.status:"in_progress",i,o.id),this.event(o,e.launching?"launch_prepared":"claimed",e.owner),{task:this.task(this.row(o.id)),run:this.run(this.prepare("SELECT * FROM runs WHERE id=?").get(n)),token:e.token}})}authorized(e,r,o){let n=this.prepare("SELECT * FROM runs WHERE id=?").get(e);n||ee("NOT_FOUND","That task run does not exist."),this.row(n.task_id,o);let i=Buffer.from(n.token_hash),a=Buffer.from($a(r));return(i.length!==a.length||!uO(i,a))&&ee("INVALID_CLAIM","This chat does not have the task claim handle."),n}bind(e){return this.transaction(()=>{let r=this.authorized(e.runId,e.token,e.projectId);return r.state==="running"?(e.threadId&&r.thread_id&&e.threadId!==r.thread_id&&ee("ALREADY_BOUND","This launch is bound to another chat."),{task:this.task(this.row(r.task_id)),run:this.run(r)}):(r.state!=="launching"&&ee("INVALID_RUN","This reservation is no longer active. Start a new run explicitly."),r.expires_at{let r=this.row(e.taskId,e.projectId);this.checkVersion(r,e.version);let o=this.activeRun(r.id);return o||ee("NOT_RUNNING","There is no active claim to release."),this.prepare("UPDATE runs SET state='released' WHERE id=?").run(o.id),this.prepare("UPDATE tasks SET status='ready',version=version+1,updated_at=? WHERE id=?").run(Oe(),r.id),this.event(r,"released","You"),this.task(this.row(r.id))})}note(e){return this.transaction(()=>{let r=this.row(e.taskId,e.projectId);if(e.runId){let o=this.authorized(e.runId,e.token||"",e.projectId);(o.task_id!==r.id||o.state!=="running")&&ee("INVALID_RUN","Only the active owner can report progress or submit this task."),e.submit&&(this.prepare("UPDATE runs SET state='submitted' WHERE id=?").run(o.id),this.prepare("UPDATE tasks SET status='review',version=version+1,updated_at=? WHERE id=?").run(Oe(),r.id)),this.event(r,e.submit?"submitted":"progress",o.owner,e.note)}else e.submit&&ee("CLAIM_REQUIRED","An active owner must submit the task."),this.event(r,"comment",e.actor||"You",e.note);return this.detail(e.projectId,r.id)})}exportProject(e,r){return this.transaction(()=>{let o=this.projects(e)[0];o||ee("NOT_FOUND","That project board does not exist.");let n=this.boardRow(e,r),i=this.boards(e).find(s=>s.id===n.id),a=this.prepare("SELECT * FROM tasks WHERE board_id=? ORDER BY number").all(n.id);return{format:"threadboard-export",version:2,exportedAt:Oe(),project:o,board:i,tasks:a.map(s=>({task:this.task(s),events:this.prepare("SELECT * FROM events WHERE task_id=? ORDER BY id DESC").all(s.id).map(c=>({id:c.id,taskId:c.task_id,kind:c.kind,actor:c.actor,note:c.note,createdAt:c.created_at}))}))}},!0)}};var Tx=` `;var zx=` `;process.umask(63);var jx=new Yu,Px=["light","dark"].map(t=>({src:`data:image/svg+xml;base64,${Buffer.from(t==="dark"?zx:Tx).toString("base64")}`,mimeType:"image/svg+xml",sizes:["any"],theme:t})),xa=new Vu({name:"threadboard",version:va,icons:Px}),Rx=gO(_O(new URL("./board.html",import.meta.url)),"utf8"),Qu=`ui://threadboard/board/${va}/${vO("sha256").update(Rx).digest("hex").slice(0,16)}`,yO={preferredDisplayMode:"fullscreen",availableDisplayModes:["fullscreen","inline"]},bO={entrypoints:[{type:"global"},{type:"thread"}],preferredModelDisplayMode:"fullscreen"},Nx=t=>({contents:[{uri:t,mimeType:Ju,text:Rx,_meta:{ui:{csp:{connectDomains:[],resourceDomains:[]}},"openai/ui":yO}}]});_x(xa,"threadboard-board",Qu,{},async()=>Nx(Qu));xa.registerResource("threadboard-cached-board",new Hu("ui://threadboard/board/{version}/{fingerprint}",{list:void 0}),{mimeType:Ju},async(t,{version:e,fingerprint:r})=>{if(typeof e!="string"||e.length>80||!/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/.test(e)||typeof r!="string"||!/^[a-f0-9]{16}$/.test(r))throw new N(D.InvalidParams,`Resource ${t} not found`);return Nx(t.toString())});function $O(t,e){return t==="open_project_board"?{projects:e.projects,projectId:e.board?.project.id||null,boardId:e.board?.board.id||null,totalTasks:e.board?.total||0,version:e.version}:t==="get_board"?{project:e.project,board:e.board,boards:e.boards,total:e.total,nextOffset:e.nextOffset,counts:e.counts,tasks:e.tasks.map(r=>({id:r.id,boardId:r.boardId,number:r.number,title:r.title,status:r.status,priority:r.priority,version:r.version,owner:r.run?.owner||null}))}:e}var Ox=[];for(let t of Object.keys(ba)){let e=ba[t],r={title:e.title,description:e.description,inputSchema:e.schema,annotations:{readOnlyHint:e.readOnly,destructiveHint:!1,idempotentHint:e.readOnly||["create_board","prepare_board_chat","bind_board_chat","create_task","claim_task","prepare_task_launch","bind_task_run"].includes(t),openWorldHint:!1},...t==="open_project_board"?{icons:Px,_meta:{ui:{resourceUri:Qu,visibility:["app","model"]},[vx]:Qu,"openai/ui":bO}}:{_meta:{ui:{visibility:t==="get_board_revision"?["app"]:["app","model"]}}}},{inputSchema:o,...n}=r;Ox.push(Jn.parse({name:t,...n,inputSchema:Di(o,{strictUnions:!0,pipeStrategy:"input"}),execution:{taskSupport:"forbidden"}}));let i=async a=>{try{let s=wx(jx,t,a),c=$O(t,s);return{content:[{type:"text",text:JSON.stringify(c)}],structuredContent:c,_meta:{threadboard:s}}}catch(s){let c=s instanceof We?s.code:s instanceof Z.ZodError?"INVALID_INPUT":"STORAGE_ERROR",u=s instanceof We?s.message:s instanceof Z.ZodError?"Check the required fields and supported values for this action.":"The local board could not save this action. Your data has been preserved; retry or inspect local runtime permissions.";return{isError:!0,content:[{type:"text",text:`${c}: ${u}`}],structuredContent:{error:{code:c,message:u}}}}};xa.registerTool(t,r,i)}xa.server.setRequestHandler(Wr,()=>({tools:Ox}));var xO=new Wu;await xa.connect(xO);var uh=()=>{jx.close(),process.exit(0)};process.on("SIGTERM",uh);process.on("SIGINT",uh);process.stdin.on("end",uh); diff --git a/prototype.md b/prototype.md index add5ee6..086c135 100644 --- a/prototype.md +++ b/prototype.md @@ -159,3 +159,13 @@ Concurrent storage timings include SQLite lock contention but exclude IPC and ho - Type checking, 24 storage/protocol tests, 15 browser workflow tests, and four screenshot/review fixtures pass. Evidence includes independent packaged MCP processes, full claim-to-review-to-done movement, activity updates, repeated draft conflicts, hidden-document and hidden-surface pausing, immediate resume, delayed responses, retained pagination, serialized slow requests, and retry backoff. No additional model-context request is sent for unchanged card refreshes. - On a 2,000-active/5,000-archived fixture, 10,000 warm local revision checks measured 0.0095 ms p95 and 0.0086 ms CPU per check. Five hundred packaged stdio checks measured 0.282 ms p95; revision data was 72 bytes. A changing 1 MiB unrelated-metadata fixture measured 1.085 ms p95 and invalidated neither board data nor project storage. These measurements exclude Codex's native bridge and do not establish native-host latency. The benchmark now runs in CI. - UI remains 147.7 KiB gzip against the 250 KiB budget. The throttled 200-card rendering fixture measured 332 ms p95, with 288 ms maximum observed long task; it excludes native bridge and initial script loading. The new local panel behavior still requires user verification after closing Threadboard and fully restarting Codex. Existing long-term documents and schema 3 remain unchanged. + +## Repository review: preview 0.1.4-dev.8 + +- Reviewed the application, storage and MCP tools, installer and release scripts, website/demo, tests, workflows, and user documentation. Replaced vague marketing and sample-task copy with descriptions of actual behavior; simplified the website palette and removed obsolete CSS. Refreshed the README, installation guidance, screenshots, covers, and social artwork. +- Fixed delayed task reads reopening closed dialogs or replacing newer selections; kept loaded pages during refresh and retried pagination when revisions differ. Archive navigation now reports failed reads and preserves filters. Modal backgrounds are inert, nested demo dialogs handle Escape independently, and canceled drags no longer leave live refresh paused. +- Same-column task moves preserve active launch ownership, launch binding rechecks blockers and prerequisites, and reads choose the newest submitted run even when timestamps match. Project catalogue refreshes skip unchanged rows. Failed installations clean up their staging directory. +- Matched demo ownership, activity ordering, and launch rules to the app and included its TypeScript in the root type check. Website CI now builds the plugin before packaging the download; repository CI checks that committed bundles match their source and cancels superseded runs. The first Linux check exposed duplicated license notices on case-insensitive filesystems; the build now uses actual filenames and excludes Node-dependent gzip counts from byte-for-byte comparison. +- Local verification: type checking, 30 backend/installer tests, 27 app browser tests, 8 website tests, and four screenshot fixtures pass. Website checks cover both themes at 320, 390, 768, 1024, and 1440 pixels. Release audit, checksummed packaging, isolated install/reinstall with saved data, and dependency audits pass. The protected planning documents remain unchanged. +- On the same M1 Pro / Node 26 development environment, a 2,000-task read measured 7.19 ms p95; concurrent reads/writes measured 17.37/1.15 ms p95; 100 competing claims produced exactly one owner. Packaged populated reads measured 19.08 ms p95 with 93 MiB sampled RSS. The UI is 149.9 KiB gzip; 200-card rendering at 4× CPU throttling measured 294 ms p95. Unchanged revision checks wrote no storage. All are within the existing prototype budgets and exclude the native desktop bridge. +- Prepared as a repository change; the production website, public GitHub release, and installed desktop plugin have not been updated by this pass. Native desktop behavior and Windows installation still need their existing manual verification. diff --git a/scripts/build.mjs b/scripts/build.mjs index 7a495c1..25b48c1 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -1,6 +1,6 @@ import { build } from 'esbuild'; -import { readFile, writeFile, mkdir } from 'node:fs/promises'; -import { dirname, join } from 'node:path'; +import { readFile, writeFile, mkdir, readdir } from 'node:fs/promises'; +import { join } from 'node:path'; import { gzipSync } from 'node:zlib'; import { fileURLToPath } from 'node:url'; const root = new URL('../', import.meta.url); @@ -31,8 +31,11 @@ for (const name of [...packages].sort()) { const folder = fileURLToPath(new URL(`node_modules/${name}/`, root)); const pkg = JSON.parse(await readFile(join(folder, 'package.json'), 'utf8')); notices += `\n## ${name} ${pkg.version}\n\nLicense: ${pkg.license || 'See license text'}\n`; + const filenames = new Set(await readdir(folder)); let found = false; for (const filename of ['LICENSE','LICENSE.md','LICENSE.txt','LICENSE-MIT','LICENSE-MIT.txt','license','license.md','license.txt','NOTICE','NOTICE.txt']) { + // Read only actual directory entries, even on case-insensitive filesystems. + if (!filenames.has(filename)) continue; try { const license = await readFile(join(folder, filename), 'utf8'); notices += `\n### ${filename}\n\n\`\`\`text\n${license.trim()}\n\`\`\`\n`; if (filename.toUpperCase().startsWith('LICENSE')) found = true; } catch (error) { if (error.code !== 'ENOENT') throw error; } } diff --git a/scripts/install.mjs b/scripts/install.mjs index 28adb5e..68caa80 100644 --- a/scripts/install.mjs +++ b/scripts/install.mjs @@ -61,5 +61,6 @@ try { console.log(`Threadboard ${manifest.version} installed. Close the Threadboard panel, fully quit Codex, then reopen it and open Threadboard from your installed plugins.\nPlugin files: ${target}\nTask data is stored separately and survives plugin updates.`); } catch (error) { if (existsSync(backup)) { if (existsSync(target)) rmSync(target, { recursive: true, force: true }); renameSync(backup, target); } - fail(`Installation did not complete: ${error.message}\nYour task database was not changed. Resolve the CLI error and rerun the installer.`); + process.exitCode = 1; + console.error(`Threadboard: Installation did not complete: ${error.message}\nYour task database was not changed. Resolve the CLI error and rerun the installer.`); } finally { if (existsSync(stage)) rmSync(stage, { recursive: true, force: true }); } diff --git a/site/README.md b/site/README.md index 7fcd206..e2284b7 100644 --- a/site/README.md +++ b/site/README.md @@ -5,7 +5,9 @@ Static HTML, CSS, and a small JavaScript module. Dark is the first-visit default The hero is the real `src/ui/main.tsx` app and its original stylesheet, compiled with a website-only transport. The demo uses example cards in browser memory: visitors can create, edit, move, archive, filter, and review tasks or simulate a chat handoff. No MCP calls, real Codex chats, model usage, database writes, or network requests occur. Reset restores the examples. The page theme also switches the live app. To regenerate the fixture after changing the product examples, run `npx tsx site/scripts/seed-demo.ts` from the repository root. ```sh +npm ci npm ci --prefix site +npm run build npm run verify --prefix site npm run dev --prefix site ``` @@ -14,7 +16,7 @@ The local preview is `http://127.0.0.1:4400`. Run `npm test --prefix site` for t Build output is `site/dist/`. The build copies the current real UI captures from `docs/images/`, self-hosts Instrument Sans with its OFL license, and packages the compiled plugin with its verified installer. ZIP generation runs in Node using a build-only dependency, so the host needs no system ZIP utility. The website ZIP and checksum are always generated from the same source version. Regenerate product captures with the repository's `npm run graphics` before rebuilding the site. -Cloudflare Pages project: `threadboard-web`. GitHub source: `vrnrn/Threadboard`, production branch `main`, root `site`, build command `npm run verify`, output `dist`, Node 24. Public domain: `threadboard.vrnrn.com`. Only deployment and linking configuration in the other projects was used; this page has its own design and assets. +Cloudflare Pages project: `threadboard-web`. GitHub source: `vrnrn/Threadboard`, production branch `main`, root `site`, build command `npm run verify`, output `dist`, Node 24. Public domain: `threadboard.vrnrn.com`. Download and checksum URLs include the package content hash. This keeps cached preview downloads matched to their checksum even when two source builds share a preview version. diff --git a/site/src/assets/favicon.svg b/site/src/assets/favicon.svg index e475163..594fd7a 100644 --- a/site/src/assets/favicon.svg +++ b/site/src/assets/favicon.svg @@ -1 +1 @@ - + diff --git a/site/src/assets/share.png b/site/src/assets/share.png index a104be1..9f979e8 100644 Binary files a/site/src/assets/share.png and b/site/src/assets/share.png differ diff --git a/site/src/assets/share.svg b/site/src/assets/share.svg index a494e31..0ba4dbb 100644 --- a/site/src/assets/share.svg +++ b/site/src/assets/share.svg @@ -1,12 +1,11 @@ - - Threadboard - threadboard.vrnrn.com - A LOCAL BOARD. INSIDE CODEX. - Many chats.One clearplan. - - Plan a task. Hand it to a chat.Review what comes back. - Ready for your review. + + Threadboard + threadboard.vrnrn.com + FOR CODEX DESKTOP + Task boards.InsideCodex. + Plan a task. Hand it to a chat.Review what comes back. + diff --git a/site/src/demo/bridge.ts b/site/src/demo/bridge.ts index bef4d8f..8a5aa53 100644 --- a/site/src/demo/bridge.ts +++ b/site/src/demo/bridge.ts @@ -7,16 +7,26 @@ import type { Project, ProjectBoard, Task, + TaskEvent, } from "../../../src/types.js"; -const state = structuredClone(seed) as any; +interface DemoState { + projects: Project[]; + boards: ProjectBoard[]; + tasks: Task[]; + events: Record; + projectId: string; + boardId: string; +} +const state = structuredClone(seed) as DemoState; const now = () => new Date().toISOString(); for (const task of state.tasks) { task.createdAt = now(); task.updatedAt = now(); } -for (const entries of Object.values(state.events) as any[]) +for (const entries of Object.values(state.events)) for (const event of entries) event.createdAt = now(); let revision = 1; +let eventId = Math.max(0, ...Object.values(state.events).flat().map(event => event.id)); const copy = (value: T): T => structuredClone(value); const token = () => `website-demo-${revision}`; function catalogue() { @@ -82,7 +92,7 @@ function taskFor(args: any): Task { } function note(task: Task, text: string, kind = "comment", actor = "You") { (state.events[task.id] ||= []).push({ - id: revision, + id: ++eventId, taskId: task.id, kind, actor, @@ -132,7 +142,7 @@ export async function call(name: string, args: any = {}): Promise { break; case "get_task": { const task = taskFor(args); - result = { task, events: state.events[task.id] || [] }; + result = { task, events: [...(state.events[task.id] || [])].sort((a, b) => b.id - a.id).slice(0, 50) }; break; } case "create_task": { @@ -184,13 +194,21 @@ export async function call(name: string, args: any = {}): Promise { } case "move_task": { const task = taskFor(args); + if (task.archived) throw new Error("Restore this task before moving it."); + if (task.status === args.status && (args.rank === undefined || args.rank === task.rank)) { + result = { task }; + break; + } if (args.status === "in_progress" && task.run?.state !== "running") throw new Error( "Use Start in new chat to give a chat this task first.", ); - if (args.status !== "in_progress" && task.run?.state === "running") - task.run.state = "released"; - if (args.status === "done" && task.run) task.run.state = "submitted"; + if (args.status === "review" && task.run?.state === "launching") + throw new Error("Send the prepared prompt before submitting work."); + if (args.status !== task.status && args.status !== "in_progress" && task.run) { + if (args.status === "review" && task.run.state === "running") task.run.state = "submitted"; + else if (!(args.status === "done" && task.run.state === "submitted")) task.run = null; + } task.status = args.status; if (args.rank !== undefined) task.rank = args.rank; note(task, `Moved to ${args.status.replace("_", " ")}.`, "moved"); @@ -251,8 +269,10 @@ export async function call(name: string, args: any = {}): Promise { } case "prepare_task_launch": { const task = taskFor(args); - if (task.status === "backlog") - throw new Error("Move this task to Ready before starting it."); + if (task.archived || task.status === "review" || task.status === "done") + throw new Error("Restore this task or move it to Ready before starting work."); + if (task.blockedReason || task.dependencies.some(item => item.status !== "done")) + throw new Error("Resolve this task’s blockers and prerequisites first."); if (task.run && ["running", "launching"].includes(task.run.state)) throw new Error("This card already has a chat owner."); task.run = { @@ -276,13 +296,17 @@ export async function call(name: string, args: any = {}): Promise { } case "release_task": { const task = taskFor(args); - if (task.run) task.run.state = "released"; + if (!task.run || !["running", "launching"].includes(task.run.state)) + throw new Error("There is no active claim to release."); + task.run = null; task.status = "ready"; changed(task); result = { task }; break; } case "create_board": { + if (state.boards.some(item => item.projectId === args.projectId && item.name.toLowerCase() === args.name.trim().toLowerCase())) + throw new Error("This project already has a board with that name."); const item = { id: crypto.randomUUID(), projectId: args.projectId, @@ -418,7 +442,8 @@ export async function openLink(url: string) { url === `demo:task:${item.id}` || (item.run?.threadId && url === `codex://threads/${item.run.threadId}`), ); - if (!task) throw new Error("This demo card no longer exists."); + if (!task?.run) throw new Error("This demo card no longer has a chat."); + const run = task.run; const dialog = document.createElement("dialog"); dialog.className = "demo-chat"; dialog.setAttribute("aria-label", "Demo chat handoff"); @@ -437,8 +462,8 @@ export async function openLink(url: string) { const status = document.createElement("p"); status.className = "demo-chat-status"; status.setAttribute("role", "status"); - let submitted = !["launching", "running"].includes(task.run.state); - const pending = task.run.state === "launching"; + let submitted = !["launching", "running"].includes(run.state); + const pending = run.state === "launching"; status.textContent = pending ? "The prompt is ready. Send it to give this demo chat ownership." : submitted @@ -453,14 +478,15 @@ export async function openLink(url: string) { ? "Back to the board" : "Submit demo result"; action.addEventListener("click", () => { + if (task.run !== run) { dialog.close(); return; } if (submitted) { dialog.close(); return; } - if (task.run.state === "launching") { - task.run.state = "running"; - task.run.owner = "Demo chat"; - task.run.threadId = crypto.randomUUID(); + if (run.state === "launching") { + run.state = "running"; + run.owner = "Demo chat"; + run.threadId = crypto.randomUUID(); task.status = "in_progress"; note( task, @@ -473,7 +499,7 @@ export async function openLink(url: string) { "The card is now In progress, with one owner. Simulate a result to send it to Review."; action.textContent = "Submit demo result"; } else { - task.run.state = "submitted"; + run.state = "submitted"; task.status = "review"; note( task, diff --git a/site/src/demo/seed.json b/site/src/demo/seed.json index cab75f2..4db11f5 100644 --- a/site/src/demo/seed.json +++ b/site/src/demo/seed.json @@ -108,8 +108,8 @@ "projectId": "23979a33-688a-4616-a53e-e7d756eba742", "boardId": "b38a5ef6-2857-42f6-b6ef-8b0f8c8edadd", "number": 1, - "title": "Make onboarding feel effortless", - "description": "Help a new user get from installation to their first useful task. Keep the flow short and make each next step clear.", + "title": "Guide users through their first task", + "description": "Show new users how to open a board, add a task, and start a chat.", "criteria": "Keep keyboard navigation working.\nVerify the changed behavior in the board.", "status": "backlog", "priority": "high", @@ -474,7 +474,7 @@ "taskId": "2c33d5ff-6b8c-4b1c-8994-b66f6813b274", "kind": "submitted", "actor": "Release chat", - "note": "Clean installation passed. Upgrade from dev.5 to dev.6 retained the saved task. All 36 packaged files verified.", + "note": "Clean installation passed. Upgrading retained the saved task. All 36 packaged files verified.", "createdAt": "2026-10-04T22:52:37.078Z" }, { diff --git a/site/src/index.html b/site/src/index.html index f2093e7..8d49017 100644 --- a/site/src/index.html +++ b/site/src/index.html @@ -4,7 +4,7 @@ - Threadboard — Many chats. One clear plan. + Threadboard — Task boards inside Codex - +

- A local board. Inside Codex. + For Codex desktop

- Many chats.
One clear plan. + Task boards.
Inside Codex.

- Give each card a goal, hand it to a chat, and bring the work back - for review. Threadboard keeps the whole project in view. + Plan your project, start a chat from a task, and review the result + on the same card. Your boards stay on your device.

- Open source · No board account · Stored + Open source · Free to use · Stored locally

@@ -205,22 +205,22 @@

01Know what’s next. Goals, priorities, and + >Plan the task. Goals, priorities, and prerequisites live on the card.

02Know who has it. A claim gives one chat + >Assign a chat. A claim gives one chat ownership of the task.

03Know what came back. Results wait in Review - until you make the call.Review the result. Read the changes and checks, + then accept the work or request changes.

@@ -231,9 +231,9 @@

aria-labelledby="workflow-title" >
-

THE HANDOFF, WITHOUT THE HUNT

+

How it works

- A task can outlive
the chat that started it. + From task
to finished work.

Keep the brief, the owner, and the result in one place. Here’s the @@ -258,7 +258,7 @@

01ReadyMake the outcome clear.Write the goal and checks.

@@ -362,7 +362,7 @@

Package a one-command installation

ILLUSTRATED HANDOFF / EXAMPLE TASKExample task @@ -373,7 +373,7 @@

Package a one-command installation

>
-
THE RESULT HAS A HOME
+
Task review
Your review
is a real step.
+ >
-

A FINISHED CHAT ISN’T THE FINISH LINE

-

Read the result.
Make the call.

+

Review

+

See what changed.
Decide what’s done.

A chat submits its work with a short progress note and the checks it ran. You can see the brief and the result together. @@ -404,8 +404,8 @@

Read the result.
Make the call.

>↩ Request changes

- Threadboard moves on deliberate task updates. It doesn’t read your - conversation history or guess whether a chat is finished. + The chat adds notes to the card and submits its result for review. + Threadboard does not read your conversation history.

Read the result.
Make the call. >
-

PROJECT FIRST, BOARD SECOND

+

Your projects

- Your projects.
Room for every kind of work. + One project.
As many boards as you need.

@@ -481,11 +481,11 @@

>
-

SMALL FOOTPRINT. CLEAR BOUNDARIES.

+

Local storage

The board lives
on your machine.

- No hosted board service. No board account. Your tasks live in a - local SQLite database, separate from the replaceable plugin files. + Your tasks are saved on your device. Plugin updates and + uninstalling Threadboard leave your boards intact.

@@ -525,8 +525,8 @@

The board lives
on your machine.

- Threadboard stores task content, chat references, and deliberate - updates. It does not open transcript files. Task information you + Threadboard stores your tasks, notes, and chat links locally. + Task information you choose to use in a chat still goes through your normal Codex account and model service.
@@ -534,7 +534,7 @@

The board lives
on your machine.

↻ -

Changes without the churn.

+

Updates while you work.

A visible board checks a small local revision once a second. Cards reload after a change. Hidden panels pause, and open @@ -552,7 +552,7 @@

Your work survives updates.

⌘ -

Built for your workspace.

+

Keyboard and theme support.

Use the keyboard, work in a narrow panel, and follow your Codex theme. Threadboard stays beside the chats doing the work. @@ -566,8 +566,8 @@

Built for your workspace.

aria-labelledby="faq-title" >
-

BEFORE YOU INSTALL

-

A few good questions.

+

Requirements

+

Before you install.

Threadboard is an open-source preview. Here’s what it does today.

@@ -593,7 +593,7 @@

A few good questions.

Start in new chat opens Codex with a prepared task prompt. Send it to begin. You can also ask an existing chat to claim a card. A claim gives one chat ownership; it does not - quietly dispatch model turns in the background. + start work until you send the prompt.

@@ -657,11 +657,11 @@

A few good questions.

>
- Actual interface / example projectsExample projects span { - display: flex; - gap: 9px; - align-items: center; -} -.shot-label .icon { - width: 18px; - height: 18px; -} -.zoom-button { - display: flex; - gap: 7px; - align-items: center; - background: none; - font-size: 10px; - color: var(--muted); - padding: 6px; -} -.zoom-button:hover { - color: var(--ink); -} -.zoom-button .icon { - width: 13px; - height: 13px; -} .image-button { display: block; padding: 0; @@ -414,15 +333,6 @@ strong { width: 100%; cursor: zoom-in; } -.product-shot figcaption { - display: flex; - justify-content: space-between; - padding: 12px 22px; - color: var(--soft); - font-size: 10px; - border-top: 1px solid var(--line); - line-height: 1.5; -} .board-notes { display: grid; grid-template-columns: repeat(3, 1fr); @@ -701,22 +611,6 @@ strong { box-shadow: 0 10px 30px #0002; border: 1px solid var(--line); } -.image-stamp { - position: absolute; - bottom: 44px; - right: -30px; - border: 1px solid var(--line); - background: var(--accent); - color: var(--accent-ink); - font-size: 13px; - font-weight: 500; - line-height: 1.35; - padding: 19px 24px; - transform: rotate(6deg); - border-radius: 3px; - box-shadow: 0 5px 15px #0001; - pointer-events: none; -} .review-copy > p:not(.eyebrow) { color: var(--muted); font-size: 15px; @@ -1103,25 +997,25 @@ strong { align-items: center; } .install-section .eyebrow { - color: #584661; + color: #575249; } .install-copy > p:not(.eyebrow) { font-size: 15px; max-width: 300px; margin-top: 24px; line-height: 1.6; - color: #584661; + color: #575249; } .download-button { - background: #352d3e; - color: #f2eaf9; + background: #2d2b26; + color: #f7f5f0; margin-top: 32px; font-size: 13px; gap: 12px; padding-inline: 21px; } .download-button:hover { - background: #4a3d56; + background: #444036; } .download-button .icon { width: 18px; @@ -1137,15 +1031,15 @@ strong { font-size: 9px; margin-top: 15px; max-width: none; - color: #584661; + color: #575249; } .checksum-link { font-size: 9px; margin-top: 8px; display: inline-flex; gap: 13px; - color: #584661; - border-bottom: 1px solid #58466155; + color: #575249; + border-bottom: 1px solid #57524955; padding-bottom: 2px; } .install-instructions { @@ -1165,11 +1059,11 @@ strong { font-size: 11px; background: none; border-bottom: 2px solid transparent; - color: #584661; + color: #575249; } .install-tabs button[aria-selected="true"] { - color: #352d3e; - border-color: #352d3e; + color: #2d2b26; + border-color: #2d2b26; font-weight: 600; } .install-panel { @@ -1211,9 +1105,9 @@ strong { align-items: center; justify-content: space-between; padding: 14px 13px; - background: #352d3e; + background: #2d2b26; border-radius: 5px; - color: #f2eaf9; + color: #f7f5f0; margin-top: 11px; } .code-line code { @@ -1233,8 +1127,8 @@ strong { } .code-block { position: relative; - background: #352d3e; - color: #f2eaf9; + background: #2d2b26; + color: #f7f5f0; border-radius: 5px; margin: 18px 0; padding: 17px 37px 17px 15px; @@ -1253,7 +1147,7 @@ strong { border-top: 1px solid #6b587640; padding-top: 18px; font-size: 9px; - color: #584661; + color: #575249; line-height: 1.7; } .install-help a { @@ -1261,7 +1155,7 @@ strong { white-space: nowrap; } .install-section :focus-visible { - outline-color: #352d3e; + outline-color: #2d2b26; } .open-source-section { display: flex; @@ -1378,14 +1272,6 @@ strong { text-decoration: underline; text-underline-offset: 3px; } -@media (min-width: 1600px) { - .hero { - padding-block: 112px 96px; - } - .hero h1 { - font-size: 112px; - } -} @media (max-width: 1100px) { .wrap { width: calc(100% - 72px); @@ -1399,14 +1285,6 @@ strong { .site-header nav a:nth-child(2) { display: none; } - .hero { - gap: 15px; - padding-block: 65px; - } - .hero h1 { - font-size: 80px; - letter-spacing: -4px; - } .hero-description { font-size: 15px; max-width: 330px; @@ -1470,14 +1348,6 @@ strong { .button.small { font-size: 11px; } - .hero { - gap: 15px; - padding-block: 58px 50px; - } - .hero h1 { - font-size: clamp(54px, 9.3vw, 76px); - letter-spacing: -3px; - } .hero .eyebrow { font-size: 8px; letter-spacing: 1px; @@ -1569,12 +1439,6 @@ strong { .review-image { padding: 22px; } - .image-stamp { - font-size: 10px; - padding: 14px 18px; - right: -18px; - bottom: 28px; - } .review-copy .eyebrow { font-size: 8px; letter-spacing: 1px; @@ -1751,9 +1615,6 @@ strong { .board-notes strong { font-size: 12px; } - .figure-topline { - font-size: 9px; - } } @media (max-width: 600px) { .wrap { @@ -1790,17 +1651,6 @@ strong { font-size: 10px; gap: 8px; } - .hero { - grid-template-columns: 1fr; - padding-top: 49px; - padding-bottom: 36px; - gap: 18px; - } - .hero h1 { - font-size: clamp(62px, 14.7vw, 87px); - letter-spacing: -3.5px; - margin-bottom: 29px; - } .hero .eyebrow { font-size: 9px; margin-bottom: 25px; @@ -1826,40 +1676,6 @@ strong { gap: 7px; margin-top: 17px; } - .figure-topline > span:last-child { - font-size: 8px; - } - .figure-topline .mono { - font-size: 7px; - letter-spacing: 1px; - } - .shot-label { - padding: 11px 12px; - font-size: 9px; - } - .zoom-button { - font-size: 8px; - gap: 4px; - } - .zoom-button .icon { - width: 12px; - height: 12px; - } - .shot-label .icon { - width: 16px; - height: 16px; - } - .product-shot { - border-radius: 6px; - } - .product-shot figcaption { - padding: 10px 12px; - font-size: 8px; - display: block; - } - .product-shot figcaption span { - display: none; - } .board-notes { grid-template-columns: 1fr; gap: 15px; @@ -2003,12 +1819,6 @@ strong { width: 100%; justify-self: center; } - .image-stamp { - right: -10px; - bottom: 35px; - font-size: 11px; - padding: 17px 22px; - } .corner-label { font-size: 8px; margin-bottom: 16px; @@ -2347,10 +2157,6 @@ body.image-open { width: 37px; padding: 8px; } - .hero h1 { - font-size: 52px; - letter-spacing: -2.9px; - } .hero-actions { gap: 17px; } @@ -2364,7 +2170,7 @@ body.image-open { } } -/* The hero uses the actual application, with its original UI and stylesheet. */ + .hero { display: block; padding-block: 60px 34px; @@ -2593,3 +2399,23 @@ body.image-open { font-size: 9px; } } + +@media (max-width: 800px) { + .workflow-footnote, + .example-brief, + .criteria-block li, + .example-update p, + .stage-caption p, + .review-copy > p.subtle, + .local-diagram figcaption, + .local-details p, + .faq-list details > p, + .install-panel p { + font-size: 14px; + } + .step-tabs small, + .board-notes p, + .open-source-section p { + font-size: 12px; + } +} diff --git a/site/tests/site.spec.ts b/site/tests/site.spec.ts index dbf0515..4c88297 100644 --- a/site/tests/site.spec.ts +++ b/site/tests/site.spec.ts @@ -66,7 +66,7 @@ test("installation is actionable; the downloadable ZIP matches its checksum", as .first() .click(); await expect( - page.getByRole("heading", { name: "Put a board behind the work." }), + page.getByRole("heading", { name: "Add Threadboard to Codex." }), ).toBeInViewport(); await page.getByRole("tab", { name: "With the Codex CLI" }).click(); await expect(page.locator("#cli-instructions")).toBeVisible(); @@ -129,6 +129,9 @@ for (const theme of ["dark", "light"]) })), `Accessibility at ${width}px`, ).toEqual([]); + if (width === 1440 || width === 390) { + await page.screenshot({ path: `test-results/site-${theme}-${width}.png` }); + } } await page.setViewportSize({ width: 390, height: 844 }); await page @@ -176,7 +179,7 @@ test("the actual app demo can edit, move, create, filter, switch boards and rese ); await app.getByRole("button", { name: "Close dialog" }).click(); await app - .getByRole("button", { name: /^Make onboarding feel effortless/ }) + .getByRole("button", { name: /^Guide users through their first task/ }) .click(); const detail = app.getByRole("dialog", { name: "TB-1 · Orbit" }); await detail @@ -244,7 +247,7 @@ test("the actual app demo can edit, move, create, filter, switch boards and rese await expect(app.getByRole("region", { name: "Board picker" })).toBeVisible(); await app.getByRole("button", { name: /^Open General, Atlas,/ }).click(); await expect( - app.getByText("Start with one clear task.", { exact: true }), + app.getByText("Add your first task.", { exact: true }), ).toBeVisible(); await page.getByRole("button", { name: "Reset demo board" }).click(); await expect( @@ -252,7 +255,7 @@ test("the actual app demo can edit, move, create, filter, switch boards and rese ).toBeVisible(); await expect(app.locator(".task-card")).toHaveCount(9); await expect( - app.getByRole("button", { name: /^Make onboarding feel effortless/ }), + app.getByRole("button", { name: /^Guide users through their first task/ }), ).toBeVisible(); expect(calls).toEqual([]); }); @@ -298,3 +301,26 @@ test("the demo handoff reserves a card, starts one owner, submits to Review and requests.some((url) => /codex:|\/api(?:\?|$)|api\.openai/.test(url)), ).toBe(false); }); + +test("released demo chats become unassigned and new activity appears first", async ({ page }) => { + await page.goto("/"); + const app = page.frameLocator("#app-demo"); + await app.getByRole("button", { name: /^Preserve tasks across plugin updates/ }).click(); + const detail = app.getByRole("dialog", { name: "TB-5 · Orbit" }); + await detail.getByRole("textbox", { name: "Add a note" }).fill("Latest demo update"); + await detail.getByRole("button", { name: "Add note", exact: true }).click(); + await expect(detail.locator(".events .event").first()).toContainText("Latest demo update"); + await detail.getByRole("button", { name: "Release ownership" }).click(); + await expect(detail.getByText("No chat assigned", { exact: true })).toBeVisible(); + await detail.getByRole("button", { name: "Close dialog" }).click(); + await app.getByRole("combobox", { name: "Filter tasks" }).selectOption("unassigned"); + await expect(app.getByTestId("task-5")).toBeVisible(); + + await app.getByTestId("task-1").getByRole("button", { name: /^Guide users/ }).click(); + await app.getByRole("button", { name: "Start in new chat" }).click(); + const chat = app.getByRole("dialog", { name: "Demo chat handoff" }); + await expect(chat.getByRole("button", { name: "Send demo prompt" })).toBeVisible(); + await chat.press("Escape"); + await expect(chat).toHaveCount(0); + await expect(app.getByRole("dialog", { name: "TB-1 · Orbit" })).toBeVisible(); +}); diff --git a/src/store.ts b/src/store.ts index cc17954..61ba853 100644 --- a/src/store.ts +++ b/src/store.ts @@ -209,7 +209,7 @@ export class Store { createdAt: raw.created_at, expiresAt: raw.expires_at }; } private task(raw: Row, full = true, summary?: { run?: Row; dependencies: Task['dependencies'] }): Task { - const run = summary ? summary.run : this.prepare("SELECT * FROM runs WHERE task_id=? AND (state IN ('launching','running') OR (state='submitted' AND ? IN ('review','done'))) ORDER BY created_at DESC LIMIT 1").get(raw.id, raw.status) as Row | undefined; + const run = summary ? summary.run : this.prepare("SELECT * FROM runs WHERE task_id=? AND (state IN ('launching','running') OR (state='submitted' AND ? IN ('review','done'))) ORDER BY rowid DESC LIMIT 1").get(raw.id, raw.status) as Row | undefined; const dependencies = summary ? summary.dependencies : this.prepare('SELECT t.id,t.number,t.title,t.status FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id=? ORDER BY t.number').all(raw.id) as Row[]; return { id: raw.id, projectId: raw.project_id, boardId: raw.board_id, number: raw.number, title: raw.title, description: full ? raw.description : raw.description.slice(0, 140), criteria: full ? raw.criteria : '', @@ -220,7 +220,7 @@ export class Store { private summaries(rows: Row[]): Task[] { if (!rows.length) return []; const placeholders = rows.map(() => '?').join(','), ids = rows.map(row => row.id); - const runs = this.prepare(`SELECT r.* FROM runs r JOIN tasks t ON t.id=r.task_id WHERE r.task_id IN (${placeholders}) AND (r.state IN ('launching','running') OR (r.state='submitted' AND t.status IN ('review','done'))) ORDER BY r.created_at DESC,r.id`).all(...ids) as Row[]; + const runs = this.prepare(`SELECT r.* FROM runs r JOIN tasks t ON t.id=r.task_id WHERE r.task_id IN (${placeholders}) AND (r.state IN ('launching','running') OR (r.state='submitted' AND t.status IN ('review','done'))) ORDER BY r.rowid DESC`).all(...ids) as Row[]; const runByTask = new Map(); for (const run of runs) if (!runByTask.has(run.task_id)) runByTask.set(run.task_id, run); const dependencies = this.prepare(`SELECT d.task_id,t.id,t.number,t.title,t.status FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id IN (${placeholders}) ORDER BY t.number`).all(...ids) as Row[]; @@ -272,7 +272,10 @@ export class Store { } } else { const root = project.rootPaths.includes(existing.root) ? existing.root : project.rootPaths[0]; - this.prepare('UPDATE projects SET name=?,root=?,roots=?,codex_bound=1 WHERE id=?').run(project.name, root, JSON.stringify(project.rootPaths), project.id); + const rootPaths = JSON.stringify(project.rootPaths); + if (existing.name !== project.name || existing.root !== root || existing.roots !== rootPaths || !existing.codex_bound) { + this.prepare('UPDATE projects SET name=?,root=?,roots=?,codex_bound=1 WHERE id=?').run(project.name, root, rootPaths, project.id); + } } this.ensureDefaultBoard(project.id); } @@ -345,6 +348,12 @@ export class Store { return this.transaction(() => { const row = this.row(input.taskId, input.projectId); this.checkVersion(row, input.version); if (row.archived) fail('ARCHIVED', 'Restore this task before moving it.'); + if (input.status === row.status) { + if (input.rank === undefined || input.rank === row.rank) return this.task(row); + this.prepare('UPDATE tasks SET rank=?,version=version+1,updated_at=? WHERE id=?').run(input.rank, now(), row.id); + this.event(row, 'reordered', 'You'); + return this.task(this.row(row.id)); + } const active = this.activeRun(row.id); if (input.status === 'in_progress' && active?.state !== 'running') fail('CLAIM_REQUIRED', 'Start this task in Codex or claim it from an existing chat.'); if (input.status === 'review' && active?.state === 'launching') fail('NOT_RUNNING', 'The new chat must bind to its task before submitting work.'); @@ -377,12 +386,11 @@ export class Store { this.event(row, 'dependency', 'You', input.remove ? 'Removed prerequisite' : 'Added prerequisite'); return this.task(this.row(row.id)); }); } - private eligible(row: Row) { + private readyToStart(row: Row) { if (row.archived || row.status === 'done' || row.status === 'review') fail('NOT_READY', 'Restore this task or move it to Ready before starting work.'); if (row.blocked_reason) fail('BLOCKED', 'This task is blocked. Resolve its blocked reason first.'); const dependency = this.prepare("SELECT t.number FROM dependencies d JOIN tasks t ON t.id=d.prerequisite_id WHERE d.task_id=? AND t.status <> 'done' LIMIT 1").get(row.id) as Row | undefined; if (dependency) fail('PREREQUISITE', `Finish TB-${dependency.number} before starting this task.`); - if (this.activeRun(row.id)) fail('ALREADY_CLAIMED', 'Another chat already owns this task. Open its chat or explicitly release it.'); } claim(input: { projectId: string; taskId: string; version: number; attemptId: string; token: string; owner: string; threadId?: string; launching?: boolean }): { task: Task; run: Run; token: string } { return this.transaction(() => { @@ -392,7 +400,9 @@ export class Store { if (prior.task_id !== input.taskId || prior.token_hash !== hash(input.token)) fail('OPERATION_CONFLICT', 'That attempt ID belongs to another claim.'); return { task: this.task(this.row(prior.task_id)), run: this.run(prior), token: input.token }; } - const row = this.row(input.taskId, input.projectId); this.eligible(row); this.checkVersion(row, input.version); + const row = this.row(input.taskId, input.projectId); this.readyToStart(row); + if (this.activeRun(row.id)) fail('ALREADY_CLAIMED', 'Another chat already owns this task. Open its chat or explicitly release it.'); + this.checkVersion(row, input.version); const id = randomUUID(), created = now(); const expiry = input.launching ? new Date(Date.now() + 15 * 60_000).toISOString() : null; this.prepare('INSERT INTO runs(id,task_id,state,owner,thread_id,token_hash,attempt_id,created_at,expires_at) VALUES(?,?,?,?,?,?,?,?,?)') @@ -419,6 +429,7 @@ export class Store { } if (run.state !== 'launching') fail('INVALID_RUN', 'This reservation is no longer active. Start a new run explicitly.'); if (run.expires_at < now()) fail('EXPIRED_LAUNCH', 'This launch reservation expired. Release it and start again.'); + this.readyToStart(this.row(run.task_id)); this.prepare("UPDATE runs SET state='running',owner=?,thread_id=?,expires_at=NULL WHERE id=?").run(input.owner, input.threadId || null, run.id); this.prepare("UPDATE tasks SET status='in_progress',version=version+1,updated_at=? WHERE id=?").run(now(), run.task_id); this.event(this.row(run.task_id), 'started', input.owner); diff --git a/src/ui/board-data.ts b/src/ui/board-data.ts new file mode 100644 index 0000000..99fe05b --- /dev/null +++ b/src/ui/board-data.ts @@ -0,0 +1,16 @@ +import type { Board } from '../types.js'; + +// Offset pages are safe to combine only while their revision stays unchanged. +export async function readBoardPages(read: (offset: number) => Promise, wanted = 200): Promise { + for (let attempt = 0; attempt < 3; attempt++) { + let snapshot = await read(0); + let changed = false; + while (snapshot.nextOffset !== null && snapshot.tasks.length < wanted) { + const next = await read(snapshot.nextOffset); + if (next.revision !== snapshot.revision) { changed = true; break; } + snapshot = { ...next, tasks: [...snapshot.tasks, ...next.tasks] }; + } + if (!changed) return snapshot; + } + throw new Error('The board changed while loading. Refresh to try again.'); +} diff --git a/src/ui/main.tsx b/src/ui/main.tsx index a38478e..c2ef33b 100644 --- a/src/ui/main.tsx +++ b/src/ui/main.tsx @@ -1,10 +1,11 @@ import React, { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode } from 'react'; import { createRoot } from 'react-dom/client'; import { createPortal } from 'react-dom'; -import { Archive, ArrowDown, ArrowRight, ArrowUpRight, Check, CheckCircle2, ChevronDown, ChevronRight, Circle, CircleDot, Clipboard, Download, Flag, FolderOpen, GripVertical, Kanban, Link2, LockKeyhole, Maximize2, MessageSquare, MoreHorizontal, Plus, RefreshCw, Search, Send, ShieldCheck, Sparkles, X } from 'lucide-react'; +import { Archive, ArrowDown, ArrowRight, ArrowUpRight, Check, CheckCircle2, ChevronDown, ChevronRight, Circle, CircleDot, Clipboard, Download, Flag, FolderOpen, Kanban, Link2, LockKeyhole, Maximize2, MessageSquare, MoreHorizontal, Plus, RefreshCw, Search, Send, ShieldCheck, X } from 'lucide-react'; import { call, claimIds, openFullView, openLink, requestBoardChat, setBoardContext, share, start } from './bridge.js'; import type { BoardLocation } from './navigation.js'; import { watchLocalChanges } from './live.js'; +import { readBoardPages } from './board-data.js'; import { PRIORITIES, STATUSES, STATUS_LABELS, type Board, type BoardChatRequest, type InitialData, type Launch, type Priority, type Project, type ProjectBoard, type ProjectCatalogue, type Status, type Task, type TaskDetail } from '../types.js'; import './styles.css'; @@ -28,6 +29,7 @@ function Dialog({ title, children, close, wide = false }: { title: string; child const selector = 'button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),a[href],[tabindex="0"]'; ref.current?.querySelector(selector)?.focus(); const onKey = (event: KeyboardEvent) => { + if (document.querySelector('dialog[open]')) return; if (event.key === 'Escape') { event.stopPropagation(); close(); } if (event.key === 'Tab') { const nodes = Array.from(ref.current?.querySelectorAll(selector) || []).filter(el => el.getClientRects().length); @@ -220,8 +222,9 @@ function Threadboard() { const [launches, setLaunches] = useState>({}); const searchRef = useRef(null), selectedProject = useRef(null), selectedBoard = useRef(null), inFlight = useRef(false); const liveRevision = useRef(undefined), interaction = useRef(0), liveChecking = useRef(false); - const liveView = useRef({ board, detail, busy, loading, dragOver }); - liveView.current = { board, detail, busy, loading, dragOver }; + const taskRead = useRef(0); + const liveView = useRef({ board, detail, busy, loading, dragOver, newBoard, newTaskStatus }); + liveView.current = { board, detail, busy, loading, dragOver, newBoard, newTaskStatus }; const notify = (message: string) => setToast(message); useEffect(() => { let alive = true; @@ -265,17 +268,7 @@ function Threadboard() { let next: Board | null = null, nextDetail: TaskDetail | null = null; if (snapshot.board && projects.some(project => project.id === snapshot.board!.project.id)) { const args = { projectId: snapshot.board.project.id, boardId: snapshot.board.board.id, archived }; - let refreshed: Board = await call('get_board', args); - // Keep pages the user already loaded. Retry if a writer changes the - // database between pages, rather than combining different snapshots. - const wanted = Math.max(200, Math.ceil(snapshot.board.tasks.length / 200) * 200); - while (refreshed.nextOffset !== null && refreshed.tasks.length < wanted) { - if (!current()) return; - const more: Board = await call('get_board', { ...args, offset: refreshed.nextOffset }); - if (more.revision !== refreshed.revision) return; - refreshed = { ...more, tasks: [...refreshed.tasks, ...more.tasks] }; - } - next = refreshed; + next = await readBoardPages(offset => call('get_board', { ...args, offset }), snapshot.board.tasks.length); if (!current()) return; if (snapshot.detail) nextDetail = await call('get_task', { projectId: args.projectId, taskId: snapshot.detail.task.id }); } @@ -303,15 +296,17 @@ function Threadboard() { const keyboard = (event: KeyboardEvent) => { if (newBoard || newTaskStatus || detail) return; if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'k') { event.preventDefault(); searchRef.current?.focus(); return; } - if (['INPUT','TEXTAREA','SELECT'].includes((event.target as HTMLElement)?.tagName)) return; + if (event.metaKey || event.ctrlKey || event.altKey || event.repeat || busy || loading) return; + if ((event.target as HTMLElement)?.closest('input,textarea,select,[contenteditable="true"],[role="menu"]')) return; if (event.key.toLowerCase() === 'n' && board) { event.preventDefault(); setNewTaskStatus('backlog'); } }; document.addEventListener('keydown', keyboard); return () => document.removeEventListener('keydown', keyboard); - }, [board, newBoard, newTaskStatus, detail]); + }, [board, newBoard, newTaskStatus, detail, busy, loading]); async function load(projectId: string, showArchive = archived, boardId = selectedBoard.current) { const epoch = ++interaction.current; - const next = await call('get_board', { projectId, ...(boardId ? { boardId } : {}), archived: showArchive }); + const wanted = board?.board.id === boardId && archived === showArchive ? board.tasks.length : 200; + const next = await readBoardPages(offset => call('get_board', { projectId, ...(boardId ? { boardId } : {}), archived: showArchive, offset }), wanted); if (interaction.current === epoch && selectedProject.current === projectId && selectedBoard.current === boardId) { liveRevision.current = next.revision; selectedBoard.current = next.board.id; setBoard(next); } return next; } @@ -398,8 +393,39 @@ function Threadboard() { finally { inFlight.current = false; setBusy(false); } } async function openTask(task: Task) { - interaction.current++; - try { setDetail(await call('get_task', { projectId: task.projectId, taskId: task.id })); } catch (error: any) { notify(error.message); } + const epoch = ++interaction.current, request = ++taskRead.current; + const current = () => request === taskRead.current && epoch === interaction.current + && selectedProject.current === task.projectId && selectedBoard.current === task.boardId + && !liveView.current.newBoard && !liveView.current.newTaskStatus; + try { + const next = await call('get_task', { projectId: task.projectId, taskId: task.id }); + if (current()) setDetail(next); + } catch (error: any) { if (current()) notify(error.message); } + } + function closeTask() { + taskRead.current++; interaction.current++; setDetail(null); + } + async function switchArchive(showArchive: boolean) { + if (!board || inFlight.current || loading || archived === showArchive) return; + setLoading(true); setArchived(showArchive); setError(''); + const pending = load(board.project.id, showArchive), epoch = interaction.current; + try { await pending; } + catch (error: any) { if (epoch === interaction.current) { setArchived(archived); setError(error.message); } } + finally { if (epoch === interaction.current) setLoading(false); } + } + async function loadMore() { + if (!board || board.nextOffset === null || inFlight.current) return; + inFlight.current = true; setBusy(true); + const epoch = ++interaction.current; + try { + const args = { projectId: board.project.id, boardId: board.board.id, archived }; + const more = await call('get_board', { ...args, offset: board.nextOffset }); + const next = more.revision === board.revision + ? { ...more, tasks: [...board.tasks, ...more.tasks] } + : await readBoardPages(offset => call('get_board', { ...args, offset }), board.tasks.length + 200); + if (epoch === interaction.current) { liveRevision.current = next.revision; setBoard(next); } + } catch (error: any) { notify(error.message); } + finally { inFlight.current = false; setBusy(false); } } async function move(task: Task, status: Status) { if (!board || task.status === status || busy) return; @@ -425,41 +451,41 @@ function Threadboard() { const doneRatio = board?.total ? Math.round((board.counts.done / board.total) * 100) : 0; const activeProject = projects.find(project => project.id === projectId); - return
-