@republicroad/seal-editor 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +384 -348
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2146,6 +2146,7 @@ var Lo = {
|
|
|
2146
2146
|
"dg.excel.wrapQuotes": "Wrap value in quotes",
|
|
2147
2147
|
"dg.excel.enterFieldName": "Enter field name",
|
|
2148
2148
|
"dg.condition.removeConfirm": "Remove condition?",
|
|
2149
|
+
"dg.condition.namePlaceholder": "Path name",
|
|
2149
2150
|
"expression.placeholder": "Expression",
|
|
2150
2151
|
"expression.key": "Key",
|
|
2151
2152
|
"expression.addRowAbove": "Add row above",
|
|
@@ -2339,6 +2340,7 @@ var Lo = {
|
|
|
2339
2340
|
"dg.excel.wrapQuotes": "值包裹引号",
|
|
2340
2341
|
"dg.excel.enterFieldName": "输入字段名",
|
|
2341
2342
|
"dg.condition.removeConfirm": "移除此条件?",
|
|
2343
|
+
"dg.condition.namePlaceholder": "路径名",
|
|
2342
2344
|
"expression.placeholder": "表达式",
|
|
2343
2345
|
"expression.key": "键名",
|
|
2344
2346
|
"expression.addRowAbove": "在上方添加行",
|
|
@@ -9689,7 +9691,7 @@ var Fd = () => N.useContext(jd), Id = () => {
|
|
|
9689
9691
|
typeDef: "declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;\ndeclare type Scalars = Primitive | Primitive[];\n\ndeclare namespace util {\n type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\n export type isAny<T> = 0 extends 1 & T ? true : false;\n export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;\n export function assertIs<T>(_arg: T): void;\n export function assertNever(_x: never): never;\n export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\n export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\n export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k };\n export const getValidEnumValues: (obj: any) => any[];\n export const objectValues: (obj: any) => any[];\n export const objectKeys: ObjectConstructor['keys'];\n export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;\n export type identity<T> = objectUtil.identity<T>;\n export type flatten<T> = objectUtil.flatten<T>;\n export type noUndefined<T> = T extends undefined ? never : T;\n export const isInteger: NumberConstructor['isInteger'];\n export function joinValues<T extends any[]>(array: T, separator?: string): string;\n export const jsonStringifyReplacer: (_: string, value: any) => any;\n export {};\n}\ndeclare namespace objectUtil {\n export type MergeShapes<U, V> = {\n [k in Exclude<keyof U, keyof V>]: U[k];\n } & V;\n type optionalKeys<T extends object> = {\n [k in keyof T]: undefined extends T[k] ? k : never;\n }[keyof T];\n type requiredKeys<T extends object> = {\n [k in keyof T]: undefined extends T[k] ? never : k;\n }[keyof T];\n export type addQuestionMarks<T extends object, _O = any> = {\n [K in requiredKeys<T>]: T[K];\n } & {\n [K in optionalKeys<T>]?: T[K];\n } & {\n [k in keyof T]?: unknown;\n };\n export type identity<T> = T;\n export type flatten<T> = identity<{\n [k in keyof T]: T[k];\n }>;\n export type noNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n }[keyof T];\n export type noNever<T> = identity<{\n [k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;\n }>;\n export const mergeShapes: <U, T>(first: U, second: T) => T & U;\n export type extendShape<A extends object, B extends object> = {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n } & {\n [K in keyof B]: B[K];\n };\n export {};\n}\ndeclare const ZodParsedType: {\n function: 'function';\n number: 'number';\n string: 'string';\n nan: 'nan';\n integer: 'integer';\n float: 'float';\n boolean: 'boolean';\n date: 'date';\n bigint: 'bigint';\n symbol: 'symbol';\n undefined: 'undefined';\n null: 'null';\n array: 'array';\n object: 'object';\n unknown: 'unknown';\n promise: 'promise';\n void: 'void';\n never: 'never';\n map: 'map';\n set: 'set';\n};\ndeclare type ZodParsedType = keyof typeof ZodParsedType;\ndeclare const getParsedType: (data: any) => ZodParsedType;\n\ndeclare type allKeys<T> = T extends any ? keyof T : never;\ndeclare type inferFlattenedErrors<T extends ZodType<any, any, any>, U = string> = typeToFlattenedError<TypeOf<T>, U>;\ndeclare type typeToFlattenedError<T, U = string> = {\n formErrors: U[];\n fieldErrors: {\n [P in allKeys<T>]?: U[];\n };\n};\ndeclare const ZodIssueCode: {\n invalid_type: 'invalid_type';\n invalid_literal: 'invalid_literal';\n custom: 'custom';\n invalid_union: 'invalid_union';\n invalid_union_discriminator: 'invalid_union_discriminator';\n invalid_enum_value: 'invalid_enum_value';\n unrecognized_keys: 'unrecognized_keys';\n invalid_arguments: 'invalid_arguments';\n invalid_return_type: 'invalid_return_type';\n invalid_date: 'invalid_date';\n invalid_string: 'invalid_string';\n too_small: 'too_small';\n too_big: 'too_big';\n invalid_intersection_types: 'invalid_intersection_types';\n not_multiple_of: 'not_multiple_of';\n not_finite: 'not_finite';\n};\ndeclare type ZodIssueCode = keyof typeof ZodIssueCode;\ndeclare type ZodIssueBase = {\n path: (string | number)[];\n message?: string;\n};\ninterface ZodInvalidTypeIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_type;\n expected: ZodParsedType;\n received: ZodParsedType;\n}\ninterface ZodInvalidLiteralIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_literal;\n expected: unknown;\n received: unknown;\n}\ninterface ZodUnrecognizedKeysIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.unrecognized_keys;\n keys: string[];\n}\ninterface ZodInvalidUnionIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_union;\n unionErrors: ZodError[];\n}\ninterface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_union_discriminator;\n options: Primitive[];\n}\ninterface ZodInvalidEnumValueIssue extends ZodIssueBase {\n received: string | number;\n code: typeof ZodIssueCode.invalid_enum_value;\n options: (string | number)[];\n}\ninterface ZodInvalidArgumentsIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_arguments;\n argumentsError: ZodError;\n}\ninterface ZodInvalidReturnTypeIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_return_type;\n returnTypeError: ZodError;\n}\ninterface ZodInvalidDateIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_date;\n}\ndeclare type StringValidation =\n | 'email'\n | 'url'\n | 'emoji'\n | 'uuid'\n | 'nanoid'\n | 'regex'\n | 'cuid'\n | 'cuid2'\n | 'ulid'\n | 'datetime'\n | 'date'\n | 'time'\n | 'duration'\n | 'ip'\n | 'base64'\n | {\n includes: string;\n position?: number;\n }\n | {\n startsWith: string;\n }\n | {\n endsWith: string;\n };\ninterface ZodInvalidStringIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_string;\n validation: StringValidation;\n}\ninterface ZodTooSmallIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.too_small;\n minimum: number | bigint;\n inclusive: boolean;\n exact?: boolean;\n type: 'array' | 'string' | 'number' | 'set' | 'date' | 'bigint';\n}\ninterface ZodTooBigIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.too_big;\n maximum: number | bigint;\n inclusive: boolean;\n exact?: boolean;\n type: 'array' | 'string' | 'number' | 'set' | 'date' | 'bigint';\n}\ninterface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.invalid_intersection_types;\n}\ninterface ZodNotMultipleOfIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.not_multiple_of;\n multipleOf: number | bigint;\n}\ninterface ZodNotFiniteIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.not_finite;\n}\ninterface ZodCustomIssue extends ZodIssueBase {\n code: typeof ZodIssueCode.custom;\n params?: {\n [k: string]: any;\n };\n}\ndeclare type DenormalizedError = {\n [k: string]: DenormalizedError | string[];\n};\ndeclare type ZodIssueOptionalMessage =\n | ZodInvalidTypeIssue\n | ZodInvalidLiteralIssue\n | ZodUnrecognizedKeysIssue\n | ZodInvalidUnionIssue\n | ZodInvalidUnionDiscriminatorIssue\n | ZodInvalidEnumValueIssue\n | ZodInvalidArgumentsIssue\n | ZodInvalidReturnTypeIssue\n | ZodInvalidDateIssue\n | ZodInvalidStringIssue\n | ZodTooSmallIssue\n | ZodTooBigIssue\n | ZodInvalidIntersectionTypesIssue\n | ZodNotMultipleOfIssue\n | ZodNotFiniteIssue\n | ZodCustomIssue;\ndeclare type ZodIssue = ZodIssueOptionalMessage & {\n fatal?: boolean;\n message: string;\n};\ndeclare const quotelessJson: (obj: any) => string;\ndeclare type recursiveZodFormattedError<T> = T extends [any, ...any[]]\n ? {\n [K in keyof T]?: ZodFormattedError<T[K]>;\n }\n : T extends any[]\n ? {\n [k: number]: ZodFormattedError<T[number]>;\n }\n : T extends object\n ? {\n [K in keyof T]?: ZodFormattedError<T[K]>;\n }\n : unknown;\ndeclare type ZodFormattedError<T, U = string> = {\n _errors: U[];\n} & recursiveZodFormattedError<NonNullable<T>>;\ndeclare type inferFormattedError<T extends ZodType<any, any, any>, U = string> = ZodFormattedError<TypeOf<T>, U>;\ndeclare class ZodError<T = any> extends Error {\n issues: ZodIssue[];\n get errors(): ZodIssue[];\n constructor(issues: ZodIssue[]);\n format(): ZodFormattedError<T>;\n format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;\n static create: (issues: ZodIssue[]) => ZodError<any>;\n static assert(value: unknown): asserts value is ZodError;\n toString(): string;\n get message(): string;\n get isEmpty(): boolean;\n addIssue: (sub: ZodIssue) => void;\n addIssues: (subs?: ZodIssue[]) => void;\n flatten(): typeToFlattenedError<T>;\n flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;\n get formErrors(): typeToFlattenedError<T, string>;\n}\ndeclare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, 'path'> : never;\ndeclare type IssueData = stripPath<ZodIssueOptionalMessage> & {\n path?: (string | number)[];\n fatal?: boolean;\n};\ndeclare type ErrorMapCtx = {\n defaultError: string;\n data: any;\n};\ndeclare type ZodErrorMap = (\n issue: ZodIssueOptionalMessage,\n _ctx: ErrorMapCtx,\n) => {\n message: string;\n};\n\ndeclare const errorMap: ZodErrorMap;\n//# sourceMappingURL=en.d.ts.map\n\ndeclare function setErrorMap(map: ZodErrorMap): void;\ndeclare function getErrorMap(): ZodErrorMap;\n\ndeclare const makeIssue: (params: {\n data: any;\n path: (string | number)[];\n errorMaps: ZodErrorMap[];\n issueData: IssueData;\n}) => ZodIssue;\ndeclare type ParseParams = {\n path: (string | number)[];\n errorMap: ZodErrorMap;\n async: boolean;\n};\ndeclare type ParsePathComponent = string | number;\ndeclare type ParsePath = ParsePathComponent[];\ndeclare const EMPTY_PATH: ParsePath;\ninterface ParseContext {\n readonly common: {\n readonly issues: ZodIssue[];\n readonly contextualErrorMap?: ZodErrorMap;\n readonly async: boolean;\n };\n readonly path: ParsePath;\n readonly schemaErrorMap?: ZodErrorMap;\n readonly parent: ParseContext | null;\n readonly data: any;\n readonly parsedType: ZodParsedType;\n}\ndeclare type ParseInput = {\n data: any;\n path: (string | number)[];\n parent: ParseContext;\n};\ndeclare function addIssueToContext(ctx: ParseContext, issueData: IssueData): void;\ndeclare type ObjectPair = {\n key: SyncParseReturnType<any>;\n value: SyncParseReturnType<any>;\n};\ndeclare class ParseStatus {\n value: 'aborted' | 'dirty' | 'valid';\n dirty(): void;\n abort(): void;\n static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;\n static mergeObjectAsync(\n status: ParseStatus,\n pairs: {\n key: ParseReturnType<any>;\n value: ParseReturnType<any>;\n }[],\n ): Promise<SyncParseReturnType<any>>;\n static mergeObjectSync(\n status: ParseStatus,\n pairs: {\n key: SyncParseReturnType<any>;\n value: SyncParseReturnType<any>;\n alwaysSet?: boolean;\n }[],\n ): SyncParseReturnType;\n}\ninterface ParseResult {\n status: 'aborted' | 'dirty' | 'valid';\n data: any;\n}\ndeclare type INVALID = {\n status: 'aborted';\n};\ndeclare const INVALID: INVALID;\ndeclare type DIRTY<T> = {\n status: 'dirty';\n value: T;\n};\ndeclare const DIRTY: <T>(value: T) => DIRTY<T>;\ndeclare type OK<T> = {\n status: 'valid';\n value: T;\n};\ndeclare const OK: <T>(value: T) => OK<T>;\ndeclare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;\ndeclare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;\ndeclare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;\ndeclare const isAborted: (x: ParseReturnType<any>) => x is INVALID;\ndeclare const isDirty: <T>(x: ParseReturnType<T>) => x is OK<T> | DIRTY<T>;\ndeclare const isValid: <T>(x: ParseReturnType<T>) => x is OK<T>;\ndeclare const isAsync: <T>(x: ParseReturnType<T>) => x is AsyncParseReturnType<T>;\n\ndeclare namespace enumUtil {\n type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (\n k: infer Intersection,\n ) => void\n ? Intersection\n : never;\n type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;\n type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never]\n ? Tuple\n : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;\n type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;\n export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;\n export {};\n}\n\ndeclare namespace errorUtil {\n type ErrMessage =\n | string\n | {\n message?: string;\n };\n const errToObj: (message?: ErrMessage | undefined) => {\n message?: string | undefined;\n };\n const toString: (message?: ErrMessage | undefined) => string | undefined;\n}\n\ndeclare namespace partialUtil {\n type DeepPartial<T extends ZodTypeAny> =\n T extends ZodObject<ZodRawShape>\n ? ZodObject<\n {\n [k in keyof T['shape']]: ZodOptional<DeepPartial<T['shape'][k]>>;\n },\n T['_def']['unknownKeys'],\n T['_def']['catchall']\n >\n : T extends ZodArray<infer Type, infer Card>\n ? ZodArray<DeepPartial<Type>, Card>\n : T extends ZodOptional<infer Type>\n ? ZodOptional<DeepPartial<Type>>\n : T extends ZodNullable<infer Type>\n ? ZodNullable<DeepPartial<Type>>\n : T extends ZodTuple<infer Items>\n ? {\n [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;\n } extends infer PI\n ? PI extends ZodTupleItems\n ? ZodTuple<PI>\n : never\n : never\n : T;\n}\n\ninterface RefinementCtx {\n addIssue: (arg: IssueData) => void;\n path: (string | number)[];\n}\ndeclare type ZodRawShape = {\n [k: string]: ZodTypeAny;\n};\ndeclare type ZodTypeAny = ZodType<any, any, any>;\ndeclare type TypeOf<T extends ZodType<any, any, any>> = T['_output'];\ndeclare type input<T extends ZodType<any, any, any>> = T['_input'];\ndeclare type output<T extends ZodType<any, any, any>> = T['_output'];\n\ndeclare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, 'code'>>;\ninterface ZodTypeDef {\n errorMap?: ZodErrorMap;\n description?: string;\n}\ndeclare type RawCreateParams =\n | {\n errorMap?: ZodErrorMap;\n invalid_type_error?: string;\n required_error?: string;\n message?: string;\n description?: string;\n }\n | undefined;\ndeclare type ProcessedCreateParams = {\n errorMap?: ZodErrorMap;\n description?: string;\n};\ndeclare type SafeParseSuccess<Output> = {\n success: true;\n data: Output;\n error?: never;\n};\ndeclare type SafeParseError<Input> = {\n success: false;\n error: ZodError<Input>;\n data?: never;\n};\ndeclare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;\ndeclare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {\n readonly _type: Output;\n readonly _output: Output;\n readonly _input: Input;\n readonly _def: Def;\n get description(): string | undefined;\n abstract _parse(input: ParseInput): ParseReturnType<Output>;\n _getType(input: ParseInput): string;\n _getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;\n _processInputParams(input: ParseInput): {\n status: ParseStatus;\n ctx: ParseContext;\n };\n _parseSync(input: ParseInput): SyncParseReturnType<Output>;\n _parseAsync(input: ParseInput): AsyncParseReturnType<Output>;\n parse(data: unknown, params?: Partial<ParseParams>): Output;\n safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;\n parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;\n safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;\n /** Alias of safeParseAsync */\n spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;\n refine<RefinedOutput extends Output>(\n check: (arg: Output) => arg is RefinedOutput,\n message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams),\n ): ZodEffects<this, RefinedOutput, Input>;\n refine(\n check: (arg: Output) => unknown | Promise<unknown>,\n message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams),\n ): ZodEffects<this, Output, Input>;\n refinement<RefinedOutput extends Output>(\n check: (arg: Output) => arg is RefinedOutput,\n refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData),\n ): ZodEffects<this, RefinedOutput, Input>;\n refinement(\n check: (arg: Output) => boolean,\n refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData),\n ): ZodEffects<this, Output, Input>;\n _refinement(refinement: RefinementEffect<Output>['refinement']): ZodEffects<this, Output, Input>;\n superRefine<RefinedOutput extends Output>(\n refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput,\n ): ZodEffects<this, RefinedOutput, Input>;\n superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;\n superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise<void>): ZodEffects<this, Output, Input>;\n constructor(def: Def);\n optional(): ZodOptional<this>;\n nullable(): ZodNullable<this>;\n nullish(): ZodOptional<ZodNullable<this>>;\n array(): ZodArray<this>;\n promise(): ZodPromise<this>;\n or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;\n and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;\n transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;\n default(def: util.noUndefined<Input>): ZodDefault<this>;\n default(def: () => util.noUndefined<Input>): ZodDefault<this>;\n brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;\n catch(def: Output): ZodCatch<this>;\n catch(def: (ctx: { error: ZodError; input: Input }) => Output): ZodCatch<this>;\n describe(description: string): this;\n pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;\n readonly(): ZodReadonly<this>;\n isOptional(): boolean;\n isNullable(): boolean;\n}\ndeclare type IpVersion = 'v4' | 'v6';\ndeclare type ZodStringCheck =\n | {\n kind: 'min';\n value: number;\n message?: string;\n }\n | {\n kind: 'max';\n value: number;\n message?: string;\n }\n | {\n kind: 'length';\n value: number;\n message?: string;\n }\n | {\n kind: 'email';\n message?: string;\n }\n | {\n kind: 'url';\n message?: string;\n }\n | {\n kind: 'emoji';\n message?: string;\n }\n | {\n kind: 'uuid';\n message?: string;\n }\n | {\n kind: 'nanoid';\n message?: string;\n }\n | {\n kind: 'cuid';\n message?: string;\n }\n | {\n kind: 'includes';\n value: string;\n position?: number;\n message?: string;\n }\n | {\n kind: 'cuid2';\n message?: string;\n }\n | {\n kind: 'ulid';\n message?: string;\n }\n | {\n kind: 'startsWith';\n value: string;\n message?: string;\n }\n | {\n kind: 'endsWith';\n value: string;\n message?: string;\n }\n | {\n kind: 'regex';\n regex: RegExp;\n message?: string;\n }\n | {\n kind: 'trim';\n message?: string;\n }\n | {\n kind: 'toLowerCase';\n message?: string;\n }\n | {\n kind: 'toUpperCase';\n message?: string;\n }\n | {\n kind: 'datetime';\n offset: boolean;\n local: boolean;\n precision: number | null;\n message?: string;\n }\n | {\n kind: 'date';\n message?: string;\n }\n | {\n kind: 'time';\n precision: number | null;\n message?: string;\n }\n | {\n kind: 'duration';\n message?: string;\n }\n | {\n kind: 'ip';\n version?: IpVersion;\n message?: string;\n }\n | {\n kind: 'base64';\n message?: string;\n };\ninterface ZodStringDef extends ZodTypeDef {\n checks: ZodStringCheck[];\n typeName: ZodFirstPartyTypeKind.ZodString;\n coerce: boolean;\n}\ndeclare function datetimeRegex(args: { precision?: number | null; offset?: boolean; local?: boolean }): RegExp;\ndeclare class ZodString extends ZodType<string, ZodStringDef, string> {\n _parse(input: ParseInput): ParseReturnType<string>;\n protected _regex(\n regex: RegExp,\n validation: StringValidation,\n message?: errorUtil.ErrMessage,\n ): ZodEffects<this, string, string>;\n _addCheck(check: ZodStringCheck): ZodString;\n email(message?: errorUtil.ErrMessage): ZodString;\n url(message?: errorUtil.ErrMessage): ZodString;\n emoji(message?: errorUtil.ErrMessage): ZodString;\n uuid(message?: errorUtil.ErrMessage): ZodString;\n nanoid(message?: errorUtil.ErrMessage): ZodString;\n cuid(message?: errorUtil.ErrMessage): ZodString;\n cuid2(message?: errorUtil.ErrMessage): ZodString;\n ulid(message?: errorUtil.ErrMessage): ZodString;\n base64(message?: errorUtil.ErrMessage): ZodString;\n ip(\n options?:\n | string\n | {\n version?: 'v4' | 'v6';\n message?: string;\n },\n ): ZodString;\n datetime(\n options?:\n | string\n | {\n message?: string | undefined;\n precision?: number | null;\n offset?: boolean;\n local?: boolean;\n },\n ): ZodString;\n date(message?: string): ZodString;\n time(\n options?:\n | string\n | {\n message?: string | undefined;\n precision?: number | null;\n },\n ): ZodString;\n duration(message?: errorUtil.ErrMessage): ZodString;\n regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;\n includes(\n value: string,\n options?: {\n message?: string;\n position?: number;\n },\n ): ZodString;\n startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;\n endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;\n min(minLength: number, message?: errorUtil.ErrMessage): ZodString;\n max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;\n length(len: number, message?: errorUtil.ErrMessage): ZodString;\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message?: errorUtil.ErrMessage): ZodString;\n trim(): ZodString;\n toLowerCase(): ZodString;\n toUpperCase(): ZodString;\n get isDatetime(): boolean;\n get isDate(): boolean;\n get isTime(): boolean;\n get isDuration(): boolean;\n get isEmail(): boolean;\n get isURL(): boolean;\n get isEmoji(): boolean;\n get isUUID(): boolean;\n get isNANOID(): boolean;\n get isCUID(): boolean;\n get isCUID2(): boolean;\n get isULID(): boolean;\n get isIP(): boolean;\n get isBase64(): boolean;\n get minLength(): number | null;\n get maxLength(): number | null;\n static create: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: true | undefined;\n })\n | undefined,\n ) => ZodString;\n}\ndeclare type ZodNumberCheck =\n | {\n kind: 'min';\n value: number;\n inclusive: boolean;\n message?: string;\n }\n | {\n kind: 'max';\n value: number;\n inclusive: boolean;\n message?: string;\n }\n | {\n kind: 'int';\n message?: string;\n }\n | {\n kind: 'multipleOf';\n value: number;\n message?: string;\n }\n | {\n kind: 'finite';\n message?: string;\n };\ninterface ZodNumberDef extends ZodTypeDef {\n checks: ZodNumberCheck[];\n typeName: ZodFirstPartyTypeKind.ZodNumber;\n coerce: boolean;\n}\ndeclare class ZodNumber extends ZodType<number, ZodNumberDef, number> {\n _parse(input: ParseInput): ParseReturnType<number>;\n static create: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodNumber;\n gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;\n min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;\n gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;\n lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;\n max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;\n lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;\n protected setLimit(kind: 'min' | 'max', value: number, inclusive: boolean, message?: string): ZodNumber;\n _addCheck(check: ZodNumberCheck): ZodNumber;\n int(message?: errorUtil.ErrMessage): ZodNumber;\n positive(message?: errorUtil.ErrMessage): ZodNumber;\n negative(message?: errorUtil.ErrMessage): ZodNumber;\n nonpositive(message?: errorUtil.ErrMessage): ZodNumber;\n nonnegative(message?: errorUtil.ErrMessage): ZodNumber;\n multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;\n step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;\n finite(message?: errorUtil.ErrMessage): ZodNumber;\n safe(message?: errorUtil.ErrMessage): ZodNumber;\n get minValue(): number | null;\n get maxValue(): number | null;\n get isInt(): boolean;\n get isFinite(): boolean;\n}\ndeclare type ZodBigIntCheck =\n | {\n kind: 'min';\n value: bigint;\n inclusive: boolean;\n message?: string;\n }\n | {\n kind: 'max';\n value: bigint;\n inclusive: boolean;\n message?: string;\n }\n | {\n kind: 'multipleOf';\n value: bigint;\n message?: string;\n };\ninterface ZodBigIntDef extends ZodTypeDef {\n checks: ZodBigIntCheck[];\n typeName: ZodFirstPartyTypeKind.ZodBigInt;\n coerce: boolean;\n}\ndeclare class ZodBigInt extends ZodType<bigint, ZodBigIntDef, bigint> {\n _parse(input: ParseInput): ParseReturnType<bigint>;\n static create: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodBigInt;\n gte(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt;\n min: (value: bigint, message?: errorUtil.ErrMessage | undefined) => ZodBigInt;\n gt(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt;\n lte(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt;\n max: (value: bigint, message?: errorUtil.ErrMessage | undefined) => ZodBigInt;\n lt(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt;\n protected setLimit(kind: 'min' | 'max', value: bigint, inclusive: boolean, message?: string): ZodBigInt;\n _addCheck(check: ZodBigIntCheck): ZodBigInt;\n positive(message?: errorUtil.ErrMessage): ZodBigInt;\n negative(message?: errorUtil.ErrMessage): ZodBigInt;\n nonpositive(message?: errorUtil.ErrMessage): ZodBigInt;\n nonnegative(message?: errorUtil.ErrMessage): ZodBigInt;\n multipleOf(value: bigint, message?: errorUtil.ErrMessage): ZodBigInt;\n get minValue(): bigint | null;\n get maxValue(): bigint | null;\n}\ninterface ZodBooleanDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodBoolean;\n coerce: boolean;\n}\ndeclare class ZodBoolean extends ZodType<boolean, ZodBooleanDef, boolean> {\n _parse(input: ParseInput): ParseReturnType<boolean>;\n static create: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodBoolean;\n}\ndeclare type ZodDateCheck =\n | {\n kind: 'min';\n value: number;\n message?: string;\n }\n | {\n kind: 'max';\n value: number;\n message?: string;\n };\ninterface ZodDateDef extends ZodTypeDef {\n checks: ZodDateCheck[];\n coerce: boolean;\n typeName: ZodFirstPartyTypeKind.ZodDate;\n}\ndeclare class ZodDate extends ZodType<Date, ZodDateDef, Date> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n _addCheck(check: ZodDateCheck): ZodDate;\n min(minDate: Date, message?: errorUtil.ErrMessage): ZodDate;\n max(maxDate: Date, message?: errorUtil.ErrMessage): ZodDate;\n get minDate(): Date | null;\n get maxDate(): Date | null;\n static create: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodDate;\n}\ninterface ZodSymbolDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodSymbol;\n}\ndeclare class ZodSymbol extends ZodType<symbol, ZodSymbolDef, symbol> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: (params?: RawCreateParams) => ZodSymbol;\n}\ninterface ZodUndefinedDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodUndefined;\n}\ndeclare class ZodUndefined extends ZodType<undefined, ZodUndefinedDef, undefined> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n params?: RawCreateParams;\n static create: (params?: RawCreateParams) => ZodUndefined;\n}\ninterface ZodNullDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodNull;\n}\ndeclare class ZodNull extends ZodType<null, ZodNullDef, null> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: (params?: RawCreateParams) => ZodNull;\n}\ninterface ZodAnyDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodAny;\n}\ndeclare class ZodAny extends ZodType<any, ZodAnyDef, any> {\n _any: true;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: (params?: RawCreateParams) => ZodAny;\n}\ninterface ZodUnknownDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodUnknown;\n}\ndeclare class ZodUnknown extends ZodType<unknown, ZodUnknownDef, unknown> {\n _unknown: true;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: (params?: RawCreateParams) => ZodUnknown;\n}\ninterface ZodNeverDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodNever;\n}\ndeclare class ZodNever extends ZodType<never, ZodNeverDef, never> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: (params?: RawCreateParams) => ZodNever;\n}\ninterface ZodVoidDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodVoid;\n}\ndeclare class ZodVoid extends ZodType<void, ZodVoidDef, void> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: (params?: RawCreateParams) => ZodVoid;\n}\ninterface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n type: T;\n typeName: ZodFirstPartyTypeKind.ZodArray;\n exactLength: {\n value: number;\n message?: string;\n } | null;\n minLength: {\n value: number;\n message?: string;\n } | null;\n maxLength: {\n value: number;\n message?: string;\n } | null;\n}\ndeclare type ArrayCardinality = 'many' | 'atleastone';\ndeclare type arrayOutputType<\n T extends ZodTypeAny,\n Cardinality extends ArrayCardinality = 'many',\n> = Cardinality extends 'atleastone' ? [T['_output'], ...T['_output'][]] : T['_output'][];\ndeclare class ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinality = 'many'> extends ZodType<\n arrayOutputType<T, Cardinality>,\n ZodArrayDef<T>,\n Cardinality extends 'atleastone' ? [T['_input'], ...T['_input'][]] : T['_input'][]\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get element(): T;\n min(minLength: number, message?: errorUtil.ErrMessage): this;\n max(maxLength: number, message?: errorUtil.ErrMessage): this;\n length(len: number, message?: errorUtil.ErrMessage): this;\n nonempty(message?: errorUtil.ErrMessage): ZodArray<T, 'atleastone'>;\n static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, 'many'>;\n}\ndeclare type ZodNonEmptyArray<T extends ZodTypeAny> = ZodArray<T, 'atleastone'>;\ndeclare type UnknownKeysParam = 'passthrough' | 'strict' | 'strip';\ninterface ZodObjectDef<\n T extends ZodRawShape = ZodRawShape,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n Catchall extends ZodTypeAny = ZodTypeAny,\n> extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodObject;\n shape: () => T;\n catchall: Catchall;\n unknownKeys: UnknownKeys;\n}\ndeclare type mergeTypes<A, B> = {\n [k in keyof A | keyof B]: k extends keyof B ? B[k] : k extends keyof A ? A[k] : never;\n};\ndeclare type objectOutputType<\n Shape extends ZodRawShape,\n Catchall extends ZodTypeAny,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n> = objectUtil.flatten<objectUtil.addQuestionMarks<baseObjectOutputType<Shape>>> &\n CatchallOutput<Catchall> &\n PassthroughType<UnknownKeys>;\ndeclare type baseObjectOutputType<Shape extends ZodRawShape> = {\n [k in keyof Shape]: Shape[k]['_output'];\n};\ndeclare type objectInputType<\n Shape extends ZodRawShape,\n Catchall extends ZodTypeAny,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n> = objectUtil.flatten<baseObjectInputType<Shape>> & CatchallInput<Catchall> & PassthroughType<UnknownKeys>;\ndeclare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{\n [k in keyof Shape]: Shape[k]['_input'];\n}>;\ndeclare type CatchallOutput<T extends ZodType> = ZodType extends T\n ? unknown\n : {\n [k: string]: T['_output'];\n };\ndeclare type CatchallInput<T extends ZodType> = ZodType extends T\n ? unknown\n : {\n [k: string]: T['_input'];\n };\ndeclare type PassthroughType<T extends UnknownKeysParam> = T extends 'passthrough'\n ? {\n [k: string]: unknown;\n }\n : unknown;\ndeclare type deoptional<T extends ZodTypeAny> =\n T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;\ndeclare type SomeZodObject = ZodObject<ZodRawShape, UnknownKeysParam, ZodTypeAny>;\ndeclare type noUnrecognized<Obj extends object, Shape extends object> = {\n [k in keyof Obj]: k extends keyof Shape ? Obj[k] : never;\n};\ndeclare class ZodObject<\n T extends ZodRawShape,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n Catchall extends ZodTypeAny = ZodTypeAny,\n Output = objectOutputType<T, Catchall, UnknownKeys>,\n Input = objectInputType<T, Catchall, UnknownKeys>,\n> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {\n private _cached;\n _getCached(): {\n shape: T;\n keys: string[];\n };\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get shape(): T;\n strict(message?: errorUtil.ErrMessage): ZodObject<T, 'strict', Catchall>;\n strip(): ZodObject<T, 'strip', Catchall>;\n passthrough(): ZodObject<T, 'passthrough', Catchall>;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n nonstrict: () => ZodObject<T, 'passthrough', Catchall>;\n extend<Augmentation extends ZodRawShape>(\n augmentation: Augmentation,\n ): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;\n /**\n * @deprecated Use `.extend` instead\n * */\n augment: <Augmentation extends ZodRawShape>(\n augmentation: Augmentation,\n ) => ZodObject<\n objectUtil.extendShape<T, Augmentation>,\n UnknownKeys,\n Catchall,\n objectOutputType<objectUtil.extendShape<T, Augmentation>, Catchall, UnknownKeys>,\n objectInputType<objectUtil.extendShape<T, Augmentation>, Catchall, UnknownKeys>\n >;\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge<Incoming extends AnyZodObject, Augmentation extends Incoming['shape']>(\n merging: Incoming,\n ): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming['_def']['unknownKeys'], Incoming['_def']['catchall']>;\n setKey<Key extends string, Schema extends ZodTypeAny>(\n key: Key,\n schema: Schema,\n ): ZodObject<\n T & {\n [k in Key]: Schema;\n },\n UnknownKeys,\n Catchall\n >;\n catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;\n pick<\n Mask extends util.Exactly<\n {\n [k in keyof T]?: true;\n },\n Mask\n >,\n >(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;\n omit<\n Mask extends util.Exactly<\n {\n [k in keyof T]?: true;\n },\n Mask\n >,\n >(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;\n /**\n * @deprecated\n */\n deepPartial(): partialUtil.DeepPartial<this>;\n partial(): ZodObject<\n {\n [k in keyof T]: ZodOptional<T[k]>;\n },\n UnknownKeys,\n Catchall\n >;\n partial<\n Mask extends util.Exactly<\n {\n [k in keyof T]?: true;\n },\n Mask\n >,\n >(\n mask: Mask,\n ): ZodObject<\n objectUtil.noNever<{\n [k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];\n }>,\n UnknownKeys,\n Catchall\n >;\n required(): ZodObject<\n {\n [k in keyof T]: deoptional<T[k]>;\n },\n UnknownKeys,\n Catchall\n >;\n required<\n Mask extends util.Exactly<\n {\n [k in keyof T]?: true;\n },\n Mask\n >,\n >(\n mask: Mask,\n ): ZodObject<\n objectUtil.noNever<{\n [k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];\n }>,\n UnknownKeys,\n Catchall\n >;\n keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;\n static create: <T_1 extends ZodRawShape>(\n shape: T_1,\n params?: RawCreateParams,\n ) => ZodObject<\n T_1,\n 'strip',\n ZodTypeAny,\n {\n [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>]: objectUtil.addQuestionMarks<\n baseObjectOutputType<T_1>,\n any\n >[k];\n },\n { [k_1 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_1] }\n >;\n static strictCreate: <T_1 extends ZodRawShape>(\n shape: T_1,\n params?: RawCreateParams,\n ) => ZodObject<\n T_1,\n 'strict',\n ZodTypeAny,\n {\n [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>]: objectUtil.addQuestionMarks<\n baseObjectOutputType<T_1>,\n any\n >[k];\n },\n { [k_1 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_1] }\n >;\n static lazycreate: <T_1 extends ZodRawShape>(\n shape: () => T_1,\n params?: RawCreateParams,\n ) => ZodObject<\n T_1,\n 'strip',\n ZodTypeAny,\n {\n [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>]: objectUtil.addQuestionMarks<\n baseObjectOutputType<T_1>,\n any\n >[k];\n },\n { [k_1 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_1] }\n >;\n}\ndeclare type AnyZodObject = ZodObject<any, any, any>;\ndeclare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;\ninterface ZodUnionDef<\n T extends ZodUnionOptions = Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>,\n> extends ZodTypeDef {\n options: T;\n typeName: ZodFirstPartyTypeKind.ZodUnion;\n}\ndeclare class ZodUnion<T extends ZodUnionOptions> extends ZodType<\n T[number]['_output'],\n ZodUnionDef<T>,\n T[number]['_input']\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get options(): T;\n static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(\n types: T_1,\n params?: RawCreateParams,\n ) => ZodUnion<T_1>;\n}\ndeclare type ZodDiscriminatedUnionOption<Discriminator extends string> = ZodObject<\n {\n [key in Discriminator]: ZodTypeAny;\n } & ZodRawShape,\n UnknownKeysParam,\n ZodTypeAny\n>;\ninterface ZodDiscriminatedUnionDef<\n Discriminator extends string,\n Options extends ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[],\n> extends ZodTypeDef {\n discriminator: Discriminator;\n options: Options;\n optionsMap: Map<Primitive, ZodDiscriminatedUnionOption<any>>;\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion;\n}\ndeclare class ZodDiscriminatedUnion<\n Discriminator extends string,\n Options extends ZodDiscriminatedUnionOption<Discriminator>[],\n> extends ZodType<output<Options[number]>, ZodDiscriminatedUnionDef<Discriminator, Options>, input<Options[number]>> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get discriminator(): Discriminator;\n get options(): Options;\n get optionsMap(): Map<Primitive, ZodDiscriminatedUnionOption<any>>;\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create<\n Discriminator extends string,\n Types extends [ZodDiscriminatedUnionOption<Discriminator>, ...ZodDiscriminatedUnionOption<Discriminator>[]],\n >(\n discriminator: Discriminator,\n options: Types,\n params?: RawCreateParams,\n ): ZodDiscriminatedUnion<Discriminator, Types>;\n}\ninterface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n left: T;\n right: U;\n typeName: ZodFirstPartyTypeKind.ZodIntersection;\n}\ndeclare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<\n T['_output'] & U['_output'],\n ZodIntersectionDef<T, U>,\n T['_input'] & U['_input']\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(\n left: T_1,\n right: U_1,\n params?: RawCreateParams,\n ) => ZodIntersection<T_1, U_1>;\n}\ndeclare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];\ndeclare type AssertArray<T> = T extends any[] ? T : never;\ndeclare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{\n [k in keyof T]: T[k] extends ZodType<any, any, any> ? T[k]['_output'] : never;\n}>;\ndeclare type OutputTypeOfTupleWithRest<\n T extends ZodTupleItems | [],\n Rest extends ZodTypeAny | null = null,\n> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest['_output'][]] : OutputTypeOfTuple<T>;\ndeclare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{\n [k in keyof T]: T[k] extends ZodType<any, any, any> ? T[k]['_input'] : never;\n}>;\ndeclare type InputTypeOfTupleWithRest<\n T extends ZodTupleItems | [],\n Rest extends ZodTypeAny | null = null,\n> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest['_input'][]] : InputTypeOfTuple<T>;\ninterface ZodTupleDef<\n T extends ZodTupleItems | [] = ZodTupleItems,\n Rest extends ZodTypeAny | null = null,\n> extends ZodTypeDef {\n items: T;\n rest: Rest;\n typeName: ZodFirstPartyTypeKind.ZodTuple;\n}\ndeclare type AnyZodTuple = ZodTuple<[ZodTypeAny, ...ZodTypeAny[]] | [], ZodTypeAny | null>;\ndeclare class ZodTuple<\n T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]],\n Rest extends ZodTypeAny | null = null,\n> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get items(): T;\n rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;\n static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(\n schemas: T_1,\n params?: RawCreateParams,\n ) => ZodTuple<T_1, null>;\n}\ninterface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n valueType: Value;\n keyType: Key;\n typeName: ZodFirstPartyTypeKind.ZodRecord;\n}\ndeclare type KeySchema = ZodType<string | number | symbol, any, any>;\ndeclare type RecordType<K extends string | number | symbol, V> = [string] extends [K]\n ? Record<K, V>\n : [number] extends [K]\n ? Record<K, V>\n : [symbol] extends [K]\n ? Record<K, V>\n : [BRAND<string | number | symbol>] extends [K]\n ? Record<K, V>\n : Partial<Record<K, V>>;\ndeclare class ZodRecord<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodType<\n RecordType<Key['_output'], Value['_output']>,\n ZodRecordDef<Key, Value>,\n RecordType<Key['_input'], Value['_input']>\n> {\n get keySchema(): Key;\n get valueSchema(): Value;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get element(): Value;\n static create<Value extends ZodTypeAny>(valueType: Value, params?: RawCreateParams): ZodRecord<ZodString, Value>;\n static create<Keys extends KeySchema, Value extends ZodTypeAny>(\n keySchema: Keys,\n valueType: Value,\n params?: RawCreateParams,\n ): ZodRecord<Keys, Value>;\n}\ninterface ZodMapDef<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n valueType: Value;\n keyType: Key;\n typeName: ZodFirstPartyTypeKind.ZodMap;\n}\ndeclare class ZodMap<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> extends ZodType<\n Map<Key['_output'], Value['_output']>,\n ZodMapDef<Key, Value>,\n Map<Key['_input'], Value['_input']>\n> {\n get keySchema(): Key;\n get valueSchema(): Value;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: <Key_1 extends ZodTypeAny = ZodTypeAny, Value_1 extends ZodTypeAny = ZodTypeAny>(\n keyType: Key_1,\n valueType: Value_1,\n params?: RawCreateParams,\n ) => ZodMap<Key_1, Value_1>;\n}\ninterface ZodSetDef<Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n valueType: Value;\n typeName: ZodFirstPartyTypeKind.ZodSet;\n minSize: {\n value: number;\n message?: string;\n } | null;\n maxSize: {\n value: number;\n message?: string;\n } | null;\n}\ndeclare class ZodSet<Value extends ZodTypeAny = ZodTypeAny> extends ZodType<\n Set<Value['_output']>,\n ZodSetDef<Value>,\n Set<Value['_input']>\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n min(minSize: number, message?: errorUtil.ErrMessage): this;\n max(maxSize: number, message?: errorUtil.ErrMessage): this;\n size(size: number, message?: errorUtil.ErrMessage): this;\n nonempty(message?: errorUtil.ErrMessage): ZodSet<Value>;\n static create: <Value_1 extends ZodTypeAny = ZodTypeAny>(\n valueType: Value_1,\n params?: RawCreateParams,\n ) => ZodSet<Value_1>;\n}\ninterface ZodFunctionDef<\n Args extends ZodTuple<any, any> = ZodTuple<any, any>,\n Returns extends ZodTypeAny = ZodTypeAny,\n> extends ZodTypeDef {\n args: Args;\n returns: Returns;\n typeName: ZodFirstPartyTypeKind.ZodFunction;\n}\ndeclare type OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> =\n Args['_input'] extends Array<any> ? (...args: Args['_input']) => Returns['_output'] : never;\ndeclare type InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> =\n Args['_output'] extends Array<any> ? (...args: Args['_output']) => Returns['_input'] : never;\ndeclare class ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> extends ZodType<\n OuterTypeOfFunction<Args, Returns>,\n ZodFunctionDef<Args, Returns>,\n InnerTypeOfFunction<Args, Returns>\n> {\n _parse(input: ParseInput): ParseReturnType<any>;\n parameters(): Args;\n returnType(): Returns;\n args<Items extends Parameters<(typeof ZodTuple)['create']>[0]>(\n ...items: Items\n ): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;\n returns<NewReturnType extends ZodType<any, any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;\n implement<F extends InnerTypeOfFunction<Args, Returns>>(\n func: F,\n ): ReturnType<F> extends Returns['_output']\n ? (...args: Args['_input']) => ReturnType<F>\n : OuterTypeOfFunction<Args, Returns>;\n strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;\n validate: <F extends InnerTypeOfFunction<Args, Returns>>(\n func: F,\n ) => ReturnType<F> extends Returns['_output']\n ? (...args: Args['_input']) => ReturnType<F>\n : OuterTypeOfFunction<Args, Returns>;\n static create(): ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>;\n static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>>(args: T): ZodFunction<T, ZodUnknown>;\n static create<T extends AnyZodTuple, U extends ZodTypeAny>(args: T, returns: U): ZodFunction<T, U>;\n static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(\n args: T,\n returns: U,\n params?: RawCreateParams,\n ): ZodFunction<T, U>;\n}\ninterface ZodLazyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n getter: () => T;\n typeName: ZodFirstPartyTypeKind.ZodLazy;\n}\ndeclare class ZodLazy<T extends ZodTypeAny> extends ZodType<output<T>, ZodLazyDef<T>, input<T>> {\n get schema(): T;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: <T_1 extends ZodTypeAny>(getter: () => T_1, params?: RawCreateParams) => ZodLazy<T_1>;\n}\ninterface ZodLiteralDef<T = any> extends ZodTypeDef {\n value: T;\n typeName: ZodFirstPartyTypeKind.ZodLiteral;\n}\ndeclare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>, T> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get value(): T;\n static create: <T_1 extends Primitive>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>;\n}\ndeclare type ArrayKeys = keyof any[];\ndeclare type Indices<T> = Exclude<keyof T, ArrayKeys>;\ndeclare type EnumValues<T extends string = string> = readonly [T, ...T[]];\ndeclare type Values<T extends EnumValues> = {\n [k in T[number]]: k;\n};\ninterface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {\n values: T;\n typeName: ZodFirstPartyTypeKind.ZodEnum;\n}\ndeclare type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n};\ndeclare type FilterEnum<Values, ToExclude> = Values extends []\n ? []\n : Values extends [infer Head, ...infer Rest]\n ? Head extends ToExclude\n ? FilterEnum<Rest, ToExclude>\n : [Head, ...FilterEnum<Rest, ToExclude>]\n : never;\ndeclare type typecast<A, T> = A extends T ? A : never;\ndeclare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(\n values: T,\n params?: RawCreateParams,\n): ZodEnum<Writeable<T>>;\ndeclare function createZodEnum<U extends string, T extends [U, ...U[]]>(\n values: T,\n params?: RawCreateParams,\n): ZodEnum<T>;\ndeclare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>, T[number]> {\n #private;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n get options(): T;\n get enum(): Values<T>;\n get Values(): Values<T>;\n get Enum(): Values<T>;\n extract<ToExtract extends readonly [T[number], ...T[number][]]>(\n values: ToExtract,\n newDef?: RawCreateParams,\n ): ZodEnum<Writeable<ToExtract>>;\n exclude<ToExclude extends readonly [T[number], ...T[number][]]>(\n values: ToExclude,\n newDef?: RawCreateParams,\n ): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;\n static create: typeof createZodEnum;\n}\ninterface ZodNativeEnumDef<T extends EnumLike = EnumLike> extends ZodTypeDef {\n values: T;\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum;\n}\ndeclare type EnumLike = {\n [k: string]: string | number;\n [nu: number]: string;\n};\ndeclare class ZodNativeEnum<T extends EnumLike> extends ZodType<T[keyof T], ZodNativeEnumDef<T>, T[keyof T]> {\n #private;\n _parse(input: ParseInput): ParseReturnType<T[keyof T]>;\n get enum(): T;\n static create: <T_1 extends EnumLike>(values: T_1, params?: RawCreateParams) => ZodNativeEnum<T_1>;\n}\ninterface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n type: T;\n typeName: ZodFirstPartyTypeKind.ZodPromise;\n}\ndeclare class ZodPromise<T extends ZodTypeAny> extends ZodType<\n Promise<T['_output']>,\n ZodPromiseDef<T>,\n Promise<T['_input']>\n> {\n unwrap(): T;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;\n}\ndeclare type Refinement<T> = (arg: T, ctx: RefinementCtx) => any;\ndeclare type SuperRefinement<T> = (arg: T, ctx: RefinementCtx) => void | Promise<void>;\ndeclare type RefinementEffect<T> = {\n type: 'refinement';\n refinement: (arg: T, ctx: RefinementCtx) => any;\n};\ndeclare type TransformEffect<T> = {\n type: 'transform';\n transform: (arg: T, ctx: RefinementCtx) => any;\n};\ndeclare type PreprocessEffect<T> = {\n type: 'preprocess';\n transform: (arg: T, ctx: RefinementCtx) => any;\n};\ndeclare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;\ninterface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n schema: T;\n typeName: ZodFirstPartyTypeKind.ZodEffects;\n effect: Effect<any>;\n}\ndeclare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<\n Output,\n ZodEffectsDef<T>,\n Input\n> {\n innerType(): T;\n sourceType(): T;\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: <I extends ZodTypeAny>(\n schema: I,\n effect: Effect<I['_output']>,\n params?: RawCreateParams,\n ) => ZodEffects<I, I['_output'], input<I>>;\n static createWithPreprocess: <I extends ZodTypeAny>(\n preprocess: (arg: unknown, ctx: RefinementCtx) => unknown,\n schema: I,\n params?: RawCreateParams,\n ) => ZodEffects<I, I['_output'], unknown>;\n}\n\ninterface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n innerType: T;\n typeName: ZodFirstPartyTypeKind.ZodOptional;\n}\ndeclare type ZodOptionalType<T extends ZodTypeAny> = ZodOptional<T>;\ndeclare class ZodOptional<T extends ZodTypeAny> extends ZodType<\n T['_output'] | undefined,\n ZodOptionalDef<T>,\n T['_input'] | undefined\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n unwrap(): T;\n static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;\n}\ninterface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n innerType: T;\n typeName: ZodFirstPartyTypeKind.ZodNullable;\n}\ndeclare type ZodNullableType<T extends ZodTypeAny> = ZodNullable<T>;\ndeclare class ZodNullable<T extends ZodTypeAny> extends ZodType<\n T['_output'] | null,\n ZodNullableDef<T>,\n T['_input'] | null\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n unwrap(): T;\n static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;\n}\ninterface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n innerType: T;\n defaultValue: () => util.noUndefined<T['_input']>;\n typeName: ZodFirstPartyTypeKind.ZodDefault;\n}\ndeclare class ZodDefault<T extends ZodTypeAny> extends ZodType<\n util.noUndefined<T['_output']>,\n ZodDefaultDef<T>,\n T['_input'] | undefined\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n removeDefault(): T;\n static create: <T_1 extends ZodTypeAny>(\n type: T_1,\n params: {\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n default: T_1['_input'] | (() => util.noUndefined<T_1['_input']>);\n },\n ) => ZodDefault<T_1>;\n}\ninterface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n innerType: T;\n catchValue: (ctx: { error: ZodError; input: unknown }) => T['_input'];\n typeName: ZodFirstPartyTypeKind.ZodCatch;\n}\ndeclare class ZodCatch<T extends ZodTypeAny> extends ZodType<T['_output'], ZodCatchDef<T>, unknown> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n removeCatch(): T;\n static create: <T_1 extends ZodTypeAny>(\n type: T_1,\n params: {\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n catch: T_1['_output'] | (() => T_1['_output']);\n },\n ) => ZodCatch<T_1>;\n}\ninterface ZodNaNDef extends ZodTypeDef {\n typeName: ZodFirstPartyTypeKind.ZodNaN;\n}\ndeclare class ZodNaN extends ZodType<number, ZodNaNDef, number> {\n _parse(input: ParseInput): ParseReturnType<any>;\n static create: (params?: RawCreateParams) => ZodNaN;\n}\ninterface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {\n type: T;\n typeName: ZodFirstPartyTypeKind.ZodBranded;\n}\ndeclare const BRAND: unique symbol;\ndeclare type BRAND<T extends string | number | symbol> = {\n [BRAND]: {\n [k in T]: true;\n };\n};\ndeclare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<\n T['_output'] & BRAND<B>,\n ZodBrandedDef<T>,\n T['_input']\n> {\n _parse(input: ParseInput): ParseReturnType<any>;\n unwrap(): T;\n}\ninterface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {\n in: A;\n out: B;\n typeName: ZodFirstPartyTypeKind.ZodPipeline;\n}\ndeclare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<\n B['_output'],\n ZodPipelineDef<A, B>,\n A['_input']\n> {\n _parse(input: ParseInput): ParseReturnType<any>;\n static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;\n}\ndeclare type BuiltIn =\n | (((...args: any[]) => any) | (new (...args: any[]) => any))\n | {\n readonly [Symbol.toStringTag]: string;\n }\n | Date\n | Error\n | Generator\n | Promise<unknown>\n | RegExp;\ndeclare type MakeReadonly<T> =\n T extends Map<infer K, infer V>\n ? ReadonlyMap<K, V>\n : T extends Set<infer V>\n ? ReadonlySet<V>\n : T extends [infer Head, ...infer Tail]\n ? readonly [Head, ...Tail]\n : T extends Array<infer V>\n ? ReadonlyArray<V>\n : T extends BuiltIn\n ? T\n : Readonly<T>;\ninterface ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {\n innerType: T;\n typeName: ZodFirstPartyTypeKind.ZodReadonly;\n}\ndeclare class ZodReadonly<T extends ZodTypeAny> extends ZodType<\n MakeReadonly<T['_output']>,\n ZodReadonlyDef<T>,\n MakeReadonly<T['_input']>\n> {\n _parse(input: ParseInput): ParseReturnType<this['_output']>;\n static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodReadonly<T_1>;\n unwrap(): T;\n}\ndeclare type CustomParams = CustomErrorParams & {\n fatal?: boolean;\n};\ndeclare function custom<T>(\n check?: (data: any) => any,\n params?: string | CustomParams | ((input: any) => CustomParams),\n /**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\n fatal?: boolean,\n): ZodType<T, ZodTypeDef, T>;\n\ndeclare const late: {\n object: <T extends ZodRawShape>(\n shape: () => T,\n params?: RawCreateParams,\n ) => ZodObject<\n T,\n 'strip',\n ZodTypeAny,\n {\n [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T>, any>]: objectUtil.addQuestionMarks<\n baseObjectOutputType<T>,\n any\n >[k];\n },\n { [k_1 in keyof baseObjectInputType<T>]: baseObjectInputType<T>[k_1] }\n >;\n};\ndeclare enum ZodFirstPartyTypeKind {\n ZodString = 'ZodString',\n ZodNumber = 'ZodNumber',\n ZodNaN = 'ZodNaN',\n ZodBigInt = 'ZodBigInt',\n ZodBoolean = 'ZodBoolean',\n ZodDate = 'ZodDate',\n ZodSymbol = 'ZodSymbol',\n ZodUndefined = 'ZodUndefined',\n ZodNull = 'ZodNull',\n ZodAny = 'ZodAny',\n ZodUnknown = 'ZodUnknown',\n ZodNever = 'ZodNever',\n ZodVoid = 'ZodVoid',\n ZodArray = 'ZodArray',\n ZodObject = 'ZodObject',\n ZodUnion = 'ZodUnion',\n ZodDiscriminatedUnion = 'ZodDiscriminatedUnion',\n ZodIntersection = 'ZodIntersection',\n ZodTuple = 'ZodTuple',\n ZodRecord = 'ZodRecord',\n ZodMap = 'ZodMap',\n ZodSet = 'ZodSet',\n ZodFunction = 'ZodFunction',\n ZodLazy = 'ZodLazy',\n ZodLiteral = 'ZodLiteral',\n ZodEnum = 'ZodEnum',\n ZodEffects = 'ZodEffects',\n ZodNativeEnum = 'ZodNativeEnum',\n ZodOptional = 'ZodOptional',\n ZodNullable = 'ZodNullable',\n ZodDefault = 'ZodDefault',\n ZodCatch = 'ZodCatch',\n ZodPromise = 'ZodPromise',\n ZodBranded = 'ZodBranded',\n ZodPipeline = 'ZodPipeline',\n ZodReadonly = 'ZodReadonly',\n}\ndeclare type ZodFirstPartySchemaTypes =\n | ZodString\n | ZodNumber\n | ZodNaN\n | ZodBigInt\n | ZodBoolean\n | ZodDate\n | ZodUndefined\n | ZodNull\n | ZodAny\n | ZodUnknown\n | ZodNever\n | ZodVoid\n | ZodArray<any, any>\n | ZodObject<any, any, any>\n | ZodUnion<any>\n | ZodDiscriminatedUnion<any, any>\n | ZodIntersection<any, any>\n | ZodTuple<any, any>\n | ZodRecord<any, any>\n | ZodMap<any>\n | ZodSet<any>\n | ZodFunction<any, any>\n | ZodLazy<any>\n | ZodLiteral<any>\n | ZodEnum<any>\n | ZodEffects<any, any, any>\n | ZodNativeEnum<any>\n | ZodOptional<any>\n | ZodNullable<any>\n | ZodDefault<any>\n | ZodCatch<any>\n | ZodPromise<any>\n | ZodBranded<any, any>\n | ZodPipeline<any, any>\n | ZodReadonly<any>\n | ZodSymbol;\ndeclare abstract class Class {\n constructor(..._: any[]);\n}\ndeclare const instanceOfType: <T extends typeof Class>(\n cls: T,\n params?: CustomParams,\n) => ZodType<InstanceType<T>, ZodTypeDef, InstanceType<T>>;\ndeclare const stringType: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: true | undefined;\n })\n | undefined,\n) => ZodString;\ndeclare const numberType: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n) => ZodNumber;\ndeclare const nanType: (params?: RawCreateParams) => ZodNaN;\ndeclare const bigIntType: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n) => ZodBigInt;\ndeclare const booleanType: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n) => ZodBoolean;\ndeclare const dateType: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n) => ZodDate;\ndeclare const symbolType: (params?: RawCreateParams) => ZodSymbol;\ndeclare const undefinedType: (params?: RawCreateParams) => ZodUndefined;\ndeclare const nullType: (params?: RawCreateParams) => ZodNull;\ndeclare const anyType: (params?: RawCreateParams) => ZodAny;\ndeclare const unknownType: (params?: RawCreateParams) => ZodUnknown;\ndeclare const neverType: (params?: RawCreateParams) => ZodNever;\ndeclare const voidType: (params?: RawCreateParams) => ZodVoid;\ndeclare const arrayType: <T extends ZodTypeAny>(schema: T, params?: RawCreateParams) => ZodArray<T, 'many'>;\ndeclare const objectType: <T extends ZodRawShape>(\n shape: T,\n params?: RawCreateParams,\n) => ZodObject<\n T,\n 'strip',\n ZodTypeAny,\n {\n [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T>, any>]: objectUtil.addQuestionMarks<\n baseObjectOutputType<T>,\n any\n >[k];\n },\n { [k_1 in keyof baseObjectInputType<T>]: baseObjectInputType<T>[k_1] }\n>;\ndeclare const strictObjectType: <T extends ZodRawShape>(\n shape: T,\n params?: RawCreateParams,\n) => ZodObject<\n T,\n 'strict',\n ZodTypeAny,\n {\n [k in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T>, any>]: objectUtil.addQuestionMarks<\n baseObjectOutputType<T>,\n any\n >[k];\n },\n { [k_1 in keyof baseObjectInputType<T>]: baseObjectInputType<T>[k_1] }\n>;\ndeclare const unionType: <T extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(\n types: T,\n params?: RawCreateParams,\n) => ZodUnion<T>;\ndeclare const discriminatedUnionType: typeof ZodDiscriminatedUnion.create;\ndeclare const intersectionType: <T extends ZodTypeAny, U extends ZodTypeAny>(\n left: T,\n right: U,\n params?: RawCreateParams,\n) => ZodIntersection<T, U>;\ndeclare const tupleType: <T extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(\n schemas: T,\n params?: RawCreateParams,\n) => ZodTuple<T, null>;\ndeclare const recordType: typeof ZodRecord.create;\ndeclare const mapType: <Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny>(\n keyType: Key,\n valueType: Value,\n params?: RawCreateParams,\n) => ZodMap<Key, Value>;\ndeclare const setType: <Value extends ZodTypeAny = ZodTypeAny>(\n valueType: Value,\n params?: RawCreateParams,\n) => ZodSet<Value>;\ndeclare const functionType: typeof ZodFunction.create;\ndeclare const lazyType: <T extends ZodTypeAny>(getter: () => T, params?: RawCreateParams) => ZodLazy<T>;\ndeclare const literalType: <T extends Primitive>(value: T, params?: RawCreateParams) => ZodLiteral<T>;\ndeclare const enumType: typeof createZodEnum;\ndeclare const nativeEnumType: <T extends EnumLike>(values: T, params?: RawCreateParams) => ZodNativeEnum<T>;\ndeclare const promiseType: <T extends ZodTypeAny>(schema: T, params?: RawCreateParams) => ZodPromise<T>;\ndeclare const effectsType: <I extends ZodTypeAny>(\n schema: I,\n effect: Effect<I['_output']>,\n params?: RawCreateParams,\n) => ZodEffects<I, I['_output'], input<I>>;\ndeclare const optionalType: <T extends ZodTypeAny>(type: T, params?: RawCreateParams) => ZodOptional<T>;\ndeclare const nullableType: <T extends ZodTypeAny>(type: T, params?: RawCreateParams) => ZodNullable<T>;\ndeclare const preprocessType: <I extends ZodTypeAny>(\n preprocess: (arg: unknown, ctx: RefinementCtx) => unknown,\n schema: I,\n params?: RawCreateParams,\n) => ZodEffects<I, I['_output'], unknown>;\ndeclare const pipelineType: typeof ZodPipeline.create;\ndeclare const ostring: () => ZodOptional<ZodString>;\ndeclare const onumber: () => ZodOptional<ZodNumber>;\ndeclare const oboolean: () => ZodOptional<ZodBoolean>;\ndeclare const coerce: {\n string: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: true | undefined;\n })\n | undefined,\n ) => ZodString;\n number: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodNumber;\n boolean: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodBoolean;\n bigint: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodBigInt;\n date: (\n params?:\n | ({\n errorMap?: ZodErrorMap | undefined;\n invalid_type_error?: string | undefined;\n required_error?: string | undefined;\n message?: string | undefined;\n description?: string | undefined;\n } & {\n coerce?: boolean | undefined;\n })\n | undefined,\n ) => ZodDate;\n};\n\ndeclare const NEVER: never;\n\n//# sourceMappingURL=external.d.ts.map\n\ndeclare const z_setErrorMap: typeof setErrorMap;\ndeclare const z_getErrorMap: typeof getErrorMap;\ndeclare const z_makeIssue: typeof makeIssue;\ntype z_ParseParams = ParseParams;\ntype z_ParsePathComponent = ParsePathComponent;\ntype z_ParsePath = ParsePath;\ndeclare const z_EMPTY_PATH: typeof EMPTY_PATH;\ntype z_ParseContext = ParseContext;\ntype z_ParseInput = ParseInput;\ndeclare const z_addIssueToContext: typeof addIssueToContext;\ntype z_ObjectPair = ObjectPair;\ntype z_ParseStatus = ParseStatus;\ndeclare const z_ParseStatus: typeof ParseStatus;\ntype z_ParseResult = ParseResult;\ndeclare const z_INVALID: typeof INVALID;\ndeclare const z_DIRTY: typeof DIRTY;\ndeclare const z_OK: typeof OK;\ntype z_SyncParseReturnType<T = any> = SyncParseReturnType<T>;\ntype z_AsyncParseReturnType<T> = AsyncParseReturnType<T>;\ntype z_ParseReturnType<T> = ParseReturnType<T>;\ndeclare const z_isAborted: typeof isAborted;\ndeclare const z_isDirty: typeof isDirty;\ndeclare const z_isValid: typeof isValid;\ndeclare const z_isAsync: typeof isAsync;\ntype z_Primitive = Primitive;\ntype z_Scalars = Scalars;\ndeclare const z_util: typeof util;\ndeclare const z_objectUtil: typeof objectUtil;\ntype z_ZodParsedType = ZodParsedType;\ndeclare const z_getParsedType: typeof getParsedType;\ndeclare const z_oboolean: typeof oboolean;\ndeclare const z_onumber: typeof onumber;\ndeclare const z_ostring: typeof ostring;\ntype z_RefinementCtx = RefinementCtx;\ntype z_ZodRawShape = ZodRawShape;\ntype z_ZodTypeAny = ZodTypeAny;\ntype z_TypeOf<T extends ZodType<any, any, any>> = TypeOf<T>;\ntype z_input<T extends ZodType<any, any, any>> = input<T>;\ntype z_output<T extends ZodType<any, any, any>> = output<T>;\ntype z_CustomErrorParams = CustomErrorParams;\ntype z_ZodTypeDef = ZodTypeDef;\ntype z_RawCreateParams = RawCreateParams;\ntype z_ProcessedCreateParams = ProcessedCreateParams;\ntype z_SafeParseSuccess<Output> = SafeParseSuccess<Output>;\ntype z_SafeParseError<Input> = SafeParseError<Input>;\ntype z_SafeParseReturnType<Input, Output> = SafeParseReturnType<Input, Output>;\ntype z_ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> = ZodType<Output, Def, Input>;\ndeclare const z_ZodType: typeof ZodType;\ntype z_IpVersion = IpVersion;\ntype z_ZodStringCheck = ZodStringCheck;\ntype z_ZodStringDef = ZodStringDef;\ndeclare const z_datetimeRegex: typeof datetimeRegex;\ntype z_ZodString = ZodString;\ndeclare const z_ZodString: typeof ZodString;\ntype z_ZodNumberCheck = ZodNumberCheck;\ntype z_ZodNumberDef = ZodNumberDef;\ntype z_ZodNumber = ZodNumber;\ndeclare const z_ZodNumber: typeof ZodNumber;\ntype z_ZodBigIntCheck = ZodBigIntCheck;\ntype z_ZodBigIntDef = ZodBigIntDef;\ntype z_ZodBigInt = ZodBigInt;\ndeclare const z_ZodBigInt: typeof ZodBigInt;\ntype z_ZodBooleanDef = ZodBooleanDef;\ntype z_ZodBoolean = ZodBoolean;\ndeclare const z_ZodBoolean: typeof ZodBoolean;\ntype z_ZodDateCheck = ZodDateCheck;\ntype z_ZodDateDef = ZodDateDef;\ntype z_ZodDate = ZodDate;\ndeclare const z_ZodDate: typeof ZodDate;\ntype z_ZodSymbolDef = ZodSymbolDef;\ntype z_ZodSymbol = ZodSymbol;\ndeclare const z_ZodSymbol: typeof ZodSymbol;\ntype z_ZodUndefinedDef = ZodUndefinedDef;\ntype z_ZodUndefined = ZodUndefined;\ndeclare const z_ZodUndefined: typeof ZodUndefined;\ntype z_ZodNullDef = ZodNullDef;\ntype z_ZodNull = ZodNull;\ndeclare const z_ZodNull: typeof ZodNull;\ntype z_ZodAnyDef = ZodAnyDef;\ntype z_ZodAny = ZodAny;\ndeclare const z_ZodAny: typeof ZodAny;\ntype z_ZodUnknownDef = ZodUnknownDef;\ntype z_ZodUnknown = ZodUnknown;\ndeclare const z_ZodUnknown: typeof ZodUnknown;\ntype z_ZodNeverDef = ZodNeverDef;\ntype z_ZodNever = ZodNever;\ndeclare const z_ZodNever: typeof ZodNever;\ntype z_ZodVoidDef = ZodVoidDef;\ntype z_ZodVoid = ZodVoid;\ndeclare const z_ZodVoid: typeof ZodVoid;\ntype z_ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> = ZodArrayDef<T>;\ntype z_ArrayCardinality = ArrayCardinality;\ntype z_arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = 'many'> = arrayOutputType<\n T,\n Cardinality\n>;\ntype z_ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinality = 'many'> = ZodArray<T, Cardinality>;\ndeclare const z_ZodArray: typeof ZodArray;\ntype z_ZodNonEmptyArray<T extends ZodTypeAny> = ZodNonEmptyArray<T>;\ntype z_UnknownKeysParam = UnknownKeysParam;\ntype z_ZodObjectDef<\n T extends ZodRawShape = ZodRawShape,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n Catchall extends ZodTypeAny = ZodTypeAny,\n> = ZodObjectDef<T, UnknownKeys, Catchall>;\ntype z_mergeTypes<A, B> = mergeTypes<A, B>;\ntype z_objectOutputType<\n Shape extends ZodRawShape,\n Catchall extends ZodTypeAny,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n> = objectOutputType<Shape, Catchall, UnknownKeys>;\ntype z_baseObjectOutputType<Shape extends ZodRawShape> = baseObjectOutputType<Shape>;\ntype z_objectInputType<\n Shape extends ZodRawShape,\n Catchall extends ZodTypeAny,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n> = objectInputType<Shape, Catchall, UnknownKeys>;\ntype z_baseObjectInputType<Shape extends ZodRawShape> = baseObjectInputType<Shape>;\ntype z_CatchallOutput<T extends ZodType> = CatchallOutput<T>;\ntype z_CatchallInput<T extends ZodType> = CatchallInput<T>;\ntype z_PassthroughType<T extends UnknownKeysParam> = PassthroughType<T>;\ntype z_deoptional<T extends ZodTypeAny> = deoptional<T>;\ntype z_SomeZodObject = SomeZodObject;\ntype z_noUnrecognized<Obj extends object, Shape extends object> = noUnrecognized<Obj, Shape>;\ntype z_ZodObject<\n T extends ZodRawShape,\n UnknownKeys extends UnknownKeysParam = UnknownKeysParam,\n Catchall extends ZodTypeAny = ZodTypeAny,\n Output = objectOutputType<T, Catchall, UnknownKeys>,\n Input = objectInputType<T, Catchall, UnknownKeys>,\n> = ZodObject<T, UnknownKeys, Catchall, Output, Input>;\ndeclare const z_ZodObject: typeof ZodObject;\ntype z_AnyZodObject = AnyZodObject;\ntype z_ZodUnionOptions = ZodUnionOptions;\ntype z_ZodUnionDef<T extends ZodUnionOptions = Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>> = ZodUnionDef<T>;\ntype z_ZodUnion<T extends ZodUnionOptions> = ZodUnion<T>;\ndeclare const z_ZodUnion: typeof ZodUnion;\ntype z_ZodDiscriminatedUnionOption<Discriminator extends string> = ZodDiscriminatedUnionOption<Discriminator>;\ntype z_ZodDiscriminatedUnionDef<\n Discriminator extends string,\n Options extends ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[],\n> = ZodDiscriminatedUnionDef<Discriminator, Options>;\ntype z_ZodDiscriminatedUnion<\n Discriminator extends string,\n Options extends ZodDiscriminatedUnionOption<Discriminator>[],\n> = ZodDiscriminatedUnion<Discriminator, Options>;\ndeclare const z_ZodDiscriminatedUnion: typeof ZodDiscriminatedUnion;\ntype z_ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> = ZodIntersectionDef<\n T,\n U\n>;\ntype z_ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> = ZodIntersection<T, U>;\ndeclare const z_ZodIntersection: typeof ZodIntersection;\ntype z_ZodTupleItems = ZodTupleItems;\ntype z_AssertArray<T> = AssertArray<T>;\ntype z_OutputTypeOfTuple<T extends ZodTupleItems | []> = OutputTypeOfTuple<T>;\ntype z_OutputTypeOfTupleWithRest<\n T extends ZodTupleItems | [],\n Rest extends ZodTypeAny | null = null,\n> = OutputTypeOfTupleWithRest<T, Rest>;\ntype z_InputTypeOfTuple<T extends ZodTupleItems | []> = InputTypeOfTuple<T>;\ntype z_InputTypeOfTupleWithRest<\n T extends ZodTupleItems | [],\n Rest extends ZodTypeAny | null = null,\n> = InputTypeOfTupleWithRest<T, Rest>;\ntype z_ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> = ZodTupleDef<\n T,\n Rest\n>;\ntype z_AnyZodTuple = AnyZodTuple;\ntype z_ZodTuple<\n T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]],\n Rest extends ZodTypeAny | null = null,\n> = ZodTuple<T, Rest>;\ndeclare const z_ZodTuple: typeof ZodTuple;\ntype z_ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> = ZodRecordDef<\n Key,\n Value\n>;\ntype z_KeySchema = KeySchema;\ntype z_RecordType<K extends string | number | symbol, V> = RecordType<K, V>;\ntype z_ZodRecord<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> = ZodRecord<Key, Value>;\ndeclare const z_ZodRecord: typeof ZodRecord;\ntype z_ZodMapDef<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> = ZodMapDef<Key, Value>;\ntype z_ZodMap<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> = ZodMap<Key, Value>;\ndeclare const z_ZodMap: typeof ZodMap;\ntype z_ZodSetDef<Value extends ZodTypeAny = ZodTypeAny> = ZodSetDef<Value>;\ntype z_ZodSet<Value extends ZodTypeAny = ZodTypeAny> = ZodSet<Value>;\ndeclare const z_ZodSet: typeof ZodSet;\ntype z_ZodFunctionDef<\n Args extends ZodTuple<any, any> = ZodTuple<any, any>,\n Returns extends ZodTypeAny = ZodTypeAny,\n> = ZodFunctionDef<Args, Returns>;\ntype z_OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = OuterTypeOfFunction<\n Args,\n Returns\n>;\ntype z_InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = InnerTypeOfFunction<\n Args,\n Returns\n>;\ntype z_ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = ZodFunction<Args, Returns>;\ndeclare const z_ZodFunction: typeof ZodFunction;\ntype z_ZodLazyDef<T extends ZodTypeAny = ZodTypeAny> = ZodLazyDef<T>;\ntype z_ZodLazy<T extends ZodTypeAny> = ZodLazy<T>;\ndeclare const z_ZodLazy: typeof ZodLazy;\ntype z_ZodLiteralDef<T = any> = ZodLiteralDef<T>;\ntype z_ZodLiteral<T> = ZodLiteral<T>;\ndeclare const z_ZodLiteral: typeof ZodLiteral;\ntype z_ArrayKeys = ArrayKeys;\ntype z_Indices<T> = Indices<T>;\ntype z_EnumValues<T extends string = string> = EnumValues<T>;\ntype z_Values<T extends EnumValues> = Values<T>;\ntype z_ZodEnumDef<T extends EnumValues = EnumValues> = ZodEnumDef<T>;\ntype z_Writeable<T> = Writeable<T>;\ntype z_FilterEnum<Values, ToExclude> = FilterEnum<Values, ToExclude>;\ntype z_typecast<A, T> = typecast<A, T>;\ntype z_ZodEnum<T extends [string, ...string[]]> = ZodEnum<T>;\ndeclare const z_ZodEnum: typeof ZodEnum;\ntype z_ZodNativeEnumDef<T extends EnumLike = EnumLike> = ZodNativeEnumDef<T>;\ntype z_EnumLike = EnumLike;\ntype z_ZodNativeEnum<T extends EnumLike> = ZodNativeEnum<T>;\ndeclare const z_ZodNativeEnum: typeof ZodNativeEnum;\ntype z_ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> = ZodPromiseDef<T>;\ntype z_ZodPromise<T extends ZodTypeAny> = ZodPromise<T>;\ndeclare const z_ZodPromise: typeof ZodPromise;\ntype z_Refinement<T> = Refinement<T>;\ntype z_SuperRefinement<T> = SuperRefinement<T>;\ntype z_RefinementEffect<T> = RefinementEffect<T>;\ntype z_TransformEffect<T> = TransformEffect<T>;\ntype z_PreprocessEffect<T> = PreprocessEffect<T>;\ntype z_Effect<T> = Effect<T>;\ntype z_ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> = ZodEffectsDef<T>;\ntype z_ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> = ZodEffects<T, Output, Input>;\ndeclare const z_ZodEffects: typeof ZodEffects;\ntype z_ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> = ZodOptionalDef<T>;\ntype z_ZodOptionalType<T extends ZodTypeAny> = ZodOptionalType<T>;\ntype z_ZodOptional<T extends ZodTypeAny> = ZodOptional<T>;\ndeclare const z_ZodOptional: typeof ZodOptional;\ntype z_ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> = ZodNullableDef<T>;\ntype z_ZodNullableType<T extends ZodTypeAny> = ZodNullableType<T>;\ntype z_ZodNullable<T extends ZodTypeAny> = ZodNullable<T>;\ndeclare const z_ZodNullable: typeof ZodNullable;\ntype z_ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> = ZodDefaultDef<T>;\ntype z_ZodDefault<T extends ZodTypeAny> = ZodDefault<T>;\ndeclare const z_ZodDefault: typeof ZodDefault;\ntype z_ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> = ZodCatchDef<T>;\ntype z_ZodCatch<T extends ZodTypeAny> = ZodCatch<T>;\ndeclare const z_ZodCatch: typeof ZodCatch;\ntype z_ZodNaNDef = ZodNaNDef;\ntype z_ZodNaN = ZodNaN;\ndeclare const z_ZodNaN: typeof ZodNaN;\ntype z_ZodBrandedDef<T extends ZodTypeAny> = ZodBrandedDef<T>;\ntype z_BRAND<T extends string | number | symbol> = BRAND<T>;\ntype z_ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> = ZodBranded<T, B>;\ndeclare const z_ZodBranded: typeof ZodBranded;\ntype z_ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> = ZodPipelineDef<A, B>;\ntype z_ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> = ZodPipeline<A, B>;\ndeclare const z_ZodPipeline: typeof ZodPipeline;\ntype z_ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> = ZodReadonlyDef<T>;\ntype z_ZodReadonly<T extends ZodTypeAny> = ZodReadonly<T>;\ndeclare const z_ZodReadonly: typeof ZodReadonly;\ndeclare const z_custom: typeof custom;\ndeclare const z_late: typeof late;\ntype z_ZodFirstPartyTypeKind = ZodFirstPartyTypeKind;\ndeclare const z_ZodFirstPartyTypeKind: typeof ZodFirstPartyTypeKind;\ntype z_ZodFirstPartySchemaTypes = ZodFirstPartySchemaTypes;\ndeclare const z_coerce: typeof coerce;\ndeclare const z_NEVER: typeof NEVER;\ntype z_inferFlattenedErrors<T extends ZodType<any, any, any>, U = string> = inferFlattenedErrors<T, U>;\ntype z_typeToFlattenedError<T, U = string> = typeToFlattenedError<T, U>;\ntype z_ZodIssueCode = ZodIssueCode;\ntype z_ZodIssueBase = ZodIssueBase;\ntype z_ZodInvalidTypeIssue = ZodInvalidTypeIssue;\ntype z_ZodInvalidLiteralIssue = ZodInvalidLiteralIssue;\ntype z_ZodUnrecognizedKeysIssue = ZodUnrecognizedKeysIssue;\ntype z_ZodInvalidUnionIssue = ZodInvalidUnionIssue;\ntype z_ZodInvalidUnionDiscriminatorIssue = ZodInvalidUnionDiscriminatorIssue;\ntype z_ZodInvalidEnumValueIssue = ZodInvalidEnumValueIssue;\ntype z_ZodInvalidArgumentsIssue = ZodInvalidArgumentsIssue;\ntype z_ZodInvalidReturnTypeIssue = ZodInvalidReturnTypeIssue;\ntype z_ZodInvalidDateIssue = ZodInvalidDateIssue;\ntype z_StringValidation = StringValidation;\ntype z_ZodInvalidStringIssue = ZodInvalidStringIssue;\ntype z_ZodTooSmallIssue = ZodTooSmallIssue;\ntype z_ZodTooBigIssue = ZodTooBigIssue;\ntype z_ZodInvalidIntersectionTypesIssue = ZodInvalidIntersectionTypesIssue;\ntype z_ZodNotMultipleOfIssue = ZodNotMultipleOfIssue;\ntype z_ZodNotFiniteIssue = ZodNotFiniteIssue;\ntype z_ZodCustomIssue = ZodCustomIssue;\ntype z_DenormalizedError = DenormalizedError;\ntype z_ZodIssueOptionalMessage = ZodIssueOptionalMessage;\ntype z_ZodIssue = ZodIssue;\ndeclare const z_quotelessJson: typeof quotelessJson;\ntype z_ZodFormattedError<T, U = string> = ZodFormattedError<T, U>;\ntype z_inferFormattedError<T extends ZodType<any, any, any>, U = string> = inferFormattedError<T, U>;\ntype z_ZodError<T = any> = ZodError<T>;\ndeclare const z_ZodError: typeof ZodError;\ntype z_IssueData = IssueData;\ntype z_ErrorMapCtx = ErrorMapCtx;\ntype z_ZodErrorMap = ZodErrorMap;\ndeclare namespace z {\n export {\n errorMap as defaultErrorMap,\n z_setErrorMap as setErrorMap,\n z_getErrorMap as getErrorMap,\n z_makeIssue as makeIssue,\n type z_ParseParams as ParseParams,\n type z_ParsePathComponent as ParsePathComponent,\n type z_ParsePath as ParsePath,\n z_EMPTY_PATH as EMPTY_PATH,\n type z_ParseContext as ParseContext,\n type z_ParseInput as ParseInput,\n z_addIssueToContext as addIssueToContext,\n type z_ObjectPair as ObjectPair,\n z_ParseStatus as ParseStatus,\n type z_ParseResult as ParseResult,\n z_INVALID as INVALID,\n z_DIRTY as DIRTY,\n z_OK as OK,\n type z_SyncParseReturnType as SyncParseReturnType,\n type z_AsyncParseReturnType as AsyncParseReturnType,\n type z_ParseReturnType as ParseReturnType,\n z_isAborted as isAborted,\n z_isDirty as isDirty,\n z_isValid as isValid,\n z_isAsync as isAsync,\n type z_Primitive as Primitive,\n type z_Scalars as Scalars,\n z_util as util,\n z_objectUtil as objectUtil,\n type z_ZodParsedType as ZodParsedType,\n z_getParsedType as getParsedType,\n type TypeOf as infer,\n ZodEffects as ZodTransformer,\n ZodType as Schema,\n ZodType as ZodSchema,\n anyType as any,\n arrayType as array,\n bigIntType as bigint,\n booleanType as boolean,\n dateType as date,\n discriminatedUnionType as discriminatedUnion,\n effectsType as effect,\n enumType as enum,\n functionType as function,\n instanceOfType as instanceof,\n intersectionType as intersection,\n lazyType as lazy,\n literalType as literal,\n mapType as map,\n nanType as nan,\n nativeEnumType as nativeEnum,\n neverType as never,\n nullType as null,\n nullableType as nullable,\n numberType as number,\n objectType as object,\n z_oboolean as oboolean,\n z_onumber as onumber,\n optionalType as optional,\n z_ostring as ostring,\n pipelineType as pipeline,\n preprocessType as preprocess,\n promiseType as promise,\n recordType as record,\n setType as set,\n strictObjectType as strictObject,\n stringType as string,\n symbolType as symbol,\n effectsType as transformer,\n tupleType as tuple,\n undefinedType as undefined,\n unionType as union,\n unknownType as unknown,\n voidType as void,\n type z_RefinementCtx as RefinementCtx,\n type z_ZodRawShape as ZodRawShape,\n type z_ZodTypeAny as ZodTypeAny,\n type z_TypeOf as TypeOf,\n type z_input as input,\n type z_output as output,\n type z_CustomErrorParams as CustomErrorParams,\n type z_ZodTypeDef as ZodTypeDef,\n type z_RawCreateParams as RawCreateParams,\n type z_ProcessedCreateParams as ProcessedCreateParams,\n type z_SafeParseSuccess as SafeParseSuccess,\n type z_SafeParseError as SafeParseError,\n type z_SafeParseReturnType as SafeParseReturnType,\n z_ZodType as ZodType,\n type z_IpVersion as IpVersion,\n type z_ZodStringCheck as ZodStringCheck,\n type z_ZodStringDef as ZodStringDef,\n z_datetimeRegex as datetimeRegex,\n z_ZodString as ZodString,\n type z_ZodNumberCheck as ZodNumberCheck,\n type z_ZodNumberDef as ZodNumberDef,\n z_ZodNumber as ZodNumber,\n type z_ZodBigIntCheck as ZodBigIntCheck,\n type z_ZodBigIntDef as ZodBigIntDef,\n z_ZodBigInt as ZodBigInt,\n type z_ZodBooleanDef as ZodBooleanDef,\n z_ZodBoolean as ZodBoolean,\n type z_ZodDateCheck as ZodDateCheck,\n type z_ZodDateDef as ZodDateDef,\n z_ZodDate as ZodDate,\n type z_ZodSymbolDef as ZodSymbolDef,\n z_ZodSymbol as ZodSymbol,\n type z_ZodUndefinedDef as ZodUndefinedDef,\n z_ZodUndefined as ZodUndefined,\n type z_ZodNullDef as ZodNullDef,\n z_ZodNull as ZodNull,\n type z_ZodAnyDef as ZodAnyDef,\n z_ZodAny as ZodAny,\n type z_ZodUnknownDef as ZodUnknownDef,\n z_ZodUnknown as ZodUnknown,\n type z_ZodNeverDef as ZodNeverDef,\n z_ZodNever as ZodNever,\n type z_ZodVoidDef as ZodVoidDef,\n z_ZodVoid as ZodVoid,\n type z_ZodArrayDef as ZodArrayDef,\n type z_ArrayCardinality as ArrayCardinality,\n type z_arrayOutputType as arrayOutputType,\n z_ZodArray as ZodArray,\n type z_ZodNonEmptyArray as ZodNonEmptyArray,\n type z_UnknownKeysParam as UnknownKeysParam,\n type z_ZodObjectDef as ZodObjectDef,\n type z_mergeTypes as mergeTypes,\n type z_objectOutputType as objectOutputType,\n type z_baseObjectOutputType as baseObjectOutputType,\n type z_objectInputType as objectInputType,\n type z_baseObjectInputType as baseObjectInputType,\n type z_CatchallOutput as CatchallOutput,\n type z_CatchallInput as CatchallInput,\n type z_PassthroughType as PassthroughType,\n type z_deoptional as deoptional,\n type z_SomeZodObject as SomeZodObject,\n type z_noUnrecognized as noUnrecognized,\n z_ZodObject as ZodObject,\n type z_AnyZodObject as AnyZodObject,\n type z_ZodUnionOptions as ZodUnionOptions,\n type z_ZodUnionDef as ZodUnionDef,\n z_ZodUnion as ZodUnion,\n type z_ZodDiscriminatedUnionOption as ZodDiscriminatedUnionOption,\n type z_ZodDiscriminatedUnionDef as ZodDiscriminatedUnionDef,\n z_ZodDiscriminatedUnion as ZodDiscriminatedUnion,\n type z_ZodIntersectionDef as ZodIntersectionDef,\n z_ZodIntersection as ZodIntersection,\n type z_ZodTupleItems as ZodTupleItems,\n type z_AssertArray as AssertArray,\n type z_OutputTypeOfTuple as OutputTypeOfTuple,\n type z_OutputTypeOfTupleWithRest as OutputTypeOfTupleWithRest,\n type z_InputTypeOfTuple as InputTypeOfTuple,\n type z_InputTypeOfTupleWithRest as InputTypeOfTupleWithRest,\n type z_ZodTupleDef as ZodTupleDef,\n type z_AnyZodTuple as AnyZodTuple,\n z_ZodTuple as ZodTuple,\n type z_ZodRecordDef as ZodRecordDef,\n type z_KeySchema as KeySchema,\n type z_RecordType as RecordType,\n z_ZodRecord as ZodRecord,\n type z_ZodMapDef as ZodMapDef,\n z_ZodMap as ZodMap,\n type z_ZodSetDef as ZodSetDef,\n z_ZodSet as ZodSet,\n type z_ZodFunctionDef as ZodFunctionDef,\n type z_OuterTypeOfFunction as OuterTypeOfFunction,\n type z_InnerTypeOfFunction as InnerTypeOfFunction,\n z_ZodFunction as ZodFunction,\n type z_ZodLazyDef as ZodLazyDef,\n z_ZodLazy as ZodLazy,\n type z_ZodLiteralDef as ZodLiteralDef,\n z_ZodLiteral as ZodLiteral,\n type z_ArrayKeys as ArrayKeys,\n type z_Indices as Indices,\n type z_EnumValues as EnumValues,\n type z_Values as Values,\n type z_ZodEnumDef as ZodEnumDef,\n type z_Writeable as Writeable,\n type z_FilterEnum as FilterEnum,\n type z_typecast as typecast,\n z_ZodEnum as ZodEnum,\n type z_ZodNativeEnumDef as ZodNativeEnumDef,\n type z_EnumLike as EnumLike,\n z_ZodNativeEnum as ZodNativeEnum,\n type z_ZodPromiseDef as ZodPromiseDef,\n z_ZodPromise as ZodPromise,\n type z_Refinement as Refinement,\n type z_SuperRefinement as SuperRefinement,\n type z_RefinementEffect as RefinementEffect,\n type z_TransformEffect as TransformEffect,\n type z_PreprocessEffect as PreprocessEffect,\n type z_Effect as Effect,\n type z_ZodEffectsDef as ZodEffectsDef,\n z_ZodEffects as ZodEffects,\n type z_ZodOptionalDef as ZodOptionalDef,\n type z_ZodOptionalType as ZodOptionalType,\n z_ZodOptional as ZodOptional,\n type z_ZodNullableDef as ZodNullableDef,\n type z_ZodNullableType as ZodNullableType,\n z_ZodNullable as ZodNullable,\n type z_ZodDefaultDef as ZodDefaultDef,\n z_ZodDefault as ZodDefault,\n type z_ZodCatchDef as ZodCatchDef,\n z_ZodCatch as ZodCatch,\n type z_ZodNaNDef as ZodNaNDef,\n z_ZodNaN as ZodNaN,\n type z_ZodBrandedDef as ZodBrandedDef,\n type z_BRAND as BRAND,\n z_ZodBranded as ZodBranded,\n type z_ZodPipelineDef as ZodPipelineDef,\n z_ZodPipeline as ZodPipeline,\n type z_ZodReadonlyDef as ZodReadonlyDef,\n z_ZodReadonly as ZodReadonly,\n z_custom as custom,\n z_late as late,\n z_ZodFirstPartyTypeKind as ZodFirstPartyTypeKind,\n type z_ZodFirstPartySchemaTypes as ZodFirstPartySchemaTypes,\n z_coerce as coerce,\n z_NEVER as NEVER,\n type z_inferFlattenedErrors as inferFlattenedErrors,\n type z_typeToFlattenedError as typeToFlattenedError,\n type z_ZodIssueCode as ZodIssueCode,\n type z_ZodIssueBase as ZodIssueBase,\n type z_ZodInvalidTypeIssue as ZodInvalidTypeIssue,\n type z_ZodInvalidLiteralIssue as ZodInvalidLiteralIssue,\n type z_ZodUnrecognizedKeysIssue as ZodUnrecognizedKeysIssue,\n type z_ZodInvalidUnionIssue as ZodInvalidUnionIssue,\n type z_ZodInvalidUnionDiscriminatorIssue as ZodInvalidUnionDiscriminatorIssue,\n type z_ZodInvalidEnumValueIssue as ZodInvalidEnumValueIssue,\n type z_ZodInvalidArgumentsIssue as ZodInvalidArgumentsIssue,\n type z_ZodInvalidReturnTypeIssue as ZodInvalidReturnTypeIssue,\n type z_ZodInvalidDateIssue as ZodInvalidDateIssue,\n type z_StringValidation as StringValidation,\n type z_ZodInvalidStringIssue as ZodInvalidStringIssue,\n type z_ZodTooSmallIssue as ZodTooSmallIssue,\n type z_ZodTooBigIssue as ZodTooBigIssue,\n type z_ZodInvalidIntersectionTypesIssue as ZodInvalidIntersectionTypesIssue,\n type z_ZodNotMultipleOfIssue as ZodNotMultipleOfIssue,\n type z_ZodNotFiniteIssue as ZodNotFiniteIssue,\n type z_ZodCustomIssue as ZodCustomIssue,\n type z_DenormalizedError as DenormalizedError,\n type z_ZodIssueOptionalMessage as ZodIssueOptionalMessage,\n type z_ZodIssue as ZodIssue,\n z_quotelessJson as quotelessJson,\n type z_ZodFormattedError as ZodFormattedError,\n type z_inferFormattedError as inferFormattedError,\n z_ZodError as ZodError,\n type z_IssueData as IssueData,\n type z_ErrorMapCtx as ErrorMapCtx,\n type z_ZodErrorMap as ZodErrorMap,\n };\n}\n\n//# sourceMappingURL=index.d.ts.map\n\nexport {\n type AnyZodObject,\n type AnyZodTuple,\n type ArrayCardinality,\n type ArrayKeys,\n type AssertArray,\n type AsyncParseReturnType,\n BRAND,\n type CatchallInput,\n type CatchallOutput,\n type CustomErrorParams,\n DIRTY,\n type DenormalizedError,\n EMPTY_PATH,\n type Effect,\n type EnumLike,\n type EnumValues,\n type ErrorMapCtx,\n type FilterEnum,\n INVALID,\n type Indices,\n type InnerTypeOfFunction,\n type InputTypeOfTuple,\n type InputTypeOfTupleWithRest,\n type IpVersion,\n type IssueData,\n type KeySchema,\n NEVER,\n OK,\n type ObjectPair,\n type OuterTypeOfFunction,\n type OutputTypeOfTuple,\n type OutputTypeOfTupleWithRest,\n type ParseContext,\n type ParseInput,\n type ParseParams,\n type ParsePath,\n type ParsePathComponent,\n type ParseResult,\n type ParseReturnType,\n ParseStatus,\n type PassthroughType,\n type PreprocessEffect,\n type Primitive,\n type ProcessedCreateParams,\n type RawCreateParams,\n type RecordType,\n type Refinement,\n type RefinementCtx,\n type RefinementEffect,\n type SafeParseError,\n type SafeParseReturnType,\n type SafeParseSuccess,\n type Scalars,\n ZodType as Schema,\n type SomeZodObject,\n type StringValidation,\n type SuperRefinement,\n type SyncParseReturnType,\n type TransformEffect,\n type TypeOf,\n type UnknownKeysParam,\n type Values,\n type Writeable,\n ZodAny,\n type ZodAnyDef,\n ZodArray,\n type ZodArrayDef,\n ZodBigInt,\n type ZodBigIntCheck,\n type ZodBigIntDef,\n ZodBoolean,\n type ZodBooleanDef,\n ZodBranded,\n type ZodBrandedDef,\n ZodCatch,\n type ZodCatchDef,\n type ZodCustomIssue,\n ZodDate,\n type ZodDateCheck,\n type ZodDateDef,\n ZodDefault,\n type ZodDefaultDef,\n ZodDiscriminatedUnion,\n type ZodDiscriminatedUnionDef,\n type ZodDiscriminatedUnionOption,\n ZodEffects,\n type ZodEffectsDef,\n ZodEnum,\n type ZodEnumDef,\n ZodError,\n type ZodErrorMap,\n type ZodFirstPartySchemaTypes,\n ZodFirstPartyTypeKind,\n type ZodFormattedError,\n ZodFunction,\n type ZodFunctionDef,\n ZodIntersection,\n type ZodIntersectionDef,\n type ZodInvalidArgumentsIssue,\n type ZodInvalidDateIssue,\n type ZodInvalidEnumValueIssue,\n type ZodInvalidIntersectionTypesIssue,\n type ZodInvalidLiteralIssue,\n type ZodInvalidReturnTypeIssue,\n type ZodInvalidStringIssue,\n type ZodInvalidTypeIssue,\n type ZodInvalidUnionDiscriminatorIssue,\n type ZodInvalidUnionIssue,\n type ZodIssue,\n type ZodIssueBase,\n ZodIssueCode,\n type ZodIssueOptionalMessage,\n ZodLazy,\n type ZodLazyDef,\n ZodLiteral,\n type ZodLiteralDef,\n ZodMap,\n type ZodMapDef,\n ZodNaN,\n type ZodNaNDef,\n ZodNativeEnum,\n type ZodNativeEnumDef,\n ZodNever,\n type ZodNeverDef,\n type ZodNonEmptyArray,\n type ZodNotFiniteIssue,\n type ZodNotMultipleOfIssue,\n ZodNull,\n type ZodNullDef,\n ZodNullable,\n type ZodNullableDef,\n type ZodNullableType,\n ZodNumber,\n type ZodNumberCheck,\n type ZodNumberDef,\n ZodObject,\n type ZodObjectDef,\n ZodOptional,\n type ZodOptionalDef,\n type ZodOptionalType,\n ZodParsedType,\n ZodPipeline,\n type ZodPipelineDef,\n ZodPromise,\n type ZodPromiseDef,\n type ZodRawShape,\n ZodReadonly,\n type ZodReadonlyDef,\n ZodRecord,\n type ZodRecordDef,\n ZodType as ZodSchema,\n ZodSet,\n type ZodSetDef,\n ZodString,\n type ZodStringCheck,\n type ZodStringDef,\n ZodSymbol,\n type ZodSymbolDef,\n type ZodTooBigIssue,\n type ZodTooSmallIssue,\n ZodEffects as ZodTransformer,\n ZodTuple,\n type ZodTupleDef,\n type ZodTupleItems,\n ZodType,\n type ZodTypeAny,\n type ZodTypeDef,\n ZodUndefined,\n type ZodUndefinedDef,\n ZodUnion,\n type ZodUnionDef,\n type ZodUnionOptions,\n ZodUnknown,\n type ZodUnknownDef,\n type ZodUnrecognizedKeysIssue,\n ZodVoid,\n type ZodVoidDef,\n addIssueToContext,\n anyType as any,\n arrayType as array,\n type arrayOutputType,\n type baseObjectInputType,\n type baseObjectOutputType,\n bigIntType as bigint,\n booleanType as boolean,\n coerce,\n custom,\n dateType as date,\n datetimeRegex,\n z as default,\n errorMap as defaultErrorMap,\n type deoptional,\n discriminatedUnionType as discriminatedUnion,\n effectsType as effect,\n enumType as enum,\n functionType as function,\n getErrorMap,\n getParsedType,\n type TypeOf as infer,\n type inferFlattenedErrors,\n type inferFormattedError,\n type input,\n instanceOfType as instanceof,\n intersectionType as intersection,\n isAborted,\n isAsync,\n isDirty,\n isValid,\n late,\n lazyType as lazy,\n literalType as literal,\n makeIssue,\n mapType as map,\n type mergeTypes,\n nanType as nan,\n nativeEnumType as nativeEnum,\n neverType as never,\n type noUnrecognized,\n nullType as null,\n nullableType as nullable,\n numberType as number,\n objectType as object,\n type objectInputType,\n type objectOutputType,\n objectUtil,\n oboolean,\n onumber,\n optionalType as optional,\n ostring,\n type output,\n pipelineType as pipeline,\n preprocessType as preprocess,\n promiseType as promise,\n quotelessJson,\n recordType as record,\n setType as set,\n setErrorMap,\n strictObjectType as strictObject,\n stringType as string,\n symbolType as symbol,\n effectsType as transformer,\n tupleType as tuple,\n type typeToFlattenedError,\n type typecast,\n undefinedType as undefined,\n unionType as union,\n unknownType as unknown,\n util,\n voidType as void,\n z,\n};\n",
|
|
9690
9692
|
documentationUrl: "https://zod.dev/"
|
|
9691
9693
|
}
|
|
9692
|
-
], tf = { globals: { "global.d.ts": $d } }, nf = Qd, rf = N.lazy(async () => ({ default: (await Promise.resolve().then(() =>
|
|
9694
|
+
], tf = { globals: { "global.d.ts": $d } }, nf = Qd, rf = N.lazy(async () => ({ default: (await Promise.resolve().then(() => Ch)).Function })), af = ({ id: e }) => {
|
|
9693
9695
|
let t = cf(e), n = Zu(), r = Yu((e) => e.onFunctionReady), [i, a] = R(), o = L(null), s = L(null);
|
|
9694
9696
|
od(e, "monaco", {
|
|
9695
9697
|
serialize: () => o.current?.saveViewState() ?? s.current ?? null,
|
|
@@ -11604,52 +11606,66 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11604
11606
|
status: "modified",
|
|
11605
11607
|
fields: r
|
|
11606
11608
|
}), n;
|
|
11607
|
-
}), Gf = (e) => {
|
|
11609
|
+
}), Gf = (e, t, n, r) => e.map((e) => e.sourceId === t && e.sourceHandle === n ? {
|
|
11610
|
+
...e,
|
|
11611
|
+
name: r.trim() === "" ? void 0 : r
|
|
11612
|
+
} : e), Kf = (e) => {
|
|
11608
11613
|
let [t, n] = R(e);
|
|
11609
11614
|
return Ae(() => {
|
|
11610
11615
|
t !== e && n(e);
|
|
11611
11616
|
}, [e]), [t, n];
|
|
11612
|
-
},
|
|
11613
|
-
let
|
|
11614
|
-
|
|
11615
|
-
},
|
|
11617
|
+
}, qf = ({ id: e, value: t, name: n, diff: r, onChange: i, onNameChange: a, disabled: o, configurable: s = !0, onDelete: c, isActive: l, index: u = 0, isDefault: d = !1, onSetIsDefault: f, totalStatements: p, hitPolicy: m, variableType: h }) => {
|
|
11618
|
+
let g = Z(), [_, v] = Kf(t), [y, b] = Kf(n), x = (e) => {
|
|
11619
|
+
v(e), i?.(e);
|
|
11620
|
+
}, S = u === p - 1, C = d && m === "first" && S && u > 0 && (t || "")?.trim?.()?.length === 0;
|
|
11616
11621
|
return /* @__PURE__ */ B("div", {
|
|
11617
|
-
className: H(
|
|
11622
|
+
className: H(l && "bg-[var(--seal-color-success-bg)]", r?.status === "added" && "bg-[var(--seal-color-success-bg)]", r?.status === "modified" && "bg-[var(--seal-color-warning-bg)]", r?.status === "removed" && "bg-[var(--seal-color-error-bg)]"),
|
|
11618
11623
|
children: [/* @__PURE__ */ B("div", {
|
|
11619
11624
|
className: H("relative flex flex-row px-(--node-horizontal-padding) py-1"),
|
|
11620
11625
|
children: [
|
|
11621
|
-
(
|
|
11622
|
-
disabled:
|
|
11626
|
+
(u === 0 || m === "collect") && /* @__PURE__ */ z(J, {
|
|
11627
|
+
disabled: o,
|
|
11623
11628
|
className: H("text-xs font-medium"),
|
|
11624
11629
|
size: "small",
|
|
11625
11630
|
type: "text",
|
|
11626
11631
|
children: "If"
|
|
11627
11632
|
}),
|
|
11628
|
-
|
|
11629
|
-
className: H("text-xs font-medium",
|
|
11633
|
+
m !== "collect" && u > 0 && /* @__PURE__ */ z(J, {
|
|
11634
|
+
className: H("text-xs font-medium", C && "text-[var(--seal-color-text-disabled)]"),
|
|
11630
11635
|
size: "small",
|
|
11631
11636
|
type: "text",
|
|
11632
|
-
disabled:
|
|
11637
|
+
disabled: o,
|
|
11633
11638
|
onClick: () => {
|
|
11634
|
-
|
|
11639
|
+
S && m === "first" && f?.(!1);
|
|
11635
11640
|
},
|
|
11636
11641
|
children: "Else If"
|
|
11637
11642
|
}),
|
|
11638
|
-
|
|
11639
|
-
className: H("text-xs font-medium", !
|
|
11643
|
+
m !== "collect" && u > 0 && S && /* @__PURE__ */ z(J, {
|
|
11644
|
+
className: H("text-xs font-medium", !C && "text-[var(--seal-color-text-disabled)]"),
|
|
11640
11645
|
size: "small",
|
|
11641
11646
|
type: "text",
|
|
11642
|
-
disabled:
|
|
11647
|
+
disabled: o,
|
|
11643
11648
|
onClick: () => {
|
|
11644
|
-
|
|
11649
|
+
S && m === "first" && f?.(!0);
|
|
11645
11650
|
},
|
|
11646
11651
|
children: "Else"
|
|
11647
11652
|
}),
|
|
11648
11653
|
/* @__PURE__ */ z("div", { style: { flexGrow: 1 } }),
|
|
11649
|
-
!
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11654
|
+
!o && /* @__PURE__ */ z("input", {
|
|
11655
|
+
"aria-label": g("dg.condition.namePlaceholder"),
|
|
11656
|
+
"data-slot": "switch-statement-name",
|
|
11657
|
+
className: "mr-1 h-5 w-24 rounded-sm border border-transparent bg-transparent px-1 text-right text-xs outline-none placeholder:text-[var(--seal-color-text-disabled)] focus:border-[var(--border)]",
|
|
11658
|
+
placeholder: g("dg.condition.namePlaceholder"),
|
|
11659
|
+
value: y ?? "",
|
|
11660
|
+
disabled: o,
|
|
11661
|
+
onChange: (e) => {
|
|
11662
|
+
b(e.target.value), a?.(e.target.value);
|
|
11663
|
+
}
|
|
11664
|
+
}),
|
|
11665
|
+
!o && s && /* @__PURE__ */ z(_a, {
|
|
11666
|
+
title: g("dg.condition.removeConfirm"),
|
|
11667
|
+
okText: g("common.remove"),
|
|
11668
|
+
onConfirm: () => c?.(),
|
|
11653
11669
|
children: /* @__PURE__ */ z(J, {
|
|
11654
11670
|
className: "text-[var(--seal-color-text-disabled)]",
|
|
11655
11671
|
size: "small",
|
|
@@ -11661,10 +11677,10 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11661
11677
|
id: e,
|
|
11662
11678
|
type: "source",
|
|
11663
11679
|
position: pr.Right,
|
|
11664
|
-
className: H(
|
|
11680
|
+
className: H(l && "border-[var(--seal-color-success)]! bg-[var(--seal-color-success-bg)]!")
|
|
11665
11681
|
})
|
|
11666
11682
|
]
|
|
11667
|
-
}), !
|
|
11683
|
+
}), !C && /* @__PURE__ */ z("div", {
|
|
11668
11684
|
className: "flex px-(--node-horizontal-padding) pb-[7px] pt-0",
|
|
11669
11685
|
children: /* @__PURE__ */ z($l, {
|
|
11670
11686
|
style: {
|
|
@@ -11672,20 +11688,20 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11672
11688
|
lineHeight: "20px",
|
|
11673
11689
|
width: "100%"
|
|
11674
11690
|
},
|
|
11675
|
-
displayDiff:
|
|
11676
|
-
previousValue:
|
|
11677
|
-
value:
|
|
11691
|
+
displayDiff: r?.fields?.condition?.status === "modified",
|
|
11692
|
+
previousValue: r?.fields?.condition?.previousValue,
|
|
11693
|
+
value: _,
|
|
11678
11694
|
maxRows: 4,
|
|
11679
|
-
disabled:
|
|
11680
|
-
onChange:
|
|
11681
|
-
variableType:
|
|
11695
|
+
disabled: o,
|
|
11696
|
+
onChange: x,
|
|
11697
|
+
variableType: h
|
|
11682
11698
|
})
|
|
11683
11699
|
})]
|
|
11684
11700
|
});
|
|
11685
|
-
},
|
|
11686
|
-
let
|
|
11701
|
+
}, Jf = ({ id: e, value: t, name: n, diff: r, onChange: i, onNameChange: a, disabled: o, configurable: s = !0, onDelete: c, isActive: l, variableType: u }) => {
|
|
11702
|
+
let d = Z(), [f, p] = Kf(t), [m, h] = Kf(n);
|
|
11687
11703
|
return /* @__PURE__ */ B("div", {
|
|
11688
|
-
className: H(
|
|
11704
|
+
className: H(l && "bg-[var(--seal-color-success-bg)]", r?.status === "added" && "bg-[var(--seal-color-success-bg)]", r?.status === "modified" && "bg-[var(--seal-color-warning-bg)]", r?.status === "removed" && "bg-[var(--seal-color-error-bg)]"),
|
|
11689
11705
|
children: [
|
|
11690
11706
|
/* @__PURE__ */ z("div", {
|
|
11691
11707
|
className: H("flex p-[8px_10px] [&_.cm-editor]:pr-3.5"),
|
|
@@ -11695,23 +11711,34 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11695
11711
|
lineHeight: "20px",
|
|
11696
11712
|
width: "100%"
|
|
11697
11713
|
},
|
|
11698
|
-
displayDiff:
|
|
11699
|
-
previousValue:
|
|
11700
|
-
value:
|
|
11714
|
+
displayDiff: r?.fields?.condition?.status === "modified",
|
|
11715
|
+
previousValue: r?.fields?.condition?.previousValue,
|
|
11716
|
+
value: f,
|
|
11701
11717
|
maxRows: 4,
|
|
11702
|
-
disabled:
|
|
11718
|
+
disabled: o,
|
|
11703
11719
|
onChange: (e) => {
|
|
11704
|
-
|
|
11720
|
+
p(e), i?.(e);
|
|
11705
11721
|
},
|
|
11706
|
-
variableType:
|
|
11722
|
+
variableType: u
|
|
11707
11723
|
})
|
|
11708
11724
|
}),
|
|
11709
|
-
!
|
|
11725
|
+
!o && /* @__PURE__ */ z("input", {
|
|
11726
|
+
"aria-label": d("dg.condition.namePlaceholder"),
|
|
11727
|
+
"data-slot": "switch-statement-name",
|
|
11728
|
+
className: "mx-[10px] mb-1 h-5 w-24 rounded-sm border border-transparent bg-transparent px-1 text-xs outline-none placeholder:text-[var(--seal-color-text-disabled)] focus:border-[var(--border)]",
|
|
11729
|
+
placeholder: d("dg.condition.namePlaceholder"),
|
|
11730
|
+
value: m ?? "",
|
|
11731
|
+
disabled: o,
|
|
11732
|
+
onChange: (e) => {
|
|
11733
|
+
h(e.target.value), a?.(e.target.value);
|
|
11734
|
+
}
|
|
11735
|
+
}),
|
|
11736
|
+
!o && s && /* @__PURE__ */ z("div", {
|
|
11710
11737
|
className: "absolute right-3.5 top-2.5",
|
|
11711
11738
|
children: /* @__PURE__ */ z(_a, {
|
|
11712
|
-
title:
|
|
11713
|
-
okText:
|
|
11714
|
-
onConfirm: () =>
|
|
11739
|
+
title: d("dg.condition.removeConfirm"),
|
|
11740
|
+
okText: d("common.remove"),
|
|
11741
|
+
onConfirm: () => c?.(),
|
|
11715
11742
|
children: /* @__PURE__ */ z(J, {
|
|
11716
11743
|
className: "text-[var(--seal-color-text-disabled)]",
|
|
11717
11744
|
size: "small",
|
|
@@ -11724,20 +11751,26 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11724
11751
|
id: e,
|
|
11725
11752
|
type: "source",
|
|
11726
11753
|
position: pr.Right,
|
|
11727
|
-
className: H(
|
|
11754
|
+
className: H(l && "border-[var(--seal-color-success)]! bg-[var(--seal-color-success-bg)]!")
|
|
11728
11755
|
})
|
|
11729
11756
|
]
|
|
11730
11757
|
});
|
|
11731
|
-
},
|
|
11732
|
-
let i = Zu(), { ref: a, inView: o } = Nr({ delay: 1e3 }), { content: s, disabled: c, nodeTrace: l, compactMode: u, isGraphActive: d } = $(({ decisionGraph: t, disabled: n, simulate: r, compactMode: i, activeTab: a }) => ({
|
|
11758
|
+
}, Yf = ({ id: e, data: t, selected: n, specification: r }) => {
|
|
11759
|
+
let i = Zu(), { ref: a, inView: o } = Nr({ delay: 1e3 }), { content: s, disabled: c, nodeTrace: l, compactMode: u, isGraphActive: d, edges: f } = $(({ decisionGraph: t, disabled: n, simulate: r, compactMode: i, activeTab: a }) => ({
|
|
11733
11760
|
nodeTrace: G(r).with({ result: W._ }, ({ result: t }) => t?.trace?.[e]).otherwise(() => null),
|
|
11734
11761
|
content: (t?.nodes || []).find((t) => t?.id === e)?.content,
|
|
11735
11762
|
disabled: n,
|
|
11736
11763
|
compactMode: i,
|
|
11737
|
-
isGraphActive: a === "graph"
|
|
11738
|
-
|
|
11764
|
+
isGraphActive: a === "graph",
|
|
11765
|
+
edges: t?.edges
|
|
11766
|
+
})), p = cd(e, { disabled: !d || !o }), m = s?.statements || [], h = s?.hitPolicy || "first", g = (t) => {
|
|
11739
11767
|
i.updateNode(e, (e) => (e.content.hitPolicy = t, e));
|
|
11740
|
-
},
|
|
11768
|
+
}, _ = (t, n) => {
|
|
11769
|
+
i.updateNode(e, (e) => {
|
|
11770
|
+
let r = e.content.statements.find((e) => e.id === t);
|
|
11771
|
+
return r && (r.name = n), e;
|
|
11772
|
+
}), i.setEdges(Gf(f ?? [], e, t, n));
|
|
11773
|
+
}, v = I(() => u ? Jf : qf, [u]);
|
|
11741
11774
|
return /* @__PURE__ */ z(kd, {
|
|
11742
11775
|
id: e,
|
|
11743
11776
|
ref: a,
|
|
@@ -11752,7 +11785,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11752
11785
|
type: "text",
|
|
11753
11786
|
disabled: c,
|
|
11754
11787
|
onClick: () => {
|
|
11755
|
-
|
|
11788
|
+
h === "first" && m?.length > 0 ? i.updateNode(e, (e) => (e.content.statements = (e.content.statements || []).map((e) => (e.isDefault &&= !1, e)), e.content.statements.push({
|
|
11756
11789
|
id: crypto.randomUUID(),
|
|
11757
11790
|
condition: "",
|
|
11758
11791
|
isDefault: !0
|
|
@@ -11769,14 +11802,14 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11769
11802
|
menu: { items: [{
|
|
11770
11803
|
key: "first",
|
|
11771
11804
|
label: "First",
|
|
11772
|
-
onClick: () =>
|
|
11805
|
+
onClick: () => g("first"),
|
|
11773
11806
|
disabled: c
|
|
11774
11807
|
}, {
|
|
11775
11808
|
key: "collect",
|
|
11776
11809
|
label: "Collect",
|
|
11777
11810
|
disabled: c,
|
|
11778
11811
|
onClick: () => {
|
|
11779
|
-
i.updateNode(e, (e) => (e.content.statements = (e.content.statements || []).map((e) => (e.isDefault &&= !1, e)), e)),
|
|
11812
|
+
i.updateNode(e, (e) => (e.content.statements = (e.content.statements || []).map((e) => (e.isDefault &&= !1, e)), e)), g("collect");
|
|
11780
11813
|
}
|
|
11781
11814
|
}] },
|
|
11782
11815
|
children: /* @__PURE__ */ B(J, {
|
|
@@ -11786,7 +11819,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11786
11819
|
marginLeft: "auto"
|
|
11787
11820
|
},
|
|
11788
11821
|
children: [
|
|
11789
|
-
|
|
11822
|
+
h,
|
|
11790
11823
|
" ",
|
|
11791
11824
|
/* @__PURE__ */ z(nt, {})
|
|
11792
11825
|
]
|
|
@@ -11796,20 +11829,22 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11796
11829
|
className: "flex w-full flex-col items-stretch",
|
|
11797
11830
|
children: /* @__PURE__ */ B("div", {
|
|
11798
11831
|
className: "nodrag box-border flex w-full flex-col",
|
|
11799
|
-
children: [!(
|
|
11832
|
+
children: [!(m?.length > 0) && /* @__PURE__ */ z(X.Text, {
|
|
11800
11833
|
type: "secondary",
|
|
11801
11834
|
className: "px-3",
|
|
11802
11835
|
children: "No conditions"
|
|
11803
|
-
}),
|
|
11836
|
+
}), m.map((t, n) => /* @__PURE__ */ z(v, {
|
|
11804
11837
|
index: n,
|
|
11805
11838
|
value: t.condition,
|
|
11839
|
+
name: t.name,
|
|
11806
11840
|
diff: t?._diff,
|
|
11807
11841
|
id: t.id,
|
|
11808
11842
|
isDefault: t.isDefault,
|
|
11809
|
-
totalStatements:
|
|
11843
|
+
totalStatements: m.length,
|
|
11810
11844
|
disabled: c,
|
|
11811
|
-
hitPolicy:
|
|
11812
|
-
variableType:
|
|
11845
|
+
hitPolicy: h,
|
|
11846
|
+
variableType: p,
|
|
11847
|
+
onNameChange: (e) => _(t.id, e),
|
|
11813
11848
|
onSetIsDefault: (n) => {
|
|
11814
11849
|
i.updateNode(e, (e) => {
|
|
11815
11850
|
let r = e.content.statements.find((e) => e.id === t.id);
|
|
@@ -11830,7 +11865,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11830
11865
|
})
|
|
11831
11866
|
})
|
|
11832
11867
|
});
|
|
11833
|
-
},
|
|
11868
|
+
}, Xf = {
|
|
11834
11869
|
type: Q.Switch,
|
|
11835
11870
|
icon: /* @__PURE__ */ z(Lt, { size: "1em" }),
|
|
11836
11871
|
displayName: "Switch",
|
|
@@ -11853,14 +11888,14 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11853
11888
|
}]
|
|
11854
11889
|
}
|
|
11855
11890
|
}),
|
|
11856
|
-
renderNode: ({ specification: e, ...t }) => /* @__PURE__ */ z(
|
|
11891
|
+
renderNode: ({ specification: e, ...t }) => /* @__PURE__ */ z(Yf, {
|
|
11857
11892
|
specification: e,
|
|
11858
11893
|
...t
|
|
11859
11894
|
})
|
|
11860
|
-
},
|
|
11861
|
-
nodes:
|
|
11862
|
-
edges:
|
|
11863
|
-
}),
|
|
11895
|
+
}, Zf = (e, t, n) => ({
|
|
11896
|
+
nodes: Qf(e?.nodes ?? [], t?.nodes ?? [], n),
|
|
11897
|
+
edges: $f(e?.edges ?? [], t?.edges ?? [])
|
|
11898
|
+
}), Qf = (e, t, n) => {
|
|
11864
11899
|
let r = n?.components || [], i = n?.customNodes || [], a = /* @__PURE__ */ new Map();
|
|
11865
11900
|
return (e || []).forEach((e) => {
|
|
11866
11901
|
let n = (t || []).find((t) => t.id === e.id);
|
|
@@ -11883,7 +11918,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11883
11918
|
status: "modified",
|
|
11884
11919
|
previousValue: r?._diff?.fields?.source?.previousValue
|
|
11885
11920
|
}), r?.source)).otherwise(() => r);
|
|
11886
|
-
}).with([Q.Switch, Q.Switch], () =>
|
|
11921
|
+
}).with([Q.Switch, Q.Switch], () => Xf?.getDiffContent?.(e?.content, n?.content)).otherwise(() => {
|
|
11887
11922
|
let t = r.find((t) => t.type === e.type);
|
|
11888
11923
|
if (t) return t?.getDiffContent?.(e?.content, n?.content);
|
|
11889
11924
|
let a = i.find((t) => e?.type === "customNode" && e?.content?.kind === t?.kind);
|
|
@@ -11914,7 +11949,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11914
11949
|
_diff: { status: "removed" }
|
|
11915
11950
|
});
|
|
11916
11951
|
}), Array.from(a.values());
|
|
11917
|
-
},
|
|
11952
|
+
}, $f = (e, t) => {
|
|
11918
11953
|
let n = /* @__PURE__ */ new Map();
|
|
11919
11954
|
return (e || []).forEach((e) => {
|
|
11920
11955
|
(t || []).find((t) => t.id === e.id) ? n.set(e.id, {
|
|
@@ -11930,7 +11965,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11930
11965
|
_diff: { status: "removed" }
|
|
11931
11966
|
});
|
|
11932
11967
|
}), Array.from(n.values());
|
|
11933
|
-
},
|
|
11968
|
+
}, ep = ({ id: e, defaultValue: t, value: n, name: r, disabled: i = !1, diffBaseline: a, onChange: o, components: s, customNodes: c, defaultActivePanel: l, hideLeftToolbar: u, panels: d, simulate: f, dictionaries: p, mode: m, viewConfigCta: h, viewConfig: g, onViewConfigCta: _, onPanelsChange: v, onReactFlowInit: y, onCodeExtension: b, onFunctionReady: x }) => {
|
|
11934
11969
|
let S = L(!1), C = Zu(), { stateStore: w, listenerStore: T } = Qu(), { decisionGraph: E, openTabs: D, activeTab: O } = $(({ decisionGraph: e, openTabs: t, activeTab: n }) => ({
|
|
11935
11970
|
decisionGraph: e,
|
|
11936
11971
|
openTabs: t,
|
|
@@ -11993,7 +12028,7 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
11993
12028
|
}, [k]), F(() => {
|
|
11994
12029
|
n === void 0 || a || S.current && !(0, es.default)(n, E) && C.setDecisionGraph(n);
|
|
11995
12030
|
}, [n, a]), F(() => {
|
|
11996
|
-
n === void 0 ? t !== void 0 && C.setDecisionGraph(t) : C.setDecisionGraph(a ?
|
|
12031
|
+
n === void 0 ? t !== void 0 && C.setDecisionGraph(t) : C.setDecisionGraph(a ? Zf(n, a, {
|
|
11997
12032
|
customNodes: c ?? [],
|
|
11998
12033
|
components: s ?? []
|
|
11999
12034
|
}) : n), w.setState({
|
|
@@ -12001,21 +12036,21 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
12001
12036
|
hideLeftToolbar: u
|
|
12002
12037
|
}), S.current = !0;
|
|
12003
12038
|
}, []), F(() => {
|
|
12004
|
-
n !== void 0 && (a ? C.setDecisionGraph(
|
|
12039
|
+
n !== void 0 && (a ? C.setDecisionGraph(Zf(n, a, {
|
|
12005
12040
|
customNodes: c ?? [],
|
|
12006
12041
|
components: s ?? []
|
|
12007
12042
|
})) : S.current && C.setDecisionGraph(n));
|
|
12008
12043
|
}, [a]), null;
|
|
12009
|
-
},
|
|
12044
|
+
}, tp = () => {
|
|
12010
12045
|
let e = null;
|
|
12011
12046
|
return { walk: function* (t) {
|
|
12012
|
-
let n =
|
|
12047
|
+
let n = np(t);
|
|
12013
12048
|
if (e && (0, es.default)(n, e.digest)) {
|
|
12014
|
-
yield*
|
|
12049
|
+
yield* ip(t, e.iterator);
|
|
12015
12050
|
return;
|
|
12016
12051
|
}
|
|
12017
12052
|
let r = [];
|
|
12018
|
-
for (let e of
|
|
12053
|
+
for (let e of rp(t)) r.push({
|
|
12019
12054
|
id: e.node.id,
|
|
12020
12055
|
incomers: e.incomers.map((e) => e.id)
|
|
12021
12056
|
}), yield e;
|
|
@@ -12024,13 +12059,13 @@ var Df = "__root__", Of = (e, t) => e ? `${e}.${t}` : t, kf = (e, t) => e ? `${e
|
|
|
12024
12059
|
iterator: r
|
|
12025
12060
|
};
|
|
12026
12061
|
} };
|
|
12027
|
-
},
|
|
12062
|
+
}, np = (e) => ({
|
|
12028
12063
|
nodes: e.nodes.map((e) => e.id),
|
|
12029
12064
|
edges: e.edges
|
|
12030
12065
|
});
|
|
12031
|
-
function*
|
|
12066
|
+
function* rp(e) {
|
|
12032
12067
|
let t = Ru(e.nodes), n = Bu(e.edges), r = e.nodes.find((e) => e.type === "inputNode"), i = t.find((e) => e.id === r?.id);
|
|
12033
|
-
if (!r || !i ||
|
|
12068
|
+
if (!r || !i || ap(i, t, n)) return;
|
|
12034
12069
|
yield {
|
|
12035
12070
|
node: r,
|
|
12036
12071
|
incomers: []
|
|
@@ -12056,7 +12091,7 @@ function* np(e) {
|
|
|
12056
12091
|
o.push(...l);
|
|
12057
12092
|
}
|
|
12058
12093
|
}
|
|
12059
|
-
function*
|
|
12094
|
+
function* ip(e, t) {
|
|
12060
12095
|
for (let n of t) {
|
|
12061
12096
|
let t = e.nodes.find((e) => e.id === n.id);
|
|
12062
12097
|
t && (yield {
|
|
@@ -12065,7 +12100,7 @@ function* rp(e, t) {
|
|
|
12065
12100
|
});
|
|
12066
12101
|
}
|
|
12067
12102
|
}
|
|
12068
|
-
var
|
|
12103
|
+
var ap = (e, t, n) => {
|
|
12069
12104
|
let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = (e) => {
|
|
12070
12105
|
r.add(e.id), i.add(e.id);
|
|
12071
12106
|
let o = yr(e, t, n);
|
|
@@ -12078,17 +12113,17 @@ var ip = (e, t, n) => {
|
|
|
12078
12113
|
};
|
|
12079
12114
|
//#endregion
|
|
12080
12115
|
//#region src/components/decision-graph/nodes/specifications/specifications.tsx
|
|
12081
|
-
function
|
|
12116
|
+
function op(e) {
|
|
12082
12117
|
return e;
|
|
12083
12118
|
}
|
|
12084
|
-
var
|
|
12119
|
+
var sp = op({
|
|
12085
12120
|
[Q.Input]: Rf,
|
|
12086
12121
|
[Q.Output]: Uf,
|
|
12087
12122
|
[Q.DecisionTable]: Ad,
|
|
12088
12123
|
[Q.Expression]: Yd,
|
|
12089
12124
|
[Q.Function]: of,
|
|
12090
|
-
[Q.Switch]:
|
|
12091
|
-
}),
|
|
12125
|
+
[Q.Switch]: Xf
|
|
12126
|
+
}), cp = () => {
|
|
12092
12127
|
let { stateStore: e } = Qu();
|
|
12093
12128
|
return F(() => {
|
|
12094
12129
|
if (no()) return e.subscribe(({ simulate: t, nodeTypes: n, decisionGraph: r }, i) => {
|
|
@@ -12118,12 +12153,12 @@ var op = ap({
|
|
|
12118
12153
|
});
|
|
12119
12154
|
}, []), F(() => {
|
|
12120
12155
|
if (!no()) return;
|
|
12121
|
-
let t =
|
|
12156
|
+
let t = tp();
|
|
12122
12157
|
return e.subscribe((n, r) => {
|
|
12123
12158
|
try {
|
|
12124
|
-
let i =
|
|
12159
|
+
let i = up(n), a = up(r), o = dp(n, r);
|
|
12125
12160
|
if ((0, es.default)(i, a) && !o) return;
|
|
12126
|
-
let s =
|
|
12161
|
+
let s = lp(n, r, t);
|
|
12127
12162
|
s.isModified && e.setState({ nodeTypes: s.nodeTypes });
|
|
12128
12163
|
} catch (e) {
|
|
12129
12164
|
console.error("error occurred during node type inference", e);
|
|
@@ -12132,7 +12167,7 @@ var op = ap({
|
|
|
12132
12167
|
}, []), F(() => {
|
|
12133
12168
|
if (no()) return e.subscribe((t, n) => {
|
|
12134
12169
|
try {
|
|
12135
|
-
let r =
|
|
12170
|
+
let r = pp(t), i = pp(n);
|
|
12136
12171
|
if ((0, es.default)(r, i)) return;
|
|
12137
12172
|
let a = cn.fromJson({ Object: {} });
|
|
12138
12173
|
t.decisionGraph.nodes.forEach((e) => {
|
|
@@ -12144,7 +12179,7 @@ var op = ap({
|
|
|
12144
12179
|
}
|
|
12145
12180
|
});
|
|
12146
12181
|
}, []), null;
|
|
12147
|
-
},
|
|
12182
|
+
}, lp = ({ decisionGraph: e, nodeTypes: t, customNodes: n }, r, i) => {
|
|
12148
12183
|
let a = !1, o = U(t, (t) => {
|
|
12149
12184
|
for (let { node: o, incomers: s } of i.walk(e)) {
|
|
12150
12185
|
if (o.type === "inputNode") return;
|
|
@@ -12153,7 +12188,7 @@ var op = ap({
|
|
|
12153
12188
|
return n[Ku.Output] ?? n[Ku.InferredOutput];
|
|
12154
12189
|
}).filter((e) => !!e).map((e) => e.clone()), i = G(e.length).with(1, () => e[0]).otherwise(() => cn.fromIncoming(e));
|
|
12155
12190
|
(t?.[o.id]?.[Ku.InferredInput])?.equal(i) || (a = !0, t[o.id] ??= {}, t[o.id][Ku.InferredInput] = i);
|
|
12156
|
-
let c =
|
|
12191
|
+
let c = sp[o.type]?.inferTypes ?? n.find((e) => e.kind === o.type)?.inferTypes;
|
|
12157
12192
|
if (!c) return;
|
|
12158
12193
|
let l = t?.[o.id]?.[Ku.Input] ?? t?.[o.id]?.[Ku.InferredInput] ?? cn.fromJson("Any"), u = r.nodeTypes?.[o.id]?.[Ku.Input] ?? r.nodeTypes?.[o.id]?.[Ku.InferredInput] ?? cn.fromJson("Any"), d = r.decisionGraph.nodes.find((e) => e.id === o.id)?.content;
|
|
12159
12194
|
if (!c.needsUpdate(o.content, d) && l.equal(u) && t?.[o.id]?.[Ku.InferredOutput]) return;
|
|
@@ -12168,14 +12203,14 @@ var op = ap({
|
|
|
12168
12203
|
isModified: a,
|
|
12169
12204
|
nodeTypes: o
|
|
12170
12205
|
};
|
|
12171
|
-
},
|
|
12206
|
+
}, up = ({ decisionGraph: e, nodeTypes: t, customNodes: n }) => {
|
|
12172
12207
|
let r = e.edges, i = e.nodes.map(({ id: e, type: t }) => ({
|
|
12173
12208
|
id: e,
|
|
12174
12209
|
type: t
|
|
12175
12210
|
})), a = n.map((e) => e.kind), o = Object.entries(t).map(([e, t]) => ({
|
|
12176
12211
|
id: e,
|
|
12177
|
-
input:
|
|
12178
|
-
output:
|
|
12212
|
+
input: fp(t[Ku.Input]),
|
|
12213
|
+
output: fp(t[Ku.Output])
|
|
12179
12214
|
})), s = e.nodes.find((e) => e.type === "inputNode")?.id;
|
|
12180
12215
|
return {
|
|
12181
12216
|
edgesData: r,
|
|
@@ -12184,25 +12219,25 @@ var op = ap({
|
|
|
12184
12219
|
customNodesData: a,
|
|
12185
12220
|
inputNodeType: G(t?.[s ?? ""]?.[Ku.InferredOutput]).with(W.nonNullable, (e) => e.hash()).otherwise(() => null)
|
|
12186
12221
|
};
|
|
12187
|
-
},
|
|
12188
|
-
let r =
|
|
12222
|
+
}, dp = ({ decisionGraph: e, customNodes: t }, n) => e.nodes.map((e) => {
|
|
12223
|
+
let r = sp[e.type]?.inferTypes ?? t.find((t) => t.kind === e.type)?.inferTypes;
|
|
12189
12224
|
if (!r) return !1;
|
|
12190
12225
|
let i = n.decisionGraph.nodes.find((t) => t.id === e.id);
|
|
12191
12226
|
return !i || r.needsUpdate(e.content, i.content);
|
|
12192
|
-
}).some((e) => e),
|
|
12227
|
+
}).some((e) => e), fp = (e) => {
|
|
12193
12228
|
if (e) return e.__hash ||= e.hash(), e.__hash;
|
|
12194
|
-
},
|
|
12229
|
+
}, pp = (e) => ({ nodeInfo: e.decisionGraph.nodes.map((t) => {
|
|
12195
12230
|
let n = e.nodeTypes[t.id], r = n?.[Ku.Output] ?? n?.[Ku.InferredOutput];
|
|
12196
12231
|
return {
|
|
12197
12232
|
id: t.id,
|
|
12198
|
-
type:
|
|
12233
|
+
type: fp(r),
|
|
12199
12234
|
name: t.name
|
|
12200
12235
|
};
|
|
12201
|
-
}) }),
|
|
12236
|
+
}) }), mp = "jdmEditor:graphPanel:height", hp = () => {
|
|
12202
12237
|
let e = Z(), t = Zu(), { panels: n, activePanel: r } = $(({ panels: e, activePanel: t }) => ({
|
|
12203
12238
|
panels: e,
|
|
12204
12239
|
activePanel: t
|
|
12205
|
-
})), i = I(() => r === void 0 ? void 0 : (n || []).find((e) => e.id === r), [r, n]), a = I(() => Number.parseFloat(localStorage.getItem(
|
|
12240
|
+
})), i = I(() => r === void 0 ? void 0 : (n || []).find((e) => e.id === r), [r, n]), a = I(() => Number.parseFloat(localStorage.getItem(mp) ?? "") ?? 300, [i]);
|
|
12206
12241
|
return i ? /* @__PURE__ */ B(Pr, {
|
|
12207
12242
|
className: "[grid-area:bottom] relative flex h-full w-full flex-col border-t border-t-[var(--border)] bg-[var(--seal-color-primary-bg-fade)]",
|
|
12208
12243
|
defaultSize: { height: a },
|
|
@@ -12218,7 +12253,7 @@ var op = ap({
|
|
|
12218
12253
|
maxHeight: 500,
|
|
12219
12254
|
minHeight: 150,
|
|
12220
12255
|
onResize: (e, t, n) => {
|
|
12221
|
-
localStorage.setItem(
|
|
12256
|
+
localStorage.setItem(mp, n.clientHeight.toString());
|
|
12222
12257
|
},
|
|
12223
12258
|
children: [!i.hideHeader && /* @__PURE__ */ B("div", {
|
|
12224
12259
|
className: "flex flex-row items-center justify-start gap-2 border-b border-b-[var(--border)] py-1 pl-2 pr-1 [&>span]:text-[13px]",
|
|
@@ -12246,21 +12281,21 @@ var op = ap({
|
|
|
12246
12281
|
children: i?.renderPanel?.()
|
|
12247
12282
|
})]
|
|
12248
12283
|
}) : null;
|
|
12249
|
-
},
|
|
12284
|
+
}, gp = () => {
|
|
12250
12285
|
let e = $(({ components: e }) => e);
|
|
12251
|
-
return [...Object.values(
|
|
12286
|
+
return [...Object.values(sp), ...e ?? []].map((e) => ({
|
|
12252
12287
|
type: e.kind ? "customNode" : e.type ?? "customNode",
|
|
12253
12288
|
component: e.kind,
|
|
12254
12289
|
label: e.kind ? e.displayName ?? e.kind : e.displayName ?? "",
|
|
12255
12290
|
icon: e.icon
|
|
12256
12291
|
}));
|
|
12257
|
-
},
|
|
12292
|
+
}, _p = (e) => {
|
|
12258
12293
|
let t = Zu(), { id: n, source: r, target: i, sourceHandle: a, targetHandle: o, sourceX: s, sourceY: c, targetX: l, targetY: u, sourcePosition: d, targetPosition: f, style: p = {}, markerEnd: m, label: h } = e, { isHovered: g, disabled: _, decisionGraph: y, components: b } = $(({ hoveredEdgeId: e, disabled: t, decisionGraph: r, components: i }) => ({
|
|
12259
12294
|
isHovered: e === n,
|
|
12260
12295
|
disabled: t,
|
|
12261
12296
|
decisionGraph: r,
|
|
12262
12297
|
components: i
|
|
12263
|
-
})), { diff: x } = ed(n), [S, C] = N.useState(!1), w =
|
|
12298
|
+
})), { diff: x } = ed(n), [S, C] = N.useState(!1), w = gp(), [T, E, D] = _r({
|
|
12264
12299
|
sourceX: s,
|
|
12265
12300
|
sourceY: c,
|
|
12266
12301
|
sourcePosition: d,
|
|
@@ -12268,6 +12303,7 @@ var op = ap({
|
|
|
12268
12303
|
targetY: u,
|
|
12269
12304
|
targetPosition: f
|
|
12270
12305
|
}), O = h != null && String(h).trim() !== "" ? /* @__PURE__ */ z("div", {
|
|
12306
|
+
"data-slot": "edge-label-chip",
|
|
12271
12307
|
className: "nodrag nopan pointer-events-none absolute z-[999]",
|
|
12272
12308
|
style: { transform: `translate(-50%, -50%) translate(${E}px,${D - 18}px)` },
|
|
12273
12309
|
children: /* @__PURE__ */ z("span", {
|
|
@@ -12276,7 +12312,7 @@ var op = ap({
|
|
|
12276
12312
|
})
|
|
12277
12313
|
}) : null, k = async (e) => {
|
|
12278
12314
|
C(!1);
|
|
12279
|
-
let s = (y?.nodes ?? []).filter((t) => e.type === "customNode" ? t.content?.kind === e.component : t.type === e.type).length, c = [...Object.values(
|
|
12315
|
+
let s = (y?.nodes ?? []).filter((t) => e.type === "customNode" ? t.content?.kind === e.component : t.type === e.type).length, c = [...Object.values(sp), ...b], l = e.type === "customNode" ? c.find((t) => t.kind === e.component) : c.find((t) => t.type === e.type);
|
|
12280
12316
|
if (!l?.generateNode) return;
|
|
12281
12317
|
let u = l.generateNode({ index: s + 1 }), d = {
|
|
12282
12318
|
x: E - 110,
|
|
@@ -12363,10 +12399,10 @@ var op = ap({
|
|
|
12363
12399
|
]
|
|
12364
12400
|
}) })
|
|
12365
12401
|
] });
|
|
12366
|
-
},
|
|
12402
|
+
}, vp = (e) => (t) => /* @__PURE__ */ z(_p, {
|
|
12367
12403
|
...t,
|
|
12368
12404
|
...e
|
|
12369
|
-
}),
|
|
12405
|
+
}), yp = (e) => typeof e == "object" && Array.isArray(e?.nodes), bp = (e, t) => {
|
|
12370
12406
|
let n = Qu(), r = Zu(), i = P(async (t) => {
|
|
12371
12407
|
try {
|
|
12372
12408
|
if (!e.current) return;
|
|
@@ -12393,7 +12429,7 @@ var op = ap({
|
|
|
12393
12429
|
let n = await Du();
|
|
12394
12430
|
if (!n) return;
|
|
12395
12431
|
let i = JSON.parse(n);
|
|
12396
|
-
if (!
|
|
12432
|
+
if (!yp(i)) throw Error("invalid clipboard");
|
|
12397
12433
|
let a = i.nodes.reduce((e, t) => ({
|
|
12398
12434
|
...e,
|
|
12399
12435
|
[t.id]: crypto.randomUUID()
|
|
@@ -12437,7 +12473,7 @@ var op = ap({
|
|
|
12437
12473
|
copyNodes: i,
|
|
12438
12474
|
pasteNodes: a
|
|
12439
12475
|
}), [i, a]);
|
|
12440
|
-
},
|
|
12476
|
+
}, xp = ({ reactFlowWrapper: e, reactFlowInstance: t, addNodes: n, addNode: r }) => ({
|
|
12441
12477
|
onDrop: (i) => {
|
|
12442
12478
|
if (i.preventDefault(), i.stopPropagation(), !e.current || !t.current) return;
|
|
12443
12479
|
let a;
|
|
@@ -12469,7 +12505,7 @@ var op = ap({
|
|
|
12469
12505
|
onDragOver: (e) => {
|
|
12470
12506
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
12471
12507
|
}
|
|
12472
|
-
}),
|
|
12508
|
+
}), Sp = "jdm-components-opened", Cp = ({ reactFlowInstance: e, onRestoreViewport: t, stateStore: n, componentsOpened: r, setComponentsOpened: i }) => {
|
|
12473
12509
|
ad("viewport", {
|
|
12474
12510
|
serialize: () => e.current?.getViewport() ?? {
|
|
12475
12511
|
x: 0,
|
|
@@ -12499,10 +12535,10 @@ var op = ap({
|
|
|
12499
12535
|
}), ad("componentsOpened", {
|
|
12500
12536
|
serialize: () => r,
|
|
12501
12537
|
restore: (e) => {
|
|
12502
|
-
typeof e == "boolean" && (i(e), localStorage.setItem(
|
|
12538
|
+
typeof e == "boolean" && (i(e), localStorage.setItem(Sp, `${e}`));
|
|
12503
12539
|
}
|
|
12504
12540
|
});
|
|
12505
|
-
},
|
|
12541
|
+
}, wp = ({ reactFlowWrapper: e, reactFlowInstance: t, customNodes: n, components: r, addNodes: i }) => async (a, o, s) => {
|
|
12506
12542
|
if (!e.current || !t.current) return;
|
|
12507
12543
|
if (!o) {
|
|
12508
12544
|
let n = e.current.getBoundingClientRect(), r = {
|
|
@@ -12511,7 +12547,7 @@ var op = ap({
|
|
|
12511
12547
|
};
|
|
12512
12548
|
o = t.current.screenToFlowPosition(r);
|
|
12513
12549
|
}
|
|
12514
|
-
let c = G(a).with("customNode", () => n.find((e) => e.kind === s)).otherwise(() => [...Object.values(
|
|
12550
|
+
let c = G(a).with("customNode", () => n.find((e) => e.kind === s)).otherwise(() => [...Object.values(sp), ...r].find((e) => e.type === a));
|
|
12515
12551
|
if (!c) {
|
|
12516
12552
|
V.error(`Unknown node type ${a} - ${s}.`);
|
|
12517
12553
|
return;
|
|
@@ -12549,7 +12585,7 @@ var op = ap({
|
|
|
12549
12585
|
let u = v.safeParse(l);
|
|
12550
12586
|
if (u.success) return i([v.parse(l)]);
|
|
12551
12587
|
V.error(u.error?.message);
|
|
12552
|
-
},
|
|
12588
|
+
}, Tp = N.memo(({ inputDisabled: e, disabled: t, collapsed: n }) => {
|
|
12553
12589
|
let r = $((e) => e.components || []), i = $((e) => e.customNodes || []), [a, o] = R(""), s = P((e, t, n) => {
|
|
12554
12590
|
let r = e.target;
|
|
12555
12591
|
if (!r) return;
|
|
@@ -12559,7 +12595,7 @@ var op = ap({
|
|
|
12559
12595
|
};
|
|
12560
12596
|
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("nodeType", t), e.dataTransfer.setData("relativePosition", JSON.stringify(c)), n && e.dataTransfer.setData("customNodeComponent", n);
|
|
12561
12597
|
}, []), c = I(() => {
|
|
12562
|
-
let e = { core: Object.values(
|
|
12598
|
+
let e = { core: Object.values(sp) };
|
|
12563
12599
|
return r?.length > 0 && (e.extended = r), (i || []).forEach((t) => {
|
|
12564
12600
|
let n = t.group?.trim?.() || "";
|
|
12565
12601
|
n.length > 0 && (e?.[n] ? e[n].push({
|
|
@@ -12590,19 +12626,19 @@ var op = ap({
|
|
|
12590
12626
|
className: "sticky top-0 z-[1] h-auto rounded-none border-0 shadow-none text-[13px]"
|
|
12591
12627
|
}), /* @__PURE__ */ z("div", {
|
|
12592
12628
|
className: "flex grow flex-col",
|
|
12593
|
-
children: Object.keys(l).map((r) => G(r).with("core", () => l.core?.length > 0 && /* @__PURE__ */ z(N.Fragment, { children: (l.core || []).map((r) => /* @__PURE__ */ z(N.Fragment, { children: /* @__PURE__ */ z(
|
|
12629
|
+
children: Object.keys(l).map((r) => G(r).with("core", () => l.core?.length > 0 && /* @__PURE__ */ z(N.Fragment, { children: (l.core || []).map((r) => /* @__PURE__ */ z(N.Fragment, { children: /* @__PURE__ */ z(Ep, {
|
|
12594
12630
|
collapsed: n,
|
|
12595
12631
|
disabled: G(r.type).with(Q.Input, () => t || e).otherwise(() => t),
|
|
12596
12632
|
specification: r,
|
|
12597
|
-
onDragStart: (e) =>
|
|
12598
|
-
}) }, "kind" in r ? r.kind : r.type)) }, r)).otherwise((e) => l[e]?.length > 0 && /* @__PURE__ */ z(N.Fragment, { children: (l?.[e] || []).map((r) => /* @__PURE__ */ z(
|
|
12633
|
+
onDragStart: (e) => sp[r.type] === void 0 ? s(e, "customNode", "kind" in r ? r.kind : "") : s(e, r.type)
|
|
12634
|
+
}) }, "kind" in r ? r.kind : r.type)) }, r)).otherwise((e) => l[e]?.length > 0 && /* @__PURE__ */ z(N.Fragment, { children: (l?.[e] || []).map((r) => /* @__PURE__ */ z(Ep, {
|
|
12599
12635
|
collapsed: n,
|
|
12600
12636
|
disabled: t,
|
|
12601
12637
|
specification: r,
|
|
12602
12638
|
onDragStart: (t) => e === "extended" ? s(t, r.type) : s(t, "customNode", "kind" in r ? r.kind : "")
|
|
12603
12639
|
}, "kind" in r ? r.kind : r.type)) }, e)))
|
|
12604
12640
|
})] });
|
|
12605
|
-
}),
|
|
12641
|
+
}), Ep = ({ specification: e, disabled: t = !1, collapsed: n, ...r }) => /* @__PURE__ */ z("div", {
|
|
12606
12642
|
className: H("draggable-component cursor-grab [transform:translate(0)]"),
|
|
12607
12643
|
draggable: !t,
|
|
12608
12644
|
...r,
|
|
@@ -12617,7 +12653,7 @@ var op = ap({
|
|
|
12617
12653
|
type: e.shortDescription
|
|
12618
12654
|
})
|
|
12619
12655
|
})
|
|
12620
|
-
}),
|
|
12656
|
+
}), Dp = () => {
|
|
12621
12657
|
let [e, t] = N.useState(null), [n, r] = N.useState(!1), i = $(({ customNodes: e }) => e);
|
|
12622
12658
|
if (Sr({ onChange: ({ nodes: e }) => {
|
|
12623
12659
|
let n = e[e.length - 1];
|
|
@@ -12632,7 +12668,7 @@ var op = ap({
|
|
|
12632
12668
|
name: typeof n.data?.name == "string" ? n.data.name : void 0
|
|
12633
12669
|
}), r(!1);
|
|
12634
12670
|
} }), !e || n) return null;
|
|
12635
|
-
let a = e.type === "customNode" ? i.find((t) => t.kind === e.kind) :
|
|
12671
|
+
let a = e.type === "customNode" ? i.find((t) => t.kind === e.kind) : sp[e.type], o = a?.renderSettings;
|
|
12636
12672
|
return o ? /* @__PURE__ */ z(fr, {
|
|
12637
12673
|
position: "top-right",
|
|
12638
12674
|
style: {
|
|
@@ -12679,7 +12715,7 @@ var op = ap({
|
|
|
12679
12715
|
})]
|
|
12680
12716
|
})
|
|
12681
12717
|
}) : null;
|
|
12682
|
-
},
|
|
12718
|
+
}, Op = [
|
|
12683
12719
|
"[--xy-background-color:transparent]",
|
|
12684
12720
|
"[--xy-background-pattern-color:var(--border)]",
|
|
12685
12721
|
"[--xy-edge-stroke:color-mix(in_oklab,var(--muted-foreground)_45%,transparent)]",
|
|
@@ -12703,21 +12739,21 @@ var op = ap({
|
|
|
12703
12739
|
"[--xy-selection-background-color:color-mix(in_oklab,var(--primary)_8%,transparent)]",
|
|
12704
12740
|
"[--xy-selection-border:1px_dashed_var(--primary)]",
|
|
12705
12741
|
"[--xy-attribution-background-color:transparent]"
|
|
12706
|
-
].join(" "),
|
|
12742
|
+
].join(" "), kp = Object.entries(sp).reduce((e, [t, n]) => ({
|
|
12707
12743
|
...e,
|
|
12708
12744
|
[t]: N.memo((e) => n.renderNode({
|
|
12709
12745
|
specification: n,
|
|
12710
12746
|
...e
|
|
12711
12747
|
}), (e, t) => e.id === t.id && e.selected === t.selected && Fr(e.data, t.data))
|
|
12712
|
-
}), {}),
|
|
12713
|
-
let r = L(null), i = L(null), a = xr([]), o = br([]), [s, c] = R(() => localStorage.getItem("jdm-components-opened") ? localStorage.getItem(
|
|
12748
|
+
}), {}), Ap = { edge: N.memo(vp(null)) }, jp = Ee(function({ reactFlowProOptions: e, className: t }, n) {
|
|
12749
|
+
let r = L(null), i = L(null), a = xr([]), o = br([]), [s, c] = R(() => localStorage.getItem("jdm-components-opened") ? localStorage.getItem(Sp) === "true" : (localStorage.setItem(Sp, "true"), !0)), l = L(void 0), u = Qu(), d = rd(), f = Zu(), p = Xu((e) => e), { onReactFlowInit: m } = Yu(({ onReactFlowInit: e }) => ({ onReactFlowInit: e })), { modal: h } = wi.useApp(), { disabled: g, hasInputNode: _, components: v, customNodes: y, id: b } = $(({ id: e, disabled: t, components: n, customNodes: r, decisionGraph: i }) => ({
|
|
12714
12750
|
id: e,
|
|
12715
12751
|
disabled: t,
|
|
12716
12752
|
components: n,
|
|
12717
12753
|
customNodes: r,
|
|
12718
12754
|
hasInputNode: (i?.nodes || []).some((e) => e.type === Q.Input)
|
|
12719
12755
|
}));
|
|
12720
|
-
p.nodesState.current = a, p.edgesState.current = o, p.graphClipboard.current =
|
|
12756
|
+
p.nodesState.current = a, p.edgesState.current = o, p.graphClipboard.current = bp(i, r), p.reactFlowInstance.current = i.current;
|
|
12721
12757
|
let x = I(() => N.memo((e) => {
|
|
12722
12758
|
let t = Z(), { openTab: n } = Zu(), r = y.find((t) => t.kind === e?.data?.kind);
|
|
12723
12759
|
return r ? r.renderNode({
|
|
@@ -12749,9 +12785,9 @@ var op = ap({
|
|
|
12749
12785
|
...e
|
|
12750
12786
|
}), (e, t) => e.id === t.id && e.selected === t.selected && Fr(e.data, t.data))
|
|
12751
12787
|
}), {
|
|
12752
|
-
...
|
|
12788
|
+
...kp,
|
|
12753
12789
|
customNode: x
|
|
12754
|
-
}), [v, x]), C =
|
|
12790
|
+
}), [v, x]), C = wp({
|
|
12755
12791
|
reactFlowWrapper: r,
|
|
12756
12792
|
reactFlowInstance: i,
|
|
12757
12793
|
customNodes: y,
|
|
@@ -12767,13 +12803,13 @@ var op = ap({
|
|
|
12767
12803
|
for (let a of yr(r, t, n)) if (a.id === e.source || s(a, i)) return !0;
|
|
12768
12804
|
};
|
|
12769
12805
|
return !r && !s(i);
|
|
12770
|
-
}, { onDrop: T, onDragOver: E } =
|
|
12806
|
+
}, { onDrop: T, onDragOver: E } = xp({
|
|
12771
12807
|
reactFlowWrapper: r,
|
|
12772
12808
|
reactFlowInstance: i,
|
|
12773
12809
|
addNodes: f.addNodes,
|
|
12774
12810
|
addNode: C
|
|
12775
12811
|
});
|
|
12776
|
-
return
|
|
12812
|
+
return Cp({
|
|
12777
12813
|
reactFlowInstance: i,
|
|
12778
12814
|
onRestoreViewport: (e) => {
|
|
12779
12815
|
l.current = e;
|
|
@@ -12839,7 +12875,7 @@ var op = ap({
|
|
|
12839
12875
|
}
|
|
12840
12876
|
},
|
|
12841
12877
|
children: /* @__PURE__ */ z("div", {
|
|
12842
|
-
className: H(["react-flow"],
|
|
12878
|
+
className: H(["react-flow"], Op),
|
|
12843
12879
|
ref: r,
|
|
12844
12880
|
children: /* @__PURE__ */ B(mr, {
|
|
12845
12881
|
deleteKeyCode: null,
|
|
@@ -12860,7 +12896,7 @@ var op = ap({
|
|
|
12860
12896
|
minZoom: .25,
|
|
12861
12897
|
selectionMode: gr.Partial,
|
|
12862
12898
|
nodeTypes: S,
|
|
12863
|
-
edgeTypes:
|
|
12899
|
+
edgeTypes: Ap,
|
|
12864
12900
|
onDrop: T,
|
|
12865
12901
|
onDragOver: E,
|
|
12866
12902
|
onConnect: (e) => {
|
|
@@ -12903,7 +12939,7 @@ var op = ap({
|
|
|
12903
12939
|
color: "var(--border)",
|
|
12904
12940
|
gap: 20
|
|
12905
12941
|
}),
|
|
12906
|
-
/* @__PURE__ */ z(
|
|
12942
|
+
/* @__PURE__ */ z(Dp, {})
|
|
12907
12943
|
]
|
|
12908
12944
|
})
|
|
12909
12945
|
})
|
|
@@ -12940,7 +12976,7 @@ var op = ap({
|
|
|
12940
12976
|
})]
|
|
12941
12977
|
}), /* @__PURE__ */ z("div", {
|
|
12942
12978
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
12943
|
-
children: /* @__PURE__ */ z(
|
|
12979
|
+
children: /* @__PURE__ */ z(Tp, {
|
|
12944
12980
|
inputDisabled: _,
|
|
12945
12981
|
collapsed: !s,
|
|
12946
12982
|
disabled: g
|
|
@@ -12949,7 +12985,7 @@ var op = ap({
|
|
|
12949
12985
|
})]
|
|
12950
12986
|
})
|
|
12951
12987
|
});
|
|
12952
|
-
}), { Title:
|
|
12988
|
+
}), { Title: Mp, Text: Np } = X, Pp = N.memo(({ className: e }) => {
|
|
12953
12989
|
let t = Z(), { decisionGraph: n, customComponents: r, viewConfig: i, viewConfigCta: a } = $((e) => ({
|
|
12954
12990
|
decisionGraph: e.decisionGraph || [],
|
|
12955
12991
|
customComponents: e.components,
|
|
@@ -12957,7 +12993,7 @@ var op = ap({
|
|
|
12957
12993
|
viewConfig: e.viewConfig,
|
|
12958
12994
|
viewConfigCta: e.viewConfigCta
|
|
12959
12995
|
})), { openTab: o } = Zu(), s = Yu((e) => e.onViewConfigCta), c = I(() => (n?.nodes || []).filter((e) => !i?.enabled || !!i?.permissions?.[e.id]).map((e) => {
|
|
12960
|
-
let t = e.type, n =
|
|
12996
|
+
let t = e.type, n = sp[e.type] || (r || []).find((t) => t.type === e.type);
|
|
12961
12997
|
return {
|
|
12962
12998
|
id: e.id,
|
|
12963
12999
|
type: e.type,
|
|
@@ -12968,7 +13004,7 @@ var op = ap({
|
|
|
12968
13004
|
...e?._diff ? { _diff: e._diff } : {}
|
|
12969
13005
|
};
|
|
12970
13006
|
}), [n, i]), [l, u] = R(""), d = ({ node: e }) => {
|
|
12971
|
-
let t =
|
|
13007
|
+
let t = sp?.[e?.type];
|
|
12972
13008
|
return /* @__PURE__ */ z("div", {
|
|
12973
13009
|
className: H("cursor-pointer rounded-(--seal-border-radius) border bg-card text-card-foreground shadow-xs transition-colors hover:border-primary/50", e?._diff?.status),
|
|
12974
13010
|
onClick: () => o(e.id),
|
|
@@ -12988,14 +13024,14 @@ var op = ap({
|
|
|
12988
13024
|
icon: t?.icon
|
|
12989
13025
|
}), /* @__PURE__ */ B("div", {
|
|
12990
13026
|
style: { flex: 1 },
|
|
12991
|
-
children: [/* @__PURE__ */ z(
|
|
13027
|
+
children: [/* @__PURE__ */ z(Np, {
|
|
12992
13028
|
style: {
|
|
12993
13029
|
margin: 0,
|
|
12994
13030
|
fontSize: 14,
|
|
12995
13031
|
marginBottom: e?.description ? "4px" : 0
|
|
12996
13032
|
},
|
|
12997
13033
|
children: e.name
|
|
12998
|
-
}), e?.description && /* @__PURE__ */ z(
|
|
13034
|
+
}), e?.description && /* @__PURE__ */ z(Np, {
|
|
12999
13035
|
type: "secondary",
|
|
13000
13036
|
style: { fontSize: "14px" },
|
|
13001
13037
|
children: e?.description
|
|
@@ -13030,7 +13066,7 @@ var op = ap({
|
|
|
13030
13066
|
className: "mb-8",
|
|
13031
13067
|
children: [/* @__PURE__ */ B("div", {
|
|
13032
13068
|
className: "flex justify-between",
|
|
13033
|
-
children: [/* @__PURE__ */ z(
|
|
13069
|
+
children: [/* @__PURE__ */ z(Mp, {
|
|
13034
13070
|
level: 4,
|
|
13035
13071
|
style: {
|
|
13036
13072
|
margin: 0,
|
|
@@ -13044,13 +13080,13 @@ var op = ap({
|
|
|
13044
13080
|
},
|
|
13045
13081
|
children: a
|
|
13046
13082
|
})]
|
|
13047
|
-
}), p ? /* @__PURE__ */ z(Me, { children: n?.nodes?.length > 0 ? /* @__PURE__ */ z(
|
|
13083
|
+
}), p ? /* @__PURE__ */ z(Me, { children: n?.nodes?.length > 0 ? /* @__PURE__ */ z(Np, {
|
|
13048
13084
|
type: "secondary",
|
|
13049
13085
|
children: "This decision model contains multiple components, but no view has been configured yet."
|
|
13050
|
-
}) : /* @__PURE__ */ z(
|
|
13086
|
+
}) : /* @__PURE__ */ z(Np, {
|
|
13051
13087
|
type: "secondary",
|
|
13052
13088
|
children: "This decision model doesn't contain any component."
|
|
13053
|
-
}) }) : /* @__PURE__ */ z(
|
|
13089
|
+
}) }) : /* @__PURE__ */ z(Np, {
|
|
13054
13090
|
type: "secondary",
|
|
13055
13091
|
children: i?.description || "Configure business rules for your decision model"
|
|
13056
13092
|
})]
|
|
@@ -13069,7 +13105,7 @@ var op = ap({
|
|
|
13069
13105
|
icon: /* @__PURE__ */ z(_s, {}),
|
|
13070
13106
|
onClick: () => u(""),
|
|
13071
13107
|
children: "Clear"
|
|
13072
|
-
})] }), /* @__PURE__ */ B(
|
|
13108
|
+
})] }), /* @__PURE__ */ B(Np, {
|
|
13073
13109
|
type: "secondary",
|
|
13074
13110
|
style: { whiteSpace: "nowrap" },
|
|
13075
13111
|
children: [c?.length || 0, " configurable items"]
|
|
@@ -13077,7 +13113,7 @@ var op = ap({
|
|
|
13077
13113
|
}),
|
|
13078
13114
|
f.filter((e) => e?.nodes?.length > 0).map((e) => /* @__PURE__ */ B("div", {
|
|
13079
13115
|
className: "mb-8",
|
|
13080
|
-
children: [/* @__PURE__ */ z(
|
|
13116
|
+
children: [/* @__PURE__ */ z(Mp, {
|
|
13081
13117
|
level: 5,
|
|
13082
13118
|
style: { marginBottom: "16px" },
|
|
13083
13119
|
children: e.title
|
|
@@ -13089,7 +13125,7 @@ var op = ap({
|
|
|
13089
13125
|
]
|
|
13090
13126
|
})
|
|
13091
13127
|
});
|
|
13092
|
-
}),
|
|
13128
|
+
}), Fp = (e, t) => e.id === t.id || e.value?.toLowerCase() === t.value?.toLowerCase() || e.label?.toLowerCase() === t.label?.toLowerCase(), Ip = (e, t) => t ? {
|
|
13093
13129
|
id: e.id,
|
|
13094
13130
|
label: e.label || t.label,
|
|
13095
13131
|
value: e.value || t.value,
|
|
@@ -13097,14 +13133,14 @@ var op = ap({
|
|
|
13097
13133
|
} : {
|
|
13098
13134
|
...e,
|
|
13099
13135
|
value: e.value || e.label
|
|
13100
|
-
},
|
|
13101
|
-
let n = [...t.map((t) =>
|
|
13136
|
+
}, Lp = (e, t) => {
|
|
13137
|
+
let n = [...t.map((t) => Ip(t, e.find((e) => Fp(e, t)))), ...e.filter((e) => !t.some((t) => Fp(t, e)))];
|
|
13102
13138
|
return n.some((e) => e.id === "_description") || n.push({
|
|
13103
13139
|
id: "_description",
|
|
13104
13140
|
label: "DESCRIPTION",
|
|
13105
13141
|
value: "description"
|
|
13106
13142
|
}), n;
|
|
13107
|
-
},
|
|
13143
|
+
}, Rp = (e) => e.reduce((t, n, r) => {
|
|
13108
13144
|
let i = e.some((e) => e.value === "description"), a = e.slice(0, r).some((e) => e.type === "output"), o;
|
|
13109
13145
|
return o = i ? r === e.length - 2 && !a : r === e.length - 1 && n.value !== "description" && !a, {
|
|
13110
13146
|
...t,
|
|
@@ -13115,7 +13151,7 @@ var op = ap({
|
|
|
13115
13151
|
type: o ? "output" : n.type
|
|
13116
13152
|
}
|
|
13117
13153
|
};
|
|
13118
|
-
}, {}),
|
|
13154
|
+
}, {}), zp = (e, t, n) => Object.keys(t).map((r, i) => {
|
|
13119
13155
|
let a = t[r], o = n[r] || {}, s = Object.keys(a).map((e) => ({
|
|
13120
13156
|
...a[e],
|
|
13121
13157
|
wrapInQuotes: o[e] || !1,
|
|
@@ -13137,7 +13173,7 @@ var op = ap({
|
|
|
13137
13173
|
passThrough: e[i].existingTableData.passThrough,
|
|
13138
13174
|
executionMode: e[i].existingTableData.executionMode
|
|
13139
13175
|
};
|
|
13140
|
-
}),
|
|
13176
|
+
}), Bp = {
|
|
13141
13177
|
input: {
|
|
13142
13178
|
label: "Input",
|
|
13143
13179
|
color: "var(--seal-color-field-input)"
|
|
@@ -13146,7 +13182,7 @@ var op = ap({
|
|
|
13146
13182
|
label: "Output",
|
|
13147
13183
|
color: "var(--seal-color-field-output)"
|
|
13148
13184
|
}
|
|
13149
|
-
},
|
|
13185
|
+
}, Vp = (e) => `step${e}`, Hp = ({ excelData: e, handleSuccess: t, handleCancel: n }) => {
|
|
13150
13186
|
let r = Z(), [i, a] = R(0), o = I(() => e?.map((e) => ({
|
|
13151
13187
|
key: e.id,
|
|
13152
13188
|
title: e.name
|
|
@@ -13166,13 +13202,13 @@ var op = ap({
|
|
|
13166
13202
|
value: e.id === "_description" ? "description" : e.value,
|
|
13167
13203
|
label: e.name,
|
|
13168
13204
|
...e.id !== "_description" && { type: e._type }
|
|
13169
|
-
})), r =
|
|
13205
|
+
})), r = Lp(t, n);
|
|
13170
13206
|
c(r);
|
|
13171
13207
|
let o = r.filter((e) => n.some((t) => t.id === e.id));
|
|
13172
13208
|
if (o.length) {
|
|
13173
|
-
let e =
|
|
13209
|
+
let e = Rp(o);
|
|
13174
13210
|
m((t) => {
|
|
13175
|
-
let n =
|
|
13211
|
+
let n = Vp(i);
|
|
13176
13212
|
return (t || {})[n] ? t : {
|
|
13177
13213
|
...t || {},
|
|
13178
13214
|
[n]: e
|
|
@@ -13262,17 +13298,17 @@ var op = ap({
|
|
|
13262
13298
|
style: { width: "100%" },
|
|
13263
13299
|
placeholder: "select field",
|
|
13264
13300
|
optionLabelProp: "display",
|
|
13265
|
-
value: p?.[
|
|
13301
|
+
value: p?.[Vp(i)]?.[e.id]?.value,
|
|
13266
13302
|
allowClear: !0,
|
|
13267
13303
|
onClear: () => {
|
|
13268
13304
|
m((t) => {
|
|
13269
|
-
let n =
|
|
13305
|
+
let n = Vp(i), r = { ...(t || {})[n] };
|
|
13270
13306
|
return delete r[e.id], {
|
|
13271
13307
|
...t || {},
|
|
13272
13308
|
[n]: r
|
|
13273
13309
|
};
|
|
13274
13310
|
}), f((t) => {
|
|
13275
|
-
let n =
|
|
13311
|
+
let n = Vp(i), r = { ...t[n] };
|
|
13276
13312
|
return delete r[e.id], {
|
|
13277
13313
|
...t,
|
|
13278
13314
|
[n]: r
|
|
@@ -13282,7 +13318,7 @@ var op = ap({
|
|
|
13282
13318
|
onSelect: (t, n) => {
|
|
13283
13319
|
let { id: r, label: a, value: o, type: s, wrapInQuotes: c } = n;
|
|
13284
13320
|
m((t) => {
|
|
13285
|
-
let n =
|
|
13321
|
+
let n = Vp(i), l = { ...(t || {})[n] }, u = [];
|
|
13286
13322
|
return Object.keys(l).forEach((t) => {
|
|
13287
13323
|
t !== e.id && (l[t].value === o || l[t].label === a) && (u.push(t), delete l[t]);
|
|
13288
13324
|
}), u.length > 0 && f((e) => {
|
|
@@ -13360,8 +13396,8 @@ var op = ap({
|
|
|
13360
13396
|
alignItems: "center"
|
|
13361
13397
|
},
|
|
13362
13398
|
children: [/* @__PURE__ */ z("span", { children: e.data.label }), t && /* @__PURE__ */ z(Ua, {
|
|
13363
|
-
style: { background:
|
|
13364
|
-
children:
|
|
13399
|
+
style: { background: Bp[t].color },
|
|
13400
|
+
children: Bp[t].label
|
|
13365
13401
|
})]
|
|
13366
13402
|
});
|
|
13367
13403
|
},
|
|
@@ -13382,12 +13418,12 @@ var op = ap({
|
|
|
13382
13418
|
})
|
|
13383
13419
|
}))
|
|
13384
13420
|
}, e.id),
|
|
13385
|
-
p && p?.[
|
|
13386
|
-
disabled: !p?.[
|
|
13387
|
-
value: p[
|
|
13421
|
+
p && p?.[Vp(i)]?.[e.id]?.value !== "description" ? /* @__PURE__ */ B(Ca.Group, {
|
|
13422
|
+
disabled: !p?.[Vp(i)]?.[e.id],
|
|
13423
|
+
value: p[Vp(i)]?.[e.id]?.type ?? "input",
|
|
13388
13424
|
onChange: (t) => {
|
|
13389
13425
|
m((n) => {
|
|
13390
|
-
let r =
|
|
13426
|
+
let r = Vp(i), a = (n || {})[r];
|
|
13391
13427
|
return {
|
|
13392
13428
|
...n || {},
|
|
13393
13429
|
[r]: {
|
|
@@ -13421,17 +13457,17 @@ var op = ap({
|
|
|
13421
13457
|
children: "Output"
|
|
13422
13458
|
})]
|
|
13423
13459
|
}) : /* @__PURE__ */ z("div", {}),
|
|
13424
|
-
p?.[
|
|
13460
|
+
p?.[Vp(i)]?.[e.id]?.value === "description" ? /* @__PURE__ */ z("div", {}) : /* @__PURE__ */ z("div", {
|
|
13425
13461
|
style: {
|
|
13426
13462
|
display: "flex",
|
|
13427
13463
|
justifyContent: "center"
|
|
13428
13464
|
},
|
|
13429
13465
|
children: /* @__PURE__ */ z(Oi, {
|
|
13430
|
-
disabled: !p?.[
|
|
13431
|
-
checked: d[
|
|
13466
|
+
disabled: !p?.[Vp(i)]?.[e.id],
|
|
13467
|
+
checked: d[Vp(i)]?.[e.id] || !1,
|
|
13432
13468
|
onChange: (t) => {
|
|
13433
13469
|
f((n) => {
|
|
13434
|
-
let r =
|
|
13470
|
+
let r = Vp(i);
|
|
13435
13471
|
return {
|
|
13436
13472
|
...n,
|
|
13437
13473
|
[r]: {
|
|
@@ -13451,7 +13487,7 @@ var op = ap({
|
|
|
13451
13487
|
children: [
|
|
13452
13488
|
i < (e || []).length - 1 && /* @__PURE__ */ z(J, {
|
|
13453
13489
|
type: "primary",
|
|
13454
|
-
disabled: !p?.[
|
|
13490
|
+
disabled: !p?.[Vp(i)] || Ln(p[Vp(i)]),
|
|
13455
13491
|
onClick: () => {
|
|
13456
13492
|
a(i + 1);
|
|
13457
13493
|
},
|
|
@@ -13459,9 +13495,9 @@ var op = ap({
|
|
|
13459
13495
|
}),
|
|
13460
13496
|
i === (e || []).length - 1 && /* @__PURE__ */ z(J, {
|
|
13461
13497
|
type: "primary",
|
|
13462
|
-
disabled: !p?.[
|
|
13498
|
+
disabled: !p?.[Vp(i)] || Ln(p[Vp(i)]),
|
|
13463
13499
|
onClick: () => {
|
|
13464
|
-
p && e && t(
|
|
13500
|
+
p && e && t(zp(e, p, d));
|
|
13465
13501
|
},
|
|
13466
13502
|
children: "Done"
|
|
13467
13503
|
}),
|
|
@@ -13476,7 +13512,7 @@ var op = ap({
|
|
|
13476
13512
|
})
|
|
13477
13513
|
]
|
|
13478
13514
|
});
|
|
13479
|
-
},
|
|
13515
|
+
}, Up = "application/vnd.gorules.decision", Wp = () => {
|
|
13480
13516
|
let e = Z(), t = Qu(), n = L(null), r = L(null), [i, a] = R(), { setDecisionGraph: o, setActivePanel: s, autoLayout: c } = Zu(), { disabled: l, panels: u, activePanel: d, viewConfig: f } = $(({ disabled: e, panels: t, activePanel: n, viewConfig: r }) => ({
|
|
13481
13517
|
disabled: e,
|
|
13482
13518
|
panels: t,
|
|
@@ -13487,7 +13523,7 @@ var op = ap({
|
|
|
13487
13523
|
n.onload = function(e) {
|
|
13488
13524
|
try {
|
|
13489
13525
|
let t = JSON.parse(e?.target?.result);
|
|
13490
|
-
if (t?.contentType !==
|
|
13526
|
+
if (t?.contentType !== Up) throw Error("Invalid content type");
|
|
13491
13527
|
let n = Array.isArray(t?.nodes) ? t.nodes : [], r = n.map((e) => e.id), i = t.edges.filter((e) => r.includes(e?.targetId) && r.includes(e?.sourceId)), a = ae.safeParse({
|
|
13492
13528
|
nodes: n,
|
|
13493
13529
|
edges: i,
|
|
@@ -13579,7 +13615,7 @@ var op = ap({
|
|
|
13579
13615
|
}, g = async () => {
|
|
13580
13616
|
try {
|
|
13581
13617
|
let { name: e, decisionGraph: n } = t.stateStore.getState(), r = `${e.replaceAll(".json", "")}.json`, i = JSON.stringify({
|
|
13582
|
-
contentType:
|
|
13618
|
+
contentType: Up,
|
|
13583
13619
|
nodes: n.nodes,
|
|
13584
13620
|
edges: n.edges
|
|
13585
13621
|
}, null, 2), a = new Blob([i], { type: "application/json" }), o = URL.createObjectURL(a), s = window.document.createElement("a");
|
|
@@ -13699,14 +13735,14 @@ var op = ap({
|
|
|
13699
13735
|
})]
|
|
13700
13736
|
})
|
|
13701
13737
|
]
|
|
13702
|
-
}), /* @__PURE__ */ z(
|
|
13738
|
+
}), /* @__PURE__ */ z(Hp, {
|
|
13703
13739
|
excelData: i,
|
|
13704
13740
|
handleSuccess: h,
|
|
13705
13741
|
handleCancel: () => {
|
|
13706
13742
|
a(null);
|
|
13707
13743
|
}
|
|
13708
13744
|
})] });
|
|
13709
|
-
},
|
|
13745
|
+
}, Gp = ({ disabled: e, tabBarExtraContent: t }) => {
|
|
13710
13746
|
let n = Zu(), { openNodes: r, activeNodeId: i, viewConfig: a } = $(({ decisionGraph: e, activeTab: t, openTabs: n, viewConfig: r }) => ({
|
|
13711
13747
|
activeNodeId: (e?.nodes ?? []).find((e) => e.id === t)?.id,
|
|
13712
13748
|
openNodes: (n || []).map((t) => {
|
|
@@ -13721,7 +13757,7 @@ var op = ap({
|
|
|
13721
13757
|
viewConfig: r
|
|
13722
13758
|
})), o = I(() => [{
|
|
13723
13759
|
key: "graph",
|
|
13724
|
-
label: /* @__PURE__ */ z(
|
|
13760
|
+
label: /* @__PURE__ */ z(Kp, {
|
|
13725
13761
|
total: r?.length,
|
|
13726
13762
|
icon: a?.enabled ? /* @__PURE__ */ z(Et, {}) : /* @__PURE__ */ z(xt, {}),
|
|
13727
13763
|
name: a?.enabled ? "Nodes" : "Graph",
|
|
@@ -13740,11 +13776,11 @@ var op = ap({
|
|
|
13740
13776
|
onChange: (e) => n.openTab(e),
|
|
13741
13777
|
tabBarExtraContent: t,
|
|
13742
13778
|
items: [...o, ...r.map((t, a) => {
|
|
13743
|
-
let o =
|
|
13779
|
+
let o = sp[t.type];
|
|
13744
13780
|
return {
|
|
13745
13781
|
disabled: e,
|
|
13746
13782
|
key: t.id,
|
|
13747
|
-
label: /* @__PURE__ */ z(
|
|
13783
|
+
label: /* @__PURE__ */ z(Kp, {
|
|
13748
13784
|
onContextClick: (e) => {
|
|
13749
13785
|
n.closeTab(t.id, e);
|
|
13750
13786
|
},
|
|
@@ -13760,7 +13796,7 @@ var op = ap({
|
|
|
13760
13796
|
};
|
|
13761
13797
|
})]
|
|
13762
13798
|
}) });
|
|
13763
|
-
},
|
|
13799
|
+
}, Kp = ({ total: e = 0, index: t = -1, icon: n, name: r, active: i, diffStatus: a, color: o = Td.Blue, onClose: s, onContextClick: c }) => {
|
|
13764
13800
|
let l = Z(), u = [
|
|
13765
13801
|
e > 0 && t !== -1 && {
|
|
13766
13802
|
key: "close",
|
|
@@ -13832,17 +13868,17 @@ var op = ap({
|
|
|
13832
13868
|
trigger: ["contextMenu"],
|
|
13833
13869
|
children: d
|
|
13834
13870
|
});
|
|
13835
|
-
},
|
|
13871
|
+
}, qp = {}, Jp = (e) => !e || typeof e != "object" || Array.isArray(e) ? qp : e, Yp = (e, t) => ({
|
|
13836
13872
|
...e,
|
|
13837
13873
|
namespace: e?.namespace ?? t,
|
|
13838
|
-
returns:
|
|
13839
|
-
}),
|
|
13874
|
+
returns: Jp(e?.returns)
|
|
13875
|
+
}), Xp = (e) => Array.isArray(e) ? e.flatMap((e) => Array.isArray(e?.tools) ? e.tools.map((t) => Yp(t, e?.name)) : e?.name ? [Yp(e)] : []) : [], Zp = (e) => Jp(e?.returns), Qp = (e) => Array.isArray(e) || typeof e == "string" && e.includes(";;"), $p = (e) => e?.type === "function" || Qp(e?.value), em = (e) => {
|
|
13840
13876
|
if (Array.isArray(e)) return e[0]?.trim() || null;
|
|
13841
13877
|
if (typeof e != "string" || !e.trim()) return null;
|
|
13842
13878
|
let [t] = ku(e);
|
|
13843
13879
|
return t?.trim() || null;
|
|
13844
|
-
},
|
|
13845
|
-
let n = Array.isArray(t) ? t.filter(Boolean) : [], r =
|
|
13880
|
+
}, tm = (e, t) => {
|
|
13881
|
+
let n = Array.isArray(t) ? t.filter(Boolean) : [], r = Xp(n);
|
|
13846
13882
|
if (!e) return {
|
|
13847
13883
|
mode: "free",
|
|
13848
13884
|
functions: r
|
|
@@ -13854,47 +13890,47 @@ var op = ap({
|
|
|
13854
13890
|
let i = n.find((t) => t?.name === e);
|
|
13855
13891
|
return i ? {
|
|
13856
13892
|
mode: "scoped",
|
|
13857
|
-
functions:
|
|
13893
|
+
functions: Xp([i])
|
|
13858
13894
|
} : {
|
|
13859
13895
|
mode: "free",
|
|
13860
13896
|
functions: r
|
|
13861
13897
|
};
|
|
13862
|
-
},
|
|
13898
|
+
}, nm = (e) => {
|
|
13863
13899
|
let t = e?.parameters?.properties ?? {}, n = {}, r = Object.keys(t).map((e) => (n[e] = t[e]?.default ?? "", n[e]));
|
|
13864
13900
|
return {
|
|
13865
13901
|
type: "function",
|
|
13866
13902
|
value: [e?.name ?? "", ...r],
|
|
13867
13903
|
funcmeta: e,
|
|
13868
13904
|
arg_exprs: n,
|
|
13869
|
-
returnSchema:
|
|
13905
|
+
returnSchema: Zp(e)
|
|
13870
13906
|
};
|
|
13871
|
-
},
|
|
13907
|
+
}, rm = (e, t) => {
|
|
13872
13908
|
if (!t || t.mode !== "scoped" || !Array.isArray(e)) return null;
|
|
13873
13909
|
let [n] = t.functions;
|
|
13874
13910
|
if (!n?.name) return null;
|
|
13875
13911
|
let r = t.functions.map((e) => e?.name).filter(Boolean), i = !1, a = e.map((e) => {
|
|
13876
|
-
if (
|
|
13877
|
-
let t =
|
|
13912
|
+
if (!$p(e)) return e;
|
|
13913
|
+
let t = em(e.value);
|
|
13878
13914
|
return !t || r.includes(t) ? e : (i = !0, {
|
|
13879
13915
|
...e,
|
|
13880
|
-
...
|
|
13916
|
+
...nm(n)
|
|
13881
13917
|
});
|
|
13882
13918
|
});
|
|
13883
13919
|
return i ? a : null;
|
|
13884
|
-
},
|
|
13920
|
+
}, im = N.createContext({}), am = (e = {}) => ({
|
|
13885
13921
|
id: crypto.randomUUID(),
|
|
13886
13922
|
key: "",
|
|
13887
13923
|
value: "",
|
|
13888
13924
|
...e
|
|
13889
|
-
}),
|
|
13925
|
+
}), om = ({ children: e }) => {
|
|
13890
13926
|
let t = I(() => hn((e, t) => ({
|
|
13891
13927
|
disabled: !1,
|
|
13892
13928
|
debugIndex: 0,
|
|
13893
13929
|
addRowAbove: (t = 0) => {
|
|
13894
|
-
e(U((e) => (e.expressions.splice(t, 0,
|
|
13930
|
+
e(U((e) => (e.expressions.splice(t, 0, am()), e)));
|
|
13895
13931
|
},
|
|
13896
13932
|
addRowBelow: (t) => {
|
|
13897
|
-
e(U((e) => (t ??= e.expressions.length - 1, e.expressions.splice(t + 1, 0,
|
|
13933
|
+
e(U((e) => (t ??= e.expressions.length - 1, e.expressions.splice(t + 1, 0, am()), e)));
|
|
13898
13934
|
},
|
|
13899
13935
|
expressions: [],
|
|
13900
13936
|
setExpressions: (t) => {
|
|
@@ -13919,16 +13955,16 @@ var op = ap({
|
|
|
13919
13955
|
}, e)));
|
|
13920
13956
|
}
|
|
13921
13957
|
})), []);
|
|
13922
|
-
return /* @__PURE__ */ z(
|
|
13958
|
+
return /* @__PURE__ */ z(im.Provider, {
|
|
13923
13959
|
value: t,
|
|
13924
13960
|
children: e
|
|
13925
13961
|
});
|
|
13926
13962
|
};
|
|
13927
|
-
function
|
|
13928
|
-
return gn(N.useContext(
|
|
13963
|
+
function sm(e, t = es.default) {
|
|
13964
|
+
return gn(N.useContext(im), ts(e, t));
|
|
13929
13965
|
}
|
|
13930
|
-
var
|
|
13931
|
-
let e = Z(), t =
|
|
13966
|
+
var cm = () => N.useContext(im), lm = () => {
|
|
13967
|
+
let e = Z(), t = cm(), { debugIndex: n, traceCount: r } = sm(({ debug: e, debugIndex: t }) => ({
|
|
13932
13968
|
debugIndex: t,
|
|
13933
13969
|
traceCount: G(e?.trace?.traceData).with(W.array(), (e) => e.length).otherwise(() => null)
|
|
13934
13970
|
})), i = I(() => r ? Array.from({ length: r }).map((e, t) => ({
|
|
@@ -13963,8 +13999,8 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
13963
13999
|
})]
|
|
13964
14000
|
})]
|
|
13965
14001
|
}) : null;
|
|
13966
|
-
},
|
|
13967
|
-
let o = L(!1), s =
|
|
14002
|
+
}, um = ({ value: e, onChange: t, defaultValue: n = [], disabled: r = !1, permission: i = "edit:full", functionScope: a }) => {
|
|
14003
|
+
let o = L(!1), s = cm(), { setExpressions: c, expressions: l } = sm(({ setExpressions: e, expressions: t }) => ({
|
|
13968
14004
|
setExpressions: e,
|
|
13969
14005
|
expressions: t
|
|
13970
14006
|
}));
|
|
@@ -13981,39 +14017,39 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
13981
14017
|
o.current && e && !(0, es.default)(e, l) && c(e);
|
|
13982
14018
|
}, [e]), F(() => {
|
|
13983
14019
|
if (e) {
|
|
13984
|
-
let t =
|
|
14020
|
+
let t = rm(e, a);
|
|
13985
14021
|
c(t ?? e);
|
|
13986
14022
|
} else n && c(n);
|
|
13987
14023
|
o.current = !0;
|
|
13988
14024
|
}, []), null;
|
|
13989
|
-
},
|
|
14025
|
+
}, dm = (e) => Array.isArray(e.type) ? e.type.find((e) => e !== "null") ?? e.type[0] : e.type, fm = (e) => {
|
|
13990
14026
|
if (!e || typeof e != "object") return cn.fromJson("Any");
|
|
13991
|
-
if (Array.isArray(e.oneOf) && e.oneOf.length > 0) return
|
|
13992
|
-
if (Array.isArray(e.anyOf) && e.anyOf.length > 0) return
|
|
13993
|
-
if (Array.isArray(e.allOf) && e.allOf.length > 0) return e.allOf.reduce((e, t) => e.merge(
|
|
13994
|
-
switch (
|
|
14027
|
+
if (Array.isArray(e.oneOf) && e.oneOf.length > 0) return fm(e.oneOf[0]);
|
|
14028
|
+
if (Array.isArray(e.anyOf) && e.anyOf.length > 0) return fm(e.anyOf[0]);
|
|
14029
|
+
if (Array.isArray(e.allOf) && e.allOf.length > 0) return e.allOf.reduce((e, t) => e.merge(fm(t)), cn.fromJson({ Object: {} }));
|
|
14030
|
+
switch (dm(e)) {
|
|
13995
14031
|
case "object": {
|
|
13996
14032
|
let t = cn.fromJson({ Object: {} });
|
|
13997
14033
|
return Object.entries(e.properties ?? {}).forEach(([e, n]) => {
|
|
13998
|
-
t.set(e,
|
|
14034
|
+
t.set(e, fm(n));
|
|
13999
14035
|
}), t;
|
|
14000
14036
|
}
|
|
14001
|
-
case "array": return
|
|
14037
|
+
case "array": return fm(Array.isArray(e.items) ? e.items[0] : e.items).toArray();
|
|
14002
14038
|
case "string": return cn.fromJson("String");
|
|
14003
14039
|
case "boolean": return cn.fromJson("Bool");
|
|
14004
14040
|
case "number":
|
|
14005
14041
|
case "integer": return cn.fromJson("Number");
|
|
14006
14042
|
case "null": return cn.fromJson("Null");
|
|
14007
|
-
default: return e.properties ?
|
|
14043
|
+
default: return e.properties ? fm({
|
|
14008
14044
|
...e,
|
|
14009
14045
|
type: "object"
|
|
14010
|
-
}) : e.items ?
|
|
14046
|
+
}) : e.items ? fm({
|
|
14011
14047
|
...e,
|
|
14012
14048
|
type: "array"
|
|
14013
14049
|
}) : e.nullable ? cn.fromJson("Null") : cn.fromJson("Any");
|
|
14014
14050
|
}
|
|
14015
|
-
},
|
|
14016
|
-
let n = Z(), { addRowAbove: r, addRowBelow: i, disabled: a } =
|
|
14051
|
+
}, pm = ({ index: e, children: t }) => {
|
|
14052
|
+
let n = Z(), { addRowAbove: r, addRowBelow: i, disabled: a } = sm(({ addRowBelow: e, addRowAbove: t, disabled: n }) => ({
|
|
14017
14053
|
addRowBelow: e,
|
|
14018
14054
|
addRowAbove: t,
|
|
14019
14055
|
disabled: n
|
|
@@ -14039,8 +14075,8 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14039
14075
|
}] },
|
|
14040
14076
|
children: t
|
|
14041
14077
|
});
|
|
14042
|
-
},
|
|
14043
|
-
let a = Z(), [o, s] = R(!1), [c, l] = R("function"), u = L(null), d = i?.mode ?? "free", f = I(() =>
|
|
14078
|
+
}, mm = qp, hm = ({ expression: e, index: t, variableType: n, customFunctions: r, functionScope: i }) => {
|
|
14079
|
+
let a = Z(), [o, s] = R(!1), [c, l] = R("function"), u = L(null), d = i?.mode ?? "free", f = I(() => Xp(r), [r]), p = I(() => d === "scoped" ? i?.functions ?? [] : f, [
|
|
14044
14080
|
d,
|
|
14045
14081
|
i,
|
|
14046
14082
|
f
|
|
@@ -14055,7 +14091,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14055
14091
|
if (r.length === i) return r;
|
|
14056
14092
|
let a = n.split(";;");
|
|
14057
14093
|
return a.length === i ? a : r.length < i && a.length > i ? [...a.slice(0, i - 1), a.slice(i - 1).join(";;")] : r;
|
|
14058
|
-
}, y = (t, n = e.returnSchema ??
|
|
14094
|
+
}, y = (t, n = e.returnSchema ?? mm) => {
|
|
14059
14095
|
if (!t || typeof t == "string" && !t.trim()) return null;
|
|
14060
14096
|
let r = Au(t), i = r[0], a = f.find((e) => e.name === i);
|
|
14061
14097
|
if (!a) {
|
|
@@ -14075,7 +14111,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14075
14111
|
type: "object",
|
|
14076
14112
|
title: i
|
|
14077
14113
|
},
|
|
14078
|
-
returns:
|
|
14114
|
+
returns: Jp(n)
|
|
14079
14115
|
},
|
|
14080
14116
|
arg_exprs: e.reduce((e, t, n) => (e[`arg${n}`] = t, e), {})
|
|
14081
14117
|
};
|
|
@@ -14093,10 +14129,10 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14093
14129
|
arg_exprs: o
|
|
14094
14130
|
};
|
|
14095
14131
|
}, b = I(() => {
|
|
14096
|
-
if (
|
|
14132
|
+
if (!$p(e)) return null;
|
|
14097
14133
|
if (e.funcmeta) {
|
|
14098
14134
|
if (e.funcmeta.parameters?.properties) {
|
|
14099
|
-
let t = {}, n = e.funcmeta.parameters.properties, r = y(e.value, e.returnSchema ??
|
|
14135
|
+
let t = {}, n = e.funcmeta.parameters.properties, r = y(e.value, e.returnSchema ?? mm);
|
|
14100
14136
|
return Object.keys(n).forEach((i) => {
|
|
14101
14137
|
let a = r?.arg_exprs?.[i];
|
|
14102
14138
|
if (a != null) {
|
|
@@ -14115,14 +14151,14 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14115
14151
|
arg_exprs: e.arg_exprs || {}
|
|
14116
14152
|
};
|
|
14117
14153
|
}
|
|
14118
|
-
return y(e.value, e.returnSchema ??
|
|
14154
|
+
return y(e.value, e.returnSchema ?? mm);
|
|
14119
14155
|
}, [
|
|
14120
14156
|
e.type,
|
|
14121
14157
|
e.funcmeta,
|
|
14122
14158
|
e.arg_exprs,
|
|
14123
14159
|
e.value,
|
|
14124
14160
|
f
|
|
14125
|
-
]), { updateRow: x, removeRow: S, disabled: C, permission: w, configurable: T } =
|
|
14161
|
+
]), { updateRow: x, removeRow: S, disabled: C, permission: w, configurable: T } = sm(({ updateRow: e, removeRow: t, disabled: n, permission: r, configurable: i }) => ({
|
|
14126
14162
|
updateRow: e,
|
|
14127
14163
|
removeRow: t,
|
|
14128
14164
|
disabled: n,
|
|
@@ -14130,10 +14166,10 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14130
14166
|
configurable: i ?? r === "edit:full"
|
|
14131
14167
|
}));
|
|
14132
14168
|
F(() => {
|
|
14133
|
-
|
|
14169
|
+
$p(e) && b?.funcmeta && l("function");
|
|
14134
14170
|
}, [e.type, e.value]), F(() => {
|
|
14135
|
-
if (
|
|
14136
|
-
let n =
|
|
14171
|
+
if (!$p(e) || !b?.funcmeta) return;
|
|
14172
|
+
let n = Zp(b.funcmeta);
|
|
14137
14173
|
(0, es.default)(e.returnSchema, n) || x(t, {
|
|
14138
14174
|
type: "function",
|
|
14139
14175
|
returnSchema: n
|
|
@@ -14160,7 +14196,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14160
14196
|
}), E({
|
|
14161
14197
|
value: D(n, i),
|
|
14162
14198
|
type: "function",
|
|
14163
|
-
returnSchema:
|
|
14199
|
+
returnSchema: Zp(n),
|
|
14164
14200
|
funcmeta: n,
|
|
14165
14201
|
arg_exprs: i
|
|
14166
14202
|
});
|
|
@@ -14204,7 +14240,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14204
14240
|
}),
|
|
14205
14241
|
/* @__PURE__ */ z("div", {
|
|
14206
14242
|
className: "expression-list-item__key",
|
|
14207
|
-
children: /* @__PURE__ */ z(
|
|
14243
|
+
children: /* @__PURE__ */ z(pm, {
|
|
14208
14244
|
index: t,
|
|
14209
14245
|
children: /* @__PURE__ */ z(eu, {
|
|
14210
14246
|
noStyle: !0,
|
|
@@ -14285,7 +14321,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14285
14321
|
})
|
|
14286
14322
|
})
|
|
14287
14323
|
}),
|
|
14288
|
-
/* @__PURE__ */ z(
|
|
14324
|
+
/* @__PURE__ */ z(_m, {
|
|
14289
14325
|
expression: e,
|
|
14290
14326
|
placement: "inline"
|
|
14291
14327
|
})
|
|
@@ -14294,7 +14330,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14294
14330
|
}] : [], {
|
|
14295
14331
|
key: "code",
|
|
14296
14332
|
label: a("cf.code"),
|
|
14297
|
-
children: /* @__PURE__ */ z(
|
|
14333
|
+
children: /* @__PURE__ */ z(pm, {
|
|
14298
14334
|
index: t,
|
|
14299
14335
|
children: /* @__PURE__ */ B("div", {
|
|
14300
14336
|
className: "code-mode-container",
|
|
@@ -14314,7 +14350,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14314
14350
|
onBlur: () => s(!1),
|
|
14315
14351
|
noStyle: !0
|
|
14316
14352
|
})
|
|
14317
|
-
}), /* @__PURE__ */ z(
|
|
14353
|
+
}), /* @__PURE__ */ z(_m, {
|
|
14318
14354
|
expression: e,
|
|
14319
14355
|
placement: "inline"
|
|
14320
14356
|
})]
|
|
@@ -14329,15 +14365,15 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14329
14365
|
iconOnly: !0,
|
|
14330
14366
|
disabled: w !== "edit:full" || C,
|
|
14331
14367
|
onConfirm: ee
|
|
14332
|
-
}), o && /* @__PURE__ */ z(
|
|
14368
|
+
}), o && /* @__PURE__ */ z(gm, {
|
|
14333
14369
|
id: e.id,
|
|
14334
14370
|
value: e.value
|
|
14335
14371
|
})]
|
|
14336
14372
|
})
|
|
14337
14373
|
]
|
|
14338
14374
|
});
|
|
14339
|
-
},
|
|
14340
|
-
let { inputData: n, initial: r } =
|
|
14375
|
+
}, gm = N.memo(({ id: e, value: t }) => {
|
|
14376
|
+
let { inputData: n, initial: r } = sm(({ debug: t, debugIndex: n, calculatedInputData: r }) => {
|
|
14341
14377
|
let i = (t?.snapshot?.expressions ?? []).find((t) => t.id === e), a = i?.key ? Rd(t?.trace.traceData, n)?.[i.key] : void 0;
|
|
14342
14378
|
return {
|
|
14343
14379
|
inputData: r,
|
|
@@ -14355,15 +14391,15 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14355
14391
|
initial: r
|
|
14356
14392
|
})
|
|
14357
14393
|
});
|
|
14358
|
-
}),
|
|
14359
|
-
let { trace: n } =
|
|
14394
|
+
}), _m = ({ expression: e, placement: t = "floating" }) => {
|
|
14395
|
+
let { trace: n } = sm(({ debug: t, debugIndex: n }) => ({ trace: vm({
|
|
14360
14396
|
traceData: Rd(t?.trace?.traceData, n),
|
|
14361
14397
|
output: Rd(t?.trace?.output, n),
|
|
14362
14398
|
outputPath: t?.snapshot?.outputPath,
|
|
14363
14399
|
key: e.key
|
|
14364
14400
|
}) }));
|
|
14365
14401
|
if (n === void 0) return null;
|
|
14366
|
-
let r =
|
|
14402
|
+
let r = Sm(n);
|
|
14367
14403
|
return /* @__PURE__ */ z("div", {
|
|
14368
14404
|
className: H("expression-list-item__resultOverlay", t === "inline" && "expression-list-item__resultOverlay--inline"),
|
|
14369
14405
|
children: /* @__PURE__ */ B(X.Text, {
|
|
@@ -14378,20 +14414,20 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14378
14414
|
children: ["= ", r]
|
|
14379
14415
|
})
|
|
14380
14416
|
});
|
|
14381
|
-
},
|
|
14417
|
+
}, vm = ({ traceData: e, output: t, outputPath: n, key: r }) => {
|
|
14382
14418
|
if (!r) return;
|
|
14383
|
-
let i =
|
|
14384
|
-
if (
|
|
14419
|
+
let i = ym(e, r);
|
|
14420
|
+
if (xm(i) && Object.prototype.hasOwnProperty.call(i, "result")) return i.result;
|
|
14385
14421
|
if (i !== void 0) return i;
|
|
14386
|
-
let a =
|
|
14387
|
-
return a === void 0 ?
|
|
14388
|
-
},
|
|
14389
|
-
if (
|
|
14390
|
-
},
|
|
14422
|
+
let a = ym(n ? bm(t, n) : t, r);
|
|
14423
|
+
return a === void 0 ? ym(t, r) : a;
|
|
14424
|
+
}, ym = (e, t) => {
|
|
14425
|
+
if (xm(e) && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
14426
|
+
}, bm = (e, t) => t.split(".").reduce((e, t) => ym(e, t), e), xm = (e) => !!e && typeof e == "object" && !Array.isArray(e), Sm = (e) => {
|
|
14391
14427
|
let t = JSON.stringify(e);
|
|
14392
14428
|
return t === void 0 ? String(e) : t;
|
|
14393
|
-
},
|
|
14394
|
-
let n = Z(), r = t?.mode ?? "free", { expressions: i, addRowBelow: a, permission: o, disabled: s, inputVariableType: c } =
|
|
14429
|
+
}, Cm = {}, wm = ({ customFunctions: e, functionScope: t }) => {
|
|
14430
|
+
let n = Z(), r = t?.mode ?? "free", { expressions: i, addRowBelow: a, permission: o, disabled: s, inputVariableType: c } = sm(({ expressions: e, addRowBelow: t, permission: n, disabled: r, inputVariableType: i }) => ({
|
|
14395
14431
|
expressions: e,
|
|
14396
14432
|
addRowBelow: t,
|
|
14397
14433
|
permission: n,
|
|
@@ -14402,7 +14438,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14402
14438
|
if (!no() || !c) return;
|
|
14403
14439
|
let e = c.clone();
|
|
14404
14440
|
i.filter((e) => e.key.length > 0).forEach((t) => {
|
|
14405
|
-
let n = t.type === "function" ||
|
|
14441
|
+
let n = t.type === "function" || Qp(t.value) ? fm(t.returnSchema ?? Cm) : e.calculateType(Array.isArray(t.value) ? t.value.join(";;") : t.value);
|
|
14406
14442
|
e.set(`$.${t.key}`, n);
|
|
14407
14443
|
}), u(e);
|
|
14408
14444
|
}, [i, c]), /* @__PURE__ */ B(Me, { children: [/* @__PURE__ */ z("div", {
|
|
@@ -14429,7 +14465,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14429
14465
|
children: r === "legacy" && /* @__PURE__ */ z(Ua, { children: n("cf.legacy") })
|
|
14430
14466
|
})
|
|
14431
14467
|
]
|
|
14432
|
-
}), (i || []).map((n, r) => /* @__PURE__ */ z(
|
|
14468
|
+
}), (i || []).map((n, r) => /* @__PURE__ */ z(hm, {
|
|
14433
14469
|
expression: n,
|
|
14434
14470
|
index: r,
|
|
14435
14471
|
variableType: l,
|
|
@@ -14447,28 +14483,28 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14447
14483
|
children: n("cf.addRow")
|
|
14448
14484
|
})
|
|
14449
14485
|
})] });
|
|
14450
|
-
},
|
|
14486
|
+
}, Tm = ({ customFunctions: e, debug: t, hideCommandBar: n, inputVariableType: r, functionScope: i, ...a }) => {
|
|
14451
14487
|
let o = xe(be(he, { activationConstraint: { distance: 4 } }), be(pe, { coordinateGetter: Lr }));
|
|
14452
|
-
return /* @__PURE__ */ z(
|
|
14488
|
+
return /* @__PURE__ */ z(om, { children: /* @__PURE__ */ B(Em, {
|
|
14453
14489
|
sensors: o,
|
|
14454
14490
|
children: [
|
|
14455
|
-
/* @__PURE__ */ z(
|
|
14491
|
+
/* @__PURE__ */ z(um, {
|
|
14456
14492
|
...a,
|
|
14457
14493
|
functionScope: i
|
|
14458
14494
|
}),
|
|
14459
|
-
!n && /* @__PURE__ */ z(
|
|
14460
|
-
/* @__PURE__ */ z(
|
|
14495
|
+
!n && /* @__PURE__ */ z(lm, {}),
|
|
14496
|
+
/* @__PURE__ */ z(wm, {
|
|
14461
14497
|
customFunctions: e,
|
|
14462
14498
|
functionScope: i
|
|
14463
14499
|
}),
|
|
14464
|
-
/* @__PURE__ */ z(
|
|
14500
|
+
/* @__PURE__ */ z(Dm, {
|
|
14465
14501
|
debug: t,
|
|
14466
14502
|
inputVariableType: r
|
|
14467
14503
|
})
|
|
14468
14504
|
]
|
|
14469
14505
|
}) });
|
|
14470
|
-
},
|
|
14471
|
-
let n =
|
|
14506
|
+
}, Em = ({ sensors: e, children: t }) => {
|
|
14507
|
+
let n = cm(), r = ({ active: e, over: t }) => {
|
|
14472
14508
|
if (!t) return;
|
|
14473
14509
|
let r = e.data.current?.index, i = t.data.current?.index;
|
|
14474
14510
|
r !== void 0 && i !== void 0 && r !== i && n.getState().moveRows(r, i);
|
|
@@ -14481,8 +14517,8 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14481
14517
|
onDragEnd: r,
|
|
14482
14518
|
children: t
|
|
14483
14519
|
});
|
|
14484
|
-
},
|
|
14485
|
-
let n = e, r =
|
|
14520
|
+
}, Dm = ({ debug: e, inputVariableType: t }) => {
|
|
14521
|
+
let n = e, r = cm();
|
|
14486
14522
|
return F(() => {
|
|
14487
14523
|
r.setState({ inputVariableType: t });
|
|
14488
14524
|
}, [t]), F(() => {
|
|
@@ -14512,7 +14548,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14512
14548
|
(e.debugIndex !== n.debugIndex || e.debug !== n.debug) && t(e);
|
|
14513
14549
|
});
|
|
14514
14550
|
}, []), null;
|
|
14515
|
-
},
|
|
14551
|
+
}, Om = ({ id: e, user: t, customFunctions: n }) => {
|
|
14516
14552
|
let r = Zu(), i = cd(e, { attachGlobals: !1 }), { disabled: a, content: o, globalType: s } = $(({ disabled: t, decisionGraph: n, globalType: r }) => ({
|
|
14517
14553
|
disabled: t,
|
|
14518
14554
|
content: (n?.nodes ?? []).find((t) => t.id === e)?.content,
|
|
@@ -14525,7 +14561,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14525
14561
|
})).otherwise(() => null),
|
|
14526
14562
|
nodeSnapshot: G(t).with({ result: W.nonNullable }, ({ result: t }) => t.snapshot?.nodes?.find((t) => t.id === e)?.content).otherwise(() => null),
|
|
14527
14563
|
viewConfig: r
|
|
14528
|
-
})), f = I(() =>
|
|
14564
|
+
})), f = I(() => tm(o?.kind, n), [o?.kind, n]), p = I(() => {
|
|
14529
14565
|
if (!i) return;
|
|
14530
14566
|
let e = i.clone();
|
|
14531
14567
|
return o?.config?.inputField && (e = e.calculateType(o.config.inputField)), o?.config?.executionMode === "loop" && (e = e.arrayItem()), Object.entries(s ?? {}).forEach(([t, n]) => e.set(t, n)), e;
|
|
@@ -14540,7 +14576,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14540
14576
|
trace: c,
|
|
14541
14577
|
snapshot: u.config
|
|
14542
14578
|
};
|
|
14543
|
-
let e = Object.fromEntries(Object.entries(c.traceData || {}).map(([e, t]) => [e,
|
|
14579
|
+
let e = Object.fromEntries(Object.entries(c.traceData || {}).map(([e, t]) => [e, km(t.result)])), t = {
|
|
14544
14580
|
...l,
|
|
14545
14581
|
$: e
|
|
14546
14582
|
};
|
|
@@ -14560,7 +14596,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14560
14596
|
overflowY: "auto",
|
|
14561
14597
|
boxSizing: "border-box"
|
|
14562
14598
|
},
|
|
14563
|
-
children: /* @__PURE__ */ z(
|
|
14599
|
+
children: /* @__PURE__ */ z(Tm, {
|
|
14564
14600
|
value: o?.config?.expressions,
|
|
14565
14601
|
disabled: a,
|
|
14566
14602
|
permission: d?.enabled ? d?.permissions?.[e] : "edit:full",
|
|
@@ -14580,13 +14616,13 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14580
14616
|
}
|
|
14581
14617
|
})
|
|
14582
14618
|
});
|
|
14583
|
-
},
|
|
14619
|
+
}, km = (e) => {
|
|
14584
14620
|
try {
|
|
14585
14621
|
return JSON.parse(e);
|
|
14586
14622
|
} catch {
|
|
14587
14623
|
return null;
|
|
14588
14624
|
}
|
|
14589
|
-
},
|
|
14625
|
+
}, Am = (e) => {
|
|
14590
14626
|
let t = [];
|
|
14591
14627
|
for (let n of e) {
|
|
14592
14628
|
let e = n.group ?? "", r = t.find((t) => t.group === e);
|
|
@@ -14599,10 +14635,10 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14599
14635
|
item: e,
|
|
14600
14636
|
index: t
|
|
14601
14637
|
})).sort((e, t) => (e.item.order ?? 0) - (t.item.order ?? 0) || e.index - t.index).map(({ item: e }) => e));
|
|
14602
|
-
},
|
|
14638
|
+
}, jm = ({ item: e, disabled: t }) => /* @__PURE__ */ z(Me, { children: e.render({ disabled: t }) }), Mm = ({ items: e }) => {
|
|
14603
14639
|
let { disabled: t = !1 } = $(({ disabled: e }) => ({ disabled: e }));
|
|
14604
14640
|
if (!e || e.length === 0) return null;
|
|
14605
|
-
let n =
|
|
14641
|
+
let n = Am(e), r = [];
|
|
14606
14642
|
for (let e of n) r.includes(e.group ?? "") || r.push(e.group ?? "");
|
|
14607
14643
|
return /* @__PURE__ */ z("div", {
|
|
14608
14644
|
"aria-label": "toolbar-items",
|
|
@@ -14613,13 +14649,13 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14613
14649
|
}), n.filter((t) => (t.group ?? "") === e).map((e) => /* @__PURE__ */ z(Xo, {
|
|
14614
14650
|
fallback: null,
|
|
14615
14651
|
onError: (t) => console.error(`[seal-editor] toolbar item "${e.id}" crashed:`, t),
|
|
14616
|
-
children: /* @__PURE__ */ z(
|
|
14652
|
+
children: /* @__PURE__ */ z(jm, {
|
|
14617
14653
|
item: e,
|
|
14618
14654
|
disabled: t
|
|
14619
14655
|
})
|
|
14620
14656
|
}, e.id))] }, e || `__anonymous_${r}`))
|
|
14621
14657
|
});
|
|
14622
|
-
},
|
|
14658
|
+
}, Nm = ({ userResolver: e }) => {
|
|
14623
14659
|
let { stateStore: t } = Qu();
|
|
14624
14660
|
return F(() => {
|
|
14625
14661
|
if (!e) return;
|
|
@@ -14635,35 +14671,35 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14635
14671
|
n = !0;
|
|
14636
14672
|
};
|
|
14637
14673
|
}, [e]), null;
|
|
14638
|
-
},
|
|
14674
|
+
}, Pm = N.memo(Ee(function({ reactFlowProOptions: e, tabBarExtraContent: t, toolbarItems: n, userResolver: r, customFunctions: i }, a) {
|
|
14639
14675
|
let [o, s] = R(!1), { hasActiveNode: c, viewConfig: l, hideLeftToolbar: u } = $(({ decisionGraph: e, activeTab: t, viewConfig: n, hideLeftToolbar: r }) => ({
|
|
14640
14676
|
hasActiveNode: (e?.nodes ?? []).some((e) => e.id === t),
|
|
14641
14677
|
viewConfig: n,
|
|
14642
14678
|
hideLeftToolbar: r
|
|
14643
|
-
})), d = n && n.length > 0 ? /* @__PURE__ */ B(Me, { children: [t, /* @__PURE__ */ z(
|
|
14679
|
+
})), d = n && n.length > 0 ? /* @__PURE__ */ B(Me, { children: [t, /* @__PURE__ */ z(Mm, { items: n })] }) : t;
|
|
14644
14680
|
return /* @__PURE__ */ B(Me, { children: [
|
|
14645
|
-
/* @__PURE__ */ z(
|
|
14646
|
-
!u && /* @__PURE__ */ z(
|
|
14681
|
+
/* @__PURE__ */ z(Nm, { userResolver: r }),
|
|
14682
|
+
!u && /* @__PURE__ */ z(Wp, {}),
|
|
14647
14683
|
/* @__PURE__ */ B("div", {
|
|
14648
14684
|
className: "[grid-area:graph] flex flex-1 flex-col gap-1 overflow-hidden bg-white",
|
|
14649
14685
|
children: [
|
|
14650
|
-
/* @__PURE__ */ z(
|
|
14686
|
+
/* @__PURE__ */ z(Gp, {
|
|
14651
14687
|
disabled: o,
|
|
14652
14688
|
tabBarExtraContent: d
|
|
14653
14689
|
}),
|
|
14654
|
-
/* @__PURE__ */ z(
|
|
14690
|
+
/* @__PURE__ */ z(jp, {
|
|
14655
14691
|
ref: a,
|
|
14656
14692
|
className: H([!c && !l?.enabled && "flex flex-col", c && "hidden"]),
|
|
14657
14693
|
reactFlowProOptions: e,
|
|
14658
14694
|
onDisableTabs: s
|
|
14659
14695
|
}),
|
|
14660
|
-
/* @__PURE__ */ z(
|
|
14661
|
-
/* @__PURE__ */ z(
|
|
14696
|
+
/* @__PURE__ */ z(Pp, { className: H([!c && l?.enabled && "flex flex-col"]) }),
|
|
14697
|
+
/* @__PURE__ */ z(Fm, { customFunctions: i })
|
|
14662
14698
|
]
|
|
14663
14699
|
}),
|
|
14664
|
-
/* @__PURE__ */ z(
|
|
14700
|
+
/* @__PURE__ */ z(hp, {})
|
|
14665
14701
|
] });
|
|
14666
|
-
})),
|
|
14702
|
+
})), Fm = N.memo(({ customFunctions: e }) => {
|
|
14667
14703
|
let { openNodes: t, activeNodeId: n, components: r, user: i, customNodes: a } = $(({ decisionGraph: e, openTabs: t, activeTab: n, components: r, user: i, customNodes: a }) => {
|
|
14668
14704
|
let o = (e?.nodes ?? []).find((e) => e.id === n)?.id;
|
|
14669
14705
|
return {
|
|
@@ -14712,7 +14748,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14712
14748
|
id: t.id,
|
|
14713
14749
|
user: i,
|
|
14714
14750
|
customFunctions: e
|
|
14715
|
-
}) : /* @__PURE__ */ z(
|
|
14751
|
+
}) : /* @__PURE__ */ z(Om, {
|
|
14716
14752
|
id: t.id,
|
|
14717
14753
|
user: i,
|
|
14718
14754
|
customFunctions: e
|
|
@@ -14722,10 +14758,10 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14722
14758
|
})
|
|
14723
14759
|
}, t?.id))
|
|
14724
14760
|
});
|
|
14725
|
-
}),
|
|
14761
|
+
}), Im = Ee(({ reactFlowProOptions: e, tabBarExtraContent: t, toolbarItems: n, userResolver: r, ...i }, a) => /* @__PURE__ */ z(Xo, { children: /* @__PURE__ */ z("div", {
|
|
14726
14762
|
className: H(["seal-dg", i?.hideLeftToolbar && "hidden-left-toolbar"]),
|
|
14727
14763
|
children: /* @__PURE__ */ z(hr, { children: /* @__PURE__ */ z(Ju, { children: /* @__PURE__ */ B(nd, { children: [
|
|
14728
|
-
/* @__PURE__ */ z(
|
|
14764
|
+
/* @__PURE__ */ z(Pm, {
|
|
14729
14765
|
ref: a,
|
|
14730
14766
|
reactFlowProOptions: e,
|
|
14731
14767
|
tabBarExtraContent: t,
|
|
@@ -14733,10 +14769,10 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14733
14769
|
userResolver: r,
|
|
14734
14770
|
customFunctions: i.customFunctions
|
|
14735
14771
|
}),
|
|
14736
|
-
/* @__PURE__ */ z(
|
|
14737
|
-
/* @__PURE__ */ z(
|
|
14772
|
+
/* @__PURE__ */ z(cp, {}),
|
|
14773
|
+
/* @__PURE__ */ z(ep, { ...i })
|
|
14738
14774
|
] }) }) })
|
|
14739
|
-
}) })),
|
|
14775
|
+
}) })), Lm = (e) => ({
|
|
14740
14776
|
kind: e.kind,
|
|
14741
14777
|
icon: e.icon,
|
|
14742
14778
|
color: e.color,
|
|
@@ -14794,7 +14830,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14794
14830
|
})
|
|
14795
14831
|
});
|
|
14796
14832
|
}
|
|
14797
|
-
}),
|
|
14833
|
+
}), Rm = ({ value: e, onChange: t, readOnly: n }) => {
|
|
14798
14834
|
let r = Wo(), i = Z();
|
|
14799
14835
|
return /* @__PURE__ */ z(Er, {
|
|
14800
14836
|
loading: /* @__PURE__ */ z(Na, { size: "large" }),
|
|
@@ -14853,7 +14889,7 @@ var sm = () => N.useContext(rm), cm = () => {
|
|
|
14853
14889
|
};
|
|
14854
14890
|
//#endregion
|
|
14855
14891
|
//#region src/reui/icons/animated/outline/check-circle.tsx
|
|
14856
|
-
function
|
|
14892
|
+
function zm({ className: e }) {
|
|
14857
14893
|
return /* @__PURE__ */ z("svg", {
|
|
14858
14894
|
width: "24",
|
|
14859
14895
|
height: "24",
|
|
@@ -14869,7 +14905,7 @@ function Rm({ className: e }) {
|
|
|
14869
14905
|
}
|
|
14870
14906
|
//#endregion
|
|
14871
14907
|
//#region src/reui/icons/animated/outline/cross-circle.tsx
|
|
14872
|
-
function
|
|
14908
|
+
function Bm({ className: e }) {
|
|
14873
14909
|
return /* @__PURE__ */ z("svg", {
|
|
14874
14910
|
width: "24",
|
|
14875
14911
|
height: "24",
|
|
@@ -14885,7 +14921,7 @@ function zm({ className: e }) {
|
|
|
14885
14921
|
}
|
|
14886
14922
|
//#endregion
|
|
14887
14923
|
//#region src/components/decision-graph/simulator/simulator-nodes-panel.tsx
|
|
14888
|
-
var
|
|
14924
|
+
var Vm = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeTypes: i, viewConfig: a, selectedNode: o, onSelectNode: s, onClear: c, onGoToNode: l }) => {
|
|
14889
14925
|
let u = Z(), d = I(() => !r || !("result" in r) ? [] : Object.entries(r.result?.trace ?? {}).filter(([e]) => !a?.enabled || !!a?.permissions?.[e]).map(([e, t]) => ({
|
|
14890
14926
|
...t,
|
|
14891
14927
|
nodeId: e
|
|
@@ -14947,7 +14983,7 @@ var Bm = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeType
|
|
|
14947
14983
|
children: [/* @__PURE__ */ B(X.Text, {
|
|
14948
14984
|
"data-role": "name",
|
|
14949
14985
|
className: "flex min-w-0 items-center [&>svg]:align-[-3px]",
|
|
14950
|
-
children: [/* @__PURE__ */ z(
|
|
14986
|
+
children: [/* @__PURE__ */ z(Hm, { status: G(r).with({ error: W.nonNullable }, () => "error").with({ result: W.nonNullable }, () => "success").otherwise(() => "not-run") }), /* @__PURE__ */ z("span", {
|
|
14951
14987
|
className: "truncate",
|
|
14952
14988
|
children: "Graph"
|
|
14953
14989
|
})]
|
|
@@ -14965,7 +15001,7 @@ var Bm = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeType
|
|
|
14965
15001
|
"data-role": "name",
|
|
14966
15002
|
className: "flex min-w-0 items-center [&>svg]:align-[-3px]",
|
|
14967
15003
|
title: e.name,
|
|
14968
|
-
children: [/* @__PURE__ */ z(
|
|
15004
|
+
children: [/* @__PURE__ */ z(Hm, { status: e.nodeId === r?.error?.data?.nodeId ? "error" : "success" }), /* @__PURE__ */ z("span", {
|
|
14969
15005
|
className: "truncate",
|
|
14970
15006
|
children: e.name
|
|
14971
15007
|
})]
|
|
@@ -14979,10 +15015,10 @@ var Bm = ({ search: e, onSearchChange: t, loading: n = !1, simulate: r, nodeType
|
|
|
14979
15015
|
})
|
|
14980
15016
|
})
|
|
14981
15017
|
})] });
|
|
14982
|
-
},
|
|
15018
|
+
}, Hm = ({ status: e }) => e === "not-run" ? null : e === "success" ? /* @__PURE__ */ z(zm, { className: "mr-1.5 size-3 shrink-0 text-[var(--seal-color-success)] opacity-60" }) : /* @__PURE__ */ z(Bm, { className: "mr-1 size-3 shrink-0 text-[var(--seal-color-error)]" });
|
|
14983
15019
|
//#endregion
|
|
14984
15020
|
//#region src/reui/icons/animated/outline/link.tsx
|
|
14985
|
-
function
|
|
15021
|
+
function Um({ className: e, style: t }) {
|
|
14986
15022
|
return /* @__PURE__ */ B("svg", {
|
|
14987
15023
|
width: "24",
|
|
14988
15024
|
height: "24",
|
|
@@ -15004,7 +15040,7 @@ function Hm({ className: e, style: t }) {
|
|
|
15004
15040
|
}
|
|
15005
15041
|
//#endregion
|
|
15006
15042
|
//#region src/components/decision-graph/simulator/simulator-request-toolbar.tsx
|
|
15007
|
-
var
|
|
15043
|
+
var Wm = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n, sourceOptions: r, bindingName: i, hasInputNode: a, loading: o, onSourceChange: s, onFormat: c, onCopy: l, onRun: u }) => /* @__PURE__ */ B("div", {
|
|
15008
15044
|
className: "flex items-center justify-between gap-2 border-b border-border px-3 py-2",
|
|
15009
15045
|
children: [
|
|
15010
15046
|
/* @__PURE__ */ z(Y, {
|
|
@@ -15022,7 +15058,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15022
15058
|
title: e("simulator.currentBinding"),
|
|
15023
15059
|
children: /* @__PURE__ */ B("div", {
|
|
15024
15060
|
className: "flex min-w-0 items-center gap-1",
|
|
15025
|
-
children: [/* @__PURE__ */ z(
|
|
15061
|
+
children: [/* @__PURE__ */ z(Um, { className: "size-3 shrink-0 text-[var(--muted-foreground)]" }), /* @__PURE__ */ z(ja, {
|
|
15026
15062
|
size: "small",
|
|
15027
15063
|
value: n,
|
|
15028
15064
|
options: r,
|
|
@@ -15036,7 +15072,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15036
15072
|
className: "flex min-w-0 items-center gap-1 text-xs",
|
|
15037
15073
|
children: [/* @__PURE__ */ z(Y, {
|
|
15038
15074
|
title: e("simulator.currentBinding"),
|
|
15039
|
-
children: /* @__PURE__ */ z(
|
|
15075
|
+
children: /* @__PURE__ */ z(Um, { className: "size-3 shrink-0 text-[var(--muted-foreground)]" })
|
|
15040
15076
|
}), /* @__PURE__ */ z("span", {
|
|
15041
15077
|
className: "truncate",
|
|
15042
15078
|
children: i
|
|
@@ -15083,7 +15119,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15083
15119
|
] })
|
|
15084
15120
|
})
|
|
15085
15121
|
]
|
|
15086
|
-
}),
|
|
15122
|
+
}), Gm = ({ t, requestValue: n, resolvedSimulatorExampleBinding: a, onRequestValueChange: o, onMarkEdited: u, onExternalChange: d }) => {
|
|
15087
15123
|
let { stateStore: f, actions: p } = Qu(), m = ({ activeExampleBinding: n, preparedParsed: i, triggeredBy: a, showSuccessMessage: l = !0 }) => {
|
|
15088
15124
|
let { decisionGraph: m } = f.getState(), g = m.nodes.find((e) => e.id === n.nodeId);
|
|
15089
15125
|
if (!g) return V.error(t("simulator.boundRequestNodeNotFound")), null;
|
|
@@ -15140,7 +15176,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15140
15176
|
return c || V.error(t("request.saveDataSourceFailed")), null;
|
|
15141
15177
|
}
|
|
15142
15178
|
} };
|
|
15143
|
-
},
|
|
15179
|
+
}, Km = 700, qm = ({ enabled: e, requestValue: t, requestSourcesSignature: n, boundRequestSourceIndex: r, onSyncToSchema: i, onPushToEditor: a, debounceMs: o = 700 }) => {
|
|
15144
15180
|
let s = L(null), c = L(void 0), l = L(t);
|
|
15145
15181
|
l.current = t;
|
|
15146
15182
|
let u = L(void 0), d = L({
|
|
@@ -15169,7 +15205,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15169
15205
|
]), { flush: () => {
|
|
15170
15206
|
s.current !== null && (window.clearTimeout(s.current), s.current = null, c.current = l.current, d.current.onSyncToSchema());
|
|
15171
15207
|
} };
|
|
15172
|
-
},
|
|
15208
|
+
}, Jm = ({ inputNodeContent: e, inputNodeId: t, simulatorExampleBinding: n, dataLabel: i = "Data" }) => {
|
|
15173
15209
|
let a = e, o = I(() => r(a, { dataLabel: i }), [a, i]), s = I(() => !n || n.nodeId !== t ? -1 : o[n.sourceIndex] ? n.sourceIndex : -1, [
|
|
15174
15210
|
t,
|
|
15175
15211
|
o,
|
|
@@ -15198,7 +15234,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15198
15234
|
bindingName: h,
|
|
15199
15235
|
shouldShowSimulatorSourceSelect: !!h && !!t && o.length > 1
|
|
15200
15236
|
};
|
|
15201
|
-
},
|
|
15237
|
+
}, Ym = ({ defaultRequest: e, simulatorRequest: t, currentBindingIdentity: n, onExternalChange: r }) => {
|
|
15202
15238
|
let [i, a] = R(e), [o, s] = R(!1), [c, l] = R(!1), u = L(null), d = L(null), f = L(void 0);
|
|
15203
15239
|
return F(() => () => {
|
|
15204
15240
|
u.current !== null && window.clearTimeout(u.current);
|
|
@@ -15218,7 +15254,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15218
15254
|
setUserHasEdited: s,
|
|
15219
15255
|
isApplyingExternalRequest: c
|
|
15220
15256
|
};
|
|
15221
|
-
},
|
|
15257
|
+
}, Xm = ({ onChange: e, hasInputNode: n, loading: r, onRun: i, defaultRequest: a }) => {
|
|
15222
15258
|
let o = Z(), { stateStore: c, actions: u } = Qu(), { simulatorRequest: f, simulatorExampleBinding: p, inputNodeContent: m, inputNodeId: h } = $(({ simulatorRequest: e, simulatorExampleBinding: t, decisionGraph: n }) => {
|
|
15223
15259
|
let r = n?.nodes?.find((e) => e.type === "inputNode");
|
|
15224
15260
|
return {
|
|
@@ -15227,12 +15263,12 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15227
15263
|
inputNodeContent: r?.content,
|
|
15228
15264
|
inputNodeId: r?.id
|
|
15229
15265
|
};
|
|
15230
|
-
}), { requestSources: g, boundRequestSourceIndex: _, defaultRequestSourceIndex: v, defaultRequestSource: y, resolvedSimulatorExampleBinding: b, currentBindingIdentity: x, requestDefinitions: S, sourceOptions: C, bindingName: w, shouldShowSimulatorSourceSelect: T } =
|
|
15266
|
+
}), { requestSources: g, boundRequestSourceIndex: _, defaultRequestSourceIndex: v, defaultRequestSource: y, resolvedSimulatorExampleBinding: b, currentBindingIdentity: x, requestDefinitions: S, sourceOptions: C, bindingName: w, shouldShowSimulatorSourceSelect: T } = Jm({
|
|
15231
15267
|
inputNodeContent: m,
|
|
15232
15268
|
inputNodeId: h,
|
|
15233
15269
|
simulatorExampleBinding: p,
|
|
15234
15270
|
dataLabel: o("request.dataLabel")
|
|
15235
|
-
}), { requestValue: E, setRequestValue: D, userHasEdited: k, setUserHasEdited: ee, isApplyingExternalRequest: te } =
|
|
15271
|
+
}), { requestValue: E, setRequestValue: D, userHasEdited: k, setUserHasEdited: ee, isApplyingExternalRequest: te } = Ym({
|
|
15236
15272
|
defaultRequest: a,
|
|
15237
15273
|
simulatorRequest: f,
|
|
15238
15274
|
currentBindingIdentity: x,
|
|
@@ -15271,14 +15307,14 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15271
15307
|
u.setNodeType(t.id, Ku.InferredOutput, new cn(e));
|
|
15272
15308
|
} catch {}
|
|
15273
15309
|
}, [E]);
|
|
15274
|
-
let { persistRequestToExampleSource: A } =
|
|
15310
|
+
let { persistRequestToExampleSource: A } = Gm({
|
|
15275
15311
|
t: o,
|
|
15276
15312
|
requestValue: E,
|
|
15277
15313
|
resolvedSimulatorExampleBinding: b,
|
|
15278
15314
|
onRequestValueChange: D,
|
|
15279
15315
|
onMarkEdited: () => ee(!0),
|
|
15280
15316
|
onExternalChange: e
|
|
15281
|
-
}), re = JSON.stringify(g.map((e) => e.data)), { flush: j } =
|
|
15317
|
+
}), re = JSON.stringify(g.map((e) => e.data)), { flush: j } = qm({
|
|
15282
15318
|
enabled: !!(n && b),
|
|
15283
15319
|
requestValue: E,
|
|
15284
15320
|
requestSourcesSignature: re,
|
|
@@ -15298,7 +15334,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15298
15334
|
u.setSimulatorRequest(JSON.stringify(t, null, 2));
|
|
15299
15335
|
}
|
|
15300
15336
|
});
|
|
15301
|
-
return /* @__PURE__ */ B(N.Fragment, { children: [/* @__PURE__ */ z(
|
|
15337
|
+
return /* @__PURE__ */ B(N.Fragment, { children: [/* @__PURE__ */ z(Wm, {
|
|
15302
15338
|
t: o,
|
|
15303
15339
|
shouldShowSimulatorSourceSelect: T,
|
|
15304
15340
|
boundRequestSourceIndex: _,
|
|
@@ -15346,7 +15382,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15346
15382
|
className: "relative min-h-0 flex-1 overflow-hidden",
|
|
15347
15383
|
children: [/* @__PURE__ */ z("div", {
|
|
15348
15384
|
className: "absolute inset-0",
|
|
15349
|
-
children: /* @__PURE__ */ z(
|
|
15385
|
+
children: /* @__PURE__ */ z(Rm, {
|
|
15350
15386
|
value: E,
|
|
15351
15387
|
onChange: (t) => {
|
|
15352
15388
|
D(t), ee(!0), u.setSimulatorRequest(t ?? ""), e?.(t ?? "");
|
|
@@ -15357,9 +15393,9 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15357
15393
|
children: /* @__PURE__ */ z(Na, { size: "small" })
|
|
15358
15394
|
})]
|
|
15359
15395
|
})] });
|
|
15360
|
-
},
|
|
15396
|
+
}, Zm = /* @__PURE__ */ function(e) {
|
|
15361
15397
|
return e.Output = "Output", e.Input = "Input", e.Trace = "Trace", e;
|
|
15362
|
-
}(
|
|
15398
|
+
}(Zm || {}), Qm = ({ defaultRequest: e, onChange: t, onRun: n, onClear: r, loading: i = !1, leftPanel: a = Xm }) => {
|
|
15363
15399
|
let o = Z(), [s, c] = yd("simulation.search", ""), [l, u] = yd("simulation.segment", "Output"), { viewConfig: d } = $((e) => ({ viewConfig: e.viewConfig })), { actions: f } = Qu(), { nodeTypes: p, simulate: m, hasInputNode: h } = $(({ decisionGraph: e, simulate: t }) => ({
|
|
15364
15400
|
simulate: t,
|
|
15365
15401
|
hasInputNode: e.nodes.some((e) => e.type === Q.Input),
|
|
@@ -15390,7 +15426,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15390
15426
|
minSize: 20,
|
|
15391
15427
|
maxSize: 20,
|
|
15392
15428
|
className: "flex w-[260px] flex-col",
|
|
15393
|
-
children: /* @__PURE__ */ z(
|
|
15429
|
+
children: /* @__PURE__ */ z(Vm, {
|
|
15394
15430
|
search: s,
|
|
15395
15431
|
onSearchChange: c,
|
|
15396
15432
|
loading: i,
|
|
@@ -15416,7 +15452,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15416
15452
|
size: "small",
|
|
15417
15453
|
style: { width: "100%" },
|
|
15418
15454
|
onChange: (e) => u(e),
|
|
15419
|
-
items: Object.values(
|
|
15455
|
+
items: Object.values(Zm).map((e) => ({
|
|
15420
15456
|
key: e,
|
|
15421
15457
|
label: e
|
|
15422
15458
|
})),
|
|
@@ -15432,21 +15468,21 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15432
15468
|
})
|
|
15433
15469
|
}), /* @__PURE__ */ z("div", {
|
|
15434
15470
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
15435
|
-
children: /* @__PURE__ */ z(
|
|
15471
|
+
children: /* @__PURE__ */ z(Rm, {
|
|
15436
15472
|
readOnly: !0,
|
|
15437
|
-
value: G(m).with({ result: W._ }, ({ result: e }) => G(g).with("graph", () =>
|
|
15473
|
+
value: G(m).with({ result: W._ }, ({ result: e }) => G(g).with("graph", () => $m({
|
|
15438
15474
|
traceData: e?.trace,
|
|
15439
15475
|
output: e?.result
|
|
15440
|
-
}, l ?? "Output")).otherwise(() =>
|
|
15476
|
+
}, l ?? "Output")).otherwise(() => $m(e?.trace[g], l ?? "Output"))).otherwise(() => "")
|
|
15441
15477
|
})
|
|
15442
15478
|
})]
|
|
15443
15479
|
})
|
|
15444
15480
|
]
|
|
15445
15481
|
});
|
|
15446
|
-
},
|
|
15482
|
+
}, $m = (e, t) => {
|
|
15447
15483
|
let n = G([t, e]).with(["Output", { output: W._ }], ([, { output: e }]) => e).with(["Input", { input: W._ }], ([, { input: e }]) => e).with(["Trace", { trace: W._ }], ([, { trace: e }]) => e).with(["Trace", { traceData: W._ }], ([, { traceData: e }]) => e).otherwise(() => ({}));
|
|
15448
15484
|
return yn.stringify(n, void 0, 2);
|
|
15449
|
-
},
|
|
15485
|
+
}, eh = /* @__PURE__ */ new Set(["position", "_diff"]), th = /* @__PURE__ */ new Set(["_diff"]), nh = (e) => typeof e != "object" || !e ? JSON.stringify(e) ?? "undefined" : Array.isArray(e) ? `[${e.map(nh).join(",")}]` : `{${Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t)).map(([e, t]) => `${JSON.stringify(e)}:${nh(t)}`).join(",")}}`, rh = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => !t.has(e))), ih = (e, t, n) => [.../* @__PURE__ */ new Set([...Object.keys(rh(e, n)), ...Object.keys(rh(t, n))])].filter((n) => nh(e[n]) !== nh(t[n])), ah = (e, t, n) => {
|
|
15450
15486
|
let r = new Map(e.map((e) => [e.id, e])), i = new Map(t.map((e) => [e.id, e])), a = [], o = [], s = [];
|
|
15451
15487
|
for (let [e, t] of i) r.has(e) || a.push({
|
|
15452
15488
|
id: e,
|
|
@@ -15463,7 +15499,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15463
15499
|
});
|
|
15464
15500
|
continue;
|
|
15465
15501
|
}
|
|
15466
|
-
let a =
|
|
15502
|
+
let a = ih(t, r, n);
|
|
15467
15503
|
a.length > 0 && s.push({
|
|
15468
15504
|
id: e,
|
|
15469
15505
|
name: r.name ?? t.name,
|
|
@@ -15476,8 +15512,8 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15476
15512
|
removed: o,
|
|
15477
15513
|
modified: s
|
|
15478
15514
|
};
|
|
15479
|
-
},
|
|
15480
|
-
let n =
|
|
15515
|
+
}, oh = (e, t) => {
|
|
15516
|
+
let n = ah(e.nodes ?? [], t.nodes ?? [], eh), r = ah(e.edges ?? [], t.edges ?? [], th);
|
|
15481
15517
|
return {
|
|
15482
15518
|
addedNodes: n.added,
|
|
15483
15519
|
removedNodes: n.removed,
|
|
@@ -15487,7 +15523,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15487
15523
|
modifiedEdges: r.modified,
|
|
15488
15524
|
unchanged: n.added.length + n.removed.length + n.modified.length + r.added.length + r.removed.length + r.modified.length === 0
|
|
15489
15525
|
};
|
|
15490
|
-
},
|
|
15526
|
+
}, sh = "data:image/svg+xml,%3csvg%20id='fi_5968381'%20enable-background='new%200%200%20512%20512'%20height='512'%20viewBox='0%200%20512%20512'%20width='512'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='m50%200h412c27.614%200%2050%2022.386%2050%2050v412c0%2027.614-22.386%2050-50%2050h-412c-27.614%200-50-22.386-50-50v-412c0-27.614%2022.386-50%2050-50z'%20fill='%233178c6'%3e%3c/path%3e%3cpath%20d='m50%200h412c27.614%200%2050%2022.386%2050%2050v412c0%2027.614-22.386%2050-50%2050h-412c-27.614%200-50-22.386-50-50v-412c0-27.614%2022.386-50%2050-50z'%20fill='%233178c6'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='m316.939%20407.424v50.061c8.138%204.172%2017.763%207.3%2028.875%209.386s22.823%203.129%2035.135%203.129c21.219%200%2044.448-3.035%2062.602-14.784%2018.064-11.691%2026.449-31.14%2026.449-52.172%200-15.637-4.851-30.684-15.807-42.081-16.429-17.091-39.516-24.022-60.255-34.183-10.389-5.09-24.727-12.992-24.727-26.361%200-3.441.887-6.543%202.661-9.307%207.132-11.113%2022.973-13.376%2035.057-13.376%2013.717%200%2028.189%203.071%2040.926%208.76%204.434%201.982%208.529%204.276%2012.285%206.884v-46.776c-7.616-2.92-15.937-5.084-24.962-6.492s-19.381-2.112-31.066-2.112c-11.895%200-23.163%201.278-33.805%203.833s-20.006%206.544-28.093%2011.967c-8.086%205.424-14.476%2012.333-19.171%2020.729-4.695%208.395-7.043%2018.433-7.043%2030.114%200%2014.914%204.304%2027.638%2012.912%2038.172%208.607%2010.533%2021.675%2019.45%2039.204%2026.751%2011.792%204.822%2024.053%209.581%2034.665%2016.739%207.355%204.96%2014.007%2011.877%2014.007%2021.275%200%206.821-3.856%2012.604-9.468%2016.192-8.303%205.308-18.936%206.492-28.563%206.492-10.851%200-21.597-1.903-32.24-5.71-10.641-3.806-20.501-9.516-29.578-17.13zm-84.159-123.342h64.22v-41.082h-179v41.082h63.906v182.918h50.874z'%20fill='%23fff'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", ch = {
|
|
15491
15527
|
dark: {
|
|
15492
15528
|
string: "#CE9178",
|
|
15493
15529
|
number: "#B5CEA8",
|
|
@@ -15504,8 +15540,8 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15504
15540
|
error: "#E51400",
|
|
15505
15541
|
info: "rgba(0, 0, 0, 0.65)"
|
|
15506
15542
|
}
|
|
15507
|
-
},
|
|
15508
|
-
let n = Wo(), r = Z(), i =
|
|
15543
|
+
}, lh = ({ lines: e, msSinceRun: t }) => {
|
|
15544
|
+
let n = Wo(), r = Z(), i = ch[n ?? "light"];
|
|
15509
15545
|
return /* @__PURE__ */ B("div", {
|
|
15510
15546
|
className: "flex items-start justify-between border-b border-[var(--seal-color-border-fade)] pl-4 pr-6 text-xs leading-[var(--seal-line-height)] text-[var(--seal-color-text-base)] [font-family:var(--mono-font-family)]",
|
|
15511
15547
|
children: [/* @__PURE__ */ z(ta, {
|
|
@@ -15520,7 +15556,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15520
15556
|
children: /* @__PURE__ */ z("div", {
|
|
15521
15557
|
className: "seal-function__debugger__log__values",
|
|
15522
15558
|
children: e.map((e, t) => {
|
|
15523
|
-
let n =
|
|
15559
|
+
let n = mh(e);
|
|
15524
15560
|
return /* @__PURE__ */ z(Br, {
|
|
15525
15561
|
data: n,
|
|
15526
15562
|
shouldExpandNodeInitially: () => !1,
|
|
@@ -15531,11 +15567,11 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15531
15567
|
children: a
|
|
15532
15568
|
}), ": "] })), e.length >= 1) {
|
|
15533
15569
|
let a = [...e];
|
|
15534
|
-
a.pop(), a = a.reverse(), r.push(
|
|
15570
|
+
a.pop(), a = a.reverse(), r.push(uh(i)(ph(n, a), t));
|
|
15535
15571
|
}
|
|
15536
15572
|
return /* @__PURE__ */ z(Me, { children: r });
|
|
15537
15573
|
},
|
|
15538
|
-
valueRenderer:
|
|
15574
|
+
valueRenderer: fh(i),
|
|
15539
15575
|
theme: {
|
|
15540
15576
|
base00: "var(--card)",
|
|
15541
15577
|
base03: "var(--seal-color-text-base)",
|
|
@@ -15566,12 +15602,12 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15566
15602
|
})
|
|
15567
15603
|
})]
|
|
15568
15604
|
});
|
|
15569
|
-
},
|
|
15605
|
+
}, uh = (e) => (t, n) => {
|
|
15570
15606
|
if (n === "Object") {
|
|
15571
15607
|
let n = Object.entries(t), r = n.reduce((t, [r, i], a) => [...t, /* @__PURE__ */ B("span", { children: [
|
|
15572
15608
|
r,
|
|
15573
15609
|
": ",
|
|
15574
|
-
|
|
15610
|
+
fh(e)(dh(i), i),
|
|
15575
15611
|
a !== n.length - 1 && /* @__PURE__ */ z(Me, { children: ", " })
|
|
15576
15612
|
] }, r)], []);
|
|
15577
15613
|
return /* @__PURE__ */ B(Me, { children: [
|
|
@@ -15581,7 +15617,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15581
15617
|
] });
|
|
15582
15618
|
}
|
|
15583
15619
|
if (n === "Array") {
|
|
15584
|
-
let n = t, r = n.reduce((t, r, i) => [...t, /* @__PURE__ */ B("span", { children: [
|
|
15620
|
+
let n = t, r = n.reduce((t, r, i) => [...t, /* @__PURE__ */ B("span", { children: [fh(e)(dh(r), r), i !== n.length - 1 && /* @__PURE__ */ z(Me, { children: ", " })] }, i)], []);
|
|
15585
15621
|
return /* @__PURE__ */ B(Me, { children: [
|
|
15586
15622
|
n.length > 2 ? `(${n.length})` : "",
|
|
15587
15623
|
" [",
|
|
@@ -15590,13 +15626,13 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15590
15626
|
] });
|
|
15591
15627
|
}
|
|
15592
15628
|
return null;
|
|
15593
|
-
},
|
|
15629
|
+
}, dh = (e) => {
|
|
15594
15630
|
switch (!0) {
|
|
15595
15631
|
case Array.isArray(e): return `Array(${e.length})`;
|
|
15596
15632
|
case typeof e == "object": return "{...}";
|
|
15597
15633
|
default: return JSON.stringify(e);
|
|
15598
15634
|
}
|
|
15599
|
-
},
|
|
15635
|
+
}, fh = (e) => (t, n) => {
|
|
15600
15636
|
let r = t;
|
|
15601
15637
|
return typeof n == "string" ? r.startsWith("\"Error:") ? /* @__PURE__ */ z("span", {
|
|
15602
15638
|
style: { color: e.error },
|
|
@@ -15614,15 +15650,15 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15614
15650
|
style: { color: e.number },
|
|
15615
15651
|
children: r
|
|
15616
15652
|
}) : r;
|
|
15617
|
-
},
|
|
15653
|
+
}, ph = (e, t) => t.reduce((e, t) => e && e[t] ? e[t] : null, e), mh = (e) => {
|
|
15618
15654
|
if (typeof e == "string" && (e = e.trim(), e)) try {
|
|
15619
15655
|
return JSON.parse(e);
|
|
15620
15656
|
} catch {
|
|
15621
15657
|
return `[UNSERIALIZED]: ${e}`;
|
|
15622
15658
|
}
|
|
15623
|
-
},
|
|
15659
|
+
}, hh = /* @__PURE__ */ function(e) {
|
|
15624
15660
|
return e.Console = "Console", e.Libraries = "Libraries", e;
|
|
15625
|
-
}(
|
|
15661
|
+
}(hh || {}), gh = ({ trace: e, editor: t, libraries: n = [], editorValue: r, disabled: i }) => {
|
|
15626
15662
|
let a = e?.traceData?.log || [], [o, s] = R("Console"), c = Z();
|
|
15627
15663
|
return /* @__PURE__ */ z("div", {
|
|
15628
15664
|
className: "h-full border-l border-[var(--border)]",
|
|
@@ -15634,7 +15670,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15634
15670
|
rootClassName: "seal-inline-tabs",
|
|
15635
15671
|
size: "small",
|
|
15636
15672
|
style: { width: "100%" },
|
|
15637
|
-
items: Object.values(
|
|
15673
|
+
items: Object.values(hh).map((e) => ({
|
|
15638
15674
|
key: e,
|
|
15639
15675
|
label: e
|
|
15640
15676
|
})),
|
|
@@ -15656,15 +15692,15 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15656
15692
|
})
|
|
15657
15693
|
}), /* @__PURE__ */ z("div", {
|
|
15658
15694
|
className: "grow overflow-y-auto",
|
|
15659
|
-
children: G(o).with("Console", () => /* @__PURE__ */ B(Me, { children: [a.length === 0 && /* @__PURE__ */ z(
|
|
15695
|
+
children: G(o).with("Console", () => /* @__PURE__ */ B(Me, { children: [a.length === 0 && /* @__PURE__ */ z(lh, {
|
|
15660
15696
|
lines: ["\"Info: Use console.log and run simulation to debug your code.\""],
|
|
15661
15697
|
msSinceRun: null
|
|
15662
|
-
}), a.map((e, t) => /* @__PURE__ */ z(
|
|
15698
|
+
}), a.map((e, t) => /* @__PURE__ */ z(lh, {
|
|
15663
15699
|
lines: e.lines,
|
|
15664
15700
|
msSinceRun: e.msSinceRun
|
|
15665
15701
|
}, t))] })).with("Libraries", () => /* @__PURE__ */ z("div", {
|
|
15666
15702
|
className: "flex flex-col",
|
|
15667
|
-
children: n.map((e) => /* @__PURE__ */ z(
|
|
15703
|
+
children: n.map((e) => /* @__PURE__ */ z(_h, {
|
|
15668
15704
|
lib: e,
|
|
15669
15705
|
disabled: i,
|
|
15670
15706
|
editorValue: r,
|
|
@@ -15678,14 +15714,14 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15678
15714
|
})]
|
|
15679
15715
|
})
|
|
15680
15716
|
});
|
|
15681
|
-
},
|
|
15717
|
+
}, _h = ({ lib: e, onImport: t, editorValue: n, disabled: r }) => {
|
|
15682
15718
|
let i = Z(), a = I(() => !n || !n.includes(`from "${e.name}"`) && !n.includes(`from '${e.name}'`), [e.name, n]);
|
|
15683
15719
|
return /* @__PURE__ */ B("div", {
|
|
15684
15720
|
className: "flex items-center gap-2 border-b border-[var(--seal-color-border-fade)] p-2 no-underline",
|
|
15685
15721
|
children: [
|
|
15686
15722
|
/* @__PURE__ */ z("img", {
|
|
15687
15723
|
alt: "TypeScript Library",
|
|
15688
|
-
src:
|
|
15724
|
+
src: sh,
|
|
15689
15725
|
height: 18
|
|
15690
15726
|
}),
|
|
15691
15727
|
/* @__PURE__ */ z(X.Text, {
|
|
@@ -15727,12 +15763,12 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15727
15763
|
})
|
|
15728
15764
|
]
|
|
15729
15765
|
}, e.name);
|
|
15730
|
-
},
|
|
15766
|
+
}, vh = (e) => yh(e.toJson()), yh = (e) => G(e).with("String", () => "string").with("Bool", () => "boolean").with("Number", () => "number").with("Null", () => "null").with("Any", () => "any").with({ Object: W.select() }, (e) => `{${Object.entries(e).map(([e, t]) => [e, yh(t)].join(":")).join(",")}}`).with({ Array: W.select() }, (e) => `${yh(e)}[]`).with({ Const: W.select() }, (e) => `"${e}"`).with({ Enum: [W._, W.select()] }, (e) => e.map((e) => `"${e}"`).join(" | ")).exhaustive(), bh = {
|
|
15731
15767
|
Hint: 1,
|
|
15732
15768
|
Info: 2,
|
|
15733
15769
|
Warning: 4,
|
|
15734
15770
|
Error: 8
|
|
15735
|
-
},
|
|
15771
|
+
}, xh = ({ disabled: e = !1, disableDebug: t, language: n = "javascript", defaultValue: r, value: i, onChange: a, trace: o, onMonacoReady: s, onEditorMount: c, error: l, inputData: u, previousValue: d, permission: f = "edit:full", libraries: p = ef }) => {
|
|
15736
15772
|
let m = Or(), h = L(!1), g = Wo(), [_, v] = R(), [y, b] = R(), x = Zn((e) => {
|
|
15737
15773
|
a?.(e);
|
|
15738
15774
|
}, 100), [S, C] = R(), [w, T] = R(), E = Qn(() => S?.layout(), 100, { trailing: !0 }), D = Qn(() => w?.layout(), 100, { trailing: !0 });
|
|
@@ -15764,7 +15800,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15764
15800
|
}, []), F(() => {
|
|
15765
15801
|
if (!m) return;
|
|
15766
15802
|
let e = "any";
|
|
15767
|
-
no() && (e =
|
|
15803
|
+
no() && (e = vh(ln(u))), m.languages.typescript.javascriptDefaults.addExtraLib(`
|
|
15768
15804
|
type Input = ${e};
|
|
15769
15805
|
type Output = Promise<any>;
|
|
15770
15806
|
|
|
@@ -15787,7 +15823,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15787
15823
|
if (!r) return;
|
|
15788
15824
|
let i = new m.Range(t, r.getLineFirstNonWhitespaceColumn(t), t, r.getLineLastNonWhitespaceColumn(t));
|
|
15789
15825
|
m.editor.setModelMarkers(r, "gorules", [{
|
|
15790
|
-
severity:
|
|
15826
|
+
severity: bh.Error,
|
|
15791
15827
|
message: n,
|
|
15792
15828
|
startLineNumber: i.startLineNumber,
|
|
15793
15829
|
endLineNumber: i.endLineNumber,
|
|
@@ -15831,7 +15867,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15831
15867
|
theme: g === "dark" ? "vs-dark" : "light",
|
|
15832
15868
|
height: "100%",
|
|
15833
15869
|
options: {
|
|
15834
|
-
...
|
|
15870
|
+
...Sh,
|
|
15835
15871
|
readOnly: !0
|
|
15836
15872
|
}
|
|
15837
15873
|
}) : /* @__PURE__ */ z(Er, {
|
|
@@ -15847,13 +15883,13 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15847
15883
|
theme: g === "dark" ? "vs-dark" : "light",
|
|
15848
15884
|
height: "100%",
|
|
15849
15885
|
options: {
|
|
15850
|
-
...
|
|
15886
|
+
...Sh,
|
|
15851
15887
|
readOnly: e || f !== "edit:full"
|
|
15852
15888
|
}
|
|
15853
15889
|
})
|
|
15854
15890
|
}), !t && /* @__PURE__ */ B(Me, { children: [/* @__PURE__ */ z(Mr, {}), /* @__PURE__ */ z(Ar, {
|
|
15855
15891
|
minSize: 25,
|
|
15856
|
-
children: !t && /* @__PURE__ */ z(
|
|
15892
|
+
children: !t && /* @__PURE__ */ z(gh, {
|
|
15857
15893
|
libraries: ef,
|
|
15858
15894
|
trace: o,
|
|
15859
15895
|
editor: S,
|
|
@@ -15863,7 +15899,7 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15863
15899
|
})] })]
|
|
15864
15900
|
})
|
|
15865
15901
|
}) });
|
|
15866
|
-
},
|
|
15902
|
+
}, Sh = {
|
|
15867
15903
|
automaticLayout: !0,
|
|
15868
15904
|
contextmenu: !1,
|
|
15869
15905
|
fontSize: 13,
|
|
@@ -15877,8 +15913,8 @@ var Um = ({ t: e, shouldShowSimulatorSourceSelect: t, boundRequestSourceIndex: n
|
|
|
15877
15913
|
horizontalScrollbarSize: 4,
|
|
15878
15914
|
horizontalSliderSize: 4
|
|
15879
15915
|
}
|
|
15880
|
-
},
|
|
15916
|
+
}, Ch = /* @__PURE__ */ Jr({ Function: () => xh });
|
|
15881
15917
|
//#endregion
|
|
15882
|
-
export {
|
|
15918
|
+
export { Km as AUTO_SYNC_DEBOUNCE_MS, ie as COLUMN_FIELD_TYPE_OPTIONS, jc as CodeEditor, Om as CustomFunctionTable, te as CustomKind, re as DECISION_GRAPH_CONTENT_TYPE, Im as DecisionGraph, bu as DecisionTable, qo as DictionaryProvider, eu as DiffAutosizeTextArea, $l as DiffCodeEditor, au as DiffIcon, Zl as DiffInput, Jl as DiffRadio, Ql as DiffSelect, Xl as DiffSwitch, Wd as Expression, dl as ExpressionBuilder, xh as Function, Ed as GraphDecisionNode, kd as GraphNode, Qm as GraphSimulator, Ho as I18nProvider, Jo as JdmConfigProvider, vo as MODE_EXTRAS, Td as NodeColor, E as NodeKind, Ku as NodeTypeKind, y as OUTPUT_FIELD_TYPE_OPTIONS, Rm as SimulatorEditor, Lf as TabRequest, Mm as ToolbarAnchor, ld as addStrikethrough, ne as anyNodeSchema, ud as buildDiffString, m as buildRequestExampleTemplateFromDefinitions, D as buildRequestSchemaFromDefinitions, Zf as calculateDiffGraph, Am as clusterToolbarItems, Is as codemirror, j as columnEnumSchema, x as columnFieldTypeSchema, fd as compareAndUnifyLists, dd as compareStringFields, oh as computeGraphDiff, Lm as createJdmNode, Vo as createT, k as customNodeSchema, bo as darkTokens, ae as decisionModelSchema, S as decisionNodeSchema, C as decisionTableSchema, A as edgeSchema, ro as ensureWasmLoaded, ee as expressionNodeSchema, T as functionNodeSchema, l as getRequestDefinitions, r as getRequestExampleSources, f as getRequestSchemaSourceValue, w as inputNodeSchema, fm as jsonSchemaToVariableType, yo as lightTokens, v as nodeSchema, sp as nodeSpecification, u as normalizeRequestDefinitionOrders, ue as normalizeRequestFieldKey, t as normalizeRequestJsonKeys, oe as outputFieldTypeSchema, le as outputNodeSchema, $f as processEdges, Qf as processNodes, s as resolveRequestSchemaValue, p as stringifyRequestSchemaValue, b as switchNodeSchema, e as updateRequestSchemaExamples, Zu as useDecisionGraphActions, Yu as useDecisionGraphListeners, Qu as useDecisionGraphRaw, Xu as useDecisionGraphReferences, $ as useDecisionGraphState, Ko as useDictionaries, ed as useEdgeDiff, ad as useGraphSerializer, $u as useNodeDiff, cd as useNodeType, yd as usePersistentState, qm as useSimulatorAutoSync, Z as useT, od as useTabSerializer, Wo as useThemeMode, io as useWasmReady, ce as validationSchema };
|
|
15883
15919
|
|
|
15884
15920
|
//# sourceMappingURL=index.js.map
|