@huddle01/iframe
Advanced tools
Comparing version 0.0.11-alpha.1 to 0.0.11-alpha.2
@@ -5,10 +5,13 @@ import HuddleIframe from './components/HuddleIframe'; | ||
initialize: (eventData: { | ||
wallets: ("walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect" | "*" | "metamask")[]; | ||
hostName?: boolean | undefined; | ||
iframeEmbed?: boolean | undefined; | ||
logoUrl?: string | undefined; | ||
background?: string | undefined; | ||
redirectUrlOnLeave?: string | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
lobbyLoginMessage?: string | undefined; | ||
lobbyTitle?: string | undefined; | ||
lobbyDescription?: string | undefined; | ||
isCopyMeetingVisible?: boolean | undefined; | ||
defaultChainId?: number | undefined; | ||
virtualBgs?: string[] | undefined; | ||
logoHeight?: number | undefined; | ||
logoWidth?: number | undefined; | ||
walletAddress?: string | undefined; | ||
redirectUrlOnLeave?: boolean | undefined; | ||
}) => Promise<void>; | ||
@@ -15,0 +18,0 @@ muteMic: () => void; |
@@ -20,30 +20,60 @@ import { TRecData, TRejectReasons } from 'types/dist/common.types'; | ||
export type TReaction = (typeof reactions)[number]; | ||
export declare const AllowedWalletsSchema: z.ZodUnion<[z.ZodLiteral<"walletconnect">, z.ZodLiteral<"keplr">, z.ZodLiteral<"templewallet">, z.ZodLiteral<"phantom">, z.ZodLiteral<"beacon">, z.ZodLiteral<"okxwallet">, z.ZodLiteral<"suku">, z.ZodLiteral<"lens">, z.ZodLiteral<"ud">, z.ZodLiteral<"cyberconnect">, z.ZodLiteral<"*">, z.ZodLiteral<"metamask">]>; | ||
export declare const ClientConfigSchema: z.ZodObject<{ | ||
hostName: z.ZodOptional<z.ZodBoolean>; | ||
iframeEmbed: z.ZodOptional<z.ZodBoolean>; | ||
logoUrl: z.ZodOptional<z.ZodString>; | ||
background: z.ZodOptional<z.ZodString>; | ||
redirectUrlOnLeave: z.ZodOptional<z.ZodString>; | ||
wallets: z.ZodOptional<z.ZodArray<z.ZodEnum<["*", ...("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect")[]]>, "many">>; | ||
lobbyLoginMessage: z.ZodOptional<z.ZodString>; | ||
lobbyTitle: z.ZodOptional<z.ZodString>; | ||
lobbyDescription: z.ZodOptional<z.ZodString>; | ||
isCopyMeetingVisible: z.ZodOptional<z.ZodBoolean>; | ||
defaultChainId: z.ZodOptional<z.ZodNumber>; | ||
wallets: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"walletconnect">, z.ZodLiteral<"keplr">, z.ZodLiteral<"templewallet">, z.ZodLiteral<"phantom">, z.ZodLiteral<"beacon">, z.ZodLiteral<"okxwallet">, z.ZodLiteral<"suku">, z.ZodLiteral<"lens">, z.ZodLiteral<"ud">, z.ZodLiteral<"cyberconnect">, z.ZodLiteral<"*">, z.ZodLiteral<"metamask">]>, "many">>; | ||
virtualBgs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
logoHeight: z.ZodOptional<z.ZodNumber>; | ||
logoWidth: z.ZodOptional<z.ZodNumber>; | ||
walletAddress: z.ZodOptional<z.ZodString>; | ||
redirectUrlOnLeave: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
wallets: ("walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect" | "*" | "metamask")[]; | ||
hostName?: boolean | undefined; | ||
iframeEmbed?: boolean | undefined; | ||
logoUrl?: string | undefined; | ||
background?: string | undefined; | ||
redirectUrlOnLeave?: string | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
lobbyLoginMessage?: string | undefined; | ||
lobbyTitle?: string | undefined; | ||
lobbyDescription?: string | undefined; | ||
isCopyMeetingVisible?: boolean | undefined; | ||
defaultChainId?: number | undefined; | ||
virtualBgs?: string[] | undefined; | ||
logoHeight?: number | undefined; | ||
logoWidth?: number | undefined; | ||
walletAddress?: string | undefined; | ||
redirectUrlOnLeave?: boolean | undefined; | ||
}, { | ||
hostName?: boolean | undefined; | ||
iframeEmbed?: boolean | undefined; | ||
logoUrl?: string | undefined; | ||
background?: string | undefined; | ||
redirectUrlOnLeave?: string | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
lobbyLoginMessage?: string | undefined; | ||
lobbyTitle?: string | undefined; | ||
lobbyDescription?: string | undefined; | ||
isCopyMeetingVisible?: boolean | undefined; | ||
defaultChainId?: number | undefined; | ||
wallets?: ("walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "suku" | "lens" | "ud" | "cyberconnect" | "*" | "metamask")[] | undefined; | ||
virtualBgs?: string[] | undefined; | ||
logoHeight?: number | undefined; | ||
logoWidth?: number | undefined; | ||
walletAddress?: string | undefined; | ||
redirectUrlOnLeave?: boolean | undefined; | ||
}>; | ||
export declare const RecordingDataSchema: z.ZodObject<{ | ||
size: z.ZodNumber; | ||
duration: z.ZodNumber; | ||
s3URL: z.ZodString; | ||
ipfsURL: z.ZodString; | ||
uploadToIpfs: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
size: number; | ||
duration: number; | ||
s3URL: string; | ||
ipfsURL: string; | ||
uploadToIpfs?: boolean | undefined; | ||
}, { | ||
size: number; | ||
duration: number; | ||
s3URL: string; | ||
ipfsURL: string; | ||
uploadToIpfs?: boolean | undefined; | ||
}>; | ||
export type TRecordingData = z.infer<typeof RecordingDataSchema>; | ||
type TPreviewPeers = { | ||
@@ -74,3 +104,3 @@ displayName: string; | ||
'room:recording-stopping': []; | ||
'room:recording-stopped': []; | ||
'room:recording-stopped': [TRecordingData]; | ||
'room:recording-data': [TRecData]; | ||
@@ -77,0 +107,0 @@ 'room:livestream-started': []; |
{ | ||
"name": "@huddle01/iframe", | ||
"version": "0.0.11-alpha.1", | ||
"version": "0.0.11-alpha.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/huddle01-iframe.cjs.js", |
@@ -7,33 +7,2 @@ 'use strict'; | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
// Can be used in future to restrict wallets based on chain | ||
@@ -58,15 +27,40 @@ // const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana', "etc"]; | ||
var reactions = ['😂', '😢', '😦', '😍', '🤔', '👀', '🙌', '👍', '👎', '🔥', '🍻', '🚀', '🎉', '❤️', '💯']; | ||
var AllowedWalletsSchema = zod.z.union([zod.z.literal('walletconnect'), zod.z.literal('keplr'), zod.z.literal('templewallet'), zod.z.literal('phantom'), zod.z.literal('beacon'), zod.z.literal('okxwallet'), zod.z.literal('suku'), zod.z.literal('lens'), zod.z.literal('ud'), zod.z.literal('cyberconnect'), zod.z.literal('*'), zod.z.literal('metamask')]); | ||
var ClientConfigSchema = zod.z.object({ | ||
hostName: zod.z["boolean"]().optional(), | ||
iframeEmbed: zod.z["boolean"]().optional(), | ||
logoUrl: zod.z.string().optional(), | ||
background: zod.z.string().optional(), | ||
redirectUrlOnLeave: zod.z.string().optional(), | ||
wallets: zod.z.array(zod.z["enum"](['*'].concat(_toConsumableArray(Object.values(AllowedWallets))))).optional(), | ||
lobbyLoginMessage: zod.z.string().optional(), | ||
lobbyTitle: zod.z.string().optional(), | ||
lobbyDescription: zod.z.string().optional(), | ||
isCopyMeetingVisible: zod.z["boolean"]().optional() | ||
defaultChainId: zod.z.number().optional(), | ||
wallets: zod.z.array(AllowedWalletsSchema)["default"](['*']), | ||
virtualBgs: zod.z.array(zod.z.string()).optional(), | ||
logoHeight: zod.z.number().optional(), | ||
logoWidth: zod.z.number().optional(), | ||
walletAddress: zod.z.string().optional(), | ||
redirectUrlOnLeave: zod.z["boolean"]().optional() | ||
}); | ||
// export const ClientConfigSchema = z.object({ | ||
// logoUrl: z.string().optional(), | ||
// background: z.string().optional(), | ||
// redirectUrlOnLeave: z.string().optional(), | ||
// wallets: z.array(z.enum(['*', ...Object.values(AllowedWallets)])).optional(), | ||
// lobbyLoginMessage: z.string().optional(), | ||
// lobbyTitle: z.string().optional(), | ||
// lobbyDescription: z.string().optional(), | ||
// isCopyMeetingVisible: z.boolean().optional(), | ||
// }); | ||
var RecordingDataSchema = zod.z.object({ | ||
size: zod.z.number(), | ||
duration: zod.z.number(), | ||
s3URL: zod.z.string(), | ||
ipfsURL: zod.z.string(), | ||
uploadToIpfs: zod.z["boolean"]().optional() | ||
}); | ||
exports.AllowedWallets = AllowedWallets; | ||
exports.AllowedWalletsSchema = AllowedWalletsSchema; | ||
exports.ClientConfigSchema = ClientConfigSchema; | ||
exports.RecordingDataSchema = RecordingDataSchema; | ||
exports.reactions = reactions; |
@@ -7,33 +7,2 @@ 'use strict'; | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
// Can be used in future to restrict wallets based on chain | ||
@@ -58,15 +27,40 @@ // const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana', "etc"]; | ||
var reactions = ['😂', '😢', '😦', '😍', '🤔', '👀', '🙌', '👍', '👎', '🔥', '🍻', '🚀', '🎉', '❤️', '💯']; | ||
var AllowedWalletsSchema = zod.z.union([zod.z.literal('walletconnect'), zod.z.literal('keplr'), zod.z.literal('templewallet'), zod.z.literal('phantom'), zod.z.literal('beacon'), zod.z.literal('okxwallet'), zod.z.literal('suku'), zod.z.literal('lens'), zod.z.literal('ud'), zod.z.literal('cyberconnect'), zod.z.literal('*'), zod.z.literal('metamask')]); | ||
var ClientConfigSchema = zod.z.object({ | ||
hostName: zod.z["boolean"]().optional(), | ||
iframeEmbed: zod.z["boolean"]().optional(), | ||
logoUrl: zod.z.string().optional(), | ||
background: zod.z.string().optional(), | ||
redirectUrlOnLeave: zod.z.string().optional(), | ||
wallets: zod.z.array(zod.z["enum"](['*'].concat(_toConsumableArray(Object.values(AllowedWallets))))).optional(), | ||
lobbyLoginMessage: zod.z.string().optional(), | ||
lobbyTitle: zod.z.string().optional(), | ||
lobbyDescription: zod.z.string().optional(), | ||
isCopyMeetingVisible: zod.z["boolean"]().optional() | ||
defaultChainId: zod.z.number().optional(), | ||
wallets: zod.z.array(AllowedWalletsSchema)["default"](['*']), | ||
virtualBgs: zod.z.array(zod.z.string()).optional(), | ||
logoHeight: zod.z.number().optional(), | ||
logoWidth: zod.z.number().optional(), | ||
walletAddress: zod.z.string().optional(), | ||
redirectUrlOnLeave: zod.z["boolean"]().optional() | ||
}); | ||
// export const ClientConfigSchema = z.object({ | ||
// logoUrl: z.string().optional(), | ||
// background: z.string().optional(), | ||
// redirectUrlOnLeave: z.string().optional(), | ||
// wallets: z.array(z.enum(['*', ...Object.values(AllowedWallets)])).optional(), | ||
// lobbyLoginMessage: z.string().optional(), | ||
// lobbyTitle: z.string().optional(), | ||
// lobbyDescription: z.string().optional(), | ||
// isCopyMeetingVisible: z.boolean().optional(), | ||
// }); | ||
var RecordingDataSchema = zod.z.object({ | ||
size: zod.z.number(), | ||
duration: zod.z.number(), | ||
s3URL: zod.z.string(), | ||
ipfsURL: zod.z.string(), | ||
uploadToIpfs: zod.z["boolean"]().optional() | ||
}); | ||
exports.AllowedWallets = AllowedWallets; | ||
exports.AllowedWalletsSchema = AllowedWalletsSchema; | ||
exports.ClientConfigSchema = ClientConfigSchema; | ||
exports.RecordingDataSchema = RecordingDataSchema; | ||
exports.reactions = reactions; |
import { z } from 'zod'; | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
// Can be used in future to restrict wallets based on chain | ||
@@ -53,13 +22,36 @@ // const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana', "etc"]; | ||
var reactions = ['😂', '😢', '😦', '😍', '🤔', '👀', '🙌', '👍', '👎', '🔥', '🍻', '🚀', '🎉', '❤️', '💯']; | ||
var AllowedWalletsSchema = z.union([z.literal('walletconnect'), z.literal('keplr'), z.literal('templewallet'), z.literal('phantom'), z.literal('beacon'), z.literal('okxwallet'), z.literal('suku'), z.literal('lens'), z.literal('ud'), z.literal('cyberconnect'), z.literal('*'), z.literal('metamask')]); | ||
var ClientConfigSchema = z.object({ | ||
hostName: z["boolean"]().optional(), | ||
iframeEmbed: z["boolean"]().optional(), | ||
logoUrl: z.string().optional(), | ||
background: z.string().optional(), | ||
redirectUrlOnLeave: z.string().optional(), | ||
wallets: z.array(z["enum"](['*'].concat(_toConsumableArray(Object.values(AllowedWallets))))).optional(), | ||
lobbyLoginMessage: z.string().optional(), | ||
lobbyTitle: z.string().optional(), | ||
lobbyDescription: z.string().optional(), | ||
isCopyMeetingVisible: z["boolean"]().optional() | ||
defaultChainId: z.number().optional(), | ||
wallets: z.array(AllowedWalletsSchema)["default"](['*']), | ||
virtualBgs: z.array(z.string()).optional(), | ||
logoHeight: z.number().optional(), | ||
logoWidth: z.number().optional(), | ||
walletAddress: z.string().optional(), | ||
redirectUrlOnLeave: z["boolean"]().optional() | ||
}); | ||
export { AllowedWallets, ClientConfigSchema, reactions }; | ||
// export const ClientConfigSchema = z.object({ | ||
// logoUrl: z.string().optional(), | ||
// background: z.string().optional(), | ||
// redirectUrlOnLeave: z.string().optional(), | ||
// wallets: z.array(z.enum(['*', ...Object.values(AllowedWallets)])).optional(), | ||
// lobbyLoginMessage: z.string().optional(), | ||
// lobbyTitle: z.string().optional(), | ||
// lobbyDescription: z.string().optional(), | ||
// isCopyMeetingVisible: z.boolean().optional(), | ||
// }); | ||
var RecordingDataSchema = z.object({ | ||
size: z.number(), | ||
duration: z.number(), | ||
s3URL: z.string(), | ||
ipfsURL: z.string(), | ||
uploadToIpfs: z["boolean"]().optional() | ||
}); | ||
export { AllowedWallets, AllowedWalletsSchema, ClientConfigSchema, RecordingDataSchema, reactions }; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HuddleIframeTypes={})}(this,(function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}var a,s;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of a)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(a||(a={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(s||(s={}));const n=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),r=e=>{switch(typeof e){case"undefined":return n.undefined;case"string":return n.string;case"number":return isNaN(e)?n.nan:n.number;case"boolean":return n.boolean;case"function":return n.function;case"bigint":return n.bigint;case"symbol":return n.symbol;case"object":return Array.isArray(e)?n.array:null===e?n.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?n.promise:"undefined"!=typeof Map&&e instanceof Map?n.map:"undefined"!=typeof Set&&e instanceof Set?n.set:"undefined"!=typeof Date&&e instanceof Date?n.date:n.object;default:return n.unknown}},i=a.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"]);class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(s);else if("invalid_return_type"===n.code)s(n.returnTypeError);else if("invalid_arguments"===n.code)s(n.argumentsError);else if(0===n.path.length)a._errors.push(t(n));else{let e=a,s=0;for(;s<n.path.length;){const a=n.path[s];s===n.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(n))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>new o(e);const d=(e,t)=>{let s;switch(e.code){case i.invalid_type:s=e.received===n.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case i.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case i.unrecognized_keys:s=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case i.invalid_union:s="Invalid input";break;case i.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case i.invalid_enum_value:s=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case i.invalid_arguments:s="Invalid function arguments";break;case i.invalid_return_type:s="Invalid function return type";break;case i.invalid_date:s="Invalid date";break;case i.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:a.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case i.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case i.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case i.custom:s="Invalid input";break;case i.invalid_intersection_types:s="Intersection results could not be merged";break;case i.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case i.not_finite:s="Number must be finite";break;default:s=t.defaultError,a.assertNever(e)}return{message:s}};let c=d;function u(){return c}const l=e=>{const{data:t,path:a,errorMaps:s,issueData:n}=e,r=[...a,...n.path||[]],i={...n,path:r};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...n,path:r,message:n.message||o}};function p(e,t){const a=l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,u(),d].filter((e=>!!e))});e.common.issues.push(a)}class h{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return m;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return h.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:n}=s;if("aborted"===t.status)return m;if("aborted"===n.status)return m;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),(void 0!==n.value||s.alwaysSet)&&(a[t.value]=n.value)}return{status:e.value,value:a}}}const m=Object.freeze({status:"aborted"}),f=e=>({status:"dirty",value:e}),y=e=>({status:"valid",value:e}),_=e=>"aborted"===e.status,v=e=>"dirty"===e.status,g=e=>"valid"===e.status,x=e=>"undefined"!=typeof Promise&&e instanceof Promise;var b;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(b||(b={}));class k{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const w=(e,t)=>{if(g(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new o(e.common.issues);return this._error=t,this._error}}};function Z(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:n}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:n};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=s?s:t.defaultError}:{message:null!=a?a:t.defaultError},description:n}}class T{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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return r(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new h,ctx:{common:e.parent.common,data:e.data,parsedType:r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(x(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r(e)},n=this._parseSync({data:e,path:s.path,parent:s});return w(s,n)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r(e)},s=this._parse({data:e,path:a.path,parent:a}),n=await(x(s)?s:Promise.resolve(s));return w(a,n)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const n=e(t),r=()=>s.addIssue({code:i.custom,...a(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(r(),!1))):!!n||(r(),!1)}))}refinement(e,t){return this._refinement(((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1)))}_refinement(e){return new pe({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return he.create(this,this._def)}nullable(){return me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return F.create(this,this._def)}promise(){return le.create(this,this._def)}or(e){return Y.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new pe({...Z(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new fe({...Z(this._def),innerType:this,defaultValue:t,typeName:we.ZodDefault})}brand(){return new ge({typeName:we.ZodBranded,type:this,...Z(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ye({...Z(this._def),innerType:this,catchValue:t,typeName:we.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return xe.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const O=/^c[^\s-]{8,}$/i,N=/^[a-z][a-z0-9]*$/,S=/[0-9A-HJKMNP-TV-Z]{26}/,C=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,j=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((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}))\])|(\[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})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,E=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,I=/^(((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}))$/,P=/^(([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})))$/;class A extends T{constructor(){super(...arguments),this._regex=(e,t,a)=>this.refinement((t=>e.test(t)),{validation:t,code:i.invalid_string,...b.errToObj(a)}),this.nonempty=e=>this.min(1,b.errToObj(e)),this.trim=()=>new A({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new A({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==n.string){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.string,received:t.parsedType}),m}const t=new h;let s;for(const n of this._def.checks)if("min"===n.kind)e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("max"===n.kind)e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("length"===n.kind){const a=e.data.length>n.value,r=e.data.length<n.value;(a||r)&&(s=this._getOrReturnCtx(e,s),a?p(s,{code:i.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):r&&p(s,{code:i.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if("email"===n.kind)j.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"email",code:i.invalid_string,message:n.message}),t.dirty());else if("emoji"===n.kind)E.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"emoji",code:i.invalid_string,message:n.message}),t.dirty());else if("uuid"===n.kind)C.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"uuid",code:i.invalid_string,message:n.message}),t.dirty());else if("cuid"===n.kind)O.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid",code:i.invalid_string,message:n.message}),t.dirty());else if("cuid2"===n.kind)N.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid2",code:i.invalid_string,message:n.message}),t.dirty());else if("ulid"===n.kind)S.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ulid",code:i.invalid_string,message:n.message}),t.dirty());else if("url"===n.kind)try{new URL(e.data)}catch(a){s=this._getOrReturnCtx(e,s),p(s,{validation:"url",code:i.invalid_string,message:n.message}),t.dirty()}else if("regex"===n.kind){n.regex.lastIndex=0;n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"regex",code:i.invalid_string,message:n.message}),t.dirty())}else if("trim"===n.kind)e.data=e.data.trim();else if("includes"===n.kind)e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty());else if("toLowerCase"===n.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===n.kind)e.data=e.data.toUpperCase();else if("startsWith"===n.kind)e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty());else if("endsWith"===n.kind)e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty());else if("datetime"===n.kind){((d=n).precision?d.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}Z$`):0===d.precision?d.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):d.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:"datetime",message:n.message}),t.dirty())}else"ip"===n.kind?(r=e.data,("v4"!==(o=n.version)&&o||!I.test(r))&&("v6"!==o&&o||!P.test(r))&&(s=this._getOrReturnCtx(e,s),p(s,{validation:"ip",code:i.invalid_string,message:n.message}),t.dirty())):a.assertNever(n);var r,o,d;return{status:t.value,value:e.data}}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...b.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...b.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...b.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...b.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...b.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...b.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function R(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,n=a>s?a:s;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}A.create=e=>{var t;return new A({checks:[],typeName:we.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Z(e)})};class M extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==n.number){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.number,received:t.parsedType}),m}let t;const s=new h;for(const n of this._def.checks)if("int"===n.kind)a.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:i.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty())}else"multipleOf"===n.kind?0!==R(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_finite,message:n.message}),s.dirty()):a.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,s){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(s)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=e=>new M({checks:[],typeName:we.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Z(e)});class $ extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==n.bigint){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.bigint,received:t.parsedType}),m}let t;const s=new h;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):a.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,s){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(s)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}$.create=e=>{var t;return new $({checks:[],typeName:we.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Z(e)})};class L extends T{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==n.boolean){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.boolean,received:t.parsedType}),m}return y(e.data)}}L.create=e=>new L({typeName:we.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Z(e)});class D extends T{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==n.date){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.date,received:t.parsedType}),m}if(isNaN(e.data.getTime())){return p(this._getOrReturnCtx(e),{code:i.invalid_date}),m}const t=new h;let s;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):a.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}D.create=e=>new D({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:we.ZodDate,...Z(e)});class z extends T{_parse(e){if(this._getType(e)!==n.symbol){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.symbol,received:t.parsedType}),m}return y(e.data)}}z.create=e=>new z({typeName:we.ZodSymbol,...Z(e)});class V extends T{_parse(e){if(this._getType(e)!==n.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.undefined,received:t.parsedType}),m}return y(e.data)}}V.create=e=>new V({typeName:we.ZodUndefined,...Z(e)});class U extends T{_parse(e){if(this._getType(e)!==n.null){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.null,received:t.parsedType}),m}return y(e.data)}}U.create=e=>new U({typeName:we.ZodNull,...Z(e)});class K extends T{constructor(){super(...arguments),this._any=!0}_parse(e){return y(e.data)}}K.create=e=>new K({typeName:we.ZodAny,...Z(e)});class B extends T{constructor(){super(...arguments),this._unknown=!0}_parse(e){return y(e.data)}}B.create=e=>new B({typeName:we.ZodUnknown,...Z(e)});class W extends T{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.never,received:t.parsedType}),m}}W.create=e=>new W({typeName:we.ZodNever,...Z(e)});class q extends T{_parse(e){if(this._getType(e)!==n.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.void,received:t.parsedType}),m}return y(e.data)}}q.create=e=>new q({typeName:we.ZodVoid,...Z(e)});class F extends T{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==n.array)return p(t,{code:i.invalid_type,expected:n.array,received:t.parsedType}),m;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,n=t.data.length<s.exactLength.value;(e||n)&&(p(t,{code:e?i.too_big:i.too_small,minimum:n?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(p(t,{code:i.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(p(t,{code:i.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>s.type._parseAsync(new k(t,e,t.path,a))))).then((e=>h.mergeArray(a,e)));const r=[...t.data].map(((e,a)=>s.type._parseSync(new k(t,e,t.path,a))));return h.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new F({...this._def,minLength:{value:e,message:b.toString(t)}})}max(e,t){return new F({...this._def,maxLength:{value:e,message:b.toString(t)}})}length(e,t){return new F({...this._def,exactLength:{value:e,message:b.toString(t)}})}nonempty(e){return this.min(1,e)}}function J(e){if(e instanceof H){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=he.create(J(s))}return new H({...e._def,shape:()=>t})}return e instanceof F?new F({...e._def,type:J(e.element)}):e instanceof he?he.create(J(e.unwrap())):e instanceof me?me.create(J(e.unwrap())):e instanceof te?te.create(e.items.map((e=>J(e)))):e}F.create=(e,t)=>new F({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Z(t)});class H extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==n.object){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.object,received:t.parsedType}),m}const{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:r}=this._getCached(),o=[];if(!(this._def.catchall instanceof W&&"strip"===this._def.unknownKeys))for(const e in a.data)r.includes(e)||o.push(e);const d=[];for(const e of r){const t=s[e],n=a.data[e];d.push({key:{status:"valid",value:e},value:t._parse(new k(a,n,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof W){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)d.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)o.length>0&&(p(a,{code:i.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const s=a.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new k(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>h.mergeObjectSync(t,e))):h.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new H({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var s,n,r,i;const o=null!==(r=null===(n=(s=this._def).errorMap)||void 0===n?void 0:n.call(s,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=b.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new H({...this._def,unknownKeys:"strip"})}passthrough(){return new H({...this._def,unknownKeys:"passthrough"})}extend(e){return new H({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new H({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new H({...this._def,catchall:e})}pick(e){const t={};return a.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new H({...this._def,shape:()=>t})}omit(e){const t={};return a.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new H({...this._def,shape:()=>t})}deepPartial(){return J(this)}partial(e){const t={};return a.objectKeys(this.shape).forEach((a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()})),new H({...this._def,shape:()=>t})}required(e){const t={};return a.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof he;)e=e._def.innerType;t[a]=e}})),new H({...this._def,shape:()=>t})}keyof(){return de(a.objectKeys(this.shape))}}H.create=(e,t)=>new H({shape:()=>e,unknownKeys:"strip",catchall:W.create(),typeName:we.ZodObject,...Z(t)}),H.strictCreate=(e,t)=>new H({shape:()=>e,unknownKeys:"strict",catchall:W.create(),typeName:we.ZodObject,...Z(t)}),H.lazycreate=(e,t)=>new H({shape:e,unknownKeys:"strip",catchall:W.create(),typeName:we.ZodObject,...Z(t)});class Y extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new o(e.ctx.common.issues)));return p(t,{code:i.invalid_union,unionErrors:a}),m}));{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=s.map((e=>new o(e)));return p(t,{code:i.invalid_union,unionErrors:n}),m}}get options(){return this._def.options}}Y.create=(e,t)=>new Y({options:e,typeName:we.ZodUnion,...Z(t)});const G=e=>e instanceof ie?G(e.schema):e instanceof pe?G(e.innerType()):e instanceof oe?[e.value]:e instanceof ce?e.options:e instanceof ue?Object.keys(e.enum):e instanceof fe?G(e._def.innerType):e instanceof V?[void 0]:e instanceof U?[null]:null;class X extends T{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.object)return p(t,{code:i.invalid_type,expected:n.object,received:t.parsedType}),m;const a=this.discriminator,s=t.data[a],r=this.optionsMap.get(s);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:i.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=G(a.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(s.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);s.set(n,a)}}return new X({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...Z(a)})}}function Q(e,t){const s=r(e),i=r(t);if(e===t)return{valid:!0,data:e};if(s===n.object&&i===n.object){const s=a.objectKeys(t),n=a.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...t};for(const a of n){const s=Q(e[a],t[a]);if(!s.valid)return{valid:!1};r[a]=s.data}return{valid:!0,data:r}}if(s===n.array&&i===n.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const n=Q(e[s],t[s]);if(!n.valid)return{valid:!1};a.push(n.data)}return{valid:!0,data:a}}return s===n.date&&i===n.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ee extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(_(e)||_(s))return m;const n=Q(e.value,s.value);return n.valid?((v(e)||v(s))&&t.dirty(),{status:t.value,value:n.data}):(p(a,{code:i.invalid_intersection_types}),m)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>s(e,t))):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ee.create=(e,t,a)=>new ee({left:e,right:t,typeName:we.ZodIntersection,...Z(a)});class te extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.array)return p(a,{code:i.invalid_type,expected:n.array,received:a.parsedType}),m;if(a.data.length<this._def.items.length)return p(a,{code:i.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&a.data.length>this._def.items.length&&(p(a,{code:i.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...a.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new k(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(s).then((e=>h.mergeArray(t,e))):h.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new te({...this._def,rest:e})}}te.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new te({items:e,typeName:we.ZodTuple,rest:null,...Z(t)})};class ae extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.object)return p(a,{code:i.invalid_type,expected:n.object,received:a.parsedType}),m;const s=[],r=this._def.keyType,o=this._def.valueType;for(const e in a.data)s.push({key:r._parse(new k(a,e,a.path,e)),value:o._parse(new k(a,a.data[e],a.path,e))});return a.common.async?h.mergeObjectAsync(t,s):h.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new ae(t instanceof T?{keyType:e,valueType:t,typeName:we.ZodRecord,...Z(a)}:{keyType:A.create(),valueType:e,typeName:we.ZodRecord,...Z(t)})}}class se extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.map)return p(a,{code:i.invalid_type,expected:n.map,received:a.parsedType}),m;const s=this._def.keyType,r=this._def.valueType,o=[...a.data.entries()].map((([e,t],n)=>({key:s._parse(new k(a,e,a.path,[n,"key"])),value:r._parse(new k(a,t,a.path,[n,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of o){const s=await a.key,n=await a.value;if("aborted"===s.status||"aborted"===n.status)return m;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of o){const s=a.key,n=a.value;if("aborted"===s.status||"aborted"===n.status)return m;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}}}se.create=(e,t,a)=>new se({valueType:t,keyType:e,typeName:we.ZodMap,...Z(a)});class ne extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.set)return p(a,{code:i.invalid_type,expected:n.set,received:a.parsedType}),m;const s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(p(a,{code:i.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(p(a,{code:i.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const r=this._def.valueType;function o(e){const a=new Set;for(const s of e){if("aborted"===s.status)return m;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const d=[...a.data.values()].map(((e,t)=>r._parse(new k(a,e,a.path,t))));return a.common.async?Promise.all(d).then((e=>o(e))):o(d)}min(e,t){return new ne({...this._def,minSize:{value:e,message:b.toString(t)}})}max(e,t){return new ne({...this._def,maxSize:{value:e,message:b.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ne.create=(e,t)=>new ne({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...Z(t)});class re extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.function)return p(t,{code:i.invalid_type,expected:n.function,received:t.parsedType}),m;function a(e,a){return l({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u(),d].filter((e=>!!e)),issueData:{code:i.invalid_arguments,argumentsError:a}})}function s(e,a){return l({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u(),d].filter((e=>!!e)),issueData:{code:i.invalid_return_type,returnTypeError:a}})}const r={errorMap:t.common.contextualErrorMap},c=t.data;return this._def.returns instanceof le?y((async(...e)=>{const t=new o([]),n=await this._def.args.parseAsync(e,r).catch((s=>{throw t.addIssue(a(e,s)),t})),i=await c(...n);return await this._def.returns._def.type.parseAsync(i,r).catch((e=>{throw t.addIssue(s(i,e)),t}))})):y(((...e)=>{const t=this._def.args.safeParse(e,r);if(!t.success)throw new o([a(e,t.error)]);const n=c(...t.data),i=this._def.returns.safeParse(n,r);if(!i.success)throw new o([s(n,i.error)]);return i.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new re({...this._def,args:te.create(e).rest(B.create())})}returns(e){return new re({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new re({args:e||te.create([]).rest(B.create()),returns:t||B.create(),typeName:we.ZodFunction,...Z(a)})}}class ie extends T{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ie.create=(e,t)=>new ie({getter:e,typeName:we.ZodLazy,...Z(t)});class oe extends T{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:i.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}function de(e,t){return new ce({values:e,typeName:we.ZodEnum,...Z(t)})}oe.create=(e,t)=>new oe({value:e,typeName:we.ZodLiteral,...Z(t)});class ce extends T{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:a.joinValues(s),received:t.parsedType,code:i.invalid_type}),m}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return p(t,{received:t.data,code:i.invalid_enum_value,options:a}),m}return y(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return ce.create(e)}exclude(e){return ce.create(this.options.filter((t=>!e.includes(t))))}}ce.create=de;class ue extends T{_parse(e){const t=a.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==n.string&&s.parsedType!==n.number){const e=a.objectValues(t);return p(s,{expected:a.joinValues(e),received:s.parsedType,code:i.invalid_type}),m}if(-1===t.indexOf(e.data)){const e=a.objectValues(t);return p(s,{received:s.data,code:i.invalid_enum_value,options:e}),m}return y(e.data)}get enum(){return this._def.values}}ue.create=(e,t)=>new ue({values:e,typeName:we.ZodNativeEnum,...Z(t)});class le extends T{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.promise&&!1===t.common.async)return p(t,{code:i.invalid_type,expected:n.promise,received:t.parsedType}),m;const a=t.parsedType===n.promise?t.data:Promise.resolve(t.data);return y(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}le.create=(e,t)=>new le({type:e,typeName:we.ZodPromise,...Z(t)});class pe extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null;if("preprocess"===n.type){const e=n.transform(s.data);return s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}const r={addIssue:e=>{p(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===a.status?m:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((a=>"aborted"===a.status?m:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!g(e))return e;const a=n.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>g(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}a.assertNever(n)}}pe.create=(e,t,a)=>new pe({schema:e,typeName:we.ZodEffects,effect:t,...Z(a)}),pe.createWithPreprocess=(e,t,a)=>new pe({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...Z(a)});class he extends T{_parse(e){return this._getType(e)===n.undefined?y(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}he.create=(e,t)=>new he({innerType:e,typeName:we.ZodOptional,...Z(t)});class me extends T{_parse(e){return this._getType(e)===n.null?y(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}me.create=(e,t)=>new me({innerType:e,typeName:we.ZodNullable,...Z(t)});class fe extends T{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===n.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}fe.create=(e,t)=>new fe({innerType:e,typeName:we.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Z(t)});class ye extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return x(s)?s.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new o(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}ye.create=(e,t)=>new ye({innerType:e,typeName:we.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Z(t)});class _e extends T{_parse(e){if(this._getType(e)!==n.nan){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.nan,received:t.parsedType}),m}return{status:"valid",value:e.data}}}_e.create=e=>new _e({typeName:we.ZodNaN,...Z(e)});const ve=Symbol("zod_brand");class ge extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class xe extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),f(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new xe({in:e,out:t,typeName:we.ZodPipeline})}}const be=(e,t={},a)=>e?K.create().superRefine(((s,n)=>{var r,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(r=e.fatal)&&void 0!==r?r:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...d,fatal:o})}})):K.create(),ke={object:H.lazycreate};var we;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(we||(we={}));const Ze=A.create,Te=M.create,Oe=_e.create,Ne=$.create,Se=L.create,Ce=D.create,je=z.create,Ee=V.create,Ie=U.create,Pe=K.create,Ae=B.create,Re=W.create,Me=q.create,$e=F.create,Le=H.create,De=H.strictCreate,ze=Y.create,Ve=X.create,Ue=ee.create,Ke=te.create,Be=ae.create,We=se.create,qe=ne.create,Fe=re.create,Je=ie.create,He=oe.create,Ye=ce.create,Ge=ue.create,Xe=le.create,Qe=pe.create,et=he.create,tt=me.create,at=pe.createWithPreprocess,st=xe.create,nt={string:e=>A.create({...e,coerce:!0}),number:e=>M.create({...e,coerce:!0}),boolean:e=>L.create({...e,coerce:!0}),bigint:e=>$.create({...e,coerce:!0}),date:e=>D.create({...e,coerce:!0})},rt=m;var it,ot=Object.freeze({__proto__:null,defaultErrorMap:d,setErrorMap:function(e){c=e},getErrorMap:u,makeIssue:l,EMPTY_PATH:[],addIssueToContext:p,ParseStatus:h,INVALID:m,DIRTY:f,OK:y,isAborted:_,isDirty:v,isValid:g,isAsync:x,get util(){return a},get objectUtil(){return s},ZodParsedType:n,getParsedType:r,ZodType:T,ZodString:A,ZodNumber:M,ZodBigInt:$,ZodBoolean:L,ZodDate:D,ZodSymbol:z,ZodUndefined:V,ZodNull:U,ZodAny:K,ZodUnknown:B,ZodNever:W,ZodVoid:q,ZodArray:F,ZodObject:H,ZodUnion:Y,ZodDiscriminatedUnion:X,ZodIntersection:ee,ZodTuple:te,ZodRecord:ae,ZodMap:se,ZodSet:ne,ZodFunction:re,ZodLazy:ie,ZodLiteral:oe,ZodEnum:ce,ZodNativeEnum:ue,ZodPromise:le,ZodEffects:pe,ZodTransformer:pe,ZodOptional:he,ZodNullable:me,ZodDefault:fe,ZodCatch:ye,ZodNaN:_e,BRAND:ve,ZodBranded:ge,ZodPipeline:xe,custom:be,Schema:T,ZodSchema:T,late:ke,get ZodFirstPartyTypeKind(){return we},coerce:nt,any:Pe,array:$e,bigint:Ne,boolean:Se,date:Ce,discriminatedUnion:Ve,effect:Qe,enum:Ye,function:Fe,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>be((t=>t instanceof e),t),intersection:Ue,lazy:Je,literal:He,map:We,nan:Oe,nativeEnum:Ge,never:Re,null:Ie,nullable:tt,number:Te,object:Le,oboolean:()=>Se().optional(),onumber:()=>Te().optional(),optional:et,ostring:()=>Ze().optional(),pipeline:st,preprocess:at,promise:Xe,record:Be,set:qe,strictObject:De,string:Ze,symbol:je,transformer:Qe,tuple:Ke,undefined:Ee,union:ze,unknown:Ae,void:Me,NEVER:rt,ZodIssueCode:i,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o}),dt={all:"*",injected:"metamask",walletconnect:"walletconnect",keplr:"keplr",templewallet:"templewallet",phantom:"phantom",beacon:"beacon",okxwallet:"okxwallet",suku:"suku",lens:"lens",ud:"ud",cyberconnect:"cyberconnect"},ct=ot.object({logoUrl:ot.string().optional(),background:ot.string().optional(),redirectUrlOnLeave:ot.string().optional(),wallets:ot.array(ot.enum(["*"].concat((it=Object.values(dt),function(e){if(Array.isArray(e))return t(e)}(it)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(it)||function(e,a){if(e){if("string"==typeof e)return t(e,a);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,a):void 0}}(it)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())))).optional(),lobbyLoginMessage:ot.string().optional(),lobbyTitle:ot.string().optional(),lobbyDescription:ot.string().optional(),isCopyMeetingVisible:ot.boolean().optional()});e.AllowedWallets=dt,e.ClientConfigSchema=ct,e.reactions=["😂","😢","😦","😍","🤔","👀","🙌","👍","👎","🔥","🍻","🚀","🎉","❤️","💯"],Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HuddleIframeTypes={})}(this,(function(e){"use strict";var t,a;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of a)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(t||(t={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(a||(a={}));const s=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),n=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?s.promise:"undefined"!=typeof Map&&e instanceof Map?s.map:"undefined"!=typeof Set&&e instanceof Set?s.set:"undefined"!=typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}},r=t.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"]);class i extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(s);else if("invalid_return_type"===n.code)s(n.returnTypeError);else if("invalid_arguments"===n.code)s(n.argumentsError);else if(0===n.path.length)a._errors.push(t(n));else{let e=a,s=0;for(;s<n.path.length;){const a=n.path[s];s===n.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(n))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,t.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}i.create=e=>new i(e);const o=(e,a)=>{let n;switch(e.code){case r.invalid_type:n=e.received===s.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case r.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,t.jsonStringifyReplacer)}`;break;case r.unrecognized_keys:n=`Unrecognized key(s) in object: ${t.joinValues(e.keys,", ")}`;break;case r.invalid_union:n="Invalid input";break;case r.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${t.joinValues(e.options)}`;break;case r.invalid_enum_value:n=`Invalid enum value. Expected ${t.joinValues(e.options)}, received '${e.received}'`;break;case r.invalid_arguments:n="Invalid function arguments";break;case r.invalid_return_type:n="Invalid function return type";break;case r.invalid_date:n="Invalid date";break;case r.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:t.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case r.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case r.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case r.custom:n="Invalid input";break;case r.invalid_intersection_types:n="Intersection results could not be merged";break;case r.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case r.not_finite:n="Number must be finite";break;default:n=a.defaultError,t.assertNever(e)}return{message:n}};let d=o;function c(){return d}const u=e=>{const{data:t,path:a,errorMaps:s,issueData:n}=e,r=[...a,...n.path||[]],i={...n,path:r};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...n,path:r,message:n.message||o}};function l(e,t){const a=u({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,c(),o].filter((e=>!!e))});e.common.issues.push(a)}class p{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return h;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return p.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:n}=s;if("aborted"===t.status)return h;if("aborted"===n.status)return h;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),(void 0!==n.value||s.alwaysSet)&&(a[t.value]=n.value)}return{status:e.value,value:a}}}const h=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),f=e=>({status:"valid",value:e}),y=e=>"aborted"===e.status,_=e=>"dirty"===e.status,v=e=>"valid"===e.status,g=e=>"undefined"!=typeof Promise&&e instanceof Promise;var x;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(x||(x={}));class b{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const k=(e,t)=>{if(v(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new i(e.common.issues);return this._error=t,this._error}}};function w(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:n}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:n};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=s?s:t.defaultError}:{message:null!=a?a:t.defaultError},description:n}}class Z{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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return n(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:n(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p,ctx:{common:e.parent.common,data:e.data,parsedType:n(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(g(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:n(e)},r=this._parseSync({data:e,path:s.path,parent:s});return k(s,r)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:n(e)},s=this._parse({data:e,path:a.path,parent:a}),r=await(g(s)?s:Promise.resolve(s));return k(a,r)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const n=e(t),i=()=>s.addIssue({code:r.custom,...a(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(i(),!1))):!!n||(i(),!1)}))}refinement(e,t){return this._refinement(((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1)))}_refinement(e){return new le({schema:this,typeName:ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return pe.create(this,this._def)}nullable(){return he.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return q.create(this,this._def)}promise(){return ue.create(this,this._def)}or(e){return H.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new le({...w(this._def),schema:this,typeName:ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new me({...w(this._def),innerType:this,defaultValue:t,typeName:ke.ZodDefault})}brand(){return new ve({typeName:ke.ZodBranded,type:this,...w(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new fe({...w(this._def),innerType:this,catchValue:t,typeName:ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ge.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const T=/^c[^\s-]{8,}$/i,O=/^[a-z][a-z0-9]*$/,N=/[0-9A-HJKMNP-TV-Z]{26}/,S=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,C=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((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}))\])|(\[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})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,j=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,E=/^(((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}))$/,I=/^(([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})))$/;class P extends Z{constructor(){super(...arguments),this._regex=(e,t,a)=>this.refinement((t=>e.test(t)),{validation:t,code:r.invalid_string,...x.errToObj(a)}),this.nonempty=e=>this.min(1,x.errToObj(e)),this.trim=()=>new P({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new P({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new P({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==s.string){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.string,received:t.parsedType}),h}const a=new p;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:r.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:r.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if("length"===s.kind){const t=e.data.length>s.value,i=e.data.length<s.value;(t||i)&&(n=this._getOrReturnCtx(e,n),t?l(n,{code:r.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&l(n,{code:r.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),a.dirty())}else if("email"===s.kind)C.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:r.invalid_string,message:s.message}),a.dirty());else if("emoji"===s.kind)j.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:r.invalid_string,message:s.message}),a.dirty());else if("uuid"===s.kind)S.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:r.invalid_string,message:s.message}),a.dirty());else if("cuid"===s.kind)T.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:r.invalid_string,message:s.message}),a.dirty());else if("cuid2"===s.kind)O.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:r.invalid_string,message:s.message}),a.dirty());else if("ulid"===s.kind)N.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:r.invalid_string,message:s.message}),a.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(t){n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:r.invalid_string,message:s.message}),a.dirty()}else if("regex"===s.kind){s.regex.lastIndex=0;s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:r.invalid_string,message:s.message}),a.dirty())}else if("trim"===s.kind)e.data=e.data.trim();else if("includes"===s.kind)e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:r.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),a.dirty());else if("toLowerCase"===s.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===s.kind)e.data=e.data.toUpperCase();else if("startsWith"===s.kind)e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:r.invalid_string,validation:{startsWith:s.value},message:s.message}),a.dirty());else if("endsWith"===s.kind)e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:r.invalid_string,validation:{endsWith:s.value},message:s.message}),a.dirty());else if("datetime"===s.kind){((d=s).precision?d.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}Z$`):0===d.precision?d.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):d.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:r.invalid_string,validation:"datetime",message:s.message}),a.dirty())}else"ip"===s.kind?(i=e.data,("v4"!==(o=s.version)&&o||!E.test(i))&&("v6"!==o&&o||!I.test(i))&&(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:r.invalid_string,message:s.message}),a.dirty())):t.assertNever(s);var i,o,d;return{status:a.value,value:e.data}}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...x.errToObj(e)})}url(e){return this._addCheck({kind:"url",...x.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...x.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...x.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...x.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...x.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...x.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...x.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...x.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...x.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function R(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,n=a>s?a:s;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}P.create=e=>{var t;return new P({checks:[],typeName:ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...w(e)})};class A extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==s.number){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.number,received:t.parsedType}),h}let a;const n=new p;for(const s of this._def.checks)if("int"===s.kind)t.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),l(a,{code:r.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty());else if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(a=this._getOrReturnCtx(e,a),l(a,{code:r.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(a=this._getOrReturnCtx(e,a),l(a,{code:r.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty())}else"multipleOf"===s.kind?0!==R(e.data,s.value)&&(a=this._getOrReturnCtx(e,a),l(a,{code:r.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),l(a,{code:r.not_finite,message:s.message}),n.dirty()):t.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,a,s){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:x.toString(s)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:x.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:x.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&t.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}A.create=e=>new A({checks:[],typeName:ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...w(e)});class M extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==s.bigint){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.bigint,received:t.parsedType}),h}let a;const n=new p;for(const s of this._def.checks)if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(a=this._getOrReturnCtx(e,a),l(a,{code:r.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(a=this._getOrReturnCtx(e,a),l(a,{code:r.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty())}else"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),l(a,{code:r.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):t.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,a,s){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:x.toString(s)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}M.create=e=>{var t;return new M({checks:[],typeName:ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...w(e)})};class $ extends Z{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==s.boolean){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.boolean,received:t.parsedType}),h}return f(e.data)}}$.create=e=>new $({typeName:ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...w(e)});class L extends Z{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==s.date){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.date,received:t.parsedType}),h}if(isNaN(e.data.getTime())){return l(this._getOrReturnCtx(e),{code:r.invalid_date}),h}const a=new p;let n;for(const s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:r.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),a.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:r.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),a.dirty()):t.assertNever(s);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}L.create=e=>new L({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ke.ZodDate,...w(e)});class D extends Z{_parse(e){if(this._getType(e)!==s.symbol){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.symbol,received:t.parsedType}),h}return f(e.data)}}D.create=e=>new D({typeName:ke.ZodSymbol,...w(e)});class z extends Z{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.undefined,received:t.parsedType}),h}return f(e.data)}}z.create=e=>new z({typeName:ke.ZodUndefined,...w(e)});class U extends Z{_parse(e){if(this._getType(e)!==s.null){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.null,received:t.parsedType}),h}return f(e.data)}}U.create=e=>new U({typeName:ke.ZodNull,...w(e)});class V extends Z{constructor(){super(...arguments),this._any=!0}_parse(e){return f(e.data)}}V.create=e=>new V({typeName:ke.ZodAny,...w(e)});class K extends Z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return f(e.data)}}K.create=e=>new K({typeName:ke.ZodUnknown,...w(e)});class B extends Z{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.never,received:t.parsedType}),h}}B.create=e=>new B({typeName:ke.ZodNever,...w(e)});class W extends Z{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.void,received:t.parsedType}),h}return f(e.data)}}W.create=e=>new W({typeName:ke.ZodVoid,...w(e)});class q extends Z{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==s.array)return l(t,{code:r.invalid_type,expected:s.array,received:t.parsedType}),h;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(l(t,{code:e?r.too_big:r.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(l(t,{code:r.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(l(t,{code:r.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new b(t,e,t.path,a))))).then((e=>p.mergeArray(a,e)));const i=[...t.data].map(((e,a)=>n.type._parseSync(new b(t,e,t.path,a))));return p.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new q({...this._def,minLength:{value:e,message:x.toString(t)}})}max(e,t){return new q({...this._def,maxLength:{value:e,message:x.toString(t)}})}length(e,t){return new q({...this._def,exactLength:{value:e,message:x.toString(t)}})}nonempty(e){return this.min(1,e)}}function F(e){if(e instanceof J){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=pe.create(F(s))}return new J({...e._def,shape:()=>t})}return e instanceof q?new q({...e._def,type:F(e.element)}):e instanceof pe?pe.create(F(e.unwrap())):e instanceof he?he.create(F(e.unwrap())):e instanceof ee?ee.create(e.items.map((e=>F(e)))):e}q.create=(e,t)=>new q({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ke.ZodArray,...w(t)});class J extends Z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),a=t.objectKeys(e);return this._cached={shape:e,keys:a}}_parse(e){if(this._getType(e)!==s.object){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.object,received:t.parsedType}),h}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof B&&"strip"===this._def.unknownKeys))for(const e in a.data)i.includes(e)||o.push(e);const d=[];for(const e of i){const t=n[e],s=a.data[e];d.push({key:{status:"valid",value:e},value:t._parse(new b(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof B){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)d.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)o.length>0&&(l(a,{code:r.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const s=a.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new b(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>p.mergeObjectSync(t,e))):p.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return x.errToObj,new J({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var s,n,r,i;const o=null!==(r=null===(n=(s=this._def).errorMap)||void 0===n?void 0:n.call(s,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=x.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(e){return new J({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new J({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new J({...this._def,catchall:e})}pick(e){const a={};return t.objectKeys(e).forEach((t=>{e[t]&&this.shape[t]&&(a[t]=this.shape[t])})),new J({...this._def,shape:()=>a})}omit(e){const a={};return t.objectKeys(this.shape).forEach((t=>{e[t]||(a[t]=this.shape[t])})),new J({...this._def,shape:()=>a})}deepPartial(){return F(this)}partial(e){const a={};return t.objectKeys(this.shape).forEach((t=>{const s=this.shape[t];e&&!e[t]?a[t]=s:a[t]=s.optional()})),new J({...this._def,shape:()=>a})}required(e){const a={};return t.objectKeys(this.shape).forEach((t=>{if(e&&!e[t])a[t]=this.shape[t];else{let e=this.shape[t];for(;e instanceof pe;)e=e._def.innerType;a[t]=e}})),new J({...this._def,shape:()=>a})}keyof(){return oe(t.objectKeys(this.shape))}}J.create=(e,t)=>new J({shape:()=>e,unknownKeys:"strip",catchall:B.create(),typeName:ke.ZodObject,...w(t)}),J.strictCreate=(e,t)=>new J({shape:()=>e,unknownKeys:"strict",catchall:B.create(),typeName:ke.ZodObject,...w(t)}),J.lazycreate=(e,t)=>new J({shape:e,unknownKeys:"strip",catchall:B.create(),typeName:ke.ZodObject,...w(t)});class H extends Z{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new i(e.ctx.common.issues)));return l(t,{code:r.invalid_union,unionErrors:a}),h}));{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=s.map((e=>new i(e)));return l(t,{code:r.invalid_union,unionErrors:n}),h}}get options(){return this._def.options}}H.create=(e,t)=>new H({options:e,typeName:ke.ZodUnion,...w(t)});const Y=e=>e instanceof re?Y(e.schema):e instanceof le?Y(e.innerType()):e instanceof ie?[e.value]:e instanceof de?e.options:e instanceof ce?Object.keys(e.enum):e instanceof me?Y(e._def.innerType):e instanceof z?[void 0]:e instanceof U?[null]:null;class G extends Z{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.object)return l(t,{code:r.invalid_type,expected:s.object,received:t.parsedType}),h;const a=this.discriminator,n=t.data[a],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:r.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),h)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=Y(a.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(s.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);s.set(n,a)}}return new G({typeName:ke.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...w(a)})}}function X(e,a){const r=n(e),i=n(a);if(e===a)return{valid:!0,data:e};if(r===s.object&&i===s.object){const s=t.objectKeys(a),n=t.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...a};for(const t of n){const s=X(e[t],a[t]);if(!s.valid)return{valid:!1};r[t]=s.data}return{valid:!0,data:r}}if(r===s.array&&i===s.array){if(e.length!==a.length)return{valid:!1};const t=[];for(let s=0;s<e.length;s++){const n=X(e[s],a[s]);if(!n.valid)return{valid:!1};t.push(n.data)}return{valid:!0,data:t}}return r===s.date&&i===s.date&&+e==+a?{valid:!0,data:e}:{valid:!1}}class Q extends Z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(y(e)||y(s))return h;const n=X(e.value,s.value);return n.valid?((_(e)||_(s))&&t.dirty(),{status:t.value,value:n.data}):(l(a,{code:r.invalid_intersection_types}),h)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>s(e,t))):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Q.create=(e,t,a)=>new Q({left:e,right:t,typeName:ke.ZodIntersection,...w(a)});class ee extends Z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.array)return l(a,{code:r.invalid_type,expected:s.array,received:a.parsedType}),h;if(a.data.length<this._def.items.length)return l(a,{code:r.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),h;!this._def.rest&&a.data.length>this._def.items.length&&(l(a,{code:r.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new b(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>p.mergeArray(t,e))):p.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ee({...this._def,rest:e})}}ee.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ee({items:e,typeName:ke.ZodTuple,rest:null,...w(t)})};class te extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.object)return l(a,{code:r.invalid_type,expected:s.object,received:a.parsedType}),h;const n=[],i=this._def.keyType,o=this._def.valueType;for(const e in a.data)n.push({key:i._parse(new b(a,e,a.path,e)),value:o._parse(new b(a,a.data[e],a.path,e))});return a.common.async?p.mergeObjectAsync(t,n):p.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,a){return new te(t instanceof Z?{keyType:e,valueType:t,typeName:ke.ZodRecord,...w(a)}:{keyType:P.create(),valueType:e,typeName:ke.ZodRecord,...w(t)})}}class ae extends Z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.map)return l(a,{code:r.invalid_type,expected:s.map,received:a.parsedType}),h;const n=this._def.keyType,i=this._def.valueType,o=[...a.data.entries()].map((([e,t],s)=>({key:n._parse(new b(a,e,a.path,[s,"key"])),value:i._parse(new b(a,t,a.path,[s,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of o){const s=await a.key,n=await a.value;if("aborted"===s.status||"aborted"===n.status)return h;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of o){const s=a.key,n=a.value;if("aborted"===s.status||"aborted"===n.status)return h;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}}}ae.create=(e,t,a)=>new ae({valueType:t,keyType:e,typeName:ke.ZodMap,...w(a)});class se extends Z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.set)return l(a,{code:r.invalid_type,expected:s.set,received:a.parsedType}),h;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(l(a,{code:r.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(l(a,{code:r.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function o(e){const a=new Set;for(const s of e){if("aborted"===s.status)return h;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const d=[...a.data.values()].map(((e,t)=>i._parse(new b(a,e,a.path,t))));return a.common.async?Promise.all(d).then((e=>o(e))):o(d)}min(e,t){return new se({...this._def,minSize:{value:e,message:x.toString(t)}})}max(e,t){return new se({...this._def,maxSize:{value:e,message:x.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}se.create=(e,t)=>new se({valueType:e,minSize:null,maxSize:null,typeName:ke.ZodSet,...w(t)});class ne extends Z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.function)return l(t,{code:r.invalid_type,expected:s.function,received:t.parsedType}),h;function a(e,a){return u({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,c(),o].filter((e=>!!e)),issueData:{code:r.invalid_arguments,argumentsError:a}})}function n(e,a){return u({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,c(),o].filter((e=>!!e)),issueData:{code:r.invalid_return_type,returnTypeError:a}})}const d={errorMap:t.common.contextualErrorMap},p=t.data;return this._def.returns instanceof ue?f((async(...e)=>{const t=new i([]),s=await this._def.args.parseAsync(e,d).catch((s=>{throw t.addIssue(a(e,s)),t})),r=await p(...s);return await this._def.returns._def.type.parseAsync(r,d).catch((e=>{throw t.addIssue(n(r,e)),t}))})):f(((...e)=>{const t=this._def.args.safeParse(e,d);if(!t.success)throw new i([a(e,t.error)]);const s=p(...t.data),r=this._def.returns.safeParse(s,d);if(!r.success)throw new i([n(s,r.error)]);return r.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ne({...this._def,args:ee.create(e).rest(K.create())})}returns(e){return new ne({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new ne({args:e||ee.create([]).rest(K.create()),returns:t||K.create(),typeName:ke.ZodFunction,...w(a)})}}class re extends Z{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}re.create=(e,t)=>new re({getter:e,typeName:ke.ZodLazy,...w(t)});class ie extends Z{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:r.invalid_literal,expected:this._def.value}),h}return{status:"valid",value:e.data}}get value(){return this._def.value}}function oe(e,t){return new de({values:e,typeName:ke.ZodEnum,...w(t)})}ie.create=(e,t)=>new ie({value:e,typeName:ke.ZodLiteral,...w(t)});class de extends Z{_parse(e){if("string"!=typeof e.data){const a=this._getOrReturnCtx(e),s=this._def.values;return l(a,{expected:t.joinValues(s),received:a.parsedType,code:r.invalid_type}),h}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return l(t,{received:t.data,code:r.invalid_enum_value,options:a}),h}return f(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return de.create(e)}exclude(e){return de.create(this.options.filter((t=>!e.includes(t))))}}de.create=oe;class ce extends Z{_parse(e){const a=t.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==s.string&&n.parsedType!==s.number){const e=t.objectValues(a);return l(n,{expected:t.joinValues(e),received:n.parsedType,code:r.invalid_type}),h}if(-1===a.indexOf(e.data)){const e=t.objectValues(a);return l(n,{received:n.data,code:r.invalid_enum_value,options:e}),h}return f(e.data)}get enum(){return this._def.values}}ce.create=(e,t)=>new ce({values:e,typeName:ke.ZodNativeEnum,...w(t)});class ue extends Z{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.promise&&!1===t.common.async)return l(t,{code:r.invalid_type,expected:s.promise,received:t.parsedType}),h;const a=t.parsedType===s.promise?t.data:Promise.resolve(t.data);return f(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ue.create=(e,t)=>new ue({type:e,typeName:ke.ZodPromise,...w(t)});class le extends Z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:a,ctx:s}=this._processInputParams(e),n=this._def.effect||null;if("preprocess"===n.type){const e=n.transform(s.data);return s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}const r={addIssue:e=>{l(s,e),e.fatal?a.abort():a.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const t=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===t.status?h:("dirty"===t.status&&a.dirty(),e(t.value),{status:a.value,value:t.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((t=>"aborted"===t.status?h:("dirty"===t.status&&a.dirty(),e(t.value).then((()=>({status:a.value,value:t.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!v(e))return e;const t=n.transform(e.value,r);if(t instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:t}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>v(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:a.value,value:e}))):e))}t.assertNever(n)}}le.create=(e,t,a)=>new le({schema:e,typeName:ke.ZodEffects,effect:t,...w(a)}),le.createWithPreprocess=(e,t,a)=>new le({schema:t,effect:{type:"preprocess",transform:e},typeName:ke.ZodEffects,...w(a)});class pe extends Z{_parse(e){return this._getType(e)===s.undefined?f(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}pe.create=(e,t)=>new pe({innerType:e,typeName:ke.ZodOptional,...w(t)});class he extends Z{_parse(e){return this._getType(e)===s.null?f(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}he.create=(e,t)=>new he({innerType:e,typeName:ke.ZodNullable,...w(t)});class me extends Z{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===s.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}me.create=(e,t)=>new me({innerType:e,typeName:ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...w(t)});class fe extends Z{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return g(s)?s.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new i(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new i(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}fe.create=(e,t)=>new fe({innerType:e,typeName:ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...w(t)});class ye extends Z{_parse(e){if(this._getType(e)!==s.nan){const t=this._getOrReturnCtx(e);return l(t,{code:r.invalid_type,expected:s.nan,received:t.parsedType}),h}return{status:"valid",value:e.data}}}ye.create=e=>new ye({typeName:ke.ZodNaN,...w(e)});const _e=Symbol("zod_brand");class ve extends Z{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class ge extends Z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new ge({in:e,out:t,typeName:ke.ZodPipeline})}}const xe=(e,t={},a)=>e?V.create().superRefine(((s,n)=>{var r,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(r=e.fatal)&&void 0!==r?r:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...d,fatal:o})}})):V.create(),be={object:J.lazycreate};var ke;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(ke||(ke={}));const we=P.create,Ze=A.create,Te=ye.create,Oe=M.create,Ne=$.create,Se=L.create,Ce=D.create,je=z.create,Ee=U.create,Ie=V.create,Pe=K.create,Re=B.create,Ae=W.create,Me=q.create,$e=J.create,Le=J.strictCreate,De=H.create,ze=G.create,Ue=Q.create,Ve=ee.create,Ke=te.create,Be=ae.create,We=se.create,qe=ne.create,Fe=re.create,Je=ie.create,He=de.create,Ye=ce.create,Ge=ue.create,Xe=le.create,Qe=pe.create,et=he.create,tt=le.createWithPreprocess,at=ge.create,st={string:e=>P.create({...e,coerce:!0}),number:e=>A.create({...e,coerce:!0}),boolean:e=>$.create({...e,coerce:!0}),bigint:e=>M.create({...e,coerce:!0}),date:e=>L.create({...e,coerce:!0})},nt=h;var rt=Object.freeze({__proto__:null,defaultErrorMap:o,setErrorMap:function(e){d=e},getErrorMap:c,makeIssue:u,EMPTY_PATH:[],addIssueToContext:l,ParseStatus:p,INVALID:h,DIRTY:m,OK:f,isAborted:y,isDirty:_,isValid:v,isAsync:g,get util(){return t},get objectUtil(){return a},ZodParsedType:s,getParsedType:n,ZodType:Z,ZodString:P,ZodNumber:A,ZodBigInt:M,ZodBoolean:$,ZodDate:L,ZodSymbol:D,ZodUndefined:z,ZodNull:U,ZodAny:V,ZodUnknown:K,ZodNever:B,ZodVoid:W,ZodArray:q,ZodObject:J,ZodUnion:H,ZodDiscriminatedUnion:G,ZodIntersection:Q,ZodTuple:ee,ZodRecord:te,ZodMap:ae,ZodSet:se,ZodFunction:ne,ZodLazy:re,ZodLiteral:ie,ZodEnum:de,ZodNativeEnum:ce,ZodPromise:ue,ZodEffects:le,ZodTransformer:le,ZodOptional:pe,ZodNullable:he,ZodDefault:me,ZodCatch:fe,ZodNaN:ye,BRAND:_e,ZodBranded:ve,ZodPipeline:ge,custom:xe,Schema:Z,ZodSchema:Z,late:be,get ZodFirstPartyTypeKind(){return ke},coerce:st,any:Ie,array:Me,bigint:Oe,boolean:Ne,date:Se,discriminatedUnion:ze,effect:Xe,enum:He,function:qe,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>xe((t=>t instanceof e),t),intersection:Ue,lazy:Fe,literal:Je,map:Be,nan:Te,nativeEnum:Ye,never:Re,null:Ee,nullable:et,number:Ze,object:$e,oboolean:()=>Ne().optional(),onumber:()=>Ze().optional(),optional:Qe,ostring:()=>we().optional(),pipeline:at,preprocess:tt,promise:Ge,record:Ke,set:We,strictObject:Le,string:we,symbol:Ce,transformer:Xe,tuple:Ve,undefined:je,union:De,unknown:Pe,void:Ae,NEVER:nt,ZodIssueCode:r,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:i}),it=rt.union([rt.literal("walletconnect"),rt.literal("keplr"),rt.literal("templewallet"),rt.literal("phantom"),rt.literal("beacon"),rt.literal("okxwallet"),rt.literal("suku"),rt.literal("lens"),rt.literal("ud"),rt.literal("cyberconnect"),rt.literal("*"),rt.literal("metamask")]),ot=rt.object({hostName:rt.boolean().optional(),iframeEmbed:rt.boolean().optional(),logoUrl:rt.string().optional(),background:rt.string().optional(),defaultChainId:rt.number().optional(),wallets:rt.array(it).default(["*"]),virtualBgs:rt.array(rt.string()).optional(),logoHeight:rt.number().optional(),logoWidth:rt.number().optional(),walletAddress:rt.string().optional(),redirectUrlOnLeave:rt.boolean().optional()}),dt=rt.object({size:rt.number(),duration:rt.number(),s3URL:rt.string(),ipfsURL:rt.string(),uploadToIpfs:rt.boolean().optional()});e.AllowedWallets={all:"*",injected:"metamask",walletconnect:"walletconnect",keplr:"keplr",templewallet:"templewallet",phantom:"phantom",beacon:"beacon",okxwallet:"okxwallet",suku:"suku",lens:"lens",ud:"ud",cyberconnect:"cyberconnect"},e.AllowedWalletsSchema=it,e.ClientConfigSchema=ot,e.RecordingDataSchema=dt,e.reactions=["😂","😢","😦","😍","🤔","👀","🙌","👍","👎","🔥","🍻","🚀","🎉","❤️","💯"],Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=huddle01-iframe-types.umd.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
647327
2496