From a8790befb0894b6d6ba1bb1bf0246efa19dd23db Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Mon, 5 Jan 2026 14:10:37 +0100 Subject: [PATCH 01/32] feat: add support for @requires --- protographic/src/index.ts | 1 + protographic/src/naming-conventions.ts | 29 +- protographic/src/proto-utils.ts | 362 ++++++++ protographic/src/required-fields-visitor.ts | 391 ++++++++ protographic/src/sdl-to-proto-visitor.ts | 634 ++++--------- protographic/src/string-constants.ts | 1 + protographic/src/types.ts | 123 +++ .../tests/field-set/01-basics.test.ts | 868 ++++++++++++++++++ 8 files changed, 1976 insertions(+), 433 deletions(-) create mode 100644 protographic/src/proto-utils.ts create mode 100644 protographic/src/required-fields-visitor.ts create mode 100644 protographic/tests/field-set/01-basics.test.ts diff --git a/protographic/src/index.ts b/protographic/src/index.ts index bfeffb6b04..2101cc85c6 100644 --- a/protographic/src/index.ts +++ b/protographic/src/index.ts @@ -92,6 +92,7 @@ export function validateGraphQLSDL(sdl: string): ValidationResult { export * from './sdl-to-mapping-visitor.js'; export { GraphQLToProtoTextVisitor } from './sdl-to-proto-visitor.js'; +export { RequiredFieldsVisitor } from './required-fields-visitor.js'; export { ProtoLockManager } from './proto-lock.js'; export { SDLValidationVisitor } from './sdl-validation-visitor.js'; diff --git a/protographic/src/naming-conventions.ts b/protographic/src/naming-conventions.ts index 1faf41942f..73e141c940 100644 --- a/protographic/src/naming-conventions.ts +++ b/protographic/src/naming-conventions.ts @@ -55,6 +55,33 @@ export function createResponseMessageName(methodName: string): string { * Creates an entity lookup method name for an entity type */ export function createEntityLookupMethodName(typeName: string, keyString: string = 'id'): string { + const normalizedKey = createMethodSuffixFromEntityKey(keyString); + return `Lookup${typeName}${normalizedKey}`; +} + + +/** + * Creates a required fields method name for an entity type + * @param typeName - The name of the entity type + * @param fieldName - The name of the field that is required + * @param keyString - The key string + * @returns The name of the required fields method + * @example + * createRequiredFieldsMethodName('User', 'post', 'id') // => 'RequireUserPostById' + * createRequiredFieldsMethodName('User', 'post', 'id name') // => 'RequireUserPostByIdAndName' + * createRequiredFieldsMethodName('User', 'post', 'name,id') // => 'RequireUserPostByNameAndId' + */ +export function createRequiredFieldsMethodName(typeName: string, fieldName: string, keyString: string = 'id'): string { + const normalizedKey = createMethodSuffixFromEntityKey(keyString); + return `Require${typeName}${upperFirst(camelCase(fieldName))}${normalizedKey}`; +} + +/** + * Creates a method suffix from an entity key string + * @param keyString - The key string + * @returns The method suffix + */ +export function createMethodSuffixFromEntityKey(keyString: string = 'id'): string { const normalizedKey = keyString .split(/[,\s]+/) .filter((field) => field.length > 0) @@ -62,7 +89,7 @@ export function createEntityLookupMethodName(typeName: string, keyString: string .sort() .join('And'); - return `Lookup${typeName}By${normalizedKey}`; + return `By${normalizedKey}`; } /** diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts new file mode 100644 index 0000000000..c4bd42a47b --- /dev/null +++ b/protographic/src/proto-utils.ts @@ -0,0 +1,362 @@ +import { + GraphQLType, + isListType, + isNonNullType, + isScalarType, + isEnumType, + GraphQLNamedType, + getNamedType, + GraphQLList, + GraphQLNonNull, +} from 'graphql'; +import { + CompositeMessageDefinition, + isUnionMessageDefinition, + ProtoFieldType, + ProtoMessage, + RPCMethod, + SCALAR_TYPE_MAP, + SCALAR_WRAPPER_TYPE_MAP, +} from './types'; +import { unwrapNonNullType, isNestedListType, calculateNestingLevel } from './operations/list-type-utils'; +import { graphqlFieldToProtoField } from './naming-conventions'; + +const SPACE_INDENT = ' '; // 2 spaces +const LINE_COMMENT_PREFIX = '// '; +const BLOCK_COMMENT_START = '/*'; +const BLOCK_COMMENT_END = '*/'; + +/** + * Builds a message definition from a ProtoMessage object + * @param message - The ProtoMessage object + * @returns The message definition + */ +export function buildProtoMessage(includeComments: boolean, message: ProtoMessage): string[] { + return buildProtoMessageWithIndent(includeComments, message, 0); +} + +/** + * Builds a message definition from a ProtoMessage object with an indent level + * @param includeComments - Whether to include comments + * @param message - The ProtoMessage object + * @param indent - The indent level + * @returns The message lines + */ +function buildProtoMessageWithIndent(includeComments: boolean, message: ProtoMessage, indent: number): string[] { + const messageLines = formatComment(includeComments, message.description, indent); + messageLines.push(indentContent(indent, `message ${message.messageName} {`)); + + // if we have nested messages, we need to build them first + if (message.nestedMessages && message.nestedMessages.length > 0) { + message.nestedMessages.forEach((nestedMessage) => { + messageLines.push(...buildProtoMessageWithIndent(includeComments, nestedMessage, indent + 1)); + }); + } + + if (message.compositeType) { + messageLines.push(...buildCompositeTypeMessage(includeComments, message.compositeType, indent + 1)); + } + + if (message.reservedNumbers && message.reservedNumbers.length > 0) { + messageLines.push(indentContent(indent + 1, `reserved ${message.reservedNumbers};`)); + } + + message.fields.forEach((field) => { + if (field.description) { + messageLines.push(...formatComment(includeComments, field.description, indent + 1)); + } + + let repeated = field.isRepeated ? 'repeated ' : ''; + + messageLines.push( + indentContent(indent + 1, `${repeated}${field.typeName} ${field.fieldName} = ${field.fieldNumber};`), + ); + }); + messageLines.push(indentContent(indent, '}'), ''); + return messageLines; +} + +/** + * Builds a composite type message + * @param includeComments - Whether to include comments + * @param compositeType - The composite type definition + * @param indent - The indent level + * @returns The message lines + * @example + * ```proto + * // A union type uses `value` + * message Animal { + * oneof value { + * Cat cat = 1; + * Dog dog = 2; + * } + * } + * + * // An interface type uses `instance` + * message Animal { + * oneof instance { + * Cat cat = 1; + * Dog dog = 2; + * } + * } + * ``` + */ +function buildCompositeTypeMessage( + includeComments: boolean, + compositeType: CompositeMessageDefinition, + indent: number, +): string[] { + const lines: string[] = []; + + if (includeComments && compositeType.description) { + lines.push(...formatComment(includeComments, compositeType.description, indent)); + } + + let oneOfName = ''; + let compositeTypes: string[] = []; + + if (isUnionMessageDefinition(compositeType)) { + oneOfName = 'value'; + compositeTypes = compositeType.memberTypes; + } else { + oneOfName = 'instance'; + compositeTypes = compositeType.implementingTypes; + } + + lines.push( + indentContent(indent, `message ${compositeType.typeName} {`), + indentContent(indent + 1, `oneof ${oneOfName} {`), + ); + + compositeTypes.forEach((compositeType, index) => { + lines.push( + indentContent(indent + 2, `${compositeType} ${graphqlFieldToProtoField(compositeType)} = ${index + 1};`), + ); + }); + + lines.push(indentContent(indent + 1, '}')); + lines.push(indentContent(indent, '}')); + + return lines; +} + +/** + * Convert a GraphQL description to Protocol Buffer comment + * @param description - The GraphQL description text + * @param indentLevel - The level of indentation for the comment (in number of 2-space blocks) + * @returns Array of comment lines with proper indentation + */ +export function formatComment( + includeComments: boolean, + description: string | undefined | null, + indentLevel: number = 0, +): string[] { + if (!includeComments || !description) { + return []; + } + + // Use 2-space indentation consistently + const indent = SPACE_INDENT.repeat(indentLevel); + const lines = description.trim().split('\n'); + + if (lines.length === 1) { + return [`${indent}${LINE_COMMENT_PREFIX}${lines[0]}`]; + } else { + return [ + `${indent}${BLOCK_COMMENT_START}`, + ...lines.map((line) => `${indent} * ${line}`), + `${indent} ${BLOCK_COMMENT_END}`, + ]; + } +} + +export function renderRPCMethod(includeComments: boolean, rpcMethod: RPCMethod): string[] { + const lines: string[] = []; + + if (includeComments && rpcMethod.description) { + lines.push(...formatComment(includeComments, rpcMethod.description, 1)); + } + + lines.push(indentContent(1, `rpc ${rpcMethod.name}(${rpcMethod.request}) returns (${rpcMethod.response}) {}`)); + return lines; +} + +/** + * Map GraphQL type to Protocol Buffer type + * + * Determines the appropriate Protocol Buffer type for a given GraphQL type, + * including the use of wrapper types for nullable scalar fields to distinguish + * between unset fields and zero values. + * + * @param graphqlType - The GraphQL type to convert + * @param ignoreWrapperTypes - If true, do not use wrapper types for nullable scalar fields + * @returns The corresponding Protocol Buffer type name + */ +export function getProtoTypeFromGraphQL( + includeComments: boolean, + graphqlType: GraphQLType, + ignoreWrapperTypes: boolean = false, +): ProtoFieldType { + // Nullable lists need to be handled first, otherwise they will be treated as scalar types + if (isListType(graphqlType) || (isNonNullType(graphqlType) && isListType(graphqlType.ofType))) { + return handleListType(includeComments, graphqlType); + } + // For nullable scalar types, use wrapper types + if (isScalarType(graphqlType)) { + if (ignoreWrapperTypes) { + return { typeName: SCALAR_TYPE_MAP[graphqlType.name] || 'string', isRepeated: false, isWrapper: false }; + } + return { + typeName: SCALAR_WRAPPER_TYPE_MAP[graphqlType.name] || 'google.protobuf.StringValue', + isRepeated: false, + isWrapper: true, + }; + } + + if (isEnumType(graphqlType)) { + return { typeName: graphqlType.name, isRepeated: false, isWrapper: false }; + } + + if (isNonNullType(graphqlType)) { + // For non-null scalar types, use the base type + if (isScalarType(graphqlType.ofType)) { + return { typeName: SCALAR_TYPE_MAP[graphqlType.ofType.name] || 'string', isRepeated: false, isWrapper: false }; + } + + return getProtoTypeFromGraphQL(includeComments, graphqlType.ofType); + } + // Named types (object, interface, union, input) + const namedType = graphqlType as GraphQLNamedType; + if (namedType && typeof namedType.name === 'string') { + return { typeName: namedType.name, isRepeated: false, isWrapper: false }; + } + + return { typeName: 'string', isRepeated: false, isWrapper: false }; // Default fallback +} + +/** + * Converts GraphQL list types to appropriate Protocol Buffer representations. + * + * For non-nullable, single-level lists (e.g., [String!]!), generates simple repeated fields. + * For nullable lists (e.g., [String]) or nested lists (e.g., [[String]]), creates wrapper + * messages to properly handle nullability in proto3. + * + * Examples: + * - [String!]! → repeated string field_name = 1; + * - [String] → ListOfString field_name = 1; (with wrapper message) + * - [[String!]!]! → ListOfListOfString field_name = 1; (with nested wrapper messages) + * - [[String]] → ListOfListOfString field_name = 1; (with nested wrapper messages) + * + * @param graphqlType - The GraphQL list type to convert + * @returns ProtoType object containing the type name and whether it should be repeated + */ +export function handleListType( + includeComments: boolean, + graphqlType: GraphQLList | GraphQLNonNull>, +): ProtoFieldType { + const listType = unwrapNonNullType(graphqlType); + const isNullableList = !isNonNullType(graphqlType); + const isNested = isNestedListType(listType); + + // Simple non-nullable lists can use repeated fields directly + if (!isNullableList && !isNested) { + return { ...getProtoTypeFromGraphQL(includeComments, getNamedType(listType), true), isRepeated: true }; + } + + // Nullable or nested lists need wrapper messages + const baseType = getNamedType(listType); + const nestingLevel = calculateNestingLevel(listType); + + // For nested lists, always use full nesting level to preserve inner list nullability + // For single-level nullable lists, use nesting level 1 + const wrapperNestingLevel = isNested ? nestingLevel : 1; + + // Generate all required wrapper messages + let wrapperName = listNameByNestingLevel(wrapperNestingLevel, baseType); + + // For nested lists, never use repeated at field level to preserve nullability + return { + typeName: wrapperName, + isWrapper: false, + isRepeated: false, + listWrapper: { baseType, nestingLevel: wrapperNestingLevel }, + }; +} + +export function listNameByNestingLevel(nestingLevel: number, baseType: GraphQLNamedType): string { + return `${'ListOf'.repeat(nestingLevel)}${baseType.name}`; +} +/** + * Creates wrapper messages for nullable or nested GraphQL lists. + * + * Generates Protocol Buffer message definitions to handle list nullability and nesting. + * The wrapper messages are stored and later included in the final proto output. + * + * For level 1: Creates simple wrapper like: + * message ListOfString { + * repeated string items = 1; + * } + * + * For level > 1: Creates nested wrapper structures like: + * message ListOfListOfString { + * message List { + * repeated ListOfString items = 1; + * } + * List list = 1; + * } + * + * @param level - The nesting level (1 for simple wrapper, >1 for nested structures) + * @param baseType - The GraphQL base type being wrapped (e.g., String, User, etc.) + * @returns The generated wrapper message name (e.g., "ListOfString", "ListOfListOfUser") + */ +export function createNestedListWrapper(includeComments: boolean, level: number, baseType: GraphQLNamedType): string { + const wrapperName = `${'ListOf'.repeat(level)}${baseType.name}`; + return buildWrapperMessage(includeComments, wrapperName, level, baseType).join('\n'); +} + +/** + * Builds the message lines for a wrapper message + */ +function buildWrapperMessage( + includeComments: boolean, + wrapperName: string, + level: number, + baseType: GraphQLNamedType, +): string[] { + const lines: string[] = []; + + // Add comment if enabled + if (includeComments) { + lines.push(...formatComment(includeComments, `Wrapper message for a list of ${baseType.name}.`, 0)); + } + + const formatIndent = (indent: number, content: string) => { + return ' '.repeat(indent) + content; + }; + + lines.push(`message ${wrapperName} {`); + let innerWrapperName = ''; + if (level > 1) { + innerWrapperName = `${'ListOf'.repeat(level - 1)}${baseType.name}`; + } else { + innerWrapperName = getProtoTypeFromGraphQL(includeComments, baseType, true).typeName; + } + + lines.push( + formatIndent(1, `message List {`), + formatIndent(2, `repeated ${innerWrapperName} items = 1;`), + formatIndent(1, `}`), + formatIndent(1, `List list = 1;`), + formatIndent(0, `}`), + ); + + return lines; +} + +/** + * Indents the content by the given indent level + * @param indentLevel - The indent level + * @param content - The content to indent + * @returns The indented content + */ +const indentContent = (indentLevel: number, content: string): string => SPACE_INDENT.repeat(indentLevel) + content; diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts new file mode 100644 index 0000000000..a2b73ab171 --- /dev/null +++ b/protographic/src/required-fields-visitor.ts @@ -0,0 +1,391 @@ +import { + ASTNode, + ASTVisitor, + DirectiveNode, + DocumentNode, + FieldNode, + getNamedType, + GraphQLField, + GraphQLObjectType, + GraphQLSchema, + GraphQLType, + InlineFragmentNode, + isInterfaceType, + isObjectType, + isUnionType, + Kind, + parse, + SelectionSetNode, + visit, +} from 'graphql'; +import { CompositeMessageKind, ProtoMessage, RPCMethod } from './types'; +import { KEY_DIRECTIVE_NAME } from './string-constants'; +import { + createEntityLookupMethodName, + createRequestMessageName, + createRequiredFieldsMethodName, + createResponseMessageName, + graphqlFieldToProtoField, +} from './naming-conventions'; +import { getProtoTypeFromGraphQL } from './proto-utils'; + +type VisitContext = { + node: T; + key: string | number | undefined; + parent: ASTNode | ReadonlyArray | undefined; + path: ReadonlyArray; + ancestors: ReadonlyArray>; +}; + +type RequiredFieldsVisitorOptions = { + includeComments: boolean; +}; + +export class RequiredFieldsVisitor { + private readonly visitor: ASTVisitor; + private readonly fieldSetDoc: DocumentNode; + + private ancestors: GraphQLObjectType[] = []; + private currentType: GraphQLObjectType | undefined = this.objectType; + private keyDirectives: DirectiveNode[] = []; + private currentKey?: DirectiveNode; + + /** + * Collected RPC methods for the required fields + */ + private rpcMethods: RPCMethod[] = []; + private messageDefinitions: ProtoMessage[] = []; + private requiredFieldMessage: ProtoMessage | undefined; + private current: ProtoMessage | undefined; + private stack: ProtoMessage[] = []; + + private currentInlineFragment?: InlineFragmentNode; + private inlineFragmentStack: InlineFragmentNode[] = []; + + constructor( + private readonly schema: GraphQLSchema, + private readonly objectType: GraphQLObjectType, + private readonly requiredField: GraphQLField, + fieldSet: string, + options: RequiredFieldsVisitorOptions = { + includeComments: false, + }, + ) { + this.resolveKeyDirectives(); + this.fieldSetDoc = parse(`{ ${fieldSet} }`); + this.visitor = this.createASTVisitor(); + } + + public visit(): void { + for (const keyDirective of this.keyDirectives) { + this.currentKey = keyDirective; + visit(this.fieldSetDoc, this.visitor); + } + } + + public getMessageDefinitions(): ProtoMessage[] { + return this.messageDefinitions; + } + + public getRPCMethods(): RPCMethod[] { + return this.rpcMethods; + } + + private resolveKeyDirectives(): void { + this.keyDirectives = this.objectType.astNode?.directives?.filter((d) => d.name.value === KEY_DIRECTIVE_NAME) ?? []; + if (this.keyDirectives.length === 0) { + throw new Error('Object type has to be an entity type to make use of the @requires directive'); + } + } + + private createASTVisitor(): ASTVisitor { + return { + Document: { + enter: (node) => { + this.onEnterDocument(node); + }, + leave: () => { + this.onLeaveDocument(); + }, + }, + Field: { + enter: (node, key, parent, path, ancestors) => { + this.onEnterField({ node, key, parent, path, ancestors }); + }, + }, + InlineFragment: { + enter: (node, key, parent, path, ancestors) => { + this.onEnterInlineFragment({ node, key, parent, path, ancestors }); + }, + leave: (node, key, parent, path, ancestors) => { + this.onLeaveInlineFragment({ node, key, parent, path, ancestors }); + }, + }, + SelectionSet: { + enter: (node, key, parent, path, ancestors) => { + this.onEnterSelectionSet({ node, key, parent, path, ancestors }); + }, + leave: (node, key, parent, path, ancestors) => { + this.onLeaveSelectionSet({ node, key, parent, path, ancestors }); + }, + }, + }; + } + + private onLeaveDocument(): void { + if (this.requiredFieldMessage) { + this.messageDefinitions.push(this.requiredFieldMessage); + } + } + + private onEnterDocument(node: DocumentNode): void { + // TODO: walk for each key directive. + const keyFieldsString = this.getKeyFieldsString(this.currentKey!); + const requiredFieldsMethodName = createRequiredFieldsMethodName( + this.objectType.name, + this.requiredField.name, + keyFieldsString, + ); + + const requestMessageName = createRequestMessageName(requiredFieldsMethodName); + const responseMessageName = createResponseMessageName(requiredFieldsMethodName); + + this.rpcMethods.push({ + name: requiredFieldsMethodName, + request: requestMessageName, + response: responseMessageName, + }); + + // Request messages + const contextMessageName = `${requiredFieldsMethodName}Context`; + this.messageDefinitions.push({ + messageName: requestMessageName, + fields: [ + { + fieldName: 'context', + typeName: contextMessageName, + fieldNumber: 1, + isRepeated: true, + description: `${contextMessageName} provides the context for the required fields method ${requiredFieldsMethodName}.`, + }, + ], + }); + + const fieldsMessageName = `${requiredFieldsMethodName}Fields`; + const entityKeyMessageName = `${createEntityLookupMethodName(this.objectType.name, keyFieldsString)}Key`; + this.messageDefinitions.push({ + messageName: contextMessageName, + fields: [ + { + fieldName: 'key', + typeName: entityKeyMessageName, + fieldNumber: 1, + }, + { + fieldName: 'fields', + typeName: fieldsMessageName, + fieldNumber: 2, + }, + ], + }); + + // Define the prototype for the required fields message. + // this will be added to the message definitions when the document is left. + this.requiredFieldMessage = { + messageName: fieldsMessageName, + fields: [], + }; + + // Response messages + const resultMessageName = `${requiredFieldsMethodName}Result`; + this.messageDefinitions.push({ + messageName: responseMessageName, + fields: [ + { + fieldName: 'result', + typeName: resultMessageName, + fieldNumber: 1, + isRepeated: true, + description: `${resultMessageName} provides the result for the required fields method ${requiredFieldsMethodName}.`, + }, + ], + }); + + // get the type name from the object type + const typeInfo = getProtoTypeFromGraphQL(false, this.requiredField.type); + + this.messageDefinitions.push({ + messageName: resultMessageName, + fields: [ + { + fieldName: graphqlFieldToProtoField(this.requiredField.name), + typeName: typeInfo.typeName, + fieldNumber: 1, + isRepeated: typeInfo.isRepeated, + }, + ], + }); + + this.stack.push(this.requiredFieldMessage); + this.current = this.requiredFieldMessage; + } + + private onEnterField(ctx: VisitContext): void { + if (!this.current) return; + + const fieldDefinition = this.fieldDefinition(ctx.node.name.value); + if (!fieldDefinition) throw new Error(`Field definition not found for field ${ctx.node.name.value}`); + + if (this.isCompositeType(fieldDefinition.type)) { + this.handleCompositeType(fieldDefinition); + } + + const typeInfo = getProtoTypeFromGraphQL(false, fieldDefinition.type); + this.current.fields.push({ + fieldName: graphqlFieldToProtoField(fieldDefinition.name), + typeName: typeInfo.typeName, + fieldNumber: this.current?.fields.length + 1, + isRepeated: typeInfo.isRepeated, + }); + } + + private handleCompositeType(fieldDefinition: GraphQLField): void { + if (!this.current) return; + const compositeType = getNamedType(fieldDefinition.type); + + if (isInterfaceType(compositeType)) { + this.current.compositeType = { + kind: CompositeMessageKind.INTERFACE, + implementingTypes: [], + typeName: compositeType.name, + }; + return; + } + + if (isUnionType(compositeType)) { + this.current.compositeType = { + kind: CompositeMessageKind.UNION, + memberTypes: [], + typeName: compositeType.name, + }; + + return; + } + } + + private onEnterInlineFragment(ctx: VisitContext): void { + if (this.currentInlineFragment) { + this.inlineFragmentStack.push(this.currentInlineFragment); + } + + this.currentInlineFragment = ctx.node; + } + + private onLeaveInlineFragment(ctx: VisitContext): void { + const currentInlineFragment = this.currentInlineFragment; + this.currentInlineFragment = this.inlineFragmentStack.pop() ?? undefined; + + if (!this.current || !this.current.compositeType) return; + + if (this.current.compositeType.kind === CompositeMessageKind.UNION) { + this.current.compositeType.memberTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); + } else { + this.current.compositeType.implementingTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); + } + + } + + private onEnterSelectionSet(ctx: VisitContext): void { + if (!ctx.parent || !this.current) return; + + let currentType: GraphQLType | undefined; + if (this.isFieldNode(ctx.parent)) { + currentType = this.findObjectTypeForField(ctx.parent.name.value) ?? undefined; + if (!currentType) { + // TODO: handle this case. Could be a union or interface type. + return; + } + + } else if (this.isInlineFragmentNode(ctx.parent)) { + const typeName = ctx.parent.typeCondition?.name.value; + if (!typeName) return; + + currentType = this.findObjectType(typeName) ?? undefined; + } else { + return; + } + + if (!this.currentType) return; + + this.ancestors.push(this.currentType); + this.currentType = currentType; + + // Create a new nested message for the current type. + let nested: ProtoMessage = { + messageName: this.currentType?.name ?? '', + fields: [], + }; + + if (!this.current.nestedMessages) { + this.current.nestedMessages = []; + } + + this.current.nestedMessages.push(nested); + + this.stack.push(this.current); + this.current = nested; + } + + private onLeaveSelectionSet(ctx: VisitContext): void { + this.currentType = this.ancestors.pop() ?? this.currentType; + this.current = this.stack.pop(); + } + + private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { + if (Array.isArray(node)) return false; + return (node as ASTNode).kind === Kind.FIELD; + } + + private isInlineFragmentNode(node: ASTNode | ReadonlyArray): node is InlineFragmentNode { + if (Array.isArray(node)) return false; + return (node as ASTNode).kind === Kind.INLINE_FRAGMENT; + } + + // TODO check if this is actually correct. + private findObjectTypeForField(fieldName: string): GraphQLObjectType | undefined { + const fields = this.currentType?.getFields() ?? {}; + const field = fields[fieldName]; + if (!field) return undefined; + + const namedType = getNamedType(field.type); + if (isObjectType(namedType)) { + return namedType; + } + + return undefined; + } + + private fieldDefinition(fieldName: string): GraphQLField | undefined { + return this.currentType?.getFields()[fieldName]; + } + + private findObjectType(typeName: string): GraphQLObjectType | undefined { + const type = this.schema.getTypeMap()[typeName]; + if (!type) return undefined; + + if (!isObjectType(type)) return undefined; + return type; + } + + private getKeyFieldsString(directive: DirectiveNode): string { + const fieldsArg = directive.arguments?.find((arg) => arg.name.value === 'fields'); + if (!fieldsArg) return ''; + + return fieldsArg.value.kind === Kind.STRING ? fieldsArg.value.value : ''; + } + + private isCompositeType(type: GraphQLType): boolean { + const namedType = getNamedType(type); + return isInterfaceType(namedType) || isUnionType(namedType); + } +} diff --git a/protographic/src/sdl-to-proto-visitor.ts b/protographic/src/sdl-to-proto-visitor.ts index 2c0bca586f..6817568c94 100644 --- a/protographic/src/sdl-to-proto-visitor.ts +++ b/protographic/src/sdl-to-proto-visitor.ts @@ -10,9 +10,7 @@ import { GraphQLInputField, GraphQLInputObjectType, GraphQLInterfaceType, - GraphQLList, GraphQLNamedType, - GraphQLNonNull, GraphQLObjectType, GraphQLSchema, GraphQLType, @@ -20,9 +18,7 @@ import { isEnumType, isInputObjectType, isInterfaceType, - isListType, isNamedType, - isNonNullType, isObjectType, isScalarType, isUnionType, @@ -45,36 +41,16 @@ import { import { camelCase } from 'lodash-es'; import { ProtoLock, ProtoLockManager } from './proto-lock.js'; import { CONNECT_FIELD_RESOLVER, CONTEXT, FIELD_ARGS, RESULT } from './string-constants.js'; -import { unwrapNonNullType, isNestedListType, calculateNestingLevel } from './operations/list-type-utils.js'; import { buildProtoOptions, type ProtoOptions } from './proto-options.js'; - -/** - * Maps GraphQL scalar types to Protocol Buffer types - * - * GraphQL has a smaller set of primitive types compared to Protocol Buffers. - * This mapping ensures consistent representation between the two type systems. - */ -const SCALAR_TYPE_MAP: Record = { - ID: 'string', // GraphQL IDs map to Proto strings - String: 'string', // Direct mapping - Int: 'int32', // GraphQL Int is 32-bit signed - Float: 'double', // Using double for GraphQL Float gives better precision - Boolean: 'bool', // Direct mapping -}; - -/** - * Maps GraphQL scalar types to Protocol Buffer wrapper types for nullable fields - * - * These wrapper types allow distinguishing between unset fields and zero values - * in Protocol Buffers, which is important for GraphQL nullable semantics. - */ -const SCALAR_WRAPPER_TYPE_MAP: Record = { - ID: 'google.protobuf.StringValue', - String: 'google.protobuf.StringValue', - Int: 'google.protobuf.Int32Value', - Float: 'google.protobuf.DoubleValue', - Boolean: 'google.protobuf.BoolValue', -}; +import { ProtoFieldType, ProtoMessage, ProtoMessageField } from './types.js'; +import { + buildProtoMessage, + createNestedListWrapper, + formatComment, + getProtoTypeFromGraphQL, + listNameByNestingLevel, + renderRPCMethod, +} from './proto-utils.js'; /** * Generic structure for returning RPC and message definitions @@ -106,14 +82,6 @@ export interface ProtoOption { constant: string; } -/** - * Data structure for formatting message fields - */ -interface ProtoType { - typeName: string; - isRepeated: boolean; -} - /** * Data structure for key directive */ @@ -122,21 +90,6 @@ interface KeyDirective { resolvable: boolean; } -interface ProtoMessageField { - fieldName: string; - typeName: string; - fieldNumber: number; - isRepeated?: boolean; - description?: string; -} - -interface ProtoMessage { - messageName: string; - reservedNumbers?: string; - description?: string; - fields: ProtoMessageField[]; -} - /** * Visitor that converts GraphQL SDL to Protocol Buffer text definition * @@ -250,6 +203,120 @@ export class GraphQLToProtoTextVisitor { } } + /** + * Visit the GraphQL schema to generate Proto buffer definition + * + * @returns The complete Protocol Buffer definition as a string + */ + public visit(): string { + // Collect RPC methods and message definitions from all sources + const resolverResult = this.collectResolverRpcMethods(); + const entityResult = this.collectEntityRpcMethods(); + const queryResult = this.collectQueryRpcMethods(); + const mutationResult = this.collectMutationRpcMethods(); + + // Combine all RPC methods and message definitions + const allRpcMethods = [ + ...entityResult.rpcMethods, + ...queryResult.rpcMethods, + ...mutationResult.rpcMethods, + ...resolverResult.rpcMethods, + ]; + const allMethodNames = [ + ...entityResult.methodNames, + ...queryResult.methodNames, + ...mutationResult.methodNames, + ...resolverResult.methodNames, + ]; + + const allMessageDefinitions = [ + ...entityResult.messageDefinitions, + ...queryResult.messageDefinitions, + ...mutationResult.messageDefinitions, + ...resolverResult.messageDefinitions, + ]; + + // Add all types from the schema to the queue that weren't already queued + this.queueAllSchemaTypes(); + + // Process all complex types from the message queue to determine if wrapper types are needed + this.processMessageQueue(); + + // Add wrapper import if needed + if (this.usesWrapperTypes) { + this.addImport('google/protobuf/wrappers.proto'); + } + + // Build the complete proto file + let protoContent: string[] = []; + + // Add the header (syntax, package, imports, options) + protoContent.push(...this.buildProtoHeader()); + + // Add a service description comment + if (this.includeComments) { + const serviceComment = `Service definition for ${this.serviceName}`; + protoContent.push(...this.formatComment(serviceComment, 0)); // Top-level comment, no indent + } + + // Add service block containing RPC methods + protoContent.push(`service ${this.serviceName} {`); + this.indent++; + + // Sort method names deterministically by alphabetical order + const orderedMethodNames = [...allMethodNames].sort(); + + // Add RPC methods in the ordered sequence + for (const methodName of orderedMethodNames) { + const methodIndex = allMethodNames.indexOf(methodName); + if (methodIndex !== -1) { + // Handle multi-line RPC definitions that include comments + const rpcMethodText = allRpcMethods[methodIndex]; + if (rpcMethodText.includes('\n')) { + // For multi-line RPC method definitions (with comments), add each line separately + const lines = rpcMethodText.split('\n'); + protoContent.push(...lines); + } else { + protoContent.push(`${rpcMethodText}`); + } + } + } + + // Close service definition + this.indent--; + protoContent.push('}'); + protoContent.push(''); + + // Add all wrapper messages first since they might be referenced by other messages + if (this.nestedListWrappers.size > 0) { + // Sort the wrappers by name for deterministic output + const sortedWrapperNames = Array.from(this.nestedListWrappers.keys()).sort(); + for (const wrapperName of sortedWrapperNames) { + protoContent.push(this.nestedListWrappers.get(wrapperName)!); + } + } + + // Add all message definitions + for (const messageDef of allMessageDefinitions) { + protoContent.push(messageDef); + } + + protoContent = this.trimEmptyLines(protoContent); + this.protoText = this.trimEmptyLines(this.protoText); + + if (this.protoText.length > 0) { + protoContent.push(''); + } + + // Add all processed types from protoText (populated by processMessageQueue) + protoContent.push(...this.protoText); + + // Store the generated lock data for retrieval + this.generatedLockData = this.lockManager.getLockData(); + + return protoContent.join('\n'); + } + /** * Initialize the field numbers map from the lock data to preserve field numbers * even when fields are removed and later re-added @@ -476,121 +543,6 @@ export class GraphQLToProtoTextVisitor { return header; } - /** - * Visit the GraphQL schema to generate Proto buffer definition - * - * @returns The complete Protocol Buffer definition as a string - */ - public visit(): string { - // Collect RPC methods and message definitions from all sources - const resolverResult = this.collectResolverRpcMethods(); - const entityResult = this.collectEntityRpcMethods(); - const queryResult = this.collectQueryRpcMethods(); - const mutationResult = this.collectMutationRpcMethods(); - - // Combine all RPC methods and message definitions - const allRpcMethods = [ - ...entityResult.rpcMethods, - ...queryResult.rpcMethods, - ...mutationResult.rpcMethods, - ...resolverResult.rpcMethods, - ]; - const allMethodNames = [ - ...entityResult.methodNames, - ...queryResult.methodNames, - ...mutationResult.methodNames, - ...resolverResult.methodNames, - ]; - - const allMessageDefinitions = [ - ...entityResult.messageDefinitions, - ...queryResult.messageDefinitions, - ...mutationResult.messageDefinitions, - ...resolverResult.messageDefinitions, - ]; - - // Add all types from the schema to the queue that weren't already queued - this.queueAllSchemaTypes(); - - // Process all complex types from the message queue to determine if wrapper types are needed - this.processMessageQueue(); - - // Add wrapper import if needed - if (this.usesWrapperTypes) { - this.addImport('google/protobuf/wrappers.proto'); - } - - // Build the complete proto file - let protoContent: string[] = []; - - // Add the header (syntax, package, imports, options) - protoContent.push(...this.buildProtoHeader()); - - // Add a service description comment - if (this.includeComments) { - const serviceComment = `Service definition for ${this.serviceName}`; - protoContent.push(...this.formatComment(serviceComment, 0)); // Top-level comment, no indent - } - - // Add service block containing RPC methods - protoContent.push(`service ${this.serviceName} {`); - this.indent++; - - // Sort method names deterministically by alphabetical order - const orderedMethodNames = [...allMethodNames].sort(); - - // Add RPC methods in the ordered sequence - for (const methodName of orderedMethodNames) { - const methodIndex = allMethodNames.indexOf(methodName); - if (methodIndex !== -1) { - // Handle multi-line RPC definitions that include comments - const rpcMethodText = allRpcMethods[methodIndex]; - if (rpcMethodText.includes('\n')) { - // For multi-line RPC method definitions (with comments), add each line separately - const lines = rpcMethodText.split('\n'); - protoContent.push(...lines); - } else { - // For simple one-line RPC method definitions (ensure 2-space indentation) - protoContent.push(` ${rpcMethodText}`); - } - } - } - - // Close service definition - this.indent--; - protoContent.push('}'); - protoContent.push(''); - - // Add all wrapper messages first since they might be referenced by other messages - if (this.nestedListWrappers.size > 0) { - // Sort the wrappers by name for deterministic output - const sortedWrapperNames = Array.from(this.nestedListWrappers.keys()).sort(); - for (const wrapperName of sortedWrapperNames) { - protoContent.push(this.nestedListWrappers.get(wrapperName)!); - } - } - - // Add all message definitions - for (const messageDef of allMessageDefinitions) { - protoContent.push(messageDef); - } - - protoContent = this.trimEmptyLines(protoContent); - this.protoText = this.trimEmptyLines(this.protoText); - - if (this.protoText.length > 0) { - protoContent.push(''); - } - - // Add all processed types from protoText (populated by processMessageQueue) - protoContent.push(...this.protoText); - - // Store the generated lock data for retrieval - this.generatedLockData = this.lockManager.getLockData(); - - return protoContent.join('\n'); - } - /** * Trim empty lines from the beginning and end of the array */ @@ -638,56 +590,55 @@ export class GraphQLToProtoTextVisitor { continue; } - // Check if this is an entity type (has @key directive) - if (isObjectType(type)) { - const keyDirectives = this.getKeyDirectives(type); - - if (keyDirectives.length > 0) { - // Queue this type for message generation (only once) - this.queueTypeForProcessing(type); - - // Normalize keys by sorting fields alphabetically and deduplicating - - const normalizedKeysSet = new Set(); - for (const keyDirective of keyDirectives) { - const keyInfo = this.getKeyInfoFromDirective(keyDirective); - if (!keyInfo) continue; - - const { keyString, resolvable } = keyInfo; - if (!resolvable) continue; - - const normalizedKey = keyString - .split(/[,\s]+/) - .filter((field) => field.length > 0) - .sort() - .join(' '); - - normalizedKeysSet.add(normalizedKey); - } - - // Process each normalized key - for (const normalizedKeyString of normalizedKeysSet) { - const methodName = createEntityLookupMethodName(typeName, normalizedKeyString); - - const requestName = createRequestMessageName(methodName); - const responseName = createResponseMessageName(methodName); - - // Add method name and RPC method with description from the entity type - result.methodNames.push(methodName); - const keyFields = normalizedKeyString.split(' '); - const keyDescription = keyFields.length === 1 ? keyFields[0] : keyFields.join(' and '); - const description = `Lookup ${typeName} entity by ${keyDescription}${ - type.description ? ': ' + type.description : '' - }`; - result.rpcMethods.push(this.createRpcMethod(methodName, requestName, responseName, description)); - - // Create request and response messages for this key combination - result.messageDefinitions.push( - ...this.createKeyRequestMessage(typeName, requestName, normalizedKeyString, responseName), - ); - result.messageDefinitions.push(...this.createKeyResponseMessage(typeName, responseName, requestName)); - } - } + // Skip non-object types + if (!isObjectType(type)) continue; + const keyDirectives = this.getKeyDirectives(type); + // Skip types that don't have @key directives + if (keyDirectives.length === 0) continue; + + // Queue this type for message generation (only once) + this.queueTypeForProcessing(type); + + // Normalize keys by sorting fields alphabetically and deduplicating + + const normalizedKeysSet = new Set(); + for (const keyDirective of keyDirectives) { + const keyInfo = this.getKeyInfoFromDirective(keyDirective); + if (!keyInfo) continue; + + const { keyString, resolvable } = keyInfo; + if (!resolvable) continue; + + const normalizedKey = keyString + .split(/[,\s]+/) + .filter((field) => field.length > 0) + .sort() + .join(' '); + + normalizedKeysSet.add(normalizedKey); + } + + // Process each normalized key + for (const normalizedKeyString of normalizedKeysSet) { + const methodName = createEntityLookupMethodName(typeName, normalizedKeyString); + + const requestName = createRequestMessageName(methodName); + const responseName = createResponseMessageName(methodName); + + // Add method name and RPC method with description from the entity type + result.methodNames.push(methodName); + const keyFields = normalizedKeyString.split(' '); + const keyDescription = keyFields.length === 1 ? keyFields[0] : keyFields.join(' and '); + const description = `Lookup ${typeName} entity by ${keyDescription}${ + type.description ? ': ' + type.description : '' + }`; + result.rpcMethods.push(this.createRpcMethod(methodName, requestName, responseName, description)); + + // Create request and response messages for this key combination + result.messageDefinitions.push( + ...this.createKeyRequestMessage(typeName, requestName, normalizedKeyString, responseName), + ); + result.messageDefinitions.push(...this.createKeyResponseMessage(typeName, responseName, requestName)); } } @@ -789,15 +740,14 @@ export class GraphQLToProtoTextVisitor { responseName: string, description?: string | null, ): string { - if (!this.includeComments || !description) { - return `rpc ${methodName}(${requestName}) returns (${responseName}) {}`; - } - - // RPC method comments should be indented 1 level (2 spaces) - const commentLines = this.formatComment(description, 1); - const methodLine = ` rpc ${methodName}(${requestName}) returns (${responseName}) {}`; + const rpcLines = renderRPCMethod(this.includeComments, { + name: methodName, + request: requestName, + response: responseName, + description: description, + }); - return [...commentLines, methodLine].join('\n'); + return rpcLines.join('\n'); } /** @@ -1492,13 +1442,15 @@ Example: return; } - const fieldsWithoutArguments = Object.values(type.getFields()).filter((field) => field.args.length === 0); + // Filter out fields that have arguments as those are handled in separate resolver rpcs + const validFields = Object.values(type.getFields()).filter((field) => field.args.length === 0); + // TODO: if we are inside of an entity type, we need to filter out fields that have @requires and @external directives // Check for field removals if lock data exists for this type const lockData = this.lockManager.getLockData(); if (lockData.messages[type.name]) { const originalFieldNames = Object.keys(lockData.messages[type.name].fields); - const currentFieldNames = fieldsWithoutArguments.map((field) => field.name); + const currentFieldNames = validFields.map((field) => field.name); this.trackRemovedFields(type.name, originalFieldNames, currentFieldNames); } @@ -1932,171 +1884,29 @@ Example: * @param ignoreWrapperTypes - If true, do not use wrapper types for nullable scalar fields * @returns The corresponding Protocol Buffer type name */ - private getProtoTypeFromGraphQL(graphqlType: GraphQLType, ignoreWrapperTypes: boolean = false): ProtoType { - // Nullable lists need to be handled first, otherwise they will be treated as scalar types - if (isListType(graphqlType) || (isNonNullType(graphqlType) && isListType(graphqlType.ofType))) { - return this.handleListType(graphqlType); - } - // For nullable scalar types, use wrapper types - if (isScalarType(graphqlType)) { - if (ignoreWrapperTypes) { - return { typeName: SCALAR_TYPE_MAP[graphqlType.name] || 'string', isRepeated: false }; - } - this.usesWrapperTypes = true; // Track that we're using wrapper types - return { - typeName: SCALAR_WRAPPER_TYPE_MAP[graphqlType.name] || 'google.protobuf.StringValue', - isRepeated: false, - }; - } - - if (isEnumType(graphqlType)) { - return { typeName: graphqlType.name, isRepeated: false }; - } + private getProtoTypeFromGraphQL(graphqlType: GraphQLType, ignoreWrapperTypes: boolean = false): ProtoFieldType { + const protoFieldType = getProtoTypeFromGraphQL(this.includeComments, graphqlType, ignoreWrapperTypes); + if (!ignoreWrapperTypes && protoFieldType.isWrapper) { + this.usesWrapperTypes = true; + } + + const listWrapper = protoFieldType.listWrapper; + if (listWrapper) { + for (let i = 1; i <= listWrapper.nestingLevel; i++) { + const wrapperName = listNameByNestingLevel(i, listWrapper.baseType); + if (this.processedTypes.has(wrapperName) || this.nestedListWrappers.has(wrapperName)) { + continue; + } - if (isNonNullType(graphqlType)) { - // For non-null scalar types, use the base type - if (isScalarType(graphqlType.ofType)) { - return { typeName: SCALAR_TYPE_MAP[graphqlType.ofType.name] || 'string', isRepeated: false }; + const wrapperMessage = createNestedListWrapper(this.includeComments, i, listWrapper.baseType); + this.nestedListWrappers.set(wrapperName, wrapperMessage); + this.processedTypes.add(wrapperName); } - - return this.getProtoTypeFromGraphQL(graphqlType.ofType); - } - // Named types (object, interface, union, input) - const namedType = graphqlType as GraphQLNamedType; - if (namedType && typeof namedType.name === 'string') { - return { typeName: namedType.name, isRepeated: false }; } - return { typeName: 'string', isRepeated: false }; // Default fallback + return protoFieldType; } - /** - * Converts GraphQL list types to appropriate Protocol Buffer representations. - * - * For non-nullable, single-level lists (e.g., [String!]!), generates simple repeated fields. - * For nullable lists (e.g., [String]) or nested lists (e.g., [[String]]), creates wrapper - * messages to properly handle nullability in proto3. - * - * Examples: - * - [String!]! → repeated string field_name = 1; - * - [String] → ListOfString field_name = 1; (with wrapper message) - * - [[String!]!]! → ListOfListOfString field_name = 1; (with nested wrapper messages) - * - [[String]] → ListOfListOfString field_name = 1; (with nested wrapper messages) - * - * @param graphqlType - The GraphQL list type to convert - * @returns ProtoType object containing the type name and whether it should be repeated - */ - private handleListType(graphqlType: GraphQLList | GraphQLNonNull>): ProtoType { - const listType = unwrapNonNullType(graphqlType); - const isNullableList = !isNonNullType(graphqlType); - const isNested = isNestedListType(listType); - - // Simple non-nullable lists can use repeated fields directly - if (!isNullableList && !isNested) { - return { ...this.getProtoTypeFromGraphQL(getNamedType(listType), true), isRepeated: true }; - } - - // Nullable or nested lists need wrapper messages - const baseType = getNamedType(listType); - const nestingLevel = calculateNestingLevel(listType); - - // For nested lists, always use full nesting level to preserve inner list nullability - // For single-level nullable lists, use nesting level 1 - const wrapperNestingLevel = isNested ? nestingLevel : 1; - - // Generate all required wrapper messages - let wrapperName = ''; - for (let i = 1; i <= wrapperNestingLevel; i++) { - wrapperName = this.createNestedListWrapper(i, baseType); - } - - // For nested lists, never use repeated at field level to preserve nullability - return { typeName: wrapperName, isRepeated: false }; - } - - /** - * Creates wrapper messages for nullable or nested GraphQL lists. - * - * Generates Protocol Buffer message definitions to handle list nullability and nesting. - * The wrapper messages are stored and later included in the final proto output. - * - * For level 1: Creates simple wrapper like: - * message ListOfString { - * repeated string items = 1; - * } - * - * For level > 1: Creates nested wrapper structures like: - * message ListOfListOfString { - * message List { - * repeated ListOfString items = 1; - * } - * List list = 1; - * } - * - * @param level - The nesting level (1 for simple wrapper, >1 for nested structures) - * @param baseType - The GraphQL base type being wrapped (e.g., String, User, etc.) - * @returns The generated wrapper message name (e.g., "ListOfString", "ListOfListOfUser") - */ - private createNestedListWrapper(level: number, baseType: GraphQLNamedType): string { - const wrapperName = `${'ListOf'.repeat(level)}${baseType.name}`; - - // Return existing wrapper if already created - if (this.processedTypes.has(wrapperName) || this.nestedListWrappers.has(wrapperName)) { - return wrapperName; - } - - this.processedTypes.add(wrapperName); - - const messageLines = this.buildWrapperMessage(wrapperName, level, baseType); - this.nestedListWrappers.set(wrapperName, messageLines.join('\n')); - - return wrapperName; - } - - /** - * Builds the message lines for a wrapper message - */ - private buildWrapperMessage(wrapperName: string, level: number, baseType: GraphQLNamedType): string[] { - const lines: string[] = []; - - // Add comment if enabled - if (this.includeComments) { - lines.push(...this.formatComment(`Wrapper message for a list of ${baseType.name}.`, 0)); - } - - const formatIndent = (indent: number, content: string) => { - return ' '.repeat(indent) + content; - }; - - lines.push(`message ${wrapperName} {`); - let innerWrapperName = ''; - if (level > 1) { - innerWrapperName = `${'ListOf'.repeat(level - 1)}${baseType.name}`; - } else { - innerWrapperName = this.getProtoTypeFromGraphQL(baseType, true).typeName; - } - - lines.push( - formatIndent(1, `message List {`), - formatIndent(2, `repeated ${innerWrapperName} items = 1;`), - formatIndent(1, `}`), - formatIndent(1, `List list = 1;`), - formatIndent(0, `}`), - ); - - return lines; - } - - /** - * Get indentation based on the current level - * - * Helper method to maintain consistent indentation in the output. - * - * @returns String with spaces for the current indentation level - */ - private getIndent(): string { - return ' '.repeat(this.indent); - } /** * Get the generated lock data after visiting @@ -2166,19 +1976,7 @@ Example: * @returns Array of comment lines with proper indentation */ private formatComment(description: string | undefined | null, indentLevel: number = 0): string[] { - if (!this.includeComments || !description) { - return []; - } - - // Use 2-space indentation consistently - const indent = ' '.repeat(indentLevel); - const lines = description.trim().split('\n'); - - if (lines.length === 1) { - return [`${indent}// ${lines[0]}`]; - } else { - return [`${indent}/*`, ...lines.map((line) => `${indent} * ${line}`), `${indent} */`]; - } + return formatComment(this.includeComments, description, indentLevel); } /** @@ -2187,34 +1985,6 @@ Example: * @returns The message definition */ private buildMessage(message: ProtoMessage): string[] { - const messageLines = this.formatComment(message.description, 0); - messageLines.push(`message ${message.messageName} {`); - if (message.reservedNumbers && message.reservedNumbers.length > 0) { - messageLines.push(this.formatIndent(1, `reserved ${message.reservedNumbers};`)); - } - - message.fields.forEach((field) => { - if (field.description) { - messageLines.push(...this.formatComment(field.description, 1)); - } - - let repeated = field.isRepeated ? 'repeated ' : ''; - - messageLines.push( - this.formatIndent(1, `${repeated}${field.typeName} ${field.fieldName} = ${field.fieldNumber};`), - ); - }); - messageLines.push('}', ''); - return messageLines; - } - - /** - * Formats the indent for the content - * @param indent - The indent level - * @param content - The content to format - * @returns The formatted content - */ - private formatIndent(indent: number, content: string): string { - return ' '.repeat(indent) + content; + return buildProtoMessage(this.includeComments, message); } } diff --git a/protographic/src/string-constants.ts b/protographic/src/string-constants.ts index 8f5af6760f..4f4c73ddc6 100644 --- a/protographic/src/string-constants.ts +++ b/protographic/src/string-constants.ts @@ -1,3 +1,4 @@ +export const KEY_DIRECTIVE_NAME = 'key'; export const CONNECT_FIELD_RESOLVER = 'connect__fieldResolver'; export const CONTEXT = 'context'; export const FIELD_ARGS = 'field_args'; diff --git a/protographic/src/types.ts b/protographic/src/types.ts index cb36fa64ae..ed7a6e0b76 100644 --- a/protographic/src/types.ts +++ b/protographic/src/types.ts @@ -1,5 +1,36 @@ +import { LargeNumberLike } from 'crypto'; +import { GraphQLNamedType } from 'graphql'; import protobuf from 'protobufjs'; +/** + * Maps GraphQL scalar types to Protocol Buffer types + * + * GraphQL has a smaller set of primitive types compared to Protocol Buffers. + * This mapping ensures consistent representation between the two type systems. + */ +export const SCALAR_TYPE_MAP: Record = { + ID: 'string', // GraphQL IDs map to Proto strings + String: 'string', // Direct mapping + Int: 'int32', // GraphQL Int is 32-bit signed + Float: 'double', // Using double for GraphQL Float gives better precision + Boolean: 'bool', // Direct mapping +}; + +/** + * Maps GraphQL scalar types to Protocol Buffer wrapper types for nullable fields + * + * These wrapper types allow distinguishing between unset fields and zero values + * in Protocol Buffers, which is important for GraphQL nullable semantics. + */ +export const SCALAR_WRAPPER_TYPE_MAP: Record = { + ID: 'google.protobuf.StringValue', + String: 'google.protobuf.StringValue', + Int: 'google.protobuf.Int32Value', + Float: 'google.protobuf.DoubleValue', + Boolean: 'google.protobuf.BoolValue', +}; + + /** * Protocol Buffer idempotency levels for RPC methods * @see https://protobuf.dev/reference/protobuf/google.protobuf/#idempotency-level @@ -12,3 +43,95 @@ export type IdempotencyLevel = 'NO_SIDE_EFFECTS' | 'DEFAULT'; export interface MethodWithIdempotency extends protobuf.Method { idempotencyLevel?: IdempotencyLevel; } + +/** + * Represents a gRPC method definition + * + * example: rpc GetUser(GetUserRequest) returns (GetUserResponse) {} + */ +export type RPCMethod = { + name: string; + request: string; + response: string; + description?: string | null; +} + +/** + * Represents a field in a proto message + */ +export interface ProtoMessageField { + fieldName: string; + typeName: string; + fieldNumber: number; + isRepeated?: boolean; + description?: string; +} + +/** + * Represents a proto message + */ +export interface ProtoMessage { + messageName: string; + reservedNumbers?: string; + description?: string; + fields: ProtoMessageField[]; + + /** + * Nested messages within this message (if any) + * Example: message User { + * message Address { + * string street = 1; + * string city = 2; + * string state = 3; + * string zip = 4; + * } + * Address address = 1; + */ + nestedMessages?: ProtoMessage[]; + compositeType?: CompositeMessageDefinition; +} + +export interface ListWrapper { + baseType: GraphQLNamedType; + nestingLevel: number; +} + +/** + * Data structure for formatting message fields + */ +export type ProtoFieldType ={ + typeName: string; + isWrapper: boolean; + isRepeated: boolean; + listWrapper?: ListWrapper; +} + + +export enum CompositeMessageKind { + INTERFACE, + UNION, +} + +export type CompositeMessageDefinition = InterfaceMessageDefinition | UnionMessageDefinition; + +export type InterfaceMessageDefinition = { + kind: CompositeMessageKind.INTERFACE; + description?: string; + typeName: string; + implementingTypes: string[]; +} + +export type UnionMessageDefinition = { + kind: CompositeMessageKind.UNION; + description?: string; + typeName: string; + memberTypes: string[]; +} + +export function isInterfaceMessageDefinition(message: CompositeMessageDefinition): message is InterfaceMessageDefinition { + return message.kind === CompositeMessageKind.INTERFACE; +} + +export function isUnionMessageDefinition(message: CompositeMessageDefinition): message is UnionMessageDefinition { + return message.kind === CompositeMessageKind.UNION; +} \ No newline at end of file diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts new file mode 100644 index 0000000000..a9d7e5d9cc --- /dev/null +++ b/protographic/tests/field-set/01-basics.test.ts @@ -0,0 +1,868 @@ +import { describe, expect, it } from 'vitest'; +import { RequiredFieldsVisitor } from '../../src'; +import { buildSchema, GraphQLObjectType, StringValueNode, visit } from 'graphql'; +import { buildProtoMessage } from '../../src/proto-utils'; +import { + CompositeMessageKind, + isUnionMessageDefinition, + ProtoMessageField, + UnionMessageDefinition, +} from '../../src/types'; + +describe('Field Set Visitor', () => { + it('should visit a field set for a scalar type', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + name: String! @external + age: Int @requires(fields: "name") + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['age']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserAgeById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserAgeByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserAgeByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + expect(fieldMessage?.fields?.[0].fieldName).toBe('name'); + expect(fieldMessage?.fields?.[0].typeName).toBe('string'); + expect(fieldMessage?.fields?.[0].fieldNumber).toBe(1); + expect(fieldMessage?.fields?.[0].isRepeated).toBe(false); + }); + it('should visit a field set for an object type', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + description: String! @external + details: Details! @requires(fields: "description") + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = `description`; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'description', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, + }); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); + }); + + it('should visit a field set for a list type', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + descriptions: [String!]! @external + details: [Details!]! @requires(fields: "descriptions") + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'descriptions', + typeName: 'string', + fieldNumber: 1, + isRepeated: true, + }); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: true, + }); + }); + + it('should visit a field set for nullable list types', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + descriptions: [String!] @external + details: [Details!] @requires(fields: "descriptions") + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = `descriptions`; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'descriptions', + typeName: 'ListOfString', + fieldNumber: 1, + isRepeated: false, + }); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'ListOfDetails', + fieldNumber: 1, + isRepeated: false, + }); + }); + + it('should visit a field set for multiple field selections', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + descriptions: [String!] @external + field: String! @external + otherField: String! @external + details: [Details!] @requires(fields: "descriptions field otherField") + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(3); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'descriptions', + typeName: 'ListOfString', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.fields[1], { + fieldName: 'field', + typeName: 'string', + fieldNumber: 2, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.fields[2], { + fieldName: 'other_field', + typeName: 'string', + fieldNumber: 3, + isRepeated: false, + }); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'ListOfDetails', + fieldNumber: 1, + isRepeated: false, + }); + }); + + it('should visit a field set with nested field selections', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + description: Description! @external + details: Details! @requires(fields: "description { title score }") + } + + type Description { + title: String! + score: Int! + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'description', + typeName: 'Description', + fieldNumber: 1, + isRepeated: false, + }); + expect(fieldMessage?.nestedMessages).toHaveLength(1); + expect(fieldMessage?.nestedMessages?.[0].messageName).toBe('Description'); + expect(fieldMessage?.nestedMessages?.[0].fields).toHaveLength(2); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].fields[0], { + fieldName: 'title', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].fields[1], { + fieldName: 'score', + typeName: 'int32', + fieldNumber: 2, + isRepeated: false, + }); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); + }); + + it('should visit a field set with multiple nested field selections', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + description: Description! @external + details: Details! @requires(fields: "description { title score address { street city state zip } }") + } + + type Description { + title: String! + score: Int! + address: Address! + } + + type Address { + street: String! + city: String! + state: String! + zip: String! + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'description', + typeName: 'Description', + fieldNumber: 1, + isRepeated: false, + }); + expect(fieldMessage?.nestedMessages).toHaveLength(1); + expect(fieldMessage?.nestedMessages?.[0].messageName).toBe('Description'); + expect(fieldMessage?.nestedMessages?.[0].fields).toHaveLength(3); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].fields[0], { + fieldName: 'title', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].fields[1], { + fieldName: 'score', + typeName: 'int32', + fieldNumber: 2, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].fields[2], { + fieldName: 'address', + typeName: 'Address', + fieldNumber: 3, + isRepeated: false, + }); + expect(fieldMessage?.nestedMessages?.[0].nestedMessages).toHaveLength(1); + expect(fieldMessage?.nestedMessages?.[0].nestedMessages?.[0].messageName).toBe('Address'); + expect(fieldMessage?.nestedMessages?.[0].nestedMessages?.[0].fields).toHaveLength(4); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].nestedMessages?.[0].fields[0], { + fieldName: 'street', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].nestedMessages?.[0].fields[1], { + fieldName: 'city', + typeName: 'string', + fieldNumber: 2, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].nestedMessages?.[0].fields[2], { + fieldName: 'state', + typeName: 'string', + fieldNumber: 3, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.nestedMessages?.[0].nestedMessages?.[0].fields[3], { + fieldName: 'zip', + typeName: 'string', + fieldNumber: 4, + isRepeated: false, + }); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); + }); + + it('should visit a field set for a union type', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + pet: Animal! @external + name: String! @external + details: Details! @requires(fields: "pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } name") + } + + union Animal = Cat | Dog + + type Cat { + name: String! + catBreed: String! + } + + type Dog { + name: String! + dogBreed: String! + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(2); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'pet', + typeName: 'Animal', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.fields[1], { + fieldName: 'name', + typeName: 'string', + fieldNumber: 2, + isRepeated: false, + }); + + const compositeType = fieldMessage?.compositeType; + expect(compositeType).toBeDefined(); + expect(compositeType?.kind).toBe(CompositeMessageKind.UNION); + expect(compositeType?.typeName).toBe('Animal'); + expect(isUnionMessageDefinition(compositeType!)).toBe(true); + const unionMessageDefinition = compositeType! as UnionMessageDefinition; + expect(unionMessageDefinition.memberTypes).toHaveLength(2); + expect(unionMessageDefinition.memberTypes[0]).toBe('Cat'); + expect(unionMessageDefinition.memberTypes[1]).toBe('Dog'); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); + + const messageLines = buildProtoMessage(true, fieldMessage!).join('\n'); + + /* + message RequireUserDetailsByIdFields { + mesage Cat { + string name = 1; + string catBreed = 2; + } + + message Dog { + string name = 1; + string dogBreed = 2; + } + + message Animal { + oneof value { + Cat cat = 1; + Dog dog = 2; + } + } + + Animal pet = 1; + } + */ + + expect(messageLines).toMatchInlineSnapshot(` + "message RequireUserDetailsByIdFields { + message Cat { + string name = 1; + string cat_breed = 2; + } + + message Dog { + string name = 1; + string dog_breed = 2; + } + + message Animal { + oneof value { + Cat cat = 1; + Dog dog = 2; + } + } + Animal pet = 1; + string name = 2; + } + " + `); + }); + + it('should visit a field set with nested field selections and a union type', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + description: Description! @external + details: Details! @requires(fields: "description { title score pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } }") + } + + type Description { + title: String! + score: Int! + pet: Animal! + } + + union Animal = Cat | Dog + + type Cat { + name: String! + catBreed: String! + } + + type Dog { + name: String! + dogBreed: String! + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + expect(fieldMessage?.fields[0].fieldName).toBe('description'); + expect(fieldMessage?.fields[0].typeName).toBe('Description'); + expect(fieldMessage?.fields[0].fieldNumber).toBe(1); + expect(fieldMessage?.fields[0].isRepeated).toBe(false); + + // Check for nested Description message + expect(fieldMessage?.nestedMessages).toHaveLength(1); + const descriptionMessage = fieldMessage?.nestedMessages?.[0]; + expect(descriptionMessage?.messageName).toBe('Description'); + expect(descriptionMessage?.fields).toHaveLength(3); + + // Check Description fields + expect(descriptionMessage?.fields[0].fieldName).toBe('title'); + expect(descriptionMessage?.fields[0].typeName).toBe('string'); + expect(descriptionMessage?.fields[0].fieldNumber).toBe(1); + expect(descriptionMessage?.fields[0].isRepeated).toBe(false); + + expect(descriptionMessage?.fields[1].fieldName).toBe('score'); + expect(descriptionMessage?.fields[1].typeName).toBe('int32'); + expect(descriptionMessage?.fields[1].fieldNumber).toBe(2); + expect(descriptionMessage?.fields[1].isRepeated).toBe(false); + + expect(descriptionMessage?.fields[2].fieldName).toBe('pet'); + expect(descriptionMessage?.fields[2].typeName).toBe('Animal'); + expect(descriptionMessage?.fields[2].fieldNumber).toBe(3); + expect(descriptionMessage?.fields[2].isRepeated).toBe(false); + + // Check for union composite type on Description message + const compositeType = descriptionMessage?.compositeType; + expect(compositeType).toBeDefined(); + expect(compositeType?.kind).toBe(CompositeMessageKind.UNION); + expect(compositeType?.typeName).toBe('Animal'); + expect(isUnionMessageDefinition(compositeType!)).toBe(true); + const unionMessageDefinition = compositeType! as UnionMessageDefinition; + expect(unionMessageDefinition.memberTypes).toHaveLength(2); + expect(unionMessageDefinition.memberTypes).toEqual(expect.arrayContaining(['Cat', 'Dog'])); + + let resultMessage = messageDefinitions.find( + (message) => message.messageName === 'RequireUserDetailsByIdResult', + ); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + expect(resultMessage?.fields[0].fieldName).toBe('details'); + expect(resultMessage?.fields[0].typeName).toBe('Details'); + expect(resultMessage?.fields[0].fieldNumber).toBe(1); + expect(resultMessage?.fields[0].isRepeated).toBe(false); + }); +}); + +const assertFieldMessage = ( + field: ProtoMessageField | undefined, + expected: { fieldName: string; typeName: string; fieldNumber: number; isRepeated: boolean }, +) => { + expect(field).toBeDefined(); + expect(field?.fieldName).toBe(expected.fieldName); + expect(field?.typeName).toBe(expected.typeName); + expect(field?.fieldNumber).toBe(expected.fieldNumber); + expect(field?.isRepeated).toBe(expected.isRepeated); +}; From 0fb9fb5b367ff37cc21de7cb40b5f5ea20f42161 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Mon, 5 Jan 2026 15:55:03 +0100 Subject: [PATCH 02/32] feat: include logic for requires in the proto generator --- protographic/src/naming-conventions.ts | 11 +++ protographic/src/required-fields-visitor.ts | 7 +- protographic/src/sdl-to-proto-visitor.ts | 76 ++++++++++++++-- protographic/src/string-constants.ts | 2 + .../tests/sdl-to-proto/04-federation.test.ts | 91 +++++++++++++++++++ 5 files changed, 178 insertions(+), 9 deletions(-) diff --git a/protographic/src/naming-conventions.ts b/protographic/src/naming-conventions.ts index 73e141c940..7ff1502825 100644 --- a/protographic/src/naming-conventions.ts +++ b/protographic/src/naming-conventions.ts @@ -59,6 +59,17 @@ export function createEntityLookupMethodName(typeName: string, keyString: string return `Lookup${typeName}${normalizedKey}`; } +/** + * Creates a key message name for an entity lookup request + * @param typeName - The name of the entity type + * @param keyString - The key string + * @returns The name of the key message + */ +export function createEntityLookupRequestKeyMessageName(typeName: string, keyString: string = 'id'): string { + const requestName = createRequestMessageName(createEntityLookupMethodName(typeName, keyString)); + return `${requestName}Key`; +} + /** * Creates a required fields method name for an entity type diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index a2b73ab171..c5976b83e2 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -21,7 +21,7 @@ import { import { CompositeMessageKind, ProtoMessage, RPCMethod } from './types'; import { KEY_DIRECTIVE_NAME } from './string-constants'; import { - createEntityLookupMethodName, + createEntityLookupRequestKeyMessageName, createRequestMessageName, createRequiredFieldsMethodName, createResponseMessageName, @@ -172,13 +172,14 @@ export class RequiredFieldsVisitor { }); const fieldsMessageName = `${requiredFieldsMethodName}Fields`; - const entityKeyMessageName = `${createEntityLookupMethodName(this.objectType.name, keyFieldsString)}Key`; + const entityKeyRequestMessageName = createEntityLookupRequestKeyMessageName(this.objectType.name, keyFieldsString); + this.messageDefinitions.push({ messageName: contextMessageName, fields: [ { fieldName: 'key', - typeName: entityKeyMessageName, + typeName: entityKeyRequestMessageName, fieldNumber: 1, }, { diff --git a/protographic/src/sdl-to-proto-visitor.ts b/protographic/src/sdl-to-proto-visitor.ts index 6817568c94..c91e24ef75 100644 --- a/protographic/src/sdl-to-proto-visitor.ts +++ b/protographic/src/sdl-to-proto-visitor.ts @@ -40,7 +40,7 @@ import { } from './naming-conventions.js'; import { camelCase } from 'lodash-es'; import { ProtoLock, ProtoLockManager } from './proto-lock.js'; -import { CONNECT_FIELD_RESOLVER, CONTEXT, FIELD_ARGS, RESULT } from './string-constants.js'; +import { CONNECT_FIELD_RESOLVER, CONTEXT, EXTERNAL_DIRECTIVE_NAME, FIELD_ARGS, KEY_DIRECTIVE_NAME, REQUIRED_DIRECTIVE_NAME, RESULT } from './string-constants.js'; import { buildProtoOptions, type ProtoOptions } from './proto-options.js'; import { ProtoFieldType, ProtoMessage, ProtoMessageField } from './types.js'; import { @@ -51,6 +51,7 @@ import { listNameByNestingLevel, renderRPCMethod, } from './proto-utils.js'; +import { RequiredFieldsVisitor } from './required-fields-visitor.js'; /** * Generic structure for returning RPC and message definitions @@ -211,6 +212,7 @@ export class GraphQLToProtoTextVisitor { public visit(): string { // Collect RPC methods and message definitions from all sources const resolverResult = this.collectResolverRpcMethods(); + const requiredFieldResult = this.collectRequiredFieldRpcMethods(); const entityResult = this.collectEntityRpcMethods(); const queryResult = this.collectQueryRpcMethods(); const mutationResult = this.collectMutationRpcMethods(); @@ -221,12 +223,14 @@ export class GraphQLToProtoTextVisitor { ...queryResult.rpcMethods, ...mutationResult.rpcMethods, ...resolverResult.rpcMethods, + ...requiredFieldResult.rpcMethods, ]; const allMethodNames = [ ...entityResult.methodNames, ...queryResult.methodNames, ...mutationResult.methodNames, ...resolverResult.methodNames, + ...requiredFieldResult.methodNames, ]; const allMessageDefinitions = [ @@ -234,6 +238,7 @@ export class GraphQLToProtoTextVisitor { ...queryResult.messageDefinitions, ...mutationResult.messageDefinitions, ...resolverResult.messageDefinitions, + ...requiredFieldResult.messageDefinitions, ]; // Add all types from the schema to the queue that weren't already queued @@ -1046,7 +1051,16 @@ Example: * @returns Array of all key directives found */ private getKeyDirectives(type: GraphQLObjectType): DirectiveNode[] { - return type.astNode?.directives?.filter((d) => d.name.value === 'key') || []; + return type.astNode?.directives?.filter((d) => d.name.value === KEY_DIRECTIVE_NAME) || []; + } + + /** + * Checks if a type has a @key directive + * @param type - The type to check + * @returns True if the type has a @key directive, false otherwise + */ + private hasKeyDirective(type: GraphQLObjectType): boolean { + return type.astNode?.directives?.some((d) => d.name.value === KEY_DIRECTIVE_NAME) ?? false; } /** @@ -1115,6 +1129,46 @@ Example: return result; } + private collectRequiredFieldRpcMethods(): CollectionResult { + const typeMap = this.schema.getTypeMap(); + const result: CollectionResult = { rpcMethods: [], methodNames: [], messageDefinitions: [] }; + + const entityTypes = Object.values(typeMap).filter((type) => this.isEntityType(type)) + + for (const entity of entityTypes) { + const requiredFields = Object.values(entity.getFields()).filter(field => field.astNode?.directives?.some(d => d.name.value === REQUIRED_DIRECTIVE_NAME)) + + if (requiredFields.length === 0) { + continue; + } + + for (const requiredField of requiredFields) { + const fieldSet = this.getRequiredFieldSet(requiredField); + const visitor = new RequiredFieldsVisitor(this.schema, entity, requiredField, fieldSet); + visitor.visit(); + + const rpcMethods = visitor.getRPCMethods() + const messageDefinitions = visitor.getMessageDefinitions() + + result.rpcMethods.push(...rpcMethods.map(m => renderRPCMethod(this.includeComments, m).join('\n'))); + result.methodNames.push(...rpcMethods.map(m => m.name)); + let messageLines = messageDefinitions.map(m => buildProtoMessage(this.includeComments, m)).flat(); + result.messageDefinitions.push(...messageLines); + } + } + + return result; + } + + private getRequiredFieldSet(field: GraphQLField): string { + const node = field.astNode?.directives?.find((d) => d.name.value === REQUIRED_DIRECTIVE_NAME)?.arguments?.find((arg: ArgumentNode) => arg.name.value === 'fields')?.value as StringValueNode + if (!node) { + throw new Error(`Required field set not found for field ${field.name}`); + } + + return node.value; + } + private getFieldContext( parent: GraphQLObjectType, field: GraphQLField, @@ -1355,6 +1409,15 @@ Example: return type.name === 'Query' || type.name === 'Mutation' || type.name === 'Subscription'; } + /** + * Checks if a type is an entity type + * @param type - The type to check + * @returns True if the type is an entity type, false otherwise + */ + private isEntityType(type: GraphQLNamedType): type is GraphQLObjectType { + return isObjectType(type) && !this.isOperationType(type) && this.hasKeyDirective(type); + } + /** * Queue all types from the schema that need processing */ @@ -1442,9 +1505,11 @@ Example: return; } + const allFields = Object.values(type.getFields()); // Filter out fields that have arguments as those are handled in separate resolver rpcs - const validFields = Object.values(type.getFields()).filter((field) => field.args.length === 0); - // TODO: if we are inside of an entity type, we need to filter out fields that have @requires and @external directives + const validFields = allFields + .filter((field) => field.args.length === 0) + .filter((field) => !field.astNode?.directives?.some((directive) => directive.name.value === EXTERNAL_DIRECTIVE_NAME || directive.name.value === REQUIRED_DIRECTIVE_NAME)); // Check for field removals if lock data exists for this type const lockData = this.lockManager.getLockData(); @@ -1473,7 +1538,7 @@ Example: const fields = type.getFields(); // Get field names and order them using the lock manager - const fieldNames = Object.keys(fields); + const fieldNames = Object.keys(fields).filter((fieldName) => validFields.some((field) => field.name === fieldName)); const orderedFieldNames = this.lockManager.reconcileMessageFieldOrder(type.name, fieldNames); for (const fieldName of orderedFieldNames) { @@ -1907,7 +1972,6 @@ Example: return protoFieldType; } - /** * Get the generated lock data after visiting * diff --git a/protographic/src/string-constants.ts b/protographic/src/string-constants.ts index 4f4c73ddc6..224244fdf9 100644 --- a/protographic/src/string-constants.ts +++ b/protographic/src/string-constants.ts @@ -1,4 +1,6 @@ export const KEY_DIRECTIVE_NAME = 'key'; +export const EXTERNAL_DIRECTIVE_NAME = 'external'; +export const REQUIRED_DIRECTIVE_NAME = 'required'; export const CONNECT_FIELD_RESOLVER = 'connect__fieldResolver'; export const CONTEXT = 'context'; export const FIELD_ARGS = 'field_args'; diff --git a/protographic/tests/sdl-to-proto/04-federation.test.ts b/protographic/tests/sdl-to-proto/04-federation.test.ts index fc9a1d9d88..fd2638388c 100644 --- a/protographic/tests/sdl-to-proto/04-federation.test.ts +++ b/protographic/tests/sdl-to-proto/04-federation.test.ts @@ -1077,4 +1077,95 @@ describe('SDL to Proto - Federation and Special Types', () => { }" `); }); + test('should generate rpc method for required field', () => { + const sdl = ` + type Product @key(fields: "id") { + id: ID! + manufacturerId: ID! @external + productCode: String! @external + name: String! @required(fields: "manufacturerId productCode") + price: Float! + } + `; + + const { proto: protoText } = compileGraphQLToProto(sdl); + + // Validate Proto definition + expectValidProto(protoText); + + expect(protoText).toMatchInlineSnapshot(` + "syntax = "proto3"; + package service.v1; + + // Service definition for DefaultService + service DefaultService { + // Lookup Product entity by id + rpc LookupProductById(LookupProductByIdRequest) returns (LookupProductByIdResponse) {} + rpc RequireProductNameById(RequireProductNameByIdRequest) returns (RequireProductNameByIdResponse) {} + } + + // Key message for Product entity lookup + message LookupProductByIdRequestKey { + // Key field for Product entity lookup. + string id = 1; + } + + // Request message for Product entity lookup. + message LookupProductByIdRequest { + /* + * List of keys to look up Product entities. + * Order matters - each key maps to one entity in LookupProductByIdResponse. + */ + repeated LookupProductByIdRequestKey keys = 1; + } + + // Response message for Product entity lookup. + message LookupProductByIdResponse { + /* + * List of Product entities in the same order as the keys in LookupProductByIdRequest. + * Always return the same number of entities as keys. Use null for entities that cannot be found. + * + * Example: + * LookupUserByIdRequest: + * keys: + * - id: 1 + * - id: 2 + * LookupUserByIdResponse: + * result: + * - id: 1 # User with id 1 found + * - null # User with id 2 not found + */ + repeated Product result = 1; + } + + message RequireProductNameByIdRequest { + // RequireProductNameByIdContext provides the context for the required fields method RequireProductNameById. + repeated RequireProductNameByIdContext context = 1; + } + + message RequireProductNameByIdContext { + LookupProductByIdRequestKey key = 1; + RequireProductNameByIdFields fields = 2; + } + + message RequireProductNameByIdResponse { + // RequireProductNameByIdResult provides the result for the required fields method RequireProductNameById. + repeated RequireProductNameByIdResult result = 1; + } + + message RequireProductNameByIdResult { + string name = 1; + } + + message RequireProductNameByIdFields { + string manufacturer_id = 1; + string product_code = 2; + } + + message Product { + string id = 1; + double price = 2; + }" + `); + }); }); From a9b587325b74e180f0004019abc3f9883ee51652 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Mon, 5 Jan 2026 16:02:27 +0100 Subject: [PATCH 03/32] chore: lint format --- protographic/src/naming-conventions.ts | 1 - protographic/src/required-fields-visitor.ts | 4 +- protographic/src/sdl-to-proto-visitor.ts | 38 ++++++++++++++----- protographic/src/types.ts | 20 +++++----- .../tests/field-set/01-basics.test.ts | 10 ++--- 5 files changed, 43 insertions(+), 30 deletions(-) diff --git a/protographic/src/naming-conventions.ts b/protographic/src/naming-conventions.ts index 7ff1502825..62f79e98b2 100644 --- a/protographic/src/naming-conventions.ts +++ b/protographic/src/naming-conventions.ts @@ -70,7 +70,6 @@ export function createEntityLookupRequestKeyMessageName(typeName: string, keyStr return `${requestName}Key`; } - /** * Creates a required fields method name for an entity type * @param typeName - The name of the entity type diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index c5976b83e2..35c2bf1bf8 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -293,7 +293,6 @@ export class RequiredFieldsVisitor { } else { this.current.compositeType.implementingTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); } - } private onEnterSelectionSet(ctx: VisitContext): void { @@ -306,7 +305,6 @@ export class RequiredFieldsVisitor { // TODO: handle this case. Could be a union or interface type. return; } - } else if (this.isInlineFragmentNode(ctx.parent)) { const typeName = ctx.parent.typeCondition?.name.value; if (!typeName) return; @@ -360,7 +358,7 @@ export class RequiredFieldsVisitor { const namedType = getNamedType(field.type); if (isObjectType(namedType)) { - return namedType; + return namedType; } return undefined; diff --git a/protographic/src/sdl-to-proto-visitor.ts b/protographic/src/sdl-to-proto-visitor.ts index c91e24ef75..7407e60898 100644 --- a/protographic/src/sdl-to-proto-visitor.ts +++ b/protographic/src/sdl-to-proto-visitor.ts @@ -40,7 +40,15 @@ import { } from './naming-conventions.js'; import { camelCase } from 'lodash-es'; import { ProtoLock, ProtoLockManager } from './proto-lock.js'; -import { CONNECT_FIELD_RESOLVER, CONTEXT, EXTERNAL_DIRECTIVE_NAME, FIELD_ARGS, KEY_DIRECTIVE_NAME, REQUIRED_DIRECTIVE_NAME, RESULT } from './string-constants.js'; +import { + CONNECT_FIELD_RESOLVER, + CONTEXT, + EXTERNAL_DIRECTIVE_NAME, + FIELD_ARGS, + KEY_DIRECTIVE_NAME, + REQUIRED_DIRECTIVE_NAME, + RESULT, +} from './string-constants.js'; import { buildProtoOptions, type ProtoOptions } from './proto-options.js'; import { ProtoFieldType, ProtoMessage, ProtoMessageField } from './types.js'; import { @@ -1133,10 +1141,12 @@ Example: const typeMap = this.schema.getTypeMap(); const result: CollectionResult = { rpcMethods: [], methodNames: [], messageDefinitions: [] }; - const entityTypes = Object.values(typeMap).filter((type) => this.isEntityType(type)) + const entityTypes = Object.values(typeMap).filter((type) => this.isEntityType(type)); for (const entity of entityTypes) { - const requiredFields = Object.values(entity.getFields()).filter(field => field.astNode?.directives?.some(d => d.name.value === REQUIRED_DIRECTIVE_NAME)) + const requiredFields = Object.values(entity.getFields()).filter((field) => + field.astNode?.directives?.some((d) => d.name.value === REQUIRED_DIRECTIVE_NAME), + ); if (requiredFields.length === 0) { continue; @@ -1147,12 +1157,12 @@ Example: const visitor = new RequiredFieldsVisitor(this.schema, entity, requiredField, fieldSet); visitor.visit(); - const rpcMethods = visitor.getRPCMethods() - const messageDefinitions = visitor.getMessageDefinitions() + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); - result.rpcMethods.push(...rpcMethods.map(m => renderRPCMethod(this.includeComments, m).join('\n'))); - result.methodNames.push(...rpcMethods.map(m => m.name)); - let messageLines = messageDefinitions.map(m => buildProtoMessage(this.includeComments, m)).flat(); + result.rpcMethods.push(...rpcMethods.map((m) => renderRPCMethod(this.includeComments, m).join('\n'))); + result.methodNames.push(...rpcMethods.map((m) => m.name)); + let messageLines = messageDefinitions.map((m) => buildProtoMessage(this.includeComments, m)).flat(); result.messageDefinitions.push(...messageLines); } } @@ -1161,7 +1171,9 @@ Example: } private getRequiredFieldSet(field: GraphQLField): string { - const node = field.astNode?.directives?.find((d) => d.name.value === REQUIRED_DIRECTIVE_NAME)?.arguments?.find((arg: ArgumentNode) => arg.name.value === 'fields')?.value as StringValueNode + const node = field.astNode?.directives + ?.find((d) => d.name.value === REQUIRED_DIRECTIVE_NAME) + ?.arguments?.find((arg: ArgumentNode) => arg.name.value === 'fields')?.value as StringValueNode; if (!node) { throw new Error(`Required field set not found for field ${field.name}`); } @@ -1509,7 +1521,13 @@ Example: // Filter out fields that have arguments as those are handled in separate resolver rpcs const validFields = allFields .filter((field) => field.args.length === 0) - .filter((field) => !field.astNode?.directives?.some((directive) => directive.name.value === EXTERNAL_DIRECTIVE_NAME || directive.name.value === REQUIRED_DIRECTIVE_NAME)); + .filter( + (field) => + !field.astNode?.directives?.some( + (directive) => + directive.name.value === EXTERNAL_DIRECTIVE_NAME || directive.name.value === REQUIRED_DIRECTIVE_NAME, + ), + ); // Check for field removals if lock data exists for this type const lockData = this.lockManager.getLockData(); diff --git a/protographic/src/types.ts b/protographic/src/types.ts index ed7a6e0b76..77e30869d3 100644 --- a/protographic/src/types.ts +++ b/protographic/src/types.ts @@ -30,7 +30,6 @@ export const SCALAR_WRAPPER_TYPE_MAP: Record = { Boolean: 'google.protobuf.BoolValue', }; - /** * Protocol Buffer idempotency levels for RPC methods * @see https://protobuf.dev/reference/protobuf/google.protobuf/#idempotency-level @@ -46,7 +45,7 @@ export interface MethodWithIdempotency extends protobuf.Method { /** * Represents a gRPC method definition - * + * * example: rpc GetUser(GetUserRequest) returns (GetUserResponse) {} */ export type RPCMethod = { @@ -54,7 +53,7 @@ export type RPCMethod = { request: string; response: string; description?: string | null; -} +}; /** * Represents a field in a proto message @@ -99,13 +98,12 @@ export interface ListWrapper { /** * Data structure for formatting message fields */ -export type ProtoFieldType ={ +export type ProtoFieldType = { typeName: string; isWrapper: boolean; isRepeated: boolean; listWrapper?: ListWrapper; -} - +}; export enum CompositeMessageKind { INTERFACE, @@ -119,19 +117,21 @@ export type InterfaceMessageDefinition = { description?: string; typeName: string; implementingTypes: string[]; -} +}; export type UnionMessageDefinition = { kind: CompositeMessageKind.UNION; description?: string; typeName: string; memberTypes: string[]; -} +}; -export function isInterfaceMessageDefinition(message: CompositeMessageDefinition): message is InterfaceMessageDefinition { +export function isInterfaceMessageDefinition( + message: CompositeMessageDefinition, +): message is InterfaceMessageDefinition { return message.kind === CompositeMessageKind.INTERFACE; } export function isUnionMessageDefinition(message: CompositeMessageDefinition): message is UnionMessageDefinition { return message.kind === CompositeMessageKind.UNION; -} \ No newline at end of file +} diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index a9d7e5d9cc..81fec399ee 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -817,18 +817,18 @@ describe('Field Set Visitor', () => { const descriptionMessage = fieldMessage?.nestedMessages?.[0]; expect(descriptionMessage?.messageName).toBe('Description'); expect(descriptionMessage?.fields).toHaveLength(3); - + // Check Description fields expect(descriptionMessage?.fields[0].fieldName).toBe('title'); expect(descriptionMessage?.fields[0].typeName).toBe('string'); expect(descriptionMessage?.fields[0].fieldNumber).toBe(1); expect(descriptionMessage?.fields[0].isRepeated).toBe(false); - + expect(descriptionMessage?.fields[1].fieldName).toBe('score'); expect(descriptionMessage?.fields[1].typeName).toBe('int32'); expect(descriptionMessage?.fields[1].fieldNumber).toBe(2); expect(descriptionMessage?.fields[1].isRepeated).toBe(false); - + expect(descriptionMessage?.fields[2].fieldName).toBe('pet'); expect(descriptionMessage?.fields[2].typeName).toBe('Animal'); expect(descriptionMessage?.fields[2].fieldNumber).toBe(3); @@ -844,9 +844,7 @@ describe('Field Set Visitor', () => { expect(unionMessageDefinition.memberTypes).toHaveLength(2); expect(unionMessageDefinition.memberTypes).toEqual(expect.arrayContaining(['Cat', 'Dog'])); - let resultMessage = messageDefinitions.find( - (message) => message.messageName === 'RequireUserDetailsByIdResult', - ); + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); expect(resultMessage?.fields[0].fieldName).toBe('details'); From 3af2531a83e8d18157f493dd92f30aa15b319d36 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Wed, 7 Jan 2026 10:24:09 +0100 Subject: [PATCH 04/32] chore: add more tests and prepare abstract selection rewriting --- .../src/abstract-selection-rewriter.ts | 108 ++++++ protographic/src/required-fields-visitor.ts | 68 ++-- protographic/src/types.ts | 11 +- .../tests/field-set/01-basics.test.ts | 319 +++++++++++++++++- .../tests/sdl-to-proto/04-federation.test.ts | 250 ++++++++++++++ 5 files changed, 702 insertions(+), 54 deletions(-) create mode 100644 protographic/src/abstract-selection-rewriter.ts diff --git a/protographic/src/abstract-selection-rewriter.ts b/protographic/src/abstract-selection-rewriter.ts new file mode 100644 index 0000000000..59d8b79de6 --- /dev/null +++ b/protographic/src/abstract-selection-rewriter.ts @@ -0,0 +1,108 @@ +import { + ASTVisitor, + DocumentNode, + GraphQLSchema, + GraphQLObjectType, + visit, + SelectionSetNode, + isInterfaceType, + Kind, + FieldNode, + ASTNode, + GraphQLField, + GraphQLType, + getNamedType, +} from 'graphql'; +import { VisitContext } from './types'; + +// TODO: The full functionality will be implemented in the second iteration. +/** + * AbstractSelectionRewriter is a visitor implementation that normalizes an operation document + * by rewriting abstract type selections for interfaces to the concrete types. + * + * This normalizes the operation and allows us to determine the proper types needed to generate proto messages. + * + */ +export class AbstractSelectionRewriter { + private readonly visitor: ASTVisitor; + private readonly fieldSetDoc: DocumentNode; + public readonly schema: GraphQLSchema; + private normalizedFiedSetDoc: DocumentNode | undefined; + + private ancestors: GraphQLObjectType[] = []; + private currentType: GraphQLObjectType; + + constructor(fieldSetDoc: DocumentNode, schema: GraphQLSchema, objectType: GraphQLObjectType) { + this.fieldSetDoc = fieldSetDoc; + this.schema = schema; + this.currentType = objectType; + this.visitor = this.createASTVisitor(); + } + + private createASTVisitor(): ASTVisitor { + return { + SelectionSet: { + enter: (node, key, parent, path, ancestors) => { + this.onEnterSelectionSet({ node, key, parent, path, ancestors }); + }, + }, + }; + } + + public normalize(): void { + visit(this.fieldSetDoc, this.visitor); + } + + private onEnterSelectionSet(ctx: VisitContext): void { + if (!ctx.parent) return; + if (!this.isFieldNode(ctx.parent)) return; + + const currentType = this.findNamedTypeForField(ctx.parent.name.value); + if (!currentType) return; + + if (!isInterfaceType(currentType)) { + return; + } + + const fields = ctx.node.selections.filter((s) => s.kind === Kind.FIELD); + const inlineFragments = ctx.node.selections.filter((s) => s.kind === Kind.INLINE_FRAGMENT); + + // remove the fields from the selection set. + ctx.node.selections = [...inlineFragments]; + + for (const fragment of inlineFragments) { + const normalizedFields = fragment.selectionSet.selections.filter((s) => s.kind === Kind.FIELD) ?? []; + + for (const field of fields) { + if (this.hasField(normalizedFields, field.name.value)) { + continue; + } + + normalizedFields.unshift(field); + } + + fragment.selectionSet.selections = [...normalizedFields]; + } + } + + private hasField(fields: FieldNode[], fieldName: string): boolean { + return fields.some((f) => f.name.value === fieldName); + } + + private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { + if (Array.isArray(node)) return false; + return (node as ASTNode).kind === Kind.FIELD; + } + + private fieldDefinition(fieldName: string): GraphQLField | undefined { + return this.currentType.getFields()[fieldName]; + } + + private findNamedTypeForField(fieldName: string): GraphQLType | undefined { + const fields = this.currentType.getFields(); + const field = fields[fieldName]; + if (!field) return undefined; + + return getNamedType(field.type); + } +} diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 35c2bf1bf8..13c4197b8f 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -18,7 +18,7 @@ import { SelectionSetNode, visit, } from 'graphql'; -import { CompositeMessageKind, ProtoMessage, RPCMethod } from './types'; +import { CompositeMessageKind, ProtoMessage, RPCMethod, VisitContext } from './types'; import { KEY_DIRECTIVE_NAME } from './string-constants'; import { createEntityLookupRequestKeyMessageName, @@ -28,14 +28,7 @@ import { graphqlFieldToProtoField, } from './naming-conventions'; import { getProtoTypeFromGraphQL } from './proto-utils'; - -type VisitContext = { - node: T; - key: string | number | undefined; - parent: ASTNode | ReadonlyArray | undefined; - path: ReadonlyArray; - ancestors: ReadonlyArray>; -}; +import { AbstractSelectionRewriter } from './abstract-selection-rewriter'; type RequiredFieldsVisitorOptions = { includeComments: boolean; @@ -73,6 +66,7 @@ export class RequiredFieldsVisitor { ) { this.resolveKeyDirectives(); this.fieldSetDoc = parse(`{ ${fieldSet} }`); + this.normalizeOperation(); this.visitor = this.createASTVisitor(); } @@ -83,6 +77,11 @@ export class RequiredFieldsVisitor { } } + private normalizeOperation(): void { + const visitor = new AbstractSelectionRewriter(this.fieldSetDoc, this.schema, this.objectType); + visitor.normalize(); + } + public getMessageDefinitions(): ProtoMessage[] { return this.messageDefinitions; } @@ -250,30 +249,6 @@ export class RequiredFieldsVisitor { }); } - private handleCompositeType(fieldDefinition: GraphQLField): void { - if (!this.current) return; - const compositeType = getNamedType(fieldDefinition.type); - - if (isInterfaceType(compositeType)) { - this.current.compositeType = { - kind: CompositeMessageKind.INTERFACE, - implementingTypes: [], - typeName: compositeType.name, - }; - return; - } - - if (isUnionType(compositeType)) { - this.current.compositeType = { - kind: CompositeMessageKind.UNION, - memberTypes: [], - typeName: compositeType.name, - }; - - return; - } - } - private onEnterInlineFragment(ctx: VisitContext): void { if (this.currentInlineFragment) { this.inlineFragmentStack.push(this.currentInlineFragment); @@ -290,8 +265,6 @@ export class RequiredFieldsVisitor { if (this.current.compositeType.kind === CompositeMessageKind.UNION) { this.current.compositeType.memberTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); - } else { - this.current.compositeType.implementingTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); } } @@ -340,6 +313,31 @@ export class RequiredFieldsVisitor { this.current = this.stack.pop(); } + private handleCompositeType(fieldDefinition: GraphQLField): void { + if (!this.current) return; + const compositeType = getNamedType(fieldDefinition.type); + + if (isInterfaceType(compositeType)) { + this.current.compositeType = { + kind: CompositeMessageKind.INTERFACE, + implementingTypes: this.schema.getImplementations(compositeType).objects.map((o) => o.name), + typeName: compositeType.name, + }; + + return; + } + + if (isUnionType(compositeType)) { + this.current.compositeType = { + kind: CompositeMessageKind.UNION, + memberTypes: [], + typeName: compositeType.name, + }; + + return; + } + } + private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { if (Array.isArray(node)) return false; return (node as ASTNode).kind === Kind.FIELD; diff --git a/protographic/src/types.ts b/protographic/src/types.ts index 77e30869d3..7b72098f20 100644 --- a/protographic/src/types.ts +++ b/protographic/src/types.ts @@ -1,7 +1,14 @@ -import { LargeNumberLike } from 'crypto'; -import { GraphQLNamedType } from 'graphql'; +import { ASTNode, GraphQLNamedType } from 'graphql'; import protobuf from 'protobufjs'; +export type VisitContext = { + node: T; + key: string | number | undefined; + parent: ASTNode | ReadonlyArray | undefined; + path: ReadonlyArray; + ancestors: ReadonlyArray>; +}; + /** * Maps GraphQL scalar types to Protocol Buffer types * diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index 81fec399ee..9fde4f8a8f 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -4,6 +4,8 @@ import { buildSchema, GraphQLObjectType, StringValueNode, visit } from 'graphql' import { buildProtoMessage } from '../../src/proto-utils'; import { CompositeMessageKind, + InterfaceMessageDefinition, + isInterfaceMessageDefinition, isUnionMessageDefinition, ProtoMessageField, UnionMessageDefinition, @@ -64,6 +66,60 @@ describe('Field Set Visitor', () => { expect(fieldMessage?.fields?.[0].fieldNumber).toBe(1); expect(fieldMessage?.fields?.[0].isRepeated).toBe(false); }); + it('should visit a field set for a scalar type and deduplicate fields', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + name: String! @external + age: Int @requires(fields: "name") + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['age']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserAgeById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserAgeByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserAgeByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserAgeByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(1); + expect(fieldMessage?.fields?.[0].fieldName).toBe('name'); + expect(fieldMessage?.fields?.[0].typeName).toBe('string'); + expect(fieldMessage?.fields?.[0].fieldNumber).toBe(1); + expect(fieldMessage?.fields?.[0].isRepeated).toBe(false); + }); it('should visit a field set for an object type', () => { const sdl = ` type User @key(fields: "id") { @@ -686,30 +742,133 @@ describe('Field Set Visitor', () => { }); const messageLines = buildProtoMessage(true, fieldMessage!).join('\n'); + expect(messageLines).toMatchInlineSnapshot(` + "message RequireUserDetailsByIdFields { + message Cat { + string name = 1; + string cat_breed = 2; + } - /* - message RequireUserDetailsByIdFields { - mesage Cat { - string name = 1; - string catBreed = 2; + message Dog { + string name = 1; + string dog_breed = 2; + } + + message Animal { + oneof value { + Cat cat = 1; + Dog dog = 2; + } + } + Animal pet = 1; + string name = 2; + } + " + `); + }); + it('should visit a field set for an interface type', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + pet: Animal! @external + name: String! @external + details: Details! @requires(fields: "pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } name") } - message Dog { - string name = 1; - string dogBreed = 2; + interface Animal { + name: String! } - message Animal { - oneof value { - Cat cat = 1; - Dog dog = 2; - } + type Cat implements Animal { + name: String! + catBreed: String! } - Animal pet = 1; - } - */ + type Dog implements Animal { + name: String! + dogBreed: String! + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(2); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'pet', + typeName: 'Animal', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.fields[1], { + fieldName: 'name', + typeName: 'string', + fieldNumber: 2, + isRepeated: false, + }); + + const compositeType = fieldMessage?.compositeType; + expect(compositeType).toBeDefined(); + expect(compositeType?.kind).toBe(CompositeMessageKind.INTERFACE); + expect(compositeType?.typeName).toBe('Animal'); + expect(isInterfaceMessageDefinition(compositeType!)).toBe(true); + const interfaceMessageDefinition = compositeType! as InterfaceMessageDefinition; + expect(interfaceMessageDefinition.implementingTypes).toHaveLength(2); + expect(interfaceMessageDefinition.implementingTypes[0]).toBe('Cat'); + expect(interfaceMessageDefinition.implementingTypes[1]).toBe('Dog'); + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); + + const messageLines = buildProtoMessage(true, fieldMessage!).join('\n'); expect(messageLines).toMatchInlineSnapshot(` "message RequireUserDetailsByIdFields { message Cat { @@ -723,7 +882,7 @@ describe('Field Set Visitor', () => { } message Animal { - oneof value { + oneof instance { Cat cat = 1; Dog dog = 2; } @@ -734,7 +893,133 @@ describe('Field Set Visitor', () => { " `); }); + it('should visit a field set for an interface type with extraced interface field', () => { + const sdl = ` + type User @key(fields: "id") { + id: ID! + pet: Animal! @external + name: String! @external + details: Details! @requires(fields: "pet { name ... on Cat { catBreed } ... on Dog { dogBreed } } name") + } + + interface Animal { + name: String! + } + + type Cat implements Animal { + name: String! + catBreed: String! + } + + type Dog implements Animal { + name: String! + dogBreed: String! + } + + type Details { + firstName: String! + lastName: String! + } + `; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); + const typeMap = schema.getTypeMap(); + const entity = typeMap['User'] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error('Entity not found'); + } + + const requiredField = entity.getFields()['details']; + expect(requiredField).toBeDefined(); + + const fieldSet = ( + requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] + .value as StringValueNode + ).value; + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + visitor.visit(); + const rpcMethods = visitor.getRPCMethods(); + const messageDefinitions = visitor.getMessageDefinitions(); + + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); + expect(messageDefinitions).toHaveLength(5); + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), + expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), + ]), + ); + + let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + expect(fieldMessage).toBeDefined(); + expect(fieldMessage?.fields).toHaveLength(2); + assertFieldMessage(fieldMessage?.fields[0], { + fieldName: 'pet', + typeName: 'Animal', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(fieldMessage?.fields[1], { + fieldName: 'name', + typeName: 'string', + fieldNumber: 2, + isRepeated: false, + }); + + const compositeType = fieldMessage?.compositeType; + expect(compositeType).toBeDefined(); + expect(compositeType?.kind).toBe(CompositeMessageKind.INTERFACE); + expect(compositeType?.typeName).toBe('Animal'); + expect(isInterfaceMessageDefinition(compositeType!)).toBe(true); + const interfaceMessageDefinition = compositeType! as InterfaceMessageDefinition; + expect(interfaceMessageDefinition.implementingTypes).toHaveLength(2); + expect(interfaceMessageDefinition.implementingTypes[0]).toBe('Cat'); + expect(interfaceMessageDefinition.implementingTypes[1]).toBe('Dog'); + + let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + expect(resultMessage).toBeDefined(); + expect(resultMessage?.fields).toHaveLength(1); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); + + const messageLines = buildProtoMessage(true, fieldMessage!).join('\n'); + expect(messageLines).toMatchInlineSnapshot(` + "message RequireUserDetailsByIdFields { + message Cat { + string name = 1; + string cat_breed = 2; + } + + message Dog { + string name = 1; + string dog_breed = 2; + } + + message Animal { + oneof instance { + Cat cat = 1; + Dog dog = 2; + } + } + Animal pet = 1; + string name = 2; + } + " + `); + }); it('should visit a field set with nested field selections and a union type', () => { const sdl = ` type User @key(fields: "id") { diff --git a/protographic/tests/sdl-to-proto/04-federation.test.ts b/protographic/tests/sdl-to-proto/04-federation.test.ts index fd2638388c..8a3013ded7 100644 --- a/protographic/tests/sdl-to-proto/04-federation.test.ts +++ b/protographic/tests/sdl-to-proto/04-federation.test.ts @@ -1168,4 +1168,254 @@ describe('SDL to Proto - Federation and Special Types', () => { }" `); }); + test('should generate rpc method for required field with nested fields', () => { + const sdl = ` + type Product @key(fields: "id") { + id: ID! + manufacturerId: ID! @external + details: ProductDetails! @external + name: String! @required(fields: "manufacturerId details { description reviewSummary { status message } }") + price: Float! + } + + type ProductDetails { + id: ID! + description: String! + title: String! + reviewSummary: ActionResult! + } + + type ActionResult { + status: String! + message: String! + } + `; + + const { proto: protoText } = compileGraphQLToProto(sdl); + + // Validate Proto definition + expectValidProto(protoText); + + expect(protoText).toMatchInlineSnapshot(` + "syntax = "proto3"; + package service.v1; + + // Service definition for DefaultService + service DefaultService { + // Lookup Product entity by id + rpc LookupProductById(LookupProductByIdRequest) returns (LookupProductByIdResponse) {} + rpc RequireProductNameById(RequireProductNameByIdRequest) returns (RequireProductNameByIdResponse) {} + } + + // Key message for Product entity lookup + message LookupProductByIdRequestKey { + // Key field for Product entity lookup. + string id = 1; + } + + // Request message for Product entity lookup. + message LookupProductByIdRequest { + /* + * List of keys to look up Product entities. + * Order matters - each key maps to one entity in LookupProductByIdResponse. + */ + repeated LookupProductByIdRequestKey keys = 1; + } + + // Response message for Product entity lookup. + message LookupProductByIdResponse { + /* + * List of Product entities in the same order as the keys in LookupProductByIdRequest. + * Always return the same number of entities as keys. Use null for entities that cannot be found. + * + * Example: + * LookupUserByIdRequest: + * keys: + * - id: 1 + * - id: 2 + * LookupUserByIdResponse: + * result: + * - id: 1 # User with id 1 found + * - null # User with id 2 not found + */ + repeated Product result = 1; + } + + message RequireProductNameByIdRequest { + // RequireProductNameByIdContext provides the context for the required fields method RequireProductNameById. + repeated RequireProductNameByIdContext context = 1; + } + + message RequireProductNameByIdContext { + LookupProductByIdRequestKey key = 1; + RequireProductNameByIdFields fields = 2; + } + + message RequireProductNameByIdResponse { + // RequireProductNameByIdResult provides the result for the required fields method RequireProductNameById. + repeated RequireProductNameByIdResult result = 1; + } + + message RequireProductNameByIdResult { + string name = 1; + } + + message RequireProductNameByIdFields { + message ProductDetails { + message ActionResult { + string status = 1; + string message = 2; + } + + string description = 1; + ActionResult review_summary = 2; + } + + string manufacturer_id = 1; + ProductDetails details = 2; + } + + message Product { + string id = 1; + double price = 2; + } + + message ProductDetails { + string id = 1; + string description = 2; + string title = 3; + ActionResult review_summary = 4; + } + + message ActionResult { + string status = 1; + string message = 2; + }" + `); + }); + test('should generate rpc method for required field with randomly ordered fields', () => { + const sdl = ` + type Product @key(fields: "id") { + id: ID! + manufacturerId: ID! @external + details: ProductDetails! @external + name: String! @required(fields: "details { description reviewSummary { message status } } manufacturerId") + price: Float! + } + + type ProductDetails { + id: ID! + description: String! + title: String! + reviewSummary: ActionResult! + } + + type ActionResult { + status: String! + message: String! + } + `; + + const { proto: protoText } = compileGraphQLToProto(sdl); + + // Validate Proto definition + expectValidProto(protoText); + + expect(protoText).toMatchInlineSnapshot(` + "syntax = "proto3"; + package service.v1; + + // Service definition for DefaultService + service DefaultService { + // Lookup Product entity by id + rpc LookupProductById(LookupProductByIdRequest) returns (LookupProductByIdResponse) {} + rpc RequireProductNameById(RequireProductNameByIdRequest) returns (RequireProductNameByIdResponse) {} + } + + // Key message for Product entity lookup + message LookupProductByIdRequestKey { + // Key field for Product entity lookup. + string id = 1; + } + + // Request message for Product entity lookup. + message LookupProductByIdRequest { + /* + * List of keys to look up Product entities. + * Order matters - each key maps to one entity in LookupProductByIdResponse. + */ + repeated LookupProductByIdRequestKey keys = 1; + } + + // Response message for Product entity lookup. + message LookupProductByIdResponse { + /* + * List of Product entities in the same order as the keys in LookupProductByIdRequest. + * Always return the same number of entities as keys. Use null for entities that cannot be found. + * + * Example: + * LookupUserByIdRequest: + * keys: + * - id: 1 + * - id: 2 + * LookupUserByIdResponse: + * result: + * - id: 1 # User with id 1 found + * - null # User with id 2 not found + */ + repeated Product result = 1; + } + + message RequireProductNameByIdRequest { + // RequireProductNameByIdContext provides the context for the required fields method RequireProductNameById. + repeated RequireProductNameByIdContext context = 1; + } + + message RequireProductNameByIdContext { + LookupProductByIdRequestKey key = 1; + RequireProductNameByIdFields fields = 2; + } + + message RequireProductNameByIdResponse { + // RequireProductNameByIdResult provides the result for the required fields method RequireProductNameById. + repeated RequireProductNameByIdResult result = 1; + } + + message RequireProductNameByIdResult { + string name = 1; + } + + message RequireProductNameByIdFields { + message ProductDetails { + message ActionResult { + string message = 1; + string status = 2; + } + + string description = 1; + ActionResult review_summary = 2; + } + + ProductDetails details = 1; + string manufacturer_id = 2; + } + + message Product { + string id = 1; + double price = 2; + } + + message ProductDetails { + string id = 1; + string description = 2; + string title = 3; + ActionResult review_summary = 4; + } + + message ActionResult { + string status = 1; + string message = 2; + }" + `); + }); }); From 8b36ed9468e29d9ce759ae881e654e00b0e7d75e Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Mon, 19 Jan 2026 11:22:37 +0100 Subject: [PATCH 05/32] chore: add mapping and validation --- .../gen/proto/wg/cosmo/node/v1/node.pb.go | 1171 +++++++++-------- connect/src/wg/cosmo/node/v1/node_pb.ts | 71 + proto/wg/cosmo/node/v1/node.proto | 13 + protographic/src/required-fields-visitor.ts | 282 +++- protographic/src/sdl-to-mapping-visitor.ts | 79 +- protographic/src/sdl-to-proto-visitor.ts | 8 +- protographic/src/sdl-validation-visitor.ts | 61 +- .../src/selection-set-validation-visitor.ts | 233 ++++ protographic/src/string-constants.ts | 3 +- protographic/src/types.ts | 2 + .../sdl-to-mapping/03-federation.test.ts | 201 +++ .../tests/sdl-to-proto/01-basic-types.test.ts | 2 +- .../tests/sdl-to-proto/04-federation.test.ts | 6 +- .../01-basic-validation.test.ts | 70 +- router/gen/proto/wg/cosmo/node/v1/node.pb.go | 1171 +++++++++-------- 15 files changed, 2287 insertions(+), 1086 deletions(-) create mode 100644 protographic/src/selection-set-validation-visitor.ts diff --git a/connect-go/gen/proto/wg/cosmo/node/v1/node.pb.go b/connect-go/gen/proto/wg/cosmo/node/v1/node.pb.go index 30527dc201..6258be376b 100644 --- a/connect-go/gen/proto/wg/cosmo/node/v1/node.pb.go +++ b/connect-go/gen/proto/wg/cosmo/node/v1/node.pb.go @@ -2713,6 +2713,8 @@ type EntityMapping struct { Request string `protobuf:"bytes,5,opt,name=request,proto3" json:"request,omitempty"` // gRPC response message type name Response string `protobuf:"bytes,6,opt,name=response,proto3" json:"response,omitempty"` + // Mappings for required fields + RequiredFieldMappings []*RequiredFieldMapping `protobuf:"bytes,7,rep,name=required_field_mappings,json=requiredFieldMappings,proto3" json:"required_field_mappings,omitempty"` } func (x *EntityMapping) Reset() { @@ -2789,6 +2791,88 @@ func (x *EntityMapping) GetResponse() string { return "" } +func (x *EntityMapping) GetRequiredFieldMappings() []*RequiredFieldMapping { + if x != nil { + return x.RequiredFieldMappings + } + return nil +} + +// Defines mapping for required fields +type RequiredFieldMapping struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FieldMapping *FieldMapping `protobuf:"bytes,1,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"` + // Mapped gRPC method name + Rpc string `protobuf:"bytes,2,opt,name=rpc,proto3" json:"rpc,omitempty"` + // gRPC request message type name + Request string `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` + // gRPC response message type name + Response string `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *RequiredFieldMapping) Reset() { + *x = RequiredFieldMapping{} + if protoimpl.UnsafeEnabled { + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequiredFieldMapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequiredFieldMapping) ProtoMessage() {} + +func (x *RequiredFieldMapping) ProtoReflect() protoreflect.Message { + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequiredFieldMapping.ProtoReflect.Descriptor instead. +func (*RequiredFieldMapping) Descriptor() ([]byte, []int) { + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{34} +} + +func (x *RequiredFieldMapping) GetFieldMapping() *FieldMapping { + if x != nil { + return x.FieldMapping + } + return nil +} + +func (x *RequiredFieldMapping) GetRpc() string { + if x != nil { + return x.Rpc + } + return "" +} + +func (x *RequiredFieldMapping) GetRequest() string { + if x != nil { + return x.Request + } + return "" +} + +func (x *RequiredFieldMapping) GetResponse() string { + if x != nil { + return x.Response + } + return "" +} + // Defines mapping between GraphQL type fields and gRPC message fields type TypeFieldMapping struct { state protoimpl.MessageState @@ -2804,7 +2888,7 @@ type TypeFieldMapping struct { func (x *TypeFieldMapping) Reset() { *x = TypeFieldMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2817,7 +2901,7 @@ func (x *TypeFieldMapping) String() string { func (*TypeFieldMapping) ProtoMessage() {} func (x *TypeFieldMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2830,7 +2914,7 @@ func (x *TypeFieldMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeFieldMapping.ProtoReflect.Descriptor instead. func (*TypeFieldMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{34} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{35} } func (x *TypeFieldMapping) GetType() string { @@ -2864,7 +2948,7 @@ type FieldMapping struct { func (x *FieldMapping) Reset() { *x = FieldMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2877,7 +2961,7 @@ func (x *FieldMapping) String() string { func (*FieldMapping) ProtoMessage() {} func (x *FieldMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2890,7 +2974,7 @@ func (x *FieldMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead. func (*FieldMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{35} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{36} } func (x *FieldMapping) GetOriginal() string { @@ -2929,7 +3013,7 @@ type ArgumentMapping struct { func (x *ArgumentMapping) Reset() { *x = ArgumentMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2942,7 +3026,7 @@ func (x *ArgumentMapping) String() string { func (*ArgumentMapping) ProtoMessage() {} func (x *ArgumentMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2955,7 +3039,7 @@ func (x *ArgumentMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use ArgumentMapping.ProtoReflect.Descriptor instead. func (*ArgumentMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{36} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{37} } func (x *ArgumentMapping) GetOriginal() string { @@ -2984,7 +3068,7 @@ type EnumMapping struct { func (x *EnumMapping) Reset() { *x = EnumMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2997,7 +3081,7 @@ func (x *EnumMapping) String() string { func (*EnumMapping) ProtoMessage() {} func (x *EnumMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3010,7 +3094,7 @@ func (x *EnumMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumMapping.ProtoReflect.Descriptor instead. func (*EnumMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{37} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{38} } func (x *EnumMapping) GetType() string { @@ -3039,7 +3123,7 @@ type EnumValueMapping struct { func (x *EnumValueMapping) Reset() { *x = EnumValueMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3052,7 +3136,7 @@ func (x *EnumValueMapping) String() string { func (*EnumValueMapping) ProtoMessage() {} func (x *EnumValueMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3065,7 +3149,7 @@ func (x *EnumValueMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumValueMapping.ProtoReflect.Descriptor instead. func (*EnumValueMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{38} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{39} } func (x *EnumValueMapping) GetOriginal() string { @@ -3095,7 +3179,7 @@ type NatsStreamConfiguration struct { func (x *NatsStreamConfiguration) Reset() { *x = NatsStreamConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3108,7 +3192,7 @@ func (x *NatsStreamConfiguration) String() string { func (*NatsStreamConfiguration) ProtoMessage() {} func (x *NatsStreamConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3121,7 +3205,7 @@ func (x *NatsStreamConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use NatsStreamConfiguration.ProtoReflect.Descriptor instead. func (*NatsStreamConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{39} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{40} } func (x *NatsStreamConfiguration) GetConsumerName() string { @@ -3158,7 +3242,7 @@ type NatsEventConfiguration struct { func (x *NatsEventConfiguration) Reset() { *x = NatsEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3171,7 +3255,7 @@ func (x *NatsEventConfiguration) String() string { func (*NatsEventConfiguration) ProtoMessage() {} func (x *NatsEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3184,7 +3268,7 @@ func (x *NatsEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use NatsEventConfiguration.ProtoReflect.Descriptor instead. func (*NatsEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{40} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{41} } func (x *NatsEventConfiguration) GetEngineEventConfiguration() *EngineEventConfiguration { @@ -3220,7 +3304,7 @@ type KafkaEventConfiguration struct { func (x *KafkaEventConfiguration) Reset() { *x = KafkaEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3233,7 +3317,7 @@ func (x *KafkaEventConfiguration) String() string { func (*KafkaEventConfiguration) ProtoMessage() {} func (x *KafkaEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3246,7 +3330,7 @@ func (x *KafkaEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use KafkaEventConfiguration.ProtoReflect.Descriptor instead. func (*KafkaEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{41} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{42} } func (x *KafkaEventConfiguration) GetEngineEventConfiguration() *EngineEventConfiguration { @@ -3275,7 +3359,7 @@ type RedisEventConfiguration struct { func (x *RedisEventConfiguration) Reset() { *x = RedisEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3288,7 +3372,7 @@ func (x *RedisEventConfiguration) String() string { func (*RedisEventConfiguration) ProtoMessage() {} func (x *RedisEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3301,7 +3385,7 @@ func (x *RedisEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use RedisEventConfiguration.ProtoReflect.Descriptor instead. func (*RedisEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{42} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{43} } func (x *RedisEventConfiguration) GetEngineEventConfiguration() *EngineEventConfiguration { @@ -3332,7 +3416,7 @@ type EngineEventConfiguration struct { func (x *EngineEventConfiguration) Reset() { *x = EngineEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3345,7 +3429,7 @@ func (x *EngineEventConfiguration) String() string { func (*EngineEventConfiguration) ProtoMessage() {} func (x *EngineEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3358,7 +3442,7 @@ func (x *EngineEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use EngineEventConfiguration.ProtoReflect.Descriptor instead. func (*EngineEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{43} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{44} } func (x *EngineEventConfiguration) GetProviderId() string { @@ -3402,7 +3486,7 @@ type DataSourceCustomEvents struct { func (x *DataSourceCustomEvents) Reset() { *x = DataSourceCustomEvents{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3415,7 +3499,7 @@ func (x *DataSourceCustomEvents) String() string { func (*DataSourceCustomEvents) ProtoMessage() {} func (x *DataSourceCustomEvents) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3428,7 +3512,7 @@ func (x *DataSourceCustomEvents) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceCustomEvents.ProtoReflect.Descriptor instead. func (*DataSourceCustomEvents) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{44} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{45} } func (x *DataSourceCustomEvents) GetNats() []*NatsEventConfiguration { @@ -3463,7 +3547,7 @@ type DataSourceCustom_Static struct { func (x *DataSourceCustom_Static) Reset() { *x = DataSourceCustom_Static{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3476,7 +3560,7 @@ func (x *DataSourceCustom_Static) String() string { func (*DataSourceCustom_Static) ProtoMessage() {} func (x *DataSourceCustom_Static) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3489,7 +3573,7 @@ func (x *DataSourceCustom_Static) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceCustom_Static.ProtoReflect.Descriptor instead. func (*DataSourceCustom_Static) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{45} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{46} } func (x *DataSourceCustom_Static) GetData() *ConfigurationVariable { @@ -3514,7 +3598,7 @@ type ConfigurationVariable struct { func (x *ConfigurationVariable) Reset() { *x = ConfigurationVariable{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3527,7 +3611,7 @@ func (x *ConfigurationVariable) String() string { func (*ConfigurationVariable) ProtoMessage() {} func (x *ConfigurationVariable) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3540,7 +3624,7 @@ func (x *ConfigurationVariable) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigurationVariable.ProtoReflect.Descriptor instead. func (*ConfigurationVariable) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{46} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{47} } func (x *ConfigurationVariable) GetKind() ConfigurationVariableKind { @@ -3590,7 +3674,7 @@ type DirectiveConfiguration struct { func (x *DirectiveConfiguration) Reset() { *x = DirectiveConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3603,7 +3687,7 @@ func (x *DirectiveConfiguration) String() string { func (*DirectiveConfiguration) ProtoMessage() {} func (x *DirectiveConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3616,7 +3700,7 @@ func (x *DirectiveConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use DirectiveConfiguration.ProtoReflect.Descriptor instead. func (*DirectiveConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{47} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{48} } func (x *DirectiveConfiguration) GetDirectiveName() string { @@ -3645,7 +3729,7 @@ type URLQueryConfiguration struct { func (x *URLQueryConfiguration) Reset() { *x = URLQueryConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3658,7 +3742,7 @@ func (x *URLQueryConfiguration) String() string { func (*URLQueryConfiguration) ProtoMessage() {} func (x *URLQueryConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3671,7 +3755,7 @@ func (x *URLQueryConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use URLQueryConfiguration.ProtoReflect.Descriptor instead. func (*URLQueryConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{48} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{49} } func (x *URLQueryConfiguration) GetName() string { @@ -3699,7 +3783,7 @@ type HTTPHeader struct { func (x *HTTPHeader) Reset() { *x = HTTPHeader{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3712,7 +3796,7 @@ func (x *HTTPHeader) String() string { func (*HTTPHeader) ProtoMessage() {} func (x *HTTPHeader) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3725,7 +3809,7 @@ func (x *HTTPHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPHeader.ProtoReflect.Descriptor instead. func (*HTTPHeader) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{49} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{50} } func (x *HTTPHeader) GetValues() []*ConfigurationVariable { @@ -3748,7 +3832,7 @@ type MTLSConfiguration struct { func (x *MTLSConfiguration) Reset() { *x = MTLSConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3761,7 +3845,7 @@ func (x *MTLSConfiguration) String() string { func (*MTLSConfiguration) ProtoMessage() {} func (x *MTLSConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3774,7 +3858,7 @@ func (x *MTLSConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use MTLSConfiguration.ProtoReflect.Descriptor instead. func (*MTLSConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{50} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{51} } func (x *MTLSConfiguration) GetKey() *ConfigurationVariable { @@ -3814,7 +3898,7 @@ type GraphQLSubscriptionConfiguration struct { func (x *GraphQLSubscriptionConfiguration) Reset() { *x = GraphQLSubscriptionConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3827,7 +3911,7 @@ func (x *GraphQLSubscriptionConfiguration) String() string { func (*GraphQLSubscriptionConfiguration) ProtoMessage() {} func (x *GraphQLSubscriptionConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3840,7 +3924,7 @@ func (x *GraphQLSubscriptionConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use GraphQLSubscriptionConfiguration.ProtoReflect.Descriptor instead. func (*GraphQLSubscriptionConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{51} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{52} } func (x *GraphQLSubscriptionConfiguration) GetEnabled() bool { @@ -3890,7 +3974,7 @@ type GraphQLFederationConfiguration struct { func (x *GraphQLFederationConfiguration) Reset() { *x = GraphQLFederationConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3903,7 +3987,7 @@ func (x *GraphQLFederationConfiguration) String() string { func (*GraphQLFederationConfiguration) ProtoMessage() {} func (x *GraphQLFederationConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3916,7 +4000,7 @@ func (x *GraphQLFederationConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use GraphQLFederationConfiguration.ProtoReflect.Descriptor instead. func (*GraphQLFederationConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{52} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{53} } func (x *GraphQLFederationConfiguration) GetEnabled() bool { @@ -3945,7 +4029,7 @@ type InternedString struct { func (x *InternedString) Reset() { *x = InternedString{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3958,7 +4042,7 @@ func (x *InternedString) String() string { func (*InternedString) ProtoMessage() {} func (x *InternedString) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3971,7 +4055,7 @@ func (x *InternedString) ProtoReflect() protoreflect.Message { // Deprecated: Use InternedString.ProtoReflect.Descriptor instead. func (*InternedString) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{53} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{54} } func (x *InternedString) GetKey() string { @@ -3993,7 +4077,7 @@ type SingleTypeField struct { func (x *SingleTypeField) Reset() { *x = SingleTypeField{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4006,7 +4090,7 @@ func (x *SingleTypeField) String() string { func (*SingleTypeField) ProtoMessage() {} func (x *SingleTypeField) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4019,7 +4103,7 @@ func (x *SingleTypeField) ProtoReflect() protoreflect.Message { // Deprecated: Use SingleTypeField.ProtoReflect.Descriptor instead. func (*SingleTypeField) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{54} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{55} } func (x *SingleTypeField) GetTypeName() string { @@ -4048,7 +4132,7 @@ type SubscriptionFieldCondition struct { func (x *SubscriptionFieldCondition) Reset() { *x = SubscriptionFieldCondition{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4061,7 +4145,7 @@ func (x *SubscriptionFieldCondition) String() string { func (*SubscriptionFieldCondition) ProtoMessage() {} func (x *SubscriptionFieldCondition) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4074,7 +4158,7 @@ func (x *SubscriptionFieldCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriptionFieldCondition.ProtoReflect.Descriptor instead. func (*SubscriptionFieldCondition) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{55} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{56} } func (x *SubscriptionFieldCondition) GetFieldPath() []string { @@ -4105,7 +4189,7 @@ type SubscriptionFilterCondition struct { func (x *SubscriptionFilterCondition) Reset() { *x = SubscriptionFilterCondition{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4118,7 +4202,7 @@ func (x *SubscriptionFilterCondition) String() string { func (*SubscriptionFilterCondition) ProtoMessage() {} func (x *SubscriptionFilterCondition) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4131,7 +4215,7 @@ func (x *SubscriptionFilterCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriptionFilterCondition.ProtoReflect.Descriptor instead. func (*SubscriptionFilterCondition) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{56} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{57} } func (x *SubscriptionFilterCondition) GetAnd() []*SubscriptionFilterCondition { @@ -4173,7 +4257,7 @@ type CacheWarmerOperations struct { func (x *CacheWarmerOperations) Reset() { *x = CacheWarmerOperations{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4186,7 +4270,7 @@ func (x *CacheWarmerOperations) String() string { func (*CacheWarmerOperations) ProtoMessage() {} func (x *CacheWarmerOperations) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4199,7 +4283,7 @@ func (x *CacheWarmerOperations) ProtoReflect() protoreflect.Message { // Deprecated: Use CacheWarmerOperations.ProtoReflect.Descriptor instead. func (*CacheWarmerOperations) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{57} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{58} } func (x *CacheWarmerOperations) GetOperations() []*Operation { @@ -4221,7 +4305,7 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4234,7 +4318,7 @@ func (x *Operation) String() string { func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4247,7 +4331,7 @@ func (x *Operation) ProtoReflect() protoreflect.Message { // Deprecated: Use Operation.ProtoReflect.Descriptor instead. func (*Operation) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{58} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{59} } func (x *Operation) GetRequest() *OperationRequest { @@ -4277,7 +4361,7 @@ type OperationRequest struct { func (x *OperationRequest) Reset() { *x = OperationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4290,7 +4374,7 @@ func (x *OperationRequest) String() string { func (*OperationRequest) ProtoMessage() {} func (x *OperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4303,7 +4387,7 @@ func (x *OperationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OperationRequest.ProtoReflect.Descriptor instead. func (*OperationRequest) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{59} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{60} } func (x *OperationRequest) GetOperationName() string { @@ -4338,7 +4422,7 @@ type Extension struct { func (x *Extension) Reset() { *x = Extension{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4351,7 +4435,7 @@ func (x *Extension) String() string { func (*Extension) ProtoMessage() {} func (x *Extension) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4364,7 +4448,7 @@ func (x *Extension) ProtoReflect() protoreflect.Message { // Deprecated: Use Extension.ProtoReflect.Descriptor instead. func (*Extension) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{60} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{61} } func (x *Extension) GetPersistedQuery() *PersistedQuery { @@ -4386,7 +4470,7 @@ type PersistedQuery struct { func (x *PersistedQuery) Reset() { *x = PersistedQuery{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4399,7 +4483,7 @@ func (x *PersistedQuery) String() string { func (*PersistedQuery) ProtoMessage() {} func (x *PersistedQuery) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4412,7 +4496,7 @@ func (x *PersistedQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use PersistedQuery.ProtoReflect.Descriptor instead. func (*PersistedQuery) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{61} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{62} } func (x *PersistedQuery) GetSha256Hash() string { @@ -4441,7 +4525,7 @@ type ClientInfo struct { func (x *ClientInfo) Reset() { *x = ClientInfo{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4454,7 +4538,7 @@ func (x *ClientInfo) String() string { func (*ClientInfo) ProtoMessage() {} func (x *ClientInfo) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4467,7 +4551,7 @@ func (x *ClientInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead. func (*ClientInfo) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{62} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{63} } func (x *ClientInfo) GetName() string { @@ -4975,7 +5059,7 @@ var file_wg_cosmo_node_v1_node_proto_rawDesc = []byte{ 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, @@ -4985,327 +5069,343 @@ var file_wg_cosmo_node_v1_node_proto_rawDesc = []byte{ 0x52, 0x03, 0x72, 0x70, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x10, 0x54, - 0x79, 0x70, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x67, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x17, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x77, + 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x14, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0c, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, - 0x4e, 0x0a, 0x11, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x77, 0x67, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, - 0x45, 0x0a, 0x0f, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, - 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x5d, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x61, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x70, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x6d, 0x0a, 0x10, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, 0x67, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x9f, 0x01, - 0x0a, 0x17, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x49, 0x6e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, - 0xfc, 0x01, 0x0a, 0x16, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x12, 0x5c, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, - 0x01, 0x0a, 0x17, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0x9f, 0x01, 0x0a, - 0x17, 0x52, 0x65, 0x64, 0x69, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, - 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, + 0x22, 0x92, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x10, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x45, 0x0a, 0x0f, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x5d, 0x0a, 0x0b, + 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x3a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x10, 0x45, + 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, + 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, + 0x70, 0x65, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x17, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x72, 0x5f, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6d, 0x65, 0x72, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xfc, 0x01, 0x0a, 0x16, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x64, 0x69, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, + 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, + 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0xd8, 0x01, 0x0a, 0x16, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xa8, - 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x16, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, - 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6b, 0x61, - 0x66, 0x6b, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x72, - 0x65, 0x64, 0x69, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, - 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd5, 0x02, 0x0a, - 0x15, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x69, 0x6e, - 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x3a, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x22, 0x65, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, - 0x0a, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x54, 0x6f, 0x22, 0x41, 0x0a, 0x15, 0x55, 0x52, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x4d, 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, + 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, + 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x63, 0x65, - 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, - 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, - 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x22, 0xfb, 0x02, 0x0a, 0x20, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x39, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x67, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x65, 0x0a, 0x14, 0x77, 0x65, 0x62, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, - 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x02, 0x52, 0x14, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x77, 0x65, 0x62, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x22, 0x5a, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x46, 0x65, 0x64, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x64, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x64, 0x6c, 0x22, 0x22, 0x0a, 0x0e, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x22, 0x4d, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, - 0x4f, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, - 0x22, 0xb5, 0x02, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x3f, 0x0a, 0x03, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x61, 0x6e, - 0x64, 0x12, 0x41, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0xd5, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x77, 0x67, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, + 0x17, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x4b, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, + 0x0a, 0x19, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x17, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x6f, 0x22, 0x41, 0x0a, 0x15, 0x55, 0x52, 0x4c, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x0a, 0x48, + 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x4d, + 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x39, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x02, 0x69, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x01, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x02, 0x6f, 0x72, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x6e, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6e, 0x6f, 0x74, 0x22, 0x54, 0x0a, 0x15, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x57, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7f, - 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, - 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x67, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, - 0x8c, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, - 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0f, 0x70, - 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x4b, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x32, - 0x35, 0x36, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, - 0x82, 0x01, 0x0a, 0x1b, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, - 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, - 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, - 0x41, 0x53, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x51, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, - 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, - 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x5f, 0x43, - 0x53, 0x56, 0x10, 0x02, 0x2a, 0x36, 0x0a, 0x0e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x49, 0x45, 0x4c, - 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x0e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x52, - 0x41, 0x50, 0x48, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x53, 0x55, - 0x42, 0x10, 0x02, 0x2a, 0x5c, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, - 0x0a, 0x13, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, - 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, - 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x53, 0x10, - 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x1b, 0x0a, - 0x17, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x42, - 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x2a, 0x34, 0x0a, 0x09, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x55, 0x42, 0x4c, - 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, - 0x02, 0x2a, 0x86, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, - 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, - 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x4e, 0x56, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, - 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x48, 0x4f, 0x4c, 0x44, 0x45, - 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x2a, 0x41, 0x0a, 0x0a, 0x48, 0x54, - 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x50, - 0x55, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, - 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x04, 0x32, 0x6e, 0x0a, - 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0c, - 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x77, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x04, 0x63, + 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x6e, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, + 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x22, 0xfb, 0x02, 0x0a, 0x20, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x88, 0x01, 0x01, 0x12, + 0x4d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, + 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x65, + 0x0a, 0x14, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, + 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x02, 0x52, 0x14, 0x77, 0x65, + 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x17, 0x0a, + 0x15, 0x5f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x5a, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, + 0x4c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x64, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x64, 0x6c, 0x22, 0x22, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4d, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, + 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0xb5, 0x02, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x03, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x03, 0x61, 0x6e, 0x64, 0x12, 0x41, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x02, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x03, 0x6e, 0x6f, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x3d, 0x0a, 0x02, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcf, 0x01, - 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x77, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x67, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2f, - 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x57, 0x43, 0x4e, 0xaa, 0x02, 0x10, 0x57, 0x67, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x67, 0x5c, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x67, 0x5c, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x57, 0x67, 0x3a, 0x3a, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x72, 0x42, + 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6e, 0x6f, 0x74, 0x22, 0x54, + 0x0a, 0x15, 0x43, 0x61, 0x63, 0x68, 0x65, 0x57, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7f, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x34, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x49, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x77, 0x67, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x4b, 0x0a, 0x0e, + 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x82, 0x01, 0x0a, 0x1b, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, + 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, + 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x51, 0x4c, + 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x4e, 0x44, + 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x5f, 0x41, + 0x52, 0x52, 0x41, 0x59, 0x5f, 0x43, 0x53, 0x56, 0x10, 0x02, 0x2a, 0x36, 0x0a, 0x0e, 0x41, 0x72, + 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x0c, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x00, 0x12, 0x12, + 0x0a, 0x0e, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, + 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x52, 0x41, 0x50, 0x48, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x55, 0x42, 0x53, 0x55, 0x42, 0x10, 0x02, 0x2a, 0x5c, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, + 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, + 0x14, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x49, 0x52, 0x45, 0x53, 0x10, 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52, + 0x59, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, + 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x03, 0x2a, 0x34, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x42, 0x53, + 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x02, 0x2a, 0x86, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, + 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x4e, 0x56, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, + 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x4c, 0x41, 0x43, + 0x45, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, + 0x2a, 0x41, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, + 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, + 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x53, 0x10, 0x04, 0x32, 0x6e, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x25, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xcf, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2d, + 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x67, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x6f, + 0x64, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x43, 0x4e, 0xaa, 0x02, 0x10, 0x57, 0x67, 0x2e, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x57, 0x67, 0x5c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x57, 0x67, 0x5c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x13, 0x57, 0x67, 0x3a, 0x3a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, + 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5321,7 +5421,7 @@ func file_wg_cosmo_node_v1_node_proto_rawDescGZIP() []byte { } var file_wg_cosmo_node_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_wg_cosmo_node_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 66) +var file_wg_cosmo_node_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 67) var file_wg_cosmo_node_v1_node_proto_goTypes = []any{ (ArgumentRenderConfiguration)(0), // 0: wg.cosmo.node.v1.ArgumentRenderConfiguration (ArgumentSource)(0), // 1: wg.cosmo.node.v1.ArgumentSource @@ -5365,67 +5465,68 @@ var file_wg_cosmo_node_v1_node_proto_goTypes = []any{ (*LookupFieldMapping)(nil), // 39: wg.cosmo.node.v1.LookupFieldMapping (*OperationMapping)(nil), // 40: wg.cosmo.node.v1.OperationMapping (*EntityMapping)(nil), // 41: wg.cosmo.node.v1.EntityMapping - (*TypeFieldMapping)(nil), // 42: wg.cosmo.node.v1.TypeFieldMapping - (*FieldMapping)(nil), // 43: wg.cosmo.node.v1.FieldMapping - (*ArgumentMapping)(nil), // 44: wg.cosmo.node.v1.ArgumentMapping - (*EnumMapping)(nil), // 45: wg.cosmo.node.v1.EnumMapping - (*EnumValueMapping)(nil), // 46: wg.cosmo.node.v1.EnumValueMapping - (*NatsStreamConfiguration)(nil), // 47: wg.cosmo.node.v1.NatsStreamConfiguration - (*NatsEventConfiguration)(nil), // 48: wg.cosmo.node.v1.NatsEventConfiguration - (*KafkaEventConfiguration)(nil), // 49: wg.cosmo.node.v1.KafkaEventConfiguration - (*RedisEventConfiguration)(nil), // 50: wg.cosmo.node.v1.RedisEventConfiguration - (*EngineEventConfiguration)(nil), // 51: wg.cosmo.node.v1.EngineEventConfiguration - (*DataSourceCustomEvents)(nil), // 52: wg.cosmo.node.v1.DataSourceCustomEvents - (*DataSourceCustom_Static)(nil), // 53: wg.cosmo.node.v1.DataSourceCustom_Static - (*ConfigurationVariable)(nil), // 54: wg.cosmo.node.v1.ConfigurationVariable - (*DirectiveConfiguration)(nil), // 55: wg.cosmo.node.v1.DirectiveConfiguration - (*URLQueryConfiguration)(nil), // 56: wg.cosmo.node.v1.URLQueryConfiguration - (*HTTPHeader)(nil), // 57: wg.cosmo.node.v1.HTTPHeader - (*MTLSConfiguration)(nil), // 58: wg.cosmo.node.v1.MTLSConfiguration - (*GraphQLSubscriptionConfiguration)(nil), // 59: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration - (*GraphQLFederationConfiguration)(nil), // 60: wg.cosmo.node.v1.GraphQLFederationConfiguration - (*InternedString)(nil), // 61: wg.cosmo.node.v1.InternedString - (*SingleTypeField)(nil), // 62: wg.cosmo.node.v1.SingleTypeField - (*SubscriptionFieldCondition)(nil), // 63: wg.cosmo.node.v1.SubscriptionFieldCondition - (*SubscriptionFilterCondition)(nil), // 64: wg.cosmo.node.v1.SubscriptionFilterCondition - (*CacheWarmerOperations)(nil), // 65: wg.cosmo.node.v1.CacheWarmerOperations - (*Operation)(nil), // 66: wg.cosmo.node.v1.Operation - (*OperationRequest)(nil), // 67: wg.cosmo.node.v1.OperationRequest - (*Extension)(nil), // 68: wg.cosmo.node.v1.Extension - (*PersistedQuery)(nil), // 69: wg.cosmo.node.v1.PersistedQuery - (*ClientInfo)(nil), // 70: wg.cosmo.node.v1.ClientInfo - nil, // 71: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry - nil, // 72: wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry - nil, // 73: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry - (common.EnumStatusCode)(0), // 74: wg.cosmo.common.EnumStatusCode - (common.GraphQLSubscriptionProtocol)(0), // 75: wg.cosmo.common.GraphQLSubscriptionProtocol - (common.GraphQLWebsocketSubprotocol)(0), // 76: wg.cosmo.common.GraphQLWebsocketSubprotocol + (*RequiredFieldMapping)(nil), // 42: wg.cosmo.node.v1.RequiredFieldMapping + (*TypeFieldMapping)(nil), // 43: wg.cosmo.node.v1.TypeFieldMapping + (*FieldMapping)(nil), // 44: wg.cosmo.node.v1.FieldMapping + (*ArgumentMapping)(nil), // 45: wg.cosmo.node.v1.ArgumentMapping + (*EnumMapping)(nil), // 46: wg.cosmo.node.v1.EnumMapping + (*EnumValueMapping)(nil), // 47: wg.cosmo.node.v1.EnumValueMapping + (*NatsStreamConfiguration)(nil), // 48: wg.cosmo.node.v1.NatsStreamConfiguration + (*NatsEventConfiguration)(nil), // 49: wg.cosmo.node.v1.NatsEventConfiguration + (*KafkaEventConfiguration)(nil), // 50: wg.cosmo.node.v1.KafkaEventConfiguration + (*RedisEventConfiguration)(nil), // 51: wg.cosmo.node.v1.RedisEventConfiguration + (*EngineEventConfiguration)(nil), // 52: wg.cosmo.node.v1.EngineEventConfiguration + (*DataSourceCustomEvents)(nil), // 53: wg.cosmo.node.v1.DataSourceCustomEvents + (*DataSourceCustom_Static)(nil), // 54: wg.cosmo.node.v1.DataSourceCustom_Static + (*ConfigurationVariable)(nil), // 55: wg.cosmo.node.v1.ConfigurationVariable + (*DirectiveConfiguration)(nil), // 56: wg.cosmo.node.v1.DirectiveConfiguration + (*URLQueryConfiguration)(nil), // 57: wg.cosmo.node.v1.URLQueryConfiguration + (*HTTPHeader)(nil), // 58: wg.cosmo.node.v1.HTTPHeader + (*MTLSConfiguration)(nil), // 59: wg.cosmo.node.v1.MTLSConfiguration + (*GraphQLSubscriptionConfiguration)(nil), // 60: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration + (*GraphQLFederationConfiguration)(nil), // 61: wg.cosmo.node.v1.GraphQLFederationConfiguration + (*InternedString)(nil), // 62: wg.cosmo.node.v1.InternedString + (*SingleTypeField)(nil), // 63: wg.cosmo.node.v1.SingleTypeField + (*SubscriptionFieldCondition)(nil), // 64: wg.cosmo.node.v1.SubscriptionFieldCondition + (*SubscriptionFilterCondition)(nil), // 65: wg.cosmo.node.v1.SubscriptionFilterCondition + (*CacheWarmerOperations)(nil), // 66: wg.cosmo.node.v1.CacheWarmerOperations + (*Operation)(nil), // 67: wg.cosmo.node.v1.Operation + (*OperationRequest)(nil), // 68: wg.cosmo.node.v1.OperationRequest + (*Extension)(nil), // 69: wg.cosmo.node.v1.Extension + (*PersistedQuery)(nil), // 70: wg.cosmo.node.v1.PersistedQuery + (*ClientInfo)(nil), // 71: wg.cosmo.node.v1.ClientInfo + nil, // 72: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry + nil, // 73: wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry + nil, // 74: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry + (common.EnumStatusCode)(0), // 75: wg.cosmo.common.EnumStatusCode + (common.GraphQLSubscriptionProtocol)(0), // 76: wg.cosmo.common.GraphQLSubscriptionProtocol + (common.GraphQLWebsocketSubprotocol)(0), // 77: wg.cosmo.common.GraphQLWebsocketSubprotocol } var file_wg_cosmo_node_v1_node_proto_depIdxs = []int32{ - 71, // 0: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.config_by_feature_flag_name:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry + 72, // 0: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.config_by_feature_flag_name:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry 18, // 1: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig.engine_config:type_name -> wg.cosmo.node.v1.EngineConfiguration 8, // 2: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig.subgraphs:type_name -> wg.cosmo.node.v1.Subgraph 18, // 3: wg.cosmo.node.v1.RouterConfig.engine_config:type_name -> wg.cosmo.node.v1.EngineConfiguration 8, // 4: wg.cosmo.node.v1.RouterConfig.subgraphs:type_name -> wg.cosmo.node.v1.Subgraph 9, // 5: wg.cosmo.node.v1.RouterConfig.feature_flag_configs:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs - 74, // 6: wg.cosmo.node.v1.Response.code:type_name -> wg.cosmo.common.EnumStatusCode + 75, // 6: wg.cosmo.node.v1.Response.code:type_name -> wg.cosmo.common.EnumStatusCode 15, // 7: wg.cosmo.node.v1.RegistrationInfo.account_limits:type_name -> wg.cosmo.node.v1.AccountLimits 12, // 8: wg.cosmo.node.v1.SelfRegisterResponse.response:type_name -> wg.cosmo.node.v1.Response 14, // 9: wg.cosmo.node.v1.SelfRegisterResponse.registrationInfo:type_name -> wg.cosmo.node.v1.RegistrationInfo 19, // 10: wg.cosmo.node.v1.EngineConfiguration.datasource_configurations:type_name -> wg.cosmo.node.v1.DataSourceConfiguration 23, // 11: wg.cosmo.node.v1.EngineConfiguration.field_configurations:type_name -> wg.cosmo.node.v1.FieldConfiguration 24, // 12: wg.cosmo.node.v1.EngineConfiguration.type_configurations:type_name -> wg.cosmo.node.v1.TypeConfiguration - 72, // 13: wg.cosmo.node.v1.EngineConfiguration.string_storage:type_name -> wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry + 73, // 13: wg.cosmo.node.v1.EngineConfiguration.string_storage:type_name -> wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry 2, // 14: wg.cosmo.node.v1.DataSourceConfiguration.kind:type_name -> wg.cosmo.node.v1.DataSourceKind 25, // 15: wg.cosmo.node.v1.DataSourceConfiguration.root_nodes:type_name -> wg.cosmo.node.v1.TypeField 25, // 16: wg.cosmo.node.v1.DataSourceConfiguration.child_nodes:type_name -> wg.cosmo.node.v1.TypeField 32, // 17: wg.cosmo.node.v1.DataSourceConfiguration.custom_graphql:type_name -> wg.cosmo.node.v1.DataSourceCustom_GraphQL - 53, // 18: wg.cosmo.node.v1.DataSourceConfiguration.custom_static:type_name -> wg.cosmo.node.v1.DataSourceCustom_Static - 55, // 19: wg.cosmo.node.v1.DataSourceConfiguration.directives:type_name -> wg.cosmo.node.v1.DirectiveConfiguration + 54, // 18: wg.cosmo.node.v1.DataSourceConfiguration.custom_static:type_name -> wg.cosmo.node.v1.DataSourceCustom_Static + 56, // 19: wg.cosmo.node.v1.DataSourceConfiguration.directives:type_name -> wg.cosmo.node.v1.DirectiveConfiguration 28, // 20: wg.cosmo.node.v1.DataSourceConfiguration.keys:type_name -> wg.cosmo.node.v1.RequiredField 28, // 21: wg.cosmo.node.v1.DataSourceConfiguration.provides:type_name -> wg.cosmo.node.v1.RequiredField 28, // 22: wg.cosmo.node.v1.DataSourceConfiguration.requires:type_name -> wg.cosmo.node.v1.RequiredField - 52, // 23: wg.cosmo.node.v1.DataSourceConfiguration.custom_events:type_name -> wg.cosmo.node.v1.DataSourceCustomEvents + 53, // 23: wg.cosmo.node.v1.DataSourceConfiguration.custom_events:type_name -> wg.cosmo.node.v1.DataSourceCustomEvents 29, // 24: wg.cosmo.node.v1.DataSourceConfiguration.entity_interfaces:type_name -> wg.cosmo.node.v1.EntityInterfaceConfiguration 29, // 25: wg.cosmo.node.v1.DataSourceConfiguration.interface_objects:type_name -> wg.cosmo.node.v1.EntityInterfaceConfiguration 1, // 26: wg.cosmo.node.v1.ArgumentConfiguration.source_type:type_name -> wg.cosmo.node.v1.ArgumentSource @@ -5433,73 +5534,75 @@ var file_wg_cosmo_node_v1_node_proto_depIdxs = []int32{ 21, // 28: wg.cosmo.node.v1.AuthorizationConfiguration.required_or_scopes_by_or:type_name -> wg.cosmo.node.v1.Scopes 20, // 29: wg.cosmo.node.v1.FieldConfiguration.arguments_configuration:type_name -> wg.cosmo.node.v1.ArgumentConfiguration 22, // 30: wg.cosmo.node.v1.FieldConfiguration.authorization_configuration:type_name -> wg.cosmo.node.v1.AuthorizationConfiguration - 64, // 31: wg.cosmo.node.v1.FieldConfiguration.subscription_filter_condition:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 65, // 31: wg.cosmo.node.v1.FieldConfiguration.subscription_filter_condition:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition 26, // 32: wg.cosmo.node.v1.FieldSetCondition.field_coordinates_path:type_name -> wg.cosmo.node.v1.FieldCoordinates 27, // 33: wg.cosmo.node.v1.RequiredField.conditions:type_name -> wg.cosmo.node.v1.FieldSetCondition - 54, // 34: wg.cosmo.node.v1.FetchConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 34: wg.cosmo.node.v1.FetchConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable 7, // 35: wg.cosmo.node.v1.FetchConfiguration.method:type_name -> wg.cosmo.node.v1.HTTPMethod - 73, // 36: wg.cosmo.node.v1.FetchConfiguration.header:type_name -> wg.cosmo.node.v1.FetchConfiguration.HeaderEntry - 54, // 37: wg.cosmo.node.v1.FetchConfiguration.body:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 56, // 38: wg.cosmo.node.v1.FetchConfiguration.query:type_name -> wg.cosmo.node.v1.URLQueryConfiguration - 58, // 39: wg.cosmo.node.v1.FetchConfiguration.mtls:type_name -> wg.cosmo.node.v1.MTLSConfiguration - 54, // 40: wg.cosmo.node.v1.FetchConfiguration.base_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 41: wg.cosmo.node.v1.FetchConfiguration.path:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 42: wg.cosmo.node.v1.FetchConfiguration.http_proxy_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 74, // 36: wg.cosmo.node.v1.FetchConfiguration.header:type_name -> wg.cosmo.node.v1.FetchConfiguration.HeaderEntry + 55, // 37: wg.cosmo.node.v1.FetchConfiguration.body:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 57, // 38: wg.cosmo.node.v1.FetchConfiguration.query:type_name -> wg.cosmo.node.v1.URLQueryConfiguration + 59, // 39: wg.cosmo.node.v1.FetchConfiguration.mtls:type_name -> wg.cosmo.node.v1.MTLSConfiguration + 55, // 40: wg.cosmo.node.v1.FetchConfiguration.base_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 41: wg.cosmo.node.v1.FetchConfiguration.path:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 42: wg.cosmo.node.v1.FetchConfiguration.http_proxy_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable 30, // 43: wg.cosmo.node.v1.DataSourceCustom_GraphQL.fetch:type_name -> wg.cosmo.node.v1.FetchConfiguration - 59, // 44: wg.cosmo.node.v1.DataSourceCustom_GraphQL.subscription:type_name -> wg.cosmo.node.v1.GraphQLSubscriptionConfiguration - 60, // 45: wg.cosmo.node.v1.DataSourceCustom_GraphQL.federation:type_name -> wg.cosmo.node.v1.GraphQLFederationConfiguration - 61, // 46: wg.cosmo.node.v1.DataSourceCustom_GraphQL.upstream_schema:type_name -> wg.cosmo.node.v1.InternedString - 62, // 47: wg.cosmo.node.v1.DataSourceCustom_GraphQL.custom_scalar_type_fields:type_name -> wg.cosmo.node.v1.SingleTypeField + 60, // 44: wg.cosmo.node.v1.DataSourceCustom_GraphQL.subscription:type_name -> wg.cosmo.node.v1.GraphQLSubscriptionConfiguration + 61, // 45: wg.cosmo.node.v1.DataSourceCustom_GraphQL.federation:type_name -> wg.cosmo.node.v1.GraphQLFederationConfiguration + 62, // 46: wg.cosmo.node.v1.DataSourceCustom_GraphQL.upstream_schema:type_name -> wg.cosmo.node.v1.InternedString + 63, // 47: wg.cosmo.node.v1.DataSourceCustom_GraphQL.custom_scalar_type_fields:type_name -> wg.cosmo.node.v1.SingleTypeField 33, // 48: wg.cosmo.node.v1.DataSourceCustom_GraphQL.grpc:type_name -> wg.cosmo.node.v1.GRPCConfiguration 37, // 49: wg.cosmo.node.v1.GRPCConfiguration.mapping:type_name -> wg.cosmo.node.v1.GRPCMapping 35, // 50: wg.cosmo.node.v1.GRPCConfiguration.plugin:type_name -> wg.cosmo.node.v1.PluginConfiguration 34, // 51: wg.cosmo.node.v1.PluginConfiguration.image_reference:type_name -> wg.cosmo.node.v1.ImageReference 40, // 52: wg.cosmo.node.v1.GRPCMapping.operation_mappings:type_name -> wg.cosmo.node.v1.OperationMapping 41, // 53: wg.cosmo.node.v1.GRPCMapping.entity_mappings:type_name -> wg.cosmo.node.v1.EntityMapping - 42, // 54: wg.cosmo.node.v1.GRPCMapping.type_field_mappings:type_name -> wg.cosmo.node.v1.TypeFieldMapping - 45, // 55: wg.cosmo.node.v1.GRPCMapping.enum_mappings:type_name -> wg.cosmo.node.v1.EnumMapping + 43, // 54: wg.cosmo.node.v1.GRPCMapping.type_field_mappings:type_name -> wg.cosmo.node.v1.TypeFieldMapping + 46, // 55: wg.cosmo.node.v1.GRPCMapping.enum_mappings:type_name -> wg.cosmo.node.v1.EnumMapping 38, // 56: wg.cosmo.node.v1.GRPCMapping.resolve_mappings:type_name -> wg.cosmo.node.v1.LookupMapping 3, // 57: wg.cosmo.node.v1.LookupMapping.type:type_name -> wg.cosmo.node.v1.LookupType 39, // 58: wg.cosmo.node.v1.LookupMapping.lookup_mapping:type_name -> wg.cosmo.node.v1.LookupFieldMapping - 43, // 59: wg.cosmo.node.v1.LookupFieldMapping.field_mapping:type_name -> wg.cosmo.node.v1.FieldMapping + 44, // 59: wg.cosmo.node.v1.LookupFieldMapping.field_mapping:type_name -> wg.cosmo.node.v1.FieldMapping 4, // 60: wg.cosmo.node.v1.OperationMapping.type:type_name -> wg.cosmo.node.v1.OperationType - 43, // 61: wg.cosmo.node.v1.TypeFieldMapping.field_mappings:type_name -> wg.cosmo.node.v1.FieldMapping - 44, // 62: wg.cosmo.node.v1.FieldMapping.argument_mappings:type_name -> wg.cosmo.node.v1.ArgumentMapping - 46, // 63: wg.cosmo.node.v1.EnumMapping.values:type_name -> wg.cosmo.node.v1.EnumValueMapping - 51, // 64: wg.cosmo.node.v1.NatsEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration - 47, // 65: wg.cosmo.node.v1.NatsEventConfiguration.stream_configuration:type_name -> wg.cosmo.node.v1.NatsStreamConfiguration - 51, // 66: wg.cosmo.node.v1.KafkaEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration - 51, // 67: wg.cosmo.node.v1.RedisEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration - 5, // 68: wg.cosmo.node.v1.EngineEventConfiguration.type:type_name -> wg.cosmo.node.v1.EventType - 48, // 69: wg.cosmo.node.v1.DataSourceCustomEvents.nats:type_name -> wg.cosmo.node.v1.NatsEventConfiguration - 49, // 70: wg.cosmo.node.v1.DataSourceCustomEvents.kafka:type_name -> wg.cosmo.node.v1.KafkaEventConfiguration - 50, // 71: wg.cosmo.node.v1.DataSourceCustomEvents.redis:type_name -> wg.cosmo.node.v1.RedisEventConfiguration - 54, // 72: wg.cosmo.node.v1.DataSourceCustom_Static.data:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 6, // 73: wg.cosmo.node.v1.ConfigurationVariable.kind:type_name -> wg.cosmo.node.v1.ConfigurationVariableKind - 54, // 74: wg.cosmo.node.v1.HTTPHeader.values:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 75: wg.cosmo.node.v1.MTLSConfiguration.key:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 76: wg.cosmo.node.v1.MTLSConfiguration.cert:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 77: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 75, // 78: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.protocol:type_name -> wg.cosmo.common.GraphQLSubscriptionProtocol - 76, // 79: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.websocketSubprotocol:type_name -> wg.cosmo.common.GraphQLWebsocketSubprotocol - 64, // 80: wg.cosmo.node.v1.SubscriptionFilterCondition.and:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition - 63, // 81: wg.cosmo.node.v1.SubscriptionFilterCondition.in:type_name -> wg.cosmo.node.v1.SubscriptionFieldCondition - 64, // 82: wg.cosmo.node.v1.SubscriptionFilterCondition.not:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition - 64, // 83: wg.cosmo.node.v1.SubscriptionFilterCondition.or:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition - 66, // 84: wg.cosmo.node.v1.CacheWarmerOperations.operations:type_name -> wg.cosmo.node.v1.Operation - 67, // 85: wg.cosmo.node.v1.Operation.request:type_name -> wg.cosmo.node.v1.OperationRequest - 70, // 86: wg.cosmo.node.v1.Operation.client:type_name -> wg.cosmo.node.v1.ClientInfo - 68, // 87: wg.cosmo.node.v1.OperationRequest.extensions:type_name -> wg.cosmo.node.v1.Extension - 69, // 88: wg.cosmo.node.v1.Extension.persisted_query:type_name -> wg.cosmo.node.v1.PersistedQuery - 10, // 89: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry.value:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig - 57, // 90: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry.value:type_name -> wg.cosmo.node.v1.HTTPHeader - 16, // 91: wg.cosmo.node.v1.NodeService.SelfRegister:input_type -> wg.cosmo.node.v1.SelfRegisterRequest - 17, // 92: wg.cosmo.node.v1.NodeService.SelfRegister:output_type -> wg.cosmo.node.v1.SelfRegisterResponse - 92, // [92:93] is the sub-list for method output_type - 91, // [91:92] is the sub-list for method input_type - 91, // [91:91] is the sub-list for extension type_name - 91, // [91:91] is the sub-list for extension extendee - 0, // [0:91] is the sub-list for field type_name + 42, // 61: wg.cosmo.node.v1.EntityMapping.required_field_mappings:type_name -> wg.cosmo.node.v1.RequiredFieldMapping + 44, // 62: wg.cosmo.node.v1.RequiredFieldMapping.field_mapping:type_name -> wg.cosmo.node.v1.FieldMapping + 44, // 63: wg.cosmo.node.v1.TypeFieldMapping.field_mappings:type_name -> wg.cosmo.node.v1.FieldMapping + 45, // 64: wg.cosmo.node.v1.FieldMapping.argument_mappings:type_name -> wg.cosmo.node.v1.ArgumentMapping + 47, // 65: wg.cosmo.node.v1.EnumMapping.values:type_name -> wg.cosmo.node.v1.EnumValueMapping + 52, // 66: wg.cosmo.node.v1.NatsEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration + 48, // 67: wg.cosmo.node.v1.NatsEventConfiguration.stream_configuration:type_name -> wg.cosmo.node.v1.NatsStreamConfiguration + 52, // 68: wg.cosmo.node.v1.KafkaEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration + 52, // 69: wg.cosmo.node.v1.RedisEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration + 5, // 70: wg.cosmo.node.v1.EngineEventConfiguration.type:type_name -> wg.cosmo.node.v1.EventType + 49, // 71: wg.cosmo.node.v1.DataSourceCustomEvents.nats:type_name -> wg.cosmo.node.v1.NatsEventConfiguration + 50, // 72: wg.cosmo.node.v1.DataSourceCustomEvents.kafka:type_name -> wg.cosmo.node.v1.KafkaEventConfiguration + 51, // 73: wg.cosmo.node.v1.DataSourceCustomEvents.redis:type_name -> wg.cosmo.node.v1.RedisEventConfiguration + 55, // 74: wg.cosmo.node.v1.DataSourceCustom_Static.data:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 6, // 75: wg.cosmo.node.v1.ConfigurationVariable.kind:type_name -> wg.cosmo.node.v1.ConfigurationVariableKind + 55, // 76: wg.cosmo.node.v1.HTTPHeader.values:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 77: wg.cosmo.node.v1.MTLSConfiguration.key:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 78: wg.cosmo.node.v1.MTLSConfiguration.cert:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 79: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 76, // 80: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.protocol:type_name -> wg.cosmo.common.GraphQLSubscriptionProtocol + 77, // 81: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.websocketSubprotocol:type_name -> wg.cosmo.common.GraphQLWebsocketSubprotocol + 65, // 82: wg.cosmo.node.v1.SubscriptionFilterCondition.and:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 64, // 83: wg.cosmo.node.v1.SubscriptionFilterCondition.in:type_name -> wg.cosmo.node.v1.SubscriptionFieldCondition + 65, // 84: wg.cosmo.node.v1.SubscriptionFilterCondition.not:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 65, // 85: wg.cosmo.node.v1.SubscriptionFilterCondition.or:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 67, // 86: wg.cosmo.node.v1.CacheWarmerOperations.operations:type_name -> wg.cosmo.node.v1.Operation + 68, // 87: wg.cosmo.node.v1.Operation.request:type_name -> wg.cosmo.node.v1.OperationRequest + 71, // 88: wg.cosmo.node.v1.Operation.client:type_name -> wg.cosmo.node.v1.ClientInfo + 69, // 89: wg.cosmo.node.v1.OperationRequest.extensions:type_name -> wg.cosmo.node.v1.Extension + 70, // 90: wg.cosmo.node.v1.Extension.persisted_query:type_name -> wg.cosmo.node.v1.PersistedQuery + 10, // 91: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry.value:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig + 58, // 92: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry.value:type_name -> wg.cosmo.node.v1.HTTPHeader + 16, // 93: wg.cosmo.node.v1.NodeService.SelfRegister:input_type -> wg.cosmo.node.v1.SelfRegisterRequest + 17, // 94: wg.cosmo.node.v1.NodeService.SelfRegister:output_type -> wg.cosmo.node.v1.SelfRegisterResponse + 94, // [94:95] is the sub-list for method output_type + 93, // [93:94] is the sub-list for method input_type + 93, // [93:93] is the sub-list for extension type_name + 93, // [93:93] is the sub-list for extension extendee + 0, // [0:93] is the sub-list for field type_name } func init() { file_wg_cosmo_node_v1_node_proto_init() } @@ -5917,7 +6020,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*TypeFieldMapping); i { + switch v := v.(*RequiredFieldMapping); i { case 0: return &v.state case 1: @@ -5929,7 +6032,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FieldMapping); i { + switch v := v.(*TypeFieldMapping); i { case 0: return &v.state case 1: @@ -5941,7 +6044,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ArgumentMapping); i { + switch v := v.(*FieldMapping); i { case 0: return &v.state case 1: @@ -5953,7 +6056,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*EnumMapping); i { + switch v := v.(*ArgumentMapping); i { case 0: return &v.state case 1: @@ -5965,7 +6068,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*EnumValueMapping); i { + switch v := v.(*EnumMapping); i { case 0: return &v.state case 1: @@ -5977,7 +6080,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*NatsStreamConfiguration); i { + switch v := v.(*EnumValueMapping); i { case 0: return &v.state case 1: @@ -5989,7 +6092,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*NatsEventConfiguration); i { + switch v := v.(*NatsStreamConfiguration); i { case 0: return &v.state case 1: @@ -6001,7 +6104,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*KafkaEventConfiguration); i { + switch v := v.(*NatsEventConfiguration); i { case 0: return &v.state case 1: @@ -6013,7 +6116,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*RedisEventConfiguration); i { + switch v := v.(*KafkaEventConfiguration); i { case 0: return &v.state case 1: @@ -6025,7 +6128,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*EngineEventConfiguration); i { + switch v := v.(*RedisEventConfiguration); i { case 0: return &v.state case 1: @@ -6037,7 +6140,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceCustomEvents); i { + switch v := v.(*EngineEventConfiguration); i { case 0: return &v.state case 1: @@ -6049,7 +6152,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceCustom_Static); i { + switch v := v.(*DataSourceCustomEvents); i { case 0: return &v.state case 1: @@ -6061,7 +6164,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ConfigurationVariable); i { + switch v := v.(*DataSourceCustom_Static); i { case 0: return &v.state case 1: @@ -6073,7 +6176,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*DirectiveConfiguration); i { + switch v := v.(*ConfigurationVariable); i { case 0: return &v.state case 1: @@ -6085,7 +6188,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*URLQueryConfiguration); i { + switch v := v.(*DirectiveConfiguration); i { case 0: return &v.state case 1: @@ -6097,7 +6200,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*HTTPHeader); i { + switch v := v.(*URLQueryConfiguration); i { case 0: return &v.state case 1: @@ -6109,7 +6212,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*MTLSConfiguration); i { + switch v := v.(*HTTPHeader); i { case 0: return &v.state case 1: @@ -6121,7 +6224,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*GraphQLSubscriptionConfiguration); i { + switch v := v.(*MTLSConfiguration); i { case 0: return &v.state case 1: @@ -6133,7 +6236,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*GraphQLFederationConfiguration); i { + switch v := v.(*GraphQLSubscriptionConfiguration); i { case 0: return &v.state case 1: @@ -6145,7 +6248,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*InternedString); i { + switch v := v.(*GraphQLFederationConfiguration); i { case 0: return &v.state case 1: @@ -6157,7 +6260,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*SingleTypeField); i { + switch v := v.(*InternedString); i { case 0: return &v.state case 1: @@ -6169,7 +6272,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*SubscriptionFieldCondition); i { + switch v := v.(*SingleTypeField); i { case 0: return &v.state case 1: @@ -6181,7 +6284,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*SubscriptionFilterCondition); i { + switch v := v.(*SubscriptionFieldCondition); i { case 0: return &v.state case 1: @@ -6193,7 +6296,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*CacheWarmerOperations); i { + switch v := v.(*SubscriptionFilterCondition); i { case 0: return &v.state case 1: @@ -6205,7 +6308,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { + switch v := v.(*CacheWarmerOperations); i { case 0: return &v.state case 1: @@ -6217,7 +6320,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*OperationRequest); i { + switch v := v.(*Operation); i { case 0: return &v.state case 1: @@ -6229,7 +6332,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*Extension); i { + switch v := v.(*OperationRequest); i { case 0: return &v.state case 1: @@ -6241,7 +6344,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*PersistedQuery); i { + switch v := v.(*Extension); i { case 0: return &v.state case 1: @@ -6253,6 +6356,18 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[62].Exporter = func(v any, i int) any { + switch v := v.(*PersistedQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wg_cosmo_node_v1_node_proto_msgTypes[63].Exporter = func(v any, i int) any { switch v := v.(*ClientInfo); i { case 0: return &v.state @@ -6272,15 +6387,15 @@ func file_wg_cosmo_node_v1_node_proto_init() { file_wg_cosmo_node_v1_node_proto_msgTypes[15].OneofWrappers = []any{} file_wg_cosmo_node_v1_node_proto_msgTypes[22].OneofWrappers = []any{} file_wg_cosmo_node_v1_node_proto_msgTypes[27].OneofWrappers = []any{} - file_wg_cosmo_node_v1_node_proto_msgTypes[51].OneofWrappers = []any{} - file_wg_cosmo_node_v1_node_proto_msgTypes[56].OneofWrappers = []any{} + file_wg_cosmo_node_v1_node_proto_msgTypes[52].OneofWrappers = []any{} + file_wg_cosmo_node_v1_node_proto_msgTypes[57].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_wg_cosmo_node_v1_node_proto_rawDesc, NumEnums: 8, - NumMessages: 66, + NumMessages: 67, NumExtensions: 0, NumServices: 1, }, diff --git a/connect/src/wg/cosmo/node/v1/node_pb.ts b/connect/src/wg/cosmo/node/v1/node_pb.ts index c13e62f9b8..8639a63a48 100644 --- a/connect/src/wg/cosmo/node/v1/node_pb.ts +++ b/connect/src/wg/cosmo/node/v1/node_pb.ts @@ -2095,6 +2095,13 @@ export class EntityMapping extends Message { */ response = ""; + /** + * Mappings for required fields + * + * @generated from field: repeated wg.cosmo.node.v1.RequiredFieldMapping required_field_mappings = 7; + */ + requiredFieldMappings: RequiredFieldMapping[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -2109,6 +2116,7 @@ export class EntityMapping extends Message { { no: 4, name: "rpc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "request", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 6, name: "response", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "required_field_mappings", kind: "message", T: RequiredFieldMapping, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): EntityMapping { @@ -2128,6 +2136,69 @@ export class EntityMapping extends Message { } } +/** + * Defines mapping for required fields + * + * @generated from message wg.cosmo.node.v1.RequiredFieldMapping + */ +export class RequiredFieldMapping extends Message { + /** + * @generated from field: wg.cosmo.node.v1.FieldMapping field_mapping = 1; + */ + fieldMapping?: FieldMapping; + + /** + * Mapped gRPC method name + * + * @generated from field: string rpc = 2; + */ + rpc = ""; + + /** + * gRPC request message type name + * + * @generated from field: string request = 3; + */ + request = ""; + + /** + * gRPC response message type name + * + * @generated from field: string response = 4; + */ + response = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "wg.cosmo.node.v1.RequiredFieldMapping"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "field_mapping", kind: "message", T: FieldMapping }, + { no: 2, name: "rpc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "request", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "response", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RequiredFieldMapping { + return new RequiredFieldMapping().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RequiredFieldMapping { + return new RequiredFieldMapping().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RequiredFieldMapping { + return new RequiredFieldMapping().fromJsonString(jsonString, options); + } + + static equals(a: RequiredFieldMapping | PlainMessage | undefined, b: RequiredFieldMapping | PlainMessage | undefined): boolean { + return proto3.util.equals(RequiredFieldMapping, a, b); + } +} + /** * Defines mapping between GraphQL type fields and gRPC message fields * diff --git a/proto/wg/cosmo/node/v1/node.proto b/proto/wg/cosmo/node/v1/node.proto index 45c5ff0d8b..c94315281f 100644 --- a/proto/wg/cosmo/node/v1/node.proto +++ b/proto/wg/cosmo/node/v1/node.proto @@ -316,6 +316,19 @@ message EntityMapping { string request = 5; // gRPC response message type name string response = 6; + // Mappings for required fields + repeated RequiredFieldMapping required_field_mappings = 7; +} + +// Defines mapping for required fields +message RequiredFieldMapping { + FieldMapping field_mapping = 1; + // Mapped gRPC method name + string rpc = 2; + // gRPC request message type name + string request = 3; + // gRPC response message type name + string response = 4; } // Defines mapping between GraphQL type fields and gRPC message fields diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 13c4197b8f..06249bf9aa 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -18,7 +18,7 @@ import { SelectionSetNode, visit, } from 'graphql'; -import { CompositeMessageKind, ProtoMessage, RPCMethod, VisitContext } from './types'; +import { CompositeMessageKind, ProtoMessage, ProtoMessageField, RPCMethod, VisitContext } from './types'; import { KEY_DIRECTIVE_NAME } from './string-constants'; import { createEntityLookupRequestKeyMessageName, @@ -29,11 +29,61 @@ import { } from './naming-conventions'; import { getProtoTypeFromGraphQL } from './proto-utils'; import { AbstractSelectionRewriter } from './abstract-selection-rewriter'; +import { FieldMapping, TypeFieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; +/** + * Configuration options for the RequiredFieldsVisitor. + */ type RequiredFieldsVisitorOptions = { includeComments: boolean; }; +/** + * A record mapping key directive strings to their corresponding RequiredFieldMapping. + * Each entity can have multiple @key directives, and each key needs its own RPC mapping. + */ +type RequiredFieldMappings = Record; + +/** + * Represents the mapping configuration for a single @requires field. + * This mapping is keyed by the @key directive fields string. + */ +export type RequiredFieldMapping = { + /** The RPC method configuration for resolving this required field */ + rpc?: RPCMethod; + /** The field mapping between GraphQL and proto field names */ + requiredFieldMapping?: FieldMapping; + /** Type field mappings for nested types in the required fields selection */ + typeFieldMappings?: TypeFieldMapping[]; +}; + +/** + * Generates protobuf messages and RPC methods for @requires directive field sets. + * + * This visitor processes the field set defined in a @requires directive and generates: + * - RPC method definitions for fetching required fields + * - Request/response message definitions + * - Field mappings between GraphQL and protobuf + * + * The visitor handles each @key directive on the entity separately, creating + * distinct RPC methods for each key since required fields may need to be + * fetched using different entity keys. + * + * @example + * ```typescript + * const visitor = new RequiredFieldsVisitor( + * schema, + * ProductType, + * weightField, + * 'dimensions { width height }' + * ); + * visitor.visit(); + * + * const messages = visitor.getMessageDefinitions(); + * const rpcs = visitor.getRPCMethods(); + * const mappings = visitor.getMapping(); + * ``` + */ export class RequiredFieldsVisitor { private readonly visitor: ASTVisitor; private readonly fieldSetDoc: DocumentNode; @@ -41,20 +91,35 @@ export class RequiredFieldsVisitor { private ancestors: GraphQLObjectType[] = []; private currentType: GraphQLObjectType | undefined = this.objectType; private keyDirectives: DirectiveNode[] = []; - private currentKey?: DirectiveNode; + private currentKeyFieldsString: string = ''; - /** - * Collected RPC methods for the required fields - */ + /** Collected RPC methods for the required fields */ private rpcMethods: RPCMethod[] = []; + /** All generated protobuf message definitions */ private messageDefinitions: ProtoMessage[] = []; + /** The current required field message being built */ private requiredFieldMessage: ProtoMessage | undefined; + /** The current message context during traversal */ private current: ProtoMessage | undefined; + /** Stack for tracking nested message contexts */ private stack: ProtoMessage[] = []; private currentInlineFragment?: InlineFragmentNode; private inlineFragmentStack: InlineFragmentNode[] = []; + /** Mappings keyed by @key directive fields string */ + private mapping: RequiredFieldMappings = {}; + + /** + * Creates a new RequiredFieldsVisitor. + * + * @param schema - The GraphQL schema containing type definitions + * @param objectType - The entity type that has the @requires directive + * @param requiredField - The field with the @requires directive + * @param fieldSet - The field set string from the @requires directive (e.g., "dimensions { width height }") + * @param options - Optional configuration options + * @throws Error if the object type is not an entity (has no @key directive) + */ constructor( private readonly schema: GraphQLSchema, private readonly objectType: GraphQLObjectType, @@ -68,28 +133,70 @@ export class RequiredFieldsVisitor { this.fieldSetDoc = parse(`{ ${fieldSet} }`); this.normalizeOperation(); this.visitor = this.createASTVisitor(); + this.mapping = {}; } + /** + * Executes the visitor, processing the field set for each @key directive. + * Creates separate RPC methods and mappings for each entity key. + */ public visit(): void { for (const keyDirective of this.keyDirectives) { - this.currentKey = keyDirective; + this.currentKeyFieldsString = this.getKeyFieldsString(keyDirective); + + this.mapping[this.currentKeyFieldsString] = { + requiredFieldMapping: new FieldMapping({ + original: this.requiredField.name, + mapped: graphqlFieldToProtoField(this.requiredField.name), + }), + typeFieldMappings: [], + }; visit(this.fieldSetDoc, this.visitor); } } + /** + * Normalizes the parsed field set operation by rewriting abstract selections. + * This ensures consistent handling of interface and union type selections. + */ private normalizeOperation(): void { const visitor = new AbstractSelectionRewriter(this.fieldSetDoc, this.schema, this.objectType); visitor.normalize(); } + /** + * Returns all generated protobuf message definitions. + * + * @returns Array of ProtoMessage definitions for request, response, and nested messages + */ public getMessageDefinitions(): ProtoMessage[] { return this.messageDefinitions; } + /** + * Returns the generated RPC method definitions. + * + * @returns Array of RPCMethod definitions for fetching required fields + */ public getRPCMethods(): RPCMethod[] { return this.rpcMethods; } + /** + * Returns the field mappings keyed by @key directive fields string. + * + * @returns Record mapping key strings to their RequiredFieldMapping configurations + */ + public getMapping(): RequiredFieldMappings { + return this.mapping; + } + + /** + * Resolves all @key directives from the object type. + * Each key directive will result in a separate RPC method. + * + * @throws Error if the object type has no @key directives + */ private resolveKeyDirectives(): void { this.keyDirectives = this.objectType.astNode?.directives?.filter((d) => d.name.value === KEY_DIRECTIVE_NAME) ?? []; if (this.keyDirectives.length === 0) { @@ -97,6 +204,11 @@ export class RequiredFieldsVisitor { } } + /** + * Creates the AST visitor configuration for traversing the field set document. + * + * @returns An ASTVisitor with handlers for Document, Field, InlineFragment, and SelectionSet nodes + */ private createASTVisitor(): ASTVisitor { return { Document: { @@ -131,24 +243,85 @@ export class RequiredFieldsVisitor { }; } + /** + * Handles leaving the document node. + * Finalizes the required field message and generates type field mappings. + */ private onLeaveDocument(): void { if (this.requiredFieldMessage) { this.messageDefinitions.push(this.requiredFieldMessage); + this.createTypeFieldMappings(this.requiredFieldMessage, []); + } + } + + /** + * Recursively creates type field mappings for a message and its nested messages. + * Builds the path-qualified type names for nested message mappings. + * + * @param message - The protobuf message to create mappings for + * @param path - The current path of parent message names for qualification + */ + private createTypeFieldMappings(message: ProtoMessage, path: string[]): void { + if (!message) return; + + let pathPrefix = path.length > 0 ? `${path.join('.')}.` : ''; + + const typeFieldMapping = new TypeFieldMapping({ + type: `${pathPrefix}${message.messageName}`, + fieldMappings: [], + }); + + for (const field of message.fields) { + typeFieldMapping.fieldMappings.push(this.createFieldMappingForRequiredField(field)); } + + path.push(message.messageName); + for (const nested of message.nestedMessages ?? []) { + this.createTypeFieldMappings(nested, path); + } + + path.pop(); + + this.mapping[this.currentKeyFieldsString!].typeFieldMappings?.push(typeFieldMapping); } + /** + * Creates a FieldMapping for a required field's proto message field. + * + * @param field - The proto message field to create a mapping for + * @returns A FieldMapping with original GraphQL name and mapped proto name + */ + private createFieldMappingForRequiredField(field: ProtoMessageField): FieldMapping { + return new FieldMapping({ + original: field.graphqlName ?? field.fieldName, + mapped: field.fieldName, + argumentMappings: [], // TODO: add argument mappings. + }); + } + + /** + * Handles entering the document node. + * Creates the RPC method definition and all request/response message structures + * for fetching the required fields. + * + * @param node - The document node being entered + */ private onEnterDocument(node: DocumentNode): void { - // TODO: walk for each key directive. - const keyFieldsString = this.getKeyFieldsString(this.currentKey!); const requiredFieldsMethodName = createRequiredFieldsMethodName( this.objectType.name, this.requiredField.name, - keyFieldsString, + this.currentKeyFieldsString, ); const requestMessageName = createRequestMessageName(requiredFieldsMethodName); const responseMessageName = createResponseMessageName(requiredFieldsMethodName); + this.mapping[this.currentKeyFieldsString].rpc = { + name: requiredFieldsMethodName, + request: requestMessageName, + response: responseMessageName, + }; + this.rpcMethods.push({ name: requiredFieldsMethodName, request: requestMessageName, @@ -171,7 +344,10 @@ export class RequiredFieldsVisitor { }); const fieldsMessageName = `${requiredFieldsMethodName}Fields`; - const entityKeyRequestMessageName = createEntityLookupRequestKeyMessageName(this.objectType.name, keyFieldsString); + const entityKeyRequestMessageName = createEntityLookupRequestKeyMessageName( + this.objectType.name, + this.currentKeyFieldsString, + ); this.messageDefinitions.push({ messageName: contextMessageName, @@ -190,7 +366,7 @@ export class RequiredFieldsVisitor { }); // Define the prototype for the required fields message. - // this will be added to the message definitions when the document is left. + // This will be added to the message definitions when the document is left. this.requiredFieldMessage = { messageName: fieldsMessageName, fields: [], @@ -211,7 +387,7 @@ export class RequiredFieldsVisitor { ], }); - // get the type name from the object type + // Get the type name from the required field const typeInfo = getProtoTypeFromGraphQL(false, this.requiredField.type); this.messageDefinitions.push({ @@ -230,6 +406,13 @@ export class RequiredFieldsVisitor { this.current = this.requiredFieldMessage; } + /** + * Handles entering a field node during traversal. + * Adds the field to the current proto message with appropriate type mapping. + * + * @param ctx - The visit context containing the field node and its ancestors + * @throws Error if the field definition is not found on the current type + */ private onEnterField(ctx: VisitContext): void { if (!this.current) return; @@ -246,9 +429,16 @@ export class RequiredFieldsVisitor { typeName: typeInfo.typeName, fieldNumber: this.current?.fields.length + 1, isRepeated: typeInfo.isRepeated, + graphqlName: fieldDefinition.name, }); } + /** + * Handles entering an inline fragment node. + * Pushes the current inline fragment onto the stack for nested fragment handling. + * + * @param ctx - The visit context containing the inline fragment node + */ private onEnterInlineFragment(ctx: VisitContext): void { if (this.currentInlineFragment) { this.inlineFragmentStack.push(this.currentInlineFragment); @@ -257,6 +447,12 @@ export class RequiredFieldsVisitor { this.currentInlineFragment = ctx.node; } + /** + * Handles leaving an inline fragment node. + * Records union member types when processing union type fragments. + * + * @param ctx - The visit context containing the inline fragment node + */ private onLeaveInlineFragment(ctx: VisitContext): void { const currentInlineFragment = this.currentInlineFragment; this.currentInlineFragment = this.inlineFragmentStack.pop() ?? undefined; @@ -268,6 +464,13 @@ export class RequiredFieldsVisitor { } } + /** + * Handles entering a selection set node. + * Creates a new nested proto message for object type selections and updates + * the current type context for proper field resolution. + * + * @param ctx - The visit context containing the selection set node and its parent + */ private onEnterSelectionSet(ctx: VisitContext): void { if (!ctx.parent || !this.current) return; @@ -308,11 +511,23 @@ export class RequiredFieldsVisitor { this.current = nested; } + /** + * Handles leaving a selection set node. + * Restores the previous type and message context when ascending the tree. + * + * @param ctx - The visit context containing the selection set node + */ private onLeaveSelectionSet(ctx: VisitContext): void { this.currentType = this.ancestors.pop() ?? this.currentType; this.current = this.stack.pop(); } + /** + * Handles composite types (interfaces and unions) by setting up the + * appropriate composite type metadata on the current message. + * + * @param fieldDefinition - The field definition with a composite type + */ private handleCompositeType(fieldDefinition: GraphQLField): void { if (!this.current) return; const compositeType = getNamedType(fieldDefinition.type); @@ -338,17 +553,34 @@ export class RequiredFieldsVisitor { } } + /** + * Type guard to check if a node is a FieldNode. + * + * @param node - The AST node or array of nodes to check + * @returns True if the node is a FieldNode + */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { if (Array.isArray(node)) return false; return (node as ASTNode).kind === Kind.FIELD; } + /** + * Type guard to check if a node is an InlineFragmentNode. + * + * @param node - The AST node or array of nodes to check + * @returns True if the node is an InlineFragmentNode + */ private isInlineFragmentNode(node: ASTNode | ReadonlyArray): node is InlineFragmentNode { if (Array.isArray(node)) return false; return (node as ASTNode).kind === Kind.INLINE_FRAGMENT; } - // TODO check if this is actually correct. + /** + * Finds the GraphQL object type for a field by looking up the field's return type. + * + * @param fieldName - The name of the field to look up + * @returns The GraphQL object type if the field returns an object type, undefined otherwise + */ private findObjectTypeForField(fieldName: string): GraphQLObjectType | undefined { const fields = this.currentType?.getFields() ?? {}; const field = fields[fieldName]; @@ -362,10 +594,22 @@ export class RequiredFieldsVisitor { return undefined; } + /** + * Retrieves the field definition for a field name from the current type. + * + * @param fieldName - The name of the field to look up + * @returns The GraphQL field definition, or undefined if not found + */ private fieldDefinition(fieldName: string): GraphQLField | undefined { return this.currentType?.getFields()[fieldName]; } + /** + * Finds a GraphQL object type by name from the schema's type map. + * + * @param typeName - The name of the type to find + * @returns The GraphQL object type if found and is an object type, undefined otherwise + */ private findObjectType(typeName: string): GraphQLObjectType | undefined { const type = this.schema.getTypeMap()[typeName]; if (!type) return undefined; @@ -374,6 +618,12 @@ export class RequiredFieldsVisitor { return type; } + /** + * Extracts the fields string from a @key directive's fields argument. + * + * @param directive - The @key directive node + * @returns The fields string value, or empty string if not found + */ private getKeyFieldsString(directive: DirectiveNode): string { const fieldsArg = directive.arguments?.find((arg) => arg.name.value === 'fields'); if (!fieldsArg) return ''; @@ -381,6 +631,12 @@ export class RequiredFieldsVisitor { return fieldsArg.value.kind === Kind.STRING ? fieldsArg.value.value : ''; } + /** + * Checks if a GraphQL type is a composite type (interface or union). + * + * @param type - The GraphQL type to check + * @returns True if the type is an interface or union type + */ private isCompositeType(type: GraphQLType): boolean { const namedType = getNamedType(type); return isInterfaceType(namedType) || isUnionType(namedType); diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index fe4ac3798f..6baea7a1aa 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -1,4 +1,5 @@ import { + ArgumentNode, DirectiveNode, GraphQLEnumType, GraphQLField, @@ -10,11 +11,13 @@ import { isInputObjectType, isObjectType, Kind, + StringValueNode, } from 'graphql'; import { createEntityLookupMethodName, createOperationMethodName, createRequestMessageName, + createRequiredFieldsMethodName, createResolverMethodName, createResponseMessageName, graphqlArgumentToProtoField, @@ -34,10 +37,12 @@ import { LookupType, OperationMapping, OperationType, + RequiredFieldMapping, TypeFieldMapping, } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; import { Maybe } from 'graphql/jsutils/Maybe.js'; - +import { EXTERNAL_DIRECTIVE_NAME, REQUIRES_DIRECTIVE_NAME } from './string-constants'; +import { RequiredFieldsVisitor } from './required-fields-visitor.js'; /** * Visitor that converts a GraphQL schema to gRPC mapping definitions * @@ -128,12 +133,66 @@ export class GraphQLToProtoVisitor { if (key) { // Create entity mapping for each key combination this.createEntityMapping(typeName, key); + // todo: add required fields mapping } } + + this.createRequiredFieldsMapping(type); + } + } + } + + private createRequiredFieldsMapping(type: GraphQLObjectType): void { + const fields = Object.values(type.getFields()).filter((field) => + field.astNode?.directives?.some((d) => d.name.value === REQUIRES_DIRECTIVE_NAME), + ); + if (fields.length === 0) return; + + for (const field of fields) { + const visitor = new RequiredFieldsVisitor(this.schema, type, field, this.getRequiredFieldSet(field)); + visitor.visit(); + const mapping = visitor.getMapping(); + + for (const [key, value] of Object.entries(mapping)) { + value.typeFieldMappings?.forEach((t) => { + if (t.fieldMappings?.length === 0) return; + + const typeFieldMapping = this.mapping.typeFieldMappings.find((tfm) => tfm.type === t.type); + if (!typeFieldMapping) { + this.mapping.typeFieldMappings.push(t); + } + + typeFieldMapping?.fieldMappings.push(...t.fieldMappings); + }); + + const em = this.mapping.entityMappings.find((em) => em.typeName === type.name && em.key === key); + if (!em) { + throw new Error(`Entity mapping not found for type ${type.name} and key ${key}`); + } + + em.requiredFieldMappings.push( + new RequiredFieldMapping({ + fieldMapping: value.requiredFieldMapping, + request: value.rpc?.request ?? '', + response: value.rpc?.response ?? '', + rpc: value.rpc?.name ?? '', + }), + ); } } } + private getRequiredFieldSet(field: GraphQLField): string { + const node = field.astNode?.directives + ?.find((d) => d.name.value === REQUIRES_DIRECTIVE_NAME) + ?.arguments?.find((arg) => arg.name.value === 'fields')?.value as StringValueNode; + if (!node) { + throw new Error(`Required field set not found for field ${field.name}`); + } + + return node.value; + } + /** * Extract all key directives from a GraphQL object type * @@ -163,6 +222,7 @@ export class GraphQLToProtoVisitor { rpc: rpc, request: createRequestMessageName(rpc), response: createResponseMessageName(rpc), + requiredFieldMappings: [], }); this.mapping.entityMappings.push(entityMapping); @@ -373,6 +433,9 @@ export class GraphQLToProtoVisitor { for (const fieldName in fields) { const field = fields[fieldName]; + + if (this.shouldSkipField(field)) continue; + const fieldMapping = this.createFieldMapping(field); typeFieldMapping.fieldMappings.push(fieldMapping); } @@ -383,6 +446,20 @@ export class GraphQLToProtoVisitor { } } + /** + * Determines if a field should be skipped during processing + * + * @param field - The GraphQL field to check + * @returns True if the field should be skipped, false otherwise + */ + private shouldSkipField(field: GraphQLField): boolean { + return ( + field.astNode?.directives?.some( + (d) => d.name.value === REQUIRES_DIRECTIVE_NAME || d.name.value === EXTERNAL_DIRECTIVE_NAME, + ) ?? false + ); + } + /** * Process a GraphQL input object type to generate field mappings * diff --git a/protographic/src/sdl-to-proto-visitor.ts b/protographic/src/sdl-to-proto-visitor.ts index 7407e60898..85a92654fa 100644 --- a/protographic/src/sdl-to-proto-visitor.ts +++ b/protographic/src/sdl-to-proto-visitor.ts @@ -46,7 +46,7 @@ import { EXTERNAL_DIRECTIVE_NAME, FIELD_ARGS, KEY_DIRECTIVE_NAME, - REQUIRED_DIRECTIVE_NAME, + REQUIRES_DIRECTIVE_NAME, RESULT, } from './string-constants.js'; import { buildProtoOptions, type ProtoOptions } from './proto-options.js'; @@ -1145,7 +1145,7 @@ Example: for (const entity of entityTypes) { const requiredFields = Object.values(entity.getFields()).filter((field) => - field.astNode?.directives?.some((d) => d.name.value === REQUIRED_DIRECTIVE_NAME), + field.astNode?.directives?.some((d) => d.name.value === REQUIRES_DIRECTIVE_NAME), ); if (requiredFields.length === 0) { @@ -1172,7 +1172,7 @@ Example: private getRequiredFieldSet(field: GraphQLField): string { const node = field.astNode?.directives - ?.find((d) => d.name.value === REQUIRED_DIRECTIVE_NAME) + ?.find((d) => d.name.value === REQUIRES_DIRECTIVE_NAME) ?.arguments?.find((arg: ArgumentNode) => arg.name.value === 'fields')?.value as StringValueNode; if (!node) { throw new Error(`Required field set not found for field ${field.name}`); @@ -1525,7 +1525,7 @@ Example: (field) => !field.astNode?.directives?.some( (directive) => - directive.name.value === EXTERNAL_DIRECTIVE_NAME || directive.name.value === REQUIRED_DIRECTIVE_NAME, + directive.name.value === EXTERNAL_DIRECTIVE_NAME || directive.name.value === REQUIRES_DIRECTIVE_NAME, ), ); diff --git a/protographic/src/sdl-validation-visitor.ts b/protographic/src/sdl-validation-visitor.ts index 5a66efb9c3..26fa853e41 100644 --- a/protographic/src/sdl-validation-visitor.ts +++ b/protographic/src/sdl-validation-visitor.ts @@ -13,8 +13,12 @@ import { NamedTypeNode, GraphQLID, ConstArgumentNode, + GraphQLObjectType, + GraphQLSchema, + buildSchema, } from 'graphql'; -import { CONNECT_FIELD_RESOLVER, CONTEXT } from './string-constants.js'; +import { CONNECT_FIELD_RESOLVER, CONTEXT, FIELDS, REQUIRES_DIRECTIVE_NAME } from './string-constants.js'; +import { SelectionSetValidationVisitor } from './selection-set-validation-visitor.js'; /** * Type mapping from Kind enum values to their corresponding AST node types @@ -86,6 +90,7 @@ interface MessageContext { */ export class SDLValidationVisitor { private readonly schema: string; + private readonly schemaObject: GraphQLSchema; private readonly validationResult: ValidationResult; private lintingRules: LintingRule[] = []; private visitor: ASTVisitor; @@ -96,6 +101,7 @@ export class SDLValidationVisitor { */ constructor(schema: string) { this.schema = schema; + this.schemaObject = buildSchema(schema, { assumeValid: true, assumeValidSDL: true }); this.validationResult = { errors: [], warnings: [], @@ -127,10 +133,11 @@ export class SDLValidationVisitor { validationFunction: (ctx) => this.validateListTypeNullability(ctx), }; + // Requires directive support will currently be added. This rule will be removed in the future. const requiresRule: LintingRule = { name: 'use-of-requires', description: 'Validates usage of @requires directive which is not yet supported', - enabled: true, + enabled: false, nodeKind: Kind.FIELD_DEFINITION, validationFunction: (ctx) => this.validateRequiresDirective(ctx), }; @@ -151,7 +158,22 @@ export class SDLValidationVisitor { validationFunction: (ctx) => this.validateInvalidResolverContext(ctx), }; - this.lintingRules = [objectTypeRule, listTypeRule, requiresRule, providesRule, resolverContextRule]; + const disallowAbstractTypesForRequiresRule: LintingRule = { + name: 'disallow-abstract-types-for-requires', + description: 'Validates that abstract types are not used in requires directives', + enabled: true, + nodeKind: Kind.FIELD_DEFINITION, + validationFunction: (ctx) => this.validateDisallowAbstractTypesForRequires(ctx), + }; + + this.lintingRules = [ + objectTypeRule, + listTypeRule, + requiresRule, + providesRule, + resolverContextRule, + disallowAbstractTypesForRequiresRule, + ]; } /** @@ -304,7 +326,9 @@ export class SDLValidationVisitor { * @private */ private validateRequiresDirective(ctx: VisitContext): void { - const hasRequiresDirective = ctx.node.directives?.some((directive) => directive.name.value === 'requires'); + const hasRequiresDirective = ctx.node.directives?.some( + (directive) => directive.name.value === REQUIRES_DIRECTIVE_NAME, + ); if (hasRequiresDirective) { this.addWarning('Use of requires is not supported yet', ctx.node.loc); @@ -370,6 +394,35 @@ export class SDLValidationVisitor { } } + private validateDisallowAbstractTypesForRequires(ctx: VisitContext): void { + const requiredDirective = ctx.node.directives?.find( + (directive) => directive.name.value === REQUIRES_DIRECTIVE_NAME, + ); + if (!requiredDirective) return; + + const fieldSelections = requiredDirective.arguments?.find((arg) => arg.name.value === FIELDS)?.value; + if (!fieldSelections || fieldSelections.kind !== Kind.STRING) return; + + const parentType = ctx.ancestors[ctx.ancestors.length - 1]; + + if (!this.isASTObjectTypeNode(parentType)) return; + + const operationDoc = parse(`{ ${fieldSelections.value} }`); + + const selectionSetValidationVisitor = new SelectionSetValidationVisitor( + operationDoc, + this.schemaObject.getType(parentType.name.value) as GraphQLObjectType, + ); + selectionSetValidationVisitor.visit(); + for (const error of selectionSetValidationVisitor.getValidationResult().errors) { + this.addError(error, ctx.node.loc); + } + + for (const warning of selectionSetValidationVisitor.getValidationResult().warnings) { + this.addWarning(warning, ctx.node.loc); + } + } + private getResolverContext(node: FieldDefinitionNode): ConstArgumentNode | undefined { return node.directives ?.find((directive) => directive.name.value === CONNECT_FIELD_RESOLVER) diff --git a/protographic/src/selection-set-validation-visitor.ts b/protographic/src/selection-set-validation-visitor.ts new file mode 100644 index 0000000000..dd9d2cc6cf --- /dev/null +++ b/protographic/src/selection-set-validation-visitor.ts @@ -0,0 +1,233 @@ +import { + ASTNode, + ASTVisitor, + BREAK, + DocumentNode, + FieldNode, + GraphQLField, + GraphQLNamedType, + GraphQLObjectType, + GraphQLType, + InlineFragmentNode, + isInterfaceType, + isNamedType, + isObjectType, + isUnionType, + Kind, + SelectionSetNode, + visit, +} from 'graphql'; +import { VisitContext } from './types'; +import { ValidationResult } from './sdl-validation-visitor'; + +/** + * Validates selection sets within @requires directive field sets. + * + * This visitor traverses a parsed field set document and enforces constraints + * specific to @requires directives: + * - Abstract types (interfaces, unions) are not allowed + * - Inline fragments are not allowed + * + * @example + * ```typescript + * const doc = parse('{ address { street city } }'); + * const visitor = new SelectionSetValidationVisitor(doc, ProductType); + * visitor.visit(); + * const result = visitor.getValidationResult(); + * if (result.errors.length > 0) { + * console.error('Validation failed:', result.errors); + * } + * ``` + */ +export class SelectionSetValidationVisitor { + private currentType: GraphQLObjectType; + private ancestors: GraphQLObjectType[] = []; + private readonly operationDocument: DocumentNode; + + private validationResult: ValidationResult = { + errors: [], + warnings: [], + }; + + /** + * Creates a new SelectionSetValidationVisitor. + * + * @param operationDocument - The parsed GraphQL document representing the field set + * @param objectType - The root GraphQL object type to validate against + */ + constructor(operationDocument: DocumentNode, objectType: GraphQLObjectType) { + this.operationDocument = operationDocument; + this.currentType = objectType; + } + + /** + * Executes the validation by traversing the operation document. + * After calling this method, use `getValidationResult()` to retrieve any errors or warnings. + */ + public visit(): void { + visit(this.operationDocument, this.createASTVisitor()); + } + + /** + * Returns the validation result containing any errors and warnings found during traversal. + * + * @returns The validation result with errors and warnings arrays + */ + public getValidationResult(): ValidationResult { + return this.validationResult; + } + + /** + * Creates the AST visitor configuration for traversing the document. + * + * @returns An ASTVisitor object with handlers for Field and SelectionSet nodes + */ + private createASTVisitor(): ASTVisitor { + return { + Field: { + enter: (node, key, parent, path, ancestors) => { + return this.onEnterField({ node, key, parent, path, ancestors }); + }, + }, + SelectionSet: { + enter: (node, key, parent, path, ancestors) => { + return this.onEnterSelectionSet({ node, key, parent, path, ancestors }); + }, + leave: (node, key, parent, path, ancestors) => { + this.onLeaveSelectionSet({ node, key, parent, path, ancestors }); + }, + }, + }; + } + + /** + * Handles entering a field node during traversal. + * Validates that the field's type is not an abstract type (interface or union). + * + * @param ctx - The visit context containing the field node and its ancestors + * @returns BREAK if validation fails to stop traversal, undefined otherwise + */ + private onEnterField(ctx: VisitContext): any { + const fieldDefitinion = this.getFieldDefinition(ctx.node); + const namedType = this.getUnderlyingType(fieldDefitinion.type); + + if (this.isAbstractType(namedType)) { + this.validationResult.errors.push( + `Abstract types are not allowed in requires directives. Found ${namedType.name} in ${this.currentType.name}.${ctx.node.name.value}`, + ); + return BREAK; + } + } + + /** + * Unwraps a GraphQL type to get its underlying named type. + * Strips NonNull and List wrappers to get the base type. + * + * @param type - The GraphQL type to unwrap + * @returns The underlying named type + */ + private getUnderlyingType(type: GraphQLType): GraphQLNamedType { + while (!isNamedType(type)) { + type = type.ofType; + } + + return type; + } + + /** + * Retrieves the field definition for a field node from the current type. + * + * @param node - The field node to look up + * @returns The GraphQL field definition + * @throws Error if the field definition is not found on the current type + */ + private getFieldDefinition(node: FieldNode): GraphQLField { + const fieldDef = this.currentType.getFields()[node.name.value]; + if (!fieldDef) throw new Error(`Field definition not found for field ${node.name.value}`); + return fieldDef; + } + + /** + * Handles entering a selection set node during traversal. + * Validates that inline fragments are not used and updates the current type + * context when descending into nested object types. + * + * @param ctx - The visit context containing the selection set node and its parent + * @returns BREAK if validation fails to stop traversal, undefined otherwise + */ + private onEnterSelectionSet(ctx: VisitContext): any { + if (!ctx.parent) return; + + if (this.isInlineFragment(ctx.parent)) { + this.validationResult.errors.push('Inline fragments are not allowed in requires directives'); + return BREAK; + } + + if (!this.isFieldNode(ctx.parent)) { + return; + } + + const fieldDefinition = this.getFieldDefinition(ctx.parent); + if (!fieldDefinition) { + return; + } + + const namedType = this.getUnderlyingType(fieldDefinition.type); + if (isObjectType(namedType)) { + this.ancestors.push(this.currentType); + this.currentType = namedType; + return; + } + } + + /** + * Handles leaving a selection set node during traversal. + * Restores the previous type context when ascending back up the tree. + * + * @param ctx - The visit context containing the selection set node and its parent + */ + private onLeaveSelectionSet(ctx: VisitContext): void { + if (!ctx.parent) return; + + if (!this.isFieldNode(ctx.parent)) { + return; + } + + this.currentType = this.ancestors.pop() ?? this.currentType; + } + + /** + * Type guard to check if a node is an InlineFragmentNode. + * + * @param node - The AST node or array of nodes to check + * @returns True if the node is an InlineFragmentNode + */ + private isInlineFragment(node: ASTNode | readonly ASTNode[]): node is InlineFragmentNode { + if (Array.isArray(node)) { + return false; + } + + return (node as ASTNode).kind === Kind.INLINE_FRAGMENT; + } + + /** + * Type guard to check if a node is a FieldNode. + * + * @param node - The AST node or array of nodes to check + * @returns True if the node is a FieldNode + */ + private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { + if (Array.isArray(node)) return false; + return (node as ASTNode).kind === Kind.FIELD; + } + + /** + * Checks if a named type is an abstract type (interface or union). + * + * @param node - The GraphQL named type to check + * @returns True if the type is an interface or union type + */ + private isAbstractType(node: GraphQLNamedType): boolean { + return isInterfaceType(node) || isUnionType(node); + } +} diff --git a/protographic/src/string-constants.ts b/protographic/src/string-constants.ts index 224244fdf9..6218c0fa64 100644 --- a/protographic/src/string-constants.ts +++ b/protographic/src/string-constants.ts @@ -1,6 +1,7 @@ export const KEY_DIRECTIVE_NAME = 'key'; export const EXTERNAL_DIRECTIVE_NAME = 'external'; -export const REQUIRED_DIRECTIVE_NAME = 'required'; +export const REQUIRES_DIRECTIVE_NAME = 'requires'; +export const FIELDS = 'fields'; export const CONNECT_FIELD_RESOLVER = 'connect__fieldResolver'; export const CONTEXT = 'context'; export const FIELD_ARGS = 'field_args'; diff --git a/protographic/src/types.ts b/protographic/src/types.ts index 7b72098f20..282ea0718f 100644 --- a/protographic/src/types.ts +++ b/protographic/src/types.ts @@ -71,6 +71,8 @@ export interface ProtoMessageField { fieldNumber: number; isRepeated?: boolean; description?: string; + // The original name of the field in the GraphQL schema + graphqlName?: string; } /** diff --git a/protographic/tests/sdl-to-mapping/03-federation.test.ts b/protographic/tests/sdl-to-mapping/03-federation.test.ts index c07a92519d..958f527664 100644 --- a/protographic/tests/sdl-to-mapping/03-federation.test.ts +++ b/protographic/tests/sdl-to-mapping/03-federation.test.ts @@ -986,4 +986,205 @@ describe('GraphQL Federation to Proto Mapping', () => { } `); }); + + it('maps entity with required and external fields', () => { + const sdl = ` + directive @key(fields: String!) on OBJECT + + type Product @key(fields: "id") { + id: ID! + price: Float! @external + itemCount: Int! @external + stockHealthScore: Float! @requires(fields: "itemCount price") + } + + type Query { + products: [Product!]! + } + `; + + const mapping = compileGraphQLToMapping(sdl, 'ProductService'); + + // RequireWarehouseStockHealthScoreByIdFields.RestockData + expect(mapping.toJson()).toMatchInlineSnapshot(` + { + "entityMappings": [ + { + "key": "id", + "kind": "entity", + "request": "LookupProductByIdRequest", + "response": "LookupProductByIdResponse", + "rpc": "LookupProductById", + "typeName": "Product", + }, + ], + "operationMappings": [ + { + "mapped": "QueryProducts", + "original": "products", + "request": "QueryProductsRequest", + "response": "QueryProductsResponse", + "type": "OPERATION_TYPE_QUERY", + }, + ], + "service": "ProductService", + "typeFieldMappings": [ + { + "fieldMappings": [ + { + "mapped": "item_count", + "original": "itemCount", + }, + { + "mapped": "price", + "original": "price", + }, + ], + "type": "RequireProductStockHealthScoreByIdFields", + }, + { + "fieldMappings": [ + { + "mapped": "products", + "original": "products", + }, + ], + "type": "Query", + }, + { + "fieldMappings": [ + { + "mapped": "id", + "original": "id", + }, + ], + "type": "Product", + }, + ], + "version": 1, + } + `); + }); + + it('maps entity with required and external fields with nested fields', () => { + const sdl = ` + directive @key(fields: String!) on OBJECT + + type Product @key(fields: "id") { + id: ID! + name: String! + price: Float! @external + itemCount: Int! @external + restockData: RestockData! @external + stockHealthScore: Float! @requires(fields: "itemCount restockData { lastRestockDate } price") + } + + type RestockData { + lastRestockDate: String! + } + + type Query { + products: [Product!]! + } + `; + + const mapping = compileGraphQLToMapping(sdl, 'ProductService'); + + // RequireWarehouseStockHealthScoreByIdFields.RestockData + expect(mapping.toJson()).toMatchInlineSnapshot(` + { + "entityMappings": [ + { + "key": "id", + "kind": "entity", + "request": "LookupProductByIdRequest", + "requiredFieldMappings": [ + { + "fieldMapping": { + "mapped": "stock_health_score", + "original": "stockHealthScore", + }, + "request": "RequireProductStockHealthScoreByIdRequest", + "response": "RequireProductStockHealthScoreByIdResponse", + "rpc": "RequireProductStockHealthScoreById", + }, + ], + "response": "LookupProductByIdResponse", + "rpc": "LookupProductById", + "typeName": "Product", + }, + ], + "operationMappings": [ + { + "mapped": "QueryProducts", + "original": "products", + "request": "QueryProductsRequest", + "response": "QueryProductsResponse", + "type": "OPERATION_TYPE_QUERY", + }, + ], + "service": "ProductService", + "typeFieldMappings": [ + { + "fieldMappings": [ + { + "mapped": "last_restock_date", + "original": "lastRestockDate", + }, + ], + "type": "RequireProductStockHealthScoreByIdFields.RestockData", + }, + { + "fieldMappings": [ + { + "mapped": "item_count", + "original": "itemCount", + }, + { + "mapped": "restock_data", + "original": "restockData", + }, + { + "mapped": "price", + "original": "price", + }, + ], + "type": "RequireProductStockHealthScoreByIdFields", + }, + { + "fieldMappings": [ + { + "mapped": "products", + "original": "products", + }, + ], + "type": "Query", + }, + { + "fieldMappings": [ + { + "mapped": "id", + "original": "id", + }, + { + "mapped": "name", + "original": "name", + }, + ], + "type": "Product", + }, + { + "fieldMappings": [ + { + "mapped": "last_restock_date", + "original": "lastRestockDate", + }, + ], + "type": "RestockData", + }, + ], + "version": 1, + } + `); + }); }); diff --git a/protographic/tests/sdl-to-proto/01-basic-types.test.ts b/protographic/tests/sdl-to-proto/01-basic-types.test.ts index d637d8b17a..daa2772350 100644 --- a/protographic/tests/sdl-to-proto/01-basic-types.test.ts +++ b/protographic/tests/sdl-to-proto/01-basic-types.test.ts @@ -1,4 +1,4 @@ -import { describe, expect, test } from 'vitest'; +import { describe, expect, it, test } from 'vitest'; import { compileGraphQLToProto } from '../../src'; import { expectValidProto } from '../util'; diff --git a/protographic/tests/sdl-to-proto/04-federation.test.ts b/protographic/tests/sdl-to-proto/04-federation.test.ts index 8a3013ded7..3fd5ffe6e2 100644 --- a/protographic/tests/sdl-to-proto/04-federation.test.ts +++ b/protographic/tests/sdl-to-proto/04-federation.test.ts @@ -1083,7 +1083,7 @@ describe('SDL to Proto - Federation and Special Types', () => { id: ID! manufacturerId: ID! @external productCode: String! @external - name: String! @required(fields: "manufacturerId productCode") + name: String! @requires(fields: "manufacturerId productCode") price: Float! } `; @@ -1174,7 +1174,7 @@ describe('SDL to Proto - Federation and Special Types', () => { id: ID! manufacturerId: ID! @external details: ProductDetails! @external - name: String! @required(fields: "manufacturerId details { description reviewSummary { status message } }") + name: String! @requires(fields: "manufacturerId details { description reviewSummary { status message } }") price: Float! } @@ -1299,7 +1299,7 @@ describe('SDL to Proto - Federation and Special Types', () => { id: ID! manufacturerId: ID! @external details: ProductDetails! @external - name: String! @required(fields: "details { description reviewSummary { message status } } manufacturerId") + name: String! @requires(fields: "details { description reviewSummary { message status } } manufacturerId") price: Float! } diff --git a/protographic/tests/sdl-validation/01-basic-validation.test.ts b/protographic/tests/sdl-validation/01-basic-validation.test.ts index 2af2a8b936..3e2354e743 100644 --- a/protographic/tests/sdl-validation/01-basic-validation.test.ts +++ b/protographic/tests/sdl-validation/01-basic-validation.test.ts @@ -47,6 +47,11 @@ describe('SDL Validation', () => { matrix: [[Matrix!]]! tags: [[String!]] } + + type Matrix { + id: ID! + name: String! + } `; const visitor = new SDLValidationVisitor(sdl); @@ -110,7 +115,7 @@ describe('SDL Validation', () => { expect(result.errors[0]).toContain('Nested key directives are not supported'); }); - test('should return a warning if a field has a requires directive', () => { + test('should not return a warning if a field has a requires directive', () => { const sdl = ` type Query { user: User! @@ -127,8 +132,7 @@ describe('SDL Validation', () => { const result = visitor.visit(); expect(result.errors).toHaveLength(0); - expect(result.warnings).toHaveLength(1); - expect(result.warnings[0]).toContain('Use of requires is not supported yet'); + expect(result.warnings).toHaveLength(0); }); test('should return an error if a field has an invalid resolver context', () => { @@ -171,6 +175,10 @@ describe('SDL Validation', () => { id: ID! name: String! } + + input UserInput { + name: String! + } `; const visitor = new SDLValidationVisitor(sdl); @@ -475,4 +483,60 @@ describe('SDL Validation', () => { '[Error] Cycle detected in context: field "baz" is referenced in the following path: "baz.bar.foo"', ); }); + + test('should return an error if an abstract type is used in a requires directive', () => { + const sdl = ` + type Query { + user: User! + } + + type User @key(fields: "id name") { + id: ID! + pet: Animal! @external + name: String! @requires(fields: "pet { ... on Cat { name } }") + } + + type Cat { + name: String! + } + + type Dog { + name: String! + } + + union Animal = Cat | Dog + `; + + const visitor = new SDLValidationVisitor(sdl); + const result = visitor.visit(); + + expect(result.errors).toHaveLength(1); + expect(result.warnings).toHaveLength(0); + expect(result.errors[0]).toContain( + '[Error] Abstract types are not allowed in requires directives. Found Animal in User.pet at', + ); + }); + + test('should correctly handle nested fields in requires directives', () => { + const sdl = ` + type Warehouse @key(fields: "id") { + id: ID! + name: String! + location: String! + inventoryCount: Int! @external + restockData: RestockData! @external + stockHealthScore: Float! @requires(fields: "inventoryCount restockData { lastRestockDate }") + } + + type RestockData { + lastRestockDate: String! + } +`; + + const visitor = new SDLValidationVisitor(sdl); + const result = visitor.visit(); + + expect(result.errors).toHaveLength(0); + expect(result.warnings).toHaveLength(0); + }); }); diff --git a/router/gen/proto/wg/cosmo/node/v1/node.pb.go b/router/gen/proto/wg/cosmo/node/v1/node.pb.go index 7ee7456e27..05a273055e 100644 --- a/router/gen/proto/wg/cosmo/node/v1/node.pb.go +++ b/router/gen/proto/wg/cosmo/node/v1/node.pb.go @@ -2713,6 +2713,8 @@ type EntityMapping struct { Request string `protobuf:"bytes,5,opt,name=request,proto3" json:"request,omitempty"` // gRPC response message type name Response string `protobuf:"bytes,6,opt,name=response,proto3" json:"response,omitempty"` + // Mappings for required fields + RequiredFieldMappings []*RequiredFieldMapping `protobuf:"bytes,7,rep,name=required_field_mappings,json=requiredFieldMappings,proto3" json:"required_field_mappings,omitempty"` } func (x *EntityMapping) Reset() { @@ -2789,6 +2791,88 @@ func (x *EntityMapping) GetResponse() string { return "" } +func (x *EntityMapping) GetRequiredFieldMappings() []*RequiredFieldMapping { + if x != nil { + return x.RequiredFieldMappings + } + return nil +} + +// Defines mapping for required fields +type RequiredFieldMapping struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FieldMapping *FieldMapping `protobuf:"bytes,1,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"` + // Mapped gRPC method name + Rpc string `protobuf:"bytes,2,opt,name=rpc,proto3" json:"rpc,omitempty"` + // gRPC request message type name + Request string `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` + // gRPC response message type name + Response string `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *RequiredFieldMapping) Reset() { + *x = RequiredFieldMapping{} + if protoimpl.UnsafeEnabled { + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequiredFieldMapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequiredFieldMapping) ProtoMessage() {} + +func (x *RequiredFieldMapping) ProtoReflect() protoreflect.Message { + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequiredFieldMapping.ProtoReflect.Descriptor instead. +func (*RequiredFieldMapping) Descriptor() ([]byte, []int) { + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{34} +} + +func (x *RequiredFieldMapping) GetFieldMapping() *FieldMapping { + if x != nil { + return x.FieldMapping + } + return nil +} + +func (x *RequiredFieldMapping) GetRpc() string { + if x != nil { + return x.Rpc + } + return "" +} + +func (x *RequiredFieldMapping) GetRequest() string { + if x != nil { + return x.Request + } + return "" +} + +func (x *RequiredFieldMapping) GetResponse() string { + if x != nil { + return x.Response + } + return "" +} + // Defines mapping between GraphQL type fields and gRPC message fields type TypeFieldMapping struct { state protoimpl.MessageState @@ -2804,7 +2888,7 @@ type TypeFieldMapping struct { func (x *TypeFieldMapping) Reset() { *x = TypeFieldMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2817,7 +2901,7 @@ func (x *TypeFieldMapping) String() string { func (*TypeFieldMapping) ProtoMessage() {} func (x *TypeFieldMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[34] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2830,7 +2914,7 @@ func (x *TypeFieldMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeFieldMapping.ProtoReflect.Descriptor instead. func (*TypeFieldMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{34} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{35} } func (x *TypeFieldMapping) GetType() string { @@ -2864,7 +2948,7 @@ type FieldMapping struct { func (x *FieldMapping) Reset() { *x = FieldMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2877,7 +2961,7 @@ func (x *FieldMapping) String() string { func (*FieldMapping) ProtoMessage() {} func (x *FieldMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[35] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2890,7 +2974,7 @@ func (x *FieldMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead. func (*FieldMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{35} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{36} } func (x *FieldMapping) GetOriginal() string { @@ -2929,7 +3013,7 @@ type ArgumentMapping struct { func (x *ArgumentMapping) Reset() { *x = ArgumentMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2942,7 +3026,7 @@ func (x *ArgumentMapping) String() string { func (*ArgumentMapping) ProtoMessage() {} func (x *ArgumentMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[36] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2955,7 +3039,7 @@ func (x *ArgumentMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use ArgumentMapping.ProtoReflect.Descriptor instead. func (*ArgumentMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{36} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{37} } func (x *ArgumentMapping) GetOriginal() string { @@ -2984,7 +3068,7 @@ type EnumMapping struct { func (x *EnumMapping) Reset() { *x = EnumMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2997,7 +3081,7 @@ func (x *EnumMapping) String() string { func (*EnumMapping) ProtoMessage() {} func (x *EnumMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[37] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3010,7 +3094,7 @@ func (x *EnumMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumMapping.ProtoReflect.Descriptor instead. func (*EnumMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{37} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{38} } func (x *EnumMapping) GetType() string { @@ -3039,7 +3123,7 @@ type EnumValueMapping struct { func (x *EnumValueMapping) Reset() { *x = EnumValueMapping{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3052,7 +3136,7 @@ func (x *EnumValueMapping) String() string { func (*EnumValueMapping) ProtoMessage() {} func (x *EnumValueMapping) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[38] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3065,7 +3149,7 @@ func (x *EnumValueMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumValueMapping.ProtoReflect.Descriptor instead. func (*EnumValueMapping) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{38} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{39} } func (x *EnumValueMapping) GetOriginal() string { @@ -3095,7 +3179,7 @@ type NatsStreamConfiguration struct { func (x *NatsStreamConfiguration) Reset() { *x = NatsStreamConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3108,7 +3192,7 @@ func (x *NatsStreamConfiguration) String() string { func (*NatsStreamConfiguration) ProtoMessage() {} func (x *NatsStreamConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[39] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3121,7 +3205,7 @@ func (x *NatsStreamConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use NatsStreamConfiguration.ProtoReflect.Descriptor instead. func (*NatsStreamConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{39} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{40} } func (x *NatsStreamConfiguration) GetConsumerName() string { @@ -3158,7 +3242,7 @@ type NatsEventConfiguration struct { func (x *NatsEventConfiguration) Reset() { *x = NatsEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3171,7 +3255,7 @@ func (x *NatsEventConfiguration) String() string { func (*NatsEventConfiguration) ProtoMessage() {} func (x *NatsEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[40] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3184,7 +3268,7 @@ func (x *NatsEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use NatsEventConfiguration.ProtoReflect.Descriptor instead. func (*NatsEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{40} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{41} } func (x *NatsEventConfiguration) GetEngineEventConfiguration() *EngineEventConfiguration { @@ -3220,7 +3304,7 @@ type KafkaEventConfiguration struct { func (x *KafkaEventConfiguration) Reset() { *x = KafkaEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3233,7 +3317,7 @@ func (x *KafkaEventConfiguration) String() string { func (*KafkaEventConfiguration) ProtoMessage() {} func (x *KafkaEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[41] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3246,7 +3330,7 @@ func (x *KafkaEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use KafkaEventConfiguration.ProtoReflect.Descriptor instead. func (*KafkaEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{41} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{42} } func (x *KafkaEventConfiguration) GetEngineEventConfiguration() *EngineEventConfiguration { @@ -3275,7 +3359,7 @@ type RedisEventConfiguration struct { func (x *RedisEventConfiguration) Reset() { *x = RedisEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3288,7 +3372,7 @@ func (x *RedisEventConfiguration) String() string { func (*RedisEventConfiguration) ProtoMessage() {} func (x *RedisEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[42] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3301,7 +3385,7 @@ func (x *RedisEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use RedisEventConfiguration.ProtoReflect.Descriptor instead. func (*RedisEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{42} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{43} } func (x *RedisEventConfiguration) GetEngineEventConfiguration() *EngineEventConfiguration { @@ -3332,7 +3416,7 @@ type EngineEventConfiguration struct { func (x *EngineEventConfiguration) Reset() { *x = EngineEventConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3345,7 +3429,7 @@ func (x *EngineEventConfiguration) String() string { func (*EngineEventConfiguration) ProtoMessage() {} func (x *EngineEventConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[43] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3358,7 +3442,7 @@ func (x *EngineEventConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use EngineEventConfiguration.ProtoReflect.Descriptor instead. func (*EngineEventConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{43} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{44} } func (x *EngineEventConfiguration) GetProviderId() string { @@ -3402,7 +3486,7 @@ type DataSourceCustomEvents struct { func (x *DataSourceCustomEvents) Reset() { *x = DataSourceCustomEvents{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3415,7 +3499,7 @@ func (x *DataSourceCustomEvents) String() string { func (*DataSourceCustomEvents) ProtoMessage() {} func (x *DataSourceCustomEvents) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[44] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3428,7 +3512,7 @@ func (x *DataSourceCustomEvents) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceCustomEvents.ProtoReflect.Descriptor instead. func (*DataSourceCustomEvents) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{44} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{45} } func (x *DataSourceCustomEvents) GetNats() []*NatsEventConfiguration { @@ -3463,7 +3547,7 @@ type DataSourceCustom_Static struct { func (x *DataSourceCustom_Static) Reset() { *x = DataSourceCustom_Static{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3476,7 +3560,7 @@ func (x *DataSourceCustom_Static) String() string { func (*DataSourceCustom_Static) ProtoMessage() {} func (x *DataSourceCustom_Static) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[45] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3489,7 +3573,7 @@ func (x *DataSourceCustom_Static) ProtoReflect() protoreflect.Message { // Deprecated: Use DataSourceCustom_Static.ProtoReflect.Descriptor instead. func (*DataSourceCustom_Static) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{45} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{46} } func (x *DataSourceCustom_Static) GetData() *ConfigurationVariable { @@ -3514,7 +3598,7 @@ type ConfigurationVariable struct { func (x *ConfigurationVariable) Reset() { *x = ConfigurationVariable{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3527,7 +3611,7 @@ func (x *ConfigurationVariable) String() string { func (*ConfigurationVariable) ProtoMessage() {} func (x *ConfigurationVariable) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[46] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3540,7 +3624,7 @@ func (x *ConfigurationVariable) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigurationVariable.ProtoReflect.Descriptor instead. func (*ConfigurationVariable) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{46} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{47} } func (x *ConfigurationVariable) GetKind() ConfigurationVariableKind { @@ -3590,7 +3674,7 @@ type DirectiveConfiguration struct { func (x *DirectiveConfiguration) Reset() { *x = DirectiveConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3603,7 +3687,7 @@ func (x *DirectiveConfiguration) String() string { func (*DirectiveConfiguration) ProtoMessage() {} func (x *DirectiveConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[47] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3616,7 +3700,7 @@ func (x *DirectiveConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use DirectiveConfiguration.ProtoReflect.Descriptor instead. func (*DirectiveConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{47} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{48} } func (x *DirectiveConfiguration) GetDirectiveName() string { @@ -3645,7 +3729,7 @@ type URLQueryConfiguration struct { func (x *URLQueryConfiguration) Reset() { *x = URLQueryConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3658,7 +3742,7 @@ func (x *URLQueryConfiguration) String() string { func (*URLQueryConfiguration) ProtoMessage() {} func (x *URLQueryConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[48] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3671,7 +3755,7 @@ func (x *URLQueryConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use URLQueryConfiguration.ProtoReflect.Descriptor instead. func (*URLQueryConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{48} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{49} } func (x *URLQueryConfiguration) GetName() string { @@ -3699,7 +3783,7 @@ type HTTPHeader struct { func (x *HTTPHeader) Reset() { *x = HTTPHeader{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3712,7 +3796,7 @@ func (x *HTTPHeader) String() string { func (*HTTPHeader) ProtoMessage() {} func (x *HTTPHeader) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[49] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3725,7 +3809,7 @@ func (x *HTTPHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPHeader.ProtoReflect.Descriptor instead. func (*HTTPHeader) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{49} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{50} } func (x *HTTPHeader) GetValues() []*ConfigurationVariable { @@ -3748,7 +3832,7 @@ type MTLSConfiguration struct { func (x *MTLSConfiguration) Reset() { *x = MTLSConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3761,7 +3845,7 @@ func (x *MTLSConfiguration) String() string { func (*MTLSConfiguration) ProtoMessage() {} func (x *MTLSConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[50] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3774,7 +3858,7 @@ func (x *MTLSConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use MTLSConfiguration.ProtoReflect.Descriptor instead. func (*MTLSConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{50} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{51} } func (x *MTLSConfiguration) GetKey() *ConfigurationVariable { @@ -3814,7 +3898,7 @@ type GraphQLSubscriptionConfiguration struct { func (x *GraphQLSubscriptionConfiguration) Reset() { *x = GraphQLSubscriptionConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3827,7 +3911,7 @@ func (x *GraphQLSubscriptionConfiguration) String() string { func (*GraphQLSubscriptionConfiguration) ProtoMessage() {} func (x *GraphQLSubscriptionConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[51] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3840,7 +3924,7 @@ func (x *GraphQLSubscriptionConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use GraphQLSubscriptionConfiguration.ProtoReflect.Descriptor instead. func (*GraphQLSubscriptionConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{51} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{52} } func (x *GraphQLSubscriptionConfiguration) GetEnabled() bool { @@ -3890,7 +3974,7 @@ type GraphQLFederationConfiguration struct { func (x *GraphQLFederationConfiguration) Reset() { *x = GraphQLFederationConfiguration{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3903,7 +3987,7 @@ func (x *GraphQLFederationConfiguration) String() string { func (*GraphQLFederationConfiguration) ProtoMessage() {} func (x *GraphQLFederationConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[52] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3916,7 +4000,7 @@ func (x *GraphQLFederationConfiguration) ProtoReflect() protoreflect.Message { // Deprecated: Use GraphQLFederationConfiguration.ProtoReflect.Descriptor instead. func (*GraphQLFederationConfiguration) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{52} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{53} } func (x *GraphQLFederationConfiguration) GetEnabled() bool { @@ -3945,7 +4029,7 @@ type InternedString struct { func (x *InternedString) Reset() { *x = InternedString{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3958,7 +4042,7 @@ func (x *InternedString) String() string { func (*InternedString) ProtoMessage() {} func (x *InternedString) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[53] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3971,7 +4055,7 @@ func (x *InternedString) ProtoReflect() protoreflect.Message { // Deprecated: Use InternedString.ProtoReflect.Descriptor instead. func (*InternedString) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{53} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{54} } func (x *InternedString) GetKey() string { @@ -3993,7 +4077,7 @@ type SingleTypeField struct { func (x *SingleTypeField) Reset() { *x = SingleTypeField{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4006,7 +4090,7 @@ func (x *SingleTypeField) String() string { func (*SingleTypeField) ProtoMessage() {} func (x *SingleTypeField) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[54] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4019,7 +4103,7 @@ func (x *SingleTypeField) ProtoReflect() protoreflect.Message { // Deprecated: Use SingleTypeField.ProtoReflect.Descriptor instead. func (*SingleTypeField) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{54} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{55} } func (x *SingleTypeField) GetTypeName() string { @@ -4048,7 +4132,7 @@ type SubscriptionFieldCondition struct { func (x *SubscriptionFieldCondition) Reset() { *x = SubscriptionFieldCondition{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4061,7 +4145,7 @@ func (x *SubscriptionFieldCondition) String() string { func (*SubscriptionFieldCondition) ProtoMessage() {} func (x *SubscriptionFieldCondition) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[55] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4074,7 +4158,7 @@ func (x *SubscriptionFieldCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriptionFieldCondition.ProtoReflect.Descriptor instead. func (*SubscriptionFieldCondition) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{55} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{56} } func (x *SubscriptionFieldCondition) GetFieldPath() []string { @@ -4105,7 +4189,7 @@ type SubscriptionFilterCondition struct { func (x *SubscriptionFilterCondition) Reset() { *x = SubscriptionFilterCondition{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4118,7 +4202,7 @@ func (x *SubscriptionFilterCondition) String() string { func (*SubscriptionFilterCondition) ProtoMessage() {} func (x *SubscriptionFilterCondition) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[56] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4131,7 +4215,7 @@ func (x *SubscriptionFilterCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriptionFilterCondition.ProtoReflect.Descriptor instead. func (*SubscriptionFilterCondition) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{56} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{57} } func (x *SubscriptionFilterCondition) GetAnd() []*SubscriptionFilterCondition { @@ -4173,7 +4257,7 @@ type CacheWarmerOperations struct { func (x *CacheWarmerOperations) Reset() { *x = CacheWarmerOperations{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4186,7 +4270,7 @@ func (x *CacheWarmerOperations) String() string { func (*CacheWarmerOperations) ProtoMessage() {} func (x *CacheWarmerOperations) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[57] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4199,7 +4283,7 @@ func (x *CacheWarmerOperations) ProtoReflect() protoreflect.Message { // Deprecated: Use CacheWarmerOperations.ProtoReflect.Descriptor instead. func (*CacheWarmerOperations) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{57} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{58} } func (x *CacheWarmerOperations) GetOperations() []*Operation { @@ -4221,7 +4305,7 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4234,7 +4318,7 @@ func (x *Operation) String() string { func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[58] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4247,7 +4331,7 @@ func (x *Operation) ProtoReflect() protoreflect.Message { // Deprecated: Use Operation.ProtoReflect.Descriptor instead. func (*Operation) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{58} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{59} } func (x *Operation) GetRequest() *OperationRequest { @@ -4277,7 +4361,7 @@ type OperationRequest struct { func (x *OperationRequest) Reset() { *x = OperationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4290,7 +4374,7 @@ func (x *OperationRequest) String() string { func (*OperationRequest) ProtoMessage() {} func (x *OperationRequest) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[59] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4303,7 +4387,7 @@ func (x *OperationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OperationRequest.ProtoReflect.Descriptor instead. func (*OperationRequest) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{59} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{60} } func (x *OperationRequest) GetOperationName() string { @@ -4338,7 +4422,7 @@ type Extension struct { func (x *Extension) Reset() { *x = Extension{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4351,7 +4435,7 @@ func (x *Extension) String() string { func (*Extension) ProtoMessage() {} func (x *Extension) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[60] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4364,7 +4448,7 @@ func (x *Extension) ProtoReflect() protoreflect.Message { // Deprecated: Use Extension.ProtoReflect.Descriptor instead. func (*Extension) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{60} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{61} } func (x *Extension) GetPersistedQuery() *PersistedQuery { @@ -4386,7 +4470,7 @@ type PersistedQuery struct { func (x *PersistedQuery) Reset() { *x = PersistedQuery{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4399,7 +4483,7 @@ func (x *PersistedQuery) String() string { func (*PersistedQuery) ProtoMessage() {} func (x *PersistedQuery) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[61] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4412,7 +4496,7 @@ func (x *PersistedQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use PersistedQuery.ProtoReflect.Descriptor instead. func (*PersistedQuery) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{61} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{62} } func (x *PersistedQuery) GetSha256Hash() string { @@ -4441,7 +4525,7 @@ type ClientInfo struct { func (x *ClientInfo) Reset() { *x = ClientInfo{} if protoimpl.UnsafeEnabled { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4454,7 +4538,7 @@ func (x *ClientInfo) String() string { func (*ClientInfo) ProtoMessage() {} func (x *ClientInfo) ProtoReflect() protoreflect.Message { - mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[62] + mi := &file_wg_cosmo_node_v1_node_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4467,7 +4551,7 @@ func (x *ClientInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead. func (*ClientInfo) Descriptor() ([]byte, []int) { - return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{62} + return file_wg_cosmo_node_v1_node_proto_rawDescGZIP(), []int{63} } func (x *ClientInfo) GetName() string { @@ -4975,7 +5059,7 @@ var file_wg_cosmo_node_v1_node_proto_rawDesc = []byte{ 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, @@ -4985,327 +5069,343 @@ var file_wg_cosmo_node_v1_node_proto_rawDesc = []byte{ 0x52, 0x03, 0x72, 0x70, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x10, 0x54, - 0x79, 0x70, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x67, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x17, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x77, + 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x14, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0c, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, - 0x4e, 0x0a, 0x11, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x77, 0x67, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, - 0x45, 0x0a, 0x0f, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, - 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x5d, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x61, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x70, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x6d, 0x0a, 0x10, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, 0x67, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x9f, 0x01, - 0x0a, 0x17, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x49, 0x6e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, - 0xfc, 0x01, 0x0a, 0x16, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x12, 0x5c, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, - 0x01, 0x0a, 0x17, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0x9f, 0x01, 0x0a, - 0x17, 0x52, 0x65, 0x64, 0x69, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, - 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, - 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, + 0x22, 0x92, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x11, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x10, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x45, 0x0a, 0x0f, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x5d, 0x0a, 0x0b, + 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x3a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x46, 0x0a, 0x10, 0x45, + 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, + 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6d, + 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x70, + 0x70, 0x65, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x17, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x72, 0x5f, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6d, 0x65, 0x72, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xfc, 0x01, 0x0a, 0x16, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x68, 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x18, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x22, 0x9f, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x64, 0x69, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, + 0x0a, 0x1a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, + 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0xd8, 0x01, 0x0a, 0x16, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xa8, - 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x16, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, - 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6b, 0x61, - 0x66, 0x6b, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x72, - 0x65, 0x64, 0x69, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, - 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd5, 0x02, 0x0a, - 0x15, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x69, 0x6e, - 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x3a, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x22, 0x65, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, - 0x0a, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x54, 0x6f, 0x22, 0x41, 0x0a, 0x15, 0x55, 0x52, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x4d, 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, + 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, + 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x22, 0x56, 0x0a, 0x17, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x63, 0x65, - 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, - 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, - 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x22, 0xfb, 0x02, 0x0a, 0x20, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x39, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x67, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x65, 0x0a, 0x14, 0x77, 0x65, 0x62, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, - 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x02, 0x52, 0x14, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x77, 0x65, 0x62, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x22, 0x5a, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x46, 0x65, 0x64, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x64, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x64, 0x6c, 0x22, 0x22, 0x0a, 0x0e, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x22, 0x4d, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, - 0x4f, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, - 0x22, 0xb5, 0x02, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x3f, 0x0a, 0x03, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x61, 0x6e, - 0x64, 0x12, 0x41, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0xd5, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x77, 0x67, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, + 0x17, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x4b, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, + 0x0a, 0x19, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x17, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x6f, 0x22, 0x41, 0x0a, 0x15, 0x55, 0x52, 0x4c, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x0a, 0x48, + 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x4d, + 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x39, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x02, 0x69, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x01, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x02, 0x6f, 0x72, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x72, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x6e, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6e, 0x6f, 0x74, 0x22, 0x54, 0x0a, 0x15, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x57, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7f, - 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, - 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x67, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, - 0x8c, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, - 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0f, 0x70, - 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x4b, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x32, - 0x35, 0x36, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, - 0x82, 0x01, 0x0a, 0x1b, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, - 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, - 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, - 0x41, 0x53, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x51, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, - 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, - 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x5f, 0x43, - 0x53, 0x56, 0x10, 0x02, 0x2a, 0x36, 0x0a, 0x0e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x49, 0x45, 0x4c, - 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x0e, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x52, - 0x41, 0x50, 0x48, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x53, 0x55, - 0x42, 0x10, 0x02, 0x2a, 0x5c, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, - 0x0a, 0x13, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, - 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, - 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x53, 0x10, - 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x1b, 0x0a, - 0x17, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x42, - 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x2a, 0x34, 0x0a, 0x09, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x55, 0x42, 0x4c, - 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, - 0x02, 0x2a, 0x86, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, - 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, - 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x4e, 0x56, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, - 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x48, 0x4f, 0x4c, 0x44, 0x45, - 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x2a, 0x41, 0x0a, 0x0a, 0x48, 0x54, - 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x50, - 0x55, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, - 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x04, 0x32, 0x6e, 0x0a, - 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0c, - 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x77, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x04, 0x63, + 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x6e, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x53, 0x6b, + 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x22, 0xfb, 0x02, 0x0a, 0x20, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, 0x88, 0x01, 0x01, 0x12, + 0x4d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, + 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x65, + 0x0a, 0x14, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x77, + 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x48, 0x02, 0x52, 0x14, 0x77, 0x65, + 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x75, 0x73, 0x65, 0x53, 0x53, 0x45, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x17, 0x0a, + 0x15, 0x5f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x75, 0x62, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x5a, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, + 0x4c, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x64, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x64, 0x6c, 0x22, 0x22, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4d, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, + 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0xb5, 0x02, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x03, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x03, 0x61, 0x6e, 0x64, 0x12, 0x41, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x02, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x03, 0x6e, 0x6f, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x3d, 0x0a, 0x02, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcb, 0x01, - 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x77, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x77, 0x67, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, - 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x43, 0x4e, - 0xaa, 0x02, 0x10, 0x57, 0x67, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x67, 0x5c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x5c, 0x4e, - 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, 0x67, 0x5c, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x57, 0x67, 0x3a, 0x3a, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x72, 0x42, + 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6e, 0x6f, 0x74, 0x22, 0x54, + 0x0a, 0x15, 0x43, 0x61, 0x63, 0x68, 0x65, 0x57, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7f, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x34, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x67, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x49, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x77, 0x67, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x4b, 0x0a, 0x0e, + 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x82, 0x01, 0x0a, 0x1b, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, + 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x52, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, + 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x51, 0x4c, + 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x4e, 0x44, + 0x45, 0x52, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x53, 0x5f, 0x41, + 0x52, 0x52, 0x41, 0x59, 0x5f, 0x43, 0x53, 0x56, 0x10, 0x02, 0x2a, 0x36, 0x0a, 0x0e, 0x41, 0x72, + 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x0c, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x00, 0x12, 0x12, + 0x0a, 0x0e, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, + 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x52, 0x41, 0x50, 0x48, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x55, 0x42, 0x53, 0x55, 0x42, 0x10, 0x02, 0x2a, 0x5c, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, + 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, + 0x14, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x49, 0x52, 0x45, 0x53, 0x10, 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x50, 0x45, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52, + 0x59, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, + 0x12, 0x1f, 0x0a, 0x1b, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x03, 0x2a, 0x34, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x42, 0x53, + 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x02, 0x2a, 0x86, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, + 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x4e, 0x56, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, + 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x4c, 0x41, 0x43, + 0x45, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, + 0x2a, 0x41, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, + 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, + 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x53, 0x10, 0x04, 0x32, 0x6e, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x25, 0x2e, 0x77, 0x67, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x66, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xcb, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x67, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x67, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x57, 0x43, 0x4e, 0xaa, 0x02, 0x10, 0x57, 0x67, 0x2e, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x57, 0x67, 0x5c, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x57, + 0x67, 0x5c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x5c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x57, 0x67, + 0x3a, 0x3a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x3a, 0x3a, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5321,7 +5421,7 @@ func file_wg_cosmo_node_v1_node_proto_rawDescGZIP() []byte { } var file_wg_cosmo_node_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_wg_cosmo_node_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 66) +var file_wg_cosmo_node_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 67) var file_wg_cosmo_node_v1_node_proto_goTypes = []any{ (ArgumentRenderConfiguration)(0), // 0: wg.cosmo.node.v1.ArgumentRenderConfiguration (ArgumentSource)(0), // 1: wg.cosmo.node.v1.ArgumentSource @@ -5365,67 +5465,68 @@ var file_wg_cosmo_node_v1_node_proto_goTypes = []any{ (*LookupFieldMapping)(nil), // 39: wg.cosmo.node.v1.LookupFieldMapping (*OperationMapping)(nil), // 40: wg.cosmo.node.v1.OperationMapping (*EntityMapping)(nil), // 41: wg.cosmo.node.v1.EntityMapping - (*TypeFieldMapping)(nil), // 42: wg.cosmo.node.v1.TypeFieldMapping - (*FieldMapping)(nil), // 43: wg.cosmo.node.v1.FieldMapping - (*ArgumentMapping)(nil), // 44: wg.cosmo.node.v1.ArgumentMapping - (*EnumMapping)(nil), // 45: wg.cosmo.node.v1.EnumMapping - (*EnumValueMapping)(nil), // 46: wg.cosmo.node.v1.EnumValueMapping - (*NatsStreamConfiguration)(nil), // 47: wg.cosmo.node.v1.NatsStreamConfiguration - (*NatsEventConfiguration)(nil), // 48: wg.cosmo.node.v1.NatsEventConfiguration - (*KafkaEventConfiguration)(nil), // 49: wg.cosmo.node.v1.KafkaEventConfiguration - (*RedisEventConfiguration)(nil), // 50: wg.cosmo.node.v1.RedisEventConfiguration - (*EngineEventConfiguration)(nil), // 51: wg.cosmo.node.v1.EngineEventConfiguration - (*DataSourceCustomEvents)(nil), // 52: wg.cosmo.node.v1.DataSourceCustomEvents - (*DataSourceCustom_Static)(nil), // 53: wg.cosmo.node.v1.DataSourceCustom_Static - (*ConfigurationVariable)(nil), // 54: wg.cosmo.node.v1.ConfigurationVariable - (*DirectiveConfiguration)(nil), // 55: wg.cosmo.node.v1.DirectiveConfiguration - (*URLQueryConfiguration)(nil), // 56: wg.cosmo.node.v1.URLQueryConfiguration - (*HTTPHeader)(nil), // 57: wg.cosmo.node.v1.HTTPHeader - (*MTLSConfiguration)(nil), // 58: wg.cosmo.node.v1.MTLSConfiguration - (*GraphQLSubscriptionConfiguration)(nil), // 59: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration - (*GraphQLFederationConfiguration)(nil), // 60: wg.cosmo.node.v1.GraphQLFederationConfiguration - (*InternedString)(nil), // 61: wg.cosmo.node.v1.InternedString - (*SingleTypeField)(nil), // 62: wg.cosmo.node.v1.SingleTypeField - (*SubscriptionFieldCondition)(nil), // 63: wg.cosmo.node.v1.SubscriptionFieldCondition - (*SubscriptionFilterCondition)(nil), // 64: wg.cosmo.node.v1.SubscriptionFilterCondition - (*CacheWarmerOperations)(nil), // 65: wg.cosmo.node.v1.CacheWarmerOperations - (*Operation)(nil), // 66: wg.cosmo.node.v1.Operation - (*OperationRequest)(nil), // 67: wg.cosmo.node.v1.OperationRequest - (*Extension)(nil), // 68: wg.cosmo.node.v1.Extension - (*PersistedQuery)(nil), // 69: wg.cosmo.node.v1.PersistedQuery - (*ClientInfo)(nil), // 70: wg.cosmo.node.v1.ClientInfo - nil, // 71: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry - nil, // 72: wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry - nil, // 73: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry - (common.EnumStatusCode)(0), // 74: wg.cosmo.common.EnumStatusCode - (common.GraphQLSubscriptionProtocol)(0), // 75: wg.cosmo.common.GraphQLSubscriptionProtocol - (common.GraphQLWebsocketSubprotocol)(0), // 76: wg.cosmo.common.GraphQLWebsocketSubprotocol + (*RequiredFieldMapping)(nil), // 42: wg.cosmo.node.v1.RequiredFieldMapping + (*TypeFieldMapping)(nil), // 43: wg.cosmo.node.v1.TypeFieldMapping + (*FieldMapping)(nil), // 44: wg.cosmo.node.v1.FieldMapping + (*ArgumentMapping)(nil), // 45: wg.cosmo.node.v1.ArgumentMapping + (*EnumMapping)(nil), // 46: wg.cosmo.node.v1.EnumMapping + (*EnumValueMapping)(nil), // 47: wg.cosmo.node.v1.EnumValueMapping + (*NatsStreamConfiguration)(nil), // 48: wg.cosmo.node.v1.NatsStreamConfiguration + (*NatsEventConfiguration)(nil), // 49: wg.cosmo.node.v1.NatsEventConfiguration + (*KafkaEventConfiguration)(nil), // 50: wg.cosmo.node.v1.KafkaEventConfiguration + (*RedisEventConfiguration)(nil), // 51: wg.cosmo.node.v1.RedisEventConfiguration + (*EngineEventConfiguration)(nil), // 52: wg.cosmo.node.v1.EngineEventConfiguration + (*DataSourceCustomEvents)(nil), // 53: wg.cosmo.node.v1.DataSourceCustomEvents + (*DataSourceCustom_Static)(nil), // 54: wg.cosmo.node.v1.DataSourceCustom_Static + (*ConfigurationVariable)(nil), // 55: wg.cosmo.node.v1.ConfigurationVariable + (*DirectiveConfiguration)(nil), // 56: wg.cosmo.node.v1.DirectiveConfiguration + (*URLQueryConfiguration)(nil), // 57: wg.cosmo.node.v1.URLQueryConfiguration + (*HTTPHeader)(nil), // 58: wg.cosmo.node.v1.HTTPHeader + (*MTLSConfiguration)(nil), // 59: wg.cosmo.node.v1.MTLSConfiguration + (*GraphQLSubscriptionConfiguration)(nil), // 60: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration + (*GraphQLFederationConfiguration)(nil), // 61: wg.cosmo.node.v1.GraphQLFederationConfiguration + (*InternedString)(nil), // 62: wg.cosmo.node.v1.InternedString + (*SingleTypeField)(nil), // 63: wg.cosmo.node.v1.SingleTypeField + (*SubscriptionFieldCondition)(nil), // 64: wg.cosmo.node.v1.SubscriptionFieldCondition + (*SubscriptionFilterCondition)(nil), // 65: wg.cosmo.node.v1.SubscriptionFilterCondition + (*CacheWarmerOperations)(nil), // 66: wg.cosmo.node.v1.CacheWarmerOperations + (*Operation)(nil), // 67: wg.cosmo.node.v1.Operation + (*OperationRequest)(nil), // 68: wg.cosmo.node.v1.OperationRequest + (*Extension)(nil), // 69: wg.cosmo.node.v1.Extension + (*PersistedQuery)(nil), // 70: wg.cosmo.node.v1.PersistedQuery + (*ClientInfo)(nil), // 71: wg.cosmo.node.v1.ClientInfo + nil, // 72: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry + nil, // 73: wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry + nil, // 74: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry + (common.EnumStatusCode)(0), // 75: wg.cosmo.common.EnumStatusCode + (common.GraphQLSubscriptionProtocol)(0), // 76: wg.cosmo.common.GraphQLSubscriptionProtocol + (common.GraphQLWebsocketSubprotocol)(0), // 77: wg.cosmo.common.GraphQLWebsocketSubprotocol } var file_wg_cosmo_node_v1_node_proto_depIdxs = []int32{ - 71, // 0: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.config_by_feature_flag_name:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry + 72, // 0: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.config_by_feature_flag_name:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry 18, // 1: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig.engine_config:type_name -> wg.cosmo.node.v1.EngineConfiguration 8, // 2: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig.subgraphs:type_name -> wg.cosmo.node.v1.Subgraph 18, // 3: wg.cosmo.node.v1.RouterConfig.engine_config:type_name -> wg.cosmo.node.v1.EngineConfiguration 8, // 4: wg.cosmo.node.v1.RouterConfig.subgraphs:type_name -> wg.cosmo.node.v1.Subgraph 9, // 5: wg.cosmo.node.v1.RouterConfig.feature_flag_configs:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs - 74, // 6: wg.cosmo.node.v1.Response.code:type_name -> wg.cosmo.common.EnumStatusCode + 75, // 6: wg.cosmo.node.v1.Response.code:type_name -> wg.cosmo.common.EnumStatusCode 15, // 7: wg.cosmo.node.v1.RegistrationInfo.account_limits:type_name -> wg.cosmo.node.v1.AccountLimits 12, // 8: wg.cosmo.node.v1.SelfRegisterResponse.response:type_name -> wg.cosmo.node.v1.Response 14, // 9: wg.cosmo.node.v1.SelfRegisterResponse.registrationInfo:type_name -> wg.cosmo.node.v1.RegistrationInfo 19, // 10: wg.cosmo.node.v1.EngineConfiguration.datasource_configurations:type_name -> wg.cosmo.node.v1.DataSourceConfiguration 23, // 11: wg.cosmo.node.v1.EngineConfiguration.field_configurations:type_name -> wg.cosmo.node.v1.FieldConfiguration 24, // 12: wg.cosmo.node.v1.EngineConfiguration.type_configurations:type_name -> wg.cosmo.node.v1.TypeConfiguration - 72, // 13: wg.cosmo.node.v1.EngineConfiguration.string_storage:type_name -> wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry + 73, // 13: wg.cosmo.node.v1.EngineConfiguration.string_storage:type_name -> wg.cosmo.node.v1.EngineConfiguration.StringStorageEntry 2, // 14: wg.cosmo.node.v1.DataSourceConfiguration.kind:type_name -> wg.cosmo.node.v1.DataSourceKind 25, // 15: wg.cosmo.node.v1.DataSourceConfiguration.root_nodes:type_name -> wg.cosmo.node.v1.TypeField 25, // 16: wg.cosmo.node.v1.DataSourceConfiguration.child_nodes:type_name -> wg.cosmo.node.v1.TypeField 32, // 17: wg.cosmo.node.v1.DataSourceConfiguration.custom_graphql:type_name -> wg.cosmo.node.v1.DataSourceCustom_GraphQL - 53, // 18: wg.cosmo.node.v1.DataSourceConfiguration.custom_static:type_name -> wg.cosmo.node.v1.DataSourceCustom_Static - 55, // 19: wg.cosmo.node.v1.DataSourceConfiguration.directives:type_name -> wg.cosmo.node.v1.DirectiveConfiguration + 54, // 18: wg.cosmo.node.v1.DataSourceConfiguration.custom_static:type_name -> wg.cosmo.node.v1.DataSourceCustom_Static + 56, // 19: wg.cosmo.node.v1.DataSourceConfiguration.directives:type_name -> wg.cosmo.node.v1.DirectiveConfiguration 28, // 20: wg.cosmo.node.v1.DataSourceConfiguration.keys:type_name -> wg.cosmo.node.v1.RequiredField 28, // 21: wg.cosmo.node.v1.DataSourceConfiguration.provides:type_name -> wg.cosmo.node.v1.RequiredField 28, // 22: wg.cosmo.node.v1.DataSourceConfiguration.requires:type_name -> wg.cosmo.node.v1.RequiredField - 52, // 23: wg.cosmo.node.v1.DataSourceConfiguration.custom_events:type_name -> wg.cosmo.node.v1.DataSourceCustomEvents + 53, // 23: wg.cosmo.node.v1.DataSourceConfiguration.custom_events:type_name -> wg.cosmo.node.v1.DataSourceCustomEvents 29, // 24: wg.cosmo.node.v1.DataSourceConfiguration.entity_interfaces:type_name -> wg.cosmo.node.v1.EntityInterfaceConfiguration 29, // 25: wg.cosmo.node.v1.DataSourceConfiguration.interface_objects:type_name -> wg.cosmo.node.v1.EntityInterfaceConfiguration 1, // 26: wg.cosmo.node.v1.ArgumentConfiguration.source_type:type_name -> wg.cosmo.node.v1.ArgumentSource @@ -5433,73 +5534,75 @@ var file_wg_cosmo_node_v1_node_proto_depIdxs = []int32{ 21, // 28: wg.cosmo.node.v1.AuthorizationConfiguration.required_or_scopes_by_or:type_name -> wg.cosmo.node.v1.Scopes 20, // 29: wg.cosmo.node.v1.FieldConfiguration.arguments_configuration:type_name -> wg.cosmo.node.v1.ArgumentConfiguration 22, // 30: wg.cosmo.node.v1.FieldConfiguration.authorization_configuration:type_name -> wg.cosmo.node.v1.AuthorizationConfiguration - 64, // 31: wg.cosmo.node.v1.FieldConfiguration.subscription_filter_condition:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 65, // 31: wg.cosmo.node.v1.FieldConfiguration.subscription_filter_condition:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition 26, // 32: wg.cosmo.node.v1.FieldSetCondition.field_coordinates_path:type_name -> wg.cosmo.node.v1.FieldCoordinates 27, // 33: wg.cosmo.node.v1.RequiredField.conditions:type_name -> wg.cosmo.node.v1.FieldSetCondition - 54, // 34: wg.cosmo.node.v1.FetchConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 34: wg.cosmo.node.v1.FetchConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable 7, // 35: wg.cosmo.node.v1.FetchConfiguration.method:type_name -> wg.cosmo.node.v1.HTTPMethod - 73, // 36: wg.cosmo.node.v1.FetchConfiguration.header:type_name -> wg.cosmo.node.v1.FetchConfiguration.HeaderEntry - 54, // 37: wg.cosmo.node.v1.FetchConfiguration.body:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 56, // 38: wg.cosmo.node.v1.FetchConfiguration.query:type_name -> wg.cosmo.node.v1.URLQueryConfiguration - 58, // 39: wg.cosmo.node.v1.FetchConfiguration.mtls:type_name -> wg.cosmo.node.v1.MTLSConfiguration - 54, // 40: wg.cosmo.node.v1.FetchConfiguration.base_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 41: wg.cosmo.node.v1.FetchConfiguration.path:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 42: wg.cosmo.node.v1.FetchConfiguration.http_proxy_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 74, // 36: wg.cosmo.node.v1.FetchConfiguration.header:type_name -> wg.cosmo.node.v1.FetchConfiguration.HeaderEntry + 55, // 37: wg.cosmo.node.v1.FetchConfiguration.body:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 57, // 38: wg.cosmo.node.v1.FetchConfiguration.query:type_name -> wg.cosmo.node.v1.URLQueryConfiguration + 59, // 39: wg.cosmo.node.v1.FetchConfiguration.mtls:type_name -> wg.cosmo.node.v1.MTLSConfiguration + 55, // 40: wg.cosmo.node.v1.FetchConfiguration.base_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 41: wg.cosmo.node.v1.FetchConfiguration.path:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 42: wg.cosmo.node.v1.FetchConfiguration.http_proxy_url:type_name -> wg.cosmo.node.v1.ConfigurationVariable 30, // 43: wg.cosmo.node.v1.DataSourceCustom_GraphQL.fetch:type_name -> wg.cosmo.node.v1.FetchConfiguration - 59, // 44: wg.cosmo.node.v1.DataSourceCustom_GraphQL.subscription:type_name -> wg.cosmo.node.v1.GraphQLSubscriptionConfiguration - 60, // 45: wg.cosmo.node.v1.DataSourceCustom_GraphQL.federation:type_name -> wg.cosmo.node.v1.GraphQLFederationConfiguration - 61, // 46: wg.cosmo.node.v1.DataSourceCustom_GraphQL.upstream_schema:type_name -> wg.cosmo.node.v1.InternedString - 62, // 47: wg.cosmo.node.v1.DataSourceCustom_GraphQL.custom_scalar_type_fields:type_name -> wg.cosmo.node.v1.SingleTypeField + 60, // 44: wg.cosmo.node.v1.DataSourceCustom_GraphQL.subscription:type_name -> wg.cosmo.node.v1.GraphQLSubscriptionConfiguration + 61, // 45: wg.cosmo.node.v1.DataSourceCustom_GraphQL.federation:type_name -> wg.cosmo.node.v1.GraphQLFederationConfiguration + 62, // 46: wg.cosmo.node.v1.DataSourceCustom_GraphQL.upstream_schema:type_name -> wg.cosmo.node.v1.InternedString + 63, // 47: wg.cosmo.node.v1.DataSourceCustom_GraphQL.custom_scalar_type_fields:type_name -> wg.cosmo.node.v1.SingleTypeField 33, // 48: wg.cosmo.node.v1.DataSourceCustom_GraphQL.grpc:type_name -> wg.cosmo.node.v1.GRPCConfiguration 37, // 49: wg.cosmo.node.v1.GRPCConfiguration.mapping:type_name -> wg.cosmo.node.v1.GRPCMapping 35, // 50: wg.cosmo.node.v1.GRPCConfiguration.plugin:type_name -> wg.cosmo.node.v1.PluginConfiguration 34, // 51: wg.cosmo.node.v1.PluginConfiguration.image_reference:type_name -> wg.cosmo.node.v1.ImageReference 40, // 52: wg.cosmo.node.v1.GRPCMapping.operation_mappings:type_name -> wg.cosmo.node.v1.OperationMapping 41, // 53: wg.cosmo.node.v1.GRPCMapping.entity_mappings:type_name -> wg.cosmo.node.v1.EntityMapping - 42, // 54: wg.cosmo.node.v1.GRPCMapping.type_field_mappings:type_name -> wg.cosmo.node.v1.TypeFieldMapping - 45, // 55: wg.cosmo.node.v1.GRPCMapping.enum_mappings:type_name -> wg.cosmo.node.v1.EnumMapping + 43, // 54: wg.cosmo.node.v1.GRPCMapping.type_field_mappings:type_name -> wg.cosmo.node.v1.TypeFieldMapping + 46, // 55: wg.cosmo.node.v1.GRPCMapping.enum_mappings:type_name -> wg.cosmo.node.v1.EnumMapping 38, // 56: wg.cosmo.node.v1.GRPCMapping.resolve_mappings:type_name -> wg.cosmo.node.v1.LookupMapping 3, // 57: wg.cosmo.node.v1.LookupMapping.type:type_name -> wg.cosmo.node.v1.LookupType 39, // 58: wg.cosmo.node.v1.LookupMapping.lookup_mapping:type_name -> wg.cosmo.node.v1.LookupFieldMapping - 43, // 59: wg.cosmo.node.v1.LookupFieldMapping.field_mapping:type_name -> wg.cosmo.node.v1.FieldMapping + 44, // 59: wg.cosmo.node.v1.LookupFieldMapping.field_mapping:type_name -> wg.cosmo.node.v1.FieldMapping 4, // 60: wg.cosmo.node.v1.OperationMapping.type:type_name -> wg.cosmo.node.v1.OperationType - 43, // 61: wg.cosmo.node.v1.TypeFieldMapping.field_mappings:type_name -> wg.cosmo.node.v1.FieldMapping - 44, // 62: wg.cosmo.node.v1.FieldMapping.argument_mappings:type_name -> wg.cosmo.node.v1.ArgumentMapping - 46, // 63: wg.cosmo.node.v1.EnumMapping.values:type_name -> wg.cosmo.node.v1.EnumValueMapping - 51, // 64: wg.cosmo.node.v1.NatsEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration - 47, // 65: wg.cosmo.node.v1.NatsEventConfiguration.stream_configuration:type_name -> wg.cosmo.node.v1.NatsStreamConfiguration - 51, // 66: wg.cosmo.node.v1.KafkaEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration - 51, // 67: wg.cosmo.node.v1.RedisEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration - 5, // 68: wg.cosmo.node.v1.EngineEventConfiguration.type:type_name -> wg.cosmo.node.v1.EventType - 48, // 69: wg.cosmo.node.v1.DataSourceCustomEvents.nats:type_name -> wg.cosmo.node.v1.NatsEventConfiguration - 49, // 70: wg.cosmo.node.v1.DataSourceCustomEvents.kafka:type_name -> wg.cosmo.node.v1.KafkaEventConfiguration - 50, // 71: wg.cosmo.node.v1.DataSourceCustomEvents.redis:type_name -> wg.cosmo.node.v1.RedisEventConfiguration - 54, // 72: wg.cosmo.node.v1.DataSourceCustom_Static.data:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 6, // 73: wg.cosmo.node.v1.ConfigurationVariable.kind:type_name -> wg.cosmo.node.v1.ConfigurationVariableKind - 54, // 74: wg.cosmo.node.v1.HTTPHeader.values:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 75: wg.cosmo.node.v1.MTLSConfiguration.key:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 76: wg.cosmo.node.v1.MTLSConfiguration.cert:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 54, // 77: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable - 75, // 78: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.protocol:type_name -> wg.cosmo.common.GraphQLSubscriptionProtocol - 76, // 79: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.websocketSubprotocol:type_name -> wg.cosmo.common.GraphQLWebsocketSubprotocol - 64, // 80: wg.cosmo.node.v1.SubscriptionFilterCondition.and:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition - 63, // 81: wg.cosmo.node.v1.SubscriptionFilterCondition.in:type_name -> wg.cosmo.node.v1.SubscriptionFieldCondition - 64, // 82: wg.cosmo.node.v1.SubscriptionFilterCondition.not:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition - 64, // 83: wg.cosmo.node.v1.SubscriptionFilterCondition.or:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition - 66, // 84: wg.cosmo.node.v1.CacheWarmerOperations.operations:type_name -> wg.cosmo.node.v1.Operation - 67, // 85: wg.cosmo.node.v1.Operation.request:type_name -> wg.cosmo.node.v1.OperationRequest - 70, // 86: wg.cosmo.node.v1.Operation.client:type_name -> wg.cosmo.node.v1.ClientInfo - 68, // 87: wg.cosmo.node.v1.OperationRequest.extensions:type_name -> wg.cosmo.node.v1.Extension - 69, // 88: wg.cosmo.node.v1.Extension.persisted_query:type_name -> wg.cosmo.node.v1.PersistedQuery - 10, // 89: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry.value:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig - 57, // 90: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry.value:type_name -> wg.cosmo.node.v1.HTTPHeader - 16, // 91: wg.cosmo.node.v1.NodeService.SelfRegister:input_type -> wg.cosmo.node.v1.SelfRegisterRequest - 17, // 92: wg.cosmo.node.v1.NodeService.SelfRegister:output_type -> wg.cosmo.node.v1.SelfRegisterResponse - 92, // [92:93] is the sub-list for method output_type - 91, // [91:92] is the sub-list for method input_type - 91, // [91:91] is the sub-list for extension type_name - 91, // [91:91] is the sub-list for extension extendee - 0, // [0:91] is the sub-list for field type_name + 42, // 61: wg.cosmo.node.v1.EntityMapping.required_field_mappings:type_name -> wg.cosmo.node.v1.RequiredFieldMapping + 44, // 62: wg.cosmo.node.v1.RequiredFieldMapping.field_mapping:type_name -> wg.cosmo.node.v1.FieldMapping + 44, // 63: wg.cosmo.node.v1.TypeFieldMapping.field_mappings:type_name -> wg.cosmo.node.v1.FieldMapping + 45, // 64: wg.cosmo.node.v1.FieldMapping.argument_mappings:type_name -> wg.cosmo.node.v1.ArgumentMapping + 47, // 65: wg.cosmo.node.v1.EnumMapping.values:type_name -> wg.cosmo.node.v1.EnumValueMapping + 52, // 66: wg.cosmo.node.v1.NatsEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration + 48, // 67: wg.cosmo.node.v1.NatsEventConfiguration.stream_configuration:type_name -> wg.cosmo.node.v1.NatsStreamConfiguration + 52, // 68: wg.cosmo.node.v1.KafkaEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration + 52, // 69: wg.cosmo.node.v1.RedisEventConfiguration.engine_event_configuration:type_name -> wg.cosmo.node.v1.EngineEventConfiguration + 5, // 70: wg.cosmo.node.v1.EngineEventConfiguration.type:type_name -> wg.cosmo.node.v1.EventType + 49, // 71: wg.cosmo.node.v1.DataSourceCustomEvents.nats:type_name -> wg.cosmo.node.v1.NatsEventConfiguration + 50, // 72: wg.cosmo.node.v1.DataSourceCustomEvents.kafka:type_name -> wg.cosmo.node.v1.KafkaEventConfiguration + 51, // 73: wg.cosmo.node.v1.DataSourceCustomEvents.redis:type_name -> wg.cosmo.node.v1.RedisEventConfiguration + 55, // 74: wg.cosmo.node.v1.DataSourceCustom_Static.data:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 6, // 75: wg.cosmo.node.v1.ConfigurationVariable.kind:type_name -> wg.cosmo.node.v1.ConfigurationVariableKind + 55, // 76: wg.cosmo.node.v1.HTTPHeader.values:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 77: wg.cosmo.node.v1.MTLSConfiguration.key:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 78: wg.cosmo.node.v1.MTLSConfiguration.cert:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 55, // 79: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.url:type_name -> wg.cosmo.node.v1.ConfigurationVariable + 76, // 80: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.protocol:type_name -> wg.cosmo.common.GraphQLSubscriptionProtocol + 77, // 81: wg.cosmo.node.v1.GraphQLSubscriptionConfiguration.websocketSubprotocol:type_name -> wg.cosmo.common.GraphQLWebsocketSubprotocol + 65, // 82: wg.cosmo.node.v1.SubscriptionFilterCondition.and:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 64, // 83: wg.cosmo.node.v1.SubscriptionFilterCondition.in:type_name -> wg.cosmo.node.v1.SubscriptionFieldCondition + 65, // 84: wg.cosmo.node.v1.SubscriptionFilterCondition.not:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 65, // 85: wg.cosmo.node.v1.SubscriptionFilterCondition.or:type_name -> wg.cosmo.node.v1.SubscriptionFilterCondition + 67, // 86: wg.cosmo.node.v1.CacheWarmerOperations.operations:type_name -> wg.cosmo.node.v1.Operation + 68, // 87: wg.cosmo.node.v1.Operation.request:type_name -> wg.cosmo.node.v1.OperationRequest + 71, // 88: wg.cosmo.node.v1.Operation.client:type_name -> wg.cosmo.node.v1.ClientInfo + 69, // 89: wg.cosmo.node.v1.OperationRequest.extensions:type_name -> wg.cosmo.node.v1.Extension + 70, // 90: wg.cosmo.node.v1.Extension.persisted_query:type_name -> wg.cosmo.node.v1.PersistedQuery + 10, // 91: wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs.ConfigByFeatureFlagNameEntry.value:type_name -> wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig + 58, // 92: wg.cosmo.node.v1.FetchConfiguration.HeaderEntry.value:type_name -> wg.cosmo.node.v1.HTTPHeader + 16, // 93: wg.cosmo.node.v1.NodeService.SelfRegister:input_type -> wg.cosmo.node.v1.SelfRegisterRequest + 17, // 94: wg.cosmo.node.v1.NodeService.SelfRegister:output_type -> wg.cosmo.node.v1.SelfRegisterResponse + 94, // [94:95] is the sub-list for method output_type + 93, // [93:94] is the sub-list for method input_type + 93, // [93:93] is the sub-list for extension type_name + 93, // [93:93] is the sub-list for extension extendee + 0, // [0:93] is the sub-list for field type_name } func init() { file_wg_cosmo_node_v1_node_proto_init() } @@ -5917,7 +6020,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*TypeFieldMapping); i { + switch v := v.(*RequiredFieldMapping); i { case 0: return &v.state case 1: @@ -5929,7 +6032,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FieldMapping); i { + switch v := v.(*TypeFieldMapping); i { case 0: return &v.state case 1: @@ -5941,7 +6044,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ArgumentMapping); i { + switch v := v.(*FieldMapping); i { case 0: return &v.state case 1: @@ -5953,7 +6056,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*EnumMapping); i { + switch v := v.(*ArgumentMapping); i { case 0: return &v.state case 1: @@ -5965,7 +6068,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*EnumValueMapping); i { + switch v := v.(*EnumMapping); i { case 0: return &v.state case 1: @@ -5977,7 +6080,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*NatsStreamConfiguration); i { + switch v := v.(*EnumValueMapping); i { case 0: return &v.state case 1: @@ -5989,7 +6092,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*NatsEventConfiguration); i { + switch v := v.(*NatsStreamConfiguration); i { case 0: return &v.state case 1: @@ -6001,7 +6104,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*KafkaEventConfiguration); i { + switch v := v.(*NatsEventConfiguration); i { case 0: return &v.state case 1: @@ -6013,7 +6116,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*RedisEventConfiguration); i { + switch v := v.(*KafkaEventConfiguration); i { case 0: return &v.state case 1: @@ -6025,7 +6128,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*EngineEventConfiguration); i { + switch v := v.(*RedisEventConfiguration); i { case 0: return &v.state case 1: @@ -6037,7 +6140,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceCustomEvents); i { + switch v := v.(*EngineEventConfiguration); i { case 0: return &v.state case 1: @@ -6049,7 +6152,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceCustom_Static); i { + switch v := v.(*DataSourceCustomEvents); i { case 0: return &v.state case 1: @@ -6061,7 +6164,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ConfigurationVariable); i { + switch v := v.(*DataSourceCustom_Static); i { case 0: return &v.state case 1: @@ -6073,7 +6176,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*DirectiveConfiguration); i { + switch v := v.(*ConfigurationVariable); i { case 0: return &v.state case 1: @@ -6085,7 +6188,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*URLQueryConfiguration); i { + switch v := v.(*DirectiveConfiguration); i { case 0: return &v.state case 1: @@ -6097,7 +6200,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*HTTPHeader); i { + switch v := v.(*URLQueryConfiguration); i { case 0: return &v.state case 1: @@ -6109,7 +6212,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*MTLSConfiguration); i { + switch v := v.(*HTTPHeader); i { case 0: return &v.state case 1: @@ -6121,7 +6224,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*GraphQLSubscriptionConfiguration); i { + switch v := v.(*MTLSConfiguration); i { case 0: return &v.state case 1: @@ -6133,7 +6236,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*GraphQLFederationConfiguration); i { + switch v := v.(*GraphQLSubscriptionConfiguration); i { case 0: return &v.state case 1: @@ -6145,7 +6248,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*InternedString); i { + switch v := v.(*GraphQLFederationConfiguration); i { case 0: return &v.state case 1: @@ -6157,7 +6260,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*SingleTypeField); i { + switch v := v.(*InternedString); i { case 0: return &v.state case 1: @@ -6169,7 +6272,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*SubscriptionFieldCondition); i { + switch v := v.(*SingleTypeField); i { case 0: return &v.state case 1: @@ -6181,7 +6284,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*SubscriptionFilterCondition); i { + switch v := v.(*SubscriptionFieldCondition); i { case 0: return &v.state case 1: @@ -6193,7 +6296,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*CacheWarmerOperations); i { + switch v := v.(*SubscriptionFilterCondition); i { case 0: return &v.state case 1: @@ -6205,7 +6308,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { + switch v := v.(*CacheWarmerOperations); i { case 0: return &v.state case 1: @@ -6217,7 +6320,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*OperationRequest); i { + switch v := v.(*Operation); i { case 0: return &v.state case 1: @@ -6229,7 +6332,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*Extension); i { + switch v := v.(*OperationRequest); i { case 0: return &v.state case 1: @@ -6241,7 +6344,7 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*PersistedQuery); i { + switch v := v.(*Extension); i { case 0: return &v.state case 1: @@ -6253,6 +6356,18 @@ func file_wg_cosmo_node_v1_node_proto_init() { } } file_wg_cosmo_node_v1_node_proto_msgTypes[62].Exporter = func(v any, i int) any { + switch v := v.(*PersistedQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wg_cosmo_node_v1_node_proto_msgTypes[63].Exporter = func(v any, i int) any { switch v := v.(*ClientInfo); i { case 0: return &v.state @@ -6272,15 +6387,15 @@ func file_wg_cosmo_node_v1_node_proto_init() { file_wg_cosmo_node_v1_node_proto_msgTypes[15].OneofWrappers = []any{} file_wg_cosmo_node_v1_node_proto_msgTypes[22].OneofWrappers = []any{} file_wg_cosmo_node_v1_node_proto_msgTypes[27].OneofWrappers = []any{} - file_wg_cosmo_node_v1_node_proto_msgTypes[51].OneofWrappers = []any{} - file_wg_cosmo_node_v1_node_proto_msgTypes[56].OneofWrappers = []any{} + file_wg_cosmo_node_v1_node_proto_msgTypes[52].OneofWrappers = []any{} + file_wg_cosmo_node_v1_node_proto_msgTypes[57].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_wg_cosmo_node_v1_node_proto_rawDesc, NumEnums: 8, - NumMessages: 66, + NumMessages: 67, NumExtensions: 0, NumServices: 1, }, From 03070da3e1e5c78ae27332c140db34737d7d46c8 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 10:17:16 +0100 Subject: [PATCH 06/32] chore: improve the mapping --- protographic/src/required-fields-visitor.ts | 35 --------- protographic/src/sdl-to-mapping-visitor.ts | 27 ------- .../sdl-to-mapping/03-federation.test.ts | 72 +++++++++---------- 3 files changed, 36 insertions(+), 98 deletions(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 06249bf9aa..7ee9fe6dc5 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -53,8 +53,6 @@ export type RequiredFieldMapping = { rpc?: RPCMethod; /** The field mapping between GraphQL and proto field names */ requiredFieldMapping?: FieldMapping; - /** Type field mappings for nested types in the required fields selection */ - typeFieldMappings?: TypeFieldMapping[]; }; /** @@ -149,7 +147,6 @@ export class RequiredFieldsVisitor { original: this.requiredField.name, mapped: graphqlFieldToProtoField(this.requiredField.name), }), - typeFieldMappings: [], }; visit(this.fieldSetDoc, this.visitor); } @@ -250,41 +247,9 @@ export class RequiredFieldsVisitor { private onLeaveDocument(): void { if (this.requiredFieldMessage) { this.messageDefinitions.push(this.requiredFieldMessage); - this.createTypeFieldMappings(this.requiredFieldMessage, []); } } - /** - * Recursively creates type field mappings for a message and its nested messages. - * Builds the path-qualified type names for nested message mappings. - * - * @param message - The protobuf message to create mappings for - * @param path - The current path of parent message names for qualification - */ - private createTypeFieldMappings(message: ProtoMessage, path: string[]): void { - if (!message) return; - - let pathPrefix = path.length > 0 ? `${path.join('.')}.` : ''; - - const typeFieldMapping = new TypeFieldMapping({ - type: `${pathPrefix}${message.messageName}`, - fieldMappings: [], - }); - - for (const field of message.fields) { - typeFieldMapping.fieldMappings.push(this.createFieldMappingForRequiredField(field)); - } - - path.push(message.messageName); - for (const nested of message.nestedMessages ?? []) { - this.createTypeFieldMappings(nested, path); - } - - path.pop(); - - this.mapping[this.currentKeyFieldsString!].typeFieldMappings?.push(typeFieldMapping); - } - /** * Creates a FieldMapping for a required field's proto message field. * diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index 6baea7a1aa..0971accdef 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -154,17 +154,6 @@ export class GraphQLToProtoVisitor { const mapping = visitor.getMapping(); for (const [key, value] of Object.entries(mapping)) { - value.typeFieldMappings?.forEach((t) => { - if (t.fieldMappings?.length === 0) return; - - const typeFieldMapping = this.mapping.typeFieldMappings.find((tfm) => tfm.type === t.type); - if (!typeFieldMapping) { - this.mapping.typeFieldMappings.push(t); - } - - typeFieldMapping?.fieldMappings.push(...t.fieldMappings); - }); - const em = this.mapping.entityMappings.find((em) => em.typeName === type.name && em.key === key); if (!em) { throw new Error(`Entity mapping not found for type ${type.name} and key ${key}`); @@ -434,8 +423,6 @@ export class GraphQLToProtoVisitor { for (const fieldName in fields) { const field = fields[fieldName]; - if (this.shouldSkipField(field)) continue; - const fieldMapping = this.createFieldMapping(field); typeFieldMapping.fieldMappings.push(fieldMapping); } @@ -446,20 +433,6 @@ export class GraphQLToProtoVisitor { } } - /** - * Determines if a field should be skipped during processing - * - * @param field - The GraphQL field to check - * @returns True if the field should be skipped, false otherwise - */ - private shouldSkipField(field: GraphQLField): boolean { - return ( - field.astNode?.directives?.some( - (d) => d.name.value === REQUIRES_DIRECTIVE_NAME || d.name.value === EXTERNAL_DIRECTIVE_NAME, - ) ?? false - ); - } - /** * Process a GraphQL input object type to generate field mappings * diff --git a/protographic/tests/sdl-to-mapping/03-federation.test.ts b/protographic/tests/sdl-to-mapping/03-federation.test.ts index 958f527664..18bcaa1233 100644 --- a/protographic/tests/sdl-to-mapping/03-federation.test.ts +++ b/protographic/tests/sdl-to-mapping/03-federation.test.ts @@ -1013,6 +1013,17 @@ describe('GraphQL Federation to Proto Mapping', () => { "key": "id", "kind": "entity", "request": "LookupProductByIdRequest", + "requiredFieldMappings": [ + { + "fieldMapping": { + "mapped": "stock_health_score", + "original": "stockHealthScore", + }, + "request": "RequireProductStockHealthScoreByIdRequest", + "response": "RequireProductStockHealthScoreByIdResponse", + "rpc": "RequireProductStockHealthScoreById", + }, + ], "response": "LookupProductByIdResponse", "rpc": "LookupProductById", "typeName": "Product", @@ -1029,19 +1040,6 @@ describe('GraphQL Federation to Proto Mapping', () => { ], "service": "ProductService", "typeFieldMappings": [ - { - "fieldMappings": [ - { - "mapped": "item_count", - "original": "itemCount", - }, - { - "mapped": "price", - "original": "price", - }, - ], - "type": "RequireProductStockHealthScoreByIdFields", - }, { "fieldMappings": [ { @@ -1057,6 +1055,18 @@ describe('GraphQL Federation to Proto Mapping', () => { "mapped": "id", "original": "id", }, + { + "mapped": "price", + "original": "price", + }, + { + "mapped": "item_count", + "original": "itemCount", + }, + { + "mapped": "stock_health_score", + "original": "stockHealthScore", + }, ], "type": "Product", }, @@ -1128,47 +1138,37 @@ describe('GraphQL Federation to Proto Mapping', () => { { "fieldMappings": [ { - "mapped": "last_restock_date", - "original": "lastRestockDate", + "mapped": "products", + "original": "products", }, ], - "type": "RequireProductStockHealthScoreByIdFields.RestockData", + "type": "Query", }, { "fieldMappings": [ { - "mapped": "item_count", - "original": "itemCount", + "mapped": "id", + "original": "id", }, { - "mapped": "restock_data", - "original": "restockData", + "mapped": "name", + "original": "name", }, { "mapped": "price", "original": "price", }, - ], - "type": "RequireProductStockHealthScoreByIdFields", - }, - { - "fieldMappings": [ { - "mapped": "products", - "original": "products", + "mapped": "item_count", + "original": "itemCount", }, - ], - "type": "Query", - }, - { - "fieldMappings": [ { - "mapped": "id", - "original": "id", + "mapped": "restock_data", + "original": "restockData", }, { - "mapped": "name", - "original": "name", + "mapped": "stock_health_score", + "original": "stockHealthScore", }, ], "type": "Product", From 993c2bae184781e8c81ba369eb1d07dd6d67218e Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 11:19:18 +0100 Subject: [PATCH 07/32] chore: add comments --- .../src/abstract-selection-rewriter.ts | 101 ++++++++++++++++-- 1 file changed, 93 insertions(+), 8 deletions(-) diff --git a/protographic/src/abstract-selection-rewriter.ts b/protographic/src/abstract-selection-rewriter.ts index 59d8b79de6..fb0cd08562 100644 --- a/protographic/src/abstract-selection-rewriter.ts +++ b/protographic/src/abstract-selection-rewriter.ts @@ -1,3 +1,12 @@ +/** + * @file abstract-selection-rewriter.ts + * + * This module provides functionality to normalize GraphQL field set selections + * when dealing with abstract types (interfaces). It ensures that fields selected + * at the interface level are properly distributed into each inline fragment, + * maintaining correct selection semantics for proto mapping generation. + */ + import { ASTVisitor, DocumentNode, @@ -15,23 +24,45 @@ import { } from 'graphql'; import { VisitContext } from './types'; -// TODO: The full functionality will be implemented in the second iteration. /** - * AbstractSelectionRewriter is a visitor implementation that normalizes an operation document - * by rewriting abstract type selections for interfaces to the concrete types. + * Rewrites GraphQL selection sets to normalize abstract type selections. + * + * When a field returns an interface type, selections can be made both at the + * interface level and within inline fragments for concrete types. This class + * normalizes such selections by moving interface-level fields into each inline + * fragment, ensuring consistent selection structure for downstream processing. * - * This normalizes the operation and allows us to determine the proper types needed to generate proto messages. + * @example + * Input selection: + * ```graphql + * media { + * id # interface-level field + * ... on Book { title } + * ... on Movie { duration } + * } + * ``` * + * Output after normalization: + * ```graphql + * media { + * ... on Book { id title } + * ... on Movie { id duration } + * } + * ``` */ export class AbstractSelectionRewriter { private readonly visitor: ASTVisitor; private readonly fieldSetDoc: DocumentNode; public readonly schema: GraphQLSchema; - private normalizedFiedSetDoc: DocumentNode | undefined; - - private ancestors: GraphQLObjectType[] = []; private currentType: GraphQLObjectType; + /** + * Creates a new AbstractSelectionRewriter instance. + * + * @param fieldSetDoc - The parsed GraphQL document containing the field set to rewrite + * @param schema - The GraphQL schema used for type resolution + * @param objectType - The root object type where the field set originates + */ constructor(fieldSetDoc: DocumentNode, schema: GraphQLSchema, objectType: GraphQLObjectType) { this.fieldSetDoc = fieldSetDoc; this.schema = schema; @@ -39,6 +70,11 @@ export class AbstractSelectionRewriter { this.visitor = this.createASTVisitor(); } + /** + * Creates the AST visitor that processes selection sets during traversal. + * + * @returns An ASTVisitor configured to handle SelectionSet nodes + */ private createASTVisitor(): ASTVisitor { return { SelectionSet: { @@ -49,10 +85,28 @@ export class AbstractSelectionRewriter { }; } + /** + * Executes the normalization process on the field set document. + * + * This method traverses the AST and rewrites any selection sets that target + * interface types, distributing interface-level fields into inline fragments. + * The modification is performed in-place on the provided document. + */ public normalize(): void { visit(this.fieldSetDoc, this.visitor); } + /** + * Handles the entry into a SelectionSet node during AST traversal. + * + * If the selection set's parent field returns an interface type, this method: + * 1. Extracts all direct field selections (interface-level fields) + * 2. Removes them from the selection set, leaving only inline fragments + * 3. Prepends the interface-level fields to each inline fragment's selections + * (unless the fragment already contains that field) + * + * @param ctx - The visitor context containing the current node and its position in the AST + */ private onEnterSelectionSet(ctx: VisitContext): void { if (!ctx.parent) return; if (!this.isFieldNode(ctx.parent)) return; @@ -60,6 +114,7 @@ export class AbstractSelectionRewriter { const currentType = this.findNamedTypeForField(ctx.parent.name.value); if (!currentType) return; + // Only process selection sets for interface types if (!isInterfaceType(currentType)) { return; } @@ -67,13 +122,15 @@ export class AbstractSelectionRewriter { const fields = ctx.node.selections.filter((s) => s.kind === Kind.FIELD); const inlineFragments = ctx.node.selections.filter((s) => s.kind === Kind.INLINE_FRAGMENT); - // remove the fields from the selection set. + // Remove the interface-level fields from the selection set, keeping only inline fragments ctx.node.selections = [...inlineFragments]; + // Distribute interface-level fields into each inline fragment for (const fragment of inlineFragments) { const normalizedFields = fragment.selectionSet.selections.filter((s) => s.kind === Kind.FIELD) ?? []; for (const field of fields) { + // Skip if the fragment already has this field to avoid duplicates if (this.hasField(normalizedFields, field.name.value)) { continue; } @@ -85,19 +142,47 @@ export class AbstractSelectionRewriter { } } + /** + * Checks if a field with the given name exists in the provided field array. + * + * @param fields - Array of FieldNode objects to search + * @param fieldName - The name of the field to look for + * @returns true if a field with the given name exists, false otherwise + */ private hasField(fields: FieldNode[], fieldName: string): boolean { return fields.some((f) => f.name.value === fieldName); } + /** + * Type guard to check if an AST node is a FieldNode. + * + * @param node - The AST node or array of nodes to check + * @returns true if the node is a FieldNode, false otherwise + */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { if (Array.isArray(node)) return false; return (node as ASTNode).kind === Kind.FIELD; } + /** + * Retrieves the field definition for a given field name from the current type. + * + * @param fieldName - The name of the field to look up + * @returns The GraphQL field definition, or undefined if not found + */ private fieldDefinition(fieldName: string): GraphQLField | undefined { return this.currentType.getFields()[fieldName]; } + /** + * Finds the named (unwrapped) type for a field by its name. + * + * This method looks up the field in the current type's fields and returns + * the named type (stripping away any List or NonNull wrappers). + * + * @param fieldName - The name of the field to look up + * @returns The named GraphQL type, or undefined if the field doesn't exist + */ private findNamedTypeForField(fieldName: string): GraphQLType | undefined { const fields = this.currentType.getFields(); const field = fields[fieldName]; From d8dd4738ab707b39fd260f3275e7b8cf3bba135f Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 11:28:19 +0100 Subject: [PATCH 08/32] chore: export constants --- protographic/src/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/protographic/src/index.ts b/protographic/src/index.ts index 2101cc85c6..9cdc4aad4f 100644 --- a/protographic/src/index.ts +++ b/protographic/src/index.ts @@ -150,5 +150,16 @@ export { OperationType, } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; +export { + CONNECT_FIELD_RESOLVER, + CONTEXT, + EXTERNAL_DIRECTIVE_NAME, + FIELDS, + FIELD_ARGS, + KEY_DIRECTIVE_NAME, + REQUIRES_DIRECTIVE_NAME, + RESULT, +} from './string-constants.js'; + // Export protobufjs for AST manipulation export { default as protobuf } from 'protobufjs'; From 977e1fd8d3ed517cc40a1f27c1ff0cf9ce0fff2b Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 11:51:50 +0100 Subject: [PATCH 09/32] chore: update import --- protographic/src/sdl-to-mapping-visitor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index 0971accdef..32c54ae455 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -41,7 +41,7 @@ import { TypeFieldMapping, } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; import { Maybe } from 'graphql/jsutils/Maybe.js'; -import { EXTERNAL_DIRECTIVE_NAME, REQUIRES_DIRECTIVE_NAME } from './string-constants'; +import { REQUIRES_DIRECTIVE_NAME } from './string-constants.js'; import { RequiredFieldsVisitor } from './required-fields-visitor.js'; /** * Visitor that converts a GraphQL schema to gRPC mapping definitions From 62e44a22a63dd235d6b8cf36b35e144f5b23bde1 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 13:27:18 +0100 Subject: [PATCH 10/32] normalize keys --- protographic/src/naming-conventions.ts | 25 +- protographic/src/required-fields-visitor.ts | 7 +- .../tests/field-set/01-basics.test.ts | 1186 ++++++++--------- protographic/tests/naming-conventions.test.ts | 78 ++ 4 files changed, 658 insertions(+), 638 deletions(-) create mode 100644 protographic/tests/naming-conventions.test.ts diff --git a/protographic/src/naming-conventions.ts b/protographic/src/naming-conventions.ts index 0dc3ecd914..ec1dc7ac0a 100644 --- a/protographic/src/naming-conventions.ts +++ b/protographic/src/naming-conventions.ts @@ -79,7 +79,8 @@ export function createEntityLookupRequestKeyMessageName(typeName: string, keyStr } /** - * Creates a required fields method name for an entity type + * Creates a required fields method name for an entity type. + * The fields are sorted alphabetically. * @param typeName - The name of the entity type * @param fieldName - The name of the field that is required * @param keyString - The key string @@ -87,7 +88,7 @@ export function createEntityLookupRequestKeyMessageName(typeName: string, keyStr * @example * createRequiredFieldsMethodName('User', 'post', 'id') // => 'RequireUserPostById' * createRequiredFieldsMethodName('User', 'post', 'id name') // => 'RequireUserPostByIdAndName' - * createRequiredFieldsMethodName('User', 'post', 'name,id') // => 'RequireUserPostByNameAndId' + * createRequiredFieldsMethodName('User', 'post', 'name,id') // => 'RequireUserPostByIdAndName' */ export function createRequiredFieldsMethodName(typeName: string, fieldName: string, keyString: string = 'id'): string { const normalizedKey = createMethodSuffixFromEntityKey(keyString); @@ -100,16 +101,24 @@ export function createRequiredFieldsMethodName(typeName: string, fieldName: stri * @returns The method suffix */ export function createMethodSuffixFromEntityKey(keyString: string = 'id'): string { - const normalizedKey = keyString - .split(/[,\s]+/) - .filter((field) => field.length > 0) - .map((field) => upperFirst(camelCase(field))) - .sort() - .join('And'); + const normalizedKey = normalizeKeyElements(keyString).join('And'); return `By${normalizedKey}`; } +/** + * Normalizes the key elements by sorting them alphabetically and removing duplicates. + * @param keyString - The key string + * @returns The normalized key elements + * @example + * normalizeKeyElements('id,name') // => ['Id', 'Name'] + * normalizeKeyElements('name,id') // => ['Id', 'Name'] + * normalizeKeyElements('name id name') // => ['Id', 'Name'] + */ +export function normalizeKeyElements(keyString: string): string[] { + return [...new Set(keyString.split(/[,\s]+/))].map((field) => upperFirst(camelCase(field))).sort(); +} + /** * Converts a GraphQL enum value to a Protocol Buffer enum value */ diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 7ee9fe6dc5..c8031ed6df 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -26,6 +26,7 @@ import { createRequiredFieldsMethodName, createResponseMessageName, graphqlFieldToProtoField, + normalizeKeyElements, } from './naming-conventions'; import { getProtoTypeFromGraphQL } from './proto-utils'; import { AbstractSelectionRewriter } from './abstract-selection-rewriter'; @@ -140,7 +141,11 @@ export class RequiredFieldsVisitor { */ public visit(): void { for (const keyDirective of this.keyDirectives) { - this.currentKeyFieldsString = this.getKeyFieldsString(keyDirective); + this.currentKeyFieldsString = normalizeKeyElements(this.getKeyFieldsString(keyDirective)).join(' '); + + if (this.mapping[this.currentKeyFieldsString]) { + continue; + } this.mapping[this.currentKeyFieldsString] = { requiredFieldMapping: new FieldMapping({ diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index 9fde4f8a8f..0c79440d4b 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -1,174 +1,228 @@ import { describe, expect, it } from 'vitest'; import { RequiredFieldsVisitor } from '../../src'; -import { buildSchema, GraphQLObjectType, StringValueNode, visit } from 'graphql'; +import { buildSchema, GraphQLField, GraphQLObjectType, GraphQLSchema, StringValueNode } from 'graphql'; import { buildProtoMessage } from '../../src/proto-utils'; import { CompositeMessageKind, InterfaceMessageDefinition, isInterfaceMessageDefinition, isUnionMessageDefinition, + ProtoMessage, ProtoMessageField, + RPCMethod, UnionMessageDefinition, } from '../../src/types'; +import { RequiredFieldMapping } from '../../src/required-fields-visitor'; + +/** + * Options for creating a RequiredFieldsVisitor test setup. + */ +interface CreateVisitorOptions { + /** The GraphQL SDL to build the schema from */ + sdl: string; + /** The name of the entity type (defaults to finding the type with @key directive) */ + entityName: string; + /** The name of the field with the @requires directive */ + requiredFieldName: string; + /** Optional explicit field set string (if not provided, extracted from @requires directive) */ + fieldSet?: string; +} + +/** + * Result of creating a RequiredFieldsVisitor test setup. + */ +interface VisitorTestSetup { + schema: GraphQLSchema; + entity: GraphQLObjectType; + requiredField: GraphQLField; + visitor: RequiredFieldsVisitor; + /** Calls visitor.visit() and returns the results */ + execute: () => VisitorResult; +} + +/** + * Result of executing the visitor. + */ +interface VisitorResult { + rpcMethods: RPCMethod[]; + messageDefinitions: ProtoMessage[]; + mapping: Record; +} + +/** + * Creates a RequiredFieldsVisitor test setup with common boilerplate handled. + * + * @param options - Configuration for the test setup + * @returns The test setup including the visitor and an execute function + * @throws Error if the entity or required field is not found + */ +function createVisitorSetup(options: CreateVisitorOptions): VisitorTestSetup { + const { sdl, entityName, requiredFieldName, fieldSet: explicitFieldSet } = options; + + const schema = buildSchema(sdl, { + assumeValid: true, + assumeValidSDL: true, + }); -describe('Field Set Visitor', () => { - it('should visit a field set for a scalar type', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - name: String! @external - age: Int @requires(fields: "name") - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); - - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + const entity = schema.getTypeMap()[entityName] as GraphQLObjectType | undefined; + if (!entity) { + throw new Error(`Entity '${entityName}' not found in schema`); + } - const requiredField = entity.getFields()['age']; - expect(requiredField).toBeDefined(); + const requiredField = entity.getFields()[requiredFieldName]; + if (!requiredField) { + throw new Error(`Field '${requiredFieldName}' not found on entity '${entityName}'`); + } - const fieldSet = ( + // Extract fieldSet from @requires directive if not explicitly provided + const fieldSet = + explicitFieldSet ?? + ( requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] .value as StringValueNode - ).value; + )?.value; + + if (!fieldSet) { + throw new Error(`No field set found for field '${requiredFieldName}'`); + } + + const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); + + return { + schema, + entity, + requiredField, + visitor, + execute: () => { + visitor.visit(); + return { + rpcMethods: visitor.getRPCMethods(), + messageDefinitions: visitor.getMessageDefinitions(), + mapping: visitor.getMapping(), + }; + }, + }; +} + +/** + * Asserts that a ProtoMessageField matches expected values. + */ +function assertFieldMessage( + field: ProtoMessageField | undefined, + expected: { fieldName: string; typeName: string; fieldNumber: number; isRepeated: boolean }, +): void { + expect(field).toBeDefined(); + expect(field?.fieldName).toBe(expected.fieldName); + expect(field?.typeName).toBe(expected.typeName); + expect(field?.fieldNumber).toBe(expected.fieldNumber); + expect(field?.isRepeated).toBe(expected.isRepeated); +} + +/** + * Asserts that the expected standard messages are present in the message definitions. + */ +function assertStandardMessages(messageDefinitions: ProtoMessage[], methodPrefix: string): void { + expect(messageDefinitions).toEqual( + expect.arrayContaining([ + expect.objectContaining({ messageName: `${methodPrefix}Request` }), + expect.objectContaining({ messageName: `${methodPrefix}Context` }), + expect.objectContaining({ messageName: `${methodPrefix}Response` }), + expect.objectContaining({ messageName: `${methodPrefix}Result` }), + expect.objectContaining({ messageName: `${methodPrefix}Fields` }), + ]), + ); +} - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); +describe('Field Set Visitor', () => { + it('should visit a field set for a scalar type', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + name: String! @external + age: Int @requires(fields: "name") + } + `, + entityName: 'User', + requiredFieldName: 'age', + }); + + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserAgeById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserAgeByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserAgeById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserAgeByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserAgeByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); - expect(fieldMessage?.fields?.[0].fieldName).toBe('name'); - expect(fieldMessage?.fields?.[0].typeName).toBe('string'); - expect(fieldMessage?.fields?.[0].fieldNumber).toBe(1); - expect(fieldMessage?.fields?.[0].isRepeated).toBe(false); + assertFieldMessage(fieldMessage?.fields?.[0], { + fieldName: 'name', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, + }); }); + it('should visit a field set for a scalar type and deduplicate fields', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - name: String! @external - age: Int @requires(fields: "name") - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + name: String! @external + age: Int @requires(fields: "name") + } + `, + entityName: 'User', + requiredFieldName: 'age', }); - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } - - const requiredField = entity.getFields()['age']; - expect(requiredField).toBeDefined(); - - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; - - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserAgeById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserAgeByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserAgeByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserAgeById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserAgeByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserAgeByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); - expect(fieldMessage?.fields?.[0].fieldName).toBe('name'); - expect(fieldMessage?.fields?.[0].typeName).toBe('string'); - expect(fieldMessage?.fields?.[0].fieldNumber).toBe(1); - expect(fieldMessage?.fields?.[0].isRepeated).toBe(false); - }); - it('should visit a field set for an object type', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - description: String! @external - details: Details! @requires(fields: "description") - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, + assertFieldMessage(fieldMessage?.fields?.[0], { + fieldName: 'name', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, }); + }); - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } - - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + it('should visit a field set for an object type', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + description: String! @external + details: Details! @requires(fields: "description") + } - const fieldSet = `description`; + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + fieldSet: 'description', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); assertFieldMessage(fieldMessage?.fields[0], { @@ -178,7 +232,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -190,57 +244,31 @@ describe('Field Set Visitor', () => { }); it('should visit a field set for a list type', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - descriptions: [String!]! @external - details: [Details!]! @requires(fields: "descriptions") - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); - - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } - - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + descriptions: [String!]! @external + details: [Details!]! @requires(fields: "descriptions") + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); assertFieldMessage(fieldMessage?.fields[0], { @@ -250,7 +278,7 @@ describe('Field Set Visitor', () => { isRepeated: true, }); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -262,54 +290,32 @@ describe('Field Set Visitor', () => { }); it('should visit a field set for nullable list types', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - descriptions: [String!] @external - details: [Details!] @requires(fields: "descriptions") - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); - - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } - - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + descriptions: [String!] @external + details: [Details!] @requires(fields: "descriptions") + } - const fieldSet = `descriptions`; + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + fieldSet: 'descriptions', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); assertFieldMessage(fieldMessage?.fields[0], { @@ -319,7 +325,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -331,59 +337,33 @@ describe('Field Set Visitor', () => { }); it('should visit a field set for multiple field selections', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - descriptions: [String!] @external - field: String! @external - otherField: String! @external - details: [Details!] @requires(fields: "descriptions field otherField") - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); - - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } - - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + descriptions: [String!] @external + field: String! @external + otherField: String! @external + details: [Details!] @requires(fields: "descriptions field otherField") + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(3); assertFieldMessage(fieldMessage?.fields[0], { @@ -405,7 +385,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -417,62 +397,36 @@ describe('Field Set Visitor', () => { }); it('should visit a field set with nested field selections', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - description: Description! @external - details: Details! @requires(fields: "description { title score }") - } - - type Description { - title: String! - score: Int! - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); - - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + description: Description! @external + details: Details! @requires(fields: "description { title score }") + } - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + type Description { + title: String! + score: Int! + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); assertFieldMessage(fieldMessage?.fields[0], { @@ -497,7 +451,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -509,70 +463,44 @@ describe('Field Set Visitor', () => { }); it('should visit a field set with multiple nested field selections', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - description: Description! @external - details: Details! @requires(fields: "description { title score address { street city state zip } }") - } - - type Description { - title: String! - score: Int! - address: Address! - } - - type Address { - street: String! - city: String! - state: String! - zip: String! - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + description: Description! @external + details: Details! @requires(fields: "description { title score address { street city state zip } }") + } - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + type Description { + title: String! + score: Int! + address: Address! + } - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + type Address { + street: String! + city: String! + state: String! + zip: String! + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); assertFieldMessage(fieldMessage?.fields[0], { @@ -630,7 +558,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -642,70 +570,44 @@ describe('Field Set Visitor', () => { }); it('should visit a field set for a union type', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - pet: Animal! @external - name: String! @external - details: Details! @requires(fields: "pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } name") - } - - union Animal = Cat | Dog - - type Cat { - name: String! - catBreed: String! - } - - type Dog { - name: String! - dogBreed: String! - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + pet: Animal! @external + name: String! @external + details: Details! @requires(fields: "pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } name") + } - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + union Animal = Cat | Dog - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + type Cat { + name: String! + catBreed: String! + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Dog { + name: String! + dogBreed: String! + } + + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(2); assertFieldMessage(fieldMessage?.fields[0], { @@ -731,7 +633,7 @@ describe('Field Set Visitor', () => { expect(unionMessageDefinition.memberTypes[0]).toBe('Cat'); expect(unionMessageDefinition.memberTypes[1]).toBe('Dog'); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -766,73 +668,48 @@ describe('Field Set Visitor', () => { " `); }); + it('should visit a field set for an interface type', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - pet: Animal! @external - name: String! @external - details: Details! @requires(fields: "pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } name") - } - - interface Animal { - name: String! - } - - type Cat implements Animal { - name: String! - catBreed: String! - } - - type Dog implements Animal { - name: String! - dogBreed: String! - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + pet: Animal! @external + name: String! @external + details: Details! @requires(fields: "pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } name") + } - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + interface Animal { + name: String! + } - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + type Cat implements Animal { + name: String! + catBreed: String! + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Dog implements Animal { + name: String! + dogBreed: String! + } - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); + + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(2); assertFieldMessage(fieldMessage?.fields[0], { @@ -858,7 +735,7 @@ describe('Field Set Visitor', () => { expect(interfaceMessageDefinition.implementingTypes[0]).toBe('Cat'); expect(interfaceMessageDefinition.implementingTypes[1]).toBe('Dog'); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -893,73 +770,48 @@ describe('Field Set Visitor', () => { " `); }); - it('should visit a field set for an interface type with extraced interface field', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - pet: Animal! @external - name: String! @external - details: Details! @requires(fields: "pet { name ... on Cat { catBreed } ... on Dog { dogBreed } } name") - } - - interface Animal { - name: String! - } - - type Cat implements Animal { - name: String! - catBreed: String! - } - - type Dog implements Animal { - name: String! - dogBreed: String! - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + it('should visit a field set for an interface type with extracted interface field', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + pet: Animal! @external + name: String! @external + details: Details! @requires(fields: "pet { name ... on Cat { catBreed } ... on Dog { dogBreed } } name") + } - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + interface Animal { + name: String! + } - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Cat implements Animal { + name: String! + catBreed: String! + } + + type Dog implements Animal { + name: String! + dogBreed: String! + } - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); + + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(2); assertFieldMessage(fieldMessage?.fields[0], { @@ -985,7 +837,7 @@ describe('Field Set Visitor', () => { expect(interfaceMessageDefinition.implementingTypes[0]).toBe('Cat'); expect(interfaceMessageDefinition.implementingTypes[1]).toBe('Dog'); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); assertFieldMessage(resultMessage?.fields[0], { @@ -1020,76 +872,51 @@ describe('Field Set Visitor', () => { " `); }); + it('should visit a field set with nested field selections and a union type', () => { - const sdl = ` - type User @key(fields: "id") { - id: ID! - description: Description! @external - details: Details! @requires(fields: "description { title score pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } }") - } - - type Description { - title: String! - score: Int! - pet: Animal! - } - - union Animal = Cat | Dog - - type Cat { - name: String! - catBreed: String! - } - - type Dog { - name: String! - dogBreed: String! - } - - type Details { - firstName: String! - lastName: String! - } - `; - - const schema = buildSchema(sdl, { - assumeValid: true, - assumeValidSDL: true, - }); + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + description: Description! @external + details: Details! @requires(fields: "description { title score pet { ... on Cat { name catBreed } ... on Dog { name dogBreed } } }") + } - const typeMap = schema.getTypeMap(); - const entity = typeMap['User'] as GraphQLObjectType | undefined; - if (!entity) { - throw new Error('Entity not found'); - } + type Description { + title: String! + score: Int! + pet: Animal! + } - const requiredField = entity.getFields()['details']; - expect(requiredField).toBeDefined(); + union Animal = Cat | Dog - const fieldSet = ( - requiredField.astNode?.directives?.find((d) => d.name.value === 'requires')?.arguments?.[0] - .value as StringValueNode - ).value; + type Cat { + name: String! + catBreed: String! + } + + type Dog { + name: String! + dogBreed: String! + } + + type Details { + firstName: String! + lastName: String! + } + `, + entityName: 'User', + requiredFieldName: 'details', + }); - const visitor = new RequiredFieldsVisitor(schema, entity, requiredField, fieldSet); - visitor.visit(); - const rpcMethods = visitor.getRPCMethods(); - const messageDefinitions = visitor.getMessageDefinitions(); + const { rpcMethods, messageDefinitions } = execute(); expect(rpcMethods).toHaveLength(1); expect(rpcMethods[0].name).toBe('RequireUserDetailsById'); expect(messageDefinitions).toHaveLength(5); - expect(messageDefinitions).toEqual( - expect.arrayContaining([ - expect.objectContaining({ messageName: 'RequireUserDetailsByIdRequest' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdContext' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResponse' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdResult' }), - expect.objectContaining({ messageName: 'RequireUserDetailsByIdFields' }), - ]), - ); + assertStandardMessages(messageDefinitions, 'RequireUserDetailsById'); - let fieldMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdFields'); + const fieldMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdFields'); expect(fieldMessage).toBeDefined(); expect(fieldMessage?.fields).toHaveLength(1); expect(fieldMessage?.fields[0].fieldName).toBe('description'); @@ -1104,20 +931,24 @@ describe('Field Set Visitor', () => { expect(descriptionMessage?.fields).toHaveLength(3); // Check Description fields - expect(descriptionMessage?.fields[0].fieldName).toBe('title'); - expect(descriptionMessage?.fields[0].typeName).toBe('string'); - expect(descriptionMessage?.fields[0].fieldNumber).toBe(1); - expect(descriptionMessage?.fields[0].isRepeated).toBe(false); - - expect(descriptionMessage?.fields[1].fieldName).toBe('score'); - expect(descriptionMessage?.fields[1].typeName).toBe('int32'); - expect(descriptionMessage?.fields[1].fieldNumber).toBe(2); - expect(descriptionMessage?.fields[1].isRepeated).toBe(false); - - expect(descriptionMessage?.fields[2].fieldName).toBe('pet'); - expect(descriptionMessage?.fields[2].typeName).toBe('Animal'); - expect(descriptionMessage?.fields[2].fieldNumber).toBe(3); - expect(descriptionMessage?.fields[2].isRepeated).toBe(false); + assertFieldMessage(descriptionMessage?.fields[0], { + fieldName: 'title', + typeName: 'string', + fieldNumber: 1, + isRepeated: false, + }); + assertFieldMessage(descriptionMessage?.fields[1], { + fieldName: 'score', + typeName: 'int32', + fieldNumber: 2, + isRepeated: false, + }); + assertFieldMessage(descriptionMessage?.fields[2], { + fieldName: 'pet', + typeName: 'Animal', + fieldNumber: 3, + isRepeated: false, + }); // Check for union composite type on Description message const compositeType = descriptionMessage?.compositeType; @@ -1129,23 +960,120 @@ describe('Field Set Visitor', () => { expect(unionMessageDefinition.memberTypes).toHaveLength(2); expect(unionMessageDefinition.memberTypes).toEqual(expect.arrayContaining(['Cat', 'Dog'])); - let resultMessage = messageDefinitions.find((message) => message.messageName === 'RequireUserDetailsByIdResult'); + const resultMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserDetailsByIdResult'); expect(resultMessage).toBeDefined(); expect(resultMessage?.fields).toHaveLength(1); - expect(resultMessage?.fields[0].fieldName).toBe('details'); - expect(resultMessage?.fields[0].typeName).toBe('Details'); - expect(resultMessage?.fields[0].fieldNumber).toBe(1); - expect(resultMessage?.fields[0].isRepeated).toBe(false); + assertFieldMessage(resultMessage?.fields[0], { + fieldName: 'details', + typeName: 'Details', + fieldNumber: 1, + isRepeated: false, + }); }); }); -const assertFieldMessage = ( - field: ProtoMessageField | undefined, - expected: { fieldName: string; typeName: string; fieldNumber: number; isRepeated: boolean }, -) => { - expect(field).toBeDefined(); - expect(field?.fieldName).toBe(expected.fieldName); - expect(field?.typeName).toBe(expected.typeName); - expect(field?.fieldNumber).toBe(expected.fieldNumber); - expect(field?.isRepeated).toBe(expected.isRepeated); -}; +describe('Ambiguous @key directive deduplication', () => { + it('should deduplicate @key directives with fields in different order (space-separated)', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type Product @key(fields: "id name") @key(fields: "name id") { + id: ID! + name: String! + price: Float! @requires(fields: "name") + } + `, + entityName: 'Product', + requiredFieldName: 'price', + fieldSet: 'name', + }); + + const { rpcMethods, mapping } = execute(); + + // Should only produce 1 RPC method, not 2 + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireProductPriceByIdAndName'); + + // Mapping should have only one entry with normalized key + expect(Object.keys(mapping)).toHaveLength(1); + expect(mapping).toHaveProperty('Id Name'); + }); + + it('should deduplicate @key directives with different separators (comma vs space)', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type Product @key(fields: "id,name") @key(fields: "name id") { + id: ID! + name: String! + price: Float! @requires(fields: "name") + } + `, + entityName: 'Product', + requiredFieldName: 'price', + fieldSet: 'name', + }); + + const { rpcMethods, mapping } = execute(); + + // Should only produce 1 RPC method, not 2 + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireProductPriceByIdAndName'); + + // Mapping should have only one entry + expect(Object.keys(mapping)).toHaveLength(1); + expect(mapping).toHaveProperty('Id Name'); + }); + + it('should deduplicate identical @key directives', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type Product @key(fields: "id") @key(fields: "id") { + id: ID! + name: String! + price: Float! @requires(fields: "name") + } + `, + entityName: 'Product', + requiredFieldName: 'price', + fieldSet: 'name', + }); + + const { rpcMethods, mapping } = execute(); + + // Should only produce 1 RPC method, not 2 + expect(rpcMethods).toHaveLength(1); + expect(rpcMethods[0].name).toBe('RequireProductPriceById'); + + // Mapping should have only one entry + expect(Object.keys(mapping)).toHaveLength(1); + expect(mapping).toHaveProperty('Id'); + }); + + it('should produce separate RPCs for distinct @key directives', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type Product @key(fields: "id") @key(fields: "sku") { + id: ID! + sku: String! + name: String! + price: Float! @requires(fields: "name") + } + `, + entityName: 'Product', + requiredFieldName: 'price', + fieldSet: 'name', + }); + + const { rpcMethods, mapping } = execute(); + + // Should produce 2 RPC methods for distinct keys + expect(rpcMethods).toHaveLength(2); + expect(rpcMethods.map((r) => r.name)).toEqual( + expect.arrayContaining(['RequireProductPriceById', 'RequireProductPriceBySku']), + ); + + // Mapping should have two entries + expect(Object.keys(mapping)).toHaveLength(2); + expect(mapping).toHaveProperty('Id'); + expect(mapping).toHaveProperty('Sku'); + }); +}); diff --git a/protographic/tests/naming-conventions.test.ts b/protographic/tests/naming-conventions.test.ts new file mode 100644 index 0000000000..e4a1c7a11e --- /dev/null +++ b/protographic/tests/naming-conventions.test.ts @@ -0,0 +1,78 @@ +import { describe, expect, it } from 'vitest'; +import { normalizeKeyElements, createMethodSuffixFromEntityKey } from '../src/naming-conventions'; + +describe('normalizeKeyElements', () => { + it('handles comma-separated keys', () => { + expect(normalizeKeyElements('id,name')).toEqual(['Id', 'Name']); + }); + + it('handles space-separated keys', () => { + expect(normalizeKeyElements('name id')).toEqual(['Id', 'Name']); + }); + + it('handles mixed separators (comma and space)', () => { + expect(normalizeKeyElements('id, name')).toEqual(['Id', 'Name']); + }); + + it('removes duplicates', () => { + expect(normalizeKeyElements('name id name')).toEqual(['Id', 'Name']); + }); + + it('sorts keys alphabetically', () => { + expect(normalizeKeyElements('name,id')).toEqual(['Id', 'Name']); + }); + + it('converts snake_case to PascalCase', () => { + expect(normalizeKeyElements('user_id')).toEqual(['UserId']); + }); + + it('handles single element', () => { + expect(normalizeKeyElements('id')).toEqual(['Id']); + }); + + it('handles multiple snake_case words', () => { + expect(normalizeKeyElements('first_name last_name')).toEqual(['FirstName', 'LastName']); + }); + + it('handles camelCase input', () => { + expect(normalizeKeyElements('userId')).toEqual(['UserId']); + }); + + it('handles multiple keys with various separators', () => { + expect(normalizeKeyElements('a, b c,d')).toEqual(['A', 'B', 'C', 'D']); + }); +}); + +describe('createMethodSuffixFromEntityKey', () => { + it('uses default parameter when no argument provided', () => { + expect(createMethodSuffixFromEntityKey()).toBe('ById'); + }); + + it('handles single key', () => { + expect(createMethodSuffixFromEntityKey('id')).toBe('ById'); + }); + + it('joins multiple comma-separated keys with And', () => { + expect(createMethodSuffixFromEntityKey('id,name')).toBe('ByIdAndName'); + }); + + it('sorts keys alphabetically before joining', () => { + expect(createMethodSuffixFromEntityKey('name,id')).toBe('ByIdAndName'); + }); + + it('handles space-separated keys', () => { + expect(createMethodSuffixFromEntityKey('id name')).toBe('ByIdAndName'); + }); + + it('converts snake_case keys to PascalCase', () => { + expect(createMethodSuffixFromEntityKey('user_id')).toBe('ByUserId'); + }); + + it('handles three keys', () => { + expect(createMethodSuffixFromEntityKey('name,id,email')).toBe('ByEmailAndIdAndName'); + }); + + it('handles mixed separators and duplicates', () => { + expect(createMethodSuffixFromEntityKey('id, name id')).toBe('ByIdAndName'); + }); +}); From 5cd87b4cc395082bca94127141a8368939f6ca47 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 14:08:15 +0100 Subject: [PATCH 11/32] chore: apply normalization logic from composition --- pnpm-lock.yaml | 15 ++---- protographic/package.json | 1 + protographic/src/naming-conventions.ts | 53 +++++++++++++++---- protographic/src/required-fields-visitor.ts | 6 ++- protographic/src/sdl-to-mapping-visitor.ts | 16 +++++- protographic/src/sdl-validation-visitor.ts | 9 +++- protographic/tests/naming-conventions.test.ts | 24 ++++----- .../01-basic-validation.test.ts | 46 ++++++++++++++++ 8 files changed, 135 insertions(+), 35 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37700ad9ff..a1a6de8615 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -881,6 +881,9 @@ importers: '@bufbuild/protobuf': specifier: ^1.8.0 version: 1.10.0 + '@wundergraph/composition': + specifier: workspace:* + version: link:../composition '@wundergraph/cosmo-connect': specifier: workspace:* version: link:../connect @@ -7847,9 +7850,6 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@18.19.130': - resolution: {integrity: sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==} - '@types/node@18.19.21': resolution: {integrity: sha512-2Q2NeB6BmiTFQi4DHBzncSoq/cJMLDdhPaAoJFnFCyD9a8VPZRf7a1GAwp1Edb7ROaZc5Jz/tnZyL6EsWMRaqw==} @@ -23108,11 +23108,6 @@ snapshots: '@types/node': 20.12.12 form-data: 4.0.4 - '@types/node@18.19.130': - dependencies: - undici-types: 5.26.5 - optional: true - '@types/node@18.19.21': dependencies: undici-types: 5.26.5 @@ -24140,7 +24135,7 @@ snapshots: bun-types@1.2.12: dependencies: - '@types/node': 18.19.130 + '@types/node': 20.12.12 optional: true bun-types@1.2.3: @@ -27252,7 +27247,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.3.1 + '@types/node': 20.12.12 merge-stream: 2.0.0 supports-color: 10.2.0 diff --git a/protographic/package.json b/protographic/package.json index 0195cd823c..28f79da06a 100644 --- a/protographic/package.json +++ b/protographic/package.json @@ -39,6 +39,7 @@ "dependencies": { "@bufbuild/protobuf": "^1.8.0", "@wundergraph/cosmo-connect": "workspace:*", + "@wundergraph/composition": "workspace:*", "graphql": "^16.9.0", "lodash-es": "4.17.21", "protobufjs": "^7.5.0" diff --git a/protographic/src/naming-conventions.ts b/protographic/src/naming-conventions.ts index ec1dc7ac0a..d72b5a3806 100644 --- a/protographic/src/naming-conventions.ts +++ b/protographic/src/naming-conventions.ts @@ -1,3 +1,4 @@ +import { getNormalizedFieldSet, safeParse } from '@wundergraph/composition'; import { camelCase, snakeCase, upperFirst } from 'lodash-es'; /** @@ -101,22 +102,56 @@ export function createRequiredFieldsMethodName(typeName: string, fieldName: stri * @returns The method suffix */ export function createMethodSuffixFromEntityKey(keyString: string = 'id'): string { - const normalizedKey = normalizeKeyElements(keyString).join('And'); + const normalizedKey = formatKeyElements(keyString).join('And'); return `By${normalizedKey}`; } /** - * Normalizes the key elements by sorting them alphabetically and removing duplicates. - * @param keyString - The key string - * @returns The normalized key elements + * Normalizes a key string into a canonical field set representation. + * + * Parses the key string as a GraphQL selection set and applies normalization + * logic from the composition package to produce a consistent string representation. + * @remarks We currently don't support nested keys, so we apply a simple deduplication logic. + * + * @param keyString - The key string from a @key directive (e.g., "id name", "id,name") + * @returns The normalized field set string + * @throws Error if the key string cannot be parsed as a valid GraphQL selection + * * @example - * normalizeKeyElements('id,name') // => ['Id', 'Name'] - * normalizeKeyElements('name,id') // => ['Id', 'Name'] - * normalizeKeyElements('name id name') // => ['Id', 'Name'] + * normalizeKeyString('id name') // => 'id name' + * normalizeKeyString('name id') // => 'id name' (sorted) + * normalizeKeyString('id,name') // => 'id name' */ -export function normalizeKeyElements(keyString: string): string[] { - return [...new Set(keyString.split(/[,\s]+/))].map((field) => upperFirst(camelCase(field))).sort(); +export function normalizeKeyString(keyString: string): string { + const { error, documentNode } = safeParse('{' + keyString + '}'); + if (error || !documentNode) { + throw new Error(`Invalid field set for key directive: ${keyString} - error: ${error?.message}`); + } + + const normalizedFieldSet = getNormalizedFieldSet(documentNode); + return [...new Set(normalizedFieldSet.split(/[,\s]+/))].join(' '); +} + +/** + * Formats key elements into PascalCase. + * + * This function normalizes a key string, splits it into individual field names, + * converts each to PascalCase. Used primarily for generating consistent method name suffixes from entity keys. + * + * @param keyString - The key string from a @key directive (e.g., "id name", "user_id,name") + * @returns Array of PascalCase field names + * + * @example + * formatKeyElements('id,name') // => ['Id', 'Name'] + * formatKeyElements('name,id') // => ['Id', 'Name'] + * formatKeyElements('name id name') // => ['Id', 'Name'] + * formatKeyElements('user_id') // => ['UserId'] + */ +export function formatKeyElements(keyString: string): string[] { + return normalizeKeyString(keyString) + .split(/[,\s]+/) + .map((field) => upperFirst(camelCase(field))); } /** diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index c8031ed6df..69dd7be5de 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -26,11 +26,12 @@ import { createRequiredFieldsMethodName, createResponseMessageName, graphqlFieldToProtoField, - normalizeKeyElements, + formatKeyElements, } from './naming-conventions'; import { getProtoTypeFromGraphQL } from './proto-utils'; import { AbstractSelectionRewriter } from './abstract-selection-rewriter'; import { FieldMapping, TypeFieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; +import { getNormalizedFieldSet, safeParse } from '@wundergraph/composition'; /** * Configuration options for the RequiredFieldsVisitor. @@ -141,7 +142,8 @@ export class RequiredFieldsVisitor { */ public visit(): void { for (const keyDirective of this.keyDirectives) { - this.currentKeyFieldsString = normalizeKeyElements(this.getKeyFieldsString(keyDirective)).join(' '); + const rawFieldSet = this.getKeyFieldsString(keyDirective); + this.currentKeyFieldsString = formatKeyElements(rawFieldSet).join(' '); if (this.mapping[this.currentKeyFieldsString]) { continue; diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index 32c54ae455..e940a2b7bd 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -23,6 +23,7 @@ import { graphqlArgumentToProtoField, graphqlEnumValueToProtoEnumValue, graphqlFieldToProtoField, + formatKeyElements, OperationTypeName, } from './naming-conventions.js'; import { @@ -153,8 +154,21 @@ export class GraphQLToProtoVisitor { visitor.visit(); const mapping = visitor.getMapping(); + const seenKeys = new Set(); + for (const [key, value] of Object.entries(mapping)) { - const em = this.mapping.entityMappings.find((em) => em.typeName === type.name && em.key === key); + const normalizedKey = formatKeyElements(key).join(' '); + + if (seenKeys.has(normalizedKey)) { + continue; + } + + seenKeys.add(normalizedKey); + + // Compare normalized versions of both keys to handle different formatting + const em = this.mapping.entityMappings.find( + (em) => em.typeName === type.name && formatKeyElements(em.key).join(' ') === normalizedKey, + ); if (!em) { throw new Error(`Entity mapping not found for type ${type.name} and key ${key}`); } diff --git a/protographic/src/sdl-validation-visitor.ts b/protographic/src/sdl-validation-visitor.ts index 26fa853e41..6c6cf352dd 100644 --- a/protographic/src/sdl-validation-visitor.ts +++ b/protographic/src/sdl-validation-visitor.ts @@ -407,7 +407,14 @@ export class SDLValidationVisitor { if (!this.isASTObjectTypeNode(parentType)) return; - const operationDoc = parse(`{ ${fieldSelections.value} }`); + let operationDoc; + try { + operationDoc = parse(`{ ${fieldSelections.value} }`); + } catch (e) { + const errorMessage = e instanceof Error ? e.message : String(e); + this.addError(`Invalid @${REQUIRES_DIRECTIVE_NAME} field selection syntax: ${errorMessage}`, ctx.node.loc); + return; + } const selectionSetValidationVisitor = new SelectionSetValidationVisitor( operationDoc, diff --git a/protographic/tests/naming-conventions.test.ts b/protographic/tests/naming-conventions.test.ts index e4a1c7a11e..2d1d4406d1 100644 --- a/protographic/tests/naming-conventions.test.ts +++ b/protographic/tests/naming-conventions.test.ts @@ -1,45 +1,45 @@ import { describe, expect, it } from 'vitest'; -import { normalizeKeyElements, createMethodSuffixFromEntityKey } from '../src/naming-conventions'; +import { formatKeyElements, createMethodSuffixFromEntityKey } from '../src/naming-conventions'; -describe('normalizeKeyElements', () => { +describe('formatKeyElements', () => { it('handles comma-separated keys', () => { - expect(normalizeKeyElements('id,name')).toEqual(['Id', 'Name']); + expect(formatKeyElements('id,name')).toEqual(['Id', 'Name']); }); it('handles space-separated keys', () => { - expect(normalizeKeyElements('name id')).toEqual(['Id', 'Name']); + expect(formatKeyElements('name id')).toEqual(['Id', 'Name']); }); it('handles mixed separators (comma and space)', () => { - expect(normalizeKeyElements('id, name')).toEqual(['Id', 'Name']); + expect(formatKeyElements('id, name')).toEqual(['Id', 'Name']); }); it('removes duplicates', () => { - expect(normalizeKeyElements('name id name')).toEqual(['Id', 'Name']); + expect(formatKeyElements('name id name')).toEqual(['Id', 'Name']); }); it('sorts keys alphabetically', () => { - expect(normalizeKeyElements('name,id')).toEqual(['Id', 'Name']); + expect(formatKeyElements('name,id')).toEqual(['Id', 'Name']); }); it('converts snake_case to PascalCase', () => { - expect(normalizeKeyElements('user_id')).toEqual(['UserId']); + expect(formatKeyElements('user_id')).toEqual(['UserId']); }); it('handles single element', () => { - expect(normalizeKeyElements('id')).toEqual(['Id']); + expect(formatKeyElements('id')).toEqual(['Id']); }); it('handles multiple snake_case words', () => { - expect(normalizeKeyElements('first_name last_name')).toEqual(['FirstName', 'LastName']); + expect(formatKeyElements('first_name last_name')).toEqual(['FirstName', 'LastName']); }); it('handles camelCase input', () => { - expect(normalizeKeyElements('userId')).toEqual(['UserId']); + expect(formatKeyElements('userId')).toEqual(['UserId']); }); it('handles multiple keys with various separators', () => { - expect(normalizeKeyElements('a, b c,d')).toEqual(['A', 'B', 'C', 'D']); + expect(formatKeyElements('a, b c,d')).toEqual(['A', 'B', 'C', 'D']); }); }); diff --git a/protographic/tests/sdl-validation/01-basic-validation.test.ts b/protographic/tests/sdl-validation/01-basic-validation.test.ts index 3e2354e743..81bb465096 100644 --- a/protographic/tests/sdl-validation/01-basic-validation.test.ts +++ b/protographic/tests/sdl-validation/01-basic-validation.test.ts @@ -539,4 +539,50 @@ describe('SDL Validation', () => { expect(result.errors).toHaveLength(0); expect(result.warnings).toHaveLength(0); }); + + test('should return an error for invalid @requires field selection syntax', () => { + const sdl = ` + type Query { + user: User! + } + + type User @key(fields: "id") { + id: ID! + name: String! @external + age: Int! @requires(fields: "name {") + } + `; + + const visitor = new SDLValidationVisitor(sdl); + const result = visitor.visit(); + + expect(result.errors).toHaveLength(1); + expect(result.warnings).toHaveLength(0); + expect(result.errors[0]).toContain('Invalid @requires field selection syntax'); + }); + + test('should return an error for @requires with unclosed braces', () => { + const sdl = ` + type Query { + user: User! + } + + type User @key(fields: "id") { + id: ID! + details: Details! @external + computed: String! @requires(fields: "details { foo") + } + + type Details { + foo: String! + } + `; + + const visitor = new SDLValidationVisitor(sdl); + const result = visitor.visit(); + + expect(result.errors).toHaveLength(1); + expect(result.warnings).toHaveLength(0); + expect(result.errors[0]).toContain('Invalid @requires field selection syntax'); + }); }); From 576294e8017d16f3ed8d75bbfe7acb96c0341e6d Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 14:35:26 +0100 Subject: [PATCH 12/32] chore: updates --- .github/workflows/protographic.yaml | 2 +- composition-go/index.global.js | 308 ++++++++++++++-------------- 2 files changed, 155 insertions(+), 155 deletions(-) diff --git a/.github/workflows/protographic.yaml b/.github/workflows/protographic.yaml index 9a8fc1778d..324ec39cce 100644 --- a/.github/workflows/protographic.yaml +++ b/.github/workflows/protographic.yaml @@ -33,7 +33,7 @@ jobs: run: git diff --no-ext-diff --exit-code - name: Build - run: pnpm run --filter ./connect --filter ./protographic build + run: pnpm run --filter ./connect --filter ./composition --filter ./protographic build - name: Test run: pnpm run --filter ./protographic test:coverage diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 210adb40bf..6b83ccaaeb 100644 --- a/composition-go/index.global.js +++ b/composition-go/index.global.js @@ -15,17 +15,17 @@ class URL { return urlCanParse(url, base || ''); } } -"use strict";var shim=(()=>{var SH=Object.create;var Ud=Object.defineProperty,DH=Object.defineProperties,bH=Object.getOwnPropertyDescriptor,AH=Object.getOwnPropertyDescriptors,RH=Object.getOwnPropertyNames,Fm=Object.getOwnPropertySymbols,PH=Object.getPrototypeOf,qy=Object.prototype.hasOwnProperty,UR=Object.prototype.propertyIsEnumerable;var cn=Math.pow,xy=(e,t,n)=>t in e?Ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&xy(e,n,t[n]);if(Fm)for(var n of Fm(t))UR.call(t,n)&&xy(e,n,t[n]);return e},Q=(e,t)=>DH(e,AH(t));var kR=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fm)for(var r of Fm(e))t.indexOf(r)<0&&UR.call(e,r)&&(n[r]=e[r]);return n};var Qu=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wm=(e,t)=>{for(var n in t)Ud(e,n,{get:t[n],enumerable:!0})},MR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of RH(t))!qy.call(e,i)&&i!==n&&Ud(e,i,{get:()=>t[i],enumerable:!(r=bH(t,i))||r.enumerable});return e};var ys=(e,t,n)=>(n=e!=null?SH(PH(e)):{},MR(t||!e||!e.__esModule?Ud(n,"default",{value:e,enumerable:!0}):n,e)),Lm=e=>MR(Ud({},"__esModule",{value:!0}),e);var _=(e,t,n)=>(xy(e,typeof t!="symbol"?t+"":t,n),n),Vy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var jy=(e,t,n)=>(Vy(e,t,"read from private field"),n?n.call(e):t.get(e)),Yu=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ky=(e,t,n,r)=>(Vy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var cl=(e,t,n)=>(Vy(e,t,"access private method"),n);var Ai=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{c(n.next(l))}catch(d){i(d)}},o=l=>{try{c(n.throw(l))}catch(d){i(d)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);c((n=n.apply(e,t)).next())});var m=Qu(()=>{"use strict"});var S={};wm(S,{_debugEnd:()=>DP,_debugProcess:()=>SP,_events:()=>jP,_eventsCount:()=>KP,_exiting:()=>sP,_fatalExceptions:()=>gP,_getActiveHandles:()=>lP,_getActiveRequests:()=>cP,_kill:()=>fP,_linkedBinding:()=>iP,_maxListeners:()=>VP,_preload_modules:()=>MP,_rawDebug:()=>nP,_startProfilerIdleNotifier:()=>bP,_stopProfilerIdleNotifier:()=>AP,_tickCallback:()=>OP,abort:()=>wP,addListener:()=>GP,allowedNodeEnvironmentFlags:()=>hP,arch:()=>KR,argv:()=>QR,argv0:()=>kP,assert:()=>yP,binding:()=>WR,chdir:()=>eP,config:()=>oP,cpuUsage:()=>Um,cwd:()=>ZR,debugPort:()=>UP,default:()=>ZP,dlopen:()=>uP,domain:()=>aP,emit:()=>HP,emitWarning:()=>zR,env:()=>$R,execArgv:()=>YR,execPath:()=>BP,exit:()=>TP,features:()=>IP,hasUncaughtExceptionCaptureCallback:()=>vP,hrtime:()=>Bm,kill:()=>NP,listeners:()=>XP,memoryUsage:()=>mP,moduleLoadList:()=>rP,nextTick:()=>qR,off:()=>QP,on:()=>gs,once:()=>$P,openStdin:()=>EP,pid:()=>LP,platform:()=>GR,ppid:()=>CP,prependListener:()=>zP,prependOnceListener:()=>WP,reallyExit:()=>dP,release:()=>tP,removeAllListeners:()=>JP,removeListener:()=>YP,resourceUsage:()=>pP,setSourceMapsEnabled:()=>xP,setUncaughtExceptionCaptureCallback:()=>_P,stderr:()=>PP,stdin:()=>FP,stdout:()=>RP,title:()=>jR,umask:()=>XR,uptime:()=>qP,version:()=>JR,versions:()=>HR});function Qy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function FH(){!ll||!Ju||(ll=!1,Ju.length?Is=Ju.concat(Is):Cm=-1,Is.length&&xR())}function xR(){if(!ll){var e=setTimeout(FH,0);ll=!0;for(var t=Is.length;t;){for(Ju=Is,Is=[];++Cm1)for(var n=1;n{"use strict";m();T();N();Is=[],ll=!1,Cm=-1;VR.prototype.run=function(){this.fun.apply(null,this.array)};jR="browser",KR="x64",GR="browser",$R={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},QR=["/usr/bin/node"],YR=[],JR="v16.8.0",HR={},zR=function(e,t){console.warn((t?t+": ":"")+e)},WR=function(e){Qy("binding")},XR=function(e){return 0},ZR=function(){return"/"},eP=function(e){},tP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};nP=Dr,rP=[];aP={},sP=!1,oP={};dP=Dr,fP=Dr,Um=function(){return{}},pP=Um,mP=Um,NP=Dr,TP=Dr,EP=Dr,hP={};IP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},gP=Dr,_P=Dr;OP=Dr,SP=Dr,DP=Dr,bP=Dr,AP=Dr,RP=void 0,PP=void 0,FP=void 0,wP=Dr,LP=2,CP=1,BP="/bin/usr/node",UP=9229,kP="node",MP=[],xP=Dr,ou={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};ou.now===void 0&&(Gy=Date.now(),ou.timing&&ou.timing.navigationStart&&(Gy=ou.timing.navigationStart),ou.now=()=>Date.now()-Gy);$y=1e9;Bm.bigint=function(e){var t=Bm(e);return typeof BigInt=="undefined"?t[0]*$y+t[1]:BigInt(t[0]*$y)+BigInt(t[1])};VP=10,jP={},KP=0;GP=gs,$P=gs,QP=gs,YP=gs,JP=gs,HP=Dr,zP=gs,WP=gs;ZP={version:JR,versions:HR,arch:KR,platform:GR,release:tP,_rawDebug:nP,moduleLoadList:rP,binding:WR,_linkedBinding:iP,_events:jP,_eventsCount:KP,_maxListeners:VP,on:gs,addListener:GP,once:$P,off:QP,removeListener:YP,removeAllListeners:JP,emit:HP,prependListener:zP,prependOnceListener:WP,listeners:XP,domain:aP,_exiting:sP,config:oP,dlopen:uP,uptime:qP,_getActiveRequests:cP,_getActiveHandles:lP,reallyExit:dP,_kill:fP,cpuUsage:Um,resourceUsage:pP,memoryUsage:mP,kill:NP,exit:TP,openStdin:EP,allowedNodeEnvironmentFlags:hP,assert:yP,features:IP,_fatalExceptions:gP,setUncaughtExceptionCaptureCallback:_P,hasUncaughtExceptionCaptureCallback:vP,emitWarning:zR,nextTick:qR,_tickCallback:OP,_debugProcess:SP,_debugEnd:DP,_startProfilerIdleNotifier:bP,_stopProfilerIdleNotifier:AP,stdout:RP,stdin:FP,stderr:PP,abort:wP,umask:XR,chdir:eP,cwd:ZR,env:$R,title:jR,argv:QR,execArgv:YR,pid:LP,ppid:CP,execPath:BP,debugPort:UP,hrtime:Bm,argv0:kP,_preload_modules:MP,setSourceMapsEnabled:xP}});var N=Qu(()=>{"use strict";eF()});function wH(){if(tF)return kd;tF=!0,kd.byteLength=c,kd.toByteArray=d,kd.fromByteArray=I;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var U=v.indexOf("=");U===-1&&(U=A);var j=U===A?0:4-U%4;return[U,j]}function c(v){var A=o(v),U=A[0],j=A[1];return(U+j)*3/4-j}function l(v,A,U){return(A+U)*3/4-U}function d(v){var A,U=o(v),j=U[0],$=U[1],re=new n(l(v,j,$)),ee=0,me=$>0?j-4:j,ue;for(ue=0;ue>16&255,re[ee++]=A>>8&255,re[ee++]=A&255;return $===2&&(A=t[v.charCodeAt(ue)]<<2|t[v.charCodeAt(ue+1)]>>4,re[ee++]=A&255),$===1&&(A=t[v.charCodeAt(ue)]<<10|t[v.charCodeAt(ue+1)]<<4|t[v.charCodeAt(ue+2)]>>2,re[ee++]=A>>8&255,re[ee++]=A&255),re}function p(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function E(v,A,U){for(var j,$=[],re=A;reme?me:ee+re));return j===1?(A=v[U-1],$.push(e[A>>2]+e[A<<4&63]+"==")):j===2&&(A=(v[U-2]<<8)+v[U-1],$.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),$.join("")}return kd}function LH(){if(nF)return km;nF=!0;return km.read=function(e,t,n,r,i){var a,o,c=i*8-r-1,l=(1<>1,p=-7,E=n?i-1:0,I=n?-1:1,v=e[t+E];for(E+=I,a=v&(1<<-p)-1,v>>=-p,p+=c;p>0;a=a*256+e[t+E],E+=I,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=o*256+e[t+E],E+=I,p-=8);if(a===0)a=1-d;else{if(a===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-d}return(v?-1:1)*o*Math.pow(2,a-r)},km.write=function(e,t,n,r,i,a){var o,c,l,d=a*8-i-1,p=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,A=r?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+E>=1?t+=I/l:t+=I*Math.pow(2,1-E),t*l>=2&&(o++,l/=2),o+E>=p?(c=0,o=p):o+E>=1?(c=(t*l-1)*Math.pow(2,i),o=o+E):(c=t*Math.pow(2,E-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=c&255,v+=A,c/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=A,o/=256,d-=8);e[n+v-A]|=U*128},km}function CH(){if(rF)return Hu;rF=!0;let e=wH(),t=LH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Hu.Buffer=o,Hu.SlowBuffer=$,Hu.INSPECT_MAX_BYTES=50;let r=2147483647;Hu.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{let P=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(P,y),P.foo()===42}catch(P){return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(P){if(P>r)throw new RangeError('The value "'+P+'" is invalid for option "size"');let y=new Uint8Array(P);return Object.setPrototypeOf(y,o.prototype),y}function o(P,y,g){if(typeof P=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(P)}return c(P,y,g)}o.poolSize=8192;function c(P,y,g){if(typeof P=="string")return E(P,y);if(ArrayBuffer.isView(P))return v(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(xt(P,ArrayBuffer)||P&&xt(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(xt(P,SharedArrayBuffer)||P&&xt(P.buffer,SharedArrayBuffer)))return A(P,y,g);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=P.valueOf&&P.valueOf();if(B!=null&&B!==P)return o.from(B,y,g);let K=U(P);if(K)return K;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return o.from(P[Symbol.toPrimitive]("string"),y,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}o.from=function(P,y,g){return c(P,y,g)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function d(P,y,g){return l(P),P<=0?a(P):y!==void 0?typeof g=="string"?a(P).fill(y,g):a(P).fill(y):a(P)}o.alloc=function(P,y,g){return d(P,y,g)};function p(P){return l(P),a(P<0?0:j(P)|0)}o.allocUnsafe=function(P){return p(P)},o.allocUnsafeSlow=function(P){return p(P)};function E(P,y){if((typeof y!="string"||y==="")&&(y="utf8"),!o.isEncoding(y))throw new TypeError("Unknown encoding: "+y);let g=re(P,y)|0,B=a(g),K=B.write(P,y);return K!==g&&(B=B.slice(0,K)),B}function I(P){let y=P.length<0?0:j(P.length)|0,g=a(y);for(let B=0;B=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return P|0}function $(P){return+P!=P&&(P=0),o.alloc(+P)}o.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==o.prototype},o.compare=function(y,g){if(xt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),xt(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(y)||!o.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===g)return 0;let B=y.length,K=g.length;for(let te=0,ce=Math.min(B,K);teK.length?(o.isBuffer(ce)||(ce=o.from(ce)),ce.copy(K,te)):Uint8Array.prototype.set.call(K,ce,te);else if(o.isBuffer(ce))ce.copy(K,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=ce.length}return K};function re(P,y){if(o.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||xt(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);let g=P.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&g===0)return 0;let K=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return cs(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return yr(P).length;default:if(K)return B?-1:cs(P).length;y=(""+y).toLowerCase(),K=!0}}o.byteLength=re;function ee(P,y,g){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,y>>>=0,g<=y))return"";for(P||(P="utf8");;)switch(P){case"hex":return lr(this,y,g);case"utf8":case"utf-8":return an(this,y,g);case"ascii":return Tn(this,y,g);case"latin1":case"binary":return Ur(this,y,g);case"base64":return rn(this,y,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gn(this,y,g);default:if(B)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),B=!0}}o.prototype._isBuffer=!0;function me(P,y,g){let B=P[y];P[y]=P[g],P[g]=B}o.prototype.swap16=function(){let y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;gg&&(y+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(y,g,B,K,te){if(xt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),!o.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(g===void 0&&(g=0),B===void 0&&(B=y?y.length:0),K===void 0&&(K=0),te===void 0&&(te=this.length),g<0||B>y.length||K<0||te>this.length)throw new RangeError("out of range index");if(K>=te&&g>=B)return 0;if(K>=te)return-1;if(g>=B)return 1;if(g>>>=0,B>>>=0,K>>>=0,te>>>=0,this===y)return 0;let ce=te-K,Tt=B-g,En=Math.min(ce,Tt),un=this.slice(K,te),_n=y.slice(g,B);for(let sn=0;sn2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Ir(g)&&(g=K?0:P.length-1),g<0&&(g=P.length+g),g>=P.length){if(K)return-1;g=P.length-1}else if(g<0)if(K)g=0;else return-1;if(typeof y=="string"&&(y=o.from(y,B)),o.isBuffer(y))return y.length===0?-1:Ae(P,y,g,B,K);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,y,g):Uint8Array.prototype.lastIndexOf.call(P,y,g):Ae(P,[y],g,B,K);throw new TypeError("val must be string, number or Buffer")}function Ae(P,y,g,B,K){let te=1,ce=P.length,Tt=y.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(P.length<2||y.length<2)return-1;te=2,ce/=2,Tt/=2,g/=2}function En(_n,sn){return te===1?_n[sn]:_n.readUInt16BE(sn*te)}let un;if(K){let _n=-1;for(un=g;unce&&(g=ce-Tt),un=g;un>=0;un--){let _n=!0;for(let sn=0;snK&&(B=K)):B=K;let te=y.length;B>te/2&&(B=te/2);let ce;for(ce=0;ce>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-g;if((B===void 0||B>te)&&(B=te),y.length>0&&(B<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ce=!1;for(;;)switch(K){case"hex":return xe(this,y,g,B);case"utf8":case"utf-8":return Ze(this,y,g,B);case"ascii":case"latin1":case"binary":return Z(this,y,g,B);case"base64":return _e(this,y,g,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,y,g,B);default:if(ce)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ce=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(P,y,g){return y===0&&g===P.length?e.fromByteArray(P):e.fromByteArray(P.slice(y,g))}function an(P,y,g){g=Math.min(P.length,g);let B=[],K=y;for(;K239?4:te>223?3:te>191?2:1;if(K+Tt<=g){let En,un,_n,sn;switch(Tt){case 1:te<128&&(ce=te);break;case 2:En=P[K+1],(En&192)===128&&(sn=(te&31)<<6|En&63,sn>127&&(ce=sn));break;case 3:En=P[K+1],un=P[K+2],(En&192)===128&&(un&192)===128&&(sn=(te&15)<<12|(En&63)<<6|un&63,sn>2047&&(sn<55296||sn>57343)&&(ce=sn));break;case 4:En=P[K+1],un=P[K+2],_n=P[K+3],(En&192)===128&&(un&192)===128&&(_n&192)===128&&(sn=(te&15)<<18|(En&63)<<12|(un&63)<<6|_n&63,sn>65535&&sn<1114112&&(ce=sn))}}ce===null?(ce=65533,Tt=1):ce>65535&&(ce-=65536,B.push(ce>>>10&1023|55296),ce=56320|ce&1023),B.push(ce),K+=Tt}return $t(B)}let wn=4096;function $t(P){let y=P.length;if(y<=wn)return String.fromCharCode.apply(String,P);let g="",B=0;for(;BB)&&(g=B);let K="";for(let te=y;teB&&(y=B),g<0?(g+=B,g<0&&(g=0)):g>B&&(g=B),gg)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(y,g,B){y=y>>>0,g=g>>>0,B||Ht(y,g,this.length);let K=this[y],te=1,ce=0;for(;++ce>>0,g=g>>>0,B||Ht(y,g,this.length);let K=this[y+--g],te=1;for(;g>0&&(te*=256);)K+=this[y+--g]*te;return K},o.prototype.readUint8=o.prototype.readUInt8=function(y,g){return y=y>>>0,g||Ht(y,1,this.length),this[y]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(y,g){return y=y>>>0,g||Ht(y,2,this.length),this[y]|this[y+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(y,g){return y=y>>>0,g||Ht(y,2,this.length),this[y]<<8|this[y+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(y,g){return y=y>>>0,g||Ht(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(y,g){return y=y>>>0,g||Ht(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},o.prototype.readBigUInt64LE=Fa(function(y){y=y>>>0,it(y,"offset");let g=this[y],B=this[y+7];(g===void 0||B===void 0)&&Pt(y,this.length-8);let K=g+this[++y]*cn(2,8)+this[++y]*cn(2,16)+this[++y]*cn(2,24),te=this[++y]+this[++y]*cn(2,8)+this[++y]*cn(2,16)+B*cn(2,24);return BigInt(K)+(BigInt(te)<>>0,it(y,"offset");let g=this[y],B=this[y+7];(g===void 0||B===void 0)&&Pt(y,this.length-8);let K=g*cn(2,24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+this[++y],te=this[++y]*cn(2,24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+B;return(BigInt(K)<>>0,g=g>>>0,B||Ht(y,g,this.length);let K=this[y],te=1,ce=0;for(;++ce=te&&(K-=Math.pow(2,8*g)),K},o.prototype.readIntBE=function(y,g,B){y=y>>>0,g=g>>>0,B||Ht(y,g,this.length);let K=g,te=1,ce=this[y+--K];for(;K>0&&(te*=256);)ce+=this[y+--K]*te;return te*=128,ce>=te&&(ce-=Math.pow(2,8*g)),ce},o.prototype.readInt8=function(y,g){return y=y>>>0,g||Ht(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},o.prototype.readInt16LE=function(y,g){y=y>>>0,g||Ht(y,2,this.length);let B=this[y]|this[y+1]<<8;return B&32768?B|4294901760:B},o.prototype.readInt16BE=function(y,g){y=y>>>0,g||Ht(y,2,this.length);let B=this[y+1]|this[y]<<8;return B&32768?B|4294901760:B},o.prototype.readInt32LE=function(y,g){return y=y>>>0,g||Ht(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},o.prototype.readInt32BE=function(y,g){return y=y>>>0,g||Ht(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},o.prototype.readBigInt64LE=Fa(function(y){y=y>>>0,it(y,"offset");let g=this[y],B=this[y+7];(g===void 0||B===void 0)&&Pt(y,this.length-8);let K=this[y+4]+this[y+5]*cn(2,8)+this[y+6]*cn(2,16)+(B<<24);return(BigInt(K)<>>0,it(y,"offset");let g=this[y],B=this[y+7];(g===void 0||B===void 0)&&Pt(y,this.length-8);let K=(g<<24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+this[++y];return(BigInt(K)<>>0,g||Ht(y,4,this.length),t.read(this,y,!0,23,4)},o.prototype.readFloatBE=function(y,g){return y=y>>>0,g||Ht(y,4,this.length),t.read(this,y,!1,23,4)},o.prototype.readDoubleLE=function(y,g){return y=y>>>0,g||Ht(y,8,this.length),t.read(this,y,!0,52,8)},o.prototype.readDoubleBE=function(y,g){return y=y>>>0,g||Ht(y,8,this.length),t.read(this,y,!1,52,8)};function Ln(P,y,g,B,K,te){if(!o.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>K||yP.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(y,g,B,K){if(y=+y,g=g>>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,g,B,Tt,0)}let te=1,ce=0;for(this[g]=y&255;++ce>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,g,B,Tt,0)}let te=B-1,ce=1;for(this[g+te]=y&255;--te>=0&&(ce*=256);)this[g+te]=y/ce&255;return g+B},o.prototype.writeUint8=o.prototype.writeUInt8=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,1,255,0),this[g]=y&255,g+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,2,65535,0),this[g]=y&255,this[g+1]=y>>>8,g+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,2,65535,0),this[g]=y>>>8,this[g+1]=y&255,g+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,4,4294967295,0),this[g+3]=y>>>24,this[g+2]=y>>>16,this[g+1]=y>>>8,this[g]=y&255,g+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,4,4294967295,0),this[g]=y>>>24,this[g+1]=y>>>16,this[g+2]=y>>>8,this[g+3]=y&255,g+4};function ae(P,y,g,B,K){Bt(y,B,K,P,g,7);let te=Number(y&BigInt(4294967295));P[g++]=te,te=te>>8,P[g++]=te,te=te>>8,P[g++]=te,te=te>>8,P[g++]=te;let ce=Number(y>>BigInt(32)&BigInt(4294967295));return P[g++]=ce,ce=ce>>8,P[g++]=ce,ce=ce>>8,P[g++]=ce,ce=ce>>8,P[g++]=ce,g}function De(P,y,g,B,K){Bt(y,B,K,P,g,7);let te=Number(y&BigInt(4294967295));P[g+7]=te,te=te>>8,P[g+6]=te,te=te>>8,P[g+5]=te,te=te>>8,P[g+4]=te;let ce=Number(y>>BigInt(32)&BigInt(4294967295));return P[g+3]=ce,ce=ce>>8,P[g+2]=ce,ce=ce>>8,P[g+1]=ce,ce=ce>>8,P[g]=ce,g+8}o.prototype.writeBigUInt64LE=Fa(function(y,g=0){return ae(this,y,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Fa(function(y,g=0){return De(this,y,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(y,g,B,K){if(y=+y,g=g>>>0,!K){let En=Math.pow(2,8*B-1);Ln(this,y,g,B,En-1,-En)}let te=0,ce=1,Tt=0;for(this[g]=y&255;++te>0)-Tt&255;return g+B},o.prototype.writeIntBE=function(y,g,B,K){if(y=+y,g=g>>>0,!K){let En=Math.pow(2,8*B-1);Ln(this,y,g,B,En-1,-En)}let te=B-1,ce=1,Tt=0;for(this[g+te]=y&255;--te>=0&&(ce*=256);)y<0&&Tt===0&&this[g+te+1]!==0&&(Tt=1),this[g+te]=(y/ce>>0)-Tt&255;return g+B},o.prototype.writeInt8=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,1,127,-128),y<0&&(y=255+y+1),this[g]=y&255,g+1},o.prototype.writeInt16LE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,2,32767,-32768),this[g]=y&255,this[g+1]=y>>>8,g+2},o.prototype.writeInt16BE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,2,32767,-32768),this[g]=y>>>8,this[g+1]=y&255,g+2},o.prototype.writeInt32LE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,4,2147483647,-2147483648),this[g]=y&255,this[g+1]=y>>>8,this[g+2]=y>>>16,this[g+3]=y>>>24,g+4},o.prototype.writeInt32BE=function(y,g,B){return y=+y,g=g>>>0,B||Ln(this,y,g,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[g]=y>>>24,this[g+1]=y>>>16,this[g+2]=y>>>8,this[g+3]=y&255,g+4},o.prototype.writeBigInt64LE=Fa(function(y,g=0){return ae(this,y,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Fa(function(y,g=0){return De(this,y,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ie(P,y,g,B,K,te){if(g+B>P.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function Ce(P,y,g,B,K){return y=+y,g=g>>>0,K||Ie(P,y,g,4),t.write(P,y,g,B,23,4),g+4}o.prototype.writeFloatLE=function(y,g,B){return Ce(this,y,g,!0,B)},o.prototype.writeFloatBE=function(y,g,B){return Ce(this,y,g,!1,B)};function St(P,y,g,B,K){return y=+y,g=g>>>0,K||Ie(P,y,g,8),t.write(P,y,g,B,52,8),g+8}o.prototype.writeDoubleLE=function(y,g,B){return St(this,y,g,!0,B)},o.prototype.writeDoubleBE=function(y,g,B){return St(this,y,g,!1,B)},o.prototype.copy=function(y,g,B,K){if(!o.isBuffer(y))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),g>=y.length&&(g=y.length),g||(g=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),y.length-g>>0,B=B===void 0?this.length:B>>>0,y||(y=0);let te;if(typeof y=="number")for(te=g;tecn(2,32)?K=qe(String(g)):typeof g=="bigint"&&(K=String(g),(g>cn(BigInt(2),BigInt(32))||g<-cn(BigInt(2),BigInt(32)))&&(K=qe(K)),K+="n"),B+=` It must be ${y}. Received ${K}`,B},RangeError);function qe(P){let y="",g=P.length,B=P[0]==="-"?1:0;for(;g>=B+4;g-=3)y=`_${P.slice(g-3,g)}${y}`;return`${P.slice(0,g)}${y}`}function He(P,y,g){it(y,"offset"),(P[y]===void 0||P[y+g]===void 0)&&Pt(y,P.length-(g+1))}function Bt(P,y,g,B,K,te){if(P>g||P3?y===0||y===BigInt(0)?Tt=`>= 0${ce} and < 2${ce} ** ${(te+1)*8}${ce}`:Tt=`>= -(2${ce} ** ${(te+1)*8-1}${ce}) and < 2 ** ${(te+1)*8-1}${ce}`:Tt=`>= ${y}${ce} and <= ${g}${ce}`,new Y.ERR_OUT_OF_RANGE("value",Tt,P)}He(B,K,te)}function it(P,y){if(typeof P!="number")throw new Y.ERR_INVALID_ARG_TYPE(y,"number",P)}function Pt(P,y,g){throw Math.floor(P)!==P?(it(P,g),new Y.ERR_OUT_OF_RANGE(g||"offset","an integer",P)):y<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${y}`,P)}let us=/[^+/0-9A-Za-z-_]/g;function Qr(P){if(P=P.split("=")[0],P=P.trim().replace(us,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function cs(P,y){y=y||1/0;let g,B=P.length,K=null,te=[];for(let ce=0;ce55295&&g<57344){if(!K){if(g>56319){(y-=3)>-1&&te.push(239,191,189);continue}else if(ce+1===B){(y-=3)>-1&&te.push(239,191,189);continue}K=g;continue}if(g<56320){(y-=3)>-1&&te.push(239,191,189),K=g;continue}g=(K-55296<<10|g-56320)+65536}else K&&(y-=3)>-1&&te.push(239,191,189);if(K=null,g<128){if((y-=1)<0)break;te.push(g)}else if(g<2048){if((y-=2)<0)break;te.push(g>>6|192,g&63|128)}else if(g<65536){if((y-=3)<0)break;te.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((y-=4)<0)break;te.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return te}function Hc(P){let y=[];for(let g=0;g>8,K=g%256,te.push(K),te.push(B);return te}function yr(P){return e.toByteArray(Qr(P))}function si(P,y,g,B){let K;for(K=0;K=y.length||K>=P.length);++K)y[K+g]=P[K];return K}function xt(P,y){return P instanceof y||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===y.name}function Ir(P){return P!==P}let Bu=function(){let P="0123456789abcdef",y=new Array(256);for(let g=0;g<16;++g){let B=g*16;for(let K=0;K<16;++K)y[B+K]=P[g]+P[K]}return y}();function Fa(P){return typeof BigInt=="undefined"?Uu:P}function Uu(){throw new Error("BigInt not supported")}return Hu}var kd,tF,km,nF,Hu,rF,zu,D,Ape,Rpe,iF=Qu(()=>{"use strict";m();T();N();kd={},tF=!1;km={},nF=!1;Hu={},rF=!1;zu=CH();zu.Buffer;zu.SlowBuffer;zu.INSPECT_MAX_BYTES;zu.kMaxLength;D=zu.Buffer,Ape=zu.INSPECT_MAX_BYTES,Rpe=zu.kMaxLength});var T=Qu(()=>{"use strict";iF()});var aF=w(dl=>{"use strict";m();T();N();Object.defineProperty(dl,"__esModule",{value:!0});dl.versionInfo=dl.version=void 0;var BH="16.9.0";dl.version=BH;var UH=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});dl.versionInfo=UH});var qr=w(Yy=>{"use strict";m();T();N();Object.defineProperty(Yy,"__esModule",{value:!0});Yy.devAssert=kH;function kH(e,t){if(!!!e)throw new Error(t)}});var Mm=w(Jy=>{"use strict";m();T();N();Object.defineProperty(Jy,"__esModule",{value:!0});Jy.isPromise=MH;function MH(e){return typeof(e==null?void 0:e.then)=="function"}});var Ba=w(Hy=>{"use strict";m();T();N();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.isObjectLike=xH;function xH(e){return typeof e=="object"&&e!==null}});var br=w(zy=>{"use strict";m();T();N();Object.defineProperty(zy,"__esModule",{value:!0});zy.invariant=qH;function qH(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var xm=w(Wy=>{"use strict";m();T();N();Object.defineProperty(Wy,"__esModule",{value:!0});Wy.getLocation=KH;var VH=br(),jH=/\r\n|[\n\r]/g;function KH(e,t){let n=0,r=1;for(let i of e.body.matchAll(jH)){if(typeof i.index=="number"||(0,VH.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var Xy=w(qm=>{"use strict";m();T();N();Object.defineProperty(qm,"__esModule",{value:!0});qm.printLocation=$H;qm.printSourceLocation=oF;var GH=xm();function $H(e){return oF(e.source,(0,GH.getLocation)(e.source,e.start))}function oF(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,c=t.line===1?n:0,l=t.column+c,d=`${e.name}:${o}:${l} -`,p=r.split(/\r\n|[\n\r]/g),E=p[i];if(E.length>120){let I=Math.floor(l/80),v=l%80,A=[];for(let U=0;U["|",U]),["|","^".padStart(v)],["|",A[I+1]]])}return d+sF([[`${o-1} |`,p[i-1]],[`${o} |`,E],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function sF(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}});var ze=w(fl=>{"use strict";m();T();N();Object.defineProperty(fl,"__esModule",{value:!0});fl.GraphQLError=void 0;fl.formatError=HH;fl.printError=JH;var QH=Ba(),uF=xm(),cF=Xy();function YH(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Zy=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:c,positions:l,path:d,originalError:p,extensions:E}=YH(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=lF(Array.isArray(o)?o:o?[o]:void 0);let I=lF((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=c!=null?c:I==null||(i=I[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:I==null?void 0:I.map(A=>A.start),this.locations=l&&c?l.map(A=>(0,uF.getLocation)(c,A)):I==null?void 0:I.map(A=>(0,uF.getLocation)(A.source,A.start));let v=(0,QH.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(a=E!=null?E:v)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` +"use strict";var shim=(()=>{var bH=Object.create;var kd=Object.defineProperty,AH=Object.defineProperties,RH=Object.getOwnPropertyDescriptor,PH=Object.getOwnPropertyDescriptors,FH=Object.getOwnPropertyNames,Lm=Object.getOwnPropertySymbols,wH=Object.getPrototypeOf,Vy=Object.prototype.hasOwnProperty,MR=Object.prototype.propertyIsEnumerable;var cn=Math.pow,qy=(e,t,n)=>t in e?kd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&qy(e,n,t[n]);if(Lm)for(var n of Lm(t))MR.call(t,n)&&qy(e,n,t[n]);return e},Q=(e,t)=>AH(e,PH(t));var xR=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lm)for(var r of Lm(e))t.indexOf(r)<0&&MR.call(e,r)&&(n[r]=e[r]);return n};var Yu=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cm=(e,t)=>{for(var n in t)kd(e,n,{get:t[n],enumerable:!0})},qR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of FH(t))!Vy.call(e,i)&&i!==n&&kd(e,i,{get:()=>t[i],enumerable:!(r=RH(t,i))||r.enumerable});return e};var ys=(e,t,n)=>(n=e!=null?bH(wH(e)):{},qR(t||!e||!e.__esModule?kd(n,"default",{value:e,enumerable:!0}):n,e)),Bm=e=>qR(kd({},"__esModule",{value:!0}),e);var g=(e,t,n)=>(qy(e,typeof t!="symbol"?t+"":t,n),n),jy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ky=(e,t,n)=>(jy(e,t,"read from private field"),n?n.call(e):t.get(e)),Ju=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Gy=(e,t,n,r)=>(jy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var ll=(e,t,n)=>(jy(e,t,"access private method"),n);var Ai=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{c(n.next(l))}catch(d){i(d)}},o=l=>{try{c(n.throw(l))}catch(d){i(d)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);c((n=n.apply(e,t)).next())});var m=Yu(()=>{"use strict"});var S={};Cm(S,{_debugEnd:()=>AP,_debugProcess:()=>bP,_events:()=>GP,_eventsCount:()=>$P,_exiting:()=>uP,_fatalExceptions:()=>vP,_getActiveHandles:()=>fP,_getActiveRequests:()=>dP,_kill:()=>mP,_linkedBinding:()=>sP,_maxListeners:()=>KP,_preload_modules:()=>qP,_rawDebug:()=>iP,_startProfilerIdleNotifier:()=>RP,_stopProfilerIdleNotifier:()=>PP,_tickCallback:()=>DP,abort:()=>CP,addListener:()=>QP,allowedNodeEnvironmentFlags:()=>IP,arch:()=>$R,argv:()=>JR,argv0:()=>xP,assert:()=>gP,binding:()=>ZR,chdir:()=>nP,config:()=>cP,cpuUsage:()=>Mm,cwd:()=>tP,debugPort:()=>MP,default:()=>tF,dlopen:()=>lP,domain:()=>oP,emit:()=>WP,emitWarning:()=>XR,env:()=>YR,execArgv:()=>HR,execPath:()=>kP,exit:()=>hP,features:()=>_P,hasUncaughtExceptionCaptureCallback:()=>SP,hrtime:()=>km,kill:()=>EP,listeners:()=>eF,memoryUsage:()=>TP,moduleLoadList:()=>aP,nextTick:()=>jR,off:()=>JP,on:()=>gs,once:()=>YP,openStdin:()=>yP,pid:()=>BP,platform:()=>QR,ppid:()=>UP,prependListener:()=>XP,prependOnceListener:()=>ZP,reallyExit:()=>pP,release:()=>rP,removeAllListeners:()=>zP,removeListener:()=>HP,resourceUsage:()=>NP,setSourceMapsEnabled:()=>VP,setUncaughtExceptionCaptureCallback:()=>OP,stderr:()=>wP,stdin:()=>LP,stdout:()=>FP,title:()=>GR,umask:()=>eP,uptime:()=>jP,version:()=>zR,versions:()=>WR});function Yy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function LH(){!dl||!Hu||(dl=!1,Hu.length?Is=Hu.concat(Is):Um=-1,Is.length&&VR())}function VR(){if(!dl){var e=setTimeout(LH,0);dl=!0;for(var t=Is.length;t;){for(Hu=Is,Is=[];++Um1)for(var n=1;n{"use strict";m();T();N();Is=[],dl=!1,Um=-1;KR.prototype.run=function(){this.fun.apply(null,this.array)};GR="browser",$R="x64",QR="browser",YR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},JR=["/usr/bin/node"],HR=[],zR="v16.8.0",WR={},XR=function(e,t){console.warn((t?t+": ":"")+e)},ZR=function(e){Yy("binding")},eP=function(e){return 0},tP=function(){return"/"},nP=function(e){},rP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};iP=Dr,aP=[];oP={},uP=!1,cP={};pP=Dr,mP=Dr,Mm=function(){return{}},NP=Mm,TP=Mm,EP=Dr,hP=Dr,yP=Dr,IP={};_P={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},vP=Dr,OP=Dr;DP=Dr,bP=Dr,AP=Dr,RP=Dr,PP=Dr,FP=void 0,wP=void 0,LP=void 0,CP=Dr,BP=2,UP=1,kP="/bin/usr/node",MP=9229,xP="node",qP=[],VP=Dr,uu={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};uu.now===void 0&&($y=Date.now(),uu.timing&&uu.timing.navigationStart&&($y=uu.timing.navigationStart),uu.now=()=>Date.now()-$y);Qy=1e9;km.bigint=function(e){var t=km(e);return typeof BigInt=="undefined"?t[0]*Qy+t[1]:BigInt(t[0]*Qy)+BigInt(t[1])};KP=10,GP={},$P=0;QP=gs,YP=gs,JP=gs,HP=gs,zP=gs,WP=Dr,XP=gs,ZP=gs;tF={version:zR,versions:WR,arch:$R,platform:QR,release:rP,_rawDebug:iP,moduleLoadList:aP,binding:ZR,_linkedBinding:sP,_events:GP,_eventsCount:$P,_maxListeners:KP,on:gs,addListener:QP,once:YP,off:JP,removeListener:HP,removeAllListeners:zP,emit:WP,prependListener:XP,prependOnceListener:ZP,listeners:eF,domain:oP,_exiting:uP,config:cP,dlopen:lP,uptime:jP,_getActiveRequests:dP,_getActiveHandles:fP,reallyExit:pP,_kill:mP,cpuUsage:Mm,resourceUsage:NP,memoryUsage:TP,kill:EP,exit:hP,openStdin:yP,allowedNodeEnvironmentFlags:IP,assert:gP,features:_P,_fatalExceptions:vP,setUncaughtExceptionCaptureCallback:OP,hasUncaughtExceptionCaptureCallback:SP,emitWarning:XR,nextTick:jR,_tickCallback:DP,_debugProcess:bP,_debugEnd:AP,_startProfilerIdleNotifier:RP,_stopProfilerIdleNotifier:PP,stdout:FP,stdin:LP,stderr:wP,abort:CP,umask:eP,chdir:nP,cwd:tP,env:YR,title:GR,argv:JR,execArgv:HR,pid:BP,ppid:UP,execPath:kP,debugPort:MP,hrtime:km,argv0:xP,_preload_modules:qP,setSourceMapsEnabled:VP}});var N=Yu(()=>{"use strict";nF()});function CH(){if(rF)return Md;rF=!0,Md.byteLength=c,Md.toByteArray=d,Md.fromByteArray=I;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var U=v.indexOf("=");U===-1&&(U=A);var j=U===A?0:4-U%4;return[U,j]}function c(v){var A=o(v),U=A[0],j=A[1];return(U+j)*3/4-j}function l(v,A,U){return(A+U)*3/4-U}function d(v){var A,U=o(v),j=U[0],$=U[1],re=new n(l(v,j,$)),ee=0,me=$>0?j-4:j,ue;for(ue=0;ue>16&255,re[ee++]=A>>8&255,re[ee++]=A&255;return $===2&&(A=t[v.charCodeAt(ue)]<<2|t[v.charCodeAt(ue+1)]>>4,re[ee++]=A&255),$===1&&(A=t[v.charCodeAt(ue)]<<10|t[v.charCodeAt(ue+1)]<<4|t[v.charCodeAt(ue+2)]>>2,re[ee++]=A>>8&255,re[ee++]=A&255),re}function p(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function E(v,A,U){for(var j,$=[],re=A;reme?me:ee+re));return j===1?(A=v[U-1],$.push(e[A>>2]+e[A<<4&63]+"==")):j===2&&(A=(v[U-2]<<8)+v[U-1],$.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),$.join("")}return Md}function BH(){if(iF)return xm;iF=!0;return xm.read=function(e,t,n,r,i){var a,o,c=i*8-r-1,l=(1<>1,p=-7,E=n?i-1:0,I=n?-1:1,v=e[t+E];for(E+=I,a=v&(1<<-p)-1,v>>=-p,p+=c;p>0;a=a*256+e[t+E],E+=I,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=o*256+e[t+E],E+=I,p-=8);if(a===0)a=1-d;else{if(a===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-d}return(v?-1:1)*o*Math.pow(2,a-r)},xm.write=function(e,t,n,r,i,a){var o,c,l,d=a*8-i-1,p=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,A=r?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+E>=1?t+=I/l:t+=I*Math.pow(2,1-E),t*l>=2&&(o++,l/=2),o+E>=p?(c=0,o=p):o+E>=1?(c=(t*l-1)*Math.pow(2,i),o=o+E):(c=t*Math.pow(2,E-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=c&255,v+=A,c/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=A,o/=256,d-=8);e[n+v-A]|=U*128},xm}function UH(){if(aF)return zu;aF=!0;let e=CH(),t=BH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;zu.Buffer=o,zu.SlowBuffer=$,zu.INSPECT_MAX_BYTES=50;let r=2147483647;zu.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{let P=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(P,y),P.foo()===42}catch(P){return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(P){if(P>r)throw new RangeError('The value "'+P+'" is invalid for option "size"');let y=new Uint8Array(P);return Object.setPrototypeOf(y,o.prototype),y}function o(P,y,_){if(typeof P=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(P)}return c(P,y,_)}o.poolSize=8192;function c(P,y,_){if(typeof P=="string")return E(P,y);if(ArrayBuffer.isView(P))return v(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(xt(P,ArrayBuffer)||P&&xt(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(xt(P,SharedArrayBuffer)||P&&xt(P.buffer,SharedArrayBuffer)))return A(P,y,_);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=P.valueOf&&P.valueOf();if(B!=null&&B!==P)return o.from(B,y,_);let K=U(P);if(K)return K;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return o.from(P[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}o.from=function(P,y,_){return c(P,y,_)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function d(P,y,_){return l(P),P<=0?a(P):y!==void 0?typeof _=="string"?a(P).fill(y,_):a(P).fill(y):a(P)}o.alloc=function(P,y,_){return d(P,y,_)};function p(P){return l(P),a(P<0?0:j(P)|0)}o.allocUnsafe=function(P){return p(P)},o.allocUnsafeSlow=function(P){return p(P)};function E(P,y){if((typeof y!="string"||y==="")&&(y="utf8"),!o.isEncoding(y))throw new TypeError("Unknown encoding: "+y);let _=re(P,y)|0,B=a(_),K=B.write(P,y);return K!==_&&(B=B.slice(0,K)),B}function I(P){let y=P.length<0?0:j(P.length)|0,_=a(y);for(let B=0;B=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return P|0}function $(P){return+P!=P&&(P=0),o.alloc(+P)}o.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==o.prototype},o.compare=function(y,_){if(xt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),xt(_,Uint8Array)&&(_=o.from(_,_.offset,_.byteLength)),!o.isBuffer(y)||!o.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let B=y.length,K=_.length;for(let te=0,ce=Math.min(B,K);teK.length?(o.isBuffer(ce)||(ce=o.from(ce)),ce.copy(K,te)):Uint8Array.prototype.set.call(K,ce,te);else if(o.isBuffer(ce))ce.copy(K,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=ce.length}return K};function re(P,y){if(o.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||xt(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);let _=P.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return cs(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return yr(P).length;default:if(K)return B?-1:cs(P).length;y=(""+y).toLowerCase(),K=!0}}o.byteLength=re;function ee(P,y,_){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(P||(P="utf8");;)switch(P){case"hex":return lr(this,y,_);case"utf8":case"utf-8":return an(this,y,_);case"ascii":return Tn(this,y,_);case"latin1":case"binary":return Ur(this,y,_);case"base64":return rn(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gn(this,y,_);default:if(B)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),B=!0}}o.prototype._isBuffer=!0;function me(P,y,_){let B=P[y];P[y]=P[_],P[_]=B}o.prototype.swap16=function(){let y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(y+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(y,_,B,K,te){if(xt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),!o.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),B===void 0&&(B=y?y.length:0),K===void 0&&(K=0),te===void 0&&(te=this.length),_<0||B>y.length||K<0||te>this.length)throw new RangeError("out of range index");if(K>=te&&_>=B)return 0;if(K>=te)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,te>>>=0,this===y)return 0;let ce=te-K,Tt=B-_,En=Math.min(ce,Tt),un=this.slice(K,te),_n=y.slice(_,B);for(let sn=0;sn2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Ir(_)&&(_=K?0:P.length-1),_<0&&(_=P.length+_),_>=P.length){if(K)return-1;_=P.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof y=="string"&&(y=o.from(y,B)),o.isBuffer(y))return y.length===0?-1:Ae(P,y,_,B,K);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,y,_):Uint8Array.prototype.lastIndexOf.call(P,y,_):Ae(P,[y],_,B,K);throw new TypeError("val must be string, number or Buffer")}function Ae(P,y,_,B,K){let te=1,ce=P.length,Tt=y.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(P.length<2||y.length<2)return-1;te=2,ce/=2,Tt/=2,_/=2}function En(_n,sn){return te===1?_n[sn]:_n.readUInt16BE(sn*te)}let un;if(K){let _n=-1;for(un=_;unce&&(_=ce-Tt),un=_;un>=0;un--){let _n=!0;for(let sn=0;snK&&(B=K)):B=K;let te=y.length;B>te/2&&(B=te/2);let ce;for(ce=0;ce>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-_;if((B===void 0||B>te)&&(B=te),y.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ce=!1;for(;;)switch(K){case"hex":return xe(this,y,_,B);case"utf8":case"utf-8":return Ze(this,y,_,B);case"ascii":case"latin1":case"binary":return Z(this,y,_,B);case"base64":return _e(this,y,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,y,_,B);default:if(ce)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ce=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(P,y,_){return y===0&&_===P.length?e.fromByteArray(P):e.fromByteArray(P.slice(y,_))}function an(P,y,_){_=Math.min(P.length,_);let B=[],K=y;for(;K<_;){let te=P[K],ce=null,Tt=te>239?4:te>223?3:te>191?2:1;if(K+Tt<=_){let En,un,_n,sn;switch(Tt){case 1:te<128&&(ce=te);break;case 2:En=P[K+1],(En&192)===128&&(sn=(te&31)<<6|En&63,sn>127&&(ce=sn));break;case 3:En=P[K+1],un=P[K+2],(En&192)===128&&(un&192)===128&&(sn=(te&15)<<12|(En&63)<<6|un&63,sn>2047&&(sn<55296||sn>57343)&&(ce=sn));break;case 4:En=P[K+1],un=P[K+2],_n=P[K+3],(En&192)===128&&(un&192)===128&&(_n&192)===128&&(sn=(te&15)<<18|(En&63)<<12|(un&63)<<6|_n&63,sn>65535&&sn<1114112&&(ce=sn))}}ce===null?(ce=65533,Tt=1):ce>65535&&(ce-=65536,B.push(ce>>>10&1023|55296),ce=56320|ce&1023),B.push(ce),K+=Tt}return $t(B)}let wn=4096;function $t(P){let y=P.length;if(y<=wn)return String.fromCharCode.apply(String,P);let _="",B=0;for(;BB)&&(_=B);let K="";for(let te=y;te<_;++te)K+=Uu[P[te]];return K}function gn(P,y,_){let B=P.slice(y,_),K="";for(let te=0;teB&&(y=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ce=0;for(;++ce<_&&(te*=256);)K+=this[y+ce]*te;return K},o.prototype.readUintBE=o.prototype.readUIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y+--_],te=1;for(;_>0&&(te*=256);)K+=this[y+--_]*te;return K},o.prototype.readUint8=o.prototype.readUInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]|this[y+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]<<8|this[y+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},o.prototype.readBigUInt64LE=Fa(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_+this[++y]*cn(2,8)+this[++y]*cn(2,16)+this[++y]*cn(2,24),te=this[++y]+this[++y]*cn(2,8)+this[++y]*cn(2,16)+B*cn(2,24);return BigInt(K)+(BigInt(te)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_*cn(2,24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+this[++y],te=this[++y]*cn(2,24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+B;return(BigInt(K)<>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ce=0;for(;++ce<_&&(te*=256);)K+=this[y+ce]*te;return te*=128,K>=te&&(K-=Math.pow(2,8*_)),K},o.prototype.readIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=_,te=1,ce=this[y+--K];for(;K>0&&(te*=256);)ce+=this[y+--K]*te;return te*=128,ce>=te&&(ce-=Math.pow(2,8*_)),ce},o.prototype.readInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},o.prototype.readInt16LE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y]|this[y+1]<<8;return B&32768?B|4294901760:B},o.prototype.readInt16BE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y+1]|this[y]<<8;return B&32768?B|4294901760:B},o.prototype.readInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},o.prototype.readInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},o.prototype.readBigInt64LE=Fa(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=this[y+4]+this[y+5]*cn(2,8)+this[y+6]*cn(2,16)+(B<<24);return(BigInt(K)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=(_<<24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+this[++y];return(BigInt(K)<>>0,_||Ht(y,4,this.length),t.read(this,y,!0,23,4)},o.prototype.readFloatBE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),t.read(this,y,!1,23,4)},o.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!0,52,8)},o.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!1,52,8)};function Ln(P,y,_,B,K,te){if(!o.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>K||yP.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=1,ce=0;for(this[_]=y&255;++ce>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=B-1,ce=1;for(this[_+te]=y&255;--te>=0&&(ce*=256);)this[_+te]=y/ce&255;return _+B},o.prototype.writeUint8=o.prototype.writeUInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,255,0),this[_]=y&255,_+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function ae(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te;let ce=Number(y>>BigInt(32)&BigInt(4294967295));return P[_++]=ce,ce=ce>>8,P[_++]=ce,ce=ce>>8,P[_++]=ce,ce=ce>>8,P[_++]=ce,_}function De(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_+7]=te,te=te>>8,P[_+6]=te,te=te>>8,P[_+5]=te,te=te>>8,P[_+4]=te;let ce=Number(y>>BigInt(32)&BigInt(4294967295));return P[_+3]=ce,ce=ce>>8,P[_+2]=ce,ce=ce>>8,P[_+1]=ce,ce=ce>>8,P[_]=ce,_+8}o.prototype.writeBigUInt64LE=Fa(function(y,_=0){return ae(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Fa(function(y,_=0){return De(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let En=Math.pow(2,8*B-1);Ln(this,y,_,B,En-1,-En)}let te=0,ce=1,Tt=0;for(this[_]=y&255;++te>0)-Tt&255;return _+B},o.prototype.writeIntBE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let En=Math.pow(2,8*B-1);Ln(this,y,_,B,En-1,-En)}let te=B-1,ce=1,Tt=0;for(this[_+te]=y&255;--te>=0&&(ce*=256);)y<0&&Tt===0&&this[_+te+1]!==0&&(Tt=1),this[_+te]=(y/ce>>0)-Tt&255;return _+B},o.prototype.writeInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},o.prototype.writeInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},o.prototype.writeInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},o.prototype.writeBigInt64LE=Fa(function(y,_=0){return ae(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Fa(function(y,_=0){return De(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ie(P,y,_,B,K,te){if(_+B>P.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Ce(P,y,_,B,K){return y=+y,_=_>>>0,K||Ie(P,y,_,4),t.write(P,y,_,B,23,4),_+4}o.prototype.writeFloatLE=function(y,_,B){return Ce(this,y,_,!0,B)},o.prototype.writeFloatBE=function(y,_,B){return Ce(this,y,_,!1,B)};function St(P,y,_,B,K){return y=+y,_=_>>>0,K||Ie(P,y,_,8),t.write(P,y,_,B,52,8),_+8}o.prototype.writeDoubleLE=function(y,_,B){return St(this,y,_,!0,B)},o.prototype.writeDoubleBE=function(y,_,B){return St(this,y,_,!1,B)},o.prototype.copy=function(y,_,B,K){if(!o.isBuffer(y))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=y.length&&(_=y.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),y.length-_>>0,B=B===void 0?this.length:B>>>0,y||(y=0);let te;if(typeof y=="number")for(te=_;tecn(2,32)?K=qe(String(_)):typeof _=="bigint"&&(K=String(_),(_>cn(BigInt(2),BigInt(32))||_<-cn(BigInt(2),BigInt(32)))&&(K=qe(K)),K+="n"),B+=` It must be ${y}. Received ${K}`,B},RangeError);function qe(P){let y="",_=P.length,B=P[0]==="-"?1:0;for(;_>=B+4;_-=3)y=`_${P.slice(_-3,_)}${y}`;return`${P.slice(0,_)}${y}`}function He(P,y,_){it(y,"offset"),(P[y]===void 0||P[y+_]===void 0)&&Pt(y,P.length-(_+1))}function Bt(P,y,_,B,K,te){if(P>_||P3?y===0||y===BigInt(0)?Tt=`>= 0${ce} and < 2${ce} ** ${(te+1)*8}${ce}`:Tt=`>= -(2${ce} ** ${(te+1)*8-1}${ce}) and < 2 ** ${(te+1)*8-1}${ce}`:Tt=`>= ${y}${ce} and <= ${_}${ce}`,new Y.ERR_OUT_OF_RANGE("value",Tt,P)}He(B,K,te)}function it(P,y){if(typeof P!="number")throw new Y.ERR_INVALID_ARG_TYPE(y,"number",P)}function Pt(P,y,_){throw Math.floor(P)!==P?(it(P,_),new Y.ERR_OUT_OF_RANGE(_||"offset","an integer",P)):y<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,P)}let us=/[^+/0-9A-Za-z-_]/g;function Qr(P){if(P=P.split("=")[0],P=P.trim().replace(us,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function cs(P,y){y=y||1/0;let _,B=P.length,K=null,te=[];for(let ce=0;ce55295&&_<57344){if(!K){if(_>56319){(y-=3)>-1&&te.push(239,191,189);continue}else if(ce+1===B){(y-=3)>-1&&te.push(239,191,189);continue}K=_;continue}if(_<56320){(y-=3)>-1&&te.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(y-=3)>-1&&te.push(239,191,189);if(K=null,_<128){if((y-=1)<0)break;te.push(_)}else if(_<2048){if((y-=2)<0)break;te.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;te.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;te.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return te}function zc(P){let y=[];for(let _=0;_>8,K=_%256,te.push(K),te.push(B);return te}function yr(P){return e.toByteArray(Qr(P))}function si(P,y,_,B){let K;for(K=0;K=y.length||K>=P.length);++K)y[K+_]=P[K];return K}function xt(P,y){return P instanceof y||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===y.name}function Ir(P){return P!==P}let Uu=function(){let P="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){let B=_*16;for(let K=0;K<16;++K)y[B+K]=P[_]+P[K]}return y}();function Fa(P){return typeof BigInt=="undefined"?ku:P}function ku(){throw new Error("BigInt not supported")}return zu}var Md,rF,xm,iF,zu,aF,Wu,D,Ppe,Fpe,sF=Yu(()=>{"use strict";m();T();N();Md={},rF=!1;xm={},iF=!1;zu={},aF=!1;Wu=UH();Wu.Buffer;Wu.SlowBuffer;Wu.INSPECT_MAX_BYTES;Wu.kMaxLength;D=Wu.Buffer,Ppe=Wu.INSPECT_MAX_BYTES,Fpe=Wu.kMaxLength});var T=Yu(()=>{"use strict";sF()});var oF=w(fl=>{"use strict";m();T();N();Object.defineProperty(fl,"__esModule",{value:!0});fl.versionInfo=fl.version=void 0;var kH="16.9.0";fl.version=kH;var MH=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});fl.versionInfo=MH});var qr=w(Jy=>{"use strict";m();T();N();Object.defineProperty(Jy,"__esModule",{value:!0});Jy.devAssert=xH;function xH(e,t){if(!!!e)throw new Error(t)}});var qm=w(Hy=>{"use strict";m();T();N();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.isPromise=qH;function qH(e){return typeof(e==null?void 0:e.then)=="function"}});var Ba=w(zy=>{"use strict";m();T();N();Object.defineProperty(zy,"__esModule",{value:!0});zy.isObjectLike=VH;function VH(e){return typeof e=="object"&&e!==null}});var br=w(Wy=>{"use strict";m();T();N();Object.defineProperty(Wy,"__esModule",{value:!0});Wy.invariant=jH;function jH(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var Vm=w(Xy=>{"use strict";m();T();N();Object.defineProperty(Xy,"__esModule",{value:!0});Xy.getLocation=$H;var KH=br(),GH=/\r\n|[\n\r]/g;function $H(e,t){let n=0,r=1;for(let i of e.body.matchAll(GH)){if(typeof i.index=="number"||(0,KH.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var Zy=w(jm=>{"use strict";m();T();N();Object.defineProperty(jm,"__esModule",{value:!0});jm.printLocation=YH;jm.printSourceLocation=cF;var QH=Vm();function YH(e){return cF(e.source,(0,QH.getLocation)(e.source,e.start))}function cF(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,c=t.line===1?n:0,l=t.column+c,d=`${e.name}:${o}:${l} +`,p=r.split(/\r\n|[\n\r]/g),E=p[i];if(E.length>120){let I=Math.floor(l/80),v=l%80,A=[];for(let U=0;U["|",U]),["|","^".padStart(v)],["|",A[I+1]]])}return d+uF([[`${o-1} |`,p[i-1]],[`${o} |`,E],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function uF(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` +`)}});var ze=w(pl=>{"use strict";m();T();N();Object.defineProperty(pl,"__esModule",{value:!0});pl.GraphQLError=void 0;pl.formatError=WH;pl.printError=zH;var JH=Ba(),lF=Vm(),dF=Zy();function HH(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var eI=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:c,positions:l,path:d,originalError:p,extensions:E}=HH(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=fF(Array.isArray(o)?o:o?[o]:void 0);let I=fF((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=c!=null?c:I==null||(i=I[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:I==null?void 0:I.map(A=>A.start),this.locations=l&&c?l.map(A=>(0,lF.getLocation)(c,A)):I==null?void 0:I.map(A=>(0,lF.getLocation)(A.source,A.start));let v=(0,JH.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(a=E!=null?E:v)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` -`+(0,cF.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` +`+(0,dF.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+(0,cF.printSourceLocation)(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};fl.GraphQLError=Zy;function lF(e){return e===void 0||e.length===0?void 0:e}function JH(e){return e.toString()}function HH(e){return e.toJSON()}});var Vm=w(eI=>{"use strict";m();T();N();Object.defineProperty(eI,"__esModule",{value:!0});eI.syntaxError=WH;var zH=ze();function WH(e,t,n){return new zH.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var Ua=w(Ri=>{"use strict";m();T();N();Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Token=Ri.QueryDocumentKeys=Ri.OperationTypeNode=Ri.Location=void 0;Ri.isNode=ZH;var tI=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Ri.Location=tI;var nI=class{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};Ri.Token=nI;var dF={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};Ri.QueryDocumentKeys=dF;var XH=new Set(Object.keys(dF));function ZH(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&XH.has(t)}var rI;Ri.OperationTypeNode=rI;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(rI||(Ri.OperationTypeNode=rI={}))});var pl=w(Md=>{"use strict";m();T();N();Object.defineProperty(Md,"__esModule",{value:!0});Md.DirectiveLocation=void 0;var iI;Md.DirectiveLocation=iI;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(iI||(Md.DirectiveLocation=iI={}))});var wt=w(xd=>{"use strict";m();T();N();Object.defineProperty(xd,"__esModule",{value:!0});xd.Kind=void 0;var aI;xd.Kind=aI;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(aI||(xd.Kind=aI={}))});var jm=w(Wu=>{"use strict";m();T();N();Object.defineProperty(Wu,"__esModule",{value:!0});Wu.isDigit=fF;Wu.isLetter=sI;Wu.isNameContinue=n3;Wu.isNameStart=t3;Wu.isWhiteSpace=e3;function e3(e){return e===9||e===32}function fF(e){return e>=48&&e<=57}function sI(e){return e>=97&&e<=122||e>=65&&e<=90}function t3(e){return sI(e)||e===95}function n3(e){return sI(e)||fF(e)||e===95}});var Vd=w(qd=>{"use strict";m();T();N();Object.defineProperty(qd,"__esModule",{value:!0});qd.dedentBlockStringLines=r3;qd.isPrintableAsBlockString=a3;qd.printBlockString=s3;var oI=jm();function r3(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;oc===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function i3(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,oI.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),c=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=c||l,p=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),E="",I=i&&(0,oI.isWhiteSpace)(e.charCodeAt(0));return(p&&!I||a)&&(E+=` +`+(0,dF.printSourceLocation)(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};pl.GraphQLError=eI;function fF(e){return e===void 0||e.length===0?void 0:e}function zH(e){return e.toString()}function WH(e){return e.toJSON()}});var Km=w(tI=>{"use strict";m();T();N();Object.defineProperty(tI,"__esModule",{value:!0});tI.syntaxError=ZH;var XH=ze();function ZH(e,t,n){return new XH.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var Ua=w(Ri=>{"use strict";m();T();N();Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Token=Ri.QueryDocumentKeys=Ri.OperationTypeNode=Ri.Location=void 0;Ri.isNode=t3;var nI=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Ri.Location=nI;var rI=class{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};Ri.Token=rI;var pF={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};Ri.QueryDocumentKeys=pF;var e3=new Set(Object.keys(pF));function t3(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&e3.has(t)}var iI;Ri.OperationTypeNode=iI;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(iI||(Ri.OperationTypeNode=iI={}))});var ml=w(xd=>{"use strict";m();T();N();Object.defineProperty(xd,"__esModule",{value:!0});xd.DirectiveLocation=void 0;var aI;xd.DirectiveLocation=aI;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(aI||(xd.DirectiveLocation=aI={}))});var wt=w(qd=>{"use strict";m();T();N();Object.defineProperty(qd,"__esModule",{value:!0});qd.Kind=void 0;var sI;qd.Kind=sI;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(sI||(qd.Kind=sI={}))});var Gm=w(Xu=>{"use strict";m();T();N();Object.defineProperty(Xu,"__esModule",{value:!0});Xu.isDigit=mF;Xu.isLetter=oI;Xu.isNameContinue=i3;Xu.isNameStart=r3;Xu.isWhiteSpace=n3;function n3(e){return e===9||e===32}function mF(e){return e>=48&&e<=57}function oI(e){return e>=97&&e<=122||e>=65&&e<=90}function r3(e){return oI(e)||e===95}function i3(e){return oI(e)||mF(e)||e===95}});var jd=w(Vd=>{"use strict";m();T();N();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.dedentBlockStringLines=a3;Vd.isPrintableAsBlockString=o3;Vd.printBlockString=u3;var uI=Gm();function a3(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;oc===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function s3(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,uI.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),c=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=c||l,p=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),E="",I=i&&(0,uI.isWhiteSpace)(e.charCodeAt(0));return(p&&!I||a)&&(E+=` `),E+=n,(p||d)&&(E+=` -`),'"""'+E+'"""'}});var Kd=w(jd=>{"use strict";m();T();N();Object.defineProperty(jd,"__esModule",{value:!0});jd.TokenKind=void 0;var uI;jd.TokenKind=uI;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(uI||(jd.TokenKind=uI={}))});var Gm=w($d=>{"use strict";m();T();N();Object.defineProperty($d,"__esModule",{value:!0});$d.Lexer=void 0;$d.isPunctuatorTokenKind=u3;var sa=Vm(),mF=Ua(),o3=Vd(),Xu=jm(),_t=Kd(),lI=class{constructor(t){let n=new mF.Token(_t.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==_t.TokenKind.EOF)do if(t.next)t=t.next;else{let n=c3(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===_t.TokenKind.COMMENT);return t}};$d.Lexer=lI;function u3(e){return e===_t.TokenKind.BANG||e===_t.TokenKind.DOLLAR||e===_t.TokenKind.AMP||e===_t.TokenKind.PAREN_L||e===_t.TokenKind.PAREN_R||e===_t.TokenKind.SPREAD||e===_t.TokenKind.COLON||e===_t.TokenKind.EQUALS||e===_t.TokenKind.AT||e===_t.TokenKind.BRACKET_L||e===_t.TokenKind.BRACKET_R||e===_t.TokenKind.BRACE_L||e===_t.TokenKind.PIPE||e===_t.TokenKind.BRACE_R}function ml(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Km(e,t){return NF(e.charCodeAt(t))&&TF(e.charCodeAt(t+1))}function NF(e){return e>=55296&&e<=56319}function TF(e){return e>=56320&&e<=57343}function Zu(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return _t.TokenKind.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Hn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new mF.Token(t,n,r,a,o,i)}function c3(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function N3(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,sa.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function T3(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,c="",l=[];for(;a{"use strict";m();T();N();Object.defineProperty(dI,"__esModule",{value:!0});dI.inspect=y3;var h3=10,EF=2;function y3(e){return $m(e,[])}function $m(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return I3(e,t);default:return String(e)}}function I3(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(g3(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:$m(r,n)}else if(Array.isArray(e))return v3(e,n);return _3(e,n)}function g3(e){return typeof e.toJSON=="function"}function _3(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>EF?"["+O3(e)+"]":"{ "+n.map(([i,a])=>i+": "+$m(a,t)).join(", ")+" }"}function v3(e,t){if(e.length===0)return"[]";if(t.length>EF)return"[Array]";let n=Math.min(h3,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function O3(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}});var Qd=w(Qm=>{"use strict";m();T();N();Object.defineProperty(Qm,"__esModule",{value:!0});Qm.instanceOf=void 0;var S3=Wt(),D3=globalThis.process&&S.env.NODE_ENV==="production",b3=D3?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){let o=(0,S3.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`),'"""'+E+'"""'}});var Gd=w(Kd=>{"use strict";m();T();N();Object.defineProperty(Kd,"__esModule",{value:!0});Kd.TokenKind=void 0;var cI;Kd.TokenKind=cI;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(cI||(Kd.TokenKind=cI={}))});var Qm=w(Qd=>{"use strict";m();T();N();Object.defineProperty(Qd,"__esModule",{value:!0});Qd.Lexer=void 0;Qd.isPunctuatorTokenKind=l3;var sa=Km(),TF=Ua(),c3=jd(),Zu=Gm(),_t=Gd(),dI=class{constructor(t){let n=new TF.Token(_t.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==_t.TokenKind.EOF)do if(t.next)t=t.next;else{let n=d3(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===_t.TokenKind.COMMENT);return t}};Qd.Lexer=dI;function l3(e){return e===_t.TokenKind.BANG||e===_t.TokenKind.DOLLAR||e===_t.TokenKind.AMP||e===_t.TokenKind.PAREN_L||e===_t.TokenKind.PAREN_R||e===_t.TokenKind.SPREAD||e===_t.TokenKind.COLON||e===_t.TokenKind.EQUALS||e===_t.TokenKind.AT||e===_t.TokenKind.BRACKET_L||e===_t.TokenKind.BRACKET_R||e===_t.TokenKind.BRACE_L||e===_t.TokenKind.PIPE||e===_t.TokenKind.BRACE_R}function Nl(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function $m(e,t){return EF(e.charCodeAt(t))&&hF(e.charCodeAt(t+1))}function EF(e){return e>=55296&&e<=56319}function hF(e){return e>=56320&&e<=57343}function ec(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return _t.TokenKind.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Hn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new TF.Token(t,n,r,a,o,i)}function d3(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function E3(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,sa.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function h3(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,c="",l=[];for(;a{"use strict";m();T();N();Object.defineProperty(fI,"__esModule",{value:!0});fI.inspect=g3;var I3=10,yF=2;function g3(e){return Ym(e,[])}function Ym(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return _3(e,t);default:return String(e)}}function _3(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(v3(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Ym(r,n)}else if(Array.isArray(e))return S3(e,n);return O3(e,n)}function v3(e){return typeof e.toJSON=="function"}function O3(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>yF?"["+D3(e)+"]":"{ "+n.map(([i,a])=>i+": "+Ym(a,t)).join(", ")+" }"}function S3(e,t){if(e.length===0)return"[]";if(t.length>yF)return"[Array]";let n=Math.min(I3,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function D3(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}});var Yd=w(Jm=>{"use strict";m();T();N();Object.defineProperty(Jm,"__esModule",{value:!0});Jm.instanceOf=void 0;var b3=Wt(),A3=globalThis.process&&S.env.NODE_ENV==="production",R3=A3?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){let o=(0,b3.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -36,17 +36,17 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`)}}return!1};Qm.instanceOf=b3});var Jm=w(Yd=>{"use strict";m();T();N();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.Source=void 0;Yd.isSource=P3;var fI=qr(),A3=Wt(),R3=Qd(),Ym=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,fI.devAssert)(!1,`Body must be a string. Received: ${(0,A3.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,fI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,fI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Yd.Source=Ym;function P3(e){return(0,R3.instanceOf)(e,Ym)}});var Nl=w(uu=>{"use strict";m();T();N();Object.defineProperty(uu,"__esModule",{value:!0});uu.Parser=void 0;uu.parse=w3;uu.parseConstValue=C3;uu.parseType=B3;uu.parseValue=L3;var ec=Vm(),Jd=Ua(),F3=pl(),ot=wt(),yF=Gm(),hF=Jm(),Se=Kd();function w3(e,t){return new tc(e,t).parseDocument()}function L3(e,t){let n=new tc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Se.TokenKind.EOF),r}function C3(e,t){let n=new tc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Se.TokenKind.EOF),r}function B3(e,t){let n=new tc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Se.TokenKind.EOF),r}var tc=class{constructor(t,n={}){let r=(0,hF.isSource)(t)?t:new hF.Source(t);this._lexer=new yF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Se.TokenKind.NAME);return this.node(t,{kind:ot.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ot.Kind.DOCUMENT,definitions:this.many(Se.TokenKind.SOF,this.parseDefinition,Se.TokenKind.EOF)})}parseDefinition(){if(this.peek(Se.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Se.TokenKind.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,ec.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(Se.TokenKind.BRACE_L))return this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:Jd.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Se.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Se.TokenKind.NAME);switch(t.value){case"query":return Jd.OperationTypeNode.QUERY;case"mutation":return Jd.OperationTypeNode.MUTATION;case"subscription":return Jd.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseVariableDefinition,Se.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ot.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Se.TokenKind.DOLLAR),this.node(t,{kind:ot.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ot.Kind.SELECTION_SET,selections:this.many(Se.TokenKind.BRACE_L,this.parseSelection,Se.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Se.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Se.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:ot.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.TokenKind.PAREN_L,n,Se.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Se.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Se.TokenKind.NAME)?this.node(t,{kind:ot.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ot.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case Se.TokenKind.BRACKET_L:return this.parseList(t);case Se.TokenKind.BRACE_L:return this.parseObject(t);case Se.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.INT,value:n.value});case Se.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.FLOAT,value:n.value});case Se.TokenKind.STRING:case Se.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Se.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:ot.Kind.NULL});default:return this.node(n,{kind:ot.Kind.ENUM,value:n.value})}case Se.TokenKind.DOLLAR:if(t)if(this.expectToken(Se.TokenKind.DOLLAR),this._lexer.token.kind===Se.TokenKind.NAME){let r=this._lexer.token.value;throw(0,ec.syntaxError)(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ot.Kind.STRING,value:t.value,block:t.kind===Se.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ot.Kind.LIST,values:this.any(Se.TokenKind.BRACKET_L,n,Se.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ot.Kind.OBJECT,fields:this.any(Se.TokenKind.BRACE_L,n,Se.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Se.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Se.TokenKind.AT),this.node(n,{kind:ot.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Se.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Se.TokenKind.BRACKET_R),n=this.node(t,{kind:ot.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Se.TokenKind.BANG)?this.node(t,{kind:ot.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:ot.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.TokenKind.STRING)||this.peek(Se.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);return this.node(t,{kind:ot.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Se.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:ot.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseFieldDefinition,Se.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Se.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseInputValueDef,Se.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Se.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Se.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:ot.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.TokenKind.EQUALS)?this.delimitedMany(Se.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:ot.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseEnumValueDefinition,Se.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,ec.syntaxError)(this._lexer.source,this._lexer.token.start,`${Hm(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseInputValueDef,Se.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Se.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:ot.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Se.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(F3.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Jd.Location(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw(0,ec.syntaxError)(this._lexer.source,n.start,`Expected ${IF(t)}, found ${Hm(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Se.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,ec.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${Hm(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Se.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,ec.syntaxError)(this._lexer.source,n.start,`Unexpected ${Hm(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==Se.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,ec.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};uu.Parser=tc;function Hm(e){let t=e.value;return IF(e.kind)+(t!=null?` "${t}"`:"")}function IF(e){return(0,yF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var cu=w(pI=>{"use strict";m();T();N();Object.defineProperty(pI,"__esModule",{value:!0});pI.didYouMean=k3;var U3=5;function k3(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let a=r.map(l=>`"${l}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}let o=a.slice(0,U3),c=o.pop();return i+o.join(", ")+", or "+c+"?"}});var gF=w(mI=>{"use strict";m();T();N();Object.defineProperty(mI,"__esModule",{value:!0});mI.identityFunc=M3;function M3(e){return e}});var lu=w(NI=>{"use strict";m();T();N();Object.defineProperty(NI,"__esModule",{value:!0});NI.keyMap=x3;function x3(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Hd=w(TI=>{"use strict";m();T();N();Object.defineProperty(TI,"__esModule",{value:!0});TI.keyValMap=q3;function q3(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var hI=w(EI=>{"use strict";m();T();N();Object.defineProperty(EI,"__esModule",{value:!0});EI.mapValue=V3;function V3(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var zd=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.naturalCompare=j3;function j3(e,t){let n=0,r=0;for(;n0);let c=0;do++r,c=c*10+a-yI,a=t.charCodeAt(r);while(zm(a)&&c>0);if(oc)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var yI=48,K3=57;function zm(e){return!isNaN(e)&&yI<=e&&e<=K3}});var du=w(_I=>{"use strict";m();T();N();Object.defineProperty(_I,"__esModule",{value:!0});_I.suggestionList=$3;var G3=zd();function $3(e,t){let n=Object.create(null),r=new gI(e),i=Math.floor(e.length*.4)+1;for(let a of t){let o=r.measure(a,i);o!==void 0&&(n[a]=o)}return Object.keys(n).sort((a,o)=>{let c=n[a]-n[o];return c!==0?c:(0,G3.naturalCompare)(a,o)})}var gI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=_F(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=_F(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let p=0;p<=c;p++)l[0][p]=p;for(let p=1;p<=o;p++){let E=l[(p-1)%3],I=l[p%3],v=I[0]=p;for(let A=1;A<=c;A++){let U=i[p-1]===a[A-1]?0:1,j=Math.min(E[A]+1,I[A-1]+1,E[A-1]+U);if(p>1&&A>1&&i[p-1]===a[A-2]&&i[p-2]===a[A-1]){let $=l[(p-2)%3][A-2];j=Math.min(j,$+1)}jn)return}let d=l[o%3][c];return d<=n?d:void 0}};function _F(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(vI,"__esModule",{value:!0});vI.toObjMap=Q3;function Q3(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}});var vF=w(OI=>{"use strict";m();T();N();Object.defineProperty(OI,"__esModule",{value:!0});OI.printString=Y3;function Y3(e){return`"${e.replace(J3,H3)}"`}var J3=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function H3(e){return z3[e.charCodeAt(0)]}var z3=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var nc=w(fu=>{"use strict";m();T();N();Object.defineProperty(fu,"__esModule",{value:!0});fu.BREAK=void 0;fu.getEnterLeaveForKind=Xm;fu.getVisitFn=t6;fu.visit=Z3;fu.visitInParallel=e6;var W3=qr(),X3=Wt(),SI=Ua(),OF=wt(),Tl=Object.freeze({});fu.BREAK=Tl;function Z3(e,t,n=SI.QueryDocumentKeys){let r=new Map;for(let $ of Object.values(OF.Kind))r.set($,Xm(t,$));let i,a=Array.isArray(e),o=[e],c=-1,l=[],d=e,p,E,I=[],v=[];do{c++;let $=c===o.length,re=$&&l.length!==0;if($){if(p=v.length===0?void 0:I[I.length-1],d=E,E=v.pop(),re)if(a){d=d.slice();let me=0;for(let[ue,Ae]of l){let xe=ue-me;Ae===null?(d.splice(xe,1),me++):d[xe]=Ae}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[me,ue]of l)d[me]=ue}c=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(E){if(p=a?c:o[c],d=E[p],d==null)continue;I.push(p)}let ee;if(!Array.isArray(d)){var A,U;(0,SI.isNode)(d)||(0,W3.devAssert)(!1,`Invalid AST Node: ${(0,X3.inspect)(d)}.`);let me=$?(A=r.get(d.kind))===null||A===void 0?void 0:A.leave:(U=r.get(d.kind))===null||U===void 0?void 0:U.enter;if(ee=me==null?void 0:me.call(t,d,p,E,I,v),ee===Tl)break;if(ee===!1){if(!$){I.pop();continue}}else if(ee!==void 0&&(l.push([p,ee]),!$))if((0,SI.isNode)(ee))d=ee;else{I.pop();continue}}if(ee===void 0&&re&&l.push([p,d]),$)I.pop();else{var j;i={inArray:a,index:c,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(j=n[d.kind])!==null&&j!==void 0?j:[],c=-1,l=[],E&&v.push(E),E=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function e6(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(OF.Kind)){let i=!1,a=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();N();Object.defineProperty(DI,"__esModule",{value:!0});DI.print=a6;var n6=Vd(),r6=vF(),i6=nc();function a6(e){return(0,i6.visit)(e,o6)}var s6=80,o6={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ve(e.definitions,` +spurious results.`)}}return!1};Jm.instanceOf=R3});var zm=w(Jd=>{"use strict";m();T();N();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.Source=void 0;Jd.isSource=w3;var pI=qr(),P3=Wt(),F3=Yd(),Hm=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,pI.devAssert)(!1,`Body must be a string. Received: ${(0,P3.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,pI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,pI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Jd.Source=Hm;function w3(e){return(0,F3.instanceOf)(e,Hm)}});var Tl=w(cu=>{"use strict";m();T();N();Object.defineProperty(cu,"__esModule",{value:!0});cu.Parser=void 0;cu.parse=C3;cu.parseConstValue=U3;cu.parseType=k3;cu.parseValue=B3;var tc=Km(),Hd=Ua(),L3=ml(),ot=wt(),gF=Qm(),IF=zm(),Se=Gd();function C3(e,t){return new nc(e,t).parseDocument()}function B3(e,t){let n=new nc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Se.TokenKind.EOF),r}function U3(e,t){let n=new nc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Se.TokenKind.EOF),r}function k3(e,t){let n=new nc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Se.TokenKind.EOF),r}var nc=class{constructor(t,n={}){let r=(0,IF.isSource)(t)?t:new IF.Source(t);this._lexer=new gF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Se.TokenKind.NAME);return this.node(t,{kind:ot.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ot.Kind.DOCUMENT,definitions:this.many(Se.TokenKind.SOF,this.parseDefinition,Se.TokenKind.EOF)})}parseDefinition(){if(this.peek(Se.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Se.TokenKind.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,tc.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(Se.TokenKind.BRACE_L))return this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:Hd.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Se.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Se.TokenKind.NAME);switch(t.value){case"query":return Hd.OperationTypeNode.QUERY;case"mutation":return Hd.OperationTypeNode.MUTATION;case"subscription":return Hd.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseVariableDefinition,Se.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ot.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Se.TokenKind.DOLLAR),this.node(t,{kind:ot.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ot.Kind.SELECTION_SET,selections:this.many(Se.TokenKind.BRACE_L,this.parseSelection,Se.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Se.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Se.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:ot.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.TokenKind.PAREN_L,n,Se.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Se.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Se.TokenKind.NAME)?this.node(t,{kind:ot.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ot.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case Se.TokenKind.BRACKET_L:return this.parseList(t);case Se.TokenKind.BRACE_L:return this.parseObject(t);case Se.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.INT,value:n.value});case Se.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.FLOAT,value:n.value});case Se.TokenKind.STRING:case Se.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Se.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:ot.Kind.NULL});default:return this.node(n,{kind:ot.Kind.ENUM,value:n.value})}case Se.TokenKind.DOLLAR:if(t)if(this.expectToken(Se.TokenKind.DOLLAR),this._lexer.token.kind===Se.TokenKind.NAME){let r=this._lexer.token.value;throw(0,tc.syntaxError)(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ot.Kind.STRING,value:t.value,block:t.kind===Se.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ot.Kind.LIST,values:this.any(Se.TokenKind.BRACKET_L,n,Se.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ot.Kind.OBJECT,fields:this.any(Se.TokenKind.BRACE_L,n,Se.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Se.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Se.TokenKind.AT),this.node(n,{kind:ot.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Se.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Se.TokenKind.BRACKET_R),n=this.node(t,{kind:ot.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Se.TokenKind.BANG)?this.node(t,{kind:ot.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:ot.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.TokenKind.STRING)||this.peek(Se.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);return this.node(t,{kind:ot.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Se.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:ot.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseFieldDefinition,Se.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Se.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseInputValueDef,Se.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Se.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Se.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:ot.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.TokenKind.EQUALS)?this.delimitedMany(Se.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:ot.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseEnumValueDefinition,Se.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,tc.syntaxError)(this._lexer.source,this._lexer.token.start,`${Wm(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseInputValueDef,Se.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Se.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:ot.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Se.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(L3.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Hd.Location(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw(0,tc.syntaxError)(this._lexer.source,n.start,`Expected ${_F(t)}, found ${Wm(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Se.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,tc.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${Wm(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Se.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,tc.syntaxError)(this._lexer.source,n.start,`Unexpected ${Wm(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==Se.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,tc.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};cu.Parser=nc;function Wm(e){let t=e.value;return _F(e.kind)+(t!=null?` "${t}"`:"")}function _F(e){return(0,gF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var lu=w(mI=>{"use strict";m();T();N();Object.defineProperty(mI,"__esModule",{value:!0});mI.didYouMean=x3;var M3=5;function x3(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let a=r.map(l=>`"${l}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}let o=a.slice(0,M3),c=o.pop();return i+o.join(", ")+", or "+c+"?"}});var vF=w(NI=>{"use strict";m();T();N();Object.defineProperty(NI,"__esModule",{value:!0});NI.identityFunc=q3;function q3(e){return e}});var du=w(TI=>{"use strict";m();T();N();Object.defineProperty(TI,"__esModule",{value:!0});TI.keyMap=V3;function V3(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var zd=w(EI=>{"use strict";m();T();N();Object.defineProperty(EI,"__esModule",{value:!0});EI.keyValMap=j3;function j3(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var yI=w(hI=>{"use strict";m();T();N();Object.defineProperty(hI,"__esModule",{value:!0});hI.mapValue=K3;function K3(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var Wd=w(gI=>{"use strict";m();T();N();Object.defineProperty(gI,"__esModule",{value:!0});gI.naturalCompare=G3;function G3(e,t){let n=0,r=0;for(;n0);let c=0;do++r,c=c*10+a-II,a=t.charCodeAt(r);while(Xm(a)&&c>0);if(oc)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var II=48,$3=57;function Xm(e){return!isNaN(e)&&II<=e&&e<=$3}});var fu=w(vI=>{"use strict";m();T();N();Object.defineProperty(vI,"__esModule",{value:!0});vI.suggestionList=Y3;var Q3=Wd();function Y3(e,t){let n=Object.create(null),r=new _I(e),i=Math.floor(e.length*.4)+1;for(let a of t){let o=r.measure(a,i);o!==void 0&&(n[a]=o)}return Object.keys(n).sort((a,o)=>{let c=n[a]-n[o];return c!==0?c:(0,Q3.naturalCompare)(a,o)})}var _I=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=OF(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=OF(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let p=0;p<=c;p++)l[0][p]=p;for(let p=1;p<=o;p++){let E=l[(p-1)%3],I=l[p%3],v=I[0]=p;for(let A=1;A<=c;A++){let U=i[p-1]===a[A-1]?0:1,j=Math.min(E[A]+1,I[A-1]+1,E[A-1]+U);if(p>1&&A>1&&i[p-1]===a[A-2]&&i[p-2]===a[A-1]){let $=l[(p-2)%3][A-2];j=Math.min(j,$+1)}jn)return}let d=l[o%3][c];return d<=n?d:void 0}};function OF(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(OI,"__esModule",{value:!0});OI.toObjMap=J3;function J3(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}});var SF=w(SI=>{"use strict";m();T();N();Object.defineProperty(SI,"__esModule",{value:!0});SI.printString=H3;function H3(e){return`"${e.replace(z3,W3)}"`}var z3=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function W3(e){return X3[e.charCodeAt(0)]}var X3=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var rc=w(pu=>{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.BREAK=void 0;pu.getEnterLeaveForKind=eN;pu.getVisitFn=r6;pu.visit=t6;pu.visitInParallel=n6;var Z3=qr(),e6=Wt(),DI=Ua(),DF=wt(),El=Object.freeze({});pu.BREAK=El;function t6(e,t,n=DI.QueryDocumentKeys){let r=new Map;for(let $ of Object.values(DF.Kind))r.set($,eN(t,$));let i,a=Array.isArray(e),o=[e],c=-1,l=[],d=e,p,E,I=[],v=[];do{c++;let $=c===o.length,re=$&&l.length!==0;if($){if(p=v.length===0?void 0:I[I.length-1],d=E,E=v.pop(),re)if(a){d=d.slice();let me=0;for(let[ue,Ae]of l){let xe=ue-me;Ae===null?(d.splice(xe,1),me++):d[xe]=Ae}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[me,ue]of l)d[me]=ue}c=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(E){if(p=a?c:o[c],d=E[p],d==null)continue;I.push(p)}let ee;if(!Array.isArray(d)){var A,U;(0,DI.isNode)(d)||(0,Z3.devAssert)(!1,`Invalid AST Node: ${(0,e6.inspect)(d)}.`);let me=$?(A=r.get(d.kind))===null||A===void 0?void 0:A.leave:(U=r.get(d.kind))===null||U===void 0?void 0:U.enter;if(ee=me==null?void 0:me.call(t,d,p,E,I,v),ee===El)break;if(ee===!1){if(!$){I.pop();continue}}else if(ee!==void 0&&(l.push([p,ee]),!$))if((0,DI.isNode)(ee))d=ee;else{I.pop();continue}}if(ee===void 0&&re&&l.push([p,d]),$)I.pop();else{var j;i={inArray:a,index:c,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(j=n[d.kind])!==null&&j!==void 0?j:[],c=-1,l=[],E&&v.push(E),E=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function n6(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(DF.Kind)){let i=!1,a=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();N();Object.defineProperty(bI,"__esModule",{value:!0});bI.print=o6;var i6=jd(),a6=SF(),s6=rc();function o6(e){return(0,s6.visit)(e,c6)}var u6=80,c6={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ve(e.definitions,` -`)},OperationDefinition:{leave(e){let t=At("(",Ve(e.variableDefinitions,", "),")"),n=Ve([e.operation,Ve([e.name,t]),Ve(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+At(" = ",n)+At(" ",Ve(r," "))},SelectionSet:{leave:({selections:e})=>oa(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=At("",e,": ")+t,o=a+At("(",Ve(n,", "),")");return o.length>s6&&(o=a+At(`( -`,Zm(Ve(n,` +`)},OperationDefinition:{leave(e){let t=At("(",Ve(e.variableDefinitions,", "),")"),n=Ve([e.operation,Ve([e.name,t]),Ve(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+At(" = ",n)+At(" ",Ve(r," "))},SelectionSet:{leave:({selections:e})=>oa(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=At("",e,": ")+t,o=a+At("(",Ve(n,", "),")");return o.length>u6&&(o=a+At(`( +`,tN(Ve(n,` `)),` -)`)),Ve([o,Ve(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+At(" ",Ve(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ve(["...",At("on ",e),Ve(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${At("(",Ve(n,", "),")")} on ${t} ${At("",Ve(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,n6.printBlockString)(e):(0,r6.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Ve(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Ve(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+At("(",Ve(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>At("",e,` +)`)),Ve([o,Ve(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+At(" ",Ve(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ve(["...",At("on ",e),Ve(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${At("(",Ve(n,", "),")")} on ${t} ${At("",Ve(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,i6.printBlockString)(e):(0,a6.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Ve(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Ve(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+At("(",Ve(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>At("",e,` `)+Ve(["schema",Ve(t," "),oa(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` `)+Ve(["scalar",t,Ve(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>At("",e,` `)+Ve(["type",t,At("implements ",Ve(n," & ")),Ve(r," "),oa(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>At("",e,` -`)+t+(SF(n)?At(`( -`,Zm(Ve(n,` +`)+t+(bF(n)?At(`( +`,tN(Ve(n,` `)),` )`):At("(",Ve(n,", "),")"))+": "+r+At(" ",Ve(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>At("",e,` `)+Ve([t+": "+n,At("= ",r),Ve(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>At("",e,` @@ -55,23 +55,23 @@ spurious results.`)}}return!1};Qm.instanceOf=b3});var Jm=w(Yd=>{"use strict";m() `)+Ve(["enum",t,Ve(n," "),oa(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` `)+Ve([t,Ve(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>At("",e,` `)+Ve(["input",t,Ve(n," "),oa(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>At("",e,` -`)+"directive @"+t+(SF(n)?At(`( -`,Zm(Ve(n,` +`)+"directive @"+t+(bF(n)?At(`( +`,tN(Ve(n,` `)),` )`):At("(",Ve(n,", "),")"))+(r?" repeatable":"")+" on "+Ve(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ve(["extend schema",Ve(e," "),oa(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Ve(["extend scalar",e,Ve(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ve(["extend type",e,At("implements ",Ve(t," & ")),Ve(n," "),oa(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ve(["extend interface",e,At("implements ",Ve(t," & ")),Ve(n," "),oa(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Ve(["extend union",e,Ve(t," "),At("= ",Ve(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Ve(["extend enum",e,Ve(t," "),oa(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Ve(["extend input",e,Ve(t," "),oa(n)]," ")}};function Ve(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function oa(e){return At(`{ -`,Zm(Ve(e,` +`,tN(Ve(e,` `)),` -}`)}function At(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Zm(e){return At(" ",e.replace(/\n/g,` - `))}function SF(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}});var RI=w(AI=>{"use strict";m();T();N();Object.defineProperty(AI,"__esModule",{value:!0});AI.valueFromASTUntyped=bI;var u6=Hd(),_s=wt();function bI(e,t){switch(e.kind){case _s.Kind.NULL:return null;case _s.Kind.INT:return parseInt(e.value,10);case _s.Kind.FLOAT:return parseFloat(e.value);case _s.Kind.STRING:case _s.Kind.ENUM:case _s.Kind.BOOLEAN:return e.value;case _s.Kind.LIST:return e.values.map(n=>bI(n,t));case _s.Kind.OBJECT:return(0,u6.keyValMap)(e.fields,n=>n.name.value,n=>bI(n.value,t));case _s.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var Wd=w(tN=>{"use strict";m();T();N();Object.defineProperty(tN,"__esModule",{value:!0});tN.assertEnumValueName=c6;tN.assertName=AF;var DF=qr(),eN=ze(),bF=jm();function AF(e){if(e!=null||(0,DF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,DF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new eN.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.GraphQLUnionType=Qe.GraphQLScalarType=Qe.GraphQLObjectType=Qe.GraphQLNonNull=Qe.GraphQLList=Qe.GraphQLInterfaceType=Qe.GraphQLInputObjectType=Qe.GraphQLEnumType=void 0;Qe.argsToArgsConfig=VF;Qe.assertAbstractType=R6;Qe.assertCompositeType=A6;Qe.assertEnumType=g6;Qe.assertInputObjectType=_6;Qe.assertInputType=S6;Qe.assertInterfaceType=y6;Qe.assertLeafType=b6;Qe.assertListType=v6;Qe.assertNamedType=L6;Qe.assertNonNullType=O6;Qe.assertNullableType=F6;Qe.assertObjectType=h6;Qe.assertOutputType=D6;Qe.assertScalarType=E6;Qe.assertType=T6;Qe.assertUnionType=I6;Qe.assertWrappingType=P6;Qe.defineArguments=xF;Qe.getNamedType=C6;Qe.getNullableType=w6;Qe.isAbstractType=BF;Qe.isCompositeType=CF;Qe.isEnumType=sc;Qe.isInputObjectType=Zd;Qe.isInputType=PI;Qe.isInterfaceType=ic;Qe.isLeafType=LF;Qe.isListType=pN;Qe.isNamedType=UF;Qe.isNonNullType=mu;Qe.isNullableType=wI;Qe.isObjectType=hl;Qe.isOutputType=FI;Qe.isRequiredArgument=B6;Qe.isRequiredInputField=M6;Qe.isScalarType=rc;Qe.isType=fN;Qe.isUnionType=ac;Qe.isWrappingType=ef;Qe.resolveObjMapThunk=CI;Qe.resolveReadonlyArrayThunk=LI;var pr=qr(),l6=cu(),RF=gF(),Nn=Wt(),pu=Qd(),d6=Ba(),f6=lu(),wF=Hd(),dN=hI(),p6=du(),ka=Wm(),Xd=ze(),m6=wt(),PF=pi(),N6=RI(),Ma=Wd();function fN(e){return rc(e)||hl(e)||ic(e)||ac(e)||sc(e)||Zd(e)||pN(e)||mu(e)}function T6(e){if(!fN(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL type.`);return e}function rc(e){return(0,pu.instanceOf)(e,aN)}function E6(e){if(!rc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function hl(e){return(0,pu.instanceOf)(e,sN)}function h6(e){if(!hl(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Object type.`);return e}function ic(e){return(0,pu.instanceOf)(e,oN)}function y6(e){if(!ic(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Interface type.`);return e}function ac(e){return(0,pu.instanceOf)(e,uN)}function I6(e){if(!ac(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Union type.`);return e}function sc(e){return(0,pu.instanceOf)(e,cN)}function g6(e){if(!sc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Enum type.`);return e}function Zd(e){return(0,pu.instanceOf)(e,lN)}function _6(e){if(!Zd(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function pN(e){return(0,pu.instanceOf)(e,rN)}function v6(e){if(!pN(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL List type.`);return e}function mu(e){return(0,pu.instanceOf)(e,iN)}function O6(e){if(!mu(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function PI(e){return rc(e)||sc(e)||Zd(e)||ef(e)&&PI(e.ofType)}function S6(e){if(!PI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL input type.`);return e}function FI(e){return rc(e)||hl(e)||ic(e)||ac(e)||sc(e)||ef(e)&&FI(e.ofType)}function D6(e){if(!FI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL output type.`);return e}function LF(e){return rc(e)||sc(e)}function b6(e){if(!LF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL leaf type.`);return e}function CF(e){return hl(e)||ic(e)||ac(e)}function A6(e){if(!CF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL composite type.`);return e}function BF(e){return ic(e)||ac(e)}function R6(e){if(!BF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL abstract type.`);return e}var rN=class{constructor(t){fN(t)||(0,pr.devAssert)(!1,`Expected ${(0,Nn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Qe.GraphQLList=rN;var iN=class{constructor(t){wI(t)||(0,pr.devAssert)(!1,`Expected ${(0,Nn.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};Qe.GraphQLNonNull=iN;function ef(e){return pN(e)||mu(e)}function P6(e){if(!ef(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function wI(e){return fN(e)&&!mu(e)}function F6(e){if(!wI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL nullable type.`);return e}function w6(e){if(e)return mu(e)?e.ofType:e}function UF(e){return rc(e)||hl(e)||ic(e)||ac(e)||sc(e)||Zd(e)}function L6(e){if(!UF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL named type.`);return e}function C6(e){if(e){let t=e;for(;ef(t);)t=t.ofType;return t}}function LI(e){return typeof e=="function"?e():e}function CI(e){return typeof e=="function"?e():e}var aN=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:RF.identityFunc;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:RF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,l)=>o((0,N6.valueFromASTUntyped)(c,l)),this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,pr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Nn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,pr.devAssert)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLScalarType=aN;var sN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>MF(t),this._interfaces=()=>kF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Nn.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:qF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLObjectType=sN;function kF(e){var t;let n=LI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,pr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function MF(e){let t=CI(e.fields);return El(t)||(0,pr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,dN.mapValue)(t,(n,r)=>{var i;El(n)||(0,pr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,pr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,Nn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return El(a)||(0,pr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,Ma.assertName)(r),description:n.description,type:n.type,args:xF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,ka.toObjMap)(n.extensions),astNode:n.astNode}})}function xF(e){return Object.entries(e).map(([t,n])=>({name:(0,Ma.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,ka.toObjMap)(n.extensions),astNode:n.astNode}))}function El(e){return(0,d6.isObjectLike)(e)&&!Array.isArray(e)}function qF(e){return(0,dN.mapValue)(e,t=>({description:t.description,type:t.type,args:VF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function VF(e){return(0,wF.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function B6(e){return mu(e.type)&&e.defaultValue===void 0}var oN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=MF.bind(void 0,t),this._interfaces=kF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Nn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:qF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLInterfaceType=oN;var uN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=U6.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Nn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLUnionType=uN;function U6(e){let t=LI(e.types);return Array.isArray(t)||(0,pr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var cN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:FF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=FF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,f6.keyMap)(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new Xd.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Nn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,Nn.inspect)(t);throw new Xd.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+nN(this,r))}let n=this.getValue(t);if(n==null)throw new Xd.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+nN(this,t));return n.value}parseLiteral(t,n){if(t.kind!==m6.Kind.ENUM){let i=(0,PF.print)(t);throw new Xd.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+nN(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,PF.print)(t);throw new Xd.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+nN(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,wF.keyValMap)(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLEnumType=cN;function nN(e,t){let n=e.getValues().map(i=>i.name),r=(0,p6.suggestionList)(t,n);return(0,l6.didYouMean)("the enum value",r)}function FF(e,t){return El(t)||(0,pr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(El(r)||(0,pr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,Nn.inspect)(r)}.`),{name:(0,Ma.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,ka.toObjMap)(r.extensions),astNode:r.astNode}))}var lN=class{constructor(t){var n,r;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=k6.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,dN.mapValue)(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLInputObjectType=lN;function k6(e){let t=CI(e.fields);return El(t)||(0,pr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,dN.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,pr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Ma.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,ka.toObjMap)(n.extensions),astNode:n.astNode}))}function M6(e){return mu(e.type)&&e.defaultValue===void 0}});var nf=w(tf=>{"use strict";m();T();N();Object.defineProperty(tf,"__esModule",{value:!0});tf.doTypesOverlap=x6;tf.isEqualType=BI;tf.isTypeSubTypeOf=mN;var Ar=Lt();function BI(e,t){return e===t?!0:(0,Ar.isNonNullType)(e)&&(0,Ar.isNonNullType)(t)||(0,Ar.isListType)(e)&&(0,Ar.isListType)(t)?BI(e.ofType,t.ofType):!1}function mN(e,t,n){return t===n?!0:(0,Ar.isNonNullType)(n)?(0,Ar.isNonNullType)(t)?mN(e,t.ofType,n.ofType):!1:(0,Ar.isNonNullType)(t)?mN(e,t.ofType,n):(0,Ar.isListType)(n)?(0,Ar.isListType)(t)?mN(e,t.ofType,n.ofType):!1:(0,Ar.isListType)(t)?!1:(0,Ar.isAbstractType)(n)&&((0,Ar.isInterfaceType)(t)||(0,Ar.isObjectType)(t))&&e.isSubType(n,t)}function x6(e,t,n){return t===n?!0:(0,Ar.isAbstractType)(t)?(0,Ar.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,Ar.isAbstractType)(n)?e.isSubType(n,t):!1}});var xa=w(ir=>{"use strict";m();T();N();Object.defineProperty(ir,"__esModule",{value:!0});ir.GraphQLString=ir.GraphQLInt=ir.GraphQLID=ir.GraphQLFloat=ir.GraphQLBoolean=ir.GRAPHQL_MIN_INT=ir.GRAPHQL_MAX_INT=void 0;ir.isSpecifiedScalarType=q6;ir.specifiedScalarTypes=void 0;var ua=Wt(),jF=Ba(),mr=ze(),oc=wt(),rf=pi(),af=Lt(),NN=2147483647;ir.GRAPHQL_MAX_INT=NN;var TN=-2147483648;ir.GRAPHQL_MIN_INT=TN;var KF=new af.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=sf(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new mr.GraphQLError(`Int cannot represent non-integer value: ${(0,ua.inspect)(t)}`);if(n>NN||nNN||eNN||te.name===t)}function sf(e){if((0,jF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,jF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Wr=w(jn=>{"use strict";m();T();N();Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphQLSpecifiedByDirective=jn.GraphQLSkipDirective=jn.GraphQLOneOfDirective=jn.GraphQLIncludeDirective=jn.GraphQLDirective=jn.GraphQLDeprecatedDirective=jn.DEFAULT_DEPRECATION_REASON=void 0;jn.assertDirective=Q6;jn.isDirective=zF;jn.isSpecifiedDirective=Y6;jn.specifiedDirectives=void 0;var HF=qr(),V6=Wt(),j6=Qd(),K6=Ba(),G6=Wm(),Pi=pl(),$6=Wd(),of=Lt(),EN=xa();function zF(e){return(0,j6.instanceOf)(e,vs)}function Q6(e){if(!zF(e))throw new Error(`Expected ${(0,V6.inspect)(e)} to be a GraphQL directive.`);return e}var vs=class{constructor(t){var n,r;this.name=(0,$6.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=(0,G6.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,HF.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,K6.isObjectLike)(i)&&!Array.isArray(i)||(0,HF.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,of.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,of.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};jn.GraphQLDirective=vs;var WF=new vs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Pi.DirectiveLocation.FIELD,Pi.DirectiveLocation.FRAGMENT_SPREAD,Pi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new of.GraphQLNonNull(EN.GraphQLBoolean),description:"Included when true."}}});jn.GraphQLIncludeDirective=WF;var XF=new vs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Pi.DirectiveLocation.FIELD,Pi.DirectiveLocation.FRAGMENT_SPREAD,Pi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new of.GraphQLNonNull(EN.GraphQLBoolean),description:"Skipped when true."}}});jn.GraphQLSkipDirective=XF;var ZF="No longer supported";jn.DEFAULT_DEPRECATION_REASON=ZF;var ew=new vs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Pi.DirectiveLocation.FIELD_DEFINITION,Pi.DirectiveLocation.ARGUMENT_DEFINITION,Pi.DirectiveLocation.INPUT_FIELD_DEFINITION,Pi.DirectiveLocation.ENUM_VALUE],args:{reason:{type:EN.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ZF}}});jn.GraphQLDeprecatedDirective=ew;var tw=new vs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Pi.DirectiveLocation.SCALAR],args:{url:{type:new of.GraphQLNonNull(EN.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});jn.GraphQLSpecifiedByDirective=tw;var nw=new vs({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Pi.DirectiveLocation.INPUT_OBJECT],args:{}});jn.GraphQLOneOfDirective=nw;var rw=Object.freeze([WF,XF,ew,tw,nw]);jn.specifiedDirectives=rw;function Y6(e){return rw.some(({name:t})=>t===e.name)}});var hN=w(UI=>{"use strict";m();T();N();Object.defineProperty(UI,"__esModule",{value:!0});UI.isIterableObject=J6;function J6(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var lf=w(kI=>{"use strict";m();T();N();Object.defineProperty(kI,"__esModule",{value:!0});kI.astFromValue=cf;var iw=Wt(),H6=br(),z6=hN(),W6=Ba(),Fi=wt(),uf=Lt(),X6=xa();function cf(e,t){if((0,uf.isNonNullType)(t)){let n=cf(e,t.ofType);return(n==null?void 0:n.kind)===Fi.Kind.NULL?null:n}if(e===null)return{kind:Fi.Kind.NULL};if(e===void 0)return null;if((0,uf.isListType)(t)){let n=t.ofType;if((0,z6.isIterableObject)(e)){let r=[];for(let i of e){let a=cf(i,n);a!=null&&r.push(a)}return{kind:Fi.Kind.LIST,values:r}}return cf(e,n)}if((0,uf.isInputObjectType)(t)){if(!(0,W6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=cf(e[r.name],r.type);i&&n.push({kind:Fi.Kind.OBJECT_FIELD,name:{kind:Fi.Kind.NAME,value:r.name},value:i})}return{kind:Fi.Kind.OBJECT,fields:n}}if((0,uf.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Fi.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return aw.test(r)?{kind:Fi.Kind.INT,value:r}:{kind:Fi.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,uf.isEnumType)(t)?{kind:Fi.Kind.ENUM,value:n}:t===X6.GraphQLID&&aw.test(n)?{kind:Fi.Kind.INT,value:n}:{kind:Fi.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,iw.inspect)(n)}.`)}(0,H6.invariant)(!1,"Unexpected input type: "+(0,iw.inspect)(t))}var aw=/^-?(?:0|[1-9][0-9]*)$/});var Li=w(Xt=>{"use strict";m();T();N();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.introspectionTypes=Xt.__TypeKind=Xt.__Type=Xt.__Schema=Xt.__InputValue=Xt.__Field=Xt.__EnumValue=Xt.__DirectiveLocation=Xt.__Directive=Xt.TypeNameMetaFieldDef=Xt.TypeMetaFieldDef=Xt.TypeKind=Xt.SchemaMetaFieldDef=void 0;Xt.isIntrospectionType=sz;var Z6=Wt(),ez=br(),ar=pl(),tz=pi(),nz=lf(),ke=Lt(),ln=xa(),MI=new ke.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:ln.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(wi))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(wi),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:wi,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:wi,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(xI))),resolve:e=>e.getDirectives()}})});Xt.__Schema=MI;var xI=new ke.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +}`)}function At(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function tN(e){return At(" ",e.replace(/\n/g,` + `))}function bF(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` +`)))!==null&&t!==void 0?t:!1}});var PI=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.valueFromASTUntyped=AI;var l6=zd(),_s=wt();function AI(e,t){switch(e.kind){case _s.Kind.NULL:return null;case _s.Kind.INT:return parseInt(e.value,10);case _s.Kind.FLOAT:return parseFloat(e.value);case _s.Kind.STRING:case _s.Kind.ENUM:case _s.Kind.BOOLEAN:return e.value;case _s.Kind.LIST:return e.values.map(n=>AI(n,t));case _s.Kind.OBJECT:return(0,l6.keyValMap)(e.fields,n=>n.name.value,n=>AI(n.value,t));case _s.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var Xd=w(rN=>{"use strict";m();T();N();Object.defineProperty(rN,"__esModule",{value:!0});rN.assertEnumValueName=d6;rN.assertName=PF;var AF=qr(),nN=ze(),RF=Gm();function PF(e){if(e!=null||(0,AF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,AF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new nN.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.GraphQLUnionType=Qe.GraphQLScalarType=Qe.GraphQLObjectType=Qe.GraphQLNonNull=Qe.GraphQLList=Qe.GraphQLInterfaceType=Qe.GraphQLInputObjectType=Qe.GraphQLEnumType=void 0;Qe.argsToArgsConfig=KF;Qe.assertAbstractType=F6;Qe.assertCompositeType=P6;Qe.assertEnumType=v6;Qe.assertInputObjectType=O6;Qe.assertInputType=b6;Qe.assertInterfaceType=g6;Qe.assertLeafType=R6;Qe.assertListType=S6;Qe.assertNamedType=B6;Qe.assertNonNullType=D6;Qe.assertNullableType=L6;Qe.assertObjectType=I6;Qe.assertOutputType=A6;Qe.assertScalarType=y6;Qe.assertType=h6;Qe.assertUnionType=_6;Qe.assertWrappingType=w6;Qe.defineArguments=VF;Qe.getNamedType=U6;Qe.getNullableType=C6;Qe.isAbstractType=kF;Qe.isCompositeType=UF;Qe.isEnumType=oc;Qe.isInputObjectType=ef;Qe.isInputType=FI;Qe.isInterfaceType=ac;Qe.isLeafType=BF;Qe.isListType=NN;Qe.isNamedType=MF;Qe.isNonNullType=Nu;Qe.isNullableType=LI;Qe.isObjectType=yl;Qe.isOutputType=wI;Qe.isRequiredArgument=k6;Qe.isRequiredInputField=q6;Qe.isScalarType=ic;Qe.isType=mN;Qe.isUnionType=sc;Qe.isWrappingType=tf;Qe.resolveObjMapThunk=BI;Qe.resolveReadonlyArrayThunk=CI;var pr=qr(),f6=lu(),FF=vF(),Nn=Wt(),mu=Yd(),p6=Ba(),m6=du(),CF=zd(),pN=yI(),N6=fu(),ka=Zm(),Zd=ze(),T6=wt(),wF=pi(),E6=PI(),Ma=Xd();function mN(e){return ic(e)||yl(e)||ac(e)||sc(e)||oc(e)||ef(e)||NN(e)||Nu(e)}function h6(e){if(!mN(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL type.`);return e}function ic(e){return(0,mu.instanceOf)(e,oN)}function y6(e){if(!ic(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function yl(e){return(0,mu.instanceOf)(e,uN)}function I6(e){if(!yl(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Object type.`);return e}function ac(e){return(0,mu.instanceOf)(e,cN)}function g6(e){if(!ac(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Interface type.`);return e}function sc(e){return(0,mu.instanceOf)(e,lN)}function _6(e){if(!sc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Union type.`);return e}function oc(e){return(0,mu.instanceOf)(e,dN)}function v6(e){if(!oc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Enum type.`);return e}function ef(e){return(0,mu.instanceOf)(e,fN)}function O6(e){if(!ef(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function NN(e){return(0,mu.instanceOf)(e,aN)}function S6(e){if(!NN(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL List type.`);return e}function Nu(e){return(0,mu.instanceOf)(e,sN)}function D6(e){if(!Nu(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function FI(e){return ic(e)||oc(e)||ef(e)||tf(e)&&FI(e.ofType)}function b6(e){if(!FI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL input type.`);return e}function wI(e){return ic(e)||yl(e)||ac(e)||sc(e)||oc(e)||tf(e)&&wI(e.ofType)}function A6(e){if(!wI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL output type.`);return e}function BF(e){return ic(e)||oc(e)}function R6(e){if(!BF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL leaf type.`);return e}function UF(e){return yl(e)||ac(e)||sc(e)}function P6(e){if(!UF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL composite type.`);return e}function kF(e){return ac(e)||sc(e)}function F6(e){if(!kF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL abstract type.`);return e}var aN=class{constructor(t){mN(t)||(0,pr.devAssert)(!1,`Expected ${(0,Nn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Qe.GraphQLList=aN;var sN=class{constructor(t){LI(t)||(0,pr.devAssert)(!1,`Expected ${(0,Nn.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};Qe.GraphQLNonNull=sN;function tf(e){return NN(e)||Nu(e)}function w6(e){if(!tf(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function LI(e){return mN(e)&&!Nu(e)}function L6(e){if(!LI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL nullable type.`);return e}function C6(e){if(e)return Nu(e)?e.ofType:e}function MF(e){return ic(e)||yl(e)||ac(e)||sc(e)||oc(e)||ef(e)}function B6(e){if(!MF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL named type.`);return e}function U6(e){if(e){let t=e;for(;tf(t);)t=t.ofType;return t}}function CI(e){return typeof e=="function"?e():e}function BI(e){return typeof e=="function"?e():e}var oN=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:FF.identityFunc;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:FF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,l)=>o((0,E6.valueFromASTUntyped)(c,l)),this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,pr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Nn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,pr.devAssert)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLScalarType=oN;var uN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>qF(t),this._interfaces=()=>xF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Nn.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:jF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLObjectType=uN;function xF(e){var t;let n=CI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,pr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function qF(e){let t=BI(e.fields);return hl(t)||(0,pr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,pN.mapValue)(t,(n,r)=>{var i;hl(n)||(0,pr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,pr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,Nn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return hl(a)||(0,pr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,Ma.assertName)(r),description:n.description,type:n.type,args:VF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,ka.toObjMap)(n.extensions),astNode:n.astNode}})}function VF(e){return Object.entries(e).map(([t,n])=>({name:(0,Ma.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,ka.toObjMap)(n.extensions),astNode:n.astNode}))}function hl(e){return(0,p6.isObjectLike)(e)&&!Array.isArray(e)}function jF(e){return(0,pN.mapValue)(e,t=>({description:t.description,type:t.type,args:KF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function KF(e){return(0,CF.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function k6(e){return Nu(e.type)&&e.defaultValue===void 0}var cN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=qF.bind(void 0,t),this._interfaces=xF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Nn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:jF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLInterfaceType=cN;var lN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=M6.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,pr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Nn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLUnionType=lN;function M6(e){let t=CI(e.types);return Array.isArray(t)||(0,pr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var dN=class{constructor(t){var n;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:LF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=LF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,m6.keyMap)(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new Zd.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Nn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,Nn.inspect)(t);throw new Zd.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+iN(this,r))}let n=this.getValue(t);if(n==null)throw new Zd.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+iN(this,t));return n.value}parseLiteral(t,n){if(t.kind!==T6.Kind.ENUM){let i=(0,wF.print)(t);throw new Zd.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+iN(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,wF.print)(t);throw new Zd.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+iN(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,CF.keyValMap)(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLEnumType=dN;function iN(e,t){let n=e.getValues().map(i=>i.name),r=(0,N6.suggestionList)(t,n);return(0,f6.didYouMean)("the enum value",r)}function LF(e,t){return hl(t)||(0,pr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(hl(r)||(0,pr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,Nn.inspect)(r)}.`),{name:(0,Ma.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,ka.toObjMap)(r.extensions),astNode:r.astNode}))}var fN=class{constructor(t){var n,r;this.name=(0,Ma.assertName)(t.name),this.description=t.description,this.extensions=(0,ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=x6.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,pN.mapValue)(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};Qe.GraphQLInputObjectType=fN;function x6(e){let t=BI(e.fields);return hl(t)||(0,pr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,pN.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,pr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Ma.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,ka.toObjMap)(n.extensions),astNode:n.astNode}))}function q6(e){return Nu(e.type)&&e.defaultValue===void 0}});var rf=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.doTypesOverlap=V6;nf.isEqualType=UI;nf.isTypeSubTypeOf=TN;var Ar=Lt();function UI(e,t){return e===t?!0:(0,Ar.isNonNullType)(e)&&(0,Ar.isNonNullType)(t)||(0,Ar.isListType)(e)&&(0,Ar.isListType)(t)?UI(e.ofType,t.ofType):!1}function TN(e,t,n){return t===n?!0:(0,Ar.isNonNullType)(n)?(0,Ar.isNonNullType)(t)?TN(e,t.ofType,n.ofType):!1:(0,Ar.isNonNullType)(t)?TN(e,t.ofType,n):(0,Ar.isListType)(n)?(0,Ar.isListType)(t)?TN(e,t.ofType,n.ofType):!1:(0,Ar.isListType)(t)?!1:(0,Ar.isAbstractType)(n)&&((0,Ar.isInterfaceType)(t)||(0,Ar.isObjectType)(t))&&e.isSubType(n,t)}function V6(e,t,n){return t===n?!0:(0,Ar.isAbstractType)(t)?(0,Ar.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,Ar.isAbstractType)(n)?e.isSubType(n,t):!1}});var xa=w(ir=>{"use strict";m();T();N();Object.defineProperty(ir,"__esModule",{value:!0});ir.GraphQLString=ir.GraphQLInt=ir.GraphQLID=ir.GraphQLFloat=ir.GraphQLBoolean=ir.GRAPHQL_MIN_INT=ir.GRAPHQL_MAX_INT=void 0;ir.isSpecifiedScalarType=j6;ir.specifiedScalarTypes=void 0;var ua=Wt(),GF=Ba(),mr=ze(),uc=wt(),af=pi(),sf=Lt(),EN=2147483647;ir.GRAPHQL_MAX_INT=EN;var hN=-2147483648;ir.GRAPHQL_MIN_INT=hN;var $F=new sf.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=of(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new mr.GraphQLError(`Int cannot represent non-integer value: ${(0,ua.inspect)(t)}`);if(n>EN||nEN||eEN||te.name===t)}function of(e){if((0,GF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,GF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Wr=w(jn=>{"use strict";m();T();N();Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphQLSpecifiedByDirective=jn.GraphQLSkipDirective=jn.GraphQLOneOfDirective=jn.GraphQLIncludeDirective=jn.GraphQLDirective=jn.GraphQLDeprecatedDirective=jn.DEFAULT_DEPRECATION_REASON=void 0;jn.assertDirective=J6;jn.isDirective=XF;jn.isSpecifiedDirective=H6;jn.specifiedDirectives=void 0;var WF=qr(),K6=Wt(),G6=Yd(),$6=Ba(),Q6=Zm(),Pi=ml(),Y6=Xd(),uf=Lt(),yN=xa();function XF(e){return(0,G6.instanceOf)(e,vs)}function J6(e){if(!XF(e))throw new Error(`Expected ${(0,K6.inspect)(e)} to be a GraphQL directive.`);return e}var vs=class{constructor(t){var n,r;this.name=(0,Y6.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=(0,Q6.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,WF.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,$6.isObjectLike)(i)&&!Array.isArray(i)||(0,WF.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,uf.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,uf.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};jn.GraphQLDirective=vs;var ZF=new vs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Pi.DirectiveLocation.FIELD,Pi.DirectiveLocation.FRAGMENT_SPREAD,Pi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new uf.GraphQLNonNull(yN.GraphQLBoolean),description:"Included when true."}}});jn.GraphQLIncludeDirective=ZF;var ew=new vs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Pi.DirectiveLocation.FIELD,Pi.DirectiveLocation.FRAGMENT_SPREAD,Pi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new uf.GraphQLNonNull(yN.GraphQLBoolean),description:"Skipped when true."}}});jn.GraphQLSkipDirective=ew;var tw="No longer supported";jn.DEFAULT_DEPRECATION_REASON=tw;var nw=new vs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Pi.DirectiveLocation.FIELD_DEFINITION,Pi.DirectiveLocation.ARGUMENT_DEFINITION,Pi.DirectiveLocation.INPUT_FIELD_DEFINITION,Pi.DirectiveLocation.ENUM_VALUE],args:{reason:{type:yN.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:tw}}});jn.GraphQLDeprecatedDirective=nw;var rw=new vs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Pi.DirectiveLocation.SCALAR],args:{url:{type:new uf.GraphQLNonNull(yN.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});jn.GraphQLSpecifiedByDirective=rw;var iw=new vs({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Pi.DirectiveLocation.INPUT_OBJECT],args:{}});jn.GraphQLOneOfDirective=iw;var aw=Object.freeze([ZF,ew,nw,rw,iw]);jn.specifiedDirectives=aw;function H6(e){return aw.some(({name:t})=>t===e.name)}});var IN=w(kI=>{"use strict";m();T();N();Object.defineProperty(kI,"__esModule",{value:!0});kI.isIterableObject=z6;function z6(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var df=w(MI=>{"use strict";m();T();N();Object.defineProperty(MI,"__esModule",{value:!0});MI.astFromValue=lf;var sw=Wt(),W6=br(),X6=IN(),Z6=Ba(),Fi=wt(),cf=Lt(),ez=xa();function lf(e,t){if((0,cf.isNonNullType)(t)){let n=lf(e,t.ofType);return(n==null?void 0:n.kind)===Fi.Kind.NULL?null:n}if(e===null)return{kind:Fi.Kind.NULL};if(e===void 0)return null;if((0,cf.isListType)(t)){let n=t.ofType;if((0,X6.isIterableObject)(e)){let r=[];for(let i of e){let a=lf(i,n);a!=null&&r.push(a)}return{kind:Fi.Kind.LIST,values:r}}return lf(e,n)}if((0,cf.isInputObjectType)(t)){if(!(0,Z6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=lf(e[r.name],r.type);i&&n.push({kind:Fi.Kind.OBJECT_FIELD,name:{kind:Fi.Kind.NAME,value:r.name},value:i})}return{kind:Fi.Kind.OBJECT,fields:n}}if((0,cf.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Fi.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return ow.test(r)?{kind:Fi.Kind.INT,value:r}:{kind:Fi.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,cf.isEnumType)(t)?{kind:Fi.Kind.ENUM,value:n}:t===ez.GraphQLID&&ow.test(n)?{kind:Fi.Kind.INT,value:n}:{kind:Fi.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,sw.inspect)(n)}.`)}(0,W6.invariant)(!1,"Unexpected input type: "+(0,sw.inspect)(t))}var ow=/^-?(?:0|[1-9][0-9]*)$/});var Li=w(Xt=>{"use strict";m();T();N();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.introspectionTypes=Xt.__TypeKind=Xt.__Type=Xt.__Schema=Xt.__InputValue=Xt.__Field=Xt.__EnumValue=Xt.__DirectiveLocation=Xt.__Directive=Xt.TypeNameMetaFieldDef=Xt.TypeMetaFieldDef=Xt.TypeKind=Xt.SchemaMetaFieldDef=void 0;Xt.isIntrospectionType=uz;var tz=Wt(),nz=br(),ar=ml(),rz=pi(),iz=df(),ke=Lt(),ln=xa(),xI=new ke.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:ln.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(wi))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(wi),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:wi,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:wi,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(qI))),resolve:e=>e.getDirectives()}})});Xt.__Schema=xI;var qI=new ke.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(qI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(df))),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Xt.__Directive=xI;var qI=new ke.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:ar.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ar.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ar.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ar.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ar.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ar.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ar.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ar.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ar.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ar.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ar.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ar.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ar.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ar.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ar.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ar.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ar.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ar.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ar.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Xt.__DirectiveLocation=qI;var wi=new ke.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ke.GraphQLNonNull(KI),resolve(e){if((0,ke.isScalarType)(e))return sr.SCALAR;if((0,ke.isObjectType)(e))return sr.OBJECT;if((0,ke.isInterfaceType)(e))return sr.INTERFACE;if((0,ke.isUnionType)(e))return sr.UNION;if((0,ke.isEnumType)(e))return sr.ENUM;if((0,ke.isInputObjectType)(e))return sr.INPUT_OBJECT;if((0,ke.isListType)(e))return sr.LIST;if((0,ke.isNonNullType)(e))return sr.NON_NULL;(0,ez.invariant)(!1,`Unexpected type: "${(0,Z6.inspect)(e)}".`)}},name:{type:ln.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:ln.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:ln.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(VI)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new ke.GraphQLList(new ke.GraphQLNonNull(wi)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(wi)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(jI)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(df)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:wi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:ln.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Xt.__Type=wi;var VI=new ke.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(df))),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(wi),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__Field=VI;var df=new ke.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(wi),resolve:e=>e.type},defaultValue:{type:ln.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,nz.astFromValue)(n,t);return r?(0,tz.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__InputValue=df;var jI=new ke.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__EnumValue=jI;var sr;Xt.TypeKind=sr;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(sr||(Xt.TypeKind=sr={}));var KI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:sr.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:sr.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:sr.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:sr.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:sr.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:sr.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:sr.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:sr.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Xt.__TypeKind=KI;var rz={name:"__schema",type:new ke.GraphQLNonNull(MI),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.SchemaMetaFieldDef=rz;var iz={name:"__type",type:wi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(ln.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeMetaFieldDef=iz;var az={name:"__typename",type:new ke.GraphQLNonNull(ln.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeNameMetaFieldDef=az;var sw=Object.freeze([MI,xI,qI,wi,VI,df,jI,KI]);Xt.introspectionTypes=sw;function sz(e){return sw.some(({name:t})=>e.name===t)}});var uc=w(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.GraphQLSchema=void 0;yl.assertSchema=dz;yl.isSchema=uw;var yN=qr(),$I=Wt(),oz=Qd(),uz=Ba(),cz=Wm(),GI=Ua(),ca=Lt(),ow=Wr(),lz=Li();function uw(e){return(0,oz.instanceOf)(e,IN)}function dz(e){if(!uw(e))throw new Error(`Expected ${(0,$I.inspect)(e)} to be a GraphQL schema.`);return e}var IN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,uz.isObjectLike)(t)||(0,yN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,yN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,$I.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,yN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,$I.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,cz.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:ow.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),la(a,i);this._queryType!=null&&la(this._queryType,i),this._mutationType!=null&&la(this._mutationType,i),this._subscriptionType!=null&&la(this._subscriptionType,i);for(let a of this._directives)if((0,ow.isDirective)(a))for(let o of a.args)la(o.type,i);la(lz.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let a of i){if(a==null)continue;let o=a.name;if(o||(0,yN.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=a,(0,ca.isInterfaceType)(a)){for(let c of a.getInterfaces())if((0,ca.isInterfaceType)(c)){let l=this._implementationsMap[c.name];l===void 0&&(l=this._implementationsMap[c.name]={objects:[],interfaces:[]}),l.interfaces.push(a)}}else if((0,ca.isObjectType)(a)){for(let c of a.getInterfaces())if((0,ca.isInterfaceType)(c)){let l=this._implementationsMap[c.name];l===void 0&&(l=this._implementationsMap[c.name]={objects:[],interfaces:[]}),l.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case GI.OperationTypeNode.QUERY:return this.getQueryType();case GI.OperationTypeNode.MUTATION:return this.getMutationType();case GI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,ca.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n!=null?n:{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),(0,ca.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let a of i.objects)r[a.name]=!0;for(let a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}};yl.GraphQLSchema=IN;function la(e,t){let n=(0,ca.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,ca.isUnionType)(n))for(let r of n.getTypes())la(r,t);else if((0,ca.isObjectType)(n)||(0,ca.isInterfaceType)(n)){for(let r of n.getInterfaces())la(r,t);for(let r of Object.values(n.getFields())){la(r.type,t);for(let i of r.args)la(i.type,t)}}else if((0,ca.isInputObjectType)(n))for(let r of Object.values(n.getFields()))la(r.type,t)}return t}});var pf=w(gN=>{"use strict";m();T();N();Object.defineProperty(gN,"__esModule",{value:!0});gN.assertValidSchema=Nz;gN.validateSchema=mw;var Rr=Wt(),fz=ze(),QI=Ua(),cw=nf(),Bn=Lt(),pw=Wr(),pz=Li(),mz=uc();function mw(e){if((0,mz.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new JI(e);Tz(t),Ez(t),hz(t);let n=t.getErrors();return e.__validationErrors=n,n}function Nz(e){let t=mw(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(VI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(ff))),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Xt.__Directive=qI;var VI=new ke.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:ar.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ar.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ar.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ar.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ar.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ar.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ar.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ar.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ar.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ar.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ar.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ar.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ar.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ar.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ar.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ar.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ar.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ar.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ar.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Xt.__DirectiveLocation=VI;var wi=new ke.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ke.GraphQLNonNull(GI),resolve(e){if((0,ke.isScalarType)(e))return sr.SCALAR;if((0,ke.isObjectType)(e))return sr.OBJECT;if((0,ke.isInterfaceType)(e))return sr.INTERFACE;if((0,ke.isUnionType)(e))return sr.UNION;if((0,ke.isEnumType)(e))return sr.ENUM;if((0,ke.isInputObjectType)(e))return sr.INPUT_OBJECT;if((0,ke.isListType)(e))return sr.LIST;if((0,ke.isNonNullType)(e))return sr.NON_NULL;(0,nz.invariant)(!1,`Unexpected type: "${(0,tz.inspect)(e)}".`)}},name:{type:ln.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:ln.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:ln.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(jI)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new ke.GraphQLList(new ke.GraphQLNonNull(wi)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(wi)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(KI)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(ff)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:wi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:ln.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Xt.__Type=wi;var jI=new ke.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(ff))),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(wi),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__Field=jI;var ff=new ke.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(wi),resolve:e=>e.type},defaultValue:{type:ln.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,iz.astFromValue)(n,t);return r?(0,rz.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__InputValue=ff;var KI=new ke.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ke.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__EnumValue=KI;var sr;Xt.TypeKind=sr;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(sr||(Xt.TypeKind=sr={}));var GI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:sr.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:sr.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:sr.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:sr.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:sr.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:sr.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:sr.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:sr.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Xt.__TypeKind=GI;var az={name:"__schema",type:new ke.GraphQLNonNull(xI),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.SchemaMetaFieldDef=az;var sz={name:"__type",type:wi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(ln.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeMetaFieldDef=sz;var oz={name:"__typename",type:new ke.GraphQLNonNull(ln.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeNameMetaFieldDef=oz;var uw=Object.freeze([xI,qI,VI,wi,jI,ff,KI,GI]);Xt.introspectionTypes=uw;function uz(e){return uw.some(({name:t})=>e.name===t)}});var cc=w(Il=>{"use strict";m();T();N();Object.defineProperty(Il,"__esModule",{value:!0});Il.GraphQLSchema=void 0;Il.assertSchema=pz;Il.isSchema=lw;var gN=qr(),QI=Wt(),cz=Yd(),lz=Ba(),dz=Zm(),$I=Ua(),ca=Lt(),cw=Wr(),fz=Li();function lw(e){return(0,cz.instanceOf)(e,_N)}function pz(e){if(!lw(e))throw new Error(`Expected ${(0,QI.inspect)(e)} to be a GraphQL schema.`);return e}var _N=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,lz.isObjectLike)(t)||(0,gN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,gN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,QI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,gN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,QI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,dz.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:cw.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),la(a,i);this._queryType!=null&&la(this._queryType,i),this._mutationType!=null&&la(this._mutationType,i),this._subscriptionType!=null&&la(this._subscriptionType,i);for(let a of this._directives)if((0,cw.isDirective)(a))for(let o of a.args)la(o.type,i);la(fz.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let a of i){if(a==null)continue;let o=a.name;if(o||(0,gN.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=a,(0,ca.isInterfaceType)(a)){for(let c of a.getInterfaces())if((0,ca.isInterfaceType)(c)){let l=this._implementationsMap[c.name];l===void 0&&(l=this._implementationsMap[c.name]={objects:[],interfaces:[]}),l.interfaces.push(a)}}else if((0,ca.isObjectType)(a)){for(let c of a.getInterfaces())if((0,ca.isInterfaceType)(c)){let l=this._implementationsMap[c.name];l===void 0&&(l=this._implementationsMap[c.name]={objects:[],interfaces:[]}),l.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case $I.OperationTypeNode.QUERY:return this.getQueryType();case $I.OperationTypeNode.MUTATION:return this.getMutationType();case $I.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,ca.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n!=null?n:{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),(0,ca.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let a of i.objects)r[a.name]=!0;for(let a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}};Il.GraphQLSchema=_N;function la(e,t){let n=(0,ca.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,ca.isUnionType)(n))for(let r of n.getTypes())la(r,t);else if((0,ca.isObjectType)(n)||(0,ca.isInterfaceType)(n)){for(let r of n.getInterfaces())la(r,t);for(let r of Object.values(n.getFields())){la(r.type,t);for(let i of r.args)la(i.type,t)}}else if((0,ca.isInputObjectType)(n))for(let r of Object.values(n.getFields()))la(r.type,t)}return t}});var mf=w(vN=>{"use strict";m();T();N();Object.defineProperty(vN,"__esModule",{value:!0});vN.assertValidSchema=Ez;vN.validateSchema=Tw;var Rr=Wt(),mz=ze(),YI=Ua(),dw=rf(),Bn=Lt(),Nw=Wr(),Nz=Li(),Tz=cc();function Tw(e){if((0,Tz.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new HI(e);hz(t),yz(t),Iz(t);let n=t.getErrors();return e.__validationErrors=n,n}function Ez(e){let t=Tw(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var JI=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new fz.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function Tz(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Bn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,Rr.inspect)(n)}.`,(r=YI(t,QI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Bn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,Rr.inspect)(i)}.`,(a=YI(t,QI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Bn.isObjectType)(o)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,Rr.inspect)(o)}.`,(c=YI(t,QI.OperationTypeNode.SUBSCRIPTION))!==null&&c!==void 0?c:o.astNode)}}function YI(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function Ez(e){for(let n of e.schema.getDirectives()){if(!(0,pw.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,Rr.inspect)(n)}.`,n==null?void 0:n.astNode);continue}cc(e,n);for(let r of n.args)if(cc(e,r),(0,Bn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,Rr.inspect)(r.type)}.`,r.astNode),(0,Bn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[HI(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function cc(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function hz(e){let t=Sz(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Bn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,Rr.inspect)(r)}.`,r.astNode);continue}(0,pz.isIntrospectionType)(r)||cc(e,r),(0,Bn.isObjectType)(r)||(0,Bn.isInterfaceType)(r)?(lw(e,r),dw(e,r)):(0,Bn.isUnionType)(r)?gz(e,r):(0,Bn.isEnumType)(r)?_z(e,r):(0,Bn.isInputObjectType)(r)&&(vz(e,r),t(r))}}function lw(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(cc(e,o),!(0,Bn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,Rr.inspect)(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let c of o.args){let l=c.name;if(cc(e,c),!(0,Bn.isInputType)(c.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,Rr.inspect)(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if((0,Bn.isRequiredArgument)(c)&&c.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[HI(c.astNode),(a=c.astNode)===null||a===void 0?void 0:a.type])}}}}function dw(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Bn.isInterfaceType)(r)){e.reportError(`Type ${(0,Rr.inspect)(t)} must only implement Interface types, it cannot implement ${(0,Rr.inspect)(r)}.`,ff(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,ff(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,ff(t,r));continue}n[r.name]=!0,Iz(e,t,r),yz(e,t,r)}}function yz(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,p=r[d];if(!p){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,cw.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,Rr.inspect)(l.type)} but ${t.name}.${d} is type ${(0,Rr.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(let E of l.args){let I=E.name,v=p.args.find(A=>A.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[E.astNode,p.astNode]);continue}if(!(0,cw.isEqualType)(E.type,v.type)){var o,c;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,Rr.inspect)(E.type)} but ${t.name}.${d}(${I}:) is type ${(0,Rr.inspect)(v.type)}.`,[(o=E.astNode)===null||o===void 0?void 0:o.type,(c=v.astNode)===null||c===void 0?void 0:c.type])}}for(let E of p.args){let I=E.name;!l.args.find(A=>A.name===I)&&(0,Bn.isRequiredArgument)(E)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[E.astNode,l.astNode])}}}function Iz(e,t,n){let r=t.getInterfaces();for(let i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...ff(n,i),...ff(t,n)])}function gz(e,t){let n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,fw(t,i.name));continue}r[i.name]=!0,(0,Bn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,Rr.inspect)(i)}.`,fw(t,String(i)))}}function _z(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)cc(e,r)}function vz(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of n){if(cc(e,a),!(0,Bn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,Rr.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Bn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[HI(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&Oz(t,a,e)}}function Oz(e,t,n){if((0,Bn.isNonNullType)(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function Sz(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;let o=Object.values(a.getFields());for(let c of o)if((0,Bn.isNonNullType)(c.type)&&(0,Bn.isInputObjectType)(c.type.ofType)){let l=c.type.ofType,d=r[l.name];if(n.push(c),d===void 0)i(l);else{let p=n.slice(d),E=p.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${E}".`,p.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function ff(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.interfaces)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t.name)}function fw(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.types)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t)}function HI(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===pw.GraphQLDeprecatedDirective.name)}});var qa=w(XI=>{"use strict";m();T();N();Object.defineProperty(XI,"__esModule",{value:!0});XI.typeFromAST=WI;var zI=wt(),Nw=Lt();function WI(e,t){switch(t.kind){case zI.Kind.LIST_TYPE:{let n=WI(e,t.type);return n&&new Nw.GraphQLList(n)}case zI.Kind.NON_NULL_TYPE:{let n=WI(e,t.type);return n&&new Nw.GraphQLNonNull(n)}case zI.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var _N=w(mf=>{"use strict";m();T();N();Object.defineProperty(mf,"__esModule",{value:!0});mf.TypeInfo=void 0;mf.visitWithTypeInfo=Az;var Dz=Ua(),Un=wt(),Tw=nc(),kn=Lt(),Il=Li(),Ew=qa(),ZI=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r!=null?r:bz,n&&((0,kn.isInputType)(n)&&this._inputTypeStack.push(n),(0,kn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,kn.isOutputType)(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){let n=this._schema;switch(t.kind){case Un.Kind.SELECTION_SET:{let i=(0,kn.getNamedType)(this.getType());this._parentTypeStack.push((0,kn.isCompositeType)(i)?i:void 0);break}case Un.Kind.FIELD:{let i=this.getParentType(),a,o;i&&(a=this._getFieldDef(n,i,t),a&&(o=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,kn.isOutputType)(o)?o:void 0);break}case Un.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Un.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,kn.isObjectType)(i)?i:void 0);break}case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,Ew.typeFromAST)(n,i):(0,kn.getNamedType)(this.getType());this._typeStack.push((0,kn.isOutputType)(a)?a:void 0);break}case Un.Kind.VARIABLE_DEFINITION:{let i=(0,Ew.typeFromAST)(n,t.type);this._inputTypeStack.push((0,kn.isInputType)(i)?i:void 0);break}case Un.Kind.ARGUMENT:{var r;let i,a,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(c=>c.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.LIST:{let i=(0,kn.getNullableType)(this.getInputType()),a=(0,kn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.OBJECT_FIELD:{let i=(0,kn.getNamedType)(this.getInputType()),a,o;(0,kn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.ENUM:{let i=(0,kn.getNamedType)(this.getInputType()),a;(0,kn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Un.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Un.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Un.Kind.DIRECTIVE:this._directive=null;break;case Un.Kind.OPERATION_DEFINITION:case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Un.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Un.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.LIST:case Un.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.ENUM:this._enumValue=null;break;default:}}};mf.TypeInfo=ZI;function bz(e,t,n){let r=n.name.value;if(r===Il.SchemaMetaFieldDef.name&&e.getQueryType()===t)return Il.SchemaMetaFieldDef;if(r===Il.TypeMetaFieldDef.name&&e.getQueryType()===t)return Il.TypeMetaFieldDef;if(r===Il.TypeNameMetaFieldDef.name&&(0,kn.isCompositeType)(t))return Il.TypeNameMetaFieldDef;if((0,kn.isObjectType)(t)||(0,kn.isInterfaceType)(t))return t.getFields()[r]}function Az(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,Tw.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,Dz.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,Tw.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var lc=w(Ci=>{"use strict";m();T();N();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.isConstValueNode=eg;Ci.isDefinitionNode=Rz;Ci.isExecutableDefinitionNode=hw;Ci.isSelectionNode=Pz;Ci.isTypeDefinitionNode=gw;Ci.isTypeExtensionNode=vw;Ci.isTypeNode=Fz;Ci.isTypeSystemDefinitionNode=Iw;Ci.isTypeSystemExtensionNode=_w;Ci.isValueNode=yw;var Ct=wt();function Rz(e){return hw(e)||Iw(e)||_w(e)}function hw(e){return e.kind===Ct.Kind.OPERATION_DEFINITION||e.kind===Ct.Kind.FRAGMENT_DEFINITION}function Pz(e){return e.kind===Ct.Kind.FIELD||e.kind===Ct.Kind.FRAGMENT_SPREAD||e.kind===Ct.Kind.INLINE_FRAGMENT}function yw(e){return e.kind===Ct.Kind.VARIABLE||e.kind===Ct.Kind.INT||e.kind===Ct.Kind.FLOAT||e.kind===Ct.Kind.STRING||e.kind===Ct.Kind.BOOLEAN||e.kind===Ct.Kind.NULL||e.kind===Ct.Kind.ENUM||e.kind===Ct.Kind.LIST||e.kind===Ct.Kind.OBJECT}function eg(e){return yw(e)&&(e.kind===Ct.Kind.LIST?e.values.some(eg):e.kind===Ct.Kind.OBJECT?e.fields.some(t=>eg(t.value)):e.kind!==Ct.Kind.VARIABLE)}function Fz(e){return e.kind===Ct.Kind.NAMED_TYPE||e.kind===Ct.Kind.LIST_TYPE||e.kind===Ct.Kind.NON_NULL_TYPE}function Iw(e){return e.kind===Ct.Kind.SCHEMA_DEFINITION||gw(e)||e.kind===Ct.Kind.DIRECTIVE_DEFINITION}function gw(e){return e.kind===Ct.Kind.SCALAR_TYPE_DEFINITION||e.kind===Ct.Kind.OBJECT_TYPE_DEFINITION||e.kind===Ct.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Ct.Kind.UNION_TYPE_DEFINITION||e.kind===Ct.Kind.ENUM_TYPE_DEFINITION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_DEFINITION}function _w(e){return e.kind===Ct.Kind.SCHEMA_EXTENSION||vw(e)}function vw(e){return e.kind===Ct.Kind.SCALAR_TYPE_EXTENSION||e.kind===Ct.Kind.OBJECT_TYPE_EXTENSION||e.kind===Ct.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Ct.Kind.UNION_TYPE_EXTENSION||e.kind===Ct.Kind.ENUM_TYPE_EXTENSION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var ng=w(tg=>{"use strict";m();T();N();Object.defineProperty(tg,"__esModule",{value:!0});tg.ExecutableDefinitionsRule=Cz;var wz=ze(),Ow=wt(),Lz=lc();function Cz(e){return{Document(t){for(let n of t.definitions)if(!(0,Lz.isExecutableDefinitionNode)(n)){let r=n.kind===Ow.Kind.SCHEMA_DEFINITION||n.kind===Ow.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new wz.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var ig=w(rg=>{"use strict";m();T();N();Object.defineProperty(rg,"__esModule",{value:!0});rg.FieldsOnCorrectTypeRule=Mz;var Sw=cu(),Bz=zd(),Uz=du(),kz=ze(),Nf=Lt();function Mz(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,Sw.didYouMean)("to use an inline fragment on",xz(i,n,a));o===""&&(o=(0,Sw.didYouMean)(qz(n,a))),e.reportError(new kz.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function xz(e,t,n){if(!(0,Nf.isAbstractType)(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let c of o.getInterfaces()){var a;c.getFields()[n]&&(r.add(c),i[c.name]=((a=i[c.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((o,c)=>{let l=i[c.name]-i[o.name];return l!==0?l:(0,Nf.isInterfaceType)(o)&&e.isSubType(o,c)?-1:(0,Nf.isInterfaceType)(c)&&e.isSubType(c,o)?1:(0,Bz.naturalCompare)(o.name,c.name)}).map(o=>o.name)}function qz(e,t){if((0,Nf.isObjectType)(e)||(0,Nf.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,Uz.suggestionList)(t,n)}return[]}});var sg=w(ag=>{"use strict";m();T();N();Object.defineProperty(ag,"__esModule",{value:!0});ag.FragmentsOnCompositeTypesRule=Vz;var Dw=ze(),bw=pi(),Aw=Lt(),Rw=qa();function Vz(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,Rw.typeFromAST)(e.getSchema(),n);if(r&&!(0,Aw.isCompositeType)(r)){let i=(0,bw.print)(n);e.reportError(new Dw.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,Rw.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,Aw.isCompositeType)(n)){let r=(0,bw.print)(t.typeCondition);e.reportError(new Dw.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var og=w(vN=>{"use strict";m();T();N();Object.defineProperty(vN,"__esModule",{value:!0});vN.KnownArgumentNamesOnDirectivesRule=Lw;vN.KnownArgumentNamesRule=Gz;var Pw=cu(),Fw=du(),ww=ze(),jz=wt(),Kz=Wr();function Gz(e){return Q(M({},Lw(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let a=t.name.value,o=r.args.map(l=>l.name),c=(0,Fw.suggestionList)(a,o);e.reportError(new ww.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,Pw.didYouMean)(c),{nodes:t}))}}})}function Lw(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Kz.specifiedDirectives;for(let o of r)t[o.name]=o.args.map(c=>c.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===jz.Kind.DIRECTIVE_DEFINITION){var a;let c=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=c.map(l=>l.name.value)}return{Directive(o){let c=o.name.value,l=t[c];if(o.arguments&&l)for(let d of o.arguments){let p=d.name.value;if(!l.includes(p)){let E=(0,Fw.suggestionList)(p,l);e.reportError(new ww.GraphQLError(`Unknown argument "${p}" on directive "@${c}".`+(0,Pw.didYouMean)(E),{nodes:d}))}}return!1}}}});var dg=w(lg=>{"use strict";m();T();N();Object.defineProperty(lg,"__esModule",{value:!0});lg.KnownDirectivesRule=Yz;var $z=Wt(),ug=br(),Cw=ze(),cg=Ua(),or=pl(),In=wt(),Qz=Wr();function Yz(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Qz.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===In.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,c,l,d){let p=a.name.value,E=t[p];if(!E){e.reportError(new Cw.GraphQLError(`Unknown directive "@${p}".`,{nodes:a}));return}let I=Jz(d);I&&!E.includes(I)&&e.reportError(new Cw.GraphQLError(`Directive "@${p}" may not be used on ${I}.`,{nodes:a}))}}}function Jz(e){let t=e[e.length-1];switch("kind"in t||(0,ug.invariant)(!1),t.kind){case In.Kind.OPERATION_DEFINITION:return Hz(t.operation);case In.Kind.FIELD:return or.DirectiveLocation.FIELD;case In.Kind.FRAGMENT_SPREAD:return or.DirectiveLocation.FRAGMENT_SPREAD;case In.Kind.INLINE_FRAGMENT:return or.DirectiveLocation.INLINE_FRAGMENT;case In.Kind.FRAGMENT_DEFINITION:return or.DirectiveLocation.FRAGMENT_DEFINITION;case In.Kind.VARIABLE_DEFINITION:return or.DirectiveLocation.VARIABLE_DEFINITION;case In.Kind.SCHEMA_DEFINITION:case In.Kind.SCHEMA_EXTENSION:return or.DirectiveLocation.SCHEMA;case In.Kind.SCALAR_TYPE_DEFINITION:case In.Kind.SCALAR_TYPE_EXTENSION:return or.DirectiveLocation.SCALAR;case In.Kind.OBJECT_TYPE_DEFINITION:case In.Kind.OBJECT_TYPE_EXTENSION:return or.DirectiveLocation.OBJECT;case In.Kind.FIELD_DEFINITION:return or.DirectiveLocation.FIELD_DEFINITION;case In.Kind.INTERFACE_TYPE_DEFINITION:case In.Kind.INTERFACE_TYPE_EXTENSION:return or.DirectiveLocation.INTERFACE;case In.Kind.UNION_TYPE_DEFINITION:case In.Kind.UNION_TYPE_EXTENSION:return or.DirectiveLocation.UNION;case In.Kind.ENUM_TYPE_DEFINITION:case In.Kind.ENUM_TYPE_EXTENSION:return or.DirectiveLocation.ENUM;case In.Kind.ENUM_VALUE_DEFINITION:return or.DirectiveLocation.ENUM_VALUE;case In.Kind.INPUT_OBJECT_TYPE_DEFINITION:case In.Kind.INPUT_OBJECT_TYPE_EXTENSION:return or.DirectiveLocation.INPUT_OBJECT;case In.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,ug.invariant)(!1),n.kind===In.Kind.INPUT_OBJECT_TYPE_DEFINITION?or.DirectiveLocation.INPUT_FIELD_DEFINITION:or.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,ug.invariant)(!1,"Unexpected kind: "+(0,$z.inspect)(t.kind))}}function Hz(e){switch(e){case cg.OperationTypeNode.QUERY:return or.DirectiveLocation.QUERY;case cg.OperationTypeNode.MUTATION:return or.DirectiveLocation.MUTATION;case cg.OperationTypeNode.SUBSCRIPTION:return or.DirectiveLocation.SUBSCRIPTION}}});var pg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.KnownFragmentNamesRule=Wz;var zz=ze();function Wz(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new zz.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var Tg=w(Ng=>{"use strict";m();T();N();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.KnownTypeNamesRule=rW;var Xz=cu(),Zz=du(),eW=ze(),mg=lc(),tW=Li(),nW=xa();function rW(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,mg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,c,l,d){let p=a.name.value;if(!n[p]&&!r[p]){var E;let I=(E=d[2])!==null&&E!==void 0?E:c,v=I!=null&&iW(I);if(v&&Bw.includes(p))return;let A=(0,Zz.suggestionList)(p,v?Bw.concat(i):i);e.reportError(new eW.GraphQLError(`Unknown type "${p}".`+(0,Xz.didYouMean)(A),{nodes:a}))}}}}var Bw=[...nW.specifiedScalarTypes,...tW.introspectionTypes].map(e=>e.name);function iW(e){return"kind"in e&&((0,mg.isTypeSystemDefinitionNode)(e)||(0,mg.isTypeSystemExtensionNode)(e))}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.LoneAnonymousOperationRule=oW;var aW=ze(),sW=wt();function oW(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===sW.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new aW.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.LoneSchemaDefinitionRule=uW;var Uw=ze();function uW(e){var t,n,r;let i=e.getSchema(),a=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition(c){if(a){e.reportError(new Uw.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:c}));return}o>0&&e.reportError(new Uw.GraphQLError("Must provide only one schema definition.",{nodes:c})),++o}}}});var _g=w(gg=>{"use strict";m();T();N();Object.defineProperty(gg,"__esModule",{value:!0});gg.MaxIntrospectionDepthRule=dW;var cW=ze(),kw=wt(),lW=3;function dW(e){function t(n,r=Object.create(null),i=0){if(n.kind===kw.Kind.FRAGMENT_SPREAD){let a=n.name.value;if(r[a]===!0)return!1;let o=e.getFragment(a);if(!o)return!1;try{return r[a]=!0,t(o,r,i)}finally{r[a]=void 0}}if(n.kind===kw.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=lW))return!0;if("selectionSet"in n&&n.selectionSet){for(let a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new cW.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Og=w(vg=>{"use strict";m();T();N();Object.defineProperty(vg,"__esModule",{value:!0});vg.NoFragmentCyclesRule=pW;var fW=ze();function pW(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;let o=a.name.value;t[o]=!0;let c=e.getFragmentSpreads(a.selectionSet);if(c.length!==0){r[o]=n.length;for(let l of c){let d=l.name.value,p=r[d];if(n.push(l),p===void 0){let E=e.getFragment(d);E&&i(E)}else{let E=n.slice(p),I=E.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new fW.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:E}))}n.pop()}r[o]=void 0}}}});var Dg=w(Sg=>{"use strict";m();T();N();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.NoUndefinedVariablesRule=NW;var mW=ze();function NW(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let a=i.name.value;t[a]!==!0&&e.reportError(new mW.GraphQLError(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var Ag=w(bg=>{"use strict";m();T();N();Object.defineProperty(bg,"__esModule",{value:!0});bg.NoUnusedFragmentsRule=EW;var TW=ze();function EW(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(let i of n){let a=i.name.value;r[a]!==!0&&e.reportError(new TW.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var Pg=w(Rg=>{"use strict";m();T();N();Object.defineProperty(Rg,"__esModule",{value:!0});Rg.NoUnusedVariablesRule=yW;var hW=ze();function yW(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:a}of i)r[a.name.value]=!0;for(let a of t){let o=a.variable.name.value;r[o]!==!0&&e.reportError(new hW.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}});var Lg=w(wg=>{"use strict";m();T();N();Object.defineProperty(wg,"__esModule",{value:!0});wg.sortValueNode=Fg;var IW=zd(),Os=wt();function Fg(e){switch(e.kind){case Os.Kind.OBJECT:return Q(M({},e),{fields:gW(e.fields)});case Os.Kind.LIST:return Q(M({},e),{values:e.values.map(Fg)});case Os.Kind.INT:case Os.Kind.FLOAT:case Os.Kind.STRING:case Os.Kind.BOOLEAN:case Os.Kind.NULL:case Os.Kind.ENUM:case Os.Kind.VARIABLE:return e}}function gW(e){return e.map(t=>Q(M({},t),{value:Fg(t.value)})).sort((t,n)=>(0,IW.naturalCompare)(t.name.value,n.name.value))}});var qg=w(xg=>{"use strict";m();T();N();Object.defineProperty(xg,"__esModule",{value:!0});xg.OverlappingFieldsCanBeMergedRule=SW;var Mw=Wt(),_W=ze(),Cg=wt(),vW=pi(),Xr=Lt(),OW=Lg(),qw=qa();function Vw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Vw(n)).join(" and "):e}function SW(e){let t=new kg,n=new Map;return{SelectionSet(r){let i=DW(e,n,t,e.getParentType(),r);for(let[[a,o],c,l]of i){let d=Vw(o);e.reportError(new _W.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(l)}))}}}}function DW(e,t,n,r,i){let a=[],[o,c]=DN(e,t,r,i);if(AW(e,a,t,n,o),c.length!==0)for(let l=0;l1)for(let c=0;c[a.value,o]));return n.every(a=>{let o=a.value,c=i.get(a.name.value);return c===void 0?!1:xw(o)===xw(c)})}function xw(e){return(0,vW.print)((0,OW.sortValueNode)(e))}function Bg(e,t){return(0,Xr.isListType)(e)?(0,Xr.isListType)(t)?Bg(e.ofType,t.ofType):!0:(0,Xr.isListType)(t)?!0:(0,Xr.isNonNullType)(e)?(0,Xr.isNonNullType)(t)?Bg(e.ofType,t.ofType):!0:(0,Xr.isNonNullType)(t)?!0:(0,Xr.isLeafType)(e)||(0,Xr.isLeafType)(t)?e!==t:!1}function DN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);Kw(e,n,r,a,o);let c=[a,Object.keys(o)];return t.set(r,c),c}function Ug(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,qw.typeFromAST)(e.getSchema(),n.typeCondition);return DN(e,t,i,n.selectionSet)}function Kw(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Cg.Kind.FIELD:{let o=a.name.value,c;((0,Xr.isObjectType)(t)||(0,Xr.isInterfaceType)(t))&&(c=t.getFields()[o]);let l=a.alias?a.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,a,c]);break}case Cg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Cg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,c=o?(0,qw.typeFromAST)(e.getSchema(),o):t;Kw(e,c,a.selectionSet,r,i);break}}}function PW(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var kg=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(jg,"__esModule",{value:!0});jg.PossibleFragmentSpreadsRule=wW;var bN=Wt(),Gw=ze(),Vg=Lt(),$w=nf(),FW=qa();function wW(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Vg.isCompositeType)(n)&&(0,Vg.isCompositeType)(r)&&!(0,$w.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,bN.inspect)(r),a=(0,bN.inspect)(n);e.reportError(new Gw.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=LW(e,n),i=e.getParentType();if(r&&i&&!(0,$w.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,bN.inspect)(i),o=(0,bN.inspect)(r);e.reportError(new Gw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function LW(e,t){let n=e.getFragment(t);if(n){let r=(0,FW.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Vg.isCompositeType)(r))return r}}});var $g=w(Gg=>{"use strict";m();T();N();Object.defineProperty(Gg,"__esModule",{value:!0});Gg.PossibleTypeExtensionsRule=kW;var CW=cu(),Yw=Wt(),Jw=br(),BW=du(),Qw=ze(),On=wt(),UW=lc(),gl=Lt();function kW(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,UW.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let a=i.name.value,o=n[a],c=t==null?void 0:t.getType(a),l;if(o?l=MW[o.kind]:c&&(l=xW(c)),l){if(l!==i.kind){let d=qW(i.kind);e.reportError(new Qw.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(M(M({},n),t==null?void 0:t.getTypeMap())),p=(0,BW.suggestionList)(a,d);e.reportError(new Qw.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,CW.didYouMean)(p),{nodes:i.name}))}}}var MW={[On.Kind.SCALAR_TYPE_DEFINITION]:On.Kind.SCALAR_TYPE_EXTENSION,[On.Kind.OBJECT_TYPE_DEFINITION]:On.Kind.OBJECT_TYPE_EXTENSION,[On.Kind.INTERFACE_TYPE_DEFINITION]:On.Kind.INTERFACE_TYPE_EXTENSION,[On.Kind.UNION_TYPE_DEFINITION]:On.Kind.UNION_TYPE_EXTENSION,[On.Kind.ENUM_TYPE_DEFINITION]:On.Kind.ENUM_TYPE_EXTENSION,[On.Kind.INPUT_OBJECT_TYPE_DEFINITION]:On.Kind.INPUT_OBJECT_TYPE_EXTENSION};function xW(e){if((0,gl.isScalarType)(e))return On.Kind.SCALAR_TYPE_EXTENSION;if((0,gl.isObjectType)(e))return On.Kind.OBJECT_TYPE_EXTENSION;if((0,gl.isInterfaceType)(e))return On.Kind.INTERFACE_TYPE_EXTENSION;if((0,gl.isUnionType)(e))return On.Kind.UNION_TYPE_EXTENSION;if((0,gl.isEnumType)(e))return On.Kind.ENUM_TYPE_EXTENSION;if((0,gl.isInputObjectType)(e))return On.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,Jw.invariant)(!1,"Unexpected type: "+(0,Yw.inspect)(e))}function qW(e){switch(e){case On.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case On.Kind.OBJECT_TYPE_EXTENSION:return"object";case On.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case On.Kind.UNION_TYPE_EXTENSION:return"union";case On.Kind.ENUM_TYPE_EXTENSION:return"enum";case On.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,Jw.invariant)(!1,"Unexpected kind: "+(0,Yw.inspect)(e))}}});var Yg=w(AN=>{"use strict";m();T();N();Object.defineProperty(AN,"__esModule",{value:!0});AN.ProvidedRequiredArgumentsOnDirectivesRule=Zw;AN.ProvidedRequiredArgumentsRule=KW;var zw=Wt(),Hw=lu(),Ww=ze(),Xw=wt(),VW=pi(),Qg=Lt(),jW=Wr();function KW(e){return Q(M({},Zw(e)),{Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return!1;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(let a of r.args)if(!i.has(a.name)&&(0,Qg.isRequiredArgument)(a)){let o=(0,zw.inspect)(a.type);e.reportError(new Ww.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function Zw(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:jW.specifiedDirectives;for(let c of i)n[c.name]=(0,Hw.keyMap)(c.args.filter(Qg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let c of a)if(c.kind===Xw.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=c.arguments)!==null&&o!==void 0?o:[];n[c.name.value]=(0,Hw.keyMap)(l.filter(GW),d=>d.name.value)}return{Directive:{leave(c){let l=c.name.value,d=n[l];if(d){var p;let E=(p=c.arguments)!==null&&p!==void 0?p:[],I=new Set(E.map(v=>v.name.value));for(let[v,A]of Object.entries(d))if(!I.has(v)){let U=(0,Qg.isType)(A.type)?(0,zw.inspect)(A.type):(0,VW.print)(A.type);e.reportError(new Ww.GraphQLError(`Directive "@${l}" argument "${v}" of type "${U}" is required, but it was not provided.`,{nodes:c}))}}}}}}function GW(e){return e.type.kind===Xw.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var Hg=w(Jg=>{"use strict";m();T();N();Object.defineProperty(Jg,"__esModule",{value:!0});Jg.ScalarLeafsRule=$W;var eL=Wt(),tL=ze(),nL=Lt();function $W(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,nL.isLeafType)((0,nL.getNamedType)(n))){if(r){let i=t.name.value,a=(0,eL.inspect)(n);e.reportError(new tL.GraphQLError(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,a=(0,eL.inspect)(n);e.reportError(new tL.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var Wg=w(zg=>{"use strict";m();T();N();Object.defineProperty(zg,"__esModule",{value:!0});zg.printPathArray=QW;function QW(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var Tf=w(RN=>{"use strict";m();T();N();Object.defineProperty(RN,"__esModule",{value:!0});RN.addPath=YW;RN.pathToArray=JW;function YW(e,t,n){return{prev:e,key:t,typename:n}}function JW(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var Zg=w(Xg=>{"use strict";m();T();N();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.coerceInputValue=t4;var HW=cu(),PN=Wt(),zW=br(),WW=hN(),XW=Ba(),da=Tf(),ZW=Wg(),e4=du(),Ss=ze(),Ef=Lt();function t4(e,t,n=n4){return hf(e,t,n,void 0)}function n4(e,t,n){let r="Invalid value "+(0,PN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,ZW.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function hf(e,t,n,r){if((0,Ef.isNonNullType)(t)){if(e!=null)return hf(e,t.ofType,n,r);n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected non-nullable type "${(0,PN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Ef.isListType)(t)){let i=t.ofType;return(0,WW.isIterableObject)(e)?Array.from(e,(a,o)=>{let c=(0,da.addPath)(r,o,void 0);return hf(a,i,n,c)}):[hf(e,i,n,r)]}if((0,Ef.isInputObjectType)(t)){if(!(0,XW.isObjectLike)(e)){n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},a=t.getFields();for(let o of Object.values(a)){let c=e[o.name];if(c===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Ef.isNonNullType)(o.type)){let l=(0,PN.inspect)(o.type);n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=hf(c,o.type,n,(0,da.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let c=(0,e4.suggestionList)(o,Object.keys(t.getFields()));n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,HW.didYouMean)(c)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let c=o[0],l=i[c];l===null&&n((0,da.pathToArray)(r).concat(c),l,new Ss.GraphQLError(`Field "${c}" must be non-null.`))}return i}if((0,Ef.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof Ss.GraphQLError?n((0,da.pathToArray)(r),e,a):n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected type "${t.name}".`)),i}(0,zW.invariant)(!1,"Unexpected input type: "+(0,PN.inspect)(t))}});var If=w(e_=>{"use strict";m();T();N();Object.defineProperty(e_,"__esModule",{value:!0});e_.valueFromAST=yf;var r4=Wt(),i4=br(),a4=lu(),_l=wt(),dc=Lt();function yf(e,t,n){if(e){if(e.kind===_l.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,dc.isNonNullType)(t)?void 0:i}if((0,dc.isNonNullType)(t))return e.kind===_l.Kind.NULL?void 0:yf(e,t.ofType,n);if(e.kind===_l.Kind.NULL)return null;if((0,dc.isListType)(t)){let r=t.ofType;if(e.kind===_l.Kind.LIST){let a=[];for(let o of e.values)if(rL(o,n)){if((0,dc.isNonNullType)(r))return;a.push(null)}else{let c=yf(o,r,n);if(c===void 0)return;a.push(c)}return a}let i=yf(e,r,n);return i===void 0?void 0:[i]}if((0,dc.isInputObjectType)(t)){if(e.kind!==_l.Kind.OBJECT)return;let r=Object.create(null),i=(0,a4.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||rL(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,dc.isNonNullType)(a.type))return;continue}let c=yf(o.value,a.type,n);if(c===void 0)return;r[a.name]=c}if(t.isOneOf){let a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if((0,dc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,i4.invariant)(!1,"Unexpected input type: "+(0,r4.inspect)(t))}}function rL(e,t){return e.kind===_l.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var Sl=w(gf=>{"use strict";m();T();N();Object.defineProperty(gf,"__esModule",{value:!0});gf.getArgumentValues=oL;gf.getDirectiveValues=f4;gf.getVariableValues=l4;var vl=Wt(),s4=lu(),o4=Wg(),Ds=ze(),iL=wt(),aL=pi(),Ol=Lt(),u4=Zg(),c4=qa(),sL=If();function l4(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=d4(e,t,n,c=>{if(a!=null&&i.length>=a)throw new Ds.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");i.push(c)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function d4(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,c=(0,c4.typeFromAST)(e,a.type);if(!(0,Ol.isInputType)(c)){let d=(0,aL.print)(a.type);r(new Ds.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!uL(n,o)){if(a.defaultValue)i[o]=(0,sL.valueFromAST)(a.defaultValue,c);else if((0,Ol.isNonNullType)(c)){let d=(0,vl.inspect)(c);r(new Ds.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,Ol.isNonNullType)(c)){let d=(0,vl.inspect)(c);r(new Ds.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,u4.coerceInputValue)(l,c,(d,p,E)=>{let I=`Variable "$${o}" got invalid value `+(0,vl.inspect)(p);d.length>0&&(I+=` at "${o}${(0,o4.printPathArray)(d)}"`),r(new Ds.GraphQLError(I+"; "+E.message,{nodes:a,originalError:E}))})}return i}function oL(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,s4.keyMap)(a,c=>c.name.value);for(let c of e.args){let l=c.name,d=c.type,p=o[l];if(!p){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,Ol.isNonNullType)(d))throw new Ds.GraphQLError(`Argument "${l}" of required type "${(0,vl.inspect)(d)}" was not provided.`,{nodes:t});continue}let E=p.value,I=E.kind===iL.Kind.NULL;if(E.kind===iL.Kind.VARIABLE){let A=E.name.value;if(n==null||!uL(n,A)){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,Ol.isNonNullType)(d))throw new Ds.GraphQLError(`Argument "${l}" of required type "${(0,vl.inspect)(d)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:E});continue}I=n[A]==null}if(I&&(0,Ol.isNonNullType)(d))throw new Ds.GraphQLError(`Argument "${l}" of non-null type "${(0,vl.inspect)(d)}" must not be null.`,{nodes:E});let v=(0,sL.valueFromAST)(E,d,n);if(v===void 0)throw new Ds.GraphQLError(`Argument "${l}" has invalid value ${(0,aL.print)(E)}.`,{nodes:E});i[l]=v}return i}function f4(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return oL(e,i,n)}function uL(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var LN=w(wN=>{"use strict";m();T();N();Object.defineProperty(wN,"__esModule",{value:!0});wN.collectFields=N4;wN.collectSubfields=T4;var t_=wt(),p4=Lt(),cL=Wr(),m4=qa(),lL=Sl();function N4(e,t,n,r,i){let a=new Map;return FN(e,t,n,r,i,a,new Set),a}function T4(e,t,n,r,i){let a=new Map,o=new Set;for(let c of i)c.selectionSet&&FN(e,t,n,r,c.selectionSet,a,o);return a}function FN(e,t,n,r,i,a,o){for(let c of i.selections)switch(c.kind){case t_.Kind.FIELD:{if(!n_(n,c))continue;let l=E4(c),d=a.get(l);d!==void 0?d.push(c):a.set(l,[c]);break}case t_.Kind.INLINE_FRAGMENT:{if(!n_(n,c)||!dL(e,c,r))continue;FN(e,t,n,r,c.selectionSet,a,o);break}case t_.Kind.FRAGMENT_SPREAD:{let l=c.name.value;if(o.has(l)||!n_(n,c))continue;o.add(l);let d=t[l];if(!d||!dL(e,d,r))continue;FN(e,t,n,r,d.selectionSet,a,o);break}}}function n_(e,t){let n=(0,lL.getDirectiveValues)(cL.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,lL.getDirectiveValues)(cL.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function dL(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,m4.typeFromAST)(e,r);return i===n?!0:(0,p4.isAbstractType)(i)?e.isSubType(i,n):!1}function E4(e){return e.alias?e.alias.value:e.name.value}});var i_=w(r_=>{"use strict";m();T();N();Object.defineProperty(r_,"__esModule",{value:!0});r_.SingleFieldSubscriptionsRule=I4;var fL=ze(),h4=wt(),y4=LN();function I4(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,a=Object.create(null),o=e.getDocument(),c=Object.create(null);for(let d of o.definitions)d.kind===h4.Kind.FRAGMENT_DEFINITION&&(c[d.name.value]=d);let l=(0,y4.collectFields)(n,c,a,r,t.selectionSet);if(l.size>1){let E=[...l.values()].slice(1).flat();e.reportError(new fL.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:E}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new fL.GraphQLError(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}});var CN=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.groupBy=g4;function g4(e,t){let n=new Map;for(let r of e){let i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}});var o_=w(s_=>{"use strict";m();T();N();Object.defineProperty(s_,"__esModule",{value:!0});s_.UniqueArgumentDefinitionNamesRule=O4;var _4=CN(),v4=ze();function O4(e){return{DirectiveDefinition(r){var i;let a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let a=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let l of o){var c;let d=l.name.value,p=(c=l.arguments)!==null&&c!==void 0?c:[];n(`${a}.${d}`,p)}return!1}function n(r,i){let a=(0,_4.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new v4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:c.map(l=>l.name)}));return!1}}});var c_=w(u_=>{"use strict";m();T();N();Object.defineProperty(u_,"__esModule",{value:!0});u_.UniqueArgumentNamesRule=b4;var S4=CN(),D4=ze();function b4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,S4.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new D4.GraphQLError(`There can be only one argument named "${o}".`,{nodes:c.map(l=>l.name)}))}}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.UniqueDirectiveNamesRule=A4;var pL=ze();function A4(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new pL.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new pL.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var m_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueDirectivesPerLocationRule=F4;var R4=ze(),f_=wt(),mL=lc(),P4=Wr();function F4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():P4.specifiedDirectives;for(let c of r)t[c.name]=!c.isRepeatable;let i=e.getDocument().definitions;for(let c of i)c.kind===f_.Kind.DIRECTIVE_DEFINITION&&(t[c.name.value]=!c.repeatable);let a=Object.create(null),o=Object.create(null);return{enter(c){if(!("directives"in c)||!c.directives)return;let l;if(c.kind===f_.Kind.SCHEMA_DEFINITION||c.kind===f_.Kind.SCHEMA_EXTENSION)l=a;else if((0,mL.isTypeDefinitionNode)(c)||(0,mL.isTypeExtensionNode)(c)){let d=c.name.value;l=o[d],l===void 0&&(o[d]=l=Object.create(null))}else l=Object.create(null);for(let d of c.directives){let p=d.name.value;t[p]&&(l[p]?e.reportError(new R4.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var T_=w(N_=>{"use strict";m();T();N();Object.defineProperty(N_,"__esModule",{value:!0});N_.UniqueEnumValueNamesRule=L4;var NL=ze(),w4=Lt();function L4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o;let c=a.name.value;r[c]||(r[c]=Object.create(null));let l=(o=a.values)!==null&&o!==void 0?o:[],d=r[c];for(let p of l){let E=p.name.value,I=n[c];(0,w4.isEnumType)(I)&&I.getValue(E)?e.reportError(new NL.GraphQLError(`Enum value "${c}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new NL.GraphQLError(`Enum value "${c}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}});var y_=w(h_=>{"use strict";m();T();N();Object.defineProperty(h_,"__esModule",{value:!0});h_.UniqueFieldDefinitionNamesRule=C4;var TL=ze(),E_=Lt();function C4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(a){var o;let c=a.name.value;r[c]||(r[c]=Object.create(null));let l=(o=a.fields)!==null&&o!==void 0?o:[],d=r[c];for(let p of l){let E=p.name.value;B4(n[c],E)?e.reportError(new TL.GraphQLError(`Field "${c}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new TL.GraphQLError(`Field "${c}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}function B4(e,t){return(0,E_.isObjectType)(e)||(0,E_.isInterfaceType)(e)||(0,E_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueFragmentNamesRule=k4;var U4=ze();function k4(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new U4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueInputFieldNamesRule=q4;var M4=br(),x4=ze();function q4(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,M4.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new x4.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var S_=w(O_=>{"use strict";m();T();N();Object.defineProperty(O_,"__esModule",{value:!0});O_.UniqueOperationNamesRule=j4;var V4=ze();function j4(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new V4.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var b_=w(D_=>{"use strict";m();T();N();Object.defineProperty(D_,"__esModule",{value:!0});D_.UniqueOperationTypesRule=K4;var EL=ze();function K4(e){let t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(a){var o;let c=(o=a.operationTypes)!==null&&o!==void 0?o:[];for(let l of c){let d=l.operation,p=n[d];r[d]?e.reportError(new EL.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new EL.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var R_=w(A_=>{"use strict";m();T();N();Object.defineProperty(A_,"__esModule",{value:!0});A_.UniqueTypeNamesRule=G4;var hL=ze();function G4(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new hL.GraphQLError(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new hL.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var F_=w(P_=>{"use strict";m();T();N();Object.defineProperty(P_,"__esModule",{value:!0});P_.UniqueVariableNamesRule=Y4;var $4=CN(),Q4=ze();function Y4(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,$4.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new Q4.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(c=>c.variable.name)}))}}}});var C_=w(L_=>{"use strict";m();T();N();Object.defineProperty(L_,"__esModule",{value:!0});L_.ValuesOfCorrectTypeRule=W4;var J4=cu(),_f=Wt(),H4=lu(),z4=du(),ja=ze(),w_=wt(),BN=pi(),Va=Lt();function W4(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Va.getNullableType)(e.getParentInputType());if(!(0,Va.isListType)(r))return fc(e,n),!1},ObjectValue(n){let r=(0,Va.getNamedType)(e.getInputType());if(!(0,Va.isInputObjectType)(r))return fc(e,n),!1;let i=(0,H4.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Va.isRequiredInputField)(a)){let c=(0,_f.inspect)(a.type);e.reportError(new ja.GraphQLError(`Field "${r.name}.${a.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&X4(e,n,r,i,t)},ObjectField(n){let r=(0,Va.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Va.isInputObjectType)(r)){let a=(0,z4.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new ja.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,J4.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Va.isNonNullType)(r)&&e.reportError(new ja.GraphQLError(`Expected value of type "${(0,_f.inspect)(r)}", found ${(0,BN.print)(n)}.`,{nodes:n}))},EnumValue:n=>fc(e,n),IntValue:n=>fc(e,n),FloatValue:n=>fc(e,n),StringValue:n=>fc(e,n),BooleanValue:n=>fc(e,n)}}function fc(e,t){let n=e.getInputType();if(!n)return;let r=(0,Va.getNamedType)(n);if(!(0,Va.isLeafType)(r)){let i=(0,_f.inspect)(n);e.reportError(new ja.GraphQLError(`Expected value of type "${i}", found ${(0,BN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,_f.inspect)(n);e.reportError(new ja.GraphQLError(`Expected value of type "${a}", found ${(0,BN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,_f.inspect)(n);i instanceof ja.GraphQLError?e.reportError(i):e.reportError(new ja.GraphQLError(`Expected value of type "${a}", found ${(0,BN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function X4(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new ja.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(a=r[o[0]])===null||a===void 0?void 0:a.value,d=!l||l.kind===w_.Kind.NULL,p=(l==null?void 0:l.kind)===w_.Kind.VARIABLE;if(d){e.reportError(new ja.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let E=l.name.value;i[E].type.kind!==w_.Kind.NON_NULL_TYPE&&e.reportError(new ja.GraphQLError(`Variable "${E}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var U_=w(B_=>{"use strict";m();T();N();Object.defineProperty(B_,"__esModule",{value:!0});B_.VariablesAreInputTypesRule=r8;var Z4=ze(),e8=pi(),t8=Lt(),n8=qa();function r8(e){return{VariableDefinition(t){let n=(0,n8.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,t8.isInputType)(n)){let r=t.variable.name.value,i=(0,e8.print)(t.type);e.reportError(new Z4.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var M_=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.VariablesInAllowedPositionRule=o8;var yL=Wt(),i8=ze(),a8=wt(),IL=Lt(),gL=nf(),s8=qa();function o8(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:a,defaultValue:o}of r){let c=i.name.value,l=t[c];if(l&&a){let d=e.getSchema(),p=(0,s8.typeFromAST)(d,l.type);if(p&&!u8(d,p,l.defaultValue,a,o)){let E=(0,yL.inspect)(p),I=(0,yL.inspect)(a);e.reportError(new i8.GraphQLError(`Variable "$${c}" of type "${E}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function u8(e,t,n,r,i){if((0,IL.isNonNullType)(r)&&!(0,IL.isNonNullType)(t)){if(!(n!=null&&n.kind!==a8.Kind.NULL)&&!(i!==void 0))return!1;let c=r.ofType;return(0,gL.isTypeSubTypeOf)(e,t,c)}return(0,gL.isTypeSubTypeOf)(e,t,r)}});var x_=w(Nu=>{"use strict";m();T();N();Object.defineProperty(Nu,"__esModule",{value:!0});Nu.specifiedSDLRules=Nu.specifiedRules=Nu.recommendedRules=void 0;var c8=ng(),l8=ig(),d8=sg(),_L=og(),vL=dg(),f8=pg(),OL=Tg(),p8=hg(),m8=Ig(),N8=_g(),T8=Og(),E8=Dg(),h8=Ag(),y8=Pg(),I8=qg(),g8=Kg(),_8=$g(),SL=Yg(),v8=Hg(),O8=i_(),S8=o_(),DL=c_(),D8=d_(),bL=m_(),b8=T_(),A8=y_(),R8=g_(),AL=v_(),P8=S_(),F8=b_(),w8=R_(),L8=F_(),C8=C_(),B8=U_(),U8=M_(),RL=Object.freeze([N8.MaxIntrospectionDepthRule]);Nu.recommendedRules=RL;var k8=Object.freeze([c8.ExecutableDefinitionsRule,P8.UniqueOperationNamesRule,p8.LoneAnonymousOperationRule,O8.SingleFieldSubscriptionsRule,OL.KnownTypeNamesRule,d8.FragmentsOnCompositeTypesRule,B8.VariablesAreInputTypesRule,v8.ScalarLeafsRule,l8.FieldsOnCorrectTypeRule,R8.UniqueFragmentNamesRule,f8.KnownFragmentNamesRule,h8.NoUnusedFragmentsRule,g8.PossibleFragmentSpreadsRule,T8.NoFragmentCyclesRule,L8.UniqueVariableNamesRule,E8.NoUndefinedVariablesRule,y8.NoUnusedVariablesRule,vL.KnownDirectivesRule,bL.UniqueDirectivesPerLocationRule,_L.KnownArgumentNamesRule,DL.UniqueArgumentNamesRule,C8.ValuesOfCorrectTypeRule,SL.ProvidedRequiredArgumentsRule,U8.VariablesInAllowedPositionRule,I8.OverlappingFieldsCanBeMergedRule,AL.UniqueInputFieldNamesRule,...RL]);Nu.specifiedRules=k8;var M8=Object.freeze([m8.LoneSchemaDefinitionRule,F8.UniqueOperationTypesRule,w8.UniqueTypeNamesRule,b8.UniqueEnumValueNamesRule,A8.UniqueFieldDefinitionNamesRule,S8.UniqueArgumentDefinitionNamesRule,D8.UniqueDirectiveNamesRule,OL.KnownTypeNamesRule,vL.KnownDirectivesRule,bL.UniqueDirectivesPerLocationRule,_8.PossibleTypeExtensionsRule,_L.KnownArgumentNamesOnDirectivesRule,DL.UniqueArgumentNamesRule,AL.UniqueInputFieldNamesRule,SL.ProvidedRequiredArgumentsOnDirectivesRule]);Nu.specifiedSDLRules=M8});var j_=w(Tu=>{"use strict";m();T();N();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.ValidationContext=Tu.SDLValidationContext=Tu.ASTValidationContext=void 0;var PL=wt(),x8=nc(),FL=_N(),vf=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===PL.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let a of i.selections)a.kind===PL.Kind.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],a;for(;a=i.pop();)for(let o of this.getFragmentSpreads(a)){let c=o.name.value;if(r[c]!==!0){r[c]=!0;let l=this.getFragment(c);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}};Tu.ASTValidationContext=vf;var q_=class extends vf{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};Tu.SDLValidationContext=q_;var V_=class extends vf{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new FL.TypeInfo(this._schema);(0,x8.visit)(t,(0,FL.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}};Tu.ValidationContext=V_});var bl=w(Dl=>{"use strict";m();T();N();Object.defineProperty(Dl,"__esModule",{value:!0});Dl.assertValidSDL=G8;Dl.assertValidSDLExtension=$8;Dl.validate=K8;Dl.validateSDL=K_;var q8=qr(),V8=ze(),UN=nc(),j8=pf(),wL=_N(),LL=x_(),CL=j_();function K8(e,t,n=LL.specifiedRules,r,i=new wL.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,q8.devAssert)(!1,"Must provide document."),(0,j8.assertValidSchema)(e);let c=Object.freeze({}),l=[],d=new CL.ValidationContext(e,t,i,E=>{if(l.length>=o)throw l.push(new V8.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),c;l.push(E)}),p=(0,UN.visitInParallel)(n.map(E=>E(d)));try{(0,UN.visit)(t,(0,wL.visitWithTypeInfo)(i,p))}catch(E){if(E!==c)throw E}return l}function K_(e,t,n=LL.specifiedSDLRules){let r=[],i=new CL.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,UN.visit)(e,(0,UN.visitInParallel)(a)),r}function G8(e){let t=K_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}var HI=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new mz.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function hz(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Bn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,Rr.inspect)(n)}.`,(r=JI(t,YI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Bn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,Rr.inspect)(i)}.`,(a=JI(t,YI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Bn.isObjectType)(o)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,Rr.inspect)(o)}.`,(c=JI(t,YI.OperationTypeNode.SUBSCRIPTION))!==null&&c!==void 0?c:o.astNode)}}function JI(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function yz(e){for(let n of e.schema.getDirectives()){if(!(0,Nw.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,Rr.inspect)(n)}.`,n==null?void 0:n.astNode);continue}lc(e,n);for(let r of n.args)if(lc(e,r),(0,Bn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,Rr.inspect)(r.type)}.`,r.astNode),(0,Bn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[zI(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function lc(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Iz(e){let t=bz(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Bn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,Rr.inspect)(r)}.`,r.astNode);continue}(0,Nz.isIntrospectionType)(r)||lc(e,r),(0,Bn.isObjectType)(r)||(0,Bn.isInterfaceType)(r)?(fw(e,r),pw(e,r)):(0,Bn.isUnionType)(r)?vz(e,r):(0,Bn.isEnumType)(r)?Oz(e,r):(0,Bn.isInputObjectType)(r)&&(Sz(e,r),t(r))}}function fw(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(lc(e,o),!(0,Bn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,Rr.inspect)(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let c of o.args){let l=c.name;if(lc(e,c),!(0,Bn.isInputType)(c.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,Rr.inspect)(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if((0,Bn.isRequiredArgument)(c)&&c.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[zI(c.astNode),(a=c.astNode)===null||a===void 0?void 0:a.type])}}}}function pw(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Bn.isInterfaceType)(r)){e.reportError(`Type ${(0,Rr.inspect)(t)} must only implement Interface types, it cannot implement ${(0,Rr.inspect)(r)}.`,pf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,pf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,pf(t,r));continue}n[r.name]=!0,_z(e,t,r),gz(e,t,r)}}function gz(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,p=r[d];if(!p){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,dw.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,Rr.inspect)(l.type)} but ${t.name}.${d} is type ${(0,Rr.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(let E of l.args){let I=E.name,v=p.args.find(A=>A.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[E.astNode,p.astNode]);continue}if(!(0,dw.isEqualType)(E.type,v.type)){var o,c;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,Rr.inspect)(E.type)} but ${t.name}.${d}(${I}:) is type ${(0,Rr.inspect)(v.type)}.`,[(o=E.astNode)===null||o===void 0?void 0:o.type,(c=v.astNode)===null||c===void 0?void 0:c.type])}}for(let E of p.args){let I=E.name;!l.args.find(A=>A.name===I)&&(0,Bn.isRequiredArgument)(E)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[E.astNode,l.astNode])}}}function _z(e,t,n){let r=t.getInterfaces();for(let i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...pf(n,i),...pf(t,n)])}function vz(e,t){let n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,mw(t,i.name));continue}r[i.name]=!0,(0,Bn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,Rr.inspect)(i)}.`,mw(t,String(i)))}}function Oz(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)lc(e,r)}function Sz(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of n){if(lc(e,a),!(0,Bn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,Rr.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Bn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[zI(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&Dz(t,a,e)}}function Dz(e,t,n){if((0,Bn.isNonNullType)(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function bz(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;let o=Object.values(a.getFields());for(let c of o)if((0,Bn.isNonNullType)(c.type)&&(0,Bn.isInputObjectType)(c.type.ofType)){let l=c.type.ofType,d=r[l.name];if(n.push(c),d===void 0)i(l);else{let p=n.slice(d),E=p.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${E}".`,p.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function pf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.interfaces)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t.name)}function mw(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.types)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t)}function zI(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Nw.GraphQLDeprecatedDirective.name)}});var qa=w(ZI=>{"use strict";m();T();N();Object.defineProperty(ZI,"__esModule",{value:!0});ZI.typeFromAST=XI;var WI=wt(),Ew=Lt();function XI(e,t){switch(t.kind){case WI.Kind.LIST_TYPE:{let n=XI(e,t.type);return n&&new Ew.GraphQLList(n)}case WI.Kind.NON_NULL_TYPE:{let n=XI(e,t.type);return n&&new Ew.GraphQLNonNull(n)}case WI.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var ON=w(Nf=>{"use strict";m();T();N();Object.defineProperty(Nf,"__esModule",{value:!0});Nf.TypeInfo=void 0;Nf.visitWithTypeInfo=Pz;var Az=Ua(),Un=wt(),hw=rc(),kn=Lt(),gl=Li(),yw=qa(),eg=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r!=null?r:Rz,n&&((0,kn.isInputType)(n)&&this._inputTypeStack.push(n),(0,kn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,kn.isOutputType)(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){let n=this._schema;switch(t.kind){case Un.Kind.SELECTION_SET:{let i=(0,kn.getNamedType)(this.getType());this._parentTypeStack.push((0,kn.isCompositeType)(i)?i:void 0);break}case Un.Kind.FIELD:{let i=this.getParentType(),a,o;i&&(a=this._getFieldDef(n,i,t),a&&(o=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,kn.isOutputType)(o)?o:void 0);break}case Un.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Un.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,kn.isObjectType)(i)?i:void 0);break}case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,yw.typeFromAST)(n,i):(0,kn.getNamedType)(this.getType());this._typeStack.push((0,kn.isOutputType)(a)?a:void 0);break}case Un.Kind.VARIABLE_DEFINITION:{let i=(0,yw.typeFromAST)(n,t.type);this._inputTypeStack.push((0,kn.isInputType)(i)?i:void 0);break}case Un.Kind.ARGUMENT:{var r;let i,a,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(c=>c.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.LIST:{let i=(0,kn.getNullableType)(this.getInputType()),a=(0,kn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.OBJECT_FIELD:{let i=(0,kn.getNamedType)(this.getInputType()),a,o;(0,kn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.ENUM:{let i=(0,kn.getNamedType)(this.getInputType()),a;(0,kn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Un.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Un.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Un.Kind.DIRECTIVE:this._directive=null;break;case Un.Kind.OPERATION_DEFINITION:case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Un.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Un.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.LIST:case Un.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.ENUM:this._enumValue=null;break;default:}}};Nf.TypeInfo=eg;function Rz(e,t,n){let r=n.name.value;if(r===gl.SchemaMetaFieldDef.name&&e.getQueryType()===t)return gl.SchemaMetaFieldDef;if(r===gl.TypeMetaFieldDef.name&&e.getQueryType()===t)return gl.TypeMetaFieldDef;if(r===gl.TypeNameMetaFieldDef.name&&(0,kn.isCompositeType)(t))return gl.TypeNameMetaFieldDef;if((0,kn.isObjectType)(t)||(0,kn.isInterfaceType)(t))return t.getFields()[r]}function Pz(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,hw.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,Az.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,hw.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var dc=w(Ci=>{"use strict";m();T();N();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.isConstValueNode=tg;Ci.isDefinitionNode=Fz;Ci.isExecutableDefinitionNode=Iw;Ci.isSelectionNode=wz;Ci.isTypeDefinitionNode=vw;Ci.isTypeExtensionNode=Sw;Ci.isTypeNode=Lz;Ci.isTypeSystemDefinitionNode=_w;Ci.isTypeSystemExtensionNode=Ow;Ci.isValueNode=gw;var Ct=wt();function Fz(e){return Iw(e)||_w(e)||Ow(e)}function Iw(e){return e.kind===Ct.Kind.OPERATION_DEFINITION||e.kind===Ct.Kind.FRAGMENT_DEFINITION}function wz(e){return e.kind===Ct.Kind.FIELD||e.kind===Ct.Kind.FRAGMENT_SPREAD||e.kind===Ct.Kind.INLINE_FRAGMENT}function gw(e){return e.kind===Ct.Kind.VARIABLE||e.kind===Ct.Kind.INT||e.kind===Ct.Kind.FLOAT||e.kind===Ct.Kind.STRING||e.kind===Ct.Kind.BOOLEAN||e.kind===Ct.Kind.NULL||e.kind===Ct.Kind.ENUM||e.kind===Ct.Kind.LIST||e.kind===Ct.Kind.OBJECT}function tg(e){return gw(e)&&(e.kind===Ct.Kind.LIST?e.values.some(tg):e.kind===Ct.Kind.OBJECT?e.fields.some(t=>tg(t.value)):e.kind!==Ct.Kind.VARIABLE)}function Lz(e){return e.kind===Ct.Kind.NAMED_TYPE||e.kind===Ct.Kind.LIST_TYPE||e.kind===Ct.Kind.NON_NULL_TYPE}function _w(e){return e.kind===Ct.Kind.SCHEMA_DEFINITION||vw(e)||e.kind===Ct.Kind.DIRECTIVE_DEFINITION}function vw(e){return e.kind===Ct.Kind.SCALAR_TYPE_DEFINITION||e.kind===Ct.Kind.OBJECT_TYPE_DEFINITION||e.kind===Ct.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Ct.Kind.UNION_TYPE_DEFINITION||e.kind===Ct.Kind.ENUM_TYPE_DEFINITION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_DEFINITION}function Ow(e){return e.kind===Ct.Kind.SCHEMA_EXTENSION||Sw(e)}function Sw(e){return e.kind===Ct.Kind.SCALAR_TYPE_EXTENSION||e.kind===Ct.Kind.OBJECT_TYPE_EXTENSION||e.kind===Ct.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Ct.Kind.UNION_TYPE_EXTENSION||e.kind===Ct.Kind.ENUM_TYPE_EXTENSION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var rg=w(ng=>{"use strict";m();T();N();Object.defineProperty(ng,"__esModule",{value:!0});ng.ExecutableDefinitionsRule=Uz;var Cz=ze(),Dw=wt(),Bz=dc();function Uz(e){return{Document(t){for(let n of t.definitions)if(!(0,Bz.isExecutableDefinitionNode)(n)){let r=n.kind===Dw.Kind.SCHEMA_DEFINITION||n.kind===Dw.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new Cz.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var ag=w(ig=>{"use strict";m();T();N();Object.defineProperty(ig,"__esModule",{value:!0});ig.FieldsOnCorrectTypeRule=qz;var bw=lu(),kz=Wd(),Mz=fu(),xz=ze(),Tf=Lt();function qz(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,bw.didYouMean)("to use an inline fragment on",Vz(i,n,a));o===""&&(o=(0,bw.didYouMean)(jz(n,a))),e.reportError(new xz.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function Vz(e,t,n){if(!(0,Tf.isAbstractType)(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let c of o.getInterfaces()){var a;c.getFields()[n]&&(r.add(c),i[c.name]=((a=i[c.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((o,c)=>{let l=i[c.name]-i[o.name];return l!==0?l:(0,Tf.isInterfaceType)(o)&&e.isSubType(o,c)?-1:(0,Tf.isInterfaceType)(c)&&e.isSubType(c,o)?1:(0,kz.naturalCompare)(o.name,c.name)}).map(o=>o.name)}function jz(e,t){if((0,Tf.isObjectType)(e)||(0,Tf.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,Mz.suggestionList)(t,n)}return[]}});var og=w(sg=>{"use strict";m();T();N();Object.defineProperty(sg,"__esModule",{value:!0});sg.FragmentsOnCompositeTypesRule=Kz;var Aw=ze(),Rw=pi(),Pw=Lt(),Fw=qa();function Kz(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,Fw.typeFromAST)(e.getSchema(),n);if(r&&!(0,Pw.isCompositeType)(r)){let i=(0,Rw.print)(n);e.reportError(new Aw.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,Fw.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,Pw.isCompositeType)(n)){let r=(0,Rw.print)(t.typeCondition);e.reportError(new Aw.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var ug=w(SN=>{"use strict";m();T();N();Object.defineProperty(SN,"__esModule",{value:!0});SN.KnownArgumentNamesOnDirectivesRule=Bw;SN.KnownArgumentNamesRule=Qz;var ww=lu(),Lw=fu(),Cw=ze(),Gz=wt(),$z=Wr();function Qz(e){return Q(M({},Bw(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let a=t.name.value,o=r.args.map(l=>l.name),c=(0,Lw.suggestionList)(a,o);e.reportError(new Cw.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,ww.didYouMean)(c),{nodes:t}))}}})}function Bw(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():$z.specifiedDirectives;for(let o of r)t[o.name]=o.args.map(c=>c.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===Gz.Kind.DIRECTIVE_DEFINITION){var a;let c=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=c.map(l=>l.name.value)}return{Directive(o){let c=o.name.value,l=t[c];if(o.arguments&&l)for(let d of o.arguments){let p=d.name.value;if(!l.includes(p)){let E=(0,Lw.suggestionList)(p,l);e.reportError(new Cw.GraphQLError(`Unknown argument "${p}" on directive "@${c}".`+(0,ww.didYouMean)(E),{nodes:d}))}}return!1}}}});var fg=w(dg=>{"use strict";m();T();N();Object.defineProperty(dg,"__esModule",{value:!0});dg.KnownDirectivesRule=Hz;var Yz=Wt(),cg=br(),Uw=ze(),lg=Ua(),or=ml(),In=wt(),Jz=Wr();function Hz(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Jz.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===In.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,c,l,d){let p=a.name.value,E=t[p];if(!E){e.reportError(new Uw.GraphQLError(`Unknown directive "@${p}".`,{nodes:a}));return}let I=zz(d);I&&!E.includes(I)&&e.reportError(new Uw.GraphQLError(`Directive "@${p}" may not be used on ${I}.`,{nodes:a}))}}}function zz(e){let t=e[e.length-1];switch("kind"in t||(0,cg.invariant)(!1),t.kind){case In.Kind.OPERATION_DEFINITION:return Wz(t.operation);case In.Kind.FIELD:return or.DirectiveLocation.FIELD;case In.Kind.FRAGMENT_SPREAD:return or.DirectiveLocation.FRAGMENT_SPREAD;case In.Kind.INLINE_FRAGMENT:return or.DirectiveLocation.INLINE_FRAGMENT;case In.Kind.FRAGMENT_DEFINITION:return or.DirectiveLocation.FRAGMENT_DEFINITION;case In.Kind.VARIABLE_DEFINITION:return or.DirectiveLocation.VARIABLE_DEFINITION;case In.Kind.SCHEMA_DEFINITION:case In.Kind.SCHEMA_EXTENSION:return or.DirectiveLocation.SCHEMA;case In.Kind.SCALAR_TYPE_DEFINITION:case In.Kind.SCALAR_TYPE_EXTENSION:return or.DirectiveLocation.SCALAR;case In.Kind.OBJECT_TYPE_DEFINITION:case In.Kind.OBJECT_TYPE_EXTENSION:return or.DirectiveLocation.OBJECT;case In.Kind.FIELD_DEFINITION:return or.DirectiveLocation.FIELD_DEFINITION;case In.Kind.INTERFACE_TYPE_DEFINITION:case In.Kind.INTERFACE_TYPE_EXTENSION:return or.DirectiveLocation.INTERFACE;case In.Kind.UNION_TYPE_DEFINITION:case In.Kind.UNION_TYPE_EXTENSION:return or.DirectiveLocation.UNION;case In.Kind.ENUM_TYPE_DEFINITION:case In.Kind.ENUM_TYPE_EXTENSION:return or.DirectiveLocation.ENUM;case In.Kind.ENUM_VALUE_DEFINITION:return or.DirectiveLocation.ENUM_VALUE;case In.Kind.INPUT_OBJECT_TYPE_DEFINITION:case In.Kind.INPUT_OBJECT_TYPE_EXTENSION:return or.DirectiveLocation.INPUT_OBJECT;case In.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,cg.invariant)(!1),n.kind===In.Kind.INPUT_OBJECT_TYPE_DEFINITION?or.DirectiveLocation.INPUT_FIELD_DEFINITION:or.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,cg.invariant)(!1,"Unexpected kind: "+(0,Yz.inspect)(t.kind))}}function Wz(e){switch(e){case lg.OperationTypeNode.QUERY:return or.DirectiveLocation.QUERY;case lg.OperationTypeNode.MUTATION:return or.DirectiveLocation.MUTATION;case lg.OperationTypeNode.SUBSCRIPTION:return or.DirectiveLocation.SUBSCRIPTION}}});var mg=w(pg=>{"use strict";m();T();N();Object.defineProperty(pg,"__esModule",{value:!0});pg.KnownFragmentNamesRule=Zz;var Xz=ze();function Zz(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new Xz.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var Eg=w(Tg=>{"use strict";m();T();N();Object.defineProperty(Tg,"__esModule",{value:!0});Tg.KnownTypeNamesRule=aW;var eW=lu(),tW=fu(),nW=ze(),Ng=dc(),rW=Li(),iW=xa();function aW(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,Ng.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,c,l,d){let p=a.name.value;if(!n[p]&&!r[p]){var E;let I=(E=d[2])!==null&&E!==void 0?E:c,v=I!=null&&sW(I);if(v&&kw.includes(p))return;let A=(0,tW.suggestionList)(p,v?kw.concat(i):i);e.reportError(new nW.GraphQLError(`Unknown type "${p}".`+(0,eW.didYouMean)(A),{nodes:a}))}}}}var kw=[...iW.specifiedScalarTypes,...rW.introspectionTypes].map(e=>e.name);function sW(e){return"kind"in e&&((0,Ng.isTypeSystemDefinitionNode)(e)||(0,Ng.isTypeSystemExtensionNode)(e))}});var yg=w(hg=>{"use strict";m();T();N();Object.defineProperty(hg,"__esModule",{value:!0});hg.LoneAnonymousOperationRule=cW;var oW=ze(),uW=wt();function cW(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===uW.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new oW.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var gg=w(Ig=>{"use strict";m();T();N();Object.defineProperty(Ig,"__esModule",{value:!0});Ig.LoneSchemaDefinitionRule=lW;var Mw=ze();function lW(e){var t,n,r;let i=e.getSchema(),a=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition(c){if(a){e.reportError(new Mw.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:c}));return}o>0&&e.reportError(new Mw.GraphQLError("Must provide only one schema definition.",{nodes:c})),++o}}}});var vg=w(_g=>{"use strict";m();T();N();Object.defineProperty(_g,"__esModule",{value:!0});_g.MaxIntrospectionDepthRule=pW;var dW=ze(),xw=wt(),fW=3;function pW(e){function t(n,r=Object.create(null),i=0){if(n.kind===xw.Kind.FRAGMENT_SPREAD){let a=n.name.value;if(r[a]===!0)return!1;let o=e.getFragment(a);if(!o)return!1;try{return r[a]=!0,t(o,r,i)}finally{r[a]=void 0}}if(n.kind===xw.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=fW))return!0;if("selectionSet"in n&&n.selectionSet){for(let a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new dW.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Sg=w(Og=>{"use strict";m();T();N();Object.defineProperty(Og,"__esModule",{value:!0});Og.NoFragmentCyclesRule=NW;var mW=ze();function NW(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;let o=a.name.value;t[o]=!0;let c=e.getFragmentSpreads(a.selectionSet);if(c.length!==0){r[o]=n.length;for(let l of c){let d=l.name.value,p=r[d];if(n.push(l),p===void 0){let E=e.getFragment(d);E&&i(E)}else{let E=n.slice(p),I=E.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new mW.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:E}))}n.pop()}r[o]=void 0}}}});var bg=w(Dg=>{"use strict";m();T();N();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.NoUndefinedVariablesRule=EW;var TW=ze();function EW(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let a=i.name.value;t[a]!==!0&&e.reportError(new TW.GraphQLError(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var Rg=w(Ag=>{"use strict";m();T();N();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.NoUnusedFragmentsRule=yW;var hW=ze();function yW(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(let i of n){let a=i.name.value;r[a]!==!0&&e.reportError(new hW.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var Fg=w(Pg=>{"use strict";m();T();N();Object.defineProperty(Pg,"__esModule",{value:!0});Pg.NoUnusedVariablesRule=gW;var IW=ze();function gW(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:a}of i)r[a.name.value]=!0;for(let a of t){let o=a.variable.name.value;r[o]!==!0&&e.reportError(new IW.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}});var Cg=w(Lg=>{"use strict";m();T();N();Object.defineProperty(Lg,"__esModule",{value:!0});Lg.sortValueNode=wg;var _W=Wd(),Os=wt();function wg(e){switch(e.kind){case Os.Kind.OBJECT:return Q(M({},e),{fields:vW(e.fields)});case Os.Kind.LIST:return Q(M({},e),{values:e.values.map(wg)});case Os.Kind.INT:case Os.Kind.FLOAT:case Os.Kind.STRING:case Os.Kind.BOOLEAN:case Os.Kind.NULL:case Os.Kind.ENUM:case Os.Kind.VARIABLE:return e}}function vW(e){return e.map(t=>Q(M({},t),{value:wg(t.value)})).sort((t,n)=>(0,_W.naturalCompare)(t.name.value,n.name.value))}});var Vg=w(qg=>{"use strict";m();T();N();Object.defineProperty(qg,"__esModule",{value:!0});qg.OverlappingFieldsCanBeMergedRule=bW;var qw=Wt(),OW=ze(),Bg=wt(),SW=pi(),Xr=Lt(),DW=Cg(),jw=qa();function Kw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Kw(n)).join(" and "):e}function bW(e){let t=new Mg,n=new Map;return{SelectionSet(r){let i=AW(e,n,t,e.getParentType(),r);for(let[[a,o],c,l]of i){let d=Kw(o);e.reportError(new OW.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(l)}))}}}}function AW(e,t,n,r,i){let a=[],[o,c]=AN(e,t,r,i);if(PW(e,a,t,n,o),c.length!==0)for(let l=0;l1)for(let c=0;c[a.value,o]));return n.every(a=>{let o=a.value,c=i.get(a.name.value);return c===void 0?!1:Vw(o)===Vw(c)})}function Vw(e){return(0,SW.print)((0,DW.sortValueNode)(e))}function Ug(e,t){return(0,Xr.isListType)(e)?(0,Xr.isListType)(t)?Ug(e.ofType,t.ofType):!0:(0,Xr.isListType)(t)?!0:(0,Xr.isNonNullType)(e)?(0,Xr.isNonNullType)(t)?Ug(e.ofType,t.ofType):!0:(0,Xr.isNonNullType)(t)?!0:(0,Xr.isLeafType)(e)||(0,Xr.isLeafType)(t)?e!==t:!1}function AN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);$w(e,n,r,a,o);let c=[a,Object.keys(o)];return t.set(r,c),c}function kg(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,jw.typeFromAST)(e.getSchema(),n.typeCondition);return AN(e,t,i,n.selectionSet)}function $w(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Bg.Kind.FIELD:{let o=a.name.value,c;((0,Xr.isObjectType)(t)||(0,Xr.isInterfaceType)(t))&&(c=t.getFields()[o]);let l=a.alias?a.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,a,c]);break}case Bg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Bg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,c=o?(0,jw.typeFromAST)(e.getSchema(),o):t;$w(e,c,a.selectionSet,r,i);break}}}function wW(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var Mg=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Kg,"__esModule",{value:!0});Kg.PossibleFragmentSpreadsRule=CW;var RN=Wt(),Qw=ze(),jg=Lt(),Yw=rf(),LW=qa();function CW(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,jg.isCompositeType)(n)&&(0,jg.isCompositeType)(r)&&!(0,Yw.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,RN.inspect)(r),a=(0,RN.inspect)(n);e.reportError(new Qw.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=BW(e,n),i=e.getParentType();if(r&&i&&!(0,Yw.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,RN.inspect)(i),o=(0,RN.inspect)(r);e.reportError(new Qw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function BW(e,t){let n=e.getFragment(t);if(n){let r=(0,LW.typeFromAST)(e.getSchema(),n.typeCondition);if((0,jg.isCompositeType)(r))return r}}});var Qg=w($g=>{"use strict";m();T();N();Object.defineProperty($g,"__esModule",{value:!0});$g.PossibleTypeExtensionsRule=xW;var UW=lu(),Hw=Wt(),zw=br(),kW=fu(),Jw=ze(),On=wt(),MW=dc(),_l=Lt();function xW(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,MW.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let a=i.name.value,o=n[a],c=t==null?void 0:t.getType(a),l;if(o?l=qW[o.kind]:c&&(l=VW(c)),l){if(l!==i.kind){let d=jW(i.kind);e.reportError(new Jw.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(M(M({},n),t==null?void 0:t.getTypeMap())),p=(0,kW.suggestionList)(a,d);e.reportError(new Jw.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,UW.didYouMean)(p),{nodes:i.name}))}}}var qW={[On.Kind.SCALAR_TYPE_DEFINITION]:On.Kind.SCALAR_TYPE_EXTENSION,[On.Kind.OBJECT_TYPE_DEFINITION]:On.Kind.OBJECT_TYPE_EXTENSION,[On.Kind.INTERFACE_TYPE_DEFINITION]:On.Kind.INTERFACE_TYPE_EXTENSION,[On.Kind.UNION_TYPE_DEFINITION]:On.Kind.UNION_TYPE_EXTENSION,[On.Kind.ENUM_TYPE_DEFINITION]:On.Kind.ENUM_TYPE_EXTENSION,[On.Kind.INPUT_OBJECT_TYPE_DEFINITION]:On.Kind.INPUT_OBJECT_TYPE_EXTENSION};function VW(e){if((0,_l.isScalarType)(e))return On.Kind.SCALAR_TYPE_EXTENSION;if((0,_l.isObjectType)(e))return On.Kind.OBJECT_TYPE_EXTENSION;if((0,_l.isInterfaceType)(e))return On.Kind.INTERFACE_TYPE_EXTENSION;if((0,_l.isUnionType)(e))return On.Kind.UNION_TYPE_EXTENSION;if((0,_l.isEnumType)(e))return On.Kind.ENUM_TYPE_EXTENSION;if((0,_l.isInputObjectType)(e))return On.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,zw.invariant)(!1,"Unexpected type: "+(0,Hw.inspect)(e))}function jW(e){switch(e){case On.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case On.Kind.OBJECT_TYPE_EXTENSION:return"object";case On.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case On.Kind.UNION_TYPE_EXTENSION:return"union";case On.Kind.ENUM_TYPE_EXTENSION:return"enum";case On.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,zw.invariant)(!1,"Unexpected kind: "+(0,Hw.inspect)(e))}}});var Jg=w(PN=>{"use strict";m();T();N();Object.defineProperty(PN,"__esModule",{value:!0});PN.ProvidedRequiredArgumentsOnDirectivesRule=tL;PN.ProvidedRequiredArgumentsRule=$W;var Xw=Wt(),Ww=du(),Zw=ze(),eL=wt(),KW=pi(),Yg=Lt(),GW=Wr();function $W(e){return Q(M({},tL(e)),{Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return!1;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(let a of r.args)if(!i.has(a.name)&&(0,Yg.isRequiredArgument)(a)){let o=(0,Xw.inspect)(a.type);e.reportError(new Zw.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function tL(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:GW.specifiedDirectives;for(let c of i)n[c.name]=(0,Ww.keyMap)(c.args.filter(Yg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let c of a)if(c.kind===eL.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=c.arguments)!==null&&o!==void 0?o:[];n[c.name.value]=(0,Ww.keyMap)(l.filter(QW),d=>d.name.value)}return{Directive:{leave(c){let l=c.name.value,d=n[l];if(d){var p;let E=(p=c.arguments)!==null&&p!==void 0?p:[],I=new Set(E.map(v=>v.name.value));for(let[v,A]of Object.entries(d))if(!I.has(v)){let U=(0,Yg.isType)(A.type)?(0,Xw.inspect)(A.type):(0,KW.print)(A.type);e.reportError(new Zw.GraphQLError(`Directive "@${l}" argument "${v}" of type "${U}" is required, but it was not provided.`,{nodes:c}))}}}}}}function QW(e){return e.type.kind===eL.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var zg=w(Hg=>{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.ScalarLeafsRule=YW;var nL=Wt(),rL=ze(),iL=Lt();function YW(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,iL.isLeafType)((0,iL.getNamedType)(n))){if(r){let i=t.name.value,a=(0,nL.inspect)(n);e.reportError(new rL.GraphQLError(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,a=(0,nL.inspect)(n);e.reportError(new rL.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var Xg=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.printPathArray=JW;function JW(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var Ef=w(FN=>{"use strict";m();T();N();Object.defineProperty(FN,"__esModule",{value:!0});FN.addPath=HW;FN.pathToArray=zW;function HW(e,t,n){return{prev:e,key:t,typename:n}}function zW(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var e_=w(Zg=>{"use strict";m();T();N();Object.defineProperty(Zg,"__esModule",{value:!0});Zg.coerceInputValue=r4;var WW=lu(),wN=Wt(),XW=br(),ZW=IN(),e4=Ba(),da=Ef(),t4=Xg(),n4=fu(),Ss=ze(),hf=Lt();function r4(e,t,n=i4){return yf(e,t,n,void 0)}function i4(e,t,n){let r="Invalid value "+(0,wN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,t4.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function yf(e,t,n,r){if((0,hf.isNonNullType)(t)){if(e!=null)return yf(e,t.ofType,n,r);n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected non-nullable type "${(0,wN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,hf.isListType)(t)){let i=t.ofType;return(0,ZW.isIterableObject)(e)?Array.from(e,(a,o)=>{let c=(0,da.addPath)(r,o,void 0);return yf(a,i,n,c)}):[yf(e,i,n,r)]}if((0,hf.isInputObjectType)(t)){if(!(0,e4.isObjectLike)(e)){n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},a=t.getFields();for(let o of Object.values(a)){let c=e[o.name];if(c===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,hf.isNonNullType)(o.type)){let l=(0,wN.inspect)(o.type);n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=yf(c,o.type,n,(0,da.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let c=(0,n4.suggestionList)(o,Object.keys(t.getFields()));n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,WW.didYouMean)(c)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let c=o[0],l=i[c];l===null&&n((0,da.pathToArray)(r).concat(c),l,new Ss.GraphQLError(`Field "${c}" must be non-null.`))}return i}if((0,hf.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof Ss.GraphQLError?n((0,da.pathToArray)(r),e,a):n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,da.pathToArray)(r),e,new Ss.GraphQLError(`Expected type "${t.name}".`)),i}(0,XW.invariant)(!1,"Unexpected input type: "+(0,wN.inspect)(t))}});var gf=w(t_=>{"use strict";m();T();N();Object.defineProperty(t_,"__esModule",{value:!0});t_.valueFromAST=If;var a4=Wt(),s4=br(),o4=du(),vl=wt(),fc=Lt();function If(e,t,n){if(e){if(e.kind===vl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,fc.isNonNullType)(t)?void 0:i}if((0,fc.isNonNullType)(t))return e.kind===vl.Kind.NULL?void 0:If(e,t.ofType,n);if(e.kind===vl.Kind.NULL)return null;if((0,fc.isListType)(t)){let r=t.ofType;if(e.kind===vl.Kind.LIST){let a=[];for(let o of e.values)if(aL(o,n)){if((0,fc.isNonNullType)(r))return;a.push(null)}else{let c=If(o,r,n);if(c===void 0)return;a.push(c)}return a}let i=If(e,r,n);return i===void 0?void 0:[i]}if((0,fc.isInputObjectType)(t)){if(e.kind!==vl.Kind.OBJECT)return;let r=Object.create(null),i=(0,o4.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||aL(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,fc.isNonNullType)(a.type))return;continue}let c=If(o.value,a.type,n);if(c===void 0)return;r[a.name]=c}if(t.isOneOf){let a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if((0,fc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,s4.invariant)(!1,"Unexpected input type: "+(0,a4.inspect)(t))}}function aL(e,t){return e.kind===vl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var Dl=w(_f=>{"use strict";m();T();N();Object.defineProperty(_f,"__esModule",{value:!0});_f.getArgumentValues=cL;_f.getDirectiveValues=m4;_f.getVariableValues=f4;var Ol=Wt(),u4=du(),c4=Xg(),Ds=ze(),sL=wt(),oL=pi(),Sl=Lt(),l4=e_(),d4=qa(),uL=gf();function f4(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=p4(e,t,n,c=>{if(a!=null&&i.length>=a)throw new Ds.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");i.push(c)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function p4(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,c=(0,d4.typeFromAST)(e,a.type);if(!(0,Sl.isInputType)(c)){let d=(0,oL.print)(a.type);r(new Ds.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!lL(n,o)){if(a.defaultValue)i[o]=(0,uL.valueFromAST)(a.defaultValue,c);else if((0,Sl.isNonNullType)(c)){let d=(0,Ol.inspect)(c);r(new Ds.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,Sl.isNonNullType)(c)){let d=(0,Ol.inspect)(c);r(new Ds.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,l4.coerceInputValue)(l,c,(d,p,E)=>{let I=`Variable "$${o}" got invalid value `+(0,Ol.inspect)(p);d.length>0&&(I+=` at "${o}${(0,c4.printPathArray)(d)}"`),r(new Ds.GraphQLError(I+"; "+E.message,{nodes:a,originalError:E}))})}return i}function cL(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,u4.keyMap)(a,c=>c.name.value);for(let c of e.args){let l=c.name,d=c.type,p=o[l];if(!p){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,Sl.isNonNullType)(d))throw new Ds.GraphQLError(`Argument "${l}" of required type "${(0,Ol.inspect)(d)}" was not provided.`,{nodes:t});continue}let E=p.value,I=E.kind===sL.Kind.NULL;if(E.kind===sL.Kind.VARIABLE){let A=E.name.value;if(n==null||!lL(n,A)){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,Sl.isNonNullType)(d))throw new Ds.GraphQLError(`Argument "${l}" of required type "${(0,Ol.inspect)(d)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:E});continue}I=n[A]==null}if(I&&(0,Sl.isNonNullType)(d))throw new Ds.GraphQLError(`Argument "${l}" of non-null type "${(0,Ol.inspect)(d)}" must not be null.`,{nodes:E});let v=(0,uL.valueFromAST)(E,d,n);if(v===void 0)throw new Ds.GraphQLError(`Argument "${l}" has invalid value ${(0,oL.print)(E)}.`,{nodes:E});i[l]=v}return i}function m4(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return cL(e,i,n)}function lL(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var BN=w(CN=>{"use strict";m();T();N();Object.defineProperty(CN,"__esModule",{value:!0});CN.collectFields=E4;CN.collectSubfields=h4;var n_=wt(),N4=Lt(),dL=Wr(),T4=qa(),fL=Dl();function E4(e,t,n,r,i){let a=new Map;return LN(e,t,n,r,i,a,new Set),a}function h4(e,t,n,r,i){let a=new Map,o=new Set;for(let c of i)c.selectionSet&&LN(e,t,n,r,c.selectionSet,a,o);return a}function LN(e,t,n,r,i,a,o){for(let c of i.selections)switch(c.kind){case n_.Kind.FIELD:{if(!r_(n,c))continue;let l=y4(c),d=a.get(l);d!==void 0?d.push(c):a.set(l,[c]);break}case n_.Kind.INLINE_FRAGMENT:{if(!r_(n,c)||!pL(e,c,r))continue;LN(e,t,n,r,c.selectionSet,a,o);break}case n_.Kind.FRAGMENT_SPREAD:{let l=c.name.value;if(o.has(l)||!r_(n,c))continue;o.add(l);let d=t[l];if(!d||!pL(e,d,r))continue;LN(e,t,n,r,d.selectionSet,a,o);break}}}function r_(e,t){let n=(0,fL.getDirectiveValues)(dL.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,fL.getDirectiveValues)(dL.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function pL(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,T4.typeFromAST)(e,r);return i===n?!0:(0,N4.isAbstractType)(i)?e.isSubType(i,n):!1}function y4(e){return e.alias?e.alias.value:e.name.value}});var a_=w(i_=>{"use strict";m();T();N();Object.defineProperty(i_,"__esModule",{value:!0});i_.SingleFieldSubscriptionsRule=_4;var mL=ze(),I4=wt(),g4=BN();function _4(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,a=Object.create(null),o=e.getDocument(),c=Object.create(null);for(let d of o.definitions)d.kind===I4.Kind.FRAGMENT_DEFINITION&&(c[d.name.value]=d);let l=(0,g4.collectFields)(n,c,a,r,t.selectionSet);if(l.size>1){let E=[...l.values()].slice(1).flat();e.reportError(new mL.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:E}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new mL.GraphQLError(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}});var UN=w(s_=>{"use strict";m();T();N();Object.defineProperty(s_,"__esModule",{value:!0});s_.groupBy=v4;function v4(e,t){let n=new Map;for(let r of e){let i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}});var u_=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.UniqueArgumentDefinitionNamesRule=D4;var O4=UN(),S4=ze();function D4(e){return{DirectiveDefinition(r){var i;let a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let a=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let l of o){var c;let d=l.name.value,p=(c=l.arguments)!==null&&c!==void 0?c:[];n(`${a}.${d}`,p)}return!1}function n(r,i){let a=(0,O4.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new S4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:c.map(l=>l.name)}));return!1}}});var l_=w(c_=>{"use strict";m();T();N();Object.defineProperty(c_,"__esModule",{value:!0});c_.UniqueArgumentNamesRule=R4;var b4=UN(),A4=ze();function R4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,b4.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new A4.GraphQLError(`There can be only one argument named "${o}".`,{nodes:c.map(l=>l.name)}))}}});var f_=w(d_=>{"use strict";m();T();N();Object.defineProperty(d_,"__esModule",{value:!0});d_.UniqueDirectiveNamesRule=P4;var NL=ze();function P4(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new NL.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new NL.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var N_=w(m_=>{"use strict";m();T();N();Object.defineProperty(m_,"__esModule",{value:!0});m_.UniqueDirectivesPerLocationRule=L4;var F4=ze(),p_=wt(),TL=dc(),w4=Wr();function L4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():w4.specifiedDirectives;for(let c of r)t[c.name]=!c.isRepeatable;let i=e.getDocument().definitions;for(let c of i)c.kind===p_.Kind.DIRECTIVE_DEFINITION&&(t[c.name.value]=!c.repeatable);let a=Object.create(null),o=Object.create(null);return{enter(c){if(!("directives"in c)||!c.directives)return;let l;if(c.kind===p_.Kind.SCHEMA_DEFINITION||c.kind===p_.Kind.SCHEMA_EXTENSION)l=a;else if((0,TL.isTypeDefinitionNode)(c)||(0,TL.isTypeExtensionNode)(c)){let d=c.name.value;l=o[d],l===void 0&&(o[d]=l=Object.create(null))}else l=Object.create(null);for(let d of c.directives){let p=d.name.value;t[p]&&(l[p]?e.reportError(new F4.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var E_=w(T_=>{"use strict";m();T();N();Object.defineProperty(T_,"__esModule",{value:!0});T_.UniqueEnumValueNamesRule=B4;var EL=ze(),C4=Lt();function B4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o;let c=a.name.value;r[c]||(r[c]=Object.create(null));let l=(o=a.values)!==null&&o!==void 0?o:[],d=r[c];for(let p of l){let E=p.name.value,I=n[c];(0,C4.isEnumType)(I)&&I.getValue(E)?e.reportError(new EL.GraphQLError(`Enum value "${c}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new EL.GraphQLError(`Enum value "${c}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}});var I_=w(y_=>{"use strict";m();T();N();Object.defineProperty(y_,"__esModule",{value:!0});y_.UniqueFieldDefinitionNamesRule=U4;var hL=ze(),h_=Lt();function U4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(a){var o;let c=a.name.value;r[c]||(r[c]=Object.create(null));let l=(o=a.fields)!==null&&o!==void 0?o:[],d=r[c];for(let p of l){let E=p.name.value;k4(n[c],E)?e.reportError(new hL.GraphQLError(`Field "${c}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new hL.GraphQLError(`Field "${c}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}function k4(e,t){return(0,h_.isObjectType)(e)||(0,h_.isInterfaceType)(e)||(0,h_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var __=w(g_=>{"use strict";m();T();N();Object.defineProperty(g_,"__esModule",{value:!0});g_.UniqueFragmentNamesRule=x4;var M4=ze();function x4(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new M4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var O_=w(v_=>{"use strict";m();T();N();Object.defineProperty(v_,"__esModule",{value:!0});v_.UniqueInputFieldNamesRule=j4;var q4=br(),V4=ze();function j4(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,q4.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new V4.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var D_=w(S_=>{"use strict";m();T();N();Object.defineProperty(S_,"__esModule",{value:!0});S_.UniqueOperationNamesRule=G4;var K4=ze();function G4(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new K4.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.UniqueOperationTypesRule=$4;var yL=ze();function $4(e){let t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(a){var o;let c=(o=a.operationTypes)!==null&&o!==void 0?o:[];for(let l of c){let d=l.operation,p=n[d];r[d]?e.reportError(new yL.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new yL.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.UniqueTypeNamesRule=Q4;var IL=ze();function Q4(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new IL.GraphQLError(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new IL.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var w_=w(F_=>{"use strict";m();T();N();Object.defineProperty(F_,"__esModule",{value:!0});F_.UniqueVariableNamesRule=H4;var Y4=UN(),J4=ze();function H4(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,Y4.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new J4.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(c=>c.variable.name)}))}}}});var B_=w(C_=>{"use strict";m();T();N();Object.defineProperty(C_,"__esModule",{value:!0});C_.ValuesOfCorrectTypeRule=Z4;var z4=lu(),vf=Wt(),W4=du(),X4=fu(),ja=ze(),L_=wt(),kN=pi(),Va=Lt();function Z4(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Va.getNullableType)(e.getParentInputType());if(!(0,Va.isListType)(r))return pc(e,n),!1},ObjectValue(n){let r=(0,Va.getNamedType)(e.getInputType());if(!(0,Va.isInputObjectType)(r))return pc(e,n),!1;let i=(0,W4.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Va.isRequiredInputField)(a)){let c=(0,vf.inspect)(a.type);e.reportError(new ja.GraphQLError(`Field "${r.name}.${a.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&e8(e,n,r,i,t)},ObjectField(n){let r=(0,Va.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Va.isInputObjectType)(r)){let a=(0,X4.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new ja.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,z4.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Va.isNonNullType)(r)&&e.reportError(new ja.GraphQLError(`Expected value of type "${(0,vf.inspect)(r)}", found ${(0,kN.print)(n)}.`,{nodes:n}))},EnumValue:n=>pc(e,n),IntValue:n=>pc(e,n),FloatValue:n=>pc(e,n),StringValue:n=>pc(e,n),BooleanValue:n=>pc(e,n)}}function pc(e,t){let n=e.getInputType();if(!n)return;let r=(0,Va.getNamedType)(n);if(!(0,Va.isLeafType)(r)){let i=(0,vf.inspect)(n);e.reportError(new ja.GraphQLError(`Expected value of type "${i}", found ${(0,kN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,vf.inspect)(n);e.reportError(new ja.GraphQLError(`Expected value of type "${a}", found ${(0,kN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,vf.inspect)(n);i instanceof ja.GraphQLError?e.reportError(i):e.reportError(new ja.GraphQLError(`Expected value of type "${a}", found ${(0,kN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function e8(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new ja.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(a=r[o[0]])===null||a===void 0?void 0:a.value,d=!l||l.kind===L_.Kind.NULL,p=(l==null?void 0:l.kind)===L_.Kind.VARIABLE;if(d){e.reportError(new ja.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let E=l.name.value;i[E].type.kind!==L_.Kind.NON_NULL_TYPE&&e.reportError(new ja.GraphQLError(`Variable "${E}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var k_=w(U_=>{"use strict";m();T();N();Object.defineProperty(U_,"__esModule",{value:!0});U_.VariablesAreInputTypesRule=a8;var t8=ze(),n8=pi(),r8=Lt(),i8=qa();function a8(e){return{VariableDefinition(t){let n=(0,i8.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,r8.isInputType)(n)){let r=t.variable.name.value,i=(0,n8.print)(t.type);e.reportError(new t8.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var x_=w(M_=>{"use strict";m();T();N();Object.defineProperty(M_,"__esModule",{value:!0});M_.VariablesInAllowedPositionRule=c8;var gL=Wt(),s8=ze(),o8=wt(),_L=Lt(),vL=rf(),u8=qa();function c8(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:a,defaultValue:o}of r){let c=i.name.value,l=t[c];if(l&&a){let d=e.getSchema(),p=(0,u8.typeFromAST)(d,l.type);if(p&&!l8(d,p,l.defaultValue,a,o)){let E=(0,gL.inspect)(p),I=(0,gL.inspect)(a);e.reportError(new s8.GraphQLError(`Variable "$${c}" of type "${E}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function l8(e,t,n,r,i){if((0,_L.isNonNullType)(r)&&!(0,_L.isNonNullType)(t)){if(!(n!=null&&n.kind!==o8.Kind.NULL)&&!(i!==void 0))return!1;let c=r.ofType;return(0,vL.isTypeSubTypeOf)(e,t,c)}return(0,vL.isTypeSubTypeOf)(e,t,r)}});var q_=w(Tu=>{"use strict";m();T();N();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.specifiedSDLRules=Tu.specifiedRules=Tu.recommendedRules=void 0;var d8=rg(),f8=ag(),p8=og(),OL=ug(),SL=fg(),m8=mg(),DL=Eg(),N8=yg(),T8=gg(),E8=vg(),h8=Sg(),y8=bg(),I8=Rg(),g8=Fg(),_8=Vg(),v8=Gg(),O8=Qg(),bL=Jg(),S8=zg(),D8=a_(),b8=u_(),AL=l_(),A8=f_(),RL=N_(),R8=E_(),P8=I_(),F8=__(),PL=O_(),w8=D_(),L8=A_(),C8=P_(),B8=w_(),U8=B_(),k8=k_(),M8=x_(),FL=Object.freeze([E8.MaxIntrospectionDepthRule]);Tu.recommendedRules=FL;var x8=Object.freeze([d8.ExecutableDefinitionsRule,w8.UniqueOperationNamesRule,N8.LoneAnonymousOperationRule,D8.SingleFieldSubscriptionsRule,DL.KnownTypeNamesRule,p8.FragmentsOnCompositeTypesRule,k8.VariablesAreInputTypesRule,S8.ScalarLeafsRule,f8.FieldsOnCorrectTypeRule,F8.UniqueFragmentNamesRule,m8.KnownFragmentNamesRule,I8.NoUnusedFragmentsRule,v8.PossibleFragmentSpreadsRule,h8.NoFragmentCyclesRule,B8.UniqueVariableNamesRule,y8.NoUndefinedVariablesRule,g8.NoUnusedVariablesRule,SL.KnownDirectivesRule,RL.UniqueDirectivesPerLocationRule,OL.KnownArgumentNamesRule,AL.UniqueArgumentNamesRule,U8.ValuesOfCorrectTypeRule,bL.ProvidedRequiredArgumentsRule,M8.VariablesInAllowedPositionRule,_8.OverlappingFieldsCanBeMergedRule,PL.UniqueInputFieldNamesRule,...FL]);Tu.specifiedRules=x8;var q8=Object.freeze([T8.LoneSchemaDefinitionRule,L8.UniqueOperationTypesRule,C8.UniqueTypeNamesRule,R8.UniqueEnumValueNamesRule,P8.UniqueFieldDefinitionNamesRule,b8.UniqueArgumentDefinitionNamesRule,A8.UniqueDirectiveNamesRule,DL.KnownTypeNamesRule,SL.KnownDirectivesRule,RL.UniqueDirectivesPerLocationRule,O8.PossibleTypeExtensionsRule,OL.KnownArgumentNamesOnDirectivesRule,AL.UniqueArgumentNamesRule,PL.UniqueInputFieldNamesRule,bL.ProvidedRequiredArgumentsOnDirectivesRule]);Tu.specifiedSDLRules=q8});var K_=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.ValidationContext=Eu.SDLValidationContext=Eu.ASTValidationContext=void 0;var wL=wt(),V8=rc(),LL=ON(),Of=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===wL.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let a of i.selections)a.kind===wL.Kind.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],a;for(;a=i.pop();)for(let o of this.getFragmentSpreads(a)){let c=o.name.value;if(r[c]!==!0){r[c]=!0;let l=this.getFragment(c);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}};Eu.ASTValidationContext=Of;var V_=class extends Of{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};Eu.SDLValidationContext=V_;var j_=class extends Of{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new LL.TypeInfo(this._schema);(0,V8.visit)(t,(0,LL.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}};Eu.ValidationContext=j_});var Al=w(bl=>{"use strict";m();T();N();Object.defineProperty(bl,"__esModule",{value:!0});bl.assertValidSDL=Q8;bl.assertValidSDLExtension=Y8;bl.validate=$8;bl.validateSDL=G_;var j8=qr(),K8=ze(),MN=rc(),G8=mf(),CL=ON(),BL=q_(),UL=K_();function $8(e,t,n=BL.specifiedRules,r,i=new CL.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,j8.devAssert)(!1,"Must provide document."),(0,G8.assertValidSchema)(e);let c=Object.freeze({}),l=[],d=new UL.ValidationContext(e,t,i,E=>{if(l.length>=o)throw l.push(new K8.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),c;l.push(E)}),p=(0,MN.visitInParallel)(n.map(E=>E(d)));try{(0,MN.visit)(t,(0,CL.visitWithTypeInfo)(i,p))}catch(E){if(E!==c)throw E}return l}function G_(e,t,n=BL.specifiedSDLRules){let r=[],i=new UL.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,MN.visit)(e,(0,MN.visitInParallel)(a)),r}function Q8(e){let t=G_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}function $8(e,t){let n=K_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` +`))}function Y8(e,t){let n=G_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}});var BL=w(G_=>{"use strict";m();T();N();Object.defineProperty(G_,"__esModule",{value:!0});G_.memoize3=Q8;function Q8(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let c=o.get(i);c===void 0&&(c=new WeakMap,o.set(i,c));let l=c.get(a);return l===void 0&&(l=e(r,i,a),c.set(a,l)),l}}});var UL=w($_=>{"use strict";m();T();N();Object.defineProperty($_,"__esModule",{value:!0});$_.promiseForObject=Y8;function Y8(e){return Promise.all(Object.values(e)).then(t=>{let n=Object.create(null);for(let[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}});var kL=w(Q_=>{"use strict";m();T();N();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.promiseReduce=H8;var J8=Mm();function H8(e,t,n){let r=n;for(let i of e)r=(0,J8.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var ML=w(J_=>{"use strict";m();T();N();Object.defineProperty(J_,"__esModule",{value:!0});J_.toError=W8;var z8=Wt();function W8(e){return e instanceof Error?e:new Y_(e)}var Y_=class extends Error{constructor(t){super("Unexpected error value: "+(0,z8.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var kN=w(H_=>{"use strict";m();T();N();Object.defineProperty(H_,"__esModule",{value:!0});H_.locatedError=eX;var X8=ML(),Z8=ze();function eX(e,t,n){var r;let i=(0,X8.toError)(e);return tX(i)?i:new Z8.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function tX(e){return Array.isArray(e.path)}});var Sf=w(Ui=>{"use strict";m();T();N();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.assertValidExecutionArguments=QL;Ui.buildExecutionContext=YL;Ui.buildResolveInfo=HL;Ui.defaultTypeResolver=Ui.defaultFieldResolver=void 0;Ui.execute=$L;Ui.executeSync=uX;Ui.getFieldDef=WL;var W_=qr(),pc=Wt(),nX=br(),rX=hN(),ev=Ba(),fa=Mm(),iX=BL(),mc=Tf(),xL=UL(),aX=kL(),Bi=ze(),xN=kN(),z_=Ua(),qL=wt(),Eu=Lt(),Al=Li(),sX=pf(),KL=LN(),GL=Sl(),oX=(0,iX.memoize3)((e,t,n)=>(0,KL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function $L(e){arguments.length<2||(0,W_.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:n,variableValues:r,rootValue:i}=e;QL(t,n,r);let a=YL(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,c=cX(a,o,i);return(0,fa.isPromise)(c)?c.then(l=>MN(l,a.errors),l=>(a.errors.push(l),MN(null,a.errors))):MN(c,a.errors)}catch(o){return a.errors.push(o),MN(null,a.errors)}}function uX(e){let t=$L(e);if((0,fa.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function MN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function QL(e,t,n){t||(0,W_.devAssert)(!1,"Must provide document."),(0,sX.assertValidSchema)(e),n==null||(0,ev.isObjectLike)(n)||(0,W_.devAssert)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function YL(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:c,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:E}=e,I,v=Object.create(null);for(let j of i.definitions)switch(j.kind){case qL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new Bi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(I=j);break;case qL.Kind.FRAGMENT_DEFINITION:v[j.name.value]=j;break;default:}if(!I)return l!=null?[new Bi.GraphQLError(`Unknown operation named "${l}".`)]:[new Bi.GraphQLError("Must provide an operation.")];let A=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],U=(0,GL.getVariableValues)(r,A,c!=null?c:{},{maxErrors:50});return U.errors?U.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:U.coerced,fieldResolver:d!=null?d:Z_,typeResolver:p!=null?p:zL,subscribeFieldResolver:E!=null?E:Z_,errors:[]}}function cX(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Bi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,KL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case z_.OperationTypeNode.QUERY:return qN(e,r,n,a,i);case z_.OperationTypeNode.MUTATION:return lX(e,r,n,a,i);case z_.OperationTypeNode.SUBSCRIPTION:return qN(e,r,n,a,i)}}function lX(e,t,n,r,i){return(0,aX.promiseReduce)(i.entries(),(a,[o,c])=>{let l=(0,mc.addPath)(r,o,t.name),d=JL(e,t,n,c,l);return d===void 0?a:(0,fa.isPromise)(d)?d.then(p=>(a[o]=p,a)):(a[o]=d,a)},Object.create(null))}function qN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[c,l]of i.entries()){let d=(0,mc.addPath)(r,c,t.name),p=JL(e,t,n,l,d);p!==void 0&&(a[c]=p,(0,fa.isPromise)(p)&&(o=!0))}}catch(c){if(o)return(0,xL.promiseForObject)(a).finally(()=>{throw c});throw c}return o?(0,xL.promiseForObject)(a):a}function JL(e,t,n,r,i){var a;let o=WL(e.schema,t,r[0]);if(!o)return;let c=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=HL(e,o,r,t,i);try{let p=(0,GL.getArgumentValues)(o,r[0],e.variableValues),E=e.contextValue,I=l(n,p,E,d),v;return(0,fa.isPromise)(I)?v=I.then(A=>Of(e,c,r,d,i,A)):v=Of(e,c,r,d,i,I),(0,fa.isPromise)(v)?v.then(void 0,A=>{let U=(0,xN.locatedError)(A,r,(0,mc.pathToArray)(i));return VN(U,c,e)}):v}catch(p){let E=(0,xN.locatedError)(p,r,(0,mc.pathToArray)(i));return VN(E,c,e)}}function HL(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function VN(e,t,n){if((0,Eu.isNonNullType)(t))throw e;return n.errors.push(e),null}function Of(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,Eu.isNonNullType)(t)){let o=Of(e,t.ofType,n,r,i,a);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(a==null)return null;if((0,Eu.isListType)(t))return dX(e,t,n,r,i,a);if((0,Eu.isLeafType)(t))return fX(t,a);if((0,Eu.isAbstractType)(t))return pX(e,t,n,r,i,a);if((0,Eu.isObjectType)(t))return X_(e,t,n,r,i,a);(0,nX.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,pc.inspect)(t))}function dX(e,t,n,r,i,a){if(!(0,rX.isIterableObject)(a))throw new Bi.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,c=!1,l=Array.from(a,(d,p)=>{let E=(0,mc.addPath)(i,p,void 0);try{let I;return(0,fa.isPromise)(d)?I=d.then(v=>Of(e,o,n,r,E,v)):I=Of(e,o,n,r,E,d),(0,fa.isPromise)(I)?(c=!0,I.then(void 0,v=>{let A=(0,xN.locatedError)(v,n,(0,mc.pathToArray)(E));return VN(A,o,e)})):I}catch(I){let v=(0,xN.locatedError)(I,n,(0,mc.pathToArray)(E));return VN(v,o,e)}});return c?Promise.all(l):l}function fX(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,pc.inspect)(e)}.serialize(${(0,pc.inspect)(t)})\` to return non-nullable value, returned: ${(0,pc.inspect)(n)}`);return n}function pX(e,t,n,r,i,a){var o;let c=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=c(a,l,r,t);return(0,fa.isPromise)(d)?d.then(p=>X_(e,VL(p,e,t,n,r,a),n,r,i,a)):X_(e,VL(d,e,t,n,r,a),n,r,i,a)}function VL(e,t,n,r,i,a){if(e==null)throw new Bi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if((0,Eu.isObjectType)(e))throw new Bi.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new Bi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,pc.inspect)(a)}, received "${(0,pc.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Bi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,Eu.isObjectType)(o))throw new Bi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Bi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function X_(e,t,n,r,i,a){let o=oX(e,t,n);if(t.isTypeOf){let c=t.isTypeOf(a,e.contextValue,r);if((0,fa.isPromise)(c))return c.then(l=>{if(!l)throw jL(t,a,n);return qN(e,t,a,i,o)});if(!c)throw jL(t,a,n)}return qN(e,t,a,i,o)}function jL(e,t,n){return new Bi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,pc.inspect)(t)}.`,{nodes:n})}var zL=function(e,t,n,r){if((0,ev.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),a=[];for(let o=0;o{for(let c=0;c{"use strict";m();T();N();Object.defineProperty(jN,"__esModule",{value:!0});jN.graphql=IX;jN.graphqlSync=gX;var mX=qr(),NX=Mm(),TX=Nl(),EX=pf(),hX=bl(),yX=Sf();function IX(e){return new Promise(t=>t(XL(e)))}function gX(e){let t=XL(e);if((0,NX.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function XL(e){arguments.length<2||(0,mX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l}=e,d=(0,EX.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,TX.parse)(n)}catch(I){return{errors:[I]}}let E=(0,hX.validate)(t,p);return E.length>0?{errors:E}:(0,yX.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l})}});var nC=w(he=>{"use strict";m();T();N();Object.defineProperty(he,"__esModule",{value:!0});Object.defineProperty(he,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return pa.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(he,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return bs.GRAPHQL_MAX_INT}});Object.defineProperty(he,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return bs.GRAPHQL_MIN_INT}});Object.defineProperty(he,"GraphQLBoolean",{enumerable:!0,get:function(){return bs.GraphQLBoolean}});Object.defineProperty(he,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return pa.GraphQLDeprecatedDirective}});Object.defineProperty(he,"GraphQLDirective",{enumerable:!0,get:function(){return pa.GraphQLDirective}});Object.defineProperty(he,"GraphQLEnumType",{enumerable:!0,get:function(){return at.GraphQLEnumType}});Object.defineProperty(he,"GraphQLFloat",{enumerable:!0,get:function(){return bs.GraphQLFloat}});Object.defineProperty(he,"GraphQLID",{enumerable:!0,get:function(){return bs.GraphQLID}});Object.defineProperty(he,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return pa.GraphQLIncludeDirective}});Object.defineProperty(he,"GraphQLInputObjectType",{enumerable:!0,get:function(){return at.GraphQLInputObjectType}});Object.defineProperty(he,"GraphQLInt",{enumerable:!0,get:function(){return bs.GraphQLInt}});Object.defineProperty(he,"GraphQLInterfaceType",{enumerable:!0,get:function(){return at.GraphQLInterfaceType}});Object.defineProperty(he,"GraphQLList",{enumerable:!0,get:function(){return at.GraphQLList}});Object.defineProperty(he,"GraphQLNonNull",{enumerable:!0,get:function(){return at.GraphQLNonNull}});Object.defineProperty(he,"GraphQLObjectType",{enumerable:!0,get:function(){return at.GraphQLObjectType}});Object.defineProperty(he,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return pa.GraphQLOneOfDirective}});Object.defineProperty(he,"GraphQLScalarType",{enumerable:!0,get:function(){return at.GraphQLScalarType}});Object.defineProperty(he,"GraphQLSchema",{enumerable:!0,get:function(){return tv.GraphQLSchema}});Object.defineProperty(he,"GraphQLSkipDirective",{enumerable:!0,get:function(){return pa.GraphQLSkipDirective}});Object.defineProperty(he,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return pa.GraphQLSpecifiedByDirective}});Object.defineProperty(he,"GraphQLString",{enumerable:!0,get:function(){return bs.GraphQLString}});Object.defineProperty(he,"GraphQLUnionType",{enumerable:!0,get:function(){return at.GraphQLUnionType}});Object.defineProperty(he,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Zr.SchemaMetaFieldDef}});Object.defineProperty(he,"TypeKind",{enumerable:!0,get:function(){return Zr.TypeKind}});Object.defineProperty(he,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Zr.TypeMetaFieldDef}});Object.defineProperty(he,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Zr.TypeNameMetaFieldDef}});Object.defineProperty(he,"__Directive",{enumerable:!0,get:function(){return Zr.__Directive}});Object.defineProperty(he,"__DirectiveLocation",{enumerable:!0,get:function(){return Zr.__DirectiveLocation}});Object.defineProperty(he,"__EnumValue",{enumerable:!0,get:function(){return Zr.__EnumValue}});Object.defineProperty(he,"__Field",{enumerable:!0,get:function(){return Zr.__Field}});Object.defineProperty(he,"__InputValue",{enumerable:!0,get:function(){return Zr.__InputValue}});Object.defineProperty(he,"__Schema",{enumerable:!0,get:function(){return Zr.__Schema}});Object.defineProperty(he,"__Type",{enumerable:!0,get:function(){return Zr.__Type}});Object.defineProperty(he,"__TypeKind",{enumerable:!0,get:function(){return Zr.__TypeKind}});Object.defineProperty(he,"assertAbstractType",{enumerable:!0,get:function(){return at.assertAbstractType}});Object.defineProperty(he,"assertCompositeType",{enumerable:!0,get:function(){return at.assertCompositeType}});Object.defineProperty(he,"assertDirective",{enumerable:!0,get:function(){return pa.assertDirective}});Object.defineProperty(he,"assertEnumType",{enumerable:!0,get:function(){return at.assertEnumType}});Object.defineProperty(he,"assertEnumValueName",{enumerable:!0,get:function(){return tC.assertEnumValueName}});Object.defineProperty(he,"assertInputObjectType",{enumerable:!0,get:function(){return at.assertInputObjectType}});Object.defineProperty(he,"assertInputType",{enumerable:!0,get:function(){return at.assertInputType}});Object.defineProperty(he,"assertInterfaceType",{enumerable:!0,get:function(){return at.assertInterfaceType}});Object.defineProperty(he,"assertLeafType",{enumerable:!0,get:function(){return at.assertLeafType}});Object.defineProperty(he,"assertListType",{enumerable:!0,get:function(){return at.assertListType}});Object.defineProperty(he,"assertName",{enumerable:!0,get:function(){return tC.assertName}});Object.defineProperty(he,"assertNamedType",{enumerable:!0,get:function(){return at.assertNamedType}});Object.defineProperty(he,"assertNonNullType",{enumerable:!0,get:function(){return at.assertNonNullType}});Object.defineProperty(he,"assertNullableType",{enumerable:!0,get:function(){return at.assertNullableType}});Object.defineProperty(he,"assertObjectType",{enumerable:!0,get:function(){return at.assertObjectType}});Object.defineProperty(he,"assertOutputType",{enumerable:!0,get:function(){return at.assertOutputType}});Object.defineProperty(he,"assertScalarType",{enumerable:!0,get:function(){return at.assertScalarType}});Object.defineProperty(he,"assertSchema",{enumerable:!0,get:function(){return tv.assertSchema}});Object.defineProperty(he,"assertType",{enumerable:!0,get:function(){return at.assertType}});Object.defineProperty(he,"assertUnionType",{enumerable:!0,get:function(){return at.assertUnionType}});Object.defineProperty(he,"assertValidSchema",{enumerable:!0,get:function(){return eC.assertValidSchema}});Object.defineProperty(he,"assertWrappingType",{enumerable:!0,get:function(){return at.assertWrappingType}});Object.defineProperty(he,"getNamedType",{enumerable:!0,get:function(){return at.getNamedType}});Object.defineProperty(he,"getNullableType",{enumerable:!0,get:function(){return at.getNullableType}});Object.defineProperty(he,"introspectionTypes",{enumerable:!0,get:function(){return Zr.introspectionTypes}});Object.defineProperty(he,"isAbstractType",{enumerable:!0,get:function(){return at.isAbstractType}});Object.defineProperty(he,"isCompositeType",{enumerable:!0,get:function(){return at.isCompositeType}});Object.defineProperty(he,"isDirective",{enumerable:!0,get:function(){return pa.isDirective}});Object.defineProperty(he,"isEnumType",{enumerable:!0,get:function(){return at.isEnumType}});Object.defineProperty(he,"isInputObjectType",{enumerable:!0,get:function(){return at.isInputObjectType}});Object.defineProperty(he,"isInputType",{enumerable:!0,get:function(){return at.isInputType}});Object.defineProperty(he,"isInterfaceType",{enumerable:!0,get:function(){return at.isInterfaceType}});Object.defineProperty(he,"isIntrospectionType",{enumerable:!0,get:function(){return Zr.isIntrospectionType}});Object.defineProperty(he,"isLeafType",{enumerable:!0,get:function(){return at.isLeafType}});Object.defineProperty(he,"isListType",{enumerable:!0,get:function(){return at.isListType}});Object.defineProperty(he,"isNamedType",{enumerable:!0,get:function(){return at.isNamedType}});Object.defineProperty(he,"isNonNullType",{enumerable:!0,get:function(){return at.isNonNullType}});Object.defineProperty(he,"isNullableType",{enumerable:!0,get:function(){return at.isNullableType}});Object.defineProperty(he,"isObjectType",{enumerable:!0,get:function(){return at.isObjectType}});Object.defineProperty(he,"isOutputType",{enumerable:!0,get:function(){return at.isOutputType}});Object.defineProperty(he,"isRequiredArgument",{enumerable:!0,get:function(){return at.isRequiredArgument}});Object.defineProperty(he,"isRequiredInputField",{enumerable:!0,get:function(){return at.isRequiredInputField}});Object.defineProperty(he,"isScalarType",{enumerable:!0,get:function(){return at.isScalarType}});Object.defineProperty(he,"isSchema",{enumerable:!0,get:function(){return tv.isSchema}});Object.defineProperty(he,"isSpecifiedDirective",{enumerable:!0,get:function(){return pa.isSpecifiedDirective}});Object.defineProperty(he,"isSpecifiedScalarType",{enumerable:!0,get:function(){return bs.isSpecifiedScalarType}});Object.defineProperty(he,"isType",{enumerable:!0,get:function(){return at.isType}});Object.defineProperty(he,"isUnionType",{enumerable:!0,get:function(){return at.isUnionType}});Object.defineProperty(he,"isWrappingType",{enumerable:!0,get:function(){return at.isWrappingType}});Object.defineProperty(he,"resolveObjMapThunk",{enumerable:!0,get:function(){return at.resolveObjMapThunk}});Object.defineProperty(he,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return at.resolveReadonlyArrayThunk}});Object.defineProperty(he,"specifiedDirectives",{enumerable:!0,get:function(){return pa.specifiedDirectives}});Object.defineProperty(he,"specifiedScalarTypes",{enumerable:!0,get:function(){return bs.specifiedScalarTypes}});Object.defineProperty(he,"validateSchema",{enumerable:!0,get:function(){return eC.validateSchema}});var tv=uc(),at=Lt(),pa=Wr(),bs=xa(),Zr=Li(),eC=pf(),tC=Wd()});var iC=w(Ut=>{"use strict";m();T();N();Object.defineProperty(Ut,"__esModule",{value:!0});Object.defineProperty(Ut,"BREAK",{enumerable:!0,get:function(){return Df.BREAK}});Object.defineProperty(Ut,"DirectiveLocation",{enumerable:!0,get:function(){return AX.DirectiveLocation}});Object.defineProperty(Ut,"Kind",{enumerable:!0,get:function(){return OX.Kind}});Object.defineProperty(Ut,"Lexer",{enumerable:!0,get:function(){return DX.Lexer}});Object.defineProperty(Ut,"Location",{enumerable:!0,get:function(){return nv.Location}});Object.defineProperty(Ut,"OperationTypeNode",{enumerable:!0,get:function(){return nv.OperationTypeNode}});Object.defineProperty(Ut,"Source",{enumerable:!0,get:function(){return _X.Source}});Object.defineProperty(Ut,"Token",{enumerable:!0,get:function(){return nv.Token}});Object.defineProperty(Ut,"TokenKind",{enumerable:!0,get:function(){return SX.TokenKind}});Object.defineProperty(Ut,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Df.getEnterLeaveForKind}});Object.defineProperty(Ut,"getLocation",{enumerable:!0,get:function(){return vX.getLocation}});Object.defineProperty(Ut,"getVisitFn",{enumerable:!0,get:function(){return Df.getVisitFn}});Object.defineProperty(Ut,"isConstValueNode",{enumerable:!0,get:function(){return Ka.isConstValueNode}});Object.defineProperty(Ut,"isDefinitionNode",{enumerable:!0,get:function(){return Ka.isDefinitionNode}});Object.defineProperty(Ut,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ka.isExecutableDefinitionNode}});Object.defineProperty(Ut,"isSelectionNode",{enumerable:!0,get:function(){return Ka.isSelectionNode}});Object.defineProperty(Ut,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ka.isTypeDefinitionNode}});Object.defineProperty(Ut,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ka.isTypeExtensionNode}});Object.defineProperty(Ut,"isTypeNode",{enumerable:!0,get:function(){return Ka.isTypeNode}});Object.defineProperty(Ut,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ka.isTypeSystemDefinitionNode}});Object.defineProperty(Ut,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ka.isTypeSystemExtensionNode}});Object.defineProperty(Ut,"isValueNode",{enumerable:!0,get:function(){return Ka.isValueNode}});Object.defineProperty(Ut,"parse",{enumerable:!0,get:function(){return KN.parse}});Object.defineProperty(Ut,"parseConstValue",{enumerable:!0,get:function(){return KN.parseConstValue}});Object.defineProperty(Ut,"parseType",{enumerable:!0,get:function(){return KN.parseType}});Object.defineProperty(Ut,"parseValue",{enumerable:!0,get:function(){return KN.parseValue}});Object.defineProperty(Ut,"print",{enumerable:!0,get:function(){return bX.print}});Object.defineProperty(Ut,"printLocation",{enumerable:!0,get:function(){return rC.printLocation}});Object.defineProperty(Ut,"printSourceLocation",{enumerable:!0,get:function(){return rC.printSourceLocation}});Object.defineProperty(Ut,"visit",{enumerable:!0,get:function(){return Df.visit}});Object.defineProperty(Ut,"visitInParallel",{enumerable:!0,get:function(){return Df.visitInParallel}});var _X=Jm(),vX=xm(),rC=Xy(),OX=wt(),SX=Kd(),DX=Gm(),KN=Nl(),bX=pi(),Df=nc(),nv=Ua(),Ka=lc(),AX=pl()});var aC=w(rv=>{"use strict";m();T();N();Object.defineProperty(rv,"__esModule",{value:!0});rv.isAsyncIterable=RX;function RX(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var sC=w(iv=>{"use strict";m();T();N();Object.defineProperty(iv,"__esModule",{value:!0});iv.mapAsyncIterator=PX;function PX(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Ai(this,null,function*(){if(a.done)return a;try{return{value:yield t(a.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(c){}throw o}})}return{next(){return Ai(this,null,function*(){return r(yield n.next())})},return(){return Ai(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Ai(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var lC=w(GN=>{"use strict";m();T();N();Object.defineProperty(GN,"__esModule",{value:!0});GN.createSourceEventStream=cC;GN.subscribe=kX;var FX=qr(),wX=Wt(),uC=aC(),oC=Tf(),av=ze(),LX=kN(),CX=LN(),bf=Sf(),BX=sC(),UX=Sl();function kX(t){return Ai(this,arguments,function*(e){arguments.length<2||(0,FX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield cC(e);if(!(0,uC.isAsyncIterable)(n))return n;let r=i=>(0,bf.execute)(Q(M({},e),{rootValue:i}));return(0,BX.mapAsyncIterator)(n,r)})}function MX(e){let t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}function cC(...e){return Ai(this,null,function*(){let t=MX(e),{schema:n,document:r,variableValues:i}=t;(0,bf.assertValidExecutionArguments)(n,r,i);let a=(0,bf.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield xX(a);if(!(0,uC.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,wX.inspect)(o)}.`);return o}catch(o){if(o instanceof av.GraphQLError)return{errors:[o]};throw o}})}function xX(e){return Ai(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new av.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let c=(0,CX.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...c.entries()][0],p=(0,bf.getFieldDef)(t,o,d[0]);if(!p){let A=d[0].name.value;throw new av.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:d})}let E=(0,oC.addPath)(void 0,l,o.name),I=(0,bf.buildResolveInfo)(e,p,d,o,E);try{var v;let A=(0,UX.getArgumentValues)(p,d[0],i),U=e.contextValue,$=yield((v=p.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,A,U,I);if($ instanceof Error)throw $;return $}catch(A){throw(0,LX.locatedError)(A,d,(0,oC.pathToArray)(E))}})}});var fC=w(ki=>{"use strict";m();T();N();Object.defineProperty(ki,"__esModule",{value:!0});Object.defineProperty(ki,"createSourceEventStream",{enumerable:!0,get:function(){return dC.createSourceEventStream}});Object.defineProperty(ki,"defaultFieldResolver",{enumerable:!0,get:function(){return $N.defaultFieldResolver}});Object.defineProperty(ki,"defaultTypeResolver",{enumerable:!0,get:function(){return $N.defaultTypeResolver}});Object.defineProperty(ki,"execute",{enumerable:!0,get:function(){return $N.execute}});Object.defineProperty(ki,"executeSync",{enumerable:!0,get:function(){return $N.executeSync}});Object.defineProperty(ki,"getArgumentValues",{enumerable:!0,get:function(){return sv.getArgumentValues}});Object.defineProperty(ki,"getDirectiveValues",{enumerable:!0,get:function(){return sv.getDirectiveValues}});Object.defineProperty(ki,"getVariableValues",{enumerable:!0,get:function(){return sv.getVariableValues}});Object.defineProperty(ki,"responsePathAsArray",{enumerable:!0,get:function(){return qX.pathToArray}});Object.defineProperty(ki,"subscribe",{enumerable:!0,get:function(){return dC.subscribe}});var qX=Tf(),$N=Sf(),dC=lC(),sv=Sl()});var pC=w(cv=>{"use strict";m();T();N();Object.defineProperty(cv,"__esModule",{value:!0});cv.NoDeprecatedCustomRule=VX;var ov=br(),Af=ze(),uv=Lt();function VX(e){return{Field(t){let n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||(0,ov.invariant)(!1),e.reportError(new Af.GraphQLError(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new Af.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let a=e.getParentType(),o=e.getFieldDef();a!=null&&o!=null||(0,ov.invariant)(!1),e.reportError(new Af.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,uv.getNamedType)(e.getParentInputType());if((0,uv.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Af.GraphQLError(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=(0,uv.getNamedType)(e.getInputType());i!=null||(0,ov.invariant)(!1),e.reportError(new Af.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var mC=w(lv=>{"use strict";m();T();N();Object.defineProperty(lv,"__esModule",{value:!0});lv.NoSchemaIntrospectionCustomRule=$X;var jX=ze(),KX=Lt(),GX=Li();function $X(e){return{Field(t){let n=(0,KX.getNamedType)(e.getType());n&&(0,GX.isIntrospectionType)(n)&&e.reportError(new jX.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var TC=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return JX.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return HX.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return zX.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return WX.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return XX.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return ZX.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return e5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return t5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return g5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return I5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return R5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return n5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return P5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return r5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return i5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return a5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return s5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return o5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return A5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return u5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return c5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return l5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return D5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return d5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return b5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return f5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return O5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return S5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return p5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return m5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return N5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return _5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return v5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return T5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return YX.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return E5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return h5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return y5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return NC.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return NC.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return QX.validate}});var QX=bl(),YX=j_(),NC=x_(),JX=ng(),HX=ig(),zX=sg(),WX=og(),XX=dg(),ZX=pg(),e5=Tg(),t5=hg(),n5=Og(),r5=Dg(),i5=Ag(),a5=Pg(),s5=qg(),o5=Kg(),u5=Yg(),c5=Hg(),l5=i_(),d5=c_(),f5=m_(),p5=g_(),m5=v_(),N5=S_(),T5=F_(),E5=C_(),h5=U_(),y5=M_(),I5=_g(),g5=Ig(),_5=b_(),v5=R_(),O5=T_(),S5=y_(),D5=o_(),b5=d_(),A5=$g(),R5=pC(),P5=mC()});var EC=w(Nc=>{"use strict";m();T();N();Object.defineProperty(Nc,"__esModule",{value:!0});Object.defineProperty(Nc,"GraphQLError",{enumerable:!0,get:function(){return dv.GraphQLError}});Object.defineProperty(Nc,"formatError",{enumerable:!0,get:function(){return dv.formatError}});Object.defineProperty(Nc,"locatedError",{enumerable:!0,get:function(){return w5.locatedError}});Object.defineProperty(Nc,"printError",{enumerable:!0,get:function(){return dv.printError}});Object.defineProperty(Nc,"syntaxError",{enumerable:!0,get:function(){return F5.syntaxError}});var dv=ze(),F5=Vm(),w5=kN()});var pv=w(fv=>{"use strict";m();T();N();Object.defineProperty(fv,"__esModule",{value:!0});fv.getIntrospectionQuery=L5;function L5(e){let t=M({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let c=t.oneOf?"isOneOf":"";return` +`))}});var kL=w($_=>{"use strict";m();T();N();Object.defineProperty($_,"__esModule",{value:!0});$_.memoize3=J8;function J8(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let c=o.get(i);c===void 0&&(c=new WeakMap,o.set(i,c));let l=c.get(a);return l===void 0&&(l=e(r,i,a),c.set(a,l)),l}}});var ML=w(Q_=>{"use strict";m();T();N();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.promiseForObject=H8;function H8(e){return Promise.all(Object.values(e)).then(t=>{let n=Object.create(null);for(let[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}});var xL=w(Y_=>{"use strict";m();T();N();Object.defineProperty(Y_,"__esModule",{value:!0});Y_.promiseReduce=W8;var z8=qm();function W8(e,t,n){let r=n;for(let i of e)r=(0,z8.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var qL=w(H_=>{"use strict";m();T();N();Object.defineProperty(H_,"__esModule",{value:!0});H_.toError=Z8;var X8=Wt();function Z8(e){return e instanceof Error?e:new J_(e)}var J_=class extends Error{constructor(t){super("Unexpected error value: "+(0,X8.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var xN=w(z_=>{"use strict";m();T();N();Object.defineProperty(z_,"__esModule",{value:!0});z_.locatedError=nX;var eX=qL(),tX=ze();function nX(e,t,n){var r;let i=(0,eX.toError)(e);return rX(i)?i:new tX.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function rX(e){return Array.isArray(e.path)}});var Df=w(Ui=>{"use strict";m();T();N();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.assertValidExecutionArguments=JL;Ui.buildExecutionContext=HL;Ui.buildResolveInfo=WL;Ui.defaultTypeResolver=Ui.defaultFieldResolver=void 0;Ui.execute=YL;Ui.executeSync=lX;Ui.getFieldDef=ZL;var X_=qr(),mc=Wt(),iX=br(),aX=IN(),tv=Ba(),fa=qm(),sX=kL(),Nc=Ef(),VL=ML(),oX=xL(),Bi=ze(),VN=xN(),W_=Ua(),jL=wt(),hu=Lt(),Rl=Li(),uX=mf(),$L=BN(),QL=Dl(),cX=(0,sX.memoize3)((e,t,n)=>(0,$L.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function YL(e){arguments.length<2||(0,X_.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:n,variableValues:r,rootValue:i}=e;JL(t,n,r);let a=HL(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,c=dX(a,o,i);return(0,fa.isPromise)(c)?c.then(l=>qN(l,a.errors),l=>(a.errors.push(l),qN(null,a.errors))):qN(c,a.errors)}catch(o){return a.errors.push(o),qN(null,a.errors)}}function lX(e){let t=YL(e);if((0,fa.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function qN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function JL(e,t,n){t||(0,X_.devAssert)(!1,"Must provide document."),(0,uX.assertValidSchema)(e),n==null||(0,tv.isObjectLike)(n)||(0,X_.devAssert)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function HL(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:c,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:E}=e,I,v=Object.create(null);for(let j of i.definitions)switch(j.kind){case jL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new Bi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(I=j);break;case jL.Kind.FRAGMENT_DEFINITION:v[j.name.value]=j;break;default:}if(!I)return l!=null?[new Bi.GraphQLError(`Unknown operation named "${l}".`)]:[new Bi.GraphQLError("Must provide an operation.")];let A=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],U=(0,QL.getVariableValues)(r,A,c!=null?c:{},{maxErrors:50});return U.errors?U.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:U.coerced,fieldResolver:d!=null?d:ev,typeResolver:p!=null?p:XL,subscribeFieldResolver:E!=null?E:ev,errors:[]}}function dX(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Bi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,$L.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case W_.OperationTypeNode.QUERY:return jN(e,r,n,a,i);case W_.OperationTypeNode.MUTATION:return fX(e,r,n,a,i);case W_.OperationTypeNode.SUBSCRIPTION:return jN(e,r,n,a,i)}}function fX(e,t,n,r,i){return(0,oX.promiseReduce)(i.entries(),(a,[o,c])=>{let l=(0,Nc.addPath)(r,o,t.name),d=zL(e,t,n,c,l);return d===void 0?a:(0,fa.isPromise)(d)?d.then(p=>(a[o]=p,a)):(a[o]=d,a)},Object.create(null))}function jN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[c,l]of i.entries()){let d=(0,Nc.addPath)(r,c,t.name),p=zL(e,t,n,l,d);p!==void 0&&(a[c]=p,(0,fa.isPromise)(p)&&(o=!0))}}catch(c){if(o)return(0,VL.promiseForObject)(a).finally(()=>{throw c});throw c}return o?(0,VL.promiseForObject)(a):a}function zL(e,t,n,r,i){var a;let o=ZL(e.schema,t,r[0]);if(!o)return;let c=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=WL(e,o,r,t,i);try{let p=(0,QL.getArgumentValues)(o,r[0],e.variableValues),E=e.contextValue,I=l(n,p,E,d),v;return(0,fa.isPromise)(I)?v=I.then(A=>Sf(e,c,r,d,i,A)):v=Sf(e,c,r,d,i,I),(0,fa.isPromise)(v)?v.then(void 0,A=>{let U=(0,VN.locatedError)(A,r,(0,Nc.pathToArray)(i));return KN(U,c,e)}):v}catch(p){let E=(0,VN.locatedError)(p,r,(0,Nc.pathToArray)(i));return KN(E,c,e)}}function WL(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function KN(e,t,n){if((0,hu.isNonNullType)(t))throw e;return n.errors.push(e),null}function Sf(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,hu.isNonNullType)(t)){let o=Sf(e,t.ofType,n,r,i,a);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(a==null)return null;if((0,hu.isListType)(t))return pX(e,t,n,r,i,a);if((0,hu.isLeafType)(t))return mX(t,a);if((0,hu.isAbstractType)(t))return NX(e,t,n,r,i,a);if((0,hu.isObjectType)(t))return Z_(e,t,n,r,i,a);(0,iX.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,mc.inspect)(t))}function pX(e,t,n,r,i,a){if(!(0,aX.isIterableObject)(a))throw new Bi.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,c=!1,l=Array.from(a,(d,p)=>{let E=(0,Nc.addPath)(i,p,void 0);try{let I;return(0,fa.isPromise)(d)?I=d.then(v=>Sf(e,o,n,r,E,v)):I=Sf(e,o,n,r,E,d),(0,fa.isPromise)(I)?(c=!0,I.then(void 0,v=>{let A=(0,VN.locatedError)(v,n,(0,Nc.pathToArray)(E));return KN(A,o,e)})):I}catch(I){let v=(0,VN.locatedError)(I,n,(0,Nc.pathToArray)(E));return KN(v,o,e)}});return c?Promise.all(l):l}function mX(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,mc.inspect)(e)}.serialize(${(0,mc.inspect)(t)})\` to return non-nullable value, returned: ${(0,mc.inspect)(n)}`);return n}function NX(e,t,n,r,i,a){var o;let c=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=c(a,l,r,t);return(0,fa.isPromise)(d)?d.then(p=>Z_(e,KL(p,e,t,n,r,a),n,r,i,a)):Z_(e,KL(d,e,t,n,r,a),n,r,i,a)}function KL(e,t,n,r,i,a){if(e==null)throw new Bi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if((0,hu.isObjectType)(e))throw new Bi.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new Bi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,mc.inspect)(a)}, received "${(0,mc.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Bi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,hu.isObjectType)(o))throw new Bi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Bi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function Z_(e,t,n,r,i,a){let o=cX(e,t,n);if(t.isTypeOf){let c=t.isTypeOf(a,e.contextValue,r);if((0,fa.isPromise)(c))return c.then(l=>{if(!l)throw GL(t,a,n);return jN(e,t,a,i,o)});if(!c)throw GL(t,a,n)}return jN(e,t,a,i,o)}function GL(e,t,n){return new Bi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,mc.inspect)(t)}.`,{nodes:n})}var XL=function(e,t,n,r){if((0,tv.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),a=[];for(let o=0;o{for(let c=0;c{"use strict";m();T();N();Object.defineProperty(GN,"__esModule",{value:!0});GN.graphql=_X;GN.graphqlSync=vX;var TX=qr(),EX=qm(),hX=Tl(),yX=mf(),IX=Al(),gX=Df();function _X(e){return new Promise(t=>t(eC(e)))}function vX(e){let t=eC(e);if((0,EX.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function eC(e){arguments.length<2||(0,TX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l}=e,d=(0,yX.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,hX.parse)(n)}catch(I){return{errors:[I]}}let E=(0,IX.validate)(t,p);return E.length>0?{errors:E}:(0,gX.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l})}});var iC=w(he=>{"use strict";m();T();N();Object.defineProperty(he,"__esModule",{value:!0});Object.defineProperty(he,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return pa.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(he,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return bs.GRAPHQL_MAX_INT}});Object.defineProperty(he,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return bs.GRAPHQL_MIN_INT}});Object.defineProperty(he,"GraphQLBoolean",{enumerable:!0,get:function(){return bs.GraphQLBoolean}});Object.defineProperty(he,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return pa.GraphQLDeprecatedDirective}});Object.defineProperty(he,"GraphQLDirective",{enumerable:!0,get:function(){return pa.GraphQLDirective}});Object.defineProperty(he,"GraphQLEnumType",{enumerable:!0,get:function(){return at.GraphQLEnumType}});Object.defineProperty(he,"GraphQLFloat",{enumerable:!0,get:function(){return bs.GraphQLFloat}});Object.defineProperty(he,"GraphQLID",{enumerable:!0,get:function(){return bs.GraphQLID}});Object.defineProperty(he,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return pa.GraphQLIncludeDirective}});Object.defineProperty(he,"GraphQLInputObjectType",{enumerable:!0,get:function(){return at.GraphQLInputObjectType}});Object.defineProperty(he,"GraphQLInt",{enumerable:!0,get:function(){return bs.GraphQLInt}});Object.defineProperty(he,"GraphQLInterfaceType",{enumerable:!0,get:function(){return at.GraphQLInterfaceType}});Object.defineProperty(he,"GraphQLList",{enumerable:!0,get:function(){return at.GraphQLList}});Object.defineProperty(he,"GraphQLNonNull",{enumerable:!0,get:function(){return at.GraphQLNonNull}});Object.defineProperty(he,"GraphQLObjectType",{enumerable:!0,get:function(){return at.GraphQLObjectType}});Object.defineProperty(he,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return pa.GraphQLOneOfDirective}});Object.defineProperty(he,"GraphQLScalarType",{enumerable:!0,get:function(){return at.GraphQLScalarType}});Object.defineProperty(he,"GraphQLSchema",{enumerable:!0,get:function(){return nv.GraphQLSchema}});Object.defineProperty(he,"GraphQLSkipDirective",{enumerable:!0,get:function(){return pa.GraphQLSkipDirective}});Object.defineProperty(he,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return pa.GraphQLSpecifiedByDirective}});Object.defineProperty(he,"GraphQLString",{enumerable:!0,get:function(){return bs.GraphQLString}});Object.defineProperty(he,"GraphQLUnionType",{enumerable:!0,get:function(){return at.GraphQLUnionType}});Object.defineProperty(he,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Zr.SchemaMetaFieldDef}});Object.defineProperty(he,"TypeKind",{enumerable:!0,get:function(){return Zr.TypeKind}});Object.defineProperty(he,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Zr.TypeMetaFieldDef}});Object.defineProperty(he,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Zr.TypeNameMetaFieldDef}});Object.defineProperty(he,"__Directive",{enumerable:!0,get:function(){return Zr.__Directive}});Object.defineProperty(he,"__DirectiveLocation",{enumerable:!0,get:function(){return Zr.__DirectiveLocation}});Object.defineProperty(he,"__EnumValue",{enumerable:!0,get:function(){return Zr.__EnumValue}});Object.defineProperty(he,"__Field",{enumerable:!0,get:function(){return Zr.__Field}});Object.defineProperty(he,"__InputValue",{enumerable:!0,get:function(){return Zr.__InputValue}});Object.defineProperty(he,"__Schema",{enumerable:!0,get:function(){return Zr.__Schema}});Object.defineProperty(he,"__Type",{enumerable:!0,get:function(){return Zr.__Type}});Object.defineProperty(he,"__TypeKind",{enumerable:!0,get:function(){return Zr.__TypeKind}});Object.defineProperty(he,"assertAbstractType",{enumerable:!0,get:function(){return at.assertAbstractType}});Object.defineProperty(he,"assertCompositeType",{enumerable:!0,get:function(){return at.assertCompositeType}});Object.defineProperty(he,"assertDirective",{enumerable:!0,get:function(){return pa.assertDirective}});Object.defineProperty(he,"assertEnumType",{enumerable:!0,get:function(){return at.assertEnumType}});Object.defineProperty(he,"assertEnumValueName",{enumerable:!0,get:function(){return rC.assertEnumValueName}});Object.defineProperty(he,"assertInputObjectType",{enumerable:!0,get:function(){return at.assertInputObjectType}});Object.defineProperty(he,"assertInputType",{enumerable:!0,get:function(){return at.assertInputType}});Object.defineProperty(he,"assertInterfaceType",{enumerable:!0,get:function(){return at.assertInterfaceType}});Object.defineProperty(he,"assertLeafType",{enumerable:!0,get:function(){return at.assertLeafType}});Object.defineProperty(he,"assertListType",{enumerable:!0,get:function(){return at.assertListType}});Object.defineProperty(he,"assertName",{enumerable:!0,get:function(){return rC.assertName}});Object.defineProperty(he,"assertNamedType",{enumerable:!0,get:function(){return at.assertNamedType}});Object.defineProperty(he,"assertNonNullType",{enumerable:!0,get:function(){return at.assertNonNullType}});Object.defineProperty(he,"assertNullableType",{enumerable:!0,get:function(){return at.assertNullableType}});Object.defineProperty(he,"assertObjectType",{enumerable:!0,get:function(){return at.assertObjectType}});Object.defineProperty(he,"assertOutputType",{enumerable:!0,get:function(){return at.assertOutputType}});Object.defineProperty(he,"assertScalarType",{enumerable:!0,get:function(){return at.assertScalarType}});Object.defineProperty(he,"assertSchema",{enumerable:!0,get:function(){return nv.assertSchema}});Object.defineProperty(he,"assertType",{enumerable:!0,get:function(){return at.assertType}});Object.defineProperty(he,"assertUnionType",{enumerable:!0,get:function(){return at.assertUnionType}});Object.defineProperty(he,"assertValidSchema",{enumerable:!0,get:function(){return nC.assertValidSchema}});Object.defineProperty(he,"assertWrappingType",{enumerable:!0,get:function(){return at.assertWrappingType}});Object.defineProperty(he,"getNamedType",{enumerable:!0,get:function(){return at.getNamedType}});Object.defineProperty(he,"getNullableType",{enumerable:!0,get:function(){return at.getNullableType}});Object.defineProperty(he,"introspectionTypes",{enumerable:!0,get:function(){return Zr.introspectionTypes}});Object.defineProperty(he,"isAbstractType",{enumerable:!0,get:function(){return at.isAbstractType}});Object.defineProperty(he,"isCompositeType",{enumerable:!0,get:function(){return at.isCompositeType}});Object.defineProperty(he,"isDirective",{enumerable:!0,get:function(){return pa.isDirective}});Object.defineProperty(he,"isEnumType",{enumerable:!0,get:function(){return at.isEnumType}});Object.defineProperty(he,"isInputObjectType",{enumerable:!0,get:function(){return at.isInputObjectType}});Object.defineProperty(he,"isInputType",{enumerable:!0,get:function(){return at.isInputType}});Object.defineProperty(he,"isInterfaceType",{enumerable:!0,get:function(){return at.isInterfaceType}});Object.defineProperty(he,"isIntrospectionType",{enumerable:!0,get:function(){return Zr.isIntrospectionType}});Object.defineProperty(he,"isLeafType",{enumerable:!0,get:function(){return at.isLeafType}});Object.defineProperty(he,"isListType",{enumerable:!0,get:function(){return at.isListType}});Object.defineProperty(he,"isNamedType",{enumerable:!0,get:function(){return at.isNamedType}});Object.defineProperty(he,"isNonNullType",{enumerable:!0,get:function(){return at.isNonNullType}});Object.defineProperty(he,"isNullableType",{enumerable:!0,get:function(){return at.isNullableType}});Object.defineProperty(he,"isObjectType",{enumerable:!0,get:function(){return at.isObjectType}});Object.defineProperty(he,"isOutputType",{enumerable:!0,get:function(){return at.isOutputType}});Object.defineProperty(he,"isRequiredArgument",{enumerable:!0,get:function(){return at.isRequiredArgument}});Object.defineProperty(he,"isRequiredInputField",{enumerable:!0,get:function(){return at.isRequiredInputField}});Object.defineProperty(he,"isScalarType",{enumerable:!0,get:function(){return at.isScalarType}});Object.defineProperty(he,"isSchema",{enumerable:!0,get:function(){return nv.isSchema}});Object.defineProperty(he,"isSpecifiedDirective",{enumerable:!0,get:function(){return pa.isSpecifiedDirective}});Object.defineProperty(he,"isSpecifiedScalarType",{enumerable:!0,get:function(){return bs.isSpecifiedScalarType}});Object.defineProperty(he,"isType",{enumerable:!0,get:function(){return at.isType}});Object.defineProperty(he,"isUnionType",{enumerable:!0,get:function(){return at.isUnionType}});Object.defineProperty(he,"isWrappingType",{enumerable:!0,get:function(){return at.isWrappingType}});Object.defineProperty(he,"resolveObjMapThunk",{enumerable:!0,get:function(){return at.resolveObjMapThunk}});Object.defineProperty(he,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return at.resolveReadonlyArrayThunk}});Object.defineProperty(he,"specifiedDirectives",{enumerable:!0,get:function(){return pa.specifiedDirectives}});Object.defineProperty(he,"specifiedScalarTypes",{enumerable:!0,get:function(){return bs.specifiedScalarTypes}});Object.defineProperty(he,"validateSchema",{enumerable:!0,get:function(){return nC.validateSchema}});var nv=cc(),at=Lt(),pa=Wr(),bs=xa(),Zr=Li(),nC=mf(),rC=Xd()});var sC=w(Ut=>{"use strict";m();T();N();Object.defineProperty(Ut,"__esModule",{value:!0});Object.defineProperty(Ut,"BREAK",{enumerable:!0,get:function(){return bf.BREAK}});Object.defineProperty(Ut,"DirectiveLocation",{enumerable:!0,get:function(){return PX.DirectiveLocation}});Object.defineProperty(Ut,"Kind",{enumerable:!0,get:function(){return DX.Kind}});Object.defineProperty(Ut,"Lexer",{enumerable:!0,get:function(){return AX.Lexer}});Object.defineProperty(Ut,"Location",{enumerable:!0,get:function(){return rv.Location}});Object.defineProperty(Ut,"OperationTypeNode",{enumerable:!0,get:function(){return rv.OperationTypeNode}});Object.defineProperty(Ut,"Source",{enumerable:!0,get:function(){return OX.Source}});Object.defineProperty(Ut,"Token",{enumerable:!0,get:function(){return rv.Token}});Object.defineProperty(Ut,"TokenKind",{enumerable:!0,get:function(){return bX.TokenKind}});Object.defineProperty(Ut,"getEnterLeaveForKind",{enumerable:!0,get:function(){return bf.getEnterLeaveForKind}});Object.defineProperty(Ut,"getLocation",{enumerable:!0,get:function(){return SX.getLocation}});Object.defineProperty(Ut,"getVisitFn",{enumerable:!0,get:function(){return bf.getVisitFn}});Object.defineProperty(Ut,"isConstValueNode",{enumerable:!0,get:function(){return Ka.isConstValueNode}});Object.defineProperty(Ut,"isDefinitionNode",{enumerable:!0,get:function(){return Ka.isDefinitionNode}});Object.defineProperty(Ut,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ka.isExecutableDefinitionNode}});Object.defineProperty(Ut,"isSelectionNode",{enumerable:!0,get:function(){return Ka.isSelectionNode}});Object.defineProperty(Ut,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ka.isTypeDefinitionNode}});Object.defineProperty(Ut,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ka.isTypeExtensionNode}});Object.defineProperty(Ut,"isTypeNode",{enumerable:!0,get:function(){return Ka.isTypeNode}});Object.defineProperty(Ut,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ka.isTypeSystemDefinitionNode}});Object.defineProperty(Ut,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ka.isTypeSystemExtensionNode}});Object.defineProperty(Ut,"isValueNode",{enumerable:!0,get:function(){return Ka.isValueNode}});Object.defineProperty(Ut,"parse",{enumerable:!0,get:function(){return $N.parse}});Object.defineProperty(Ut,"parseConstValue",{enumerable:!0,get:function(){return $N.parseConstValue}});Object.defineProperty(Ut,"parseType",{enumerable:!0,get:function(){return $N.parseType}});Object.defineProperty(Ut,"parseValue",{enumerable:!0,get:function(){return $N.parseValue}});Object.defineProperty(Ut,"print",{enumerable:!0,get:function(){return RX.print}});Object.defineProperty(Ut,"printLocation",{enumerable:!0,get:function(){return aC.printLocation}});Object.defineProperty(Ut,"printSourceLocation",{enumerable:!0,get:function(){return aC.printSourceLocation}});Object.defineProperty(Ut,"visit",{enumerable:!0,get:function(){return bf.visit}});Object.defineProperty(Ut,"visitInParallel",{enumerable:!0,get:function(){return bf.visitInParallel}});var OX=zm(),SX=Vm(),aC=Zy(),DX=wt(),bX=Gd(),AX=Qm(),$N=Tl(),RX=pi(),bf=rc(),rv=Ua(),Ka=dc(),PX=ml()});var oC=w(iv=>{"use strict";m();T();N();Object.defineProperty(iv,"__esModule",{value:!0});iv.isAsyncIterable=FX;function FX(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var uC=w(av=>{"use strict";m();T();N();Object.defineProperty(av,"__esModule",{value:!0});av.mapAsyncIterator=wX;function wX(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Ai(this,null,function*(){if(a.done)return a;try{return{value:yield t(a.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(c){}throw o}})}return{next(){return Ai(this,null,function*(){return r(yield n.next())})},return(){return Ai(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Ai(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var fC=w(QN=>{"use strict";m();T();N();Object.defineProperty(QN,"__esModule",{value:!0});QN.createSourceEventStream=dC;QN.subscribe=xX;var LX=qr(),CX=Wt(),lC=oC(),cC=Ef(),sv=ze(),BX=xN(),UX=BN(),Af=Df(),kX=uC(),MX=Dl();function xX(t){return Ai(this,arguments,function*(e){arguments.length<2||(0,LX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield dC(e);if(!(0,lC.isAsyncIterable)(n))return n;let r=i=>(0,Af.execute)(Q(M({},e),{rootValue:i}));return(0,kX.mapAsyncIterator)(n,r)})}function qX(e){let t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}function dC(...e){return Ai(this,null,function*(){let t=qX(e),{schema:n,document:r,variableValues:i}=t;(0,Af.assertValidExecutionArguments)(n,r,i);let a=(0,Af.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield VX(a);if(!(0,lC.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,CX.inspect)(o)}.`);return o}catch(o){if(o instanceof sv.GraphQLError)return{errors:[o]};throw o}})}function VX(e){return Ai(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new sv.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let c=(0,UX.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...c.entries()][0],p=(0,Af.getFieldDef)(t,o,d[0]);if(!p){let A=d[0].name.value;throw new sv.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:d})}let E=(0,cC.addPath)(void 0,l,o.name),I=(0,Af.buildResolveInfo)(e,p,d,o,E);try{var v;let A=(0,MX.getArgumentValues)(p,d[0],i),U=e.contextValue,$=yield((v=p.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,A,U,I);if($ instanceof Error)throw $;return $}catch(A){throw(0,BX.locatedError)(A,d,(0,cC.pathToArray)(E))}})}});var mC=w(ki=>{"use strict";m();T();N();Object.defineProperty(ki,"__esModule",{value:!0});Object.defineProperty(ki,"createSourceEventStream",{enumerable:!0,get:function(){return pC.createSourceEventStream}});Object.defineProperty(ki,"defaultFieldResolver",{enumerable:!0,get:function(){return YN.defaultFieldResolver}});Object.defineProperty(ki,"defaultTypeResolver",{enumerable:!0,get:function(){return YN.defaultTypeResolver}});Object.defineProperty(ki,"execute",{enumerable:!0,get:function(){return YN.execute}});Object.defineProperty(ki,"executeSync",{enumerable:!0,get:function(){return YN.executeSync}});Object.defineProperty(ki,"getArgumentValues",{enumerable:!0,get:function(){return ov.getArgumentValues}});Object.defineProperty(ki,"getDirectiveValues",{enumerable:!0,get:function(){return ov.getDirectiveValues}});Object.defineProperty(ki,"getVariableValues",{enumerable:!0,get:function(){return ov.getVariableValues}});Object.defineProperty(ki,"responsePathAsArray",{enumerable:!0,get:function(){return jX.pathToArray}});Object.defineProperty(ki,"subscribe",{enumerable:!0,get:function(){return pC.subscribe}});var jX=Ef(),YN=Df(),pC=fC(),ov=Dl()});var NC=w(lv=>{"use strict";m();T();N();Object.defineProperty(lv,"__esModule",{value:!0});lv.NoDeprecatedCustomRule=KX;var uv=br(),Rf=ze(),cv=Lt();function KX(e){return{Field(t){let n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||(0,uv.invariant)(!1),e.reportError(new Rf.GraphQLError(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new Rf.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let a=e.getParentType(),o=e.getFieldDef();a!=null&&o!=null||(0,uv.invariant)(!1),e.reportError(new Rf.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,cv.getNamedType)(e.getParentInputType());if((0,cv.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Rf.GraphQLError(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=(0,cv.getNamedType)(e.getInputType());i!=null||(0,uv.invariant)(!1),e.reportError(new Rf.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var TC=w(dv=>{"use strict";m();T();N();Object.defineProperty(dv,"__esModule",{value:!0});dv.NoSchemaIntrospectionCustomRule=YX;var GX=ze(),$X=Lt(),QX=Li();function YX(e){return{Field(t){let n=(0,$X.getNamedType)(e.getType());n&&(0,QX.isIntrospectionType)(n)&&e.reportError(new GX.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var hC=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return zX.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return WX.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return XX.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ZX.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return e5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return t5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return n5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return r5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return v5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return _5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return F5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return i5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return w5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return a5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return s5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return o5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return u5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return c5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return P5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return l5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return d5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return f5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return A5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return p5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return R5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return m5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return D5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return b5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return N5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return T5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return E5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return O5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return S5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return h5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return HX.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return y5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return I5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return g5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return EC.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return EC.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return JX.validate}});var JX=Al(),HX=K_(),EC=q_(),zX=rg(),WX=ag(),XX=og(),ZX=ug(),e5=fg(),t5=mg(),n5=Eg(),r5=yg(),i5=Sg(),a5=bg(),s5=Rg(),o5=Fg(),u5=Vg(),c5=Gg(),l5=Jg(),d5=zg(),f5=a_(),p5=l_(),m5=N_(),N5=__(),T5=O_(),E5=D_(),h5=w_(),y5=B_(),I5=k_(),g5=x_(),_5=vg(),v5=gg(),O5=A_(),S5=P_(),D5=E_(),b5=I_(),A5=u_(),R5=f_(),P5=Qg(),F5=NC(),w5=TC()});var yC=w(Tc=>{"use strict";m();T();N();Object.defineProperty(Tc,"__esModule",{value:!0});Object.defineProperty(Tc,"GraphQLError",{enumerable:!0,get:function(){return fv.GraphQLError}});Object.defineProperty(Tc,"formatError",{enumerable:!0,get:function(){return fv.formatError}});Object.defineProperty(Tc,"locatedError",{enumerable:!0,get:function(){return C5.locatedError}});Object.defineProperty(Tc,"printError",{enumerable:!0,get:function(){return fv.printError}});Object.defineProperty(Tc,"syntaxError",{enumerable:!0,get:function(){return L5.syntaxError}});var fv=ze(),L5=Km(),C5=xN()});var mv=w(pv=>{"use strict";m();T();N();Object.defineProperty(pv,"__esModule",{value:!0});pv.getIntrospectionQuery=B5;function B5(e){let t=M({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let c=t.oneOf?"isOneOf":"";return` query IntrospectionQuery { __schema { ${a} @@ -177,85 +177,85 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}});var hC=w(mv=>{"use strict";m();T();N();Object.defineProperty(mv,"__esModule",{value:!0});mv.getOperationAST=B5;var C5=wt();function B5(e,t){let n=null;for(let i of e.definitions)if(i.kind===C5.Kind.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}});var yC=w(Nv=>{"use strict";m();T();N();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.getOperationRootType=U5;var QN=ze();function U5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new QN.GraphQLError("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){let n=e.getMutationType();if(!n)throw new QN.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new QN.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new QN.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var IC=w(Tv=>{"use strict";m();T();N();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.introspectionFromSchema=V5;var k5=br(),M5=Nl(),x5=Sf(),q5=pv();function V5(e,t){let n=M({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,M5.parse)((0,q5.getIntrospectionQuery)(n)),i=(0,x5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,k5.invariant)(!1),i.data}});var _C=w(Ev=>{"use strict";m();T();N();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.buildClientSchema=J5;var j5=qr(),mi=Wt(),gC=Ba(),YN=Hd(),K5=Nl(),Ni=Lt(),G5=Wr(),Ga=Li(),$5=xa(),Q5=uc(),Y5=If();function J5(e,t){(0,gC.isObjectLike)(e)&&(0,gC.isObjectLike)(e.__schema)||(0,j5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,mi.inspect)(e)}.`);let n=e.__schema,r=(0,YN.keyValMap)(n.types,Z=>Z.name,Z=>I(Z));for(let Z of[...$5.specifiedScalarTypes,...Ga.introspectionTypes])r[Z.name]&&(r[Z.name]=Z);let i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,c=n.directives?n.directives.map(Ze):[];return new Q5.GraphQLSchema({description:n.description,query:i,mutation:a,subscription:o,types:Object.values(r),directives:c,assumeValid:t==null?void 0:t.assumeValid});function l(Z){if(Z.kind===Ga.TypeKind.LIST){let _e=Z.ofType;if(!_e)throw new Error("Decorated type deeper than introspection query.");return new Ni.GraphQLList(l(_e))}if(Z.kind===Ga.TypeKind.NON_NULL){let _e=Z.ofType;if(!_e)throw new Error("Decorated type deeper than introspection query.");let vt=l(_e);return new Ni.GraphQLNonNull((0,Ni.assertNullableType)(vt))}return d(Z)}function d(Z){let _e=Z.name;if(!_e)throw new Error(`Unknown type reference: ${(0,mi.inspect)(Z)}.`);let vt=r[_e];if(!vt)throw new Error(`Invalid or incomplete schema, unknown type: ${_e}. Ensure that a full introspection query is used in order to build a client schema.`);return vt}function p(Z){return(0,Ni.assertObjectType)(d(Z))}function E(Z){return(0,Ni.assertInterfaceType)(d(Z))}function I(Z){if(Z!=null&&Z.name!=null&&Z.kind!=null)switch(Z.kind){case Ga.TypeKind.SCALAR:return v(Z);case Ga.TypeKind.OBJECT:return U(Z);case Ga.TypeKind.INTERFACE:return j(Z);case Ga.TypeKind.UNION:return $(Z);case Ga.TypeKind.ENUM:return re(Z);case Ga.TypeKind.INPUT_OBJECT:return ee(Z)}let _e=(0,mi.inspect)(Z);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${_e}.`)}function v(Z){return new Ni.GraphQLScalarType({name:Z.name,description:Z.description,specifiedByURL:Z.specifiedByURL})}function A(Z){if(Z.interfaces===null&&Z.kind===Ga.TypeKind.INTERFACE)return[];if(!Z.interfaces){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing interfaces: ${_e}.`)}return Z.interfaces.map(E)}function U(Z){return new Ni.GraphQLObjectType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>me(Z)})}function j(Z){return new Ni.GraphQLInterfaceType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>me(Z)})}function $(Z){if(!Z.possibleTypes){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing possibleTypes: ${_e}.`)}return new Ni.GraphQLUnionType({name:Z.name,description:Z.description,types:()=>Z.possibleTypes.map(p)})}function re(Z){if(!Z.enumValues){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing enumValues: ${_e}.`)}return new Ni.GraphQLEnumType({name:Z.name,description:Z.description,values:(0,YN.keyValMap)(Z.enumValues,_e=>_e.name,_e=>({description:_e.description,deprecationReason:_e.deprecationReason}))})}function ee(Z){if(!Z.inputFields){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing inputFields: ${_e}.`)}return new Ni.GraphQLInputObjectType({name:Z.name,description:Z.description,fields:()=>Ae(Z.inputFields),isOneOf:Z.isOneOf})}function me(Z){if(!Z.fields)throw new Error(`Introspection result missing fields: ${(0,mi.inspect)(Z)}.`);return(0,YN.keyValMap)(Z.fields,_e=>_e.name,ue)}function ue(Z){let _e=l(Z.type);if(!(0,Ni.isOutputType)(_e)){let vt=(0,mi.inspect)(_e);throw new Error(`Introspection must provide output type for fields, but received: ${vt}.`)}if(!Z.args){let vt=(0,mi.inspect)(Z);throw new Error(`Introspection result missing field args: ${vt}.`)}return{description:Z.description,deprecationReason:Z.deprecationReason,type:_e,args:Ae(Z.args)}}function Ae(Z){return(0,YN.keyValMap)(Z,_e=>_e.name,xe)}function xe(Z){let _e=l(Z.type);if(!(0,Ni.isInputType)(_e)){let rn=(0,mi.inspect)(_e);throw new Error(`Introspection must provide input type for arguments, but received: ${rn}.`)}let vt=Z.defaultValue!=null?(0,Y5.valueFromAST)((0,K5.parseValue)(Z.defaultValue),_e):void 0;return{description:Z.description,type:_e,defaultValue:vt,deprecationReason:Z.deprecationReason}}function Ze(Z){if(!Z.args){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing directive args: ${_e}.`)}if(!Z.locations){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing directive locations: ${_e}.`)}return new G5.GraphQLDirective({name:Z.name,description:Z.description,isRepeatable:Z.isRepeatable,locations:Z.locations.slice(),args:Ae(Z.args)})}}});var yv=w(HN=>{"use strict";m();T();N();Object.defineProperty(HN,"__esModule",{value:!0});HN.extendSchema=e9;HN.extendSchemaImpl=PC;var H5=qr(),z5=Wt(),W5=br(),X5=lu(),Rf=hI(),Mi=wt(),vC=lc(),Sn=Lt(),Pf=Wr(),AC=Li(),RC=xa(),OC=uc(),Z5=bl(),hv=Sl(),SC=If();function e9(e,t,n){(0,OC.assertSchema)(e),t!=null&&t.kind===Mi.Kind.DOCUMENT||(0,H5.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,Z5.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=PC(r,t,n);return r===i?e:new OC.GraphQLSchema(i)}function PC(e,t,n){var r,i,a,o;let c=[],l=Object.create(null),d=[],p,E=[];for(let ae of t.definitions)if(ae.kind===Mi.Kind.SCHEMA_DEFINITION)p=ae;else if(ae.kind===Mi.Kind.SCHEMA_EXTENSION)E.push(ae);else if((0,vC.isTypeDefinitionNode)(ae))c.push(ae);else if((0,vC.isTypeExtensionNode)(ae)){let De=ae.name.value,Ie=l[De];l[De]=Ie?Ie.concat([ae]):[ae]}else ae.kind===Mi.Kind.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(l).length===0&&c.length===0&&d.length===0&&E.length===0&&p==null)return e;let I=Object.create(null);for(let ae of e.types)I[ae.name]=re(ae);for(let ae of c){var v;let De=ae.name.value;I[De]=(v=DC[De])!==null&&v!==void 0?v:Ln(ae)}let A=M(M({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&vt([p])),vt(E));return Q(M({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},A),{types:Object.values(I),directives:[...e.directives.map($),...d.map(wn)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(E),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function U(ae){return(0,Sn.isListType)(ae)?new Sn.GraphQLList(U(ae.ofType)):(0,Sn.isNonNullType)(ae)?new Sn.GraphQLNonNull(U(ae.ofType)):j(ae)}function j(ae){return I[ae.name]}function $(ae){let De=ae.toConfig();return new Pf.GraphQLDirective(Q(M({},De),{args:(0,Rf.mapValue)(De.args,_e)}))}function re(ae){if((0,AC.isIntrospectionType)(ae)||(0,RC.isSpecifiedScalarType)(ae))return ae;if((0,Sn.isScalarType)(ae))return ue(ae);if((0,Sn.isObjectType)(ae))return Ae(ae);if((0,Sn.isInterfaceType)(ae))return xe(ae);if((0,Sn.isUnionType)(ae))return Ze(ae);if((0,Sn.isEnumType)(ae))return me(ae);if((0,Sn.isInputObjectType)(ae))return ee(ae);(0,W5.invariant)(!1,"Unexpected type: "+(0,z5.inspect)(ae))}function ee(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLInputObjectType(Q(M({},Ie),{fields:()=>M(M({},(0,Rf.mapValue)(Ie.fields,St=>Q(M({},St),{type:U(St.type)}))),Ur(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function me(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[ae.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLEnumType(Q(M({},Ie),{values:M(M({},Ie.values),lr(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function ue(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[],St=Ie.specifiedByURL;for(let ie of Ce){var Y;St=(Y=bC(ie))!==null&&Y!==void 0?Y:St}return new Sn.GraphQLScalarType(Q(M({},Ie),{specifiedByURL:St,extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function Ae(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLObjectType(Q(M({},Ie),{interfaces:()=>[...ae.getInterfaces().map(j),...gn(Ce)],fields:()=>M(M({},(0,Rf.mapValue)(Ie.fields,Z)),$t(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function xe(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLInterfaceType(Q(M({},Ie),{interfaces:()=>[...ae.getInterfaces().map(j),...gn(Ce)],fields:()=>M(M({},(0,Rf.mapValue)(Ie.fields,Z)),$t(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function Ze(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLUnionType(Q(M({},Ie),{types:()=>[...ae.getTypes().map(j),...Ht(Ce)],extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function Z(ae){return Q(M({},ae),{type:U(ae.type),args:ae.args&&(0,Rf.mapValue)(ae.args,_e)})}function _e(ae){return Q(M({},ae),{type:U(ae.type)})}function vt(ae){let De={};for(let Ce of ae){var Ie;let St=(Ie=Ce.operationTypes)!==null&&Ie!==void 0?Ie:[];for(let Y of St)De[Y.operation]=rn(Y.type)}return De}function rn(ae){var De;let Ie=ae.name.value,Ce=(De=DC[Ie])!==null&&De!==void 0?De:I[Ie];if(Ce===void 0)throw new Error(`Unknown type: "${Ie}".`);return Ce}function an(ae){return ae.kind===Mi.Kind.LIST_TYPE?new Sn.GraphQLList(an(ae.type)):ae.kind===Mi.Kind.NON_NULL_TYPE?new Sn.GraphQLNonNull(an(ae.type)):rn(ae)}function wn(ae){var De;return new Pf.GraphQLDirective({name:ae.name.value,description:(De=ae.description)===null||De===void 0?void 0:De.value,locations:ae.locations.map(({value:Ie})=>Ie),isRepeatable:ae.repeatable,args:Tn(ae.arguments),astNode:ae})}function $t(ae){let De=Object.create(null);for(let St of ae){var Ie;let Y=(Ie=St.fields)!==null&&Ie!==void 0?Ie:[];for(let ie of Y){var Ce;De[ie.name.value]={type:an(ie.type),description:(Ce=ie.description)===null||Ce===void 0?void 0:Ce.value,args:Tn(ie.arguments),deprecationReason:JN(ie),astNode:ie}}}return De}function Tn(ae){let De=ae!=null?ae:[],Ie=Object.create(null);for(let St of De){var Ce;let Y=an(St.type);Ie[St.name.value]={type:Y,description:(Ce=St.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,SC.valueFromAST)(St.defaultValue,Y),deprecationReason:JN(St),astNode:St}}return Ie}function Ur(ae){let De=Object.create(null);for(let St of ae){var Ie;let Y=(Ie=St.fields)!==null&&Ie!==void 0?Ie:[];for(let ie of Y){var Ce;let qe=an(ie.type);De[ie.name.value]={type:qe,description:(Ce=ie.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,SC.valueFromAST)(ie.defaultValue,qe),deprecationReason:JN(ie),astNode:ie}}}return De}function lr(ae){let De=Object.create(null);for(let St of ae){var Ie;let Y=(Ie=St.values)!==null&&Ie!==void 0?Ie:[];for(let ie of Y){var Ce;De[ie.name.value]={description:(Ce=ie.description)===null||Ce===void 0?void 0:Ce.value,deprecationReason:JN(ie),astNode:ie}}}return De}function gn(ae){return ae.flatMap(De=>{var Ie,Ce;return(Ie=(Ce=De.interfaces)===null||Ce===void 0?void 0:Ce.map(rn))!==null&&Ie!==void 0?Ie:[]})}function Ht(ae){return ae.flatMap(De=>{var Ie,Ce;return(Ie=(Ce=De.types)===null||Ce===void 0?void 0:Ce.map(rn))!==null&&Ie!==void 0?Ie:[]})}function Ln(ae){var De;let Ie=ae.name.value,Ce=(De=l[Ie])!==null&&De!==void 0?De:[];switch(ae.kind){case Mi.Kind.OBJECT_TYPE_DEFINITION:{var St;let it=[ae,...Ce];return new Sn.GraphQLObjectType({name:Ie,description:(St=ae.description)===null||St===void 0?void 0:St.value,interfaces:()=>gn(it),fields:()=>$t(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let it=[ae,...Ce];return new Sn.GraphQLInterfaceType({name:Ie,description:(Y=ae.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>gn(it),fields:()=>$t(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.ENUM_TYPE_DEFINITION:{var ie;let it=[ae,...Ce];return new Sn.GraphQLEnumType({name:Ie,description:(ie=ae.description)===null||ie===void 0?void 0:ie.value,values:lr(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.UNION_TYPE_DEFINITION:{var qe;let it=[ae,...Ce];return new Sn.GraphQLUnionType({name:Ie,description:(qe=ae.description)===null||qe===void 0?void 0:qe.value,types:()=>Ht(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.SCALAR_TYPE_DEFINITION:{var He;return new Sn.GraphQLScalarType({name:Ie,description:(He=ae.description)===null||He===void 0?void 0:He.value,specifiedByURL:bC(ae),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Bt;let it=[ae,...Ce];return new Sn.GraphQLInputObjectType({name:Ie,description:(Bt=ae.description)===null||Bt===void 0?void 0:Bt.value,fields:()=>Ur(it),astNode:ae,extensionASTNodes:Ce,isOneOf:t9(ae)})}}}}var DC=(0,X5.keyMap)([...RC.specifiedScalarTypes,...AC.introspectionTypes],e=>e.name);function JN(e){let t=(0,hv.getDirectiveValues)(Pf.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function bC(e){let t=(0,hv.getDirectiveValues)(Pf.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function t9(e){return!!(0,hv.getDirectiveValues)(Pf.GraphQLOneOfDirective,e)}});var wC=w(zN=>{"use strict";m();T();N();Object.defineProperty(zN,"__esModule",{value:!0});zN.buildASTSchema=FC;zN.buildSchema=c9;var n9=qr(),r9=wt(),i9=Nl(),a9=Wr(),s9=uc(),o9=bl(),u9=yv();function FC(e,t){e!=null&&e.kind===r9.Kind.DOCUMENT||(0,n9.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,o9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,u9.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...a9.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new s9.GraphQLSchema(Q(M({},r),{directives:i}))}function c9(e,t){let n=(0,i9.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return FC(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var BC=w(gv=>{"use strict";m();T();N();Object.defineProperty(gv,"__esModule",{value:!0});gv.lexicographicSortSchema=T9;var l9=Wt(),d9=br(),f9=Hd(),LC=zd(),Vr=Lt(),p9=Wr(),m9=Li(),N9=uc();function T9(e){let t=e.toConfig(),n=(0,f9.keyValMap)(Iv(t.types),I=>I.name,E);return new N9.GraphQLSchema(Q(M({},t),{types:Object.values(n),directives:Iv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,Vr.isListType)(I)?new Vr.GraphQLList(r(I.ofType)):(0,Vr.isNonNullType)(I)?new Vr.GraphQLNonNull(r(I.ofType)):i(I)}function i(I){return n[I.name]}function a(I){return I&&i(I)}function o(I){let v=I.toConfig();return new p9.GraphQLDirective(Q(M({},v),{locations:CC(v.locations,A=>A),args:c(v.args)}))}function c(I){return WN(I,v=>Q(M({},v),{type:r(v.type)}))}function l(I){return WN(I,v=>Q(M({},v),{type:r(v.type),args:v.args&&c(v.args)}))}function d(I){return WN(I,v=>Q(M({},v),{type:r(v.type)}))}function p(I){return Iv(I).map(i)}function E(I){if((0,Vr.isScalarType)(I)||(0,m9.isIntrospectionType)(I))return I;if((0,Vr.isObjectType)(I)){let v=I.toConfig();return new Vr.GraphQLObjectType(Q(M({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,Vr.isInterfaceType)(I)){let v=I.toConfig();return new Vr.GraphQLInterfaceType(Q(M({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,Vr.isUnionType)(I)){let v=I.toConfig();return new Vr.GraphQLUnionType(Q(M({},v),{types:()=>p(v.types)}))}if((0,Vr.isEnumType)(I)){let v=I.toConfig();return new Vr.GraphQLEnumType(Q(M({},v),{values:WN(v.values,A=>A)}))}if((0,Vr.isInputObjectType)(I)){let v=I.toConfig();return new Vr.GraphQLInputObjectType(Q(M({},v),{fields:()=>d(v.fields)}))}(0,d9.invariant)(!1,"Unexpected type: "+(0,l9.inspect)(I))}}function WN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(LC.naturalCompare))n[r]=t(e[r]);return n}function Iv(e){return CC(e,t=>t.name)}function CC(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,LC.naturalCompare)(i,a)})}});var jC=w(Ff=>{"use strict";m();T();N();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.printIntrospectionSchema=v9;Ff.printSchema=_9;Ff.printType=MC;var E9=Wt(),h9=br(),y9=Vd(),vv=wt(),XN=pi(),Rl=Lt(),Ov=Wr(),UC=Li(),I9=xa(),g9=lf();function _9(e){return kC(e,t=>!(0,Ov.isSpecifiedDirective)(t),O9)}function v9(e){return kC(e,Ov.isSpecifiedDirective,UC.isIntrospectionType)}function O9(e){return!(0,I9.isSpecifiedScalarType)(e)&&!(0,UC.isIntrospectionType)(e)}function kC(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[S9(e),...r.map(a=>L9(a)),...i.map(a=>MC(a))].filter(Boolean).join(` + `}});var IC=w(Nv=>{"use strict";m();T();N();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.getOperationAST=k5;var U5=wt();function k5(e,t){let n=null;for(let i of e.definitions)if(i.kind===U5.Kind.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}});var gC=w(Tv=>{"use strict";m();T();N();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.getOperationRootType=M5;var JN=ze();function M5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new JN.GraphQLError("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){let n=e.getMutationType();if(!n)throw new JN.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new JN.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new JN.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var _C=w(Ev=>{"use strict";m();T();N();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.introspectionFromSchema=K5;var x5=br(),q5=Tl(),V5=Df(),j5=mv();function K5(e,t){let n=M({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,q5.parse)((0,j5.getIntrospectionQuery)(n)),i=(0,V5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,x5.invariant)(!1),i.data}});var OC=w(hv=>{"use strict";m();T();N();Object.defineProperty(hv,"__esModule",{value:!0});hv.buildClientSchema=z5;var G5=qr(),mi=Wt(),vC=Ba(),HN=zd(),$5=Tl(),Ni=Lt(),Q5=Wr(),Ga=Li(),Y5=xa(),J5=cc(),H5=gf();function z5(e,t){(0,vC.isObjectLike)(e)&&(0,vC.isObjectLike)(e.__schema)||(0,G5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,mi.inspect)(e)}.`);let n=e.__schema,r=(0,HN.keyValMap)(n.types,Z=>Z.name,Z=>I(Z));for(let Z of[...Y5.specifiedScalarTypes,...Ga.introspectionTypes])r[Z.name]&&(r[Z.name]=Z);let i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,c=n.directives?n.directives.map(Ze):[];return new J5.GraphQLSchema({description:n.description,query:i,mutation:a,subscription:o,types:Object.values(r),directives:c,assumeValid:t==null?void 0:t.assumeValid});function l(Z){if(Z.kind===Ga.TypeKind.LIST){let _e=Z.ofType;if(!_e)throw new Error("Decorated type deeper than introspection query.");return new Ni.GraphQLList(l(_e))}if(Z.kind===Ga.TypeKind.NON_NULL){let _e=Z.ofType;if(!_e)throw new Error("Decorated type deeper than introspection query.");let vt=l(_e);return new Ni.GraphQLNonNull((0,Ni.assertNullableType)(vt))}return d(Z)}function d(Z){let _e=Z.name;if(!_e)throw new Error(`Unknown type reference: ${(0,mi.inspect)(Z)}.`);let vt=r[_e];if(!vt)throw new Error(`Invalid or incomplete schema, unknown type: ${_e}. Ensure that a full introspection query is used in order to build a client schema.`);return vt}function p(Z){return(0,Ni.assertObjectType)(d(Z))}function E(Z){return(0,Ni.assertInterfaceType)(d(Z))}function I(Z){if(Z!=null&&Z.name!=null&&Z.kind!=null)switch(Z.kind){case Ga.TypeKind.SCALAR:return v(Z);case Ga.TypeKind.OBJECT:return U(Z);case Ga.TypeKind.INTERFACE:return j(Z);case Ga.TypeKind.UNION:return $(Z);case Ga.TypeKind.ENUM:return re(Z);case Ga.TypeKind.INPUT_OBJECT:return ee(Z)}let _e=(0,mi.inspect)(Z);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${_e}.`)}function v(Z){return new Ni.GraphQLScalarType({name:Z.name,description:Z.description,specifiedByURL:Z.specifiedByURL})}function A(Z){if(Z.interfaces===null&&Z.kind===Ga.TypeKind.INTERFACE)return[];if(!Z.interfaces){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing interfaces: ${_e}.`)}return Z.interfaces.map(E)}function U(Z){return new Ni.GraphQLObjectType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>me(Z)})}function j(Z){return new Ni.GraphQLInterfaceType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>me(Z)})}function $(Z){if(!Z.possibleTypes){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing possibleTypes: ${_e}.`)}return new Ni.GraphQLUnionType({name:Z.name,description:Z.description,types:()=>Z.possibleTypes.map(p)})}function re(Z){if(!Z.enumValues){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing enumValues: ${_e}.`)}return new Ni.GraphQLEnumType({name:Z.name,description:Z.description,values:(0,HN.keyValMap)(Z.enumValues,_e=>_e.name,_e=>({description:_e.description,deprecationReason:_e.deprecationReason}))})}function ee(Z){if(!Z.inputFields){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing inputFields: ${_e}.`)}return new Ni.GraphQLInputObjectType({name:Z.name,description:Z.description,fields:()=>Ae(Z.inputFields),isOneOf:Z.isOneOf})}function me(Z){if(!Z.fields)throw new Error(`Introspection result missing fields: ${(0,mi.inspect)(Z)}.`);return(0,HN.keyValMap)(Z.fields,_e=>_e.name,ue)}function ue(Z){let _e=l(Z.type);if(!(0,Ni.isOutputType)(_e)){let vt=(0,mi.inspect)(_e);throw new Error(`Introspection must provide output type for fields, but received: ${vt}.`)}if(!Z.args){let vt=(0,mi.inspect)(Z);throw new Error(`Introspection result missing field args: ${vt}.`)}return{description:Z.description,deprecationReason:Z.deprecationReason,type:_e,args:Ae(Z.args)}}function Ae(Z){return(0,HN.keyValMap)(Z,_e=>_e.name,xe)}function xe(Z){let _e=l(Z.type);if(!(0,Ni.isInputType)(_e)){let rn=(0,mi.inspect)(_e);throw new Error(`Introspection must provide input type for arguments, but received: ${rn}.`)}let vt=Z.defaultValue!=null?(0,H5.valueFromAST)((0,$5.parseValue)(Z.defaultValue),_e):void 0;return{description:Z.description,type:_e,defaultValue:vt,deprecationReason:Z.deprecationReason}}function Ze(Z){if(!Z.args){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing directive args: ${_e}.`)}if(!Z.locations){let _e=(0,mi.inspect)(Z);throw new Error(`Introspection result missing directive locations: ${_e}.`)}return new Q5.GraphQLDirective({name:Z.name,description:Z.description,isRepeatable:Z.isRepeatable,locations:Z.locations.slice(),args:Ae(Z.args)})}}});var Iv=w(WN=>{"use strict";m();T();N();Object.defineProperty(WN,"__esModule",{value:!0});WN.extendSchema=n9;WN.extendSchemaImpl=wC;var W5=qr(),X5=Wt(),Z5=br(),e9=du(),Pf=yI(),Mi=wt(),SC=dc(),Sn=Lt(),Ff=Wr(),PC=Li(),FC=xa(),DC=cc(),t9=Al(),yv=Dl(),bC=gf();function n9(e,t,n){(0,DC.assertSchema)(e),t!=null&&t.kind===Mi.Kind.DOCUMENT||(0,W5.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,t9.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=wC(r,t,n);return r===i?e:new DC.GraphQLSchema(i)}function wC(e,t,n){var r,i,a,o;let c=[],l=Object.create(null),d=[],p,E=[];for(let ae of t.definitions)if(ae.kind===Mi.Kind.SCHEMA_DEFINITION)p=ae;else if(ae.kind===Mi.Kind.SCHEMA_EXTENSION)E.push(ae);else if((0,SC.isTypeDefinitionNode)(ae))c.push(ae);else if((0,SC.isTypeExtensionNode)(ae)){let De=ae.name.value,Ie=l[De];l[De]=Ie?Ie.concat([ae]):[ae]}else ae.kind===Mi.Kind.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(l).length===0&&c.length===0&&d.length===0&&E.length===0&&p==null)return e;let I=Object.create(null);for(let ae of e.types)I[ae.name]=re(ae);for(let ae of c){var v;let De=ae.name.value;I[De]=(v=AC[De])!==null&&v!==void 0?v:Ln(ae)}let A=M(M({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&vt([p])),vt(E));return Q(M({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},A),{types:Object.values(I),directives:[...e.directives.map($),...d.map(wn)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(E),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function U(ae){return(0,Sn.isListType)(ae)?new Sn.GraphQLList(U(ae.ofType)):(0,Sn.isNonNullType)(ae)?new Sn.GraphQLNonNull(U(ae.ofType)):j(ae)}function j(ae){return I[ae.name]}function $(ae){let De=ae.toConfig();return new Ff.GraphQLDirective(Q(M({},De),{args:(0,Pf.mapValue)(De.args,_e)}))}function re(ae){if((0,PC.isIntrospectionType)(ae)||(0,FC.isSpecifiedScalarType)(ae))return ae;if((0,Sn.isScalarType)(ae))return ue(ae);if((0,Sn.isObjectType)(ae))return Ae(ae);if((0,Sn.isInterfaceType)(ae))return xe(ae);if((0,Sn.isUnionType)(ae))return Ze(ae);if((0,Sn.isEnumType)(ae))return me(ae);if((0,Sn.isInputObjectType)(ae))return ee(ae);(0,Z5.invariant)(!1,"Unexpected type: "+(0,X5.inspect)(ae))}function ee(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLInputObjectType(Q(M({},Ie),{fields:()=>M(M({},(0,Pf.mapValue)(Ie.fields,St=>Q(M({},St),{type:U(St.type)}))),Ur(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function me(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[ae.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLEnumType(Q(M({},Ie),{values:M(M({},Ie.values),lr(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function ue(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[],St=Ie.specifiedByURL;for(let ie of Ce){var Y;St=(Y=RC(ie))!==null&&Y!==void 0?Y:St}return new Sn.GraphQLScalarType(Q(M({},Ie),{specifiedByURL:St,extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function Ae(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLObjectType(Q(M({},Ie),{interfaces:()=>[...ae.getInterfaces().map(j),...gn(Ce)],fields:()=>M(M({},(0,Pf.mapValue)(Ie.fields,Z)),$t(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function xe(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLInterfaceType(Q(M({},Ie),{interfaces:()=>[...ae.getInterfaces().map(j),...gn(Ce)],fields:()=>M(M({},(0,Pf.mapValue)(Ie.fields,Z)),$t(Ce)),extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function Ze(ae){var De;let Ie=ae.toConfig(),Ce=(De=l[Ie.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLUnionType(Q(M({},Ie),{types:()=>[...ae.getTypes().map(j),...Ht(Ce)],extensionASTNodes:Ie.extensionASTNodes.concat(Ce)}))}function Z(ae){return Q(M({},ae),{type:U(ae.type),args:ae.args&&(0,Pf.mapValue)(ae.args,_e)})}function _e(ae){return Q(M({},ae),{type:U(ae.type)})}function vt(ae){let De={};for(let Ce of ae){var Ie;let St=(Ie=Ce.operationTypes)!==null&&Ie!==void 0?Ie:[];for(let Y of St)De[Y.operation]=rn(Y.type)}return De}function rn(ae){var De;let Ie=ae.name.value,Ce=(De=AC[Ie])!==null&&De!==void 0?De:I[Ie];if(Ce===void 0)throw new Error(`Unknown type: "${Ie}".`);return Ce}function an(ae){return ae.kind===Mi.Kind.LIST_TYPE?new Sn.GraphQLList(an(ae.type)):ae.kind===Mi.Kind.NON_NULL_TYPE?new Sn.GraphQLNonNull(an(ae.type)):rn(ae)}function wn(ae){var De;return new Ff.GraphQLDirective({name:ae.name.value,description:(De=ae.description)===null||De===void 0?void 0:De.value,locations:ae.locations.map(({value:Ie})=>Ie),isRepeatable:ae.repeatable,args:Tn(ae.arguments),astNode:ae})}function $t(ae){let De=Object.create(null);for(let St of ae){var Ie;let Y=(Ie=St.fields)!==null&&Ie!==void 0?Ie:[];for(let ie of Y){var Ce;De[ie.name.value]={type:an(ie.type),description:(Ce=ie.description)===null||Ce===void 0?void 0:Ce.value,args:Tn(ie.arguments),deprecationReason:zN(ie),astNode:ie}}}return De}function Tn(ae){let De=ae!=null?ae:[],Ie=Object.create(null);for(let St of De){var Ce;let Y=an(St.type);Ie[St.name.value]={type:Y,description:(Ce=St.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,bC.valueFromAST)(St.defaultValue,Y),deprecationReason:zN(St),astNode:St}}return Ie}function Ur(ae){let De=Object.create(null);for(let St of ae){var Ie;let Y=(Ie=St.fields)!==null&&Ie!==void 0?Ie:[];for(let ie of Y){var Ce;let qe=an(ie.type);De[ie.name.value]={type:qe,description:(Ce=ie.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,bC.valueFromAST)(ie.defaultValue,qe),deprecationReason:zN(ie),astNode:ie}}}return De}function lr(ae){let De=Object.create(null);for(let St of ae){var Ie;let Y=(Ie=St.values)!==null&&Ie!==void 0?Ie:[];for(let ie of Y){var Ce;De[ie.name.value]={description:(Ce=ie.description)===null||Ce===void 0?void 0:Ce.value,deprecationReason:zN(ie),astNode:ie}}}return De}function gn(ae){return ae.flatMap(De=>{var Ie,Ce;return(Ie=(Ce=De.interfaces)===null||Ce===void 0?void 0:Ce.map(rn))!==null&&Ie!==void 0?Ie:[]})}function Ht(ae){return ae.flatMap(De=>{var Ie,Ce;return(Ie=(Ce=De.types)===null||Ce===void 0?void 0:Ce.map(rn))!==null&&Ie!==void 0?Ie:[]})}function Ln(ae){var De;let Ie=ae.name.value,Ce=(De=l[Ie])!==null&&De!==void 0?De:[];switch(ae.kind){case Mi.Kind.OBJECT_TYPE_DEFINITION:{var St;let it=[ae,...Ce];return new Sn.GraphQLObjectType({name:Ie,description:(St=ae.description)===null||St===void 0?void 0:St.value,interfaces:()=>gn(it),fields:()=>$t(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let it=[ae,...Ce];return new Sn.GraphQLInterfaceType({name:Ie,description:(Y=ae.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>gn(it),fields:()=>$t(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.ENUM_TYPE_DEFINITION:{var ie;let it=[ae,...Ce];return new Sn.GraphQLEnumType({name:Ie,description:(ie=ae.description)===null||ie===void 0?void 0:ie.value,values:lr(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.UNION_TYPE_DEFINITION:{var qe;let it=[ae,...Ce];return new Sn.GraphQLUnionType({name:Ie,description:(qe=ae.description)===null||qe===void 0?void 0:qe.value,types:()=>Ht(it),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.SCALAR_TYPE_DEFINITION:{var He;return new Sn.GraphQLScalarType({name:Ie,description:(He=ae.description)===null||He===void 0?void 0:He.value,specifiedByURL:RC(ae),astNode:ae,extensionASTNodes:Ce})}case Mi.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Bt;let it=[ae,...Ce];return new Sn.GraphQLInputObjectType({name:Ie,description:(Bt=ae.description)===null||Bt===void 0?void 0:Bt.value,fields:()=>Ur(it),astNode:ae,extensionASTNodes:Ce,isOneOf:r9(ae)})}}}}var AC=(0,e9.keyMap)([...FC.specifiedScalarTypes,...PC.introspectionTypes],e=>e.name);function zN(e){let t=(0,yv.getDirectiveValues)(Ff.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function RC(e){let t=(0,yv.getDirectiveValues)(Ff.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function r9(e){return!!(0,yv.getDirectiveValues)(Ff.GraphQLOneOfDirective,e)}});var CC=w(XN=>{"use strict";m();T();N();Object.defineProperty(XN,"__esModule",{value:!0});XN.buildASTSchema=LC;XN.buildSchema=d9;var i9=qr(),a9=wt(),s9=Tl(),o9=Wr(),u9=cc(),c9=Al(),l9=Iv();function LC(e,t){e!=null&&e.kind===a9.Kind.DOCUMENT||(0,i9.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,c9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,l9.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...o9.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new u9.GraphQLSchema(Q(M({},r),{directives:i}))}function d9(e,t){let n=(0,s9.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return LC(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var kC=w(_v=>{"use strict";m();T();N();Object.defineProperty(_v,"__esModule",{value:!0});_v.lexicographicSortSchema=h9;var f9=Wt(),p9=br(),m9=zd(),BC=Wd(),Vr=Lt(),N9=Wr(),T9=Li(),E9=cc();function h9(e){let t=e.toConfig(),n=(0,m9.keyValMap)(gv(t.types),I=>I.name,E);return new E9.GraphQLSchema(Q(M({},t),{types:Object.values(n),directives:gv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,Vr.isListType)(I)?new Vr.GraphQLList(r(I.ofType)):(0,Vr.isNonNullType)(I)?new Vr.GraphQLNonNull(r(I.ofType)):i(I)}function i(I){return n[I.name]}function a(I){return I&&i(I)}function o(I){let v=I.toConfig();return new N9.GraphQLDirective(Q(M({},v),{locations:UC(v.locations,A=>A),args:c(v.args)}))}function c(I){return ZN(I,v=>Q(M({},v),{type:r(v.type)}))}function l(I){return ZN(I,v=>Q(M({},v),{type:r(v.type),args:v.args&&c(v.args)}))}function d(I){return ZN(I,v=>Q(M({},v),{type:r(v.type)}))}function p(I){return gv(I).map(i)}function E(I){if((0,Vr.isScalarType)(I)||(0,T9.isIntrospectionType)(I))return I;if((0,Vr.isObjectType)(I)){let v=I.toConfig();return new Vr.GraphQLObjectType(Q(M({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,Vr.isInterfaceType)(I)){let v=I.toConfig();return new Vr.GraphQLInterfaceType(Q(M({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,Vr.isUnionType)(I)){let v=I.toConfig();return new Vr.GraphQLUnionType(Q(M({},v),{types:()=>p(v.types)}))}if((0,Vr.isEnumType)(I)){let v=I.toConfig();return new Vr.GraphQLEnumType(Q(M({},v),{values:ZN(v.values,A=>A)}))}if((0,Vr.isInputObjectType)(I)){let v=I.toConfig();return new Vr.GraphQLInputObjectType(Q(M({},v),{fields:()=>d(v.fields)}))}(0,p9.invariant)(!1,"Unexpected type: "+(0,f9.inspect)(I))}}function ZN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(BC.naturalCompare))n[r]=t(e[r]);return n}function gv(e){return UC(e,t=>t.name)}function UC(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,BC.naturalCompare)(i,a)})}});var GC=w(wf=>{"use strict";m();T();N();Object.defineProperty(wf,"__esModule",{value:!0});wf.printIntrospectionSchema=S9;wf.printSchema=O9;wf.printType=qC;var y9=Wt(),I9=br(),g9=jd(),Ov=wt(),eT=pi(),Pl=Lt(),Sv=Wr(),MC=Li(),_9=xa(),v9=df();function O9(e){return xC(e,t=>!(0,Sv.isSpecifiedDirective)(t),D9)}function S9(e){return xC(e,Sv.isSpecifiedDirective,MC.isIntrospectionType)}function D9(e){return!(0,_9.isSpecifiedScalarType)(e)&&!(0,MC.isIntrospectionType)(e)}function xC(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[b9(e),...r.map(a=>B9(a)),...i.map(a=>qC(a))].filter(Boolean).join(` -`)}function S9(e){if(e.description==null&&D9(e))return;let t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);let r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),xi(e)+`schema { +`)}function b9(e){if(e.description==null&&A9(e))return;let t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);let r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),xi(e)+`schema { ${t.join(` `)} -}`}function D9(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;let r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function MC(e){if((0,Rl.isScalarType)(e))return b9(e);if((0,Rl.isObjectType)(e))return A9(e);if((0,Rl.isInterfaceType)(e))return R9(e);if((0,Rl.isUnionType)(e))return P9(e);if((0,Rl.isEnumType)(e))return F9(e);if((0,Rl.isInputObjectType)(e))return w9(e);(0,h9.invariant)(!1,"Unexpected type: "+(0,E9.inspect)(e))}function b9(e){return xi(e)+`scalar ${e.name}`+C9(e)}function xC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function A9(e){return xi(e)+`type ${e.name}`+xC(e)+qC(e)}function R9(e){return xi(e)+`interface ${e.name}`+xC(e)+qC(e)}function P9(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return xi(e)+"union "+e.name+n}function F9(e){let t=e.getValues().map((n,r)=>xi(n," ",!r)+" "+n.name+Dv(n.deprecationReason));return xi(e)+`enum ${e.name}`+Sv(t)}function w9(e){let t=Object.values(e.getFields()).map((n,r)=>xi(n," ",!r)+" "+_v(n));return xi(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Sv(t)}function qC(e){let t=Object.values(e.getFields()).map((n,r)=>xi(n," ",!r)+" "+n.name+VC(n.args," ")+": "+String(n.type)+Dv(n.deprecationReason));return Sv(t)}function Sv(e){return e.length!==0?` { +}`}function A9(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;let r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function qC(e){if((0,Pl.isScalarType)(e))return R9(e);if((0,Pl.isObjectType)(e))return P9(e);if((0,Pl.isInterfaceType)(e))return F9(e);if((0,Pl.isUnionType)(e))return w9(e);if((0,Pl.isEnumType)(e))return L9(e);if((0,Pl.isInputObjectType)(e))return C9(e);(0,I9.invariant)(!1,"Unexpected type: "+(0,y9.inspect)(e))}function R9(e){return xi(e)+`scalar ${e.name}`+U9(e)}function VC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function P9(e){return xi(e)+`type ${e.name}`+VC(e)+jC(e)}function F9(e){return xi(e)+`interface ${e.name}`+VC(e)+jC(e)}function w9(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return xi(e)+"union "+e.name+n}function L9(e){let t=e.getValues().map((n,r)=>xi(n," ",!r)+" "+n.name+bv(n.deprecationReason));return xi(e)+`enum ${e.name}`+Dv(t)}function C9(e){let t=Object.values(e.getFields()).map((n,r)=>xi(n," ",!r)+" "+vv(n));return xi(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Dv(t)}function jC(e){let t=Object.values(e.getFields()).map((n,r)=>xi(n," ",!r)+" "+n.name+KC(n.args," ")+": "+String(n.type)+bv(n.deprecationReason));return Dv(t)}function Dv(e){return e.length!==0?` { `+e.join(` `)+` -}`:""}function VC(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(_v).join(", ")+")":`( -`+e.map((n,r)=>xi(n," "+t,!r)+" "+t+_v(n)).join(` +}`:""}function KC(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(vv).join(", ")+")":`( +`+e.map((n,r)=>xi(n," "+t,!r)+" "+t+vv(n)).join(` `)+` -`+t+")"}function _v(e){let t=(0,g9.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,XN.print)(t)}`),n+Dv(e.deprecationReason)}function L9(e){return xi(e)+"directive @"+e.name+VC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Dv(e){return e==null?"":e!==Ov.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,XN.print)({kind:vv.Kind.STRING,value:e})})`:" @deprecated"}function C9(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,XN.print)({kind:vv.Kind.STRING,value:e.specifiedByURL})})`}function xi(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,XN.print)({kind:vv.Kind.STRING,value:r,block:(0,y9.isPrintableAsBlockString)(r)});return(t&&!n?` +`+t+")"}function vv(e){let t=(0,v9.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,eT.print)(t)}`),n+bv(e.deprecationReason)}function B9(e){return xi(e)+"directive @"+e.name+KC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function bv(e){return e==null?"":e!==Sv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,eT.print)({kind:Ov.Kind.STRING,value:e})})`:" @deprecated"}function U9(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,eT.print)({kind:Ov.Kind.STRING,value:e.specifiedByURL})})`}function xi(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,eT.print)({kind:Ov.Kind.STRING,value:r,block:(0,g9.isPrintableAsBlockString)(r)});return(t&&!n?` `+t:t)+i.replace(/\n/g,` `+t)+` -`}});var KC=w(bv=>{"use strict";m();T();N();Object.defineProperty(bv,"__esModule",{value:!0});bv.concatAST=U9;var B9=wt();function U9(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:B9.Kind.DOCUMENT,definitions:t}}});var QC=w(Av=>{"use strict";m();T();N();Object.defineProperty(Av,"__esModule",{value:!0});Av.separateOperations=M9;var ZN=wt(),k9=nc();function M9(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case ZN.Kind.OPERATION_DEFINITION:t.push(i);break;case ZN.Kind.FRAGMENT_DEFINITION:n[i.name.value]=GC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let c of GC(i.selectionSet))$C(a,n,c);let o=i.name?i.name.value:"";r[o]={kind:ZN.Kind.DOCUMENT,definitions:e.definitions.filter(c=>c===i||c.kind===ZN.Kind.FRAGMENT_DEFINITION&&a.has(c.name.value))}}return r}function $C(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)$C(e,t,i)}}function GC(e){let t=[];return(0,k9.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var HC=w(Pv=>{"use strict";m();T();N();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.stripIgnoredCharacters=q9;var x9=Vd(),YC=Gm(),JC=Jm(),Rv=Kd();function q9(e){let t=(0,JC.isSource)(e)?e:new JC.Source(e),n=t.body,r=new YC.Lexer(t),i="",a=!1;for(;r.advance().kind!==Rv.TokenKind.EOF;){let o=r.token,c=o.kind,l=!(0,YC.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===Rv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);c===Rv.TokenKind.BLOCK_STRING?i+=(0,x9.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var WC=w(eT=>{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.assertValidName=G9;eT.isValidNameError=zC;var V9=qr(),j9=ze(),K9=Wd();function G9(e){let t=zC(e);if(t)throw t;return e}function zC(e){if(typeof e=="string"||(0,V9.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new j9.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,K9.assertName)(e)}catch(t){return t}}});var aB=w($a=>{"use strict";m();T();N();Object.defineProperty($a,"__esModule",{value:!0});$a.DangerousChangeType=$a.BreakingChangeType=void 0;$a.findBreakingChanges=z9;$a.findDangerousChanges=W9;var $9=Wt(),rB=br(),XC=lu(),Q9=pi(),qt=Lt(),Y9=xa(),J9=lf(),H9=Lg(),Mn;$a.BreakingChangeType=Mn;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(Mn||($a.BreakingChangeType=Mn={}));var ma;$a.DangerousChangeType=ma;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(ma||($a.DangerousChangeType=ma={}));function z9(e,t){return iB(e,t).filter(n=>n.type in Mn)}function W9(e,t){return iB(e,t).filter(n=>n.type in ma)}function iB(e,t){return[...Z9(e,t),...X9(e,t)]}function X9(e,t){let n=[],r=As(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Mn.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=As(i.args,a.args);for(let c of o.added)(0,qt.isRequiredArgument)(c)&&n.push({type:Mn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${c.name} on directive ${i.name} was added.`});for(let c of o.removed)n.push({type:Mn.DIRECTIVE_ARG_REMOVED,description:`${c.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Mn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let c of i.locations)a.locations.includes(c)||n.push({type:Mn.DIRECTIVE_LOCATION_REMOVED,description:`${c} was removed from ${i.name}.`})}return n}function Z9(e,t){let n=[],r=As(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED,description:(0,Y9.isSpecifiedScalarType)(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(let[i,a]of r.persisted)(0,qt.isEnumType)(i)&&(0,qt.isEnumType)(a)?n.push(...n7(i,a)):(0,qt.isUnionType)(i)&&(0,qt.isUnionType)(a)?n.push(...t7(i,a)):(0,qt.isInputObjectType)(i)&&(0,qt.isInputObjectType)(a)?n.push(...e7(i,a)):(0,qt.isObjectType)(i)&&(0,qt.isObjectType)(a)?n.push(...eB(i,a),...ZC(i,a)):(0,qt.isInterfaceType)(i)&&(0,qt.isInterfaceType)(a)?n.push(...eB(i,a),...ZC(i,a)):i.constructor!==a.constructor&&n.push({type:Mn.TYPE_CHANGED_KIND,description:`${i.name} changed from ${tB(i)} to ${tB(a)}.`});return n}function e7(e,t){let n=[],r=As(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,qt.isRequiredInputField)(i)?n.push({type:Mn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ma.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)Lf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function t7(e,t){let n=[],r=As(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:ma.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function n7(e,t){let n=[],r=As(e.getValues(),t.getValues());for(let i of r.added)n.push({type:ma.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function ZC(e,t){let n=[],r=As(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:ma.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Mn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function eB(e,t){let n=[],r=As(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...r7(e,i,a)),wf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function r7(e,t,n){let r=[],i=As(t.args,n.args);for(let a of i.removed)r.push({type:Mn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!Lf(a.type,o.type))r.push({type:Mn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(o.type)}.`});else if(a.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:ma.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=nB(a.defaultValue,a.type),d=nB(o.defaultValue,o.type);l!==d&&r.push({type:ma.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${l} to ${d}.`})}for(let a of i.added)(0,qt.isRequiredArgument)(a)?r.push({type:Mn.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:ma.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function wf(e,t){return(0,qt.isListType)(e)?(0,qt.isListType)(t)&&wf(e.ofType,t.ofType)||(0,qt.isNonNullType)(t)&&wf(e,t.ofType):(0,qt.isNonNullType)(e)?(0,qt.isNonNullType)(t)&&wf(e.ofType,t.ofType):(0,qt.isNamedType)(t)&&e.name===t.name||(0,qt.isNonNullType)(t)&&wf(e,t.ofType)}function Lf(e,t){return(0,qt.isListType)(e)?(0,qt.isListType)(t)&&Lf(e.ofType,t.ofType):(0,qt.isNonNullType)(e)?(0,qt.isNonNullType)(t)&&Lf(e.ofType,t.ofType)||!(0,qt.isNonNullType)(t)&&Lf(e.ofType,t):(0,qt.isNamedType)(t)&&e.name===t.name}function tB(e){if((0,qt.isScalarType)(e))return"a Scalar type";if((0,qt.isObjectType)(e))return"an Object type";if((0,qt.isInterfaceType)(e))return"an Interface type";if((0,qt.isUnionType)(e))return"a Union type";if((0,qt.isEnumType)(e))return"an Enum type";if((0,qt.isInputObjectType)(e))return"an Input type";(0,rB.invariant)(!1,"Unexpected type: "+(0,$9.inspect)(e))}function nB(e,t){let n=(0,J9.astFromValue)(e,t);return n!=null||(0,rB.invariant)(!1),(0,Q9.print)((0,H9.sortValueNode)(n))}function As(e,t){let n=[],r=[],i=[],a=(0,XC.keyMap)(e,({name:c})=>c),o=(0,XC.keyMap)(t,({name:c})=>c);for(let c of e){let l=o[c.name];l===void 0?r.push(c):i.push([c,l])}for(let c of t)a[c.name]===void 0&&n.push(c);return{added:n,persisted:i,removed:r}}});var cB=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BreakingChangeType",{enumerable:!0,get:function(){return tT.BreakingChangeType}});Object.defineProperty(kt,"DangerousChangeType",{enumerable:!0,get:function(){return tT.DangerousChangeType}});Object.defineProperty(kt,"TypeInfo",{enumerable:!0,get:function(){return oB.TypeInfo}});Object.defineProperty(kt,"assertValidName",{enumerable:!0,get:function(){return uB.assertValidName}});Object.defineProperty(kt,"astFromValue",{enumerable:!0,get:function(){return m7.astFromValue}});Object.defineProperty(kt,"buildASTSchema",{enumerable:!0,get:function(){return sB.buildASTSchema}});Object.defineProperty(kt,"buildClientSchema",{enumerable:!0,get:function(){return u7.buildClientSchema}});Object.defineProperty(kt,"buildSchema",{enumerable:!0,get:function(){return sB.buildSchema}});Object.defineProperty(kt,"coerceInputValue",{enumerable:!0,get:function(){return N7.coerceInputValue}});Object.defineProperty(kt,"concatAST",{enumerable:!0,get:function(){return T7.concatAST}});Object.defineProperty(kt,"doTypesOverlap",{enumerable:!0,get:function(){return wv.doTypesOverlap}});Object.defineProperty(kt,"extendSchema",{enumerable:!0,get:function(){return c7.extendSchema}});Object.defineProperty(kt,"findBreakingChanges",{enumerable:!0,get:function(){return tT.findBreakingChanges}});Object.defineProperty(kt,"findDangerousChanges",{enumerable:!0,get:function(){return tT.findDangerousChanges}});Object.defineProperty(kt,"getIntrospectionQuery",{enumerable:!0,get:function(){return i7.getIntrospectionQuery}});Object.defineProperty(kt,"getOperationAST",{enumerable:!0,get:function(){return a7.getOperationAST}});Object.defineProperty(kt,"getOperationRootType",{enumerable:!0,get:function(){return s7.getOperationRootType}});Object.defineProperty(kt,"introspectionFromSchema",{enumerable:!0,get:function(){return o7.introspectionFromSchema}});Object.defineProperty(kt,"isEqualType",{enumerable:!0,get:function(){return wv.isEqualType}});Object.defineProperty(kt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return wv.isTypeSubTypeOf}});Object.defineProperty(kt,"isValidNameError",{enumerable:!0,get:function(){return uB.isValidNameError}});Object.defineProperty(kt,"lexicographicSortSchema",{enumerable:!0,get:function(){return l7.lexicographicSortSchema}});Object.defineProperty(kt,"printIntrospectionSchema",{enumerable:!0,get:function(){return Fv.printIntrospectionSchema}});Object.defineProperty(kt,"printSchema",{enumerable:!0,get:function(){return Fv.printSchema}});Object.defineProperty(kt,"printType",{enumerable:!0,get:function(){return Fv.printType}});Object.defineProperty(kt,"separateOperations",{enumerable:!0,get:function(){return E7.separateOperations}});Object.defineProperty(kt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return h7.stripIgnoredCharacters}});Object.defineProperty(kt,"typeFromAST",{enumerable:!0,get:function(){return d7.typeFromAST}});Object.defineProperty(kt,"valueFromAST",{enumerable:!0,get:function(){return f7.valueFromAST}});Object.defineProperty(kt,"valueFromASTUntyped",{enumerable:!0,get:function(){return p7.valueFromASTUntyped}});Object.defineProperty(kt,"visitWithTypeInfo",{enumerable:!0,get:function(){return oB.visitWithTypeInfo}});var i7=pv(),a7=hC(),s7=yC(),o7=IC(),u7=_C(),sB=wC(),c7=yv(),l7=BC(),Fv=jC(),d7=qa(),f7=If(),p7=RI(),m7=lf(),oB=_N(),N7=Zg(),T7=KC(),E7=QC(),h7=HC(),wv=nf(),uB=WC(),tT=aB()});var Oe=w(q=>{"use strict";m();T();N();Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"BREAK",{enumerable:!0,get:function(){return Yt.BREAK}});Object.defineProperty(q,"BreakingChangeType",{enumerable:!0,get:function(){return Jt.BreakingChangeType}});Object.defineProperty(q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ye.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(q,"DangerousChangeType",{enumerable:!0,get:function(){return Jt.DangerousChangeType}});Object.defineProperty(q,"DirectiveLocation",{enumerable:!0,get:function(){return Yt.DirectiveLocation}});Object.defineProperty(q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return ht.ExecutableDefinitionsRule}});Object.defineProperty(q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return ht.FieldsOnCorrectTypeRule}});Object.defineProperty(q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return ht.FragmentsOnCompositeTypesRule}});Object.defineProperty(q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MAX_INT}});Object.defineProperty(q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MIN_INT}});Object.defineProperty(q,"GraphQLBoolean",{enumerable:!0,get:function(){return ye.GraphQLBoolean}});Object.defineProperty(q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ye.GraphQLDeprecatedDirective}});Object.defineProperty(q,"GraphQLDirective",{enumerable:!0,get:function(){return ye.GraphQLDirective}});Object.defineProperty(q,"GraphQLEnumType",{enumerable:!0,get:function(){return ye.GraphQLEnumType}});Object.defineProperty(q,"GraphQLError",{enumerable:!0,get:function(){return Cf.GraphQLError}});Object.defineProperty(q,"GraphQLFloat",{enumerable:!0,get:function(){return ye.GraphQLFloat}});Object.defineProperty(q,"GraphQLID",{enumerable:!0,get:function(){return ye.GraphQLID}});Object.defineProperty(q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ye.GraphQLIncludeDirective}});Object.defineProperty(q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ye.GraphQLInputObjectType}});Object.defineProperty(q,"GraphQLInt",{enumerable:!0,get:function(){return ye.GraphQLInt}});Object.defineProperty(q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ye.GraphQLInterfaceType}});Object.defineProperty(q,"GraphQLList",{enumerable:!0,get:function(){return ye.GraphQLList}});Object.defineProperty(q,"GraphQLNonNull",{enumerable:!0,get:function(){return ye.GraphQLNonNull}});Object.defineProperty(q,"GraphQLObjectType",{enumerable:!0,get:function(){return ye.GraphQLObjectType}});Object.defineProperty(q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ye.GraphQLOneOfDirective}});Object.defineProperty(q,"GraphQLScalarType",{enumerable:!0,get:function(){return ye.GraphQLScalarType}});Object.defineProperty(q,"GraphQLSchema",{enumerable:!0,get:function(){return ye.GraphQLSchema}});Object.defineProperty(q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ye.GraphQLSkipDirective}});Object.defineProperty(q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ye.GraphQLSpecifiedByDirective}});Object.defineProperty(q,"GraphQLString",{enumerable:!0,get:function(){return ye.GraphQLString}});Object.defineProperty(q,"GraphQLUnionType",{enumerable:!0,get:function(){return ye.GraphQLUnionType}});Object.defineProperty(q,"Kind",{enumerable:!0,get:function(){return Yt.Kind}});Object.defineProperty(q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ht.KnownArgumentNamesRule}});Object.defineProperty(q,"KnownDirectivesRule",{enumerable:!0,get:function(){return ht.KnownDirectivesRule}});Object.defineProperty(q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return ht.KnownFragmentNamesRule}});Object.defineProperty(q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return ht.KnownTypeNamesRule}});Object.defineProperty(q,"Lexer",{enumerable:!0,get:function(){return Yt.Lexer}});Object.defineProperty(q,"Location",{enumerable:!0,get:function(){return Yt.Location}});Object.defineProperty(q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ht.LoneAnonymousOperationRule}});Object.defineProperty(q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return ht.LoneSchemaDefinitionRule}});Object.defineProperty(q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return ht.MaxIntrospectionDepthRule}});Object.defineProperty(q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return ht.NoDeprecatedCustomRule}});Object.defineProperty(q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return ht.NoFragmentCyclesRule}});Object.defineProperty(q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return ht.NoSchemaIntrospectionCustomRule}});Object.defineProperty(q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ht.NoUndefinedVariablesRule}});Object.defineProperty(q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return ht.NoUnusedFragmentsRule}});Object.defineProperty(q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ht.NoUnusedVariablesRule}});Object.defineProperty(q,"OperationTypeNode",{enumerable:!0,get:function(){return Yt.OperationTypeNode}});Object.defineProperty(q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return ht.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return ht.PossibleFragmentSpreadsRule}});Object.defineProperty(q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return ht.PossibleTypeExtensionsRule}});Object.defineProperty(q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return ht.ProvidedRequiredArgumentsRule}});Object.defineProperty(q,"ScalarLeafsRule",{enumerable:!0,get:function(){return ht.ScalarLeafsRule}});Object.defineProperty(q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ye.SchemaMetaFieldDef}});Object.defineProperty(q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return ht.SingleFieldSubscriptionsRule}});Object.defineProperty(q,"Source",{enumerable:!0,get:function(){return Yt.Source}});Object.defineProperty(q,"Token",{enumerable:!0,get:function(){return Yt.Token}});Object.defineProperty(q,"TokenKind",{enumerable:!0,get:function(){return Yt.TokenKind}});Object.defineProperty(q,"TypeInfo",{enumerable:!0,get:function(){return Jt.TypeInfo}});Object.defineProperty(q,"TypeKind",{enumerable:!0,get:function(){return ye.TypeKind}});Object.defineProperty(q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeMetaFieldDef}});Object.defineProperty(q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeNameMetaFieldDef}});Object.defineProperty(q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentNamesRule}});Object.defineProperty(q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return ht.UniqueDirectiveNamesRule}});Object.defineProperty(q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return ht.UniqueDirectivesPerLocationRule}});Object.defineProperty(q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return ht.UniqueEnumValueNamesRule}});Object.defineProperty(q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueFieldDefinitionNamesRule}});Object.defineProperty(q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return ht.UniqueFragmentNamesRule}});Object.defineProperty(q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return ht.UniqueInputFieldNamesRule}});Object.defineProperty(q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return ht.UniqueOperationNamesRule}});Object.defineProperty(q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return ht.UniqueOperationTypesRule}});Object.defineProperty(q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return ht.UniqueTypeNamesRule}});Object.defineProperty(q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return ht.UniqueVariableNamesRule}});Object.defineProperty(q,"ValidationContext",{enumerable:!0,get:function(){return ht.ValidationContext}});Object.defineProperty(q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return ht.ValuesOfCorrectTypeRule}});Object.defineProperty(q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return ht.VariablesAreInputTypesRule}});Object.defineProperty(q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return ht.VariablesInAllowedPositionRule}});Object.defineProperty(q,"__Directive",{enumerable:!0,get:function(){return ye.__Directive}});Object.defineProperty(q,"__DirectiveLocation",{enumerable:!0,get:function(){return ye.__DirectiveLocation}});Object.defineProperty(q,"__EnumValue",{enumerable:!0,get:function(){return ye.__EnumValue}});Object.defineProperty(q,"__Field",{enumerable:!0,get:function(){return ye.__Field}});Object.defineProperty(q,"__InputValue",{enumerable:!0,get:function(){return ye.__InputValue}});Object.defineProperty(q,"__Schema",{enumerable:!0,get:function(){return ye.__Schema}});Object.defineProperty(q,"__Type",{enumerable:!0,get:function(){return ye.__Type}});Object.defineProperty(q,"__TypeKind",{enumerable:!0,get:function(){return ye.__TypeKind}});Object.defineProperty(q,"assertAbstractType",{enumerable:!0,get:function(){return ye.assertAbstractType}});Object.defineProperty(q,"assertCompositeType",{enumerable:!0,get:function(){return ye.assertCompositeType}});Object.defineProperty(q,"assertDirective",{enumerable:!0,get:function(){return ye.assertDirective}});Object.defineProperty(q,"assertEnumType",{enumerable:!0,get:function(){return ye.assertEnumType}});Object.defineProperty(q,"assertEnumValueName",{enumerable:!0,get:function(){return ye.assertEnumValueName}});Object.defineProperty(q,"assertInputObjectType",{enumerable:!0,get:function(){return ye.assertInputObjectType}});Object.defineProperty(q,"assertInputType",{enumerable:!0,get:function(){return ye.assertInputType}});Object.defineProperty(q,"assertInterfaceType",{enumerable:!0,get:function(){return ye.assertInterfaceType}});Object.defineProperty(q,"assertLeafType",{enumerable:!0,get:function(){return ye.assertLeafType}});Object.defineProperty(q,"assertListType",{enumerable:!0,get:function(){return ye.assertListType}});Object.defineProperty(q,"assertName",{enumerable:!0,get:function(){return ye.assertName}});Object.defineProperty(q,"assertNamedType",{enumerable:!0,get:function(){return ye.assertNamedType}});Object.defineProperty(q,"assertNonNullType",{enumerable:!0,get:function(){return ye.assertNonNullType}});Object.defineProperty(q,"assertNullableType",{enumerable:!0,get:function(){return ye.assertNullableType}});Object.defineProperty(q,"assertObjectType",{enumerable:!0,get:function(){return ye.assertObjectType}});Object.defineProperty(q,"assertOutputType",{enumerable:!0,get:function(){return ye.assertOutputType}});Object.defineProperty(q,"assertScalarType",{enumerable:!0,get:function(){return ye.assertScalarType}});Object.defineProperty(q,"assertSchema",{enumerable:!0,get:function(){return ye.assertSchema}});Object.defineProperty(q,"assertType",{enumerable:!0,get:function(){return ye.assertType}});Object.defineProperty(q,"assertUnionType",{enumerable:!0,get:function(){return ye.assertUnionType}});Object.defineProperty(q,"assertValidName",{enumerable:!0,get:function(){return Jt.assertValidName}});Object.defineProperty(q,"assertValidSchema",{enumerable:!0,get:function(){return ye.assertValidSchema}});Object.defineProperty(q,"assertWrappingType",{enumerable:!0,get:function(){return ye.assertWrappingType}});Object.defineProperty(q,"astFromValue",{enumerable:!0,get:function(){return Jt.astFromValue}});Object.defineProperty(q,"buildASTSchema",{enumerable:!0,get:function(){return Jt.buildASTSchema}});Object.defineProperty(q,"buildClientSchema",{enumerable:!0,get:function(){return Jt.buildClientSchema}});Object.defineProperty(q,"buildSchema",{enumerable:!0,get:function(){return Jt.buildSchema}});Object.defineProperty(q,"coerceInputValue",{enumerable:!0,get:function(){return Jt.coerceInputValue}});Object.defineProperty(q,"concatAST",{enumerable:!0,get:function(){return Jt.concatAST}});Object.defineProperty(q,"createSourceEventStream",{enumerable:!0,get:function(){return Qa.createSourceEventStream}});Object.defineProperty(q,"defaultFieldResolver",{enumerable:!0,get:function(){return Qa.defaultFieldResolver}});Object.defineProperty(q,"defaultTypeResolver",{enumerable:!0,get:function(){return Qa.defaultTypeResolver}});Object.defineProperty(q,"doTypesOverlap",{enumerable:!0,get:function(){return Jt.doTypesOverlap}});Object.defineProperty(q,"execute",{enumerable:!0,get:function(){return Qa.execute}});Object.defineProperty(q,"executeSync",{enumerable:!0,get:function(){return Qa.executeSync}});Object.defineProperty(q,"extendSchema",{enumerable:!0,get:function(){return Jt.extendSchema}});Object.defineProperty(q,"findBreakingChanges",{enumerable:!0,get:function(){return Jt.findBreakingChanges}});Object.defineProperty(q,"findDangerousChanges",{enumerable:!0,get:function(){return Jt.findDangerousChanges}});Object.defineProperty(q,"formatError",{enumerable:!0,get:function(){return Cf.formatError}});Object.defineProperty(q,"getArgumentValues",{enumerable:!0,get:function(){return Qa.getArgumentValues}});Object.defineProperty(q,"getDirectiveValues",{enumerable:!0,get:function(){return Qa.getDirectiveValues}});Object.defineProperty(q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Yt.getEnterLeaveForKind}});Object.defineProperty(q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jt.getIntrospectionQuery}});Object.defineProperty(q,"getLocation",{enumerable:!0,get:function(){return Yt.getLocation}});Object.defineProperty(q,"getNamedType",{enumerable:!0,get:function(){return ye.getNamedType}});Object.defineProperty(q,"getNullableType",{enumerable:!0,get:function(){return ye.getNullableType}});Object.defineProperty(q,"getOperationAST",{enumerable:!0,get:function(){return Jt.getOperationAST}});Object.defineProperty(q,"getOperationRootType",{enumerable:!0,get:function(){return Jt.getOperationRootType}});Object.defineProperty(q,"getVariableValues",{enumerable:!0,get:function(){return Qa.getVariableValues}});Object.defineProperty(q,"getVisitFn",{enumerable:!0,get:function(){return Yt.getVisitFn}});Object.defineProperty(q,"graphql",{enumerable:!0,get:function(){return dB.graphql}});Object.defineProperty(q,"graphqlSync",{enumerable:!0,get:function(){return dB.graphqlSync}});Object.defineProperty(q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jt.introspectionFromSchema}});Object.defineProperty(q,"introspectionTypes",{enumerable:!0,get:function(){return ye.introspectionTypes}});Object.defineProperty(q,"isAbstractType",{enumerable:!0,get:function(){return ye.isAbstractType}});Object.defineProperty(q,"isCompositeType",{enumerable:!0,get:function(){return ye.isCompositeType}});Object.defineProperty(q,"isConstValueNode",{enumerable:!0,get:function(){return Yt.isConstValueNode}});Object.defineProperty(q,"isDefinitionNode",{enumerable:!0,get:function(){return Yt.isDefinitionNode}});Object.defineProperty(q,"isDirective",{enumerable:!0,get:function(){return ye.isDirective}});Object.defineProperty(q,"isEnumType",{enumerable:!0,get:function(){return ye.isEnumType}});Object.defineProperty(q,"isEqualType",{enumerable:!0,get:function(){return Jt.isEqualType}});Object.defineProperty(q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Yt.isExecutableDefinitionNode}});Object.defineProperty(q,"isInputObjectType",{enumerable:!0,get:function(){return ye.isInputObjectType}});Object.defineProperty(q,"isInputType",{enumerable:!0,get:function(){return ye.isInputType}});Object.defineProperty(q,"isInterfaceType",{enumerable:!0,get:function(){return ye.isInterfaceType}});Object.defineProperty(q,"isIntrospectionType",{enumerable:!0,get:function(){return ye.isIntrospectionType}});Object.defineProperty(q,"isLeafType",{enumerable:!0,get:function(){return ye.isLeafType}});Object.defineProperty(q,"isListType",{enumerable:!0,get:function(){return ye.isListType}});Object.defineProperty(q,"isNamedType",{enumerable:!0,get:function(){return ye.isNamedType}});Object.defineProperty(q,"isNonNullType",{enumerable:!0,get:function(){return ye.isNonNullType}});Object.defineProperty(q,"isNullableType",{enumerable:!0,get:function(){return ye.isNullableType}});Object.defineProperty(q,"isObjectType",{enumerable:!0,get:function(){return ye.isObjectType}});Object.defineProperty(q,"isOutputType",{enumerable:!0,get:function(){return ye.isOutputType}});Object.defineProperty(q,"isRequiredArgument",{enumerable:!0,get:function(){return ye.isRequiredArgument}});Object.defineProperty(q,"isRequiredInputField",{enumerable:!0,get:function(){return ye.isRequiredInputField}});Object.defineProperty(q,"isScalarType",{enumerable:!0,get:function(){return ye.isScalarType}});Object.defineProperty(q,"isSchema",{enumerable:!0,get:function(){return ye.isSchema}});Object.defineProperty(q,"isSelectionNode",{enumerable:!0,get:function(){return Yt.isSelectionNode}});Object.defineProperty(q,"isSpecifiedDirective",{enumerable:!0,get:function(){return ye.isSpecifiedDirective}});Object.defineProperty(q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ye.isSpecifiedScalarType}});Object.defineProperty(q,"isType",{enumerable:!0,get:function(){return ye.isType}});Object.defineProperty(q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeDefinitionNode}});Object.defineProperty(q,"isTypeExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeExtensionNode}});Object.defineProperty(q,"isTypeNode",{enumerable:!0,get:function(){return Yt.isTypeNode}});Object.defineProperty(q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jt.isTypeSubTypeOf}});Object.defineProperty(q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemDefinitionNode}});Object.defineProperty(q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemExtensionNode}});Object.defineProperty(q,"isUnionType",{enumerable:!0,get:function(){return ye.isUnionType}});Object.defineProperty(q,"isValidNameError",{enumerable:!0,get:function(){return Jt.isValidNameError}});Object.defineProperty(q,"isValueNode",{enumerable:!0,get:function(){return Yt.isValueNode}});Object.defineProperty(q,"isWrappingType",{enumerable:!0,get:function(){return ye.isWrappingType}});Object.defineProperty(q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jt.lexicographicSortSchema}});Object.defineProperty(q,"locatedError",{enumerable:!0,get:function(){return Cf.locatedError}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Yt.parse}});Object.defineProperty(q,"parseConstValue",{enumerable:!0,get:function(){return Yt.parseConstValue}});Object.defineProperty(q,"parseType",{enumerable:!0,get:function(){return Yt.parseType}});Object.defineProperty(q,"parseValue",{enumerable:!0,get:function(){return Yt.parseValue}});Object.defineProperty(q,"print",{enumerable:!0,get:function(){return Yt.print}});Object.defineProperty(q,"printError",{enumerable:!0,get:function(){return Cf.printError}});Object.defineProperty(q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jt.printIntrospectionSchema}});Object.defineProperty(q,"printLocation",{enumerable:!0,get:function(){return Yt.printLocation}});Object.defineProperty(q,"printSchema",{enumerable:!0,get:function(){return Jt.printSchema}});Object.defineProperty(q,"printSourceLocation",{enumerable:!0,get:function(){return Yt.printSourceLocation}});Object.defineProperty(q,"printType",{enumerable:!0,get:function(){return Jt.printType}});Object.defineProperty(q,"recommendedRules",{enumerable:!0,get:function(){return ht.recommendedRules}});Object.defineProperty(q,"resolveObjMapThunk",{enumerable:!0,get:function(){return ye.resolveObjMapThunk}});Object.defineProperty(q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ye.resolveReadonlyArrayThunk}});Object.defineProperty(q,"responsePathAsArray",{enumerable:!0,get:function(){return Qa.responsePathAsArray}});Object.defineProperty(q,"separateOperations",{enumerable:!0,get:function(){return Jt.separateOperations}});Object.defineProperty(q,"specifiedDirectives",{enumerable:!0,get:function(){return ye.specifiedDirectives}});Object.defineProperty(q,"specifiedRules",{enumerable:!0,get:function(){return ht.specifiedRules}});Object.defineProperty(q,"specifiedScalarTypes",{enumerable:!0,get:function(){return ye.specifiedScalarTypes}});Object.defineProperty(q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jt.stripIgnoredCharacters}});Object.defineProperty(q,"subscribe",{enumerable:!0,get:function(){return Qa.subscribe}});Object.defineProperty(q,"syntaxError",{enumerable:!0,get:function(){return Cf.syntaxError}});Object.defineProperty(q,"typeFromAST",{enumerable:!0,get:function(){return Jt.typeFromAST}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return ht.validate}});Object.defineProperty(q,"validateSchema",{enumerable:!0,get:function(){return ye.validateSchema}});Object.defineProperty(q,"valueFromAST",{enumerable:!0,get:function(){return Jt.valueFromAST}});Object.defineProperty(q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jt.valueFromASTUntyped}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return lB.version}});Object.defineProperty(q,"versionInfo",{enumerable:!0,get:function(){return lB.versionInfo}});Object.defineProperty(q,"visit",{enumerable:!0,get:function(){return Yt.visit}});Object.defineProperty(q,"visitInParallel",{enumerable:!0,get:function(){return Yt.visitInParallel}});Object.defineProperty(q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jt.visitWithTypeInfo}});var lB=aF(),dB=ZL(),ye=nC(),Yt=iC(),Qa=fC(),ht=TC(),Cf=EC(),Jt=cB()});var zn=w(R=>{"use strict";m();T();N();Object.defineProperty(R,"__esModule",{value:!0});R.FIELD_UPPER=R.FIELD_PATH=R.FIELD=R.EXTENSIONS=R.EXTENDS=R.EXTERNAL=R.EXECUTION=R.ENUM_VALUE_UPPER=R.ENUM_VALUE=R.ENUM_UPPER=R.ENUM=R.ENTITY_UNION=R.ENTITIES_FIELD=R.ENTITIES=R.EDFS_REDIS_SUBSCRIBE=R.EDFS_REDIS_PUBLISH=R.EDFS_NATS_STREAM_CONFIGURATION=R.EDFS_PUBLISH_RESULT=R.EDFS_NATS_SUBSCRIBE=R.EDFS_NATS_REQUEST=R.EDFS_NATS_PUBLISH=R.EDFS_KAFKA_SUBSCRIBE=R.EDFS_KAFKA_PUBLISH=R.DIRECTIVE_DEFINITION=R.DESCRIPTION_OVERRIDE=R.DEPRECATED_DEFAULT_ARGUMENT_VALUE=R.DEPRECATED=R.DEFAULT_SUBSCRIPTION=R.DEFAULT_QUERY=R.DEFAULT_MUTATION=R.DEFAULT_EDFS_PROVIDER_ID=R.DEFAULT=R.CONTEXT=R.CONNECT_FIELD_RESOLVER=R.CONSUMER_NAME=R.CONSUMER_INACTIVE_THRESHOLD=R.CONFIGURE_CHILD_DESCRIPTIONS=R.CONFIGURE_DESCRIPTION=R.CONDITION=R.COMPOSE_DIRECTIVE=R.CHANNELS=R.CHANNEL=R.BOOLEAN_SCALAR=R.BOOLEAN=R.ARGUMENT_DEFINITION_UPPER=R.AUTHENTICATED=R.ARGUMENT=R.ANY_SCALAR=R.AND_UPPER=R.AS=void 0;R.NOT_UPPER=R.NON_NULLABLE_STRING=R.NON_NULLABLE_INT=R.NON_NULLABLE_BOOLEAN=R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=R.NAME=R.NOT_APPLICABLE=R.PROVIDER_TYPE_REDIS=R.PROVIDER_TYPE_NATS=R.PROVIDER_TYPE_KAFKA=R.PROPAGATE=R.MUTATION_UPPER=R.MUTATION=R.NUMBER=R.LITERAL_PERIOD=R.LITERAL_NEW_LINE=R.LITERAL_SPACE=R.LIST=R.LINK_PURPOSE=R.LINK_IMPORT=R.LINK=R.LEVELS=R.LEFT_PARENTHESIS=R.KEY=R.INTERFACE_OBJECT=R.INTERFACE_UPPER=R.INTERFACE=R.INT_SCALAR=R.INPUT_VALUE=R.INPUT_OBJECT_UPPER=R.INPUT_OBJECT=R.INPUT_FIELD_DEFINITION_UPPER=R.INPUT_FIELD=R.INPUT=R.INLINE_FRAGMENT_UPPER=R.INLINE_FRAGMENT=R.INACCESSIBLE=R.IN_UPPER=R.IMPORT=R.ID_SCALAR=R.HYPHEN_JOIN=R.FROM=R.FRAGMENT_SPREAD_UPPER=R.FRAGMENT_DEFINITION_UPPER=R.FOR=R.FLOAT_SCALAR=R.FIRST_ORDINAL=R.FIELD_DEFINITION_UPPER=R.FIELDS=R.FIELD_SET_SCALAR=void 0;R.TAG=R.SUCCESS=R.SUBSCRIPTION_UPPER=R.SUBSCRIBE=R.SUBSCRIPTION_FILTER_VALUE=R.SUBSCRIPTION_FILTER_CONDITION=R.SUBSCRIPTION_FILTER=R.SUBSCRIPTION_FIELD_CONDITION=R.SUBSCRIPTION=R.SUBJECTS=R.SUBJECT=R.STRING_SCALAR=R.STRING=R.STREAM_NAME=R.STREAM_CONFIGURATION=R.SPECIFIED_BY=R.SHAREABLE=R.SERVICE_FIELD=R.SERVICE_OBJECT=R.SEMANTIC_NON_NULL=R.SELECTION_REPRESENTATION=R.SECURITY=R.SCOPE_SCALAR=R.SCOPES=R.SCHEMA_UPPER=R.SCHEMA=R.SCALAR_UPPER=R.SCALAR=R.RESOLVABLE=R.REQUIRES_SCOPES=R.REQUIRES=R.REQUIRE_FETCH_REASONS=R.REQUEST=R.REASON=R.QUOTATION_JOIN=R.QUERY_UPPER=R.QUERY=R.PUBLISH=R.PROVIDES=R.PROVIDER_ID=R.PARENT_EXTENSION_DATA_MAP=R.PARENT_DEFINITION_DATA_MAP=R.PARENT_DEFINITION_DATA=R.OVERRIDE=R.OR_UPPER=R.OBJECT_UPPER=R.OBJECT=R.OPERATION_TO_DEFAULT=R.ONE_OF=R.NULL=void 0;R.NON_REPEATABLE_PERSISTED_DIRECTIVES=R.OUTPUT_NODE_KINDS=R.INPUT_NODE_KINDS=R.IGNORED_FIELDS=R.INHERITABLE_DIRECTIVE_NAMES=R.PERSISTED_CLIENT_DIRECTIVES=R.AUTHORIZATION_DIRECTIVES=R.ROOT_TYPE_NAMES=R.EXECUTABLE_DIRECTIVE_LOCATIONS=R.VARIABLE_DEFINITION_UPPER=R.VALUES=R.URL_LOWER=R.UNION_UPPER=R.UNION=R.TYPENAME=R.TOPICS=R.TOPIC=void 0;var hu=Oe();R.AS="as";R.AND_UPPER="AND";R.ANY_SCALAR="_Any";R.ARGUMENT="argument";R.AUTHENTICATED="authenticated";R.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";R.BOOLEAN="boolean";R.BOOLEAN_SCALAR="Boolean";R.CHANNEL="channel";R.CHANNELS="channels";R.COMPOSE_DIRECTIVE="composeDirective";R.CONDITION="condition";R.CONFIGURE_DESCRIPTION="openfed__configureDescription";R.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";R.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";R.CONSUMER_NAME="consumerName";R.CONNECT_FIELD_RESOLVER="connect__fieldResolver";R.CONTEXT="context";R.DEFAULT="default";R.DEFAULT_EDFS_PROVIDER_ID="default";R.DEFAULT_MUTATION="Mutation";R.DEFAULT_QUERY="Query";R.DEFAULT_SUBSCRIPTION="Subscription";R.DEPRECATED="deprecated";R.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";R.DESCRIPTION_OVERRIDE="descriptionOverride";R.DIRECTIVE_DEFINITION="directive definition";R.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";R.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";R.EDFS_NATS_PUBLISH="edfs__natsPublish";R.EDFS_NATS_REQUEST="edfs__natsRequest";R.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";R.EDFS_PUBLISH_RESULT="edfs__PublishResult";R.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";R.EDFS_REDIS_PUBLISH="edfs__redisPublish";R.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";R.ENTITIES="entities";R.ENTITIES_FIELD="_entities";R.ENTITY_UNION="_Entity";R.ENUM="Enum";R.ENUM_UPPER="ENUM";R.ENUM_VALUE="Enum Value";R.ENUM_VALUE_UPPER="ENUM_VALUE";R.EXECUTION="EXECUTION";R.EXTERNAL="external";R.EXTENDS="extends";R.EXTENSIONS="extensions";R.FIELD="field";R.FIELD_PATH="fieldPath";R.FIELD_UPPER="FIELD";R.FIELD_SET_SCALAR="openfed__FieldSet";R.FIELDS="fields";R.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";R.FIRST_ORDINAL="1st";R.FLOAT_SCALAR="Float";R.FOR="for";R.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";R.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";R.FROM="from";R.HYPHEN_JOIN=` +`}});var $C=w(Av=>{"use strict";m();T();N();Object.defineProperty(Av,"__esModule",{value:!0});Av.concatAST=M9;var k9=wt();function M9(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:k9.Kind.DOCUMENT,definitions:t}}});var JC=w(Rv=>{"use strict";m();T();N();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.separateOperations=q9;var tT=wt(),x9=rc();function q9(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case tT.Kind.OPERATION_DEFINITION:t.push(i);break;case tT.Kind.FRAGMENT_DEFINITION:n[i.name.value]=QC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let c of QC(i.selectionSet))YC(a,n,c);let o=i.name?i.name.value:"";r[o]={kind:tT.Kind.DOCUMENT,definitions:e.definitions.filter(c=>c===i||c.kind===tT.Kind.FRAGMENT_DEFINITION&&a.has(c.name.value))}}return r}function YC(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)YC(e,t,i)}}function QC(e){let t=[];return(0,x9.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var WC=w(Fv=>{"use strict";m();T();N();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.stripIgnoredCharacters=j9;var V9=jd(),HC=Qm(),zC=zm(),Pv=Gd();function j9(e){let t=(0,zC.isSource)(e)?e:new zC.Source(e),n=t.body,r=new HC.Lexer(t),i="",a=!1;for(;r.advance().kind!==Pv.TokenKind.EOF;){let o=r.token,c=o.kind,l=!(0,HC.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===Pv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);c===Pv.TokenKind.BLOCK_STRING?i+=(0,V9.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var ZC=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.assertValidName=Q9;nT.isValidNameError=XC;var K9=qr(),G9=ze(),$9=Xd();function Q9(e){let t=XC(e);if(t)throw t;return e}function XC(e){if(typeof e=="string"||(0,K9.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new G9.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,$9.assertName)(e)}catch(t){return t}}});var oB=w($a=>{"use strict";m();T();N();Object.defineProperty($a,"__esModule",{value:!0});$a.DangerousChangeType=$a.BreakingChangeType=void 0;$a.findBreakingChanges=X9;$a.findDangerousChanges=Z9;var Y9=Wt(),aB=br(),eB=du(),J9=pi(),qt=Lt(),H9=xa(),z9=df(),W9=Cg(),Mn;$a.BreakingChangeType=Mn;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(Mn||($a.BreakingChangeType=Mn={}));var ma;$a.DangerousChangeType=ma;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(ma||($a.DangerousChangeType=ma={}));function X9(e,t){return sB(e,t).filter(n=>n.type in Mn)}function Z9(e,t){return sB(e,t).filter(n=>n.type in ma)}function sB(e,t){return[...t7(e,t),...e7(e,t)]}function e7(e,t){let n=[],r=As(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Mn.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=As(i.args,a.args);for(let c of o.added)(0,qt.isRequiredArgument)(c)&&n.push({type:Mn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${c.name} on directive ${i.name} was added.`});for(let c of o.removed)n.push({type:Mn.DIRECTIVE_ARG_REMOVED,description:`${c.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Mn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let c of i.locations)a.locations.includes(c)||n.push({type:Mn.DIRECTIVE_LOCATION_REMOVED,description:`${c} was removed from ${i.name}.`})}return n}function t7(e,t){let n=[],r=As(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED,description:(0,H9.isSpecifiedScalarType)(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(let[i,a]of r.persisted)(0,qt.isEnumType)(i)&&(0,qt.isEnumType)(a)?n.push(...i7(i,a)):(0,qt.isUnionType)(i)&&(0,qt.isUnionType)(a)?n.push(...r7(i,a)):(0,qt.isInputObjectType)(i)&&(0,qt.isInputObjectType)(a)?n.push(...n7(i,a)):(0,qt.isObjectType)(i)&&(0,qt.isObjectType)(a)?n.push(...nB(i,a),...tB(i,a)):(0,qt.isInterfaceType)(i)&&(0,qt.isInterfaceType)(a)?n.push(...nB(i,a),...tB(i,a)):i.constructor!==a.constructor&&n.push({type:Mn.TYPE_CHANGED_KIND,description:`${i.name} changed from ${rB(i)} to ${rB(a)}.`});return n}function n7(e,t){let n=[],r=As(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,qt.isRequiredInputField)(i)?n.push({type:Mn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ma.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)Cf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function r7(e,t){let n=[],r=As(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:ma.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function i7(e,t){let n=[],r=As(e.getValues(),t.getValues());for(let i of r.added)n.push({type:ma.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function tB(e,t){let n=[],r=As(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:ma.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Mn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function nB(e,t){let n=[],r=As(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...a7(e,i,a)),Lf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function a7(e,t,n){let r=[],i=As(t.args,n.args);for(let a of i.removed)r.push({type:Mn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!Cf(a.type,o.type))r.push({type:Mn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(o.type)}.`});else if(a.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:ma.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=iB(a.defaultValue,a.type),d=iB(o.defaultValue,o.type);l!==d&&r.push({type:ma.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${l} to ${d}.`})}for(let a of i.added)(0,qt.isRequiredArgument)(a)?r.push({type:Mn.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:ma.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Lf(e,t){return(0,qt.isListType)(e)?(0,qt.isListType)(t)&&Lf(e.ofType,t.ofType)||(0,qt.isNonNullType)(t)&&Lf(e,t.ofType):(0,qt.isNonNullType)(e)?(0,qt.isNonNullType)(t)&&Lf(e.ofType,t.ofType):(0,qt.isNamedType)(t)&&e.name===t.name||(0,qt.isNonNullType)(t)&&Lf(e,t.ofType)}function Cf(e,t){return(0,qt.isListType)(e)?(0,qt.isListType)(t)&&Cf(e.ofType,t.ofType):(0,qt.isNonNullType)(e)?(0,qt.isNonNullType)(t)&&Cf(e.ofType,t.ofType)||!(0,qt.isNonNullType)(t)&&Cf(e.ofType,t):(0,qt.isNamedType)(t)&&e.name===t.name}function rB(e){if((0,qt.isScalarType)(e))return"a Scalar type";if((0,qt.isObjectType)(e))return"an Object type";if((0,qt.isInterfaceType)(e))return"an Interface type";if((0,qt.isUnionType)(e))return"a Union type";if((0,qt.isEnumType)(e))return"an Enum type";if((0,qt.isInputObjectType)(e))return"an Input type";(0,aB.invariant)(!1,"Unexpected type: "+(0,Y9.inspect)(e))}function iB(e,t){let n=(0,z9.astFromValue)(e,t);return n!=null||(0,aB.invariant)(!1),(0,J9.print)((0,W9.sortValueNode)(n))}function As(e,t){let n=[],r=[],i=[],a=(0,eB.keyMap)(e,({name:c})=>c),o=(0,eB.keyMap)(t,({name:c})=>c);for(let c of e){let l=o[c.name];l===void 0?r.push(c):i.push([c,l])}for(let c of t)a[c.name]===void 0&&n.push(c);return{added:n,persisted:i,removed:r}}});var dB=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BreakingChangeType",{enumerable:!0,get:function(){return rT.BreakingChangeType}});Object.defineProperty(kt,"DangerousChangeType",{enumerable:!0,get:function(){return rT.DangerousChangeType}});Object.defineProperty(kt,"TypeInfo",{enumerable:!0,get:function(){return cB.TypeInfo}});Object.defineProperty(kt,"assertValidName",{enumerable:!0,get:function(){return lB.assertValidName}});Object.defineProperty(kt,"astFromValue",{enumerable:!0,get:function(){return T7.astFromValue}});Object.defineProperty(kt,"buildASTSchema",{enumerable:!0,get:function(){return uB.buildASTSchema}});Object.defineProperty(kt,"buildClientSchema",{enumerable:!0,get:function(){return l7.buildClientSchema}});Object.defineProperty(kt,"buildSchema",{enumerable:!0,get:function(){return uB.buildSchema}});Object.defineProperty(kt,"coerceInputValue",{enumerable:!0,get:function(){return E7.coerceInputValue}});Object.defineProperty(kt,"concatAST",{enumerable:!0,get:function(){return h7.concatAST}});Object.defineProperty(kt,"doTypesOverlap",{enumerable:!0,get:function(){return Lv.doTypesOverlap}});Object.defineProperty(kt,"extendSchema",{enumerable:!0,get:function(){return d7.extendSchema}});Object.defineProperty(kt,"findBreakingChanges",{enumerable:!0,get:function(){return rT.findBreakingChanges}});Object.defineProperty(kt,"findDangerousChanges",{enumerable:!0,get:function(){return rT.findDangerousChanges}});Object.defineProperty(kt,"getIntrospectionQuery",{enumerable:!0,get:function(){return s7.getIntrospectionQuery}});Object.defineProperty(kt,"getOperationAST",{enumerable:!0,get:function(){return o7.getOperationAST}});Object.defineProperty(kt,"getOperationRootType",{enumerable:!0,get:function(){return u7.getOperationRootType}});Object.defineProperty(kt,"introspectionFromSchema",{enumerable:!0,get:function(){return c7.introspectionFromSchema}});Object.defineProperty(kt,"isEqualType",{enumerable:!0,get:function(){return Lv.isEqualType}});Object.defineProperty(kt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Lv.isTypeSubTypeOf}});Object.defineProperty(kt,"isValidNameError",{enumerable:!0,get:function(){return lB.isValidNameError}});Object.defineProperty(kt,"lexicographicSortSchema",{enumerable:!0,get:function(){return f7.lexicographicSortSchema}});Object.defineProperty(kt,"printIntrospectionSchema",{enumerable:!0,get:function(){return wv.printIntrospectionSchema}});Object.defineProperty(kt,"printSchema",{enumerable:!0,get:function(){return wv.printSchema}});Object.defineProperty(kt,"printType",{enumerable:!0,get:function(){return wv.printType}});Object.defineProperty(kt,"separateOperations",{enumerable:!0,get:function(){return y7.separateOperations}});Object.defineProperty(kt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return I7.stripIgnoredCharacters}});Object.defineProperty(kt,"typeFromAST",{enumerable:!0,get:function(){return p7.typeFromAST}});Object.defineProperty(kt,"valueFromAST",{enumerable:!0,get:function(){return m7.valueFromAST}});Object.defineProperty(kt,"valueFromASTUntyped",{enumerable:!0,get:function(){return N7.valueFromASTUntyped}});Object.defineProperty(kt,"visitWithTypeInfo",{enumerable:!0,get:function(){return cB.visitWithTypeInfo}});var s7=mv(),o7=IC(),u7=gC(),c7=_C(),l7=OC(),uB=CC(),d7=Iv(),f7=kC(),wv=GC(),p7=qa(),m7=gf(),N7=PI(),T7=df(),cB=ON(),E7=e_(),h7=$C(),y7=JC(),I7=WC(),Lv=rf(),lB=ZC(),rT=oB()});var Oe=w(q=>{"use strict";m();T();N();Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"BREAK",{enumerable:!0,get:function(){return Yt.BREAK}});Object.defineProperty(q,"BreakingChangeType",{enumerable:!0,get:function(){return Jt.BreakingChangeType}});Object.defineProperty(q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ye.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(q,"DangerousChangeType",{enumerable:!0,get:function(){return Jt.DangerousChangeType}});Object.defineProperty(q,"DirectiveLocation",{enumerable:!0,get:function(){return Yt.DirectiveLocation}});Object.defineProperty(q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return ht.ExecutableDefinitionsRule}});Object.defineProperty(q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return ht.FieldsOnCorrectTypeRule}});Object.defineProperty(q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return ht.FragmentsOnCompositeTypesRule}});Object.defineProperty(q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MAX_INT}});Object.defineProperty(q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MIN_INT}});Object.defineProperty(q,"GraphQLBoolean",{enumerable:!0,get:function(){return ye.GraphQLBoolean}});Object.defineProperty(q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ye.GraphQLDeprecatedDirective}});Object.defineProperty(q,"GraphQLDirective",{enumerable:!0,get:function(){return ye.GraphQLDirective}});Object.defineProperty(q,"GraphQLEnumType",{enumerable:!0,get:function(){return ye.GraphQLEnumType}});Object.defineProperty(q,"GraphQLError",{enumerable:!0,get:function(){return Bf.GraphQLError}});Object.defineProperty(q,"GraphQLFloat",{enumerable:!0,get:function(){return ye.GraphQLFloat}});Object.defineProperty(q,"GraphQLID",{enumerable:!0,get:function(){return ye.GraphQLID}});Object.defineProperty(q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ye.GraphQLIncludeDirective}});Object.defineProperty(q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ye.GraphQLInputObjectType}});Object.defineProperty(q,"GraphQLInt",{enumerable:!0,get:function(){return ye.GraphQLInt}});Object.defineProperty(q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ye.GraphQLInterfaceType}});Object.defineProperty(q,"GraphQLList",{enumerable:!0,get:function(){return ye.GraphQLList}});Object.defineProperty(q,"GraphQLNonNull",{enumerable:!0,get:function(){return ye.GraphQLNonNull}});Object.defineProperty(q,"GraphQLObjectType",{enumerable:!0,get:function(){return ye.GraphQLObjectType}});Object.defineProperty(q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ye.GraphQLOneOfDirective}});Object.defineProperty(q,"GraphQLScalarType",{enumerable:!0,get:function(){return ye.GraphQLScalarType}});Object.defineProperty(q,"GraphQLSchema",{enumerable:!0,get:function(){return ye.GraphQLSchema}});Object.defineProperty(q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ye.GraphQLSkipDirective}});Object.defineProperty(q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ye.GraphQLSpecifiedByDirective}});Object.defineProperty(q,"GraphQLString",{enumerable:!0,get:function(){return ye.GraphQLString}});Object.defineProperty(q,"GraphQLUnionType",{enumerable:!0,get:function(){return ye.GraphQLUnionType}});Object.defineProperty(q,"Kind",{enumerable:!0,get:function(){return Yt.Kind}});Object.defineProperty(q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ht.KnownArgumentNamesRule}});Object.defineProperty(q,"KnownDirectivesRule",{enumerable:!0,get:function(){return ht.KnownDirectivesRule}});Object.defineProperty(q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return ht.KnownFragmentNamesRule}});Object.defineProperty(q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return ht.KnownTypeNamesRule}});Object.defineProperty(q,"Lexer",{enumerable:!0,get:function(){return Yt.Lexer}});Object.defineProperty(q,"Location",{enumerable:!0,get:function(){return Yt.Location}});Object.defineProperty(q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ht.LoneAnonymousOperationRule}});Object.defineProperty(q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return ht.LoneSchemaDefinitionRule}});Object.defineProperty(q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return ht.MaxIntrospectionDepthRule}});Object.defineProperty(q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return ht.NoDeprecatedCustomRule}});Object.defineProperty(q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return ht.NoFragmentCyclesRule}});Object.defineProperty(q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return ht.NoSchemaIntrospectionCustomRule}});Object.defineProperty(q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ht.NoUndefinedVariablesRule}});Object.defineProperty(q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return ht.NoUnusedFragmentsRule}});Object.defineProperty(q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ht.NoUnusedVariablesRule}});Object.defineProperty(q,"OperationTypeNode",{enumerable:!0,get:function(){return Yt.OperationTypeNode}});Object.defineProperty(q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return ht.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return ht.PossibleFragmentSpreadsRule}});Object.defineProperty(q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return ht.PossibleTypeExtensionsRule}});Object.defineProperty(q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return ht.ProvidedRequiredArgumentsRule}});Object.defineProperty(q,"ScalarLeafsRule",{enumerable:!0,get:function(){return ht.ScalarLeafsRule}});Object.defineProperty(q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ye.SchemaMetaFieldDef}});Object.defineProperty(q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return ht.SingleFieldSubscriptionsRule}});Object.defineProperty(q,"Source",{enumerable:!0,get:function(){return Yt.Source}});Object.defineProperty(q,"Token",{enumerable:!0,get:function(){return Yt.Token}});Object.defineProperty(q,"TokenKind",{enumerable:!0,get:function(){return Yt.TokenKind}});Object.defineProperty(q,"TypeInfo",{enumerable:!0,get:function(){return Jt.TypeInfo}});Object.defineProperty(q,"TypeKind",{enumerable:!0,get:function(){return ye.TypeKind}});Object.defineProperty(q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeMetaFieldDef}});Object.defineProperty(q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeNameMetaFieldDef}});Object.defineProperty(q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentNamesRule}});Object.defineProperty(q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return ht.UniqueDirectiveNamesRule}});Object.defineProperty(q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return ht.UniqueDirectivesPerLocationRule}});Object.defineProperty(q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return ht.UniqueEnumValueNamesRule}});Object.defineProperty(q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueFieldDefinitionNamesRule}});Object.defineProperty(q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return ht.UniqueFragmentNamesRule}});Object.defineProperty(q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return ht.UniqueInputFieldNamesRule}});Object.defineProperty(q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return ht.UniqueOperationNamesRule}});Object.defineProperty(q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return ht.UniqueOperationTypesRule}});Object.defineProperty(q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return ht.UniqueTypeNamesRule}});Object.defineProperty(q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return ht.UniqueVariableNamesRule}});Object.defineProperty(q,"ValidationContext",{enumerable:!0,get:function(){return ht.ValidationContext}});Object.defineProperty(q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return ht.ValuesOfCorrectTypeRule}});Object.defineProperty(q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return ht.VariablesAreInputTypesRule}});Object.defineProperty(q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return ht.VariablesInAllowedPositionRule}});Object.defineProperty(q,"__Directive",{enumerable:!0,get:function(){return ye.__Directive}});Object.defineProperty(q,"__DirectiveLocation",{enumerable:!0,get:function(){return ye.__DirectiveLocation}});Object.defineProperty(q,"__EnumValue",{enumerable:!0,get:function(){return ye.__EnumValue}});Object.defineProperty(q,"__Field",{enumerable:!0,get:function(){return ye.__Field}});Object.defineProperty(q,"__InputValue",{enumerable:!0,get:function(){return ye.__InputValue}});Object.defineProperty(q,"__Schema",{enumerable:!0,get:function(){return ye.__Schema}});Object.defineProperty(q,"__Type",{enumerable:!0,get:function(){return ye.__Type}});Object.defineProperty(q,"__TypeKind",{enumerable:!0,get:function(){return ye.__TypeKind}});Object.defineProperty(q,"assertAbstractType",{enumerable:!0,get:function(){return ye.assertAbstractType}});Object.defineProperty(q,"assertCompositeType",{enumerable:!0,get:function(){return ye.assertCompositeType}});Object.defineProperty(q,"assertDirective",{enumerable:!0,get:function(){return ye.assertDirective}});Object.defineProperty(q,"assertEnumType",{enumerable:!0,get:function(){return ye.assertEnumType}});Object.defineProperty(q,"assertEnumValueName",{enumerable:!0,get:function(){return ye.assertEnumValueName}});Object.defineProperty(q,"assertInputObjectType",{enumerable:!0,get:function(){return ye.assertInputObjectType}});Object.defineProperty(q,"assertInputType",{enumerable:!0,get:function(){return ye.assertInputType}});Object.defineProperty(q,"assertInterfaceType",{enumerable:!0,get:function(){return ye.assertInterfaceType}});Object.defineProperty(q,"assertLeafType",{enumerable:!0,get:function(){return ye.assertLeafType}});Object.defineProperty(q,"assertListType",{enumerable:!0,get:function(){return ye.assertListType}});Object.defineProperty(q,"assertName",{enumerable:!0,get:function(){return ye.assertName}});Object.defineProperty(q,"assertNamedType",{enumerable:!0,get:function(){return ye.assertNamedType}});Object.defineProperty(q,"assertNonNullType",{enumerable:!0,get:function(){return ye.assertNonNullType}});Object.defineProperty(q,"assertNullableType",{enumerable:!0,get:function(){return ye.assertNullableType}});Object.defineProperty(q,"assertObjectType",{enumerable:!0,get:function(){return ye.assertObjectType}});Object.defineProperty(q,"assertOutputType",{enumerable:!0,get:function(){return ye.assertOutputType}});Object.defineProperty(q,"assertScalarType",{enumerable:!0,get:function(){return ye.assertScalarType}});Object.defineProperty(q,"assertSchema",{enumerable:!0,get:function(){return ye.assertSchema}});Object.defineProperty(q,"assertType",{enumerable:!0,get:function(){return ye.assertType}});Object.defineProperty(q,"assertUnionType",{enumerable:!0,get:function(){return ye.assertUnionType}});Object.defineProperty(q,"assertValidName",{enumerable:!0,get:function(){return Jt.assertValidName}});Object.defineProperty(q,"assertValidSchema",{enumerable:!0,get:function(){return ye.assertValidSchema}});Object.defineProperty(q,"assertWrappingType",{enumerable:!0,get:function(){return ye.assertWrappingType}});Object.defineProperty(q,"astFromValue",{enumerable:!0,get:function(){return Jt.astFromValue}});Object.defineProperty(q,"buildASTSchema",{enumerable:!0,get:function(){return Jt.buildASTSchema}});Object.defineProperty(q,"buildClientSchema",{enumerable:!0,get:function(){return Jt.buildClientSchema}});Object.defineProperty(q,"buildSchema",{enumerable:!0,get:function(){return Jt.buildSchema}});Object.defineProperty(q,"coerceInputValue",{enumerable:!0,get:function(){return Jt.coerceInputValue}});Object.defineProperty(q,"concatAST",{enumerable:!0,get:function(){return Jt.concatAST}});Object.defineProperty(q,"createSourceEventStream",{enumerable:!0,get:function(){return Qa.createSourceEventStream}});Object.defineProperty(q,"defaultFieldResolver",{enumerable:!0,get:function(){return Qa.defaultFieldResolver}});Object.defineProperty(q,"defaultTypeResolver",{enumerable:!0,get:function(){return Qa.defaultTypeResolver}});Object.defineProperty(q,"doTypesOverlap",{enumerable:!0,get:function(){return Jt.doTypesOverlap}});Object.defineProperty(q,"execute",{enumerable:!0,get:function(){return Qa.execute}});Object.defineProperty(q,"executeSync",{enumerable:!0,get:function(){return Qa.executeSync}});Object.defineProperty(q,"extendSchema",{enumerable:!0,get:function(){return Jt.extendSchema}});Object.defineProperty(q,"findBreakingChanges",{enumerable:!0,get:function(){return Jt.findBreakingChanges}});Object.defineProperty(q,"findDangerousChanges",{enumerable:!0,get:function(){return Jt.findDangerousChanges}});Object.defineProperty(q,"formatError",{enumerable:!0,get:function(){return Bf.formatError}});Object.defineProperty(q,"getArgumentValues",{enumerable:!0,get:function(){return Qa.getArgumentValues}});Object.defineProperty(q,"getDirectiveValues",{enumerable:!0,get:function(){return Qa.getDirectiveValues}});Object.defineProperty(q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Yt.getEnterLeaveForKind}});Object.defineProperty(q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jt.getIntrospectionQuery}});Object.defineProperty(q,"getLocation",{enumerable:!0,get:function(){return Yt.getLocation}});Object.defineProperty(q,"getNamedType",{enumerable:!0,get:function(){return ye.getNamedType}});Object.defineProperty(q,"getNullableType",{enumerable:!0,get:function(){return ye.getNullableType}});Object.defineProperty(q,"getOperationAST",{enumerable:!0,get:function(){return Jt.getOperationAST}});Object.defineProperty(q,"getOperationRootType",{enumerable:!0,get:function(){return Jt.getOperationRootType}});Object.defineProperty(q,"getVariableValues",{enumerable:!0,get:function(){return Qa.getVariableValues}});Object.defineProperty(q,"getVisitFn",{enumerable:!0,get:function(){return Yt.getVisitFn}});Object.defineProperty(q,"graphql",{enumerable:!0,get:function(){return pB.graphql}});Object.defineProperty(q,"graphqlSync",{enumerable:!0,get:function(){return pB.graphqlSync}});Object.defineProperty(q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jt.introspectionFromSchema}});Object.defineProperty(q,"introspectionTypes",{enumerable:!0,get:function(){return ye.introspectionTypes}});Object.defineProperty(q,"isAbstractType",{enumerable:!0,get:function(){return ye.isAbstractType}});Object.defineProperty(q,"isCompositeType",{enumerable:!0,get:function(){return ye.isCompositeType}});Object.defineProperty(q,"isConstValueNode",{enumerable:!0,get:function(){return Yt.isConstValueNode}});Object.defineProperty(q,"isDefinitionNode",{enumerable:!0,get:function(){return Yt.isDefinitionNode}});Object.defineProperty(q,"isDirective",{enumerable:!0,get:function(){return ye.isDirective}});Object.defineProperty(q,"isEnumType",{enumerable:!0,get:function(){return ye.isEnumType}});Object.defineProperty(q,"isEqualType",{enumerable:!0,get:function(){return Jt.isEqualType}});Object.defineProperty(q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Yt.isExecutableDefinitionNode}});Object.defineProperty(q,"isInputObjectType",{enumerable:!0,get:function(){return ye.isInputObjectType}});Object.defineProperty(q,"isInputType",{enumerable:!0,get:function(){return ye.isInputType}});Object.defineProperty(q,"isInterfaceType",{enumerable:!0,get:function(){return ye.isInterfaceType}});Object.defineProperty(q,"isIntrospectionType",{enumerable:!0,get:function(){return ye.isIntrospectionType}});Object.defineProperty(q,"isLeafType",{enumerable:!0,get:function(){return ye.isLeafType}});Object.defineProperty(q,"isListType",{enumerable:!0,get:function(){return ye.isListType}});Object.defineProperty(q,"isNamedType",{enumerable:!0,get:function(){return ye.isNamedType}});Object.defineProperty(q,"isNonNullType",{enumerable:!0,get:function(){return ye.isNonNullType}});Object.defineProperty(q,"isNullableType",{enumerable:!0,get:function(){return ye.isNullableType}});Object.defineProperty(q,"isObjectType",{enumerable:!0,get:function(){return ye.isObjectType}});Object.defineProperty(q,"isOutputType",{enumerable:!0,get:function(){return ye.isOutputType}});Object.defineProperty(q,"isRequiredArgument",{enumerable:!0,get:function(){return ye.isRequiredArgument}});Object.defineProperty(q,"isRequiredInputField",{enumerable:!0,get:function(){return ye.isRequiredInputField}});Object.defineProperty(q,"isScalarType",{enumerable:!0,get:function(){return ye.isScalarType}});Object.defineProperty(q,"isSchema",{enumerable:!0,get:function(){return ye.isSchema}});Object.defineProperty(q,"isSelectionNode",{enumerable:!0,get:function(){return Yt.isSelectionNode}});Object.defineProperty(q,"isSpecifiedDirective",{enumerable:!0,get:function(){return ye.isSpecifiedDirective}});Object.defineProperty(q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ye.isSpecifiedScalarType}});Object.defineProperty(q,"isType",{enumerable:!0,get:function(){return ye.isType}});Object.defineProperty(q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeDefinitionNode}});Object.defineProperty(q,"isTypeExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeExtensionNode}});Object.defineProperty(q,"isTypeNode",{enumerable:!0,get:function(){return Yt.isTypeNode}});Object.defineProperty(q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jt.isTypeSubTypeOf}});Object.defineProperty(q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemDefinitionNode}});Object.defineProperty(q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemExtensionNode}});Object.defineProperty(q,"isUnionType",{enumerable:!0,get:function(){return ye.isUnionType}});Object.defineProperty(q,"isValidNameError",{enumerable:!0,get:function(){return Jt.isValidNameError}});Object.defineProperty(q,"isValueNode",{enumerable:!0,get:function(){return Yt.isValueNode}});Object.defineProperty(q,"isWrappingType",{enumerable:!0,get:function(){return ye.isWrappingType}});Object.defineProperty(q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jt.lexicographicSortSchema}});Object.defineProperty(q,"locatedError",{enumerable:!0,get:function(){return Bf.locatedError}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Yt.parse}});Object.defineProperty(q,"parseConstValue",{enumerable:!0,get:function(){return Yt.parseConstValue}});Object.defineProperty(q,"parseType",{enumerable:!0,get:function(){return Yt.parseType}});Object.defineProperty(q,"parseValue",{enumerable:!0,get:function(){return Yt.parseValue}});Object.defineProperty(q,"print",{enumerable:!0,get:function(){return Yt.print}});Object.defineProperty(q,"printError",{enumerable:!0,get:function(){return Bf.printError}});Object.defineProperty(q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jt.printIntrospectionSchema}});Object.defineProperty(q,"printLocation",{enumerable:!0,get:function(){return Yt.printLocation}});Object.defineProperty(q,"printSchema",{enumerable:!0,get:function(){return Jt.printSchema}});Object.defineProperty(q,"printSourceLocation",{enumerable:!0,get:function(){return Yt.printSourceLocation}});Object.defineProperty(q,"printType",{enumerable:!0,get:function(){return Jt.printType}});Object.defineProperty(q,"recommendedRules",{enumerable:!0,get:function(){return ht.recommendedRules}});Object.defineProperty(q,"resolveObjMapThunk",{enumerable:!0,get:function(){return ye.resolveObjMapThunk}});Object.defineProperty(q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ye.resolveReadonlyArrayThunk}});Object.defineProperty(q,"responsePathAsArray",{enumerable:!0,get:function(){return Qa.responsePathAsArray}});Object.defineProperty(q,"separateOperations",{enumerable:!0,get:function(){return Jt.separateOperations}});Object.defineProperty(q,"specifiedDirectives",{enumerable:!0,get:function(){return ye.specifiedDirectives}});Object.defineProperty(q,"specifiedRules",{enumerable:!0,get:function(){return ht.specifiedRules}});Object.defineProperty(q,"specifiedScalarTypes",{enumerable:!0,get:function(){return ye.specifiedScalarTypes}});Object.defineProperty(q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jt.stripIgnoredCharacters}});Object.defineProperty(q,"subscribe",{enumerable:!0,get:function(){return Qa.subscribe}});Object.defineProperty(q,"syntaxError",{enumerable:!0,get:function(){return Bf.syntaxError}});Object.defineProperty(q,"typeFromAST",{enumerable:!0,get:function(){return Jt.typeFromAST}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return ht.validate}});Object.defineProperty(q,"validateSchema",{enumerable:!0,get:function(){return ye.validateSchema}});Object.defineProperty(q,"valueFromAST",{enumerable:!0,get:function(){return Jt.valueFromAST}});Object.defineProperty(q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jt.valueFromASTUntyped}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return fB.version}});Object.defineProperty(q,"versionInfo",{enumerable:!0,get:function(){return fB.versionInfo}});Object.defineProperty(q,"visit",{enumerable:!0,get:function(){return Yt.visit}});Object.defineProperty(q,"visitInParallel",{enumerable:!0,get:function(){return Yt.visitInParallel}});Object.defineProperty(q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jt.visitWithTypeInfo}});var fB=oF(),pB=tC(),ye=iC(),Yt=sC(),Qa=mC(),ht=hC(),Bf=yC(),Jt=dB()});var zn=w(R=>{"use strict";m();T();N();Object.defineProperty(R,"__esModule",{value:!0});R.FIELD_UPPER=R.FIELD_PATH=R.FIELD=R.EXTENSIONS=R.EXTENDS=R.EXTERNAL=R.EXECUTION=R.ENUM_VALUE_UPPER=R.ENUM_VALUE=R.ENUM_UPPER=R.ENUM=R.ENTITY_UNION=R.ENTITIES_FIELD=R.ENTITIES=R.EDFS_REDIS_SUBSCRIBE=R.EDFS_REDIS_PUBLISH=R.EDFS_NATS_STREAM_CONFIGURATION=R.EDFS_PUBLISH_RESULT=R.EDFS_NATS_SUBSCRIBE=R.EDFS_NATS_REQUEST=R.EDFS_NATS_PUBLISH=R.EDFS_KAFKA_SUBSCRIBE=R.EDFS_KAFKA_PUBLISH=R.DIRECTIVE_DEFINITION=R.DESCRIPTION_OVERRIDE=R.DEPRECATED_DEFAULT_ARGUMENT_VALUE=R.DEPRECATED=R.DEFAULT_SUBSCRIPTION=R.DEFAULT_QUERY=R.DEFAULT_MUTATION=R.DEFAULT_EDFS_PROVIDER_ID=R.DEFAULT=R.CONTEXT=R.CONNECT_FIELD_RESOLVER=R.CONSUMER_NAME=R.CONSUMER_INACTIVE_THRESHOLD=R.CONFIGURE_CHILD_DESCRIPTIONS=R.CONFIGURE_DESCRIPTION=R.CONDITION=R.COMPOSE_DIRECTIVE=R.CHANNELS=R.CHANNEL=R.BOOLEAN_SCALAR=R.BOOLEAN=R.ARGUMENT_DEFINITION_UPPER=R.AUTHENTICATED=R.ARGUMENT=R.ANY_SCALAR=R.AND_UPPER=R.AS=void 0;R.NOT_UPPER=R.NON_NULLABLE_STRING=R.NON_NULLABLE_INT=R.NON_NULLABLE_BOOLEAN=R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=R.NAME=R.NOT_APPLICABLE=R.PROVIDER_TYPE_REDIS=R.PROVIDER_TYPE_NATS=R.PROVIDER_TYPE_KAFKA=R.PROPAGATE=R.MUTATION_UPPER=R.MUTATION=R.NUMBER=R.LITERAL_PERIOD=R.LITERAL_NEW_LINE=R.LITERAL_SPACE=R.LIST=R.LINK_PURPOSE=R.LINK_IMPORT=R.LINK=R.LEVELS=R.LEFT_PARENTHESIS=R.KEY=R.INTERFACE_OBJECT=R.INTERFACE_UPPER=R.INTERFACE=R.INT_SCALAR=R.INPUT_VALUE=R.INPUT_OBJECT_UPPER=R.INPUT_OBJECT=R.INPUT_FIELD_DEFINITION_UPPER=R.INPUT_FIELD=R.INPUT=R.INLINE_FRAGMENT_UPPER=R.INLINE_FRAGMENT=R.INACCESSIBLE=R.IN_UPPER=R.IMPORT=R.ID_SCALAR=R.HYPHEN_JOIN=R.FROM=R.FRAGMENT_SPREAD_UPPER=R.FRAGMENT_DEFINITION_UPPER=R.FOR=R.FLOAT_SCALAR=R.FIRST_ORDINAL=R.FIELD_DEFINITION_UPPER=R.FIELDS=R.FIELD_SET_SCALAR=void 0;R.TAG=R.SUCCESS=R.SUBSCRIPTION_UPPER=R.SUBSCRIBE=R.SUBSCRIPTION_FILTER_VALUE=R.SUBSCRIPTION_FILTER_CONDITION=R.SUBSCRIPTION_FILTER=R.SUBSCRIPTION_FIELD_CONDITION=R.SUBSCRIPTION=R.SUBJECTS=R.SUBJECT=R.STRING_SCALAR=R.STRING=R.STREAM_NAME=R.STREAM_CONFIGURATION=R.SPECIFIED_BY=R.SHAREABLE=R.SERVICE_FIELD=R.SERVICE_OBJECT=R.SEMANTIC_NON_NULL=R.SELECTION_REPRESENTATION=R.SECURITY=R.SCOPE_SCALAR=R.SCOPES=R.SCHEMA_UPPER=R.SCHEMA=R.SCALAR_UPPER=R.SCALAR=R.RESOLVABLE=R.REQUIRES_SCOPES=R.REQUIRES=R.REQUIRE_FETCH_REASONS=R.REQUEST=R.REASON=R.QUOTATION_JOIN=R.QUERY_UPPER=R.QUERY=R.PUBLISH=R.PROVIDES=R.PROVIDER_ID=R.PARENT_EXTENSION_DATA_MAP=R.PARENT_DEFINITION_DATA_MAP=R.PARENT_DEFINITION_DATA=R.OVERRIDE=R.OR_UPPER=R.OBJECT_UPPER=R.OBJECT=R.OPERATION_TO_DEFAULT=R.ONE_OF=R.NULL=void 0;R.NON_REPEATABLE_PERSISTED_DIRECTIVES=R.OUTPUT_NODE_KINDS=R.INPUT_NODE_KINDS=R.IGNORED_FIELDS=R.INHERITABLE_DIRECTIVE_NAMES=R.PERSISTED_CLIENT_DIRECTIVES=R.AUTHORIZATION_DIRECTIVES=R.ROOT_TYPE_NAMES=R.EXECUTABLE_DIRECTIVE_LOCATIONS=R.VARIABLE_DEFINITION_UPPER=R.VALUES=R.URL_LOWER=R.UNION_UPPER=R.UNION=R.TYPENAME=R.TOPICS=R.TOPIC=void 0;var yu=Oe();R.AS="as";R.AND_UPPER="AND";R.ANY_SCALAR="_Any";R.ARGUMENT="argument";R.AUTHENTICATED="authenticated";R.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";R.BOOLEAN="boolean";R.BOOLEAN_SCALAR="Boolean";R.CHANNEL="channel";R.CHANNELS="channels";R.COMPOSE_DIRECTIVE="composeDirective";R.CONDITION="condition";R.CONFIGURE_DESCRIPTION="openfed__configureDescription";R.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";R.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";R.CONSUMER_NAME="consumerName";R.CONNECT_FIELD_RESOLVER="connect__fieldResolver";R.CONTEXT="context";R.DEFAULT="default";R.DEFAULT_EDFS_PROVIDER_ID="default";R.DEFAULT_MUTATION="Mutation";R.DEFAULT_QUERY="Query";R.DEFAULT_SUBSCRIPTION="Subscription";R.DEPRECATED="deprecated";R.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";R.DESCRIPTION_OVERRIDE="descriptionOverride";R.DIRECTIVE_DEFINITION="directive definition";R.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";R.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";R.EDFS_NATS_PUBLISH="edfs__natsPublish";R.EDFS_NATS_REQUEST="edfs__natsRequest";R.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";R.EDFS_PUBLISH_RESULT="edfs__PublishResult";R.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";R.EDFS_REDIS_PUBLISH="edfs__redisPublish";R.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";R.ENTITIES="entities";R.ENTITIES_FIELD="_entities";R.ENTITY_UNION="_Entity";R.ENUM="Enum";R.ENUM_UPPER="ENUM";R.ENUM_VALUE="Enum Value";R.ENUM_VALUE_UPPER="ENUM_VALUE";R.EXECUTION="EXECUTION";R.EXTERNAL="external";R.EXTENDS="extends";R.EXTENSIONS="extensions";R.FIELD="field";R.FIELD_PATH="fieldPath";R.FIELD_UPPER="FIELD";R.FIELD_SET_SCALAR="openfed__FieldSet";R.FIELDS="fields";R.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";R.FIRST_ORDINAL="1st";R.FLOAT_SCALAR="Float";R.FOR="for";R.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";R.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";R.FROM="from";R.HYPHEN_JOIN=` -`;R.ID_SCALAR="ID";R.IMPORT="import";R.IN_UPPER="IN";R.INACCESSIBLE="inaccessible";R.INLINE_FRAGMENT="inlineFragment";R.INLINE_FRAGMENT_UPPER="INLINE_FRAGMENT";R.INPUT="Input";R.INPUT_FIELD="Input field";R.INPUT_FIELD_DEFINITION_UPPER="INPUT_FIELD_DEFINITION";R.INPUT_OBJECT="Input Object";R.INPUT_OBJECT_UPPER="INPUT_OBJECT";R.INPUT_VALUE="Input Value";R.INT_SCALAR="Int";R.INTERFACE="Interface";R.INTERFACE_UPPER="INTERFACE";R.INTERFACE_OBJECT="interfaceObject";R.KEY="key";R.LEFT_PARENTHESIS="(";R.LEVELS="levels";R.LINK="link";R.LINK_IMPORT="link__Import";R.LINK_PURPOSE="link__Purpose";R.LIST="list";R.LITERAL_SPACE=" ";R.LITERAL_NEW_LINE=` -`;R.LITERAL_PERIOD=".";R.NUMBER="number";R.MUTATION="Mutation";R.MUTATION_UPPER="MUTATION";R.PROPAGATE="propagate";R.PROVIDER_TYPE_KAFKA="kafka";R.PROVIDER_TYPE_NATS="nats";R.PROVIDER_TYPE_REDIS="redis";R.NOT_APPLICABLE="N/A";R.NAME="name";R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";R.NON_NULLABLE_BOOLEAN="Boolean!";R.NON_NULLABLE_INT="Int!";R.NON_NULLABLE_STRING="String!";R.NOT_UPPER="NOT";R.NULL="Null";R.ONE_OF="oneOf";R.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";R.OBJECT="Object";R.OBJECT_UPPER="OBJECT";R.OR_UPPER="OR";R.OVERRIDE="override";R.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";R.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";R.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";R.PROVIDER_ID="providerId";R.PROVIDES="provides";R.PUBLISH="publish";R.QUERY="Query";R.QUERY_UPPER="QUERY";R.QUOTATION_JOIN='", "';R.REASON="reason";R.REQUEST="request";R.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";R.REQUIRES="requires";R.REQUIRES_SCOPES="requiresScopes";R.RESOLVABLE="resolvable";R.SCALAR="Scalar";R.SCALAR_UPPER="SCALAR";R.SCHEMA="schema";R.SCHEMA_UPPER="SCHEMA";R.SCOPES="scopes";R.SCOPE_SCALAR="openfed__Scope";R.SECURITY="SECURITY";R.SELECTION_REPRESENTATION=" { ... }";R.SEMANTIC_NON_NULL="semanticNonNull";R.SERVICE_OBJECT="_Service";R.SERVICE_FIELD="_service";R.SHAREABLE="shareable";R.SPECIFIED_BY="specifiedBy";R.STREAM_CONFIGURATION="streamConfiguration";R.STREAM_NAME="streamName";R.STRING="string";R.STRING_SCALAR="String";R.SUBJECT="subject";R.SUBJECTS="subjects";R.SUBSCRIPTION="Subscription";R.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";R.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";R.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";R.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";R.SUBSCRIBE="subscribe";R.SUBSCRIPTION_UPPER="SUBSCRIPTION";R.SUCCESS="success";R.TAG="tag";R.TOPIC="topic";R.TOPICS="topics";R.TYPENAME="__typename";R.UNION="Union";R.UNION_UPPER="UNION";R.URL_LOWER="url";R.VALUES="values";R.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";R.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([R.FIELD_UPPER,R.FRAGMENT_DEFINITION_UPPER,R.FRAGMENT_SPREAD_UPPER,R.INLINE_FRAGMENT_UPPER,R.MUTATION_UPPER,R.QUERY_UPPER,R.SUBSCRIPTION_UPPER]);R.ROOT_TYPE_NAMES=new Set([R.MUTATION,R.QUERY,R.SUBSCRIPTION]);R.AUTHORIZATION_DIRECTIVES=new Set([R.AUTHENTICATED,R.REQUIRES_SCOPES]);R.PERSISTED_CLIENT_DIRECTIVES=new Set([R.DEPRECATED,R.ONE_OF,R.SEMANTIC_NON_NULL]);R.INHERITABLE_DIRECTIVE_NAMES=new Set([R.EXTERNAL,R.REQUIRE_FETCH_REASONS,R.SHAREABLE]);R.IGNORED_FIELDS=new Set([R.ENTITIES_FIELD,R.SERVICE_FIELD]);R.INPUT_NODE_KINDS=new Set([hu.Kind.ENUM_TYPE_DEFINITION,hu.Kind.INPUT_OBJECT_TYPE_DEFINITION,hu.Kind.SCALAR_TYPE_DEFINITION]);R.OUTPUT_NODE_KINDS=new Set([hu.Kind.ENUM_TYPE_DEFINITION,hu.Kind.INTERFACE_TYPE_DEFINITION,hu.Kind.OBJECT_TYPE_DEFINITION,hu.Kind.SCALAR_TYPE_DEFINITION,hu.Kind.UNION_TYPE_DEFINITION]);R.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([R.INACCESSIBLE,R.ONE_OF,R.SEMANTIC_NON_NULL])});var Pr=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.operationTypeNodeToDefaultType=void 0;Wn.isObjectLikeNodeEntity=y7;Wn.isNodeInterfaceObject=I7;Wn.stringToNameNode=rT;Wn.stringArrayToNameNodeArray=g7;Wn.setToNameNodeArray=_7;Wn.stringToNamedTypeNode=fB;Wn.setToNamedTypeNodeArray=v7;Wn.nodeKindToDirectiveLocation=O7;Wn.isKindAbstract=S7;Wn.extractExecutableDirectiveLocations=D7;Wn.formatDescription=b7;Wn.lexicographicallySortArgumentNodes=pB;Wn.lexicographicallySortSelectionSetNode=nT;Wn.lexicographicallySortDocumentNode=A7;Wn.parse=mB;Wn.safeParse=R7;var Mt=Oe(),An=zn();function y7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===An.KEY)return!0;return!1}function I7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===An.INTERFACE_OBJECT)return!0;return!1}function rT(e){return{kind:Mt.Kind.NAME,value:e}}function g7(e){let t=[];for(let n of e)t.push(rT(n));return t}function _7(e){let t=[];for(let n of e)t.push(rT(n));return t}function fB(e){return{kind:Mt.Kind.NAMED_TYPE,name:rT(e)}}function v7(e){let t=[];for(let n of e)t.push(fB(n));return t}function O7(e){switch(e){case Mt.Kind.ARGUMENT:return An.ARGUMENT_DEFINITION_UPPER;case Mt.Kind.ENUM_TYPE_DEFINITION:case Mt.Kind.ENUM_TYPE_EXTENSION:return An.ENUM_UPPER;case Mt.Kind.ENUM_VALUE_DEFINITION:return An.ENUM_VALUE_UPPER;case Mt.Kind.FIELD_DEFINITION:return An.FIELD_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_DEFINITION:return An.FRAGMENT_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_SPREAD:return An.FRAGMENT_SPREAD_UPPER;case Mt.Kind.INLINE_FRAGMENT:return An.INLINE_FRAGMENT_UPPER;case Mt.Kind.INPUT_VALUE_DEFINITION:return An.INPUT_FIELD_DEFINITION_UPPER;case Mt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Mt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return An.INPUT_OBJECT_UPPER;case Mt.Kind.INTERFACE_TYPE_DEFINITION:case Mt.Kind.INTERFACE_TYPE_EXTENSION:return An.INTERFACE_UPPER;case Mt.Kind.OBJECT_TYPE_DEFINITION:case Mt.Kind.OBJECT_TYPE_EXTENSION:return An.OBJECT_UPPER;case Mt.Kind.SCALAR_TYPE_DEFINITION:case Mt.Kind.SCALAR_TYPE_EXTENSION:return An.SCALAR_UPPER;case Mt.Kind.SCHEMA_DEFINITION:case Mt.Kind.SCHEMA_EXTENSION:return An.SCHEMA_UPPER;case Mt.Kind.UNION_TYPE_DEFINITION:case Mt.Kind.UNION_TYPE_EXTENSION:return An.UNION_UPPER;default:return e}}Wn.operationTypeNodeToDefaultType=new Map([[Mt.OperationTypeNode.MUTATION,An.MUTATION],[Mt.OperationTypeNode.QUERY,An.QUERY],[Mt.OperationTypeNode.SUBSCRIPTION,An.SUBSCRIPTION]]);function S7(e){return e===Mt.Kind.INTERFACE_TYPE_DEFINITION||e===Mt.Kind.UNION_TYPE_DEFINITION}function D7(e,t){for(let n of e){let r=n.value;An.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function b7(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` +`;R.LITERAL_PERIOD=".";R.NUMBER="number";R.MUTATION="Mutation";R.MUTATION_UPPER="MUTATION";R.PROPAGATE="propagate";R.PROVIDER_TYPE_KAFKA="kafka";R.PROVIDER_TYPE_NATS="nats";R.PROVIDER_TYPE_REDIS="redis";R.NOT_APPLICABLE="N/A";R.NAME="name";R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";R.NON_NULLABLE_BOOLEAN="Boolean!";R.NON_NULLABLE_INT="Int!";R.NON_NULLABLE_STRING="String!";R.NOT_UPPER="NOT";R.NULL="Null";R.ONE_OF="oneOf";R.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";R.OBJECT="Object";R.OBJECT_UPPER="OBJECT";R.OR_UPPER="OR";R.OVERRIDE="override";R.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";R.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";R.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";R.PROVIDER_ID="providerId";R.PROVIDES="provides";R.PUBLISH="publish";R.QUERY="Query";R.QUERY_UPPER="QUERY";R.QUOTATION_JOIN='", "';R.REASON="reason";R.REQUEST="request";R.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";R.REQUIRES="requires";R.REQUIRES_SCOPES="requiresScopes";R.RESOLVABLE="resolvable";R.SCALAR="Scalar";R.SCALAR_UPPER="SCALAR";R.SCHEMA="schema";R.SCHEMA_UPPER="SCHEMA";R.SCOPES="scopes";R.SCOPE_SCALAR="openfed__Scope";R.SECURITY="SECURITY";R.SELECTION_REPRESENTATION=" { ... }";R.SEMANTIC_NON_NULL="semanticNonNull";R.SERVICE_OBJECT="_Service";R.SERVICE_FIELD="_service";R.SHAREABLE="shareable";R.SPECIFIED_BY="specifiedBy";R.STREAM_CONFIGURATION="streamConfiguration";R.STREAM_NAME="streamName";R.STRING="string";R.STRING_SCALAR="String";R.SUBJECT="subject";R.SUBJECTS="subjects";R.SUBSCRIPTION="Subscription";R.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";R.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";R.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";R.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";R.SUBSCRIBE="subscribe";R.SUBSCRIPTION_UPPER="SUBSCRIPTION";R.SUCCESS="success";R.TAG="tag";R.TOPIC="topic";R.TOPICS="topics";R.TYPENAME="__typename";R.UNION="Union";R.UNION_UPPER="UNION";R.URL_LOWER="url";R.VALUES="values";R.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";R.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([R.FIELD_UPPER,R.FRAGMENT_DEFINITION_UPPER,R.FRAGMENT_SPREAD_UPPER,R.INLINE_FRAGMENT_UPPER,R.MUTATION_UPPER,R.QUERY_UPPER,R.SUBSCRIPTION_UPPER]);R.ROOT_TYPE_NAMES=new Set([R.MUTATION,R.QUERY,R.SUBSCRIPTION]);R.AUTHORIZATION_DIRECTIVES=new Set([R.AUTHENTICATED,R.REQUIRES_SCOPES]);R.PERSISTED_CLIENT_DIRECTIVES=new Set([R.DEPRECATED,R.ONE_OF,R.SEMANTIC_NON_NULL]);R.INHERITABLE_DIRECTIVE_NAMES=new Set([R.EXTERNAL,R.REQUIRE_FETCH_REASONS,R.SHAREABLE]);R.IGNORED_FIELDS=new Set([R.ENTITIES_FIELD,R.SERVICE_FIELD]);R.INPUT_NODE_KINDS=new Set([yu.Kind.ENUM_TYPE_DEFINITION,yu.Kind.INPUT_OBJECT_TYPE_DEFINITION,yu.Kind.SCALAR_TYPE_DEFINITION]);R.OUTPUT_NODE_KINDS=new Set([yu.Kind.ENUM_TYPE_DEFINITION,yu.Kind.INTERFACE_TYPE_DEFINITION,yu.Kind.OBJECT_TYPE_DEFINITION,yu.Kind.SCALAR_TYPE_DEFINITION,yu.Kind.UNION_TYPE_DEFINITION]);R.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([R.INACCESSIBLE,R.ONE_OF,R.SEMANTIC_NON_NULL])});var Pr=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.operationTypeNodeToDefaultType=void 0;Wn.isObjectLikeNodeEntity=g7;Wn.isNodeInterfaceObject=_7;Wn.stringToNameNode=aT;Wn.stringArrayToNameNodeArray=v7;Wn.setToNameNodeArray=O7;Wn.stringToNamedTypeNode=mB;Wn.setToNamedTypeNodeArray=S7;Wn.nodeKindToDirectiveLocation=D7;Wn.isKindAbstract=b7;Wn.extractExecutableDirectiveLocations=A7;Wn.formatDescription=R7;Wn.lexicographicallySortArgumentNodes=NB;Wn.lexicographicallySortSelectionSetNode=iT;Wn.lexicographicallySortDocumentNode=P7;Wn.parse=TB;Wn.safeParse=F7;var Mt=Oe(),An=zn();function g7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===An.KEY)return!0;return!1}function _7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===An.INTERFACE_OBJECT)return!0;return!1}function aT(e){return{kind:Mt.Kind.NAME,value:e}}function v7(e){let t=[];for(let n of e)t.push(aT(n));return t}function O7(e){let t=[];for(let n of e)t.push(aT(n));return t}function mB(e){return{kind:Mt.Kind.NAMED_TYPE,name:aT(e)}}function S7(e){let t=[];for(let n of e)t.push(mB(n));return t}function D7(e){switch(e){case Mt.Kind.ARGUMENT:return An.ARGUMENT_DEFINITION_UPPER;case Mt.Kind.ENUM_TYPE_DEFINITION:case Mt.Kind.ENUM_TYPE_EXTENSION:return An.ENUM_UPPER;case Mt.Kind.ENUM_VALUE_DEFINITION:return An.ENUM_VALUE_UPPER;case Mt.Kind.FIELD_DEFINITION:return An.FIELD_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_DEFINITION:return An.FRAGMENT_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_SPREAD:return An.FRAGMENT_SPREAD_UPPER;case Mt.Kind.INLINE_FRAGMENT:return An.INLINE_FRAGMENT_UPPER;case Mt.Kind.INPUT_VALUE_DEFINITION:return An.INPUT_FIELD_DEFINITION_UPPER;case Mt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Mt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return An.INPUT_OBJECT_UPPER;case Mt.Kind.INTERFACE_TYPE_DEFINITION:case Mt.Kind.INTERFACE_TYPE_EXTENSION:return An.INTERFACE_UPPER;case Mt.Kind.OBJECT_TYPE_DEFINITION:case Mt.Kind.OBJECT_TYPE_EXTENSION:return An.OBJECT_UPPER;case Mt.Kind.SCALAR_TYPE_DEFINITION:case Mt.Kind.SCALAR_TYPE_EXTENSION:return An.SCALAR_UPPER;case Mt.Kind.SCHEMA_DEFINITION:case Mt.Kind.SCHEMA_EXTENSION:return An.SCHEMA_UPPER;case Mt.Kind.UNION_TYPE_DEFINITION:case Mt.Kind.UNION_TYPE_EXTENSION:return An.UNION_UPPER;default:return e}}Wn.operationTypeNodeToDefaultType=new Map([[Mt.OperationTypeNode.MUTATION,An.MUTATION],[Mt.OperationTypeNode.QUERY,An.QUERY],[Mt.OperationTypeNode.SUBSCRIPTION,An.SUBSCRIPTION]]);function b7(e){return e===Mt.Kind.INTERFACE_TYPE_DEFINITION||e===Mt.Kind.UNION_TYPE_DEFINITION}function A7(e,t){for(let n of e){let r=n.value;An.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function R7(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` `);n.length>1&&(t=n.map(r=>r.trimStart()).join(` -`))}return Q(M({},e),{value:t,block:!0})}function pB(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function nT(e){let t=e.selections;return Q(M({},e),{selections:t.sort((n,r)=>{var a,o,c,l;return An.NAME in n?An.NAME in r?n.name.value.localeCompare(r.name.value):-1:An.NAME in r?1:((o=(a=n.typeCondition)==null?void 0:a.name.value)!=null?o:"").localeCompare((l=(c=r.typeCondition)==null?void 0:c.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case Mt.Kind.FIELD:return Q(M({},n),{arguments:pB(n),selectionSet:n.selectionSet?nT(n.selectionSet):n.selectionSet});case Mt.Kind.FRAGMENT_SPREAD:return n;case Mt.Kind.INLINE_FRAGMENT:return Q(M({},n),{selectionSet:nT(n.selectionSet)})}})})}function A7(e){return Q(M({},e),{definitions:e.definitions.map(t=>t.kind!==Mt.Kind.OPERATION_DEFINITION?t:Q(M({},t),{selectionSet:nT(t.selectionSet)}))})}function mB(e,t=!0){return(0,Mt.parse)(e,{noLocation:t})}function R7(e,t=!0){try{return{documentNode:mB(e,t)}}catch(n){return{error:n}}}});var EB=w(Fl=>{"use strict";m();T();N();Object.defineProperty(Fl,"__esModule",{value:!0});Fl.AccumulatorMap=void 0;Fl.mapValue=Pl;Fl.extendSchemaImpl=P7;var Ue=Oe(),Rs=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};Fl.AccumulatorMap=Rs;function Pl(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function P7(e,t,n){var De,Ie,Ce,St;let r=[],i=new Rs,a=new Rs,o=new Rs,c=new Rs,l=new Rs,d=new Rs,p=[],E,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Ue.Kind.SCHEMA_DEFINITION:E=Y;break;case Ue.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Ue.Kind.DIRECTIVE_DEFINITION:p.push(Y);break;case Ue.Kind.SCALAR_TYPE_DEFINITION:case Ue.Kind.OBJECT_TYPE_DEFINITION:case Ue.Kind.INTERFACE_TYPE_DEFINITION:case Ue.Kind.UNION_TYPE_DEFINITION:case Ue.Kind.ENUM_TYPE_DEFINITION:case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(Y);break;case Ue.Kind.SCALAR_TYPE_EXTENSION:i.add(Y.name.value,Y);break;case Ue.Kind.OBJECT_TYPE_EXTENSION:a.add(Y.name.value,Y);break;case Ue.Kind.INTERFACE_TYPE_EXTENSION:o.add(Y.name.value,Y);break;case Ue.Kind.UNION_TYPE_EXTENSION:c.add(Y.name.value,Y);break;case Ue.Kind.ENUM_TYPE_EXTENSION:l.add(Y.name.value,Y);break;case Ue.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(Y.name.value,Y);break;default:continue}v=!0}if(!v)return e;let A=new Map;for(let Y of e.types){let ie=ee(Y);ie&&A.set(Y.name,ie)}for(let Y of r){let ie=Y.name.value;A.set(ie,(De=NB.get(ie))!=null?De:ae(Y))}for(let[Y,ie]of a)A.set(Y,new Ue.GraphQLObjectType({name:Y,interfaces:()=>Ht(ie),fields:()=>Tn(ie),extensionASTNodes:ie}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,ie]of o)A.set(Y,new Ue.GraphQLInterfaceType({name:Y,interfaces:()=>Ht(ie),fields:()=>Tn(ie),extensionASTNodes:ie}));for(let[Y,ie]of l)A.set(Y,new Ue.GraphQLEnumType({name:Y,values:gn(ie),extensionASTNodes:ie}));for(let[Y,ie]of c)A.set(Y,new Ue.GraphQLUnionType({name:Y,types:()=>Ln(ie),extensionASTNodes:ie}));for(let[Y,ie]of i)A.set(Y,new Ue.GraphQLScalarType({name:Y,extensionASTNodes:ie}));for(let[Y,ie]of d)A.set(Y,new Ue.GraphQLInputObjectType({name:Y,fields:()=>lr(ie),extensionASTNodes:ie}))}let U=M(M({query:e.query&&$(e.query),mutation:e.mutation&&$(e.mutation),subscription:e.subscription&&$(e.subscription)},E&&rn([E])),rn(I));return Q(M({description:(Ce=(Ie=E==null?void 0:E.description)==null?void 0:Ie.value)!=null?Ce:e.description},U),{types:Array.from(A.values()),directives:[...e.directives.map(re),...p.map($t)],extensions:e.extensions,astNode:E!=null?E:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(St=n==null?void 0:n.assumeValid)!=null?St:!1});function j(Y){return(0,Ue.isListType)(Y)?new Ue.GraphQLList(j(Y.ofType)):(0,Ue.isNonNullType)(Y)?new Ue.GraphQLNonNull(j(Y.ofType)):$(Y)}function $(Y){return A.get(Y.name)}function re(Y){if((0,Ue.isSpecifiedDirective)(Y))return Y;let ie=Y.toConfig();return new Ue.GraphQLDirective(Q(M({},ie),{args:Pl(ie.args,vt)}))}function ee(Y){if((0,Ue.isIntrospectionType)(Y)||(0,Ue.isSpecifiedScalarType)(Y))return Y;if((0,Ue.isScalarType)(Y))return Ae(Y);if((0,Ue.isObjectType)(Y))return xe(Y);if((0,Ue.isInterfaceType)(Y))return Ze(Y);if((0,Ue.isUnionType)(Y))return Z(Y);if((0,Ue.isEnumType)(Y))return ue(Y);if((0,Ue.isInputObjectType)(Y))return me(Y)}function me(Y){var He;let ie=Y.toConfig(),qe=(He=d.get(ie.name))!=null?He:[];return new Ue.GraphQLInputObjectType(Q(M({},ie),{fields:()=>M(M({},Pl(ie.fields,Bt=>Q(M({},Bt),{type:j(Bt.type)}))),lr(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function ue(Y){var He;let ie=Y.toConfig(),qe=(He=l.get(Y.name))!=null?He:[];return new Ue.GraphQLEnumType(Q(M({},ie),{values:M(M({},ie.values),gn(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function Ae(Y){var Bt,it;let ie=Y.toConfig(),qe=(Bt=i.get(ie.name))!=null?Bt:[],He=ie.specifiedByURL;for(let Pt of qe)He=(it=TB(Pt))!=null?it:He;return new Ue.GraphQLScalarType(Q(M({},ie),{specifiedByURL:He,extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function xe(Y){var He;let ie=Y.toConfig(),qe=(He=a.get(ie.name))!=null?He:[];return new Ue.GraphQLObjectType(Q(M({},ie),{interfaces:()=>[...Y.getInterfaces().map($),...Ht(qe)],fields:()=>M(M({},Pl(ie.fields,_e)),Tn(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function Ze(Y){var He;let ie=Y.toConfig(),qe=(He=o.get(ie.name))!=null?He:[];return new Ue.GraphQLInterfaceType(Q(M({},ie),{interfaces:()=>[...Y.getInterfaces().map($),...Ht(qe)],fields:()=>M(M({},Pl(ie.fields,_e)),Tn(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function Z(Y){var He;let ie=Y.toConfig(),qe=(He=c.get(ie.name))!=null?He:[];return new Ue.GraphQLUnionType(Q(M({},ie),{types:()=>[...Y.getTypes().map($),...Ln(qe)],extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function _e(Y){return Q(M({},Y),{type:j(Y.type),args:Y.args&&Pl(Y.args,vt)})}function vt(Y){return Q(M({},Y),{type:j(Y.type)})}function rn(Y){var qe;let ie={};for(let He of Y){let Bt=(qe=He.operationTypes)!=null?qe:[];for(let it of Bt)ie[it.operation]=an(it.type)}return ie}function an(Y){var He;let ie=Y.name.value,qe=(He=NB.get(ie))!=null?He:A.get(ie);if(qe===void 0)throw new Error(`Unknown type: "${ie}".`);return qe}function wn(Y){return Y.kind===Ue.Kind.LIST_TYPE?new Ue.GraphQLList(wn(Y.type)):Y.kind===Ue.Kind.NON_NULL_TYPE?new Ue.GraphQLNonNull(wn(Y.type)):an(Y)}function $t(Y){var ie;return new Ue.GraphQLDirective({name:Y.name.value,description:(ie=Y.description)==null?void 0:ie.value,locations:Y.locations.map(({value:qe})=>qe),isRepeatable:Y.repeatable,args:Ur(Y.arguments),astNode:Y})}function Tn(Y){var qe,He;let ie=Object.create(null);for(let Bt of Y){let it=(qe=Bt.fields)!=null?qe:[];for(let Pt of it)ie[Pt.name.value]={type:wn(Pt.type),description:(He=Pt.description)==null?void 0:He.value,args:Ur(Pt.arguments),deprecationReason:iT(Pt),astNode:Pt}}return ie}function Ur(Y){var He;let ie=Y!=null?Y:[],qe=Object.create(null);for(let Bt of ie){let it=wn(Bt.type);qe[Bt.name.value]={type:it,description:(He=Bt.description)==null?void 0:He.value,defaultValue:(0,Ue.valueFromAST)(Bt.defaultValue,it),deprecationReason:iT(Bt),astNode:Bt}}return qe}function lr(Y){var qe,He;let ie=Object.create(null);for(let Bt of Y){let it=(qe=Bt.fields)!=null?qe:[];for(let Pt of it){let us=wn(Pt.type);ie[Pt.name.value]={type:us,description:(He=Pt.description)==null?void 0:He.value,defaultValue:(0,Ue.valueFromAST)(Pt.defaultValue,us),deprecationReason:iT(Pt),astNode:Pt}}}return ie}function gn(Y){var qe,He;let ie=Object.create(null);for(let Bt of Y){let it=(qe=Bt.values)!=null?qe:[];for(let Pt of it)ie[Pt.name.value]={description:(He=Pt.description)==null?void 0:He.value,deprecationReason:iT(Pt),astNode:Pt}}return ie}function Ht(Y){return Y.flatMap(ie=>{var qe,He;return(He=(qe=ie.interfaces)==null?void 0:qe.map(an))!=null?He:[]})}function Ln(Y){return Y.flatMap(ie=>{var qe,He;return(He=(qe=ie.types)==null?void 0:qe.map(an))!=null?He:[]})}function ae(Y){var qe,He,Bt,it,Pt,us,Qr,cs,Hc,Pa,yr,si;let ie=Y.name.value;switch(Y.kind){case Ue.Kind.OBJECT_TYPE_DEFINITION:{let xt=(qe=a.get(ie))!=null?qe:[],Ir=[Y,...xt];return a.delete(ie),new Ue.GraphQLObjectType({name:ie,description:(He=Y.description)==null?void 0:He.value,interfaces:()=>Ht(Ir),fields:()=>Tn(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.INTERFACE_TYPE_DEFINITION:{let xt=(Bt=o.get(ie))!=null?Bt:[],Ir=[Y,...xt];return o.delete(ie),new Ue.GraphQLInterfaceType({name:ie,description:(it=Y.description)==null?void 0:it.value,interfaces:()=>Ht(Ir),fields:()=>Tn(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.ENUM_TYPE_DEFINITION:{let xt=(Pt=l.get(ie))!=null?Pt:[],Ir=[Y,...xt];return l.delete(ie),new Ue.GraphQLEnumType({name:ie,description:(us=Y.description)==null?void 0:us.value,values:gn(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.UNION_TYPE_DEFINITION:{let xt=(Qr=c.get(ie))!=null?Qr:[],Ir=[Y,...xt];return c.delete(ie),new Ue.GraphQLUnionType({name:ie,description:(cs=Y.description)==null?void 0:cs.value,types:()=>Ln(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.SCALAR_TYPE_DEFINITION:{let xt=(Hc=i.get(ie))!=null?Hc:[];return i.delete(ie),new Ue.GraphQLScalarType({name:ie,description:(Pa=Y.description)==null?void 0:Pa.value,specifiedByURL:TB(Y),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let xt=(yr=d.get(ie))!=null?yr:[],Ir=[Y,...xt];return d.delete(ie),new Ue.GraphQLInputObjectType({name:ie,description:(si=Y.description)==null?void 0:si.value,fields:()=>lr(Ir),astNode:Y,extensionASTNodes:xt})}}}}var NB=new Map([...Ue.specifiedScalarTypes,...Ue.introspectionTypes].map(e=>[e.name,e]));function iT(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function TB(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Cv=w(Lv=>{"use strict";m();T();N();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.buildASTSchema=L7;var hB=Oe(),F7=bl(),w7=EB();function L7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,F7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,w7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...hB.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new hB.GraphQLSchema(Q(M({},r),{directives:i}))}});var wl=w(yu=>{"use strict";m();T();N();Object.defineProperty(yu,"__esModule",{value:!0});yu.MAX_INT32=yu.MAX_SUBSCRIPTION_FILTER_DEPTH=yu.MAXIMUM_TYPE_NESTING=void 0;yu.MAXIMUM_TYPE_NESTING=30;yu.MAX_SUBSCRIPTION_FILTER_DEPTH=5;yu.MAX_INT32=cn(2,31)-1});var Fr=w(ur=>{"use strict";m();T();N();Object.defineProperty(ur,"__esModule",{value:!0});ur.getOrThrowError=B7;ur.getEntriesNotInHashSet=U7;ur.numberToOrdinal=k7;ur.addIterableToSet=M7;ur.addOptionalIterableToSet=x7;ur.addSets=q7;ur.kindToNodeType=V7;ur.getValueOrDefault=j7;ur.add=K7;ur.generateSimpleDirective=G7;ur.generateRequiresScopesDirective=$7;ur.generateSemanticNonNullDirective=Q7;ur.copyObjectValueMap=Y7;ur.addNewObjectValueMapEntries=J7;ur.copyArrayValueMap=H7;ur.addMapEntries=z7;ur.getFirstEntry=W7;var Vt=Oe(),Nr=zn(),C7=qi(),Bf=Pr();function B7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,C7.invalidKeyFatalError)(t,n);return r}function U7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function k7(e){let t=e.toString();switch(t[t.length-1]){case"1":return`${t}st`;case"2":return`${t}nd`;case"3":return`${t}rd`;default:return`${t}th`}}function M7({source:e,target:t}){for(let n of e)t.add(n)}function x7({source:e,target:t}){if(e)for(let n of e)t.add(n)}function q7(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function V7(e){switch(e){case Vt.Kind.BOOLEAN:return Nr.BOOLEAN_SCALAR;case Vt.Kind.ENUM:case Vt.Kind.ENUM_TYPE_DEFINITION:return Nr.ENUM;case Vt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Vt.Kind.ENUM_VALUE_DEFINITION:return Nr.ENUM_VALUE;case Vt.Kind.FIELD_DEFINITION:return Nr.FIELD;case Vt.Kind.FLOAT:return Nr.FLOAT_SCALAR;case Vt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Nr.INPUT_OBJECT;case Vt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Vt.Kind.INPUT_VALUE_DEFINITION:return Nr.INPUT_VALUE;case Vt.Kind.INT:return Nr.INT_SCALAR;case Vt.Kind.INTERFACE_TYPE_DEFINITION:return Nr.INTERFACE;case Vt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Vt.Kind.NULL:return Nr.NULL;case Vt.Kind.OBJECT:case Vt.Kind.OBJECT_TYPE_DEFINITION:return Nr.OBJECT;case Vt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Vt.Kind.STRING:return Nr.STRING_SCALAR;case Vt.Kind.SCALAR_TYPE_DEFINITION:return Nr.SCALAR;case Vt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Vt.Kind.UNION_TYPE_DEFINITION:return Nr.UNION;case Vt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function j7(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function K7(e,t){return e.has(t)?!1:(e.add(t),!0)}function G7(e){return{kind:Vt.Kind.DIRECTIVE,name:(0,Bf.stringToNameNode)(e)}}function $7(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Vt.Kind.STRING,value:i});t.push({kind:Vt.Kind.LIST,values:r})}return{kind:Vt.Kind.DIRECTIVE,name:(0,Bf.stringToNameNode)(Nr.REQUIRES_SCOPES),arguments:[{kind:Vt.Kind.ARGUMENT,name:(0,Bf.stringToNameNode)(Nr.SCOPES),value:{kind:Vt.Kind.LIST,values:t}}]}}function Q7(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Vt.Kind.INT,value:r.toString()});return{kind:Vt.Kind.DIRECTIVE,name:(0,Bf.stringToNameNode)(Nr.SEMANTIC_NON_NULL),arguments:[{kind:Vt.Kind.ARGUMENT,name:(0,Bf.stringToNameNode)(Nr.LEVELS),value:{kind:Vt.Kind.LIST,values:n}}]}}function Y7(e){let t=new Map;for(let[n,r]of e)t.set(n,M({},r));return t}function J7(e,t){for(let[n,r]of e)t.set(n,M({},r))}function H7(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function z7({source:e,target:t}){for(let[n,r]of e)t.set(n,r)}function W7(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Uf=w(aT=>{"use strict";m();T();N();Object.defineProperty(aT,"__esModule",{value:!0});aT.ExtensionType=void 0;var yB;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(yB||(aT.ExtensionType=yB={}))});var Iu=w(Lr=>{"use strict";m();T();N();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getMutableDirectiveDefinitionNode=Z7;Lr.getMutableEnumNode=eZ;Lr.getMutableEnumValueNode=tZ;Lr.getMutableFieldNode=nZ;Lr.getMutableInputObjectNode=rZ;Lr.getMutableInputValueNode=iZ;Lr.getMutableInterfaceNode=aZ;Lr.getMutableObjectNode=sZ;Lr.getMutableObjectExtensionNode=oZ;Lr.getMutableScalarNode=uZ;Lr.getMutableTypeNode=Bv;Lr.getMutableUnionNode=cZ;Lr.getTypeNodeNamedTypeName=Uv;Lr.getNamedTypeNode=gB;var wr=Oe(),Ll=Pr(),IB=qi(),X7=wl();function Z7(e){return{arguments:[],kind:e.kind,locations:[],name:M({},e.name),repeatable:e.repeatable,description:(0,Ll.formatDescription)(e.description)}}function eZ(e){return{kind:wr.Kind.ENUM_TYPE_DEFINITION,name:M({},e)}}function tZ(e){return{directives:[],kind:e.kind,name:M({},e.name),description:(0,Ll.formatDescription)(e.description)}}function nZ(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:M({},e.name),type:Bv(e.type,t,n),description:(0,Ll.formatDescription)(e.description)}}function rZ(e){return{kind:wr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:M({},e)}}function iZ(e,t,n){return{directives:[],kind:e.kind,name:M({},e.name),type:Bv(e.type,t,n),defaultValue:e.defaultValue,description:(0,Ll.formatDescription)(e.description)}}function aZ(e){return{kind:wr.Kind.INTERFACE_TYPE_DEFINITION,name:M({},e)}}function sZ(e){return{kind:wr.Kind.OBJECT_TYPE_DEFINITION,name:M({},e)}}function oZ(e){let t=e.kind===wr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:wr.Kind.OBJECT_TYPE_EXTENSION,name:M({},e.name),description:(0,Ll.formatDescription)(t)}}function uZ(e){return{kind:wr.Kind.SCALAR_TYPE_DEFINITION,name:M({},e)}}function Bv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.REQUIRED_FIELDSET_TYPE_NODE=Cl.REQUIRED_STRING_TYPE_NODE=void 0;var _B=Oe(),vB=Pr(),OB=zn();Cl.REQUIRED_STRING_TYPE_NODE={kind:_B.Kind.NON_NULL_TYPE,type:(0,vB.stringToNamedTypeNode)(OB.STRING_SCALAR)};Cl.REQUIRED_FIELDSET_TYPE_NODE={kind:_B.Kind.NON_NULL_TYPE,type:(0,vB.stringToNamedTypeNode)(OB.FIELD_SET_SCALAR)}});var kf=w(Ke=>{"use strict";m();T();N();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.TAG_DEFINITION=Ke.SUBSCRIPTION_FILTER_DEFINITION=Ke.SPECIFIED_BY_DEFINITION=Ke.SHAREABLE_DEFINITION=Ke.SEMANTIC_NON_NULL_DEFINITION=Ke.REQUIRES_SCOPES_DEFINITION=Ke.REQUIRES_DEFINITION=Ke.REQUIRE_FETCH_REASONS_DEFINITION=Ke.PROVIDES_DEFINITION=Ke.OVERRIDE_DEFINITION=Ke.ONE_OF_DEFINITION=Ke.LINK_DEFINITION=Ke.KEY_DEFINITION=Ke.INTERFACE_OBJECT_DEFINITION=Ke.INACCESSIBLE_DEFINITION=Ke.EDFS_REDIS_SUBSCRIBE_DEFINITION=Ke.EDFS_REDIS_PUBLISH_DEFINITION=Ke.EDFS_NATS_SUBSCRIBE_DEFINITION=Ke.EDFS_NATS_REQUEST_DEFINITION=Ke.EDFS_NATS_PUBLISH_DEFINITION=Ke.EDFS_KAFKA_SUBSCRIBE_DEFINITION=Ke.EDFS_KAFKA_PUBLISH_DEFINITION=Ke.EXTERNAL_DEFINITION=Ke.EXTENDS_DEFINITION=Ke.DEPRECATED_DEFINITION=Ke.CONNECT_FIELD_RESOLVER_DEFINITION=Ke.CONFIGURE_DESCRIPTION_DEFINITION=Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=Ke.COMPOSE_DIRECTIVE_DEFINITION=Ke.AUTHENTICATED_DEFINITION=void 0;var Ee=Oe(),pe=Pr(),H=zn(),_r=sT();Ke.AUTHENTICATED_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.AUTHENTICATED),repeatable:!1};Ke.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.NAME),type:_r.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,pe.stringToNameNode)(H.COMPOSE_DIRECTIVE),repeatable:!0};Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};Ke.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}},{directives:[],kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.DESCRIPTION_OVERRIDE),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.INPUT_OBJECT_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.SCHEMA_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.CONFIGURE_DESCRIPTION),repeatable:!1};Ke.CONNECT_FIELD_RESOLVER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CONTEXT),type:_r.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.CONNECT_FIELD_RESOLVER),repeatable:!1};Ke.DEPRECATED_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.REASON),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR),defaultValue:{kind:Ee.Kind.STRING,value:Ee.DEFAULT_DEPRECATION_REASON}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.DEPRECATED),repeatable:!1};Ke.EXTENDS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.EXTENDS),repeatable:!1};Ke.EXTERNAL_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.EXTERNAL),repeatable:!1};Ke.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.TOPIC),type:_r.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_KAFKA_PUBLISH),repeatable:!1};Ke.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.TOPICS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:_r.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};Ke.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECT),type:_r.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_PUBLISH),repeatable:!1};Ke.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECT),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_REQUEST),repeatable:!1};Ke.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECTS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:_r.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.STREAM_CONFIGURATION),type:(0,pe.stringToNamedTypeNode)(H.EDFS_NATS_STREAM_CONFIGURATION)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_SUBSCRIBE),repeatable:!1};Ke.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CHANNEL),type:_r.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_REDIS_PUBLISH),repeatable:!1};Ke.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CHANNELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:_r.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_REDIS_SUBSCRIBE),repeatable:!1};Ke.INACCESSIBLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.INACCESSIBLE),repeatable:!1};Ke.INTERFACE_OBJECT_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.INTERFACE_OBJECT),repeatable:!1};Ke.KEY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:_r.REQUIRED_FIELDSET_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.RESOLVABLE),type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR),defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.KEY),repeatable:!0};Ke.LINK_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.URL_LOWER),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.AS),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FOR),type:(0,pe.stringToNamedTypeNode)(H.LINK_PURPOSE)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.IMPORT),type:{kind:Ee.Kind.LIST_TYPE,type:(0,pe.stringToNamedTypeNode)(H.LINK_IMPORT)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,pe.stringToNameNode)(H.LINK),repeatable:!0};Ke.ONE_OF_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INPUT_OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.ONE_OF),repeatable:!1};Ke.OVERRIDE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FROM),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.OVERRIDE),repeatable:!1};Ke.PROVIDES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:_r.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.PROVIDES),repeatable:!1};Ke.REQUIRE_FETCH_REASONS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.REQUIRE_FETCH_REASONS),repeatable:!0};Ke.REQUIRES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:_r.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.REQUIRES),repeatable:!1};Ke.REQUIRES_SCOPES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SCOPES),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.SCOPE_SCALAR)}}}}}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.REQUIRES_SCOPES),repeatable:!1};Ke.SEMANTIC_NON_NULL_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.LEVELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.INT_SCALAR)}}},defaultValue:{kind:Ee.Kind.LIST,values:[{kind:Ee.Kind.INT,value:"0"}]}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.SEMANTIC_NON_NULL),repeatable:!1};Ke.SHAREABLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.SHAREABLE),repeatable:!0};Ke.SPECIFIED_BY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.URL_LOWER),type:_r.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.SPECIFIED_BY),repeatable:!1};Ke.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CONDITION),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.SUBSCRIPTION_FILTER_CONDITION)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.SUBSCRIPTION_FILTER),repeatable:!1};Ke.TAG_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.NAME),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.TAG),repeatable:!0}});var gu=w(Vi=>{"use strict";m();T();N();Object.defineProperty(Vi,"__esModule",{value:!0});Vi.MAX_OR_SCOPES=Vi.EDFS_ARGS_REGEXP=Vi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=Vi.BASE_SCALARS=Vi.DIRECTIVE_DEFINITION_BY_NAME=void 0;var ut=zn(),Ot=kf();Vi.DIRECTIVE_DEFINITION_BY_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.CONFIGURE_DESCRIPTION,Ot.CONFIGURE_DESCRIPTION_DEFINITION],[ut.CONFIGURE_CHILD_DESCRIPTIONS,Ot.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION],[ut.CONNECT_FIELD_RESOLVER,Ot.CONNECT_FIELD_RESOLVER_DEFINITION],[ut.DEPRECATED,Ot.DEPRECATED_DEFINITION],[ut.EDFS_KAFKA_PUBLISH,Ot.EDFS_KAFKA_PUBLISH_DEFINITION],[ut.EDFS_KAFKA_SUBSCRIBE,Ot.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[ut.EDFS_NATS_PUBLISH,Ot.EDFS_NATS_PUBLISH_DEFINITION],[ut.EDFS_NATS_REQUEST,Ot.EDFS_NATS_REQUEST_DEFINITION],[ut.EDFS_NATS_SUBSCRIBE,Ot.EDFS_NATS_SUBSCRIBE_DEFINITION],[ut.EDFS_REDIS_PUBLISH,Ot.EDFS_REDIS_PUBLISH_DEFINITION],[ut.EDFS_REDIS_SUBSCRIBE,Ot.EDFS_REDIS_SUBSCRIBE_DEFINITION],[ut.EXTENDS,Ot.EXTENDS_DEFINITION],[ut.EXTERNAL,Ot.EXTERNAL_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.KEY,Ot.KEY_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.ONE_OF,Ot.ONE_OF_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.PROVIDES,Ot.PROVIDES_DEFINITION],[ut.REQUIRE_FETCH_REASONS,Ot.REQUIRE_FETCH_REASONS_DEFINITION],[ut.REQUIRES,Ot.REQUIRES_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SEMANTIC_NON_NULL,Ot.SEMANTIC_NON_NULL_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION],[ut.SPECIFIED_BY,Ot.SPECIFIED_BY_DEFINITION],[ut.SUBSCRIPTION_FILTER,Ot.SUBSCRIPTION_FILTER_DEFINITION],[ut.TAG,Ot.TAG_DEFINITION]]);Vi.BASE_SCALARS=new Set(["_Any","_Entities",ut.BOOLEAN_SCALAR,ut.FLOAT_SCALAR,ut.ID_SCALAR,ut.INT_SCALAR,ut.FIELD_SET_SCALAR,ut.SCOPE_SCALAR,ut.STRING_SCALAR]);Vi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION]]);Vi.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;Vi.MAX_OR_SCOPES=16});var oT=w(Tc=>{"use strict";m();T();N();Object.defineProperty(Tc,"__esModule",{value:!0});Tc.newParentTagData=mZ;Tc.newChildTagData=NZ;Tc.validateImplicitFieldSets=TZ;Tc.newContractTagOptionsFromArrays=EZ;Tc.getDescriptionFromString=hZ;var ei=Oe(),lZ=Iu(),dZ=gu(),fZ=Pr(),SB=Fr(),pZ=zn();function mZ(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function NZ(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function TZ({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let c=(0,SB.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(c.has(l))continue;let p=[i],E=[],I=[],v=-1,A=!0,U=!0;(0,ei.visit)(d,{Argument:{enter(){return U=!1,ei.BREAK}},Field:{enter(j){let $=p[v];if(A)return U=!1,ei.BREAK;let re=j.name.value;if(re===pZ.TYPENAME)return;let ee=$.fieldDataByName.get(re);if(!ee||ee.argumentDataByName.size||E[v].has(re))return U=!1,ei.BREAK;let{isUnconditionallyProvided:me}=(0,SB.getOrThrowError)(ee.externalFieldDataBySubgraphName,t,`${ee.originalParentTypeName}.${re}.externalFieldDataBySubgraphName`),ue=e.get(`${ee.renamedParentTypeName}.${re}`);if(ue){if(ue.providedBy.length>0)I.push(...ue.providedBy);else if(ue.requiredBy.length>0)return U=!1,ei.BREAK}else if(!me)return U=!1,ei.BREAK;E[v].add(re);let Ae=(0,lZ.getTypeNodeNamedTypeName)(ee.node.type);if(dZ.BASE_SCALARS.has(Ae))return;let xe=a.get(Ae);if(!xe)return U=!1,ei.BREAK;if(xe.kind===ei.Kind.OBJECT_TYPE_DEFINITION){A=!0,p.push(xe);return}if((0,fZ.isKindAbstract)(xe.kind))return U=!1,ei.BREAK}},InlineFragment:{enter(){return U=!1,ei.BREAK}},SelectionSet:{enter(){if(!A||(v+=1,A=!1,v<0||v>=p.length))return U=!1,ei.BREAK;E.push(new Set)},leave(){if(A)return U=!1,ei.BREAK;v-=1,p.pop(),E.pop()}}}),U&&(r.push(Q(M({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function EZ(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function hZ(e){if(e)return{block:!0,kind:ei.Kind.STRING,value:e}}});var Ul=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=gZ;mt.isNodeExternalOrShareable=_Z;mt.isTypeRequired=vZ;mt.areDefaultValuesCompatible=bB;mt.compareAndValidateInputValueDefaultValues=OZ;mt.setMutualExecutableLocations=SZ;mt.isTypeNameRootType=DZ;mt.getRenamedRootTypeName=bZ;mt.childMapToValueArray=RZ;mt.setLongestDescription=PZ;mt.isParentDataRootType=AB;mt.isInterfaceDefinitionData=FZ;mt.setParentDataExtensionType=wZ;mt.upsertDeprecatedDirective=LZ;mt.upsertTagDirectives=CZ;mt.propagateAuthDirectives=BZ;mt.propagateFieldAuthDirectives=UZ;mt.generateDeprecatedDirective=qv;mt.getClientPersistedDirectiveNodes=Mv;mt.getClientSchemaFieldNodeByFieldData=xZ;mt.getNodeWithPersistedDirectivesByInputValueData=RB;mt.addValidPersistedDirectiveDefinitionNodeByData=VZ;mt.newInvalidFieldNames=jZ;mt.validateExternalAndShareable=KZ;mt.isTypeValidImplementation=uT;mt.isNodeDataInaccessible=PB;mt.isLeafKind=GZ;mt.getSubscriptionFilterValue=$Z;mt.getParentTypeName=QZ;mt.newConditionalFieldData=YZ;mt.getDefinitionDataCoords=JZ;mt.isParentDataCompositeOutputType=HZ;mt.newExternalFieldData=zZ;mt.getInitialFederatedDescription=WZ;mt.areKindsEqual=XZ;mt.isFieldData=Vv;mt.isInputObjectDefinitionData=ZZ;mt.isInputNodeKind=eee;mt.isOutputNodeKind=tee;var rt=Oe(),kv=Uf(),Bl=Pr(),xv=qi(),jt=zn(),Ec=Fr(),yZ=oT(),IZ=Oe();function gZ(){return{deprecatedReason:"",directivesByName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function _Z(e,t,n){var i;let r={isExternal:n.has(jt.EXTERNAL),isShareable:t||n.has(jt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===jt.EXTERNAL){r.isExternal=!0;continue}o===jt.SHAREABLE&&(r.isShareable=!0)}return r}function vZ(e){return e.kind===rt.Kind.NON_NULL_TYPE}function bB(e,t){switch(e.kind){case rt.Kind.LIST_TYPE:return t.kind===rt.Kind.LIST||t.kind===rt.Kind.NULL;case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NULL)return!0;switch(e.name.value){case jt.BOOLEAN_SCALAR:return t.kind===rt.Kind.BOOLEAN;case jt.FLOAT_SCALAR:return t.kind===rt.Kind.INT||t.kind===rt.Kind.FLOAT;case jt.INT_SCALAR:return t.kind===rt.Kind.INT;case jt.STRING_SCALAR:return t.kind===rt.Kind.STRING;default:return!0}case rt.Kind.NON_NULL_TYPE:return t.kind===rt.Kind.NULL?!1:bB(e.type,t)}}function OZ(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,rt.print)(e.defaultValue),i=(0,rt.print)(t.defaultValue);if(r!==i){n.push((0,xv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?jt.ARGUMENT:jt.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function SZ(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function DZ(e,t){return jt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function bZ(e,t){let n=t.get(e);if(!n)return e;switch(n){case rt.OperationTypeNode.MUTATION:return jt.MUTATION;case rt.OperationTypeNode.SUBSCRIPTION:return jt.SUBSCRIPTION;default:return jt.QUERY}}function AZ(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function RZ(e){var n;let t=[];for(let r of e.values()){Vv(r)&&AZ(r);for(let[i,a]of r.directivesByName){if(i===jt.DEPRECATED){let o=a[0];if(!o)continue;if((n=o.arguments)!=null&&n.length){r.node.directives.push(o);continue}r.node.directives.push(Q(M({},o),{arguments:[{kind:rt.Kind.ARGUMENT,value:{kind:rt.Kind.STRING,value:IZ.DEFAULT_DEPRECATION_REASON},name:(0,Bl.stringToNameNode)(jt.REASON)}]}));continue}r.node.directives.push(...a)}t.push(r.node)}return t}function PZ(e,t){if(t.description){if("configureDescriptionDataBySubgraphName"in t){for(let{propagate:n}of t.configureDescriptionDataBySubgraphName.values())if(!n)return}(!e.description||e.description.value.length0&&e.persistedDirectivesData.directivesByName.set(jt.REQUIRES_SCOPES,[(0,Ec.generateRequiresScopesDirective)(t.requiredScopes)]))}function UZ(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByName.set(jt.AUTHENTICATED,[(0,Ec.generateSimpleDirective)(jt.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByName.set(jt.REQUIRES_SCOPES,[(0,Ec.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function qv(e){return{kind:rt.Kind.DIRECTIVE,name:(0,Bl.stringToNameNode)(jt.DEPRECATED),arguments:[{kind:rt.Kind.ARGUMENT,name:(0,Bl.stringToNameNode)(jt.REASON),value:{kind:rt.Kind.STRING,value:e||jt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function kZ(e,t,n,r){let i=[];for(let[a,o]of e){let c=t.get(a);if(c){if(o.length<2){i.push(...o);continue}if(!c.repeatable){r.push((0,xv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function MZ(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(qv(e.persistedDirectivesData.deprecatedReason)),r.push(...kZ(e.persistedDirectivesData.directivesByName,t,e.name,n)),r}function Mv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(qv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByName){if(r===jt.SEMANTIC_NON_NULL&&Vv(e)){t.push((0,Ec.generateSemanticNonNullDirective)((n=(0,Ec.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}jt.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function xZ(e){let t=Mv(e),n=[];for(let r of e.argumentDataByName.values())PB(r)||n.push(Q(M({},r.node),{directives:Mv(r)}));return Q(M({},e.node),{directives:t,arguments:n})}function RB(e,t,n){return e.node.name=(0,Bl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=MZ(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function qZ(e,t,n,r,i){let a=[];for(let[o,c]of t.argumentDataByName){let l=(0,Ec.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames);if(l.length>0){c.requiredSubgraphNames.size>0&&a.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...c.requiredSubgraphNames]});continue}e.push(RB(c,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,xv.invalidRequiredInputValueError)(jt.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function VZ(e,t,n,r){let i=[];qZ(i,t,n,r)&&e.push({arguments:i,kind:rt.Kind.DIRECTIVE_DEFINITION,locations:(0,Bl.setToNameNodeArray)(t.executableLocations),name:(0,Bl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function jZ(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function KZ(e,t){let n=e.isShareableBySubgraphName.size,r=new Array,i=0;for(let[a,o]of e.isShareableBySubgraphName){let c=e.externalFieldDataBySubgraphName.get(a);if(c&&!c.isUnconditionallyProvided){r.push(a);continue}o||(i+=1)}switch(i){case 0:n===r.length&&t.subgraphNamesByExternalFieldName.set(e.name,r);return;case 1:if(n===1)return;n-r.length!==1&&t.byShareable.add(e.name);return;default:t.byShareable.add(e.name)}}var DB;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(DB||(mt.MergeMethod=DB={}));function uT(e,t,n){if(e.kind===rt.Kind.NON_NULL_TYPE)return t.kind!==rt.Kind.NON_NULL_TYPE?!1:uT(e.type,t.type,n);if(t.kind===rt.Kind.NON_NULL_TYPE)return uT(e,t.type,n);switch(e.kind){case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let a=n.get(r);return a?a.has(i):!1}return!1;default:return t.kind===rt.Kind.LIST_TYPE?uT(e.type,t.type,n):!1}}function PB(e){return e.persistedDirectivesData.directivesByName.has(jt.INACCESSIBLE)||e.directivesByName.has(jt.INACCESSIBLE)}function GZ(e){return e===rt.Kind.SCALAR_TYPE_DEFINITION||e===rt.Kind.ENUM_TYPE_DEFINITION}function $Z(e){switch(e.kind){case rt.Kind.BOOLEAN:return e.value;case rt.Kind.ENUM:case rt.Kind.STRING:return e.value;case rt.Kind.FLOAT:case rt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case rt.Kind.NULL:return null}}function QZ(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function YZ(){return{providedBy:[],requiredBy:[]}}function JZ(e,t){switch(e.kind){case rt.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case rt.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case rt.Kind.ARGUMENT:case rt.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case rt.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function HZ(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION||e.kind===rt.Kind.INTERFACE_TYPE_DEFINITION}function zZ(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function WZ(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,yZ.getDescriptionFromString)(t.description)||e.description}function XZ(e,t){return e.kind===t.kind}function Vv(e){return e.kind===rt.Kind.FIELD_DEFINITION}function ZZ(e){return e.kind===rt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function eee(e){return jt.INPUT_NODE_KINDS.has(e)}function tee(e){return jt.OUTPUT_NODE_KINDS.has(e)}});var Gv={};wm(Gv,{__addDisposableResource:()=>WB,__assign:()=>cT,__asyncDelegator:()=>KB,__asyncGenerator:()=>jB,__asyncValues:()=>GB,__await:()=>kl,__awaiter:()=>UB,__classPrivateFieldGet:()=>JB,__classPrivateFieldIn:()=>zB,__classPrivateFieldSet:()=>HB,__createBinding:()=>dT,__decorate:()=>LB,__disposeResources:()=>XB,__esDecorate:()=>nee,__exportStar:()=>MB,__extends:()=>FB,__generator:()=>kB,__importDefault:()=>YB,__importStar:()=>QB,__makeTemplateObject:()=>$B,__metadata:()=>BB,__param:()=>CB,__propKey:()=>iee,__read:()=>Kv,__rest:()=>wB,__runInitializers:()=>ree,__setFunctionName:()=>aee,__spread:()=>xB,__spreadArray:()=>VB,__spreadArrays:()=>qB,__values:()=>lT,default:()=>uee});function FB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function wB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function CB(e,t){return function(n,r){t(n,r,e)}}function nee(e,t,n,r,i,a){function o($){if($!==void 0&&typeof $!="function")throw new TypeError("Function expected");return $}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function($){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o($||null))};var j=(0,n[v])(c==="accessor"?{get:p.get,set:p.set}:p[l],A);if(c==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(c==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function ree(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function xB(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(A){E(a[0][3],A)}}function l(I){I.value instanceof kl?Promise.resolve(I.value.v).then(d,p):E(a[0][2],I)}function d(I){c("next",I)}function p(I){c("throw",I)}function E(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function KB(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:kl(e[i](o)),done:!1}:a?a(o):o}:a}}function GB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof lT=="function"?lT(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(c,l){o=e[a](o),i(c,l,o.done,o.value)})}}function i(a,o,c,l){Promise.resolve(l).then(function(d){a({value:d,done:c})},o)}}function $B(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function QB(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dT(t,e,n);return see(t,e),t}function YB(e){return e&&e.__esModule?e:{default:e}}function JB(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function HB(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function zB(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function WB(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function XB(e){function t(r){e.error=e.hasError?new oee(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var jv,cT,dT,see,oee,uee,$v=Qu(()=>{"use strict";m();T();N();jv=function(e,t){return jv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},jv(e,t)};cT=function(){return cT=Object.assign||function(t){for(var n,r=1,i=arguments.length;rvU,__assign:()=>fT,__asyncDelegator:()=>NU,__asyncGenerator:()=>mU,__asyncValues:()=>TU,__await:()=>Ml,__awaiter:()=>uU,__classPrivateFieldGet:()=>IU,__classPrivateFieldIn:()=>_U,__classPrivateFieldSet:()=>gU,__createBinding:()=>mT,__decorate:()=>tU,__disposeResources:()=>OU,__esDecorate:()=>rU,__exportStar:()=>lU,__extends:()=>ZB,__generator:()=>cU,__importDefault:()=>yU,__importStar:()=>hU,__makeTemplateObject:()=>EU,__metadata:()=>oU,__param:()=>nU,__propKey:()=>aU,__read:()=>Jv,__rest:()=>eU,__rewriteRelativeImportExtension:()=>SU,__runInitializers:()=>iU,__setFunctionName:()=>sU,__spread:()=>dU,__spreadArray:()=>pU,__spreadArrays:()=>fU,__values:()=>pT,default:()=>dee});function ZB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function eU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function nU(e,t){return function(n,r){t(n,r,e)}}function rU(e,t,n,r,i,a){function o($){if($!==void 0&&typeof $!="function")throw new TypeError("Function expected");return $}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function($){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o($||null))};var j=(0,n[v])(c==="accessor"?{get:p.get,set:p.set}:p[l],A);if(c==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(c==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function iU(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Jv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function dU(){for(var e=[],t=0;t1||l(v,U)})},A&&(i[v]=A(i[v])))}function l(v,A){try{d(r[v](A))}catch(U){I(a[0][3],U)}}function d(v){v.value instanceof Ml?Promise.resolve(v.value.v).then(p,E):I(a[0][2],v)}function p(v){l("next",v)}function E(v){l("throw",v)}function I(v,A){v(A),a.shift(),a.length&&l(a[0][0],a[0][1])}}function NU(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Ml(e[i](o)),done:!1}:a?a(o):o}:a}}function TU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof pT=="function"?pT(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(c,l){o=e[a](o),i(c,l,o.done,o.value)})}}function i(a,o,c,l){Promise.resolve(l).then(function(d){a({value:d,done:c})},o)}}function EU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function hU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=Yv(e),r=0;r{"use strict";m();T();N();Qv=function(e,t){return Qv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Qv(e,t)};fT=function(){return fT=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var xl=w(ji=>{"use strict";m();T();N();Object.defineProperty(ji,"__esModule",{value:!0});ji.asArray=void 0;ji.isUrl=RU;ji.isDocumentString=Tee;ji.isValidPath=hee;ji.compareStrings=PU;ji.nodeToString=Hv;ji.compareNodes=yee;ji.isSome=Iee;ji.assertSome=gee;var fee=Oe(),pee=/^(https?|wss?|file):\/\//;function RU(e){if(typeof e!="string"||!pee.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch(t){return!1}}var mee=e=>Array.isArray(e)?e:e?[e]:[];ji.asArray=mee;var Nee=/\.[a-z0-9]+$/i;function Tee(e){if(typeof e!="string"||Nee.test(e)||RU(e))return!1;try{return(0,fee.parse)(e),!0}catch(t){if(!t.message.includes("EOF")&&e.replace(/(\#[^*]*)/g,"").trim()!==""&&e.includes(" "))throw new Error(`Failed to parse the GraphQL document. ${t.message} -${e}`)}return!1}var Eee=/[‘“!%^<>`\n]/;function hee(e){return typeof e=="string"&&!Eee.test(e)}function PU(e,t){return String(e)String(t)?1:0}function Hv(e){var n,r;let t;return"alias"in e&&(t=(n=e.alias)==null?void 0:n.value),t==null&&"name"in e&&(t=(r=e.name)==null?void 0:r.value),t==null&&(t=e.kind),t}function yee(e,t,n){let r=Hv(e),i=Hv(t);return typeof n=="function"?n(r,i):PU(r,i)}function Iee(e){return e!=null}function gee(e,t="Value should be something"){if(e==null)throw new Error(t)}});var Mf=w(TT=>{"use strict";m();T();N();Object.defineProperty(TT,"__esModule",{value:!0});TT.inspect=void 0;var LU=3;function _ee(e){return NT(e,[])}TT.inspect=_ee;function NT(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return vee(e,t);default:return String(e)}}function FU(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function vee(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?FU(e)+` -`+wU(e.errors,t):FU(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Oee(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:NT(r,n)}else if(Array.isArray(e))return wU(e,n);return See(e,n)}function Oee(e){return typeof e.toJSON=="function"}function See(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>LU?"["+Dee(e)+"]":"{ "+n.map(([i,a])=>i+": "+NT(a,t)).join(", ")+" }"}function wU(e,t){if(e.length===0)return"[]";if(t.length>LU)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(ET,"__esModule",{value:!0});ET.createGraphQLError=Wv;ET.relocatedError=Ree;var zv=Oe(),bee=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function Aee(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>bee.includes(t))}function Wv(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Aee(t.originalError)&&(t.originalError=Wv(t.originalError.message,t.originalError)),zv.versionInfo.major>=17?new zv.GraphQLError(e,t):new zv.GraphQLError(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function Ree(e,t){return Wv(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}});var xf=w(ti=>{"use strict";m();T();N();Object.defineProperty(ti,"__esModule",{value:!0});ti.isPromise=yT;ti.isActualPromise=BU;ti.handleMaybePromise=_u;ti.fakePromise=Ya;ti.createDeferredPromise=Pee;ti.iterateAsync=UU;ti.iterateAsyncVoid=UU;ti.fakeRejectPromise=hc;ti.mapMaybePromise=Fee;ti.mapAsyncIterator=wee;ti.promiseLikeFinally=kU;ti.unfakePromise=MU;var IT=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function yT(e){return(e==null?void 0:e.then)!=null}function BU(e){let t=e;return t&&t.then&&t.catch&&t.finally}function _u(e,t,n,r){let i=Ya().then(e).then(t,n);return r&&(i=i.finally(r)),MU(i)}function Ya(e){return e&&BU(e)?e:yT(e)?{then:(t,n)=>Ya(e.then(t,n)),catch:t=>Ya(e.then(n=>n,t)),finally:t=>Ya(t?kU(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return Ya(t(e))}catch(n){return hc(n)}return this},catch(){return this},finally(t){if(t)try{return Ya(t()).then(()=>e,()=>e)}catch(n){return hc(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[IT]:"resolved"}}function Pee(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,a){e=i,t=a}),get resolve(){return e},get reject(){return t}}}function UU(e,t,n){if((e==null?void 0:e.length)===0)return;let r=e[Symbol.iterator](),i=0;function a(){let{done:o,value:c}=r.next();if(o)return;let l=!1;function d(){l=!0}return _u(function(){return t(c,d,i++)},function(E){if(E&&(n==null||n.push(E)),!l)return a()})}return a()}function hc(e){return{then(t,n){if(n)try{return Ya(n(e))}catch(r){return hc(r)}return this},catch(t){if(t)try{return Ya(t(e))}catch(n){return hc(n)}return this},finally(t){if(t)try{t()}catch(n){return hc(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[IT]:"rejected"}}function Fee(e,t,n){return _u(()=>e,t,n)}function wee(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,a,o;if(r){let d;o=p=>(d||(d=_u(r,()=>p,()=>p)),d)}typeof e.return=="function"&&(i=e.return,a=d=>{let p=()=>{throw d};return i.call(e).then(p,p)});function c(d){return d.done?o?o(d):d:_u(()=>d.value,p=>_u(()=>t(p),CU,a))}let l;if(n){let d,p=n;l=E=>(d||(d=_u(()=>E,I=>_u(()=>p(I),CU,a))),d)}return{next(){return e.next().then(c,l)},return(){let d=i?i.call(e).then(c,l):Ya({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(c,l):a?a(d):hc(d)},[Symbol.asyncIterator](){return this}}}function CU(e){return{value:e,done:!1}}function Lee(e){return(e==null?void 0:e[IT])==="resolved"}function Cee(e){return(e==null?void 0:e[IT])==="rejected"}function kU(e,t){return"finally"in e?e.finally(t):e.then(n=>{let r=t();return yT(r)?r.then(()=>n):n},n=>{let r=t();if(yT(r))return r.then(()=>{throw n});throw n})}function MU(e){if(Lee(e))return e.__fakePromiseValue;if(Cee(e))throw e.__fakeRejectError;return e}});var gT=w(vu=>{"use strict";m();T();N();Object.defineProperty(vu,"__esModule",{value:!0});vu.isPromise=void 0;vu.isIterableObject=Bee;vu.isObjectLike=Uee;vu.promiseReduce=kee;vu.hasOwnProperty=Mee;var xU=xf();Object.defineProperty(vu,"isPromise",{enumerable:!0,get:function(){return xU.isPromise}});function Bee(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Uee(e){return typeof e=="object"&&e!==null}function kee(e,t,n){let r=n;for(let i of e)r=(0,xU.handleMaybePromise)(()=>r,a=>t(a,i));return r}function Mee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var eO=w(Zv=>{"use strict";m();T();N();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.getArgumentValues=qee;var Xv=Mf(),yc=Oe(),_T=hT(),xee=gT();function qee(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((c,l)=>Q(M({},c),{[l.name.value]:l}),{});for(let{name:c,type:l,defaultValue:d}of e.args){let p=a[c];if(!p){if(d!==void 0)r[c]=d;else if((0,yc.isNonNullType)(l))throw(0,_T.createGraphQLError)(`Argument "${c}" of required type "${(0,Xv.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===yc.Kind.NULL;if(E.kind===yc.Kind.VARIABLE){let A=E.name.value;if(n==null||!(0,xee.hasOwnProperty)(n,A)){if(d!==void 0)r[c]=d;else if((0,yc.isNonNullType)(l))throw(0,_T.createGraphQLError)(`Argument "${c}" of required type "${(0,Xv.inspect)(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,yc.isNonNullType)(l))throw(0,_T.createGraphQLError)(`Argument "${c}" of non-null type "${(0,Xv.inspect)(l)}" must not be null.`,{nodes:[E]});let v=(0,yc.valueFromAST)(E,l,n);if(v===void 0)throw(0,_T.createGraphQLError)(`Argument "${c}" has invalid value ${(0,yc.print)(E)}.`,{nodes:[E]});r[c]=v}return r}});var Ou=w(Ps=>{"use strict";m();T();N();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.memoize1=Vee;Ps.memoize2=jee;Ps.memoize3=Kee;Ps.memoize4=Gee;Ps.memoize5=$ee;Ps.memoize2of4=Qee;Ps.memoize2of5=Yee;function Vee(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function jee(e){let t=new WeakMap;return function(r,i){let a=t.get(r);if(!a){a=new WeakMap,t.set(r,a);let c=e(r,i);return a.set(i,c),c}let o=a.get(i);if(o===void 0){let c=e(r,i);return a.set(i,c),c}return o}}function Kee(e){let t=new WeakMap;return function(r,i,a){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);let d=new WeakMap;o.set(i,d);let p=e(r,i,a);return d.set(a,p),p}let c=o.get(i);if(!c){c=new WeakMap,o.set(i,c);let d=e(r,i,a);return c.set(a,d),d}let l=c.get(a);if(l===void 0){let d=e(r,i,a);return c.set(a,d),d}return l}}function Gee(e){let t=new WeakMap;return function(r,i,a,o){let c=t.get(r);if(!c){c=new WeakMap,t.set(r,c);let E=new WeakMap;c.set(i,E);let I=new WeakMap;E.set(a,I);let v=e(r,i,a,o);return I.set(o,v),v}let l=c.get(i);if(!l){l=new WeakMap,c.set(i,l);let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let d=l.get(a);if(!d){let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let p=d.get(o);if(p===void 0){let E=e(r,i,a,o);return d.set(o,E),E}return p}}function $ee(e){let t=new WeakMap;return function(r,i,a,o,c){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let v=new WeakMap;l.set(i,v);let A=new WeakMap;v.set(a,A);let U=new WeakMap;A.set(o,U);let j=e(r,i,a,o,c);return U.set(c,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let A=new WeakMap;v.set(o,A);let U=e(r,i,a,o,c);return A.set(c,U),U}let p=d.get(a);if(!p){p=new WeakMap,d.set(a,p);let v=new WeakMap;p.set(o,v);let A=e(r,i,a,o,c);return v.set(c,A),A}let E=p.get(o);if(!E){E=new WeakMap,p.set(o,E);let v=e(r,i,a,o,c);return E.set(c,v),v}let I=E.get(c);if(I===void 0){let v=e(r,i,a,o,c);return E.set(c,v),v}return I}}function Qee(e){let t=new WeakMap;return function(r,i,a,o){let c=t.get(r);if(!c){c=new WeakMap,t.set(r,c);let d=e(r,i,a,o);return c.set(i,d),d}let l=c.get(i);if(l===void 0){let d=e(r,i,a,o);return c.set(i,d),d}return l}}function Yee(e){let t=new WeakMap;return function(r,i,a,o,c){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,a,o,c);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,a,o,c);return l.set(i,p),p}return d}}});var nO=w(tO=>{"use strict";m();T();N();Object.defineProperty(tO,"__esModule",{value:!0});tO.getDirectiveExtensions=zee;var qU=Oe(),Jee=eO(),Hee=Ou();function zee(e,t,n=["directives"]){var o;let r={};if(e.extensions){let c=e.extensions;for(let l of n)c=c==null?void 0:c[l];if(c!=null)for(let l in c){let d=c[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=(0,Hee.memoize1)(c=>JSON.stringify(c)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let c of a)if((o=c.directives)!=null&&o.length)for(let l of c.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=(0,Jee.getArgumentValues)(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,qU.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,qU.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}});var rO=w(ql=>{"use strict";m();T();N();Object.defineProperty(ql,"__esModule",{value:!0});ql.getDirectivesInExtensions=Wee;ql.getDirectiveInExtensions=Xee;ql.getDirectives=Zee;ql.getDirective=ete;var vT=nO();function Wee(e,t=["directives"]){let n=(0,vT.getDirectiveExtensions)(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}function Xee(e,t,n=["directives"]){return(0,vT.getDirectiveExtensions)(e,void 0,n)[t]}function Zee(e,t,n=["directives"]){let r=(0,vT.getDirectiveExtensions)(t,e,n);return Object.entries(r).map(([i,a])=>a==null?void 0:a.map(o=>({name:i,args:o}))).flat(1/0).filter(Boolean)}function ete(e,t,n,r=["directives"]){return(0,vT.getDirectiveExtensions)(t,e,r)[n]}});var aO=w(iO=>{"use strict";m();T();N();Object.defineProperty(iO,"__esModule",{value:!0});iO.getFieldsWithDirectives=nte;var tte=Oe();function nte(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(a=>r.includes(a.kind));for(let a of i){let o=a.name.value;if(a.fields!=null){for(let c of a.fields)if(c.directives&&c.directives.length>0){let l=c.name.value,d=`${o}.${l}`,p=c.directives.map(E=>({name:E.name.value,args:(E.arguments||[]).reduce((I,v)=>Q(M({},I),{[v.name.value]:(0,tte.valueFromASTUntyped)(v.value)}),{})}));n[d]=p}}}return n}});var VU=w(oO=>{"use strict";m();T();N();Object.defineProperty(oO,"__esModule",{value:!0});oO.getArgumentsWithDirectives=ite;var sO=Oe();function rte(e){return e.kind===sO.Kind.OBJECT_TYPE_DEFINITION||e.kind===sO.Kind.OBJECT_TYPE_EXTENSION}function ite(e){var r;let t={},n=e.definitions.filter(rte);for(let i of n)if(i.fields!=null)for(let a of i.fields){let o=(r=a.arguments)==null?void 0:r.filter(l=>{var d;return(d=l.directives)==null?void 0:d.length});if(!(o!=null&&o.length))continue;let c=t[`${i.name.value}.${a.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((E,I)=>Q(M({},E),{[I.name.value]:(0,sO.valueFromASTUntyped)(I.value)}),{})}));c[l.name.value]=d}}return t}});var cO=w(uO=>{"use strict";m();T();N();Object.defineProperty(uO,"__esModule",{value:!0});uO.getImplementingTypes=ate;function ate(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];"getInterfaces"in a&&a.getInterfaces().find(c=>c.name===e)&&r.push(a.name)}return r}});var OT=w(dO=>{"use strict";m();T();N();Object.defineProperty(dO,"__esModule",{value:!0});dO.astFromType=lO;var ste=Mf(),Ic=Oe();function lO(e){if((0,Ic.isNonNullType)(e)){let t=lO(e.ofType);if(t.kind===Ic.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,ste.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:Ic.Kind.NON_NULL_TYPE,type:t}}else if((0,Ic.isListType)(e))return{kind:Ic.Kind.LIST_TYPE,type:lO(e.ofType)};return{kind:Ic.Kind.NAMED_TYPE,name:{kind:Ic.Kind.NAME,value:e.name}}}});var qf=w(fO=>{"use strict";m();T();N();Object.defineProperty(fO,"__esModule",{value:!0});fO.astFromValueUntyped=ST;var Ja=Oe();function ST(e){if(e===null)return{kind:Ja.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=ST(n);r!=null&&t.push(r)}return{kind:Ja.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return ST(e.toJSON());let t=[];for(let n in e){let r=e[n],i=ST(r);i&&t.push({kind:Ja.Kind.OBJECT_FIELD,name:{kind:Ja.Kind.NAME,value:n},value:i})}return{kind:Ja.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:Ja.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:Ja.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return ote.test(t)?{kind:Ja.Kind.INT,value:t}:{kind:Ja.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:Ja.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var ote=/^-?(?:0|[1-9][0-9]*)$/});var KU=w(pO=>{"use strict";m();T();N();Object.defineProperty(pO,"__esModule",{value:!0});pO.astFromValue=Vf;var ute=Mf(),Ti=Oe(),cte=qf(),jU=gT();function Vf(e,t){if((0,Ti.isNonNullType)(t)){let n=Vf(e,t.ofType);return(n==null?void 0:n.kind)===Ti.Kind.NULL?null:n}if(e===null)return{kind:Ti.Kind.NULL};if(e===void 0)return null;if((0,Ti.isListType)(t)){let n=t.ofType;if((0,jU.isIterableObject)(e)){let r=[];for(let i of e){let a=Vf(i,n);a!=null&&r.push(a)}return{kind:Ti.Kind.LIST,values:r}}return Vf(e,n)}if((0,Ti.isInputObjectType)(t)){if(!(0,jU.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Vf(e[r.name],r.type);i&&n.push({kind:Ti.Kind.OBJECT_FIELD,name:{kind:Ti.Kind.NAME,value:r.name},value:i})}return{kind:Ti.Kind.OBJECT,fields:n}}if((0,Ti.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,Ti.isEnumType)(t)?{kind:Ti.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&<e.test(n)?{kind:Ti.Kind.INT,value:n}:(0,cte.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,ute.inspect)(t))}var lte=/^-?(?:0|[1-9][0-9]*)$/});var GU=w(mO=>{"use strict";m();T();N();Object.defineProperty(mO,"__esModule",{value:!0});mO.getDescriptionNode=fte;var dte=Oe();function fte(e){var t;if((t=e.astNode)!=null&&t.description)return Q(M({},e.astNode.description),{block:!0});if(e.description)return{kind:dte.Kind.STRING,value:e.description,block:!0}}});var jf=w(Ki=>{"use strict";m();T();N();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.getRootTypeMap=Ki.getRootTypes=Ki.getRootTypeNames=void 0;Ki.getDefinedRootType=mte;var pte=hT(),NO=Ou();function mte(e,t,n){let i=(0,Ki.getRootTypeMap)(e).get(t);if(i==null)throw(0,pte.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Ki.getRootTypeNames=(0,NO.memoize1)(function(t){let n=(0,Ki.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Ki.getRootTypes=(0,NO.memoize1)(function(t){let n=(0,Ki.getRootTypeMap)(t);return new Set(n.values())});Ki.getRootTypeMap=(0,NO.memoize1)(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n})});var IO=w(Xn=>{"use strict";m();T();N();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getDocumentNodeFromSchema=QU;Xn.printSchemaWithDirectives=hte;Xn.astFromSchema=YU;Xn.astFromDirective=JU;Xn.getDirectiveNodes=Na;Xn.astFromArg=EO;Xn.astFromObjectType=HU;Xn.astFromInterfaceType=zU;Xn.astFromUnionType=WU;Xn.astFromInputObjectType=XU;Xn.astFromEnumType=ZU;Xn.astFromScalarType=ek;Xn.astFromField=hO;Xn.astFromInputField=tk;Xn.astFromEnumValue=nk;Xn.makeDeprecatedDirective=rk;Xn.makeDirectiveNode=Vl;Xn.makeDirectiveNodes=yO;var Nt=Oe(),gc=OT(),TO=KU(),Nte=qf(),Gi=GU(),$U=rO(),Tte=xl(),Ete=jf();function QU(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=YU(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,Nt.isSpecifiedDirective)(c)||a.push(JU(c,e,n));for(let c in r){let l=r[c],d=(0,Nt.isSpecifiedScalarType)(l),p=(0,Nt.isIntrospectionType)(l);if(!(d||p))if((0,Nt.isObjectType)(l))a.push(HU(l,e,n));else if((0,Nt.isInterfaceType)(l))a.push(zU(l,e,n));else if((0,Nt.isUnionType)(l))a.push(WU(l,e,n));else if((0,Nt.isInputObjectType)(l))a.push(XU(l,e,n));else if((0,Nt.isEnumType)(l))a.push(ZU(l,e,n));else if((0,Nt.isScalarType)(l))a.push(ek(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Nt.Kind.DOCUMENT,definitions:a}}function hte(e,t={}){let n=QU(e,t);return(0,Nt.print)(n)}function YU(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=(0,Ete.getRootTypeMap)(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=(0,gc.astFromType)(E);p!=null?p.type=I:n.set(d,{kind:Nt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(Tte.isSome),o=Na(e,e,t);if(!a.length&&!o.length)return null;let c={kind:a.length?Nt.Kind.SCHEMA_DEFINITION:Nt.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Gi.getDescriptionNode)(e);return l&&(c.description=l),c}function JU(e,t,n){var r,i;return{kind:Nt.Kind.DIRECTIVE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>EO(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Nt.Kind.NAME,value:a})))||[]}}function Na(e,t,n){let r=[],i=(0,$U.getDirectivesInExtensions)(e,n),a;i!=null&&(a=yO(t,i));let o=null,c=null,l=null;if(a!=null&&(r=a.filter(d=>Nt.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),c=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=rk(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&c==null){let p={url:e.specifiedByUrl||e.specifiedByURL};c=Vl("specifiedBy",p)}return e.isOneOf&&l==null&&(l=Vl("oneOf")),o!=null&&r.push(o),c!=null&&r.push(c),l!=null&&r.push(l),r}function EO(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,gc.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,TO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:Na(e,t,n)}}function HU(e,t,n){return{kind:Nt.Kind.OBJECT_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>hO(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,gc.astFromType)(r)),directives:Na(e,t,n)}}function zU(e,t,n){let r={kind:Nt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>hO(i,t,n)),directives:Na(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,gc.astFromType)(i))),r}function WU(e,t,n){return{kind:Nt.Kind.UNION_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:Na(e,t,n),types:e.getTypes().map(r=>(0,gc.astFromType)(r))}}function XU(e,t,n){return{kind:Nt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>tk(r,t,n)),directives:Na(e,t,n)}}function ZU(e,t,n){return{kind:Nt.Kind.ENUM_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>nk(r,t,n)),directives:Na(e,t,n)}}function ek(e,t,n){let r=(0,$U.getDirectivesInExtensions)(e,n),i=yO(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(Vl("specifiedBy",o))}return{kind:Nt.Kind.SCALAR_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:i}}function hO(e,t,n){return{kind:Nt.Kind.FIELD_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:e.args.map(r=>EO(r,t,n)),type:(0,gc.astFromType)(e.type),directives:Na(e,t,n)}}function tk(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,gc.astFromType)(e.type),directives:Na(e,t,n),defaultValue:(r=(0,TO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}function nk(e,t,n){return{kind:Nt.Kind.ENUM_VALUE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:Na(e,t,n)}}function rk(e){return Vl("deprecated",{reason:e},Nt.GraphQLDeprecatedDirective)}function Vl(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let c=n.args.find(l=>l.name===i);c&&(o=(0,TO.astFromValue)(a,c.type))}o==null&&(o=(0,Nte.astFromValueUntyped)(a)),o!=null&&r.push({kind:Nt.Kind.ARGUMENT,name:{kind:Nt.Kind.NAME,value:i},value:o})}return{kind:Nt.Kind.DIRECTIVE,name:{kind:Nt.Kind.NAME,value:e},arguments:r}}function yO(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(Vl(r,i,a))}return n}});var ak=w(DT=>{"use strict";m();T();N();Object.defineProperty(DT,"__esModule",{value:!0});DT.validateGraphQlDocuments=yte;DT.createDefaultRules=ik;var Kf=Oe();function yte(e,t,n=ik()){var c;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Kf.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Kf.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Kf.validate)(e,a,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` - at ${(c=l.source)==null?void 0:c.name}:${d.line}:${d.column}`;return o}function ik(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Kf.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Kf.specifiedRules.filter(t=>!e.includes(t.name))}});var sk=w(gO=>{"use strict";m();T();N();Object.defineProperty(gO,"__esModule",{value:!0});gO.parseGraphQLJSON=vte;var Ite=Oe();function gte(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function _te(e){return JSON.parse(gte(e))}function vte(e,t,n){let r=_te(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Ite.buildClientSchema)(r,n);return{location:e,schema:i}}else if(typeof r=="string")return{location:e,rawSDL:r};throw new Error("Not valid JSON content")}});var vO=w($i=>{"use strict";m();T();N();Object.defineProperty($i,"__esModule",{value:!0});$i.resetComments=Ste;$i.collectComment=Dte;$i.pushComment=Gf;$i.printComment=dk;$i.printWithComments=Pte;$i.getDescription=wte;$i.getComment=_O;$i.getLeadingCommentBlock=fk;$i.dedentBlockStringValue=pk;$i.getBlockStringIndentation=mk;var lk=Oe(),Ote=80,jl={};function Ste(){jl={}}function Dte(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Gf(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Gf(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Gf(r,t,r.name.value),Fte(r)&&r.arguments)for(let i of r.arguments)Gf(i,t,r.name.value,i.name.value)}break}}function Gf(e,t,n,r){let i=_O(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");jl[o]||(jl[o]=[]),jl[o].push(i)}function dk(e){return` +`))}return Q(M({},e),{value:t,block:!0})}function NB(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function iT(e){let t=e.selections;return Q(M({},e),{selections:t.sort((n,r)=>{var a,o,c,l;return An.NAME in n?An.NAME in r?n.name.value.localeCompare(r.name.value):-1:An.NAME in r?1:((o=(a=n.typeCondition)==null?void 0:a.name.value)!=null?o:"").localeCompare((l=(c=r.typeCondition)==null?void 0:c.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case Mt.Kind.FIELD:return Q(M({},n),{arguments:NB(n),selectionSet:n.selectionSet?iT(n.selectionSet):n.selectionSet});case Mt.Kind.FRAGMENT_SPREAD:return n;case Mt.Kind.INLINE_FRAGMENT:return Q(M({},n),{selectionSet:iT(n.selectionSet)})}})})}function P7(e){return Q(M({},e),{definitions:e.definitions.map(t=>t.kind!==Mt.Kind.OPERATION_DEFINITION?t:Q(M({},t),{selectionSet:iT(t.selectionSet)}))})}function TB(e,t=!0){return(0,Mt.parse)(e,{noLocation:t})}function F7(e,t=!0){try{return{documentNode:TB(e,t)}}catch(n){return{error:n}}}});var yB=w(wl=>{"use strict";m();T();N();Object.defineProperty(wl,"__esModule",{value:!0});wl.AccumulatorMap=void 0;wl.mapValue=Fl;wl.extendSchemaImpl=w7;var Ue=Oe(),Rs=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};wl.AccumulatorMap=Rs;function Fl(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function w7(e,t,n){var De,Ie,Ce,St;let r=[],i=new Rs,a=new Rs,o=new Rs,c=new Rs,l=new Rs,d=new Rs,p=[],E,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Ue.Kind.SCHEMA_DEFINITION:E=Y;break;case Ue.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Ue.Kind.DIRECTIVE_DEFINITION:p.push(Y);break;case Ue.Kind.SCALAR_TYPE_DEFINITION:case Ue.Kind.OBJECT_TYPE_DEFINITION:case Ue.Kind.INTERFACE_TYPE_DEFINITION:case Ue.Kind.UNION_TYPE_DEFINITION:case Ue.Kind.ENUM_TYPE_DEFINITION:case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(Y);break;case Ue.Kind.SCALAR_TYPE_EXTENSION:i.add(Y.name.value,Y);break;case Ue.Kind.OBJECT_TYPE_EXTENSION:a.add(Y.name.value,Y);break;case Ue.Kind.INTERFACE_TYPE_EXTENSION:o.add(Y.name.value,Y);break;case Ue.Kind.UNION_TYPE_EXTENSION:c.add(Y.name.value,Y);break;case Ue.Kind.ENUM_TYPE_EXTENSION:l.add(Y.name.value,Y);break;case Ue.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(Y.name.value,Y);break;default:continue}v=!0}if(!v)return e;let A=new Map;for(let Y of e.types){let ie=ee(Y);ie&&A.set(Y.name,ie)}for(let Y of r){let ie=Y.name.value;A.set(ie,(De=EB.get(ie))!=null?De:ae(Y))}for(let[Y,ie]of a)A.set(Y,new Ue.GraphQLObjectType({name:Y,interfaces:()=>Ht(ie),fields:()=>Tn(ie),extensionASTNodes:ie}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,ie]of o)A.set(Y,new Ue.GraphQLInterfaceType({name:Y,interfaces:()=>Ht(ie),fields:()=>Tn(ie),extensionASTNodes:ie}));for(let[Y,ie]of l)A.set(Y,new Ue.GraphQLEnumType({name:Y,values:gn(ie),extensionASTNodes:ie}));for(let[Y,ie]of c)A.set(Y,new Ue.GraphQLUnionType({name:Y,types:()=>Ln(ie),extensionASTNodes:ie}));for(let[Y,ie]of i)A.set(Y,new Ue.GraphQLScalarType({name:Y,extensionASTNodes:ie}));for(let[Y,ie]of d)A.set(Y,new Ue.GraphQLInputObjectType({name:Y,fields:()=>lr(ie),extensionASTNodes:ie}))}let U=M(M({query:e.query&&$(e.query),mutation:e.mutation&&$(e.mutation),subscription:e.subscription&&$(e.subscription)},E&&rn([E])),rn(I));return Q(M({description:(Ce=(Ie=E==null?void 0:E.description)==null?void 0:Ie.value)!=null?Ce:e.description},U),{types:Array.from(A.values()),directives:[...e.directives.map(re),...p.map($t)],extensions:e.extensions,astNode:E!=null?E:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(St=n==null?void 0:n.assumeValid)!=null?St:!1});function j(Y){return(0,Ue.isListType)(Y)?new Ue.GraphQLList(j(Y.ofType)):(0,Ue.isNonNullType)(Y)?new Ue.GraphQLNonNull(j(Y.ofType)):$(Y)}function $(Y){return A.get(Y.name)}function re(Y){if((0,Ue.isSpecifiedDirective)(Y))return Y;let ie=Y.toConfig();return new Ue.GraphQLDirective(Q(M({},ie),{args:Fl(ie.args,vt)}))}function ee(Y){if((0,Ue.isIntrospectionType)(Y)||(0,Ue.isSpecifiedScalarType)(Y))return Y;if((0,Ue.isScalarType)(Y))return Ae(Y);if((0,Ue.isObjectType)(Y))return xe(Y);if((0,Ue.isInterfaceType)(Y))return Ze(Y);if((0,Ue.isUnionType)(Y))return Z(Y);if((0,Ue.isEnumType)(Y))return ue(Y);if((0,Ue.isInputObjectType)(Y))return me(Y)}function me(Y){var He;let ie=Y.toConfig(),qe=(He=d.get(ie.name))!=null?He:[];return new Ue.GraphQLInputObjectType(Q(M({},ie),{fields:()=>M(M({},Fl(ie.fields,Bt=>Q(M({},Bt),{type:j(Bt.type)}))),lr(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function ue(Y){var He;let ie=Y.toConfig(),qe=(He=l.get(Y.name))!=null?He:[];return new Ue.GraphQLEnumType(Q(M({},ie),{values:M(M({},ie.values),gn(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function Ae(Y){var Bt,it;let ie=Y.toConfig(),qe=(Bt=i.get(ie.name))!=null?Bt:[],He=ie.specifiedByURL;for(let Pt of qe)He=(it=hB(Pt))!=null?it:He;return new Ue.GraphQLScalarType(Q(M({},ie),{specifiedByURL:He,extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function xe(Y){var He;let ie=Y.toConfig(),qe=(He=a.get(ie.name))!=null?He:[];return new Ue.GraphQLObjectType(Q(M({},ie),{interfaces:()=>[...Y.getInterfaces().map($),...Ht(qe)],fields:()=>M(M({},Fl(ie.fields,_e)),Tn(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function Ze(Y){var He;let ie=Y.toConfig(),qe=(He=o.get(ie.name))!=null?He:[];return new Ue.GraphQLInterfaceType(Q(M({},ie),{interfaces:()=>[...Y.getInterfaces().map($),...Ht(qe)],fields:()=>M(M({},Fl(ie.fields,_e)),Tn(qe)),extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function Z(Y){var He;let ie=Y.toConfig(),qe=(He=c.get(ie.name))!=null?He:[];return new Ue.GraphQLUnionType(Q(M({},ie),{types:()=>[...Y.getTypes().map($),...Ln(qe)],extensionASTNodes:ie.extensionASTNodes.concat(qe)}))}function _e(Y){return Q(M({},Y),{type:j(Y.type),args:Y.args&&Fl(Y.args,vt)})}function vt(Y){return Q(M({},Y),{type:j(Y.type)})}function rn(Y){var qe;let ie={};for(let He of Y){let Bt=(qe=He.operationTypes)!=null?qe:[];for(let it of Bt)ie[it.operation]=an(it.type)}return ie}function an(Y){var He;let ie=Y.name.value,qe=(He=EB.get(ie))!=null?He:A.get(ie);if(qe===void 0)throw new Error(`Unknown type: "${ie}".`);return qe}function wn(Y){return Y.kind===Ue.Kind.LIST_TYPE?new Ue.GraphQLList(wn(Y.type)):Y.kind===Ue.Kind.NON_NULL_TYPE?new Ue.GraphQLNonNull(wn(Y.type)):an(Y)}function $t(Y){var ie;return new Ue.GraphQLDirective({name:Y.name.value,description:(ie=Y.description)==null?void 0:ie.value,locations:Y.locations.map(({value:qe})=>qe),isRepeatable:Y.repeatable,args:Ur(Y.arguments),astNode:Y})}function Tn(Y){var qe,He;let ie=Object.create(null);for(let Bt of Y){let it=(qe=Bt.fields)!=null?qe:[];for(let Pt of it)ie[Pt.name.value]={type:wn(Pt.type),description:(He=Pt.description)==null?void 0:He.value,args:Ur(Pt.arguments),deprecationReason:sT(Pt),astNode:Pt}}return ie}function Ur(Y){var He;let ie=Y!=null?Y:[],qe=Object.create(null);for(let Bt of ie){let it=wn(Bt.type);qe[Bt.name.value]={type:it,description:(He=Bt.description)==null?void 0:He.value,defaultValue:(0,Ue.valueFromAST)(Bt.defaultValue,it),deprecationReason:sT(Bt),astNode:Bt}}return qe}function lr(Y){var qe,He;let ie=Object.create(null);for(let Bt of Y){let it=(qe=Bt.fields)!=null?qe:[];for(let Pt of it){let us=wn(Pt.type);ie[Pt.name.value]={type:us,description:(He=Pt.description)==null?void 0:He.value,defaultValue:(0,Ue.valueFromAST)(Pt.defaultValue,us),deprecationReason:sT(Pt),astNode:Pt}}}return ie}function gn(Y){var qe,He;let ie=Object.create(null);for(let Bt of Y){let it=(qe=Bt.values)!=null?qe:[];for(let Pt of it)ie[Pt.name.value]={description:(He=Pt.description)==null?void 0:He.value,deprecationReason:sT(Pt),astNode:Pt}}return ie}function Ht(Y){return Y.flatMap(ie=>{var qe,He;return(He=(qe=ie.interfaces)==null?void 0:qe.map(an))!=null?He:[]})}function Ln(Y){return Y.flatMap(ie=>{var qe,He;return(He=(qe=ie.types)==null?void 0:qe.map(an))!=null?He:[]})}function ae(Y){var qe,He,Bt,it,Pt,us,Qr,cs,zc,Pa,yr,si;let ie=Y.name.value;switch(Y.kind){case Ue.Kind.OBJECT_TYPE_DEFINITION:{let xt=(qe=a.get(ie))!=null?qe:[],Ir=[Y,...xt];return a.delete(ie),new Ue.GraphQLObjectType({name:ie,description:(He=Y.description)==null?void 0:He.value,interfaces:()=>Ht(Ir),fields:()=>Tn(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.INTERFACE_TYPE_DEFINITION:{let xt=(Bt=o.get(ie))!=null?Bt:[],Ir=[Y,...xt];return o.delete(ie),new Ue.GraphQLInterfaceType({name:ie,description:(it=Y.description)==null?void 0:it.value,interfaces:()=>Ht(Ir),fields:()=>Tn(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.ENUM_TYPE_DEFINITION:{let xt=(Pt=l.get(ie))!=null?Pt:[],Ir=[Y,...xt];return l.delete(ie),new Ue.GraphQLEnumType({name:ie,description:(us=Y.description)==null?void 0:us.value,values:gn(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.UNION_TYPE_DEFINITION:{let xt=(Qr=c.get(ie))!=null?Qr:[],Ir=[Y,...xt];return c.delete(ie),new Ue.GraphQLUnionType({name:ie,description:(cs=Y.description)==null?void 0:cs.value,types:()=>Ln(Ir),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.SCALAR_TYPE_DEFINITION:{let xt=(zc=i.get(ie))!=null?zc:[];return i.delete(ie),new Ue.GraphQLScalarType({name:ie,description:(Pa=Y.description)==null?void 0:Pa.value,specifiedByURL:hB(Y),astNode:Y,extensionASTNodes:xt})}case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let xt=(yr=d.get(ie))!=null?yr:[],Ir=[Y,...xt];return d.delete(ie),new Ue.GraphQLInputObjectType({name:ie,description:(si=Y.description)==null?void 0:si.value,fields:()=>lr(Ir),astNode:Y,extensionASTNodes:xt})}}}}var EB=new Map([...Ue.specifiedScalarTypes,...Ue.introspectionTypes].map(e=>[e.name,e]));function sT(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function hB(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Bv=w(Cv=>{"use strict";m();T();N();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.buildASTSchema=B7;var IB=Oe(),L7=Al(),C7=yB();function B7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,L7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,C7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...IB.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new IB.GraphQLSchema(Q(M({},r),{directives:i}))}});var Ll=w(Iu=>{"use strict";m();T();N();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.MAX_INT32=Iu.MAX_SUBSCRIPTION_FILTER_DEPTH=Iu.MAXIMUM_TYPE_NESTING=void 0;Iu.MAXIMUM_TYPE_NESTING=30;Iu.MAX_SUBSCRIPTION_FILTER_DEPTH=5;Iu.MAX_INT32=cn(2,31)-1});var Fr=w(ur=>{"use strict";m();T();N();Object.defineProperty(ur,"__esModule",{value:!0});ur.getOrThrowError=k7;ur.getEntriesNotInHashSet=M7;ur.numberToOrdinal=x7;ur.addIterableToSet=q7;ur.addOptionalIterableToSet=V7;ur.addSets=j7;ur.kindToNodeType=K7;ur.getValueOrDefault=G7;ur.add=$7;ur.generateSimpleDirective=Q7;ur.generateRequiresScopesDirective=Y7;ur.generateSemanticNonNullDirective=J7;ur.copyObjectValueMap=H7;ur.addNewObjectValueMapEntries=z7;ur.copyArrayValueMap=W7;ur.addMapEntries=X7;ur.getFirstEntry=Z7;var Vt=Oe(),Nr=zn(),U7=qi(),Uf=Pr();function k7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,U7.invalidKeyFatalError)(t,n);return r}function M7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function x7(e){let t=e.toString();switch(t[t.length-1]){case"1":return`${t}st`;case"2":return`${t}nd`;case"3":return`${t}rd`;default:return`${t}th`}}function q7({source:e,target:t}){for(let n of e)t.add(n)}function V7({source:e,target:t}){if(e)for(let n of e)t.add(n)}function j7(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function K7(e){switch(e){case Vt.Kind.BOOLEAN:return Nr.BOOLEAN_SCALAR;case Vt.Kind.ENUM:case Vt.Kind.ENUM_TYPE_DEFINITION:return Nr.ENUM;case Vt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Vt.Kind.ENUM_VALUE_DEFINITION:return Nr.ENUM_VALUE;case Vt.Kind.FIELD_DEFINITION:return Nr.FIELD;case Vt.Kind.FLOAT:return Nr.FLOAT_SCALAR;case Vt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Nr.INPUT_OBJECT;case Vt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Vt.Kind.INPUT_VALUE_DEFINITION:return Nr.INPUT_VALUE;case Vt.Kind.INT:return Nr.INT_SCALAR;case Vt.Kind.INTERFACE_TYPE_DEFINITION:return Nr.INTERFACE;case Vt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Vt.Kind.NULL:return Nr.NULL;case Vt.Kind.OBJECT:case Vt.Kind.OBJECT_TYPE_DEFINITION:return Nr.OBJECT;case Vt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Vt.Kind.STRING:return Nr.STRING_SCALAR;case Vt.Kind.SCALAR_TYPE_DEFINITION:return Nr.SCALAR;case Vt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Vt.Kind.UNION_TYPE_DEFINITION:return Nr.UNION;case Vt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function G7(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function $7(e,t){return e.has(t)?!1:(e.add(t),!0)}function Q7(e){return{kind:Vt.Kind.DIRECTIVE,name:(0,Uf.stringToNameNode)(e)}}function Y7(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Vt.Kind.STRING,value:i});t.push({kind:Vt.Kind.LIST,values:r})}return{kind:Vt.Kind.DIRECTIVE,name:(0,Uf.stringToNameNode)(Nr.REQUIRES_SCOPES),arguments:[{kind:Vt.Kind.ARGUMENT,name:(0,Uf.stringToNameNode)(Nr.SCOPES),value:{kind:Vt.Kind.LIST,values:t}}]}}function J7(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Vt.Kind.INT,value:r.toString()});return{kind:Vt.Kind.DIRECTIVE,name:(0,Uf.stringToNameNode)(Nr.SEMANTIC_NON_NULL),arguments:[{kind:Vt.Kind.ARGUMENT,name:(0,Uf.stringToNameNode)(Nr.LEVELS),value:{kind:Vt.Kind.LIST,values:n}}]}}function H7(e){let t=new Map;for(let[n,r]of e)t.set(n,M({},r));return t}function z7(e,t){for(let[n,r]of e)t.set(n,M({},r))}function W7(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function X7({source:e,target:t}){for(let[n,r]of e)t.set(n,r)}function Z7(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var kf=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.ExtensionType=void 0;var gB;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(gB||(oT.ExtensionType=gB={}))});var gu=w(Lr=>{"use strict";m();T();N();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getMutableDirectiveDefinitionNode=tZ;Lr.getMutableEnumNode=nZ;Lr.getMutableEnumValueNode=rZ;Lr.getMutableFieldNode=iZ;Lr.getMutableInputObjectNode=aZ;Lr.getMutableInputValueNode=sZ;Lr.getMutableInterfaceNode=oZ;Lr.getMutableObjectNode=uZ;Lr.getMutableObjectExtensionNode=cZ;Lr.getMutableScalarNode=lZ;Lr.getMutableTypeNode=Uv;Lr.getMutableUnionNode=dZ;Lr.getTypeNodeNamedTypeName=kv;Lr.getNamedTypeNode=vB;var wr=Oe(),Cl=Pr(),_B=qi(),eZ=Ll();function tZ(e){return{arguments:[],kind:e.kind,locations:[],name:M({},e.name),repeatable:e.repeatable,description:(0,Cl.formatDescription)(e.description)}}function nZ(e){return{kind:wr.Kind.ENUM_TYPE_DEFINITION,name:M({},e)}}function rZ(e){return{directives:[],kind:e.kind,name:M({},e.name),description:(0,Cl.formatDescription)(e.description)}}function iZ(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:M({},e.name),type:Uv(e.type,t,n),description:(0,Cl.formatDescription)(e.description)}}function aZ(e){return{kind:wr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:M({},e)}}function sZ(e,t,n){return{directives:[],kind:e.kind,name:M({},e.name),type:Uv(e.type,t,n),defaultValue:e.defaultValue,description:(0,Cl.formatDescription)(e.description)}}function oZ(e){return{kind:wr.Kind.INTERFACE_TYPE_DEFINITION,name:M({},e)}}function uZ(e){return{kind:wr.Kind.OBJECT_TYPE_DEFINITION,name:M({},e)}}function cZ(e){let t=e.kind===wr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:wr.Kind.OBJECT_TYPE_EXTENSION,name:M({},e.name),description:(0,Cl.formatDescription)(t)}}function lZ(e){return{kind:wr.Kind.SCALAR_TYPE_DEFINITION,name:M({},e)}}function Uv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(Bl,"__esModule",{value:!0});Bl.REQUIRED_FIELDSET_TYPE_NODE=Bl.REQUIRED_STRING_TYPE_NODE=void 0;var OB=Oe(),SB=Pr(),DB=zn();Bl.REQUIRED_STRING_TYPE_NODE={kind:OB.Kind.NON_NULL_TYPE,type:(0,SB.stringToNamedTypeNode)(DB.STRING_SCALAR)};Bl.REQUIRED_FIELDSET_TYPE_NODE={kind:OB.Kind.NON_NULL_TYPE,type:(0,SB.stringToNamedTypeNode)(DB.FIELD_SET_SCALAR)}});var Mf=w(Ke=>{"use strict";m();T();N();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.TAG_DEFINITION=Ke.SUBSCRIPTION_FILTER_DEFINITION=Ke.SPECIFIED_BY_DEFINITION=Ke.SHAREABLE_DEFINITION=Ke.SEMANTIC_NON_NULL_DEFINITION=Ke.REQUIRES_SCOPES_DEFINITION=Ke.REQUIRES_DEFINITION=Ke.REQUIRE_FETCH_REASONS_DEFINITION=Ke.PROVIDES_DEFINITION=Ke.OVERRIDE_DEFINITION=Ke.ONE_OF_DEFINITION=Ke.LINK_DEFINITION=Ke.KEY_DEFINITION=Ke.INTERFACE_OBJECT_DEFINITION=Ke.INACCESSIBLE_DEFINITION=Ke.EDFS_REDIS_SUBSCRIBE_DEFINITION=Ke.EDFS_REDIS_PUBLISH_DEFINITION=Ke.EDFS_NATS_SUBSCRIBE_DEFINITION=Ke.EDFS_NATS_REQUEST_DEFINITION=Ke.EDFS_NATS_PUBLISH_DEFINITION=Ke.EDFS_KAFKA_SUBSCRIBE_DEFINITION=Ke.EDFS_KAFKA_PUBLISH_DEFINITION=Ke.EXTERNAL_DEFINITION=Ke.EXTENDS_DEFINITION=Ke.DEPRECATED_DEFINITION=Ke.CONNECT_FIELD_RESOLVER_DEFINITION=Ke.CONFIGURE_DESCRIPTION_DEFINITION=Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=Ke.COMPOSE_DIRECTIVE_DEFINITION=Ke.AUTHENTICATED_DEFINITION=void 0;var Ee=Oe(),pe=Pr(),H=zn(),_r=uT();Ke.AUTHENTICATED_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.AUTHENTICATED),repeatable:!1};Ke.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.NAME),type:_r.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,pe.stringToNameNode)(H.COMPOSE_DIRECTIVE),repeatable:!0};Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};Ke.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}},{directives:[],kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.DESCRIPTION_OVERRIDE),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.INPUT_OBJECT_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.SCHEMA_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.CONFIGURE_DESCRIPTION),repeatable:!1};Ke.CONNECT_FIELD_RESOLVER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CONTEXT),type:_r.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.CONNECT_FIELD_RESOLVER),repeatable:!1};Ke.DEPRECATED_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.REASON),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR),defaultValue:{kind:Ee.Kind.STRING,value:Ee.DEFAULT_DEPRECATION_REASON}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.DEPRECATED),repeatable:!1};Ke.EXTENDS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.EXTENDS),repeatable:!1};Ke.EXTERNAL_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.EXTERNAL),repeatable:!1};Ke.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.TOPIC),type:_r.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_KAFKA_PUBLISH),repeatable:!1};Ke.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.TOPICS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:_r.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};Ke.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECT),type:_r.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_PUBLISH),repeatable:!1};Ke.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECT),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_REQUEST),repeatable:!1};Ke.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECTS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:_r.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.STREAM_CONFIGURATION),type:(0,pe.stringToNamedTypeNode)(H.EDFS_NATS_STREAM_CONFIGURATION)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_SUBSCRIBE),repeatable:!1};Ke.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CHANNEL),type:_r.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_REDIS_PUBLISH),repeatable:!1};Ke.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CHANNELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:_r.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:_r.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_REDIS_SUBSCRIBE),repeatable:!1};Ke.INACCESSIBLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.INACCESSIBLE),repeatable:!1};Ke.INTERFACE_OBJECT_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.INTERFACE_OBJECT),repeatable:!1};Ke.KEY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:_r.REQUIRED_FIELDSET_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.RESOLVABLE),type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR),defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.KEY),repeatable:!0};Ke.LINK_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.URL_LOWER),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.AS),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FOR),type:(0,pe.stringToNamedTypeNode)(H.LINK_PURPOSE)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.IMPORT),type:{kind:Ee.Kind.LIST_TYPE,type:(0,pe.stringToNamedTypeNode)(H.LINK_IMPORT)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,pe.stringToNameNode)(H.LINK),repeatable:!0};Ke.ONE_OF_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INPUT_OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.ONE_OF),repeatable:!1};Ke.OVERRIDE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FROM),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.OVERRIDE),repeatable:!1};Ke.PROVIDES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:_r.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.PROVIDES),repeatable:!1};Ke.REQUIRE_FETCH_REASONS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.REQUIRE_FETCH_REASONS),repeatable:!0};Ke.REQUIRES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:_r.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.REQUIRES),repeatable:!1};Ke.REQUIRES_SCOPES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SCOPES),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.SCOPE_SCALAR)}}}}}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.REQUIRES_SCOPES),repeatable:!1};Ke.SEMANTIC_NON_NULL_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.LEVELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.INT_SCALAR)}}},defaultValue:{kind:Ee.Kind.LIST,values:[{kind:Ee.Kind.INT,value:"0"}]}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.SEMANTIC_NON_NULL),repeatable:!1};Ke.SHAREABLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.SHAREABLE),repeatable:!0};Ke.SPECIFIED_BY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.URL_LOWER),type:_r.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.SPECIFIED_BY),repeatable:!1};Ke.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CONDITION),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.SUBSCRIPTION_FILTER_CONDITION)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.SUBSCRIPTION_FILTER),repeatable:!1};Ke.TAG_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.NAME),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.TAG),repeatable:!0}});var _u=w(Vi=>{"use strict";m();T();N();Object.defineProperty(Vi,"__esModule",{value:!0});Vi.MAX_OR_SCOPES=Vi.EDFS_ARGS_REGEXP=Vi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=Vi.BASE_SCALARS=Vi.DIRECTIVE_DEFINITION_BY_NAME=void 0;var ut=zn(),Ot=Mf();Vi.DIRECTIVE_DEFINITION_BY_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.CONFIGURE_DESCRIPTION,Ot.CONFIGURE_DESCRIPTION_DEFINITION],[ut.CONFIGURE_CHILD_DESCRIPTIONS,Ot.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION],[ut.CONNECT_FIELD_RESOLVER,Ot.CONNECT_FIELD_RESOLVER_DEFINITION],[ut.DEPRECATED,Ot.DEPRECATED_DEFINITION],[ut.EDFS_KAFKA_PUBLISH,Ot.EDFS_KAFKA_PUBLISH_DEFINITION],[ut.EDFS_KAFKA_SUBSCRIBE,Ot.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[ut.EDFS_NATS_PUBLISH,Ot.EDFS_NATS_PUBLISH_DEFINITION],[ut.EDFS_NATS_REQUEST,Ot.EDFS_NATS_REQUEST_DEFINITION],[ut.EDFS_NATS_SUBSCRIBE,Ot.EDFS_NATS_SUBSCRIBE_DEFINITION],[ut.EDFS_REDIS_PUBLISH,Ot.EDFS_REDIS_PUBLISH_DEFINITION],[ut.EDFS_REDIS_SUBSCRIBE,Ot.EDFS_REDIS_SUBSCRIBE_DEFINITION],[ut.EXTENDS,Ot.EXTENDS_DEFINITION],[ut.EXTERNAL,Ot.EXTERNAL_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.KEY,Ot.KEY_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.ONE_OF,Ot.ONE_OF_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.PROVIDES,Ot.PROVIDES_DEFINITION],[ut.REQUIRE_FETCH_REASONS,Ot.REQUIRE_FETCH_REASONS_DEFINITION],[ut.REQUIRES,Ot.REQUIRES_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SEMANTIC_NON_NULL,Ot.SEMANTIC_NON_NULL_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION],[ut.SPECIFIED_BY,Ot.SPECIFIED_BY_DEFINITION],[ut.SUBSCRIPTION_FILTER,Ot.SUBSCRIPTION_FILTER_DEFINITION],[ut.TAG,Ot.TAG_DEFINITION]]);Vi.BASE_SCALARS=new Set(["_Any","_Entities",ut.BOOLEAN_SCALAR,ut.FLOAT_SCALAR,ut.ID_SCALAR,ut.INT_SCALAR,ut.FIELD_SET_SCALAR,ut.SCOPE_SCALAR,ut.STRING_SCALAR]);Vi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION]]);Vi.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;Vi.MAX_OR_SCOPES=16});var cT=w(Ec=>{"use strict";m();T();N();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.newParentTagData=TZ;Ec.newChildTagData=EZ;Ec.validateImplicitFieldSets=hZ;Ec.newContractTagOptionsFromArrays=yZ;Ec.getDescriptionFromString=IZ;var ei=Oe(),fZ=gu(),pZ=_u(),mZ=Pr(),bB=Fr(),NZ=zn();function TZ(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function EZ(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function hZ({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let c=(0,bB.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(c.has(l))continue;let p=[i],E=[],I=[],v=-1,A=!0,U=!0;(0,ei.visit)(d,{Argument:{enter(){return U=!1,ei.BREAK}},Field:{enter(j){let $=p[v];if(A)return U=!1,ei.BREAK;let re=j.name.value;if(re===NZ.TYPENAME)return;let ee=$.fieldDataByName.get(re);if(!ee||ee.argumentDataByName.size||E[v].has(re))return U=!1,ei.BREAK;let{isUnconditionallyProvided:me}=(0,bB.getOrThrowError)(ee.externalFieldDataBySubgraphName,t,`${ee.originalParentTypeName}.${re}.externalFieldDataBySubgraphName`),ue=e.get(`${ee.renamedParentTypeName}.${re}`);if(ue){if(ue.providedBy.length>0)I.push(...ue.providedBy);else if(ue.requiredBy.length>0)return U=!1,ei.BREAK}else if(!me)return U=!1,ei.BREAK;E[v].add(re);let Ae=(0,fZ.getTypeNodeNamedTypeName)(ee.node.type);if(pZ.BASE_SCALARS.has(Ae))return;let xe=a.get(Ae);if(!xe)return U=!1,ei.BREAK;if(xe.kind===ei.Kind.OBJECT_TYPE_DEFINITION){A=!0,p.push(xe);return}if((0,mZ.isKindAbstract)(xe.kind))return U=!1,ei.BREAK}},InlineFragment:{enter(){return U=!1,ei.BREAK}},SelectionSet:{enter(){if(!A||(v+=1,A=!1,v<0||v>=p.length))return U=!1,ei.BREAK;E.push(new Set)},leave(){if(A)return U=!1,ei.BREAK;v-=1,p.pop(),E.pop()}}}),U&&(r.push(Q(M({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function yZ(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function IZ(e){if(e)return{block:!0,kind:ei.Kind.STRING,value:e}}});var kl=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=vZ;mt.isNodeExternalOrShareable=OZ;mt.isTypeRequired=SZ;mt.areDefaultValuesCompatible=RB;mt.compareAndValidateInputValueDefaultValues=DZ;mt.setMutualExecutableLocations=bZ;mt.isTypeNameRootType=AZ;mt.getRenamedRootTypeName=RZ;mt.childMapToValueArray=FZ;mt.setLongestDescription=wZ;mt.isParentDataRootType=PB;mt.isInterfaceDefinitionData=LZ;mt.setParentDataExtensionType=CZ;mt.upsertDeprecatedDirective=BZ;mt.upsertTagDirectives=UZ;mt.propagateAuthDirectives=kZ;mt.propagateFieldAuthDirectives=MZ;mt.generateDeprecatedDirective=Vv;mt.getClientPersistedDirectiveNodes=xv;mt.getClientSchemaFieldNodeByFieldData=VZ;mt.getNodeWithPersistedDirectivesByInputValueData=FB;mt.addValidPersistedDirectiveDefinitionNodeByData=KZ;mt.newInvalidFieldNames=GZ;mt.validateExternalAndShareable=$Z;mt.isTypeValidImplementation=lT;mt.isNodeDataInaccessible=wB;mt.isLeafKind=QZ;mt.getSubscriptionFilterValue=YZ;mt.getParentTypeName=JZ;mt.newConditionalFieldData=HZ;mt.getDefinitionDataCoords=zZ;mt.isParentDataCompositeOutputType=WZ;mt.newExternalFieldData=XZ;mt.getInitialFederatedDescription=ZZ;mt.areKindsEqual=eee;mt.isFieldData=jv;mt.isInputObjectDefinitionData=tee;mt.isInputNodeKind=nee;mt.isOutputNodeKind=ree;var rt=Oe(),Mv=kf(),Ul=Pr(),qv=qi(),jt=zn(),hc=Fr(),gZ=cT(),_Z=Oe();function vZ(){return{deprecatedReason:"",directivesByName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function OZ(e,t,n){var i;let r={isExternal:n.has(jt.EXTERNAL),isShareable:t||n.has(jt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===jt.EXTERNAL){r.isExternal=!0;continue}o===jt.SHAREABLE&&(r.isShareable=!0)}return r}function SZ(e){return e.kind===rt.Kind.NON_NULL_TYPE}function RB(e,t){switch(e.kind){case rt.Kind.LIST_TYPE:return t.kind===rt.Kind.LIST||t.kind===rt.Kind.NULL;case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NULL)return!0;switch(e.name.value){case jt.BOOLEAN_SCALAR:return t.kind===rt.Kind.BOOLEAN;case jt.FLOAT_SCALAR:return t.kind===rt.Kind.INT||t.kind===rt.Kind.FLOAT;case jt.INT_SCALAR:return t.kind===rt.Kind.INT;case jt.STRING_SCALAR:return t.kind===rt.Kind.STRING;default:return!0}case rt.Kind.NON_NULL_TYPE:return t.kind===rt.Kind.NULL?!1:RB(e.type,t)}}function DZ(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,rt.print)(e.defaultValue),i=(0,rt.print)(t.defaultValue);if(r!==i){n.push((0,qv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?jt.ARGUMENT:jt.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function bZ(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function AZ(e,t){return jt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function RZ(e,t){let n=t.get(e);if(!n)return e;switch(n){case rt.OperationTypeNode.MUTATION:return jt.MUTATION;case rt.OperationTypeNode.SUBSCRIPTION:return jt.SUBSCRIPTION;default:return jt.QUERY}}function PZ(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function FZ(e){var n;let t=[];for(let r of e.values()){jv(r)&&PZ(r);for(let[i,a]of r.directivesByName){if(i===jt.DEPRECATED){let o=a[0];if(!o)continue;if((n=o.arguments)!=null&&n.length){r.node.directives.push(o);continue}r.node.directives.push(Q(M({},o),{arguments:[{kind:rt.Kind.ARGUMENT,value:{kind:rt.Kind.STRING,value:_Z.DEFAULT_DEPRECATION_REASON},name:(0,Ul.stringToNameNode)(jt.REASON)}]}));continue}r.node.directives.push(...a)}t.push(r.node)}return t}function wZ(e,t){if(t.description){if("configureDescriptionDataBySubgraphName"in t){for(let{propagate:n}of t.configureDescriptionDataBySubgraphName.values())if(!n)return}(!e.description||e.description.value.length0&&e.persistedDirectivesData.directivesByName.set(jt.REQUIRES_SCOPES,[(0,hc.generateRequiresScopesDirective)(t.requiredScopes)]))}function MZ(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByName.set(jt.AUTHENTICATED,[(0,hc.generateSimpleDirective)(jt.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByName.set(jt.REQUIRES_SCOPES,[(0,hc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Vv(e){return{kind:rt.Kind.DIRECTIVE,name:(0,Ul.stringToNameNode)(jt.DEPRECATED),arguments:[{kind:rt.Kind.ARGUMENT,name:(0,Ul.stringToNameNode)(jt.REASON),value:{kind:rt.Kind.STRING,value:e||jt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function xZ(e,t,n,r){let i=[];for(let[a,o]of e){let c=t.get(a);if(c){if(o.length<2){i.push(...o);continue}if(!c.repeatable){r.push((0,qv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function qZ(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Vv(e.persistedDirectivesData.deprecatedReason)),r.push(...xZ(e.persistedDirectivesData.directivesByName,t,e.name,n)),r}function xv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Vv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByName){if(r===jt.SEMANTIC_NON_NULL&&jv(e)){t.push((0,hc.generateSemanticNonNullDirective)((n=(0,hc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}jt.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function VZ(e){let t=xv(e),n=[];for(let r of e.argumentDataByName.values())wB(r)||n.push(Q(M({},r.node),{directives:xv(r)}));return Q(M({},e.node),{directives:t,arguments:n})}function FB(e,t,n){return e.node.name=(0,Ul.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=qZ(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function jZ(e,t,n,r,i){let a=[];for(let[o,c]of t.argumentDataByName){let l=(0,hc.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames);if(l.length>0){c.requiredSubgraphNames.size>0&&a.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...c.requiredSubgraphNames]});continue}e.push(FB(c,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,qv.invalidRequiredInputValueError)(jt.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function KZ(e,t,n,r){let i=[];jZ(i,t,n,r)&&e.push({arguments:i,kind:rt.Kind.DIRECTIVE_DEFINITION,locations:(0,Ul.setToNameNodeArray)(t.executableLocations),name:(0,Ul.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function GZ(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function $Z(e,t){let n=e.isShareableBySubgraphName.size,r=new Array,i=0;for(let[a,o]of e.isShareableBySubgraphName){let c=e.externalFieldDataBySubgraphName.get(a);if(c&&!c.isUnconditionallyProvided){r.push(a);continue}o||(i+=1)}switch(i){case 0:n===r.length&&t.subgraphNamesByExternalFieldName.set(e.name,r);return;case 1:if(n===1)return;n-r.length!==1&&t.byShareable.add(e.name);return;default:t.byShareable.add(e.name)}}var AB;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(AB||(mt.MergeMethod=AB={}));function lT(e,t,n){if(e.kind===rt.Kind.NON_NULL_TYPE)return t.kind!==rt.Kind.NON_NULL_TYPE?!1:lT(e.type,t.type,n);if(t.kind===rt.Kind.NON_NULL_TYPE)return lT(e,t.type,n);switch(e.kind){case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let a=n.get(r);return a?a.has(i):!1}return!1;default:return t.kind===rt.Kind.LIST_TYPE?lT(e.type,t.type,n):!1}}function wB(e){return e.persistedDirectivesData.directivesByName.has(jt.INACCESSIBLE)||e.directivesByName.has(jt.INACCESSIBLE)}function QZ(e){return e===rt.Kind.SCALAR_TYPE_DEFINITION||e===rt.Kind.ENUM_TYPE_DEFINITION}function YZ(e){switch(e.kind){case rt.Kind.BOOLEAN:return e.value;case rt.Kind.ENUM:case rt.Kind.STRING:return e.value;case rt.Kind.FLOAT:case rt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case rt.Kind.NULL:return null}}function JZ(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function HZ(){return{providedBy:[],requiredBy:[]}}function zZ(e,t){switch(e.kind){case rt.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case rt.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case rt.Kind.ARGUMENT:case rt.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case rt.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function WZ(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION||e.kind===rt.Kind.INTERFACE_TYPE_DEFINITION}function XZ(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function ZZ(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,gZ.getDescriptionFromString)(t.description)||e.description}function eee(e,t){return e.kind===t.kind}function jv(e){return e.kind===rt.Kind.FIELD_DEFINITION}function tee(e){return e.kind===rt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function nee(e){return jt.INPUT_NODE_KINDS.has(e)}function ree(e){return jt.OUTPUT_NODE_KINDS.has(e)}});var $v={};Cm($v,{__addDisposableResource:()=>ZB,__assign:()=>dT,__asyncDelegator:()=>$B,__asyncGenerator:()=>GB,__asyncValues:()=>QB,__await:()=>Ml,__awaiter:()=>MB,__classPrivateFieldGet:()=>zB,__classPrivateFieldIn:()=>XB,__classPrivateFieldSet:()=>WB,__createBinding:()=>pT,__decorate:()=>BB,__disposeResources:()=>eU,__esDecorate:()=>iee,__exportStar:()=>qB,__extends:()=>LB,__generator:()=>xB,__importDefault:()=>HB,__importStar:()=>JB,__makeTemplateObject:()=>YB,__metadata:()=>kB,__param:()=>UB,__propKey:()=>see,__read:()=>Gv,__rest:()=>CB,__runInitializers:()=>aee,__setFunctionName:()=>oee,__spread:()=>VB,__spreadArray:()=>KB,__spreadArrays:()=>jB,__values:()=>fT,default:()=>lee});function LB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Kv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function CB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function UB(e,t){return function(n,r){t(n,r,e)}}function iee(e,t,n,r,i,a){function o($){if($!==void 0&&typeof $!="function")throw new TypeError("Function expected");return $}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function($){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o($||null))};var j=(0,n[v])(c==="accessor"?{get:p.get,set:p.set}:p[l],A);if(c==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(c==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function aee(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function VB(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(A){E(a[0][3],A)}}function l(I){I.value instanceof Ml?Promise.resolve(I.value.v).then(d,p):E(a[0][2],I)}function d(I){c("next",I)}function p(I){c("throw",I)}function E(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function $B(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Ml(e[i](o)),done:!1}:a?a(o):o}:a}}function QB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof fT=="function"?fT(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(c,l){o=e[a](o),i(c,l,o.done,o.value)})}}function i(a,o,c,l){Promise.resolve(l).then(function(d){a({value:d,done:c})},o)}}function YB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function JB(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&pT(t,e,n);return uee(t,e),t}function HB(e){return e&&e.__esModule?e:{default:e}}function zB(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function WB(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function XB(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function ZB(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function eU(e){function t(r){e.error=e.hasError?new cee(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var Kv,dT,pT,uee,cee,lee,Qv=Yu(()=>{"use strict";m();T();N();Kv=function(e,t){return Kv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Kv(e,t)};dT=function(){return dT=Object.assign||function(t){for(var n,r=1,i=arguments.length;rSU,__assign:()=>mT,__asyncDelegator:()=>EU,__asyncGenerator:()=>TU,__asyncValues:()=>hU,__await:()=>xl,__awaiter:()=>lU,__classPrivateFieldGet:()=>_U,__classPrivateFieldIn:()=>OU,__classPrivateFieldSet:()=>vU,__createBinding:()=>TT,__decorate:()=>rU,__disposeResources:()=>DU,__esDecorate:()=>aU,__exportStar:()=>fU,__extends:()=>tU,__generator:()=>dU,__importDefault:()=>gU,__importStar:()=>IU,__makeTemplateObject:()=>yU,__metadata:()=>cU,__param:()=>iU,__propKey:()=>oU,__read:()=>Hv,__rest:()=>nU,__rewriteRelativeImportExtension:()=>bU,__runInitializers:()=>sU,__setFunctionName:()=>uU,__spread:()=>pU,__spreadArray:()=>NU,__spreadArrays:()=>mU,__values:()=>NT,default:()=>pee});function tU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function nU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function iU(e,t){return function(n,r){t(n,r,e)}}function aU(e,t,n,r,i,a){function o($){if($!==void 0&&typeof $!="function")throw new TypeError("Function expected");return $}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function($){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o($||null))};var j=(0,n[v])(c==="accessor"?{get:p.get,set:p.set}:p[l],A);if(c==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(c==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function sU(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Hv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function pU(){for(var e=[],t=0;t1||l(v,U)})},A&&(i[v]=A(i[v])))}function l(v,A){try{d(r[v](A))}catch(U){I(a[0][3],U)}}function d(v){v.value instanceof xl?Promise.resolve(v.value.v).then(p,E):I(a[0][2],v)}function p(v){l("next",v)}function E(v){l("throw",v)}function I(v,A){v(A),a.shift(),a.length&&l(a[0][0],a[0][1])}}function EU(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:xl(e[i](o)),done:!1}:a?a(o):o}:a}}function hU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof NT=="function"?NT(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(c,l){o=e[a](o),i(c,l,o.done,o.value)})}}function i(a,o,c,l){Promise.resolve(l).then(function(d){a({value:d,done:c})},o)}}function yU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function IU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=Jv(e),r=0;r{"use strict";m();T();N();Yv=function(e,t){return Yv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Yv(e,t)};mT=function(){return mT=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var ql=w(ji=>{"use strict";m();T();N();Object.defineProperty(ji,"__esModule",{value:!0});ji.asArray=void 0;ji.isUrl=FU;ji.isDocumentString=hee;ji.isValidPath=Iee;ji.compareStrings=wU;ji.nodeToString=zv;ji.compareNodes=gee;ji.isSome=_ee;ji.assertSome=vee;var mee=Oe(),Nee=/^(https?|wss?|file):\/\//;function FU(e){if(typeof e!="string"||!Nee.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch(t){return!1}}var Tee=e=>Array.isArray(e)?e:e?[e]:[];ji.asArray=Tee;var Eee=/\.[a-z0-9]+$/i;function hee(e){if(typeof e!="string"||Eee.test(e)||FU(e))return!1;try{return(0,mee.parse)(e),!0}catch(t){if(!t.message.includes("EOF")&&e.replace(/(\#[^*]*)/g,"").trim()!==""&&e.includes(" "))throw new Error(`Failed to parse the GraphQL document. ${t.message} +${e}`)}return!1}var yee=/[‘“!%^<>`\n]/;function Iee(e){return typeof e=="string"&&!yee.test(e)}function wU(e,t){return String(e)String(t)?1:0}function zv(e){var n,r;let t;return"alias"in e&&(t=(n=e.alias)==null?void 0:n.value),t==null&&"name"in e&&(t=(r=e.name)==null?void 0:r.value),t==null&&(t=e.kind),t}function gee(e,t,n){let r=zv(e),i=zv(t);return typeof n=="function"?n(r,i):wU(r,i)}function _ee(e){return e!=null}function vee(e,t="Value should be something"){if(e==null)throw new Error(t)}});var xf=w(hT=>{"use strict";m();T();N();Object.defineProperty(hT,"__esModule",{value:!0});hT.inspect=void 0;var BU=3;function Oee(e){return ET(e,[])}hT.inspect=Oee;function ET(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return See(e,t);default:return String(e)}}function LU(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function See(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?LU(e)+` +`+CU(e.errors,t):LU(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Dee(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:ET(r,n)}else if(Array.isArray(e))return CU(e,n);return bee(e,n)}function Dee(e){return typeof e.toJSON=="function"}function bee(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>BU?"["+Aee(e)+"]":"{ "+n.map(([i,a])=>i+": "+ET(a,t)).join(", ")+" }"}function CU(e,t){if(e.length===0)return"[]";if(t.length>BU)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(yT,"__esModule",{value:!0});yT.createGraphQLError=Xv;yT.relocatedError=Fee;var Wv=Oe(),Ree=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function Pee(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Ree.includes(t))}function Xv(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Pee(t.originalError)&&(t.originalError=Xv(t.originalError.message,t.originalError)),Wv.versionInfo.major>=17?new Wv.GraphQLError(e,t):new Wv.GraphQLError(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function Fee(e,t){return Xv(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}});var qf=w(ti=>{"use strict";m();T();N();Object.defineProperty(ti,"__esModule",{value:!0});ti.isPromise=gT;ti.isActualPromise=kU;ti.handleMaybePromise=vu;ti.fakePromise=Ya;ti.createDeferredPromise=wee;ti.iterateAsync=MU;ti.iterateAsyncVoid=MU;ti.fakeRejectPromise=yc;ti.mapMaybePromise=Lee;ti.mapAsyncIterator=Cee;ti.promiseLikeFinally=xU;ti.unfakePromise=qU;var _T=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function gT(e){return(e==null?void 0:e.then)!=null}function kU(e){let t=e;return t&&t.then&&t.catch&&t.finally}function vu(e,t,n,r){let i=Ya().then(e).then(t,n);return r&&(i=i.finally(r)),qU(i)}function Ya(e){return e&&kU(e)?e:gT(e)?{then:(t,n)=>Ya(e.then(t,n)),catch:t=>Ya(e.then(n=>n,t)),finally:t=>Ya(t?xU(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return Ya(t(e))}catch(n){return yc(n)}return this},catch(){return this},finally(t){if(t)try{return Ya(t()).then(()=>e,()=>e)}catch(n){return yc(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[_T]:"resolved"}}function wee(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,a){e=i,t=a}),get resolve(){return e},get reject(){return t}}}function MU(e,t,n){if((e==null?void 0:e.length)===0)return;let r=e[Symbol.iterator](),i=0;function a(){let{done:o,value:c}=r.next();if(o)return;let l=!1;function d(){l=!0}return vu(function(){return t(c,d,i++)},function(E){if(E&&(n==null||n.push(E)),!l)return a()})}return a()}function yc(e){return{then(t,n){if(n)try{return Ya(n(e))}catch(r){return yc(r)}return this},catch(t){if(t)try{return Ya(t(e))}catch(n){return yc(n)}return this},finally(t){if(t)try{t()}catch(n){return yc(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[_T]:"rejected"}}function Lee(e,t,n){return vu(()=>e,t,n)}function Cee(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,a,o;if(r){let d;o=p=>(d||(d=vu(r,()=>p,()=>p)),d)}typeof e.return=="function"&&(i=e.return,a=d=>{let p=()=>{throw d};return i.call(e).then(p,p)});function c(d){return d.done?o?o(d):d:vu(()=>d.value,p=>vu(()=>t(p),UU,a))}let l;if(n){let d,p=n;l=E=>(d||(d=vu(()=>E,I=>vu(()=>p(I),UU,a))),d)}return{next(){return e.next().then(c,l)},return(){let d=i?i.call(e).then(c,l):Ya({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(c,l):a?a(d):yc(d)},[Symbol.asyncIterator](){return this}}}function UU(e){return{value:e,done:!1}}function Bee(e){return(e==null?void 0:e[_T])==="resolved"}function Uee(e){return(e==null?void 0:e[_T])==="rejected"}function xU(e,t){return"finally"in e?e.finally(t):e.then(n=>{let r=t();return gT(r)?r.then(()=>n):n},n=>{let r=t();if(gT(r))return r.then(()=>{throw n});throw n})}function qU(e){if(Bee(e))return e.__fakePromiseValue;if(Uee(e))throw e.__fakeRejectError;return e}});var vT=w(Ou=>{"use strict";m();T();N();Object.defineProperty(Ou,"__esModule",{value:!0});Ou.isPromise=void 0;Ou.isIterableObject=kee;Ou.isObjectLike=Mee;Ou.promiseReduce=xee;Ou.hasOwnProperty=qee;var VU=qf();Object.defineProperty(Ou,"isPromise",{enumerable:!0,get:function(){return VU.isPromise}});function kee(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Mee(e){return typeof e=="object"&&e!==null}function xee(e,t,n){let r=n;for(let i of e)r=(0,VU.handleMaybePromise)(()=>r,a=>t(a,i));return r}function qee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var tO=w(eO=>{"use strict";m();T();N();Object.defineProperty(eO,"__esModule",{value:!0});eO.getArgumentValues=jee;var Zv=xf(),Ic=Oe(),OT=IT(),Vee=vT();function jee(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((c,l)=>Q(M({},c),{[l.name.value]:l}),{});for(let{name:c,type:l,defaultValue:d}of e.args){let p=a[c];if(!p){if(d!==void 0)r[c]=d;else if((0,Ic.isNonNullType)(l))throw(0,OT.createGraphQLError)(`Argument "${c}" of required type "${(0,Zv.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Ic.Kind.NULL;if(E.kind===Ic.Kind.VARIABLE){let A=E.name.value;if(n==null||!(0,Vee.hasOwnProperty)(n,A)){if(d!==void 0)r[c]=d;else if((0,Ic.isNonNullType)(l))throw(0,OT.createGraphQLError)(`Argument "${c}" of required type "${(0,Zv.inspect)(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Ic.isNonNullType)(l))throw(0,OT.createGraphQLError)(`Argument "${c}" of non-null type "${(0,Zv.inspect)(l)}" must not be null.`,{nodes:[E]});let v=(0,Ic.valueFromAST)(E,l,n);if(v===void 0)throw(0,OT.createGraphQLError)(`Argument "${c}" has invalid value ${(0,Ic.print)(E)}.`,{nodes:[E]});r[c]=v}return r}});var Su=w(Ps=>{"use strict";m();T();N();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.memoize1=Kee;Ps.memoize2=Gee;Ps.memoize3=$ee;Ps.memoize4=Qee;Ps.memoize5=Yee;Ps.memoize2of4=Jee;Ps.memoize2of5=Hee;function Kee(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function Gee(e){let t=new WeakMap;return function(r,i){let a=t.get(r);if(!a){a=new WeakMap,t.set(r,a);let c=e(r,i);return a.set(i,c),c}let o=a.get(i);if(o===void 0){let c=e(r,i);return a.set(i,c),c}return o}}function $ee(e){let t=new WeakMap;return function(r,i,a){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);let d=new WeakMap;o.set(i,d);let p=e(r,i,a);return d.set(a,p),p}let c=o.get(i);if(!c){c=new WeakMap,o.set(i,c);let d=e(r,i,a);return c.set(a,d),d}let l=c.get(a);if(l===void 0){let d=e(r,i,a);return c.set(a,d),d}return l}}function Qee(e){let t=new WeakMap;return function(r,i,a,o){let c=t.get(r);if(!c){c=new WeakMap,t.set(r,c);let E=new WeakMap;c.set(i,E);let I=new WeakMap;E.set(a,I);let v=e(r,i,a,o);return I.set(o,v),v}let l=c.get(i);if(!l){l=new WeakMap,c.set(i,l);let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let d=l.get(a);if(!d){let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let p=d.get(o);if(p===void 0){let E=e(r,i,a,o);return d.set(o,E),E}return p}}function Yee(e){let t=new WeakMap;return function(r,i,a,o,c){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let v=new WeakMap;l.set(i,v);let A=new WeakMap;v.set(a,A);let U=new WeakMap;A.set(o,U);let j=e(r,i,a,o,c);return U.set(c,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let A=new WeakMap;v.set(o,A);let U=e(r,i,a,o,c);return A.set(c,U),U}let p=d.get(a);if(!p){p=new WeakMap,d.set(a,p);let v=new WeakMap;p.set(o,v);let A=e(r,i,a,o,c);return v.set(c,A),A}let E=p.get(o);if(!E){E=new WeakMap,p.set(o,E);let v=e(r,i,a,o,c);return E.set(c,v),v}let I=E.get(c);if(I===void 0){let v=e(r,i,a,o,c);return E.set(c,v),v}return I}}function Jee(e){let t=new WeakMap;return function(r,i,a,o){let c=t.get(r);if(!c){c=new WeakMap,t.set(r,c);let d=e(r,i,a,o);return c.set(i,d),d}let l=c.get(i);if(l===void 0){let d=e(r,i,a,o);return c.set(i,d),d}return l}}function Hee(e){let t=new WeakMap;return function(r,i,a,o,c){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,a,o,c);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,a,o,c);return l.set(i,p),p}return d}}});var rO=w(nO=>{"use strict";m();T();N();Object.defineProperty(nO,"__esModule",{value:!0});nO.getDirectiveExtensions=Xee;var jU=Oe(),zee=tO(),Wee=Su();function Xee(e,t,n=["directives"]){var o;let r={};if(e.extensions){let c=e.extensions;for(let l of n)c=c==null?void 0:c[l];if(c!=null)for(let l in c){let d=c[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=(0,Wee.memoize1)(c=>JSON.stringify(c)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let c of a)if((o=c.directives)!=null&&o.length)for(let l of c.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=(0,zee.getArgumentValues)(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,jU.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,jU.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}});var iO=w(Vl=>{"use strict";m();T();N();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.getDirectivesInExtensions=Zee;Vl.getDirectiveInExtensions=ete;Vl.getDirectives=tte;Vl.getDirective=nte;var ST=rO();function Zee(e,t=["directives"]){let n=(0,ST.getDirectiveExtensions)(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}function ete(e,t,n=["directives"]){return(0,ST.getDirectiveExtensions)(e,void 0,n)[t]}function tte(e,t,n=["directives"]){let r=(0,ST.getDirectiveExtensions)(t,e,n);return Object.entries(r).map(([i,a])=>a==null?void 0:a.map(o=>({name:i,args:o}))).flat(1/0).filter(Boolean)}function nte(e,t,n,r=["directives"]){return(0,ST.getDirectiveExtensions)(t,e,r)[n]}});var sO=w(aO=>{"use strict";m();T();N();Object.defineProperty(aO,"__esModule",{value:!0});aO.getFieldsWithDirectives=ite;var rte=Oe();function ite(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(a=>r.includes(a.kind));for(let a of i){let o=a.name.value;if(a.fields!=null){for(let c of a.fields)if(c.directives&&c.directives.length>0){let l=c.name.value,d=`${o}.${l}`,p=c.directives.map(E=>({name:E.name.value,args:(E.arguments||[]).reduce((I,v)=>Q(M({},I),{[v.name.value]:(0,rte.valueFromASTUntyped)(v.value)}),{})}));n[d]=p}}}return n}});var KU=w(uO=>{"use strict";m();T();N();Object.defineProperty(uO,"__esModule",{value:!0});uO.getArgumentsWithDirectives=ste;var oO=Oe();function ate(e){return e.kind===oO.Kind.OBJECT_TYPE_DEFINITION||e.kind===oO.Kind.OBJECT_TYPE_EXTENSION}function ste(e){var r;let t={},n=e.definitions.filter(ate);for(let i of n)if(i.fields!=null)for(let a of i.fields){let o=(r=a.arguments)==null?void 0:r.filter(l=>{var d;return(d=l.directives)==null?void 0:d.length});if(!(o!=null&&o.length))continue;let c=t[`${i.name.value}.${a.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((E,I)=>Q(M({},E),{[I.name.value]:(0,oO.valueFromASTUntyped)(I.value)}),{})}));c[l.name.value]=d}}return t}});var lO=w(cO=>{"use strict";m();T();N();Object.defineProperty(cO,"__esModule",{value:!0});cO.getImplementingTypes=ote;function ote(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];"getInterfaces"in a&&a.getInterfaces().find(c=>c.name===e)&&r.push(a.name)}return r}});var DT=w(fO=>{"use strict";m();T();N();Object.defineProperty(fO,"__esModule",{value:!0});fO.astFromType=dO;var ute=xf(),gc=Oe();function dO(e){if((0,gc.isNonNullType)(e)){let t=dO(e.ofType);if(t.kind===gc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,ute.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:gc.Kind.NON_NULL_TYPE,type:t}}else if((0,gc.isListType)(e))return{kind:gc.Kind.LIST_TYPE,type:dO(e.ofType)};return{kind:gc.Kind.NAMED_TYPE,name:{kind:gc.Kind.NAME,value:e.name}}}});var Vf=w(pO=>{"use strict";m();T();N();Object.defineProperty(pO,"__esModule",{value:!0});pO.astFromValueUntyped=bT;var Ja=Oe();function bT(e){if(e===null)return{kind:Ja.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=bT(n);r!=null&&t.push(r)}return{kind:Ja.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return bT(e.toJSON());let t=[];for(let n in e){let r=e[n],i=bT(r);i&&t.push({kind:Ja.Kind.OBJECT_FIELD,name:{kind:Ja.Kind.NAME,value:n},value:i})}return{kind:Ja.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:Ja.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:Ja.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return cte.test(t)?{kind:Ja.Kind.INT,value:t}:{kind:Ja.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:Ja.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var cte=/^-?(?:0|[1-9][0-9]*)$/});var $U=w(mO=>{"use strict";m();T();N();Object.defineProperty(mO,"__esModule",{value:!0});mO.astFromValue=jf;var lte=xf(),Ti=Oe(),dte=Vf(),GU=vT();function jf(e,t){if((0,Ti.isNonNullType)(t)){let n=jf(e,t.ofType);return(n==null?void 0:n.kind)===Ti.Kind.NULL?null:n}if(e===null)return{kind:Ti.Kind.NULL};if(e===void 0)return null;if((0,Ti.isListType)(t)){let n=t.ofType;if((0,GU.isIterableObject)(e)){let r=[];for(let i of e){let a=jf(i,n);a!=null&&r.push(a)}return{kind:Ti.Kind.LIST,values:r}}return jf(e,n)}if((0,Ti.isInputObjectType)(t)){if(!(0,GU.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=jf(e[r.name],r.type);i&&n.push({kind:Ti.Kind.OBJECT_FIELD,name:{kind:Ti.Kind.NAME,value:r.name},value:i})}return{kind:Ti.Kind.OBJECT,fields:n}}if((0,Ti.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,Ti.isEnumType)(t)?{kind:Ti.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&fte.test(n)?{kind:Ti.Kind.INT,value:n}:(0,dte.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,lte.inspect)(t))}var fte=/^-?(?:0|[1-9][0-9]*)$/});var QU=w(NO=>{"use strict";m();T();N();Object.defineProperty(NO,"__esModule",{value:!0});NO.getDescriptionNode=mte;var pte=Oe();function mte(e){var t;if((t=e.astNode)!=null&&t.description)return Q(M({},e.astNode.description),{block:!0});if(e.description)return{kind:pte.Kind.STRING,value:e.description,block:!0}}});var Kf=w(Ki=>{"use strict";m();T();N();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.getRootTypeMap=Ki.getRootTypes=Ki.getRootTypeNames=void 0;Ki.getDefinedRootType=Tte;var Nte=IT(),TO=Su();function Tte(e,t,n){let i=(0,Ki.getRootTypeMap)(e).get(t);if(i==null)throw(0,Nte.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Ki.getRootTypeNames=(0,TO.memoize1)(function(t){let n=(0,Ki.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Ki.getRootTypes=(0,TO.memoize1)(function(t){let n=(0,Ki.getRootTypeMap)(t);return new Set(n.values())});Ki.getRootTypeMap=(0,TO.memoize1)(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n})});var gO=w(Xn=>{"use strict";m();T();N();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getDocumentNodeFromSchema=JU;Xn.printSchemaWithDirectives=Ite;Xn.astFromSchema=HU;Xn.astFromDirective=zU;Xn.getDirectiveNodes=Na;Xn.astFromArg=hO;Xn.astFromObjectType=WU;Xn.astFromInterfaceType=XU;Xn.astFromUnionType=ZU;Xn.astFromInputObjectType=ek;Xn.astFromEnumType=tk;Xn.astFromScalarType=nk;Xn.astFromField=yO;Xn.astFromInputField=rk;Xn.astFromEnumValue=ik;Xn.makeDeprecatedDirective=ak;Xn.makeDirectiveNode=jl;Xn.makeDirectiveNodes=IO;var Nt=Oe(),_c=DT(),EO=$U(),Ete=Vf(),Gi=QU(),YU=iO(),hte=ql(),yte=Kf();function JU(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=HU(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,Nt.isSpecifiedDirective)(c)||a.push(zU(c,e,n));for(let c in r){let l=r[c],d=(0,Nt.isSpecifiedScalarType)(l),p=(0,Nt.isIntrospectionType)(l);if(!(d||p))if((0,Nt.isObjectType)(l))a.push(WU(l,e,n));else if((0,Nt.isInterfaceType)(l))a.push(XU(l,e,n));else if((0,Nt.isUnionType)(l))a.push(ZU(l,e,n));else if((0,Nt.isInputObjectType)(l))a.push(ek(l,e,n));else if((0,Nt.isEnumType)(l))a.push(tk(l,e,n));else if((0,Nt.isScalarType)(l))a.push(nk(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Nt.Kind.DOCUMENT,definitions:a}}function Ite(e,t={}){let n=JU(e,t);return(0,Nt.print)(n)}function HU(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=(0,yte.getRootTypeMap)(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=(0,_c.astFromType)(E);p!=null?p.type=I:n.set(d,{kind:Nt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(hte.isSome),o=Na(e,e,t);if(!a.length&&!o.length)return null;let c={kind:a.length?Nt.Kind.SCHEMA_DEFINITION:Nt.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Gi.getDescriptionNode)(e);return l&&(c.description=l),c}function zU(e,t,n){var r,i;return{kind:Nt.Kind.DIRECTIVE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>hO(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Nt.Kind.NAME,value:a})))||[]}}function Na(e,t,n){let r=[],i=(0,YU.getDirectivesInExtensions)(e,n),a;i!=null&&(a=IO(t,i));let o=null,c=null,l=null;if(a!=null&&(r=a.filter(d=>Nt.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),c=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=ak(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&c==null){let p={url:e.specifiedByUrl||e.specifiedByURL};c=jl("specifiedBy",p)}return e.isOneOf&&l==null&&(l=jl("oneOf")),o!=null&&r.push(o),c!=null&&r.push(c),l!=null&&r.push(l),r}function hO(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,_c.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,EO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:Na(e,t,n)}}function WU(e,t,n){return{kind:Nt.Kind.OBJECT_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>yO(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,_c.astFromType)(r)),directives:Na(e,t,n)}}function XU(e,t,n){let r={kind:Nt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>yO(i,t,n)),directives:Na(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,_c.astFromType)(i))),r}function ZU(e,t,n){return{kind:Nt.Kind.UNION_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:Na(e,t,n),types:e.getTypes().map(r=>(0,_c.astFromType)(r))}}function ek(e,t,n){return{kind:Nt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>rk(r,t,n)),directives:Na(e,t,n)}}function tk(e,t,n){return{kind:Nt.Kind.ENUM_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>ik(r,t,n)),directives:Na(e,t,n)}}function nk(e,t,n){let r=(0,YU.getDirectivesInExtensions)(e,n),i=IO(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(jl("specifiedBy",o))}return{kind:Nt.Kind.SCALAR_TYPE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:i}}function yO(e,t,n){return{kind:Nt.Kind.FIELD_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:e.args.map(r=>hO(r,t,n)),type:(0,_c.astFromType)(e.type),directives:Na(e,t,n)}}function rk(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,_c.astFromType)(e.type),directives:Na(e,t,n),defaultValue:(r=(0,EO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}function ik(e,t,n){return{kind:Nt.Kind.ENUM_VALUE_DEFINITION,description:(0,Gi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:Na(e,t,n)}}function ak(e){return jl("deprecated",{reason:e},Nt.GraphQLDeprecatedDirective)}function jl(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let c=n.args.find(l=>l.name===i);c&&(o=(0,EO.astFromValue)(a,c.type))}o==null&&(o=(0,Ete.astFromValueUntyped)(a)),o!=null&&r.push({kind:Nt.Kind.ARGUMENT,name:{kind:Nt.Kind.NAME,value:i},value:o})}return{kind:Nt.Kind.DIRECTIVE,name:{kind:Nt.Kind.NAME,value:e},arguments:r}}function IO(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(jl(r,i,a))}return n}});var ok=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.validateGraphQlDocuments=gte;AT.createDefaultRules=sk;var Gf=Oe();function gte(e,t,n=sk()){var c;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Gf.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Gf.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Gf.validate)(e,a,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` + at ${(c=l.source)==null?void 0:c.name}:${d.line}:${d.column}`;return o}function sk(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Gf.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Gf.specifiedRules.filter(t=>!e.includes(t.name))}});var uk=w(_O=>{"use strict";m();T();N();Object.defineProperty(_O,"__esModule",{value:!0});_O.parseGraphQLJSON=Ste;var _te=Oe();function vte(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Ote(e){return JSON.parse(vte(e))}function Ste(e,t,n){let r=Ote(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,_te.buildClientSchema)(r,n);return{location:e,schema:i}}else if(typeof r=="string")return{location:e,rawSDL:r};throw new Error("Not valid JSON content")}});var OO=w($i=>{"use strict";m();T();N();Object.defineProperty($i,"__esModule",{value:!0});$i.resetComments=bte;$i.collectComment=Ate;$i.pushComment=$f;$i.printComment=pk;$i.printWithComments=wte;$i.getDescription=Cte;$i.getComment=vO;$i.getLeadingCommentBlock=mk;$i.dedentBlockStringValue=Nk;$i.getBlockStringIndentation=Tk;var fk=Oe(),Dte=80,Kl={};function bte(){Kl={}}function Ate(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch($f(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)$f(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if($f(r,t,r.name.value),Lte(r)&&r.arguments)for(let i of r.arguments)$f(i,t,r.name.value,i.name.value)}break}}function $f(e,t,n,r){let i=vO(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");Kl[o]||(Kl[o]=[]),Kl[o].push(i)}function pk(e){return` # `+e.replace(/\n/g,` -# `)}function Me(e,t){return e?e.filter(n=>n).join(t||""):""}function ok(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!=null?t:!1}function bte(e){return(t,n,r,i,a)=>{var p;let o=[],c=i.reduce((E,I)=>(["fields","arguments","values"].includes(I)&&E.name&&o.push(E.name.value),E[I]),a[0]),l=[...o,(p=c==null?void 0:c.name)==null?void 0:p.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&jl[l]&&d.push(...jl[l]),Me([...d.map(dk),t.description,e(t,n,r,i,a)],` -`)}}function $f(e){return e&&` ${e.replace(/\n/g,` +# `)}function Me(e,t){return e?e.filter(n=>n).join(t||""):""}function ck(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` +`)))!=null?t:!1}function Rte(e){return(t,n,r,i,a)=>{var p;let o=[],c=i.reduce((E,I)=>(["fields","arguments","values"].includes(I)&&E.name&&o.push(E.name.value),E[I]),a[0]),l=[...o,(p=c==null?void 0:c.name)==null?void 0:p.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&Kl[l]&&d.push(...Kl[l]),Me([...d.map(pk),t.description,e(t,n,r,i,a)],` +`)}}function Qf(e){return e&&` ${e.replace(/\n/g,` `)}`}function Ta(e){return e&&e.length!==0?`{ -${$f(Me(e,` +${Qf(Me(e,` `))} -}`:""}function Rn(e,t,n){return t?e+t+(n||""):""}function Ate(e,t=!1){let n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` +}`:""}function Rn(e,t,n){return t?e+t+(n||""):""}function Pte(e,t=!1){let n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` `)===-1?`"""${n.replace(/"$/,`" `)}"""`:`""" -${t?n:$f(n)} -"""`}var uk={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Me(e.definitions,` +${t?n:Qf(n)} +"""`}var lk={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Me(e.definitions,` -`)},OperationDefinition:{leave:e=>{let t=Rn("(",Me(e.variableDefinitions,", "),")");return Me([e.operation,Me([e.name,t]),Me(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Rn(" = ",n)+Rn(" ",Me(r," "))},SelectionSet:{leave:({selections:e})=>Ta(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Rn("",e,": ")+t,o=a+Rn("(",Me(n,", "),")");return o.length>Ote&&(o=a+Rn(`( -`,$f(Me(n,` +`)},OperationDefinition:{leave:e=>{let t=Rn("(",Me(e.variableDefinitions,", "),")");return Me([e.operation,Me([e.name,t]),Me(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Rn(" = ",n)+Rn(" ",Me(r," "))},SelectionSet:{leave:({selections:e})=>Ta(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Rn("",e,": ")+t,o=a+Rn("(",Me(n,", "),")");return o.length>Dte&&(o=a+Rn(`( +`,Qf(Me(n,` `)),` -)`)),Me([o,Me(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Rn(" ",Me(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Me(["...",Rn("on ",e),Me(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Rn("(",Me(n,", "),")")} on ${t} ${Rn("",Me(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Ate(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Me(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Me(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Rn("(",Me(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>Me(["schema",Me(e," "),Ta(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>Me(["scalar",e,Me(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["type",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(ok(t)?Rn(`( -`,$f(Me(t,` +)`)),Me([o,Me(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Rn(" ",Me(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Me(["...",Rn("on ",e),Me(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Rn("(",Me(n,", "),")")} on ${t} ${Rn("",Me(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Pte(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Me(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Me(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Rn("(",Me(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>Me(["schema",Me(e," "),Ta(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>Me(["scalar",e,Me(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["type",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(ck(t)?Rn(`( +`,Qf(Me(t,` `)),` -)`):Rn("(",Me(t,", "),")"))+": "+n+Rn(" ",Me(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Me([e+": "+t,Rn("= ",n),Me(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["interface",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Me(["union",e,Me(t," "),Rn("= ",Me(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>Me(["enum",e,Me(t," "),Ta(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>Me([e,Me(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>Me(["input",e,Me(t," "),Ta(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(ok(t)?Rn(`( -`,$f(Me(t,` +)`):Rn("(",Me(t,", "),")"))+": "+n+Rn(" ",Me(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Me([e+": "+t,Rn("= ",n),Me(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["interface",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Me(["union",e,Me(t," "),Rn("= ",Me(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>Me(["enum",e,Me(t," "),Ta(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>Me([e,Me(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>Me(["input",e,Me(t," "),Ta(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(ck(t)?Rn(`( +`,Qf(Me(t,` `)),` -)`):Rn("(",Me(t,", "),")"))+(n?" repeatable":"")+" on "+Me(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Me(["extend schema",Me(e," "),Ta(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Me(["extend scalar",e,Me(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend type",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend interface",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Me(["extend union",e,Me(t," "),Rn("= ",Me(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Me(["extend enum",e,Me(t," "),Ta(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Me(["extend input",e,Me(t," "),Ta(n)]," ")}},Rte=Object.keys(uk).reduce((e,t)=>Q(M({},e),{[t]:{leave:bte(uk[t].leave)}}),{});function Pte(e){return(0,lk.visit)(e,Rte)}function Fte(e){return e.kind==="FieldDefinition"}function wte(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return _O(e)}function _O(e){let t=fk(e);if(t!==void 0)return pk(` -${t}`)}function fk(e){let t=e.loc;if(!t)return;let n=[],r=t.startToken.prev;for(;r!=null&&r.kind===lk.TokenKind.COMMENT&&r.next!=null&&r.prev!=null&&r.line+1===r.next.line&&r.line!==r.prev.line;){let i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join(` -`):void 0}function pk(e){let t=e.split(/\r\n|[\n\r]/g),n=mk(t);if(n!==0)for(let r=1;r0&&ck(t[0]);)t.shift();for(;t.length>0&&ck(t[t.length-1]);)t.pop();return t.join(` -`)}function mk(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(Qf,"__esModule",{value:!0});Qf.parseGraphQLSDL=Lte;Qf.transformCommentsToDescriptions=Ek;Qf.isDescribable=hk;var Qi=Oe(),Tk=vO();function Lte(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Ek(t,n),n.noLocation&&(r=(0,Qi.parse)((0,Qi.print)(r),n))):r=(0,Qi.parse)(new Qi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:Qi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function Ek(e,t={}){let n=(0,Qi.parse)(e,Q(M({},t),{noLocation:!1}));return(0,Qi.visit)(n,{leave:i=>{if(hk(i)){let a=(0,Tk.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,Tk.dedentBlockStringValue)(` +)`):Rn("(",Me(t,", "),")"))+(n?" repeatable":"")+" on "+Me(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Me(["extend schema",Me(e," "),Ta(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Me(["extend scalar",e,Me(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend type",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend interface",e,Rn("implements ",Me(t," & ")),Me(n," "),Ta(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Me(["extend union",e,Me(t," "),Rn("= ",Me(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Me(["extend enum",e,Me(t," "),Ta(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Me(["extend input",e,Me(t," "),Ta(n)]," ")}},Fte=Object.keys(lk).reduce((e,t)=>Q(M({},e),{[t]:{leave:Rte(lk[t].leave)}}),{});function wte(e){return(0,fk.visit)(e,Fte)}function Lte(e){return e.kind==="FieldDefinition"}function Cte(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return vO(e)}function vO(e){let t=mk(e);if(t!==void 0)return Nk(` +${t}`)}function mk(e){let t=e.loc;if(!t)return;let n=[],r=t.startToken.prev;for(;r!=null&&r.kind===fk.TokenKind.COMMENT&&r.next!=null&&r.prev!=null&&r.line+1===r.next.line&&r.line!==r.prev.line;){let i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join(` +`):void 0}function Nk(e){let t=e.split(/\r\n|[\n\r]/g),n=Tk(t);if(n!==0)for(let r=1;r0&&dk(t[0]);)t.shift();for(;t.length>0&&dk(t[t.length-1]);)t.pop();return t.join(` +`)}function Tk(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(Yf,"__esModule",{value:!0});Yf.parseGraphQLSDL=Bte;Yf.transformCommentsToDescriptions=yk;Yf.isDescribable=Ik;var Qi=Oe(),hk=OO();function Bte(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=yk(t,n),n.noLocation&&(r=(0,Qi.parse)((0,Qi.print)(r),n))):r=(0,Qi.parse)(new Qi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:Qi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function yk(e,t={}){let n=(0,Qi.parse)(e,Q(M({},t),{noLocation:!1}));return(0,Qi.visit)(n,{leave:i=>{if(Ik(i)){let a=(0,hk.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,hk.dedentBlockStringValue)(` `+a),c=o.includes(` `);return i.description?Q(M({},i),{description:Q(M({},i.description),{value:i.description.value+` -`+o,block:!0})}):Q(M({},i),{description:{kind:Qi.Kind.STRING,value:o,block:c}})}}}})}function hk(e){return(0,Qi.isTypeSystemDefinitionNode)(e)||e.kind===Qi.Kind.FIELD_DEFINITION||e.kind===Qi.Kind.INPUT_VALUE_DEFINITION||e.kind===Qi.Kind.ENUM_VALUE_DEFINITION}});var bk=w(bO=>{"use strict";m();T();N();Object.defineProperty(bO,"__esModule",{value:!0});bO.buildOperationNodeForField=Bte;var ct=Oe(),Cte=qf(),vk=jf(),DO=[],bT=new Map;function Ok(e){DO.push(e)}function Ik(){DO=[]}function gk(){bT=new Map}function Bte({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l=!0}){Ik(),gk();let d=(0,vk.getRootTypeNames)(e),p=Ute({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:c,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...DO],Ik(),gk(),p}function Ute({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l,rootTypeNames:d}){let p=(0,vk.getDefinedRootType)(e,n),E=p.getFields()[t],I=`${t}_${n}`;if(E.args)for(let v of E.args){let A=v.name;(!c||c.includes(A))&&Ok(Sk(v,A))}return{kind:ct.Kind.OPERATION_DEFINITION,operation:n,name:{kind:ct.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:ct.Kind.SELECTION_SET,selections:[Dk({type:p,field:E,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:c,selectedFields:l,rootTypeNames:d})]}}}function SO({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&p>c)){if((0,ct.isUnionType)(t)){let A=t.getTypes();return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!OO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:SO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,$;return(($=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:$.length)>0})}}if((0,ct.isInterfaceType)(t)){let A=Object.values(d.getTypeMap()).filter(U=>(0,ct.isObjectType)(U)&&U.getInterfaces().includes(t));return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!OO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:SO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,$;return(($=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:$.length)>0})}}if((0,ct.isObjectType)(t)&&!v.has(t.name)){let A=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),U=n.includes(t.name);if(!r&&U&&!A)return{kind:ct.Kind.SELECTION_SET,selections:[{kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:ct.Kind.SELECTION_SET,selections:Object.keys(j).filter($=>!OO([...a,(0,ct.getNamedType)(j[$].type)],{depth:l})).map($=>{let re=typeof I=="object"?I[$]:!0;return re?Dk({type:t,field:j[$],models:n,path:[...i,$],ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:re,rootTypeNames:v}):null}).filter($=>{var re,ee;return $==null?!1:"selectionSet"in $?!!((ee=(re=$.selectionSet)==null?void 0:re.selections)!=null&&ee.length):!0})}}}}function Sk(e,t){function n(i){return(0,ct.isListType)(i)?{kind:ct.Kind.LIST_TYPE,type:n(i.ofType)}:(0,ct.isNonNullType)(i)?{kind:ct.Kind.NON_NULL_TYPE,type:n(i.ofType)}:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:i.name}}}let r;try{let i=(0,ct.astFromValue)(e.defaultValue,e.type);i==null?r=void 0:r=i}catch(i){let a=(0,Cte.astFromValueUntyped)(e.defaultValue);a==null?r=void 0:r=a}return{kind:ct.Kind.VARIABLE_DEFINITION,variable:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:t||e.name}},type:n(e.type),defaultValue:r}}function _k(e,t){return[...t,e].join("_")}function Dk({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){let A=(0,ct.getNamedType)(t.type),U=[],j=!1;if(t.args&&t.args.length&&(U=t.args.map(me=>{let ue=_k(me.name,i);return E&&!E.includes(ue)?((0,ct.isNonNullType)(me.type)&&(j=!0),null):(r||Ok(Sk(me,ue)),{kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:me.name},value:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:_k(me.name,i)}}})}).filter(Boolean)),j)return null;let $=[...i,t.name],re=$.join("."),ee=t.name;return bT.has(re)&&bT.get(re)!==t.type.toString()&&(ee+=t.type.toString().replace(/!/g,"NonNull").replace(/\[/g,"List").replace(/\]/g,"")),bT.set(re,t.type.toString()),!(0,ct.isScalarType)(A)&&!(0,ct.isEnumType)(A)?Q(M({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ee!==t.name&&{alias:{kind:ct.Kind.NAME,value:ee}}),{selectionSet:SO({parent:e,type:A,models:n,firstCall:r,path:$,ancestors:[...a,e],ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p+1,argNames:E,selectedFields:I,rootTypeNames:v})||void 0,arguments:U}):Q(M({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ee!==t.name&&{alias:{kind:ct.Kind.NAME,value:ee}}),{arguments:U})}function OO(e,t={depth:1}){let n=e[e.length-1];return(0,ct.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var Rk=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.DirectiveLocation=void 0;var Ak;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Ak||(AT.DirectiveLocation=Ak={}))});var _c=w(RT=>{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.MapperKind=void 0;var Pk;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(Pk||(RT.MapperKind=Pk={}))});var RO=w(AO=>{"use strict";m();T();N();Object.defineProperty(AO,"__esModule",{value:!0});AO.getObjectTypeFromTypeMap=Mte;var kte=Oe();function Mte(e,t){if(t){let n=e[t.name];if((0,kte.isObjectType)(n))return n}}});var wO=w(Kl=>{"use strict";m();T();N();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.createNamedStub=PO;Kl.createStub=FO;Kl.isNamedStub=xte;Kl.getBuiltInForStub=qte;var Tr=Oe();function PO(e,t){let n;return t==="object"?n=Tr.GraphQLObjectType:t==="interface"?n=Tr.GraphQLInterfaceType:n=Tr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Tr.GraphQLString}}})}function FO(e,t){switch(e.kind){case Tr.Kind.LIST_TYPE:return new Tr.GraphQLList(FO(e.type,t));case Tr.Kind.NON_NULL_TYPE:return new Tr.GraphQLNonNull(FO(e.type,t));default:return t==="output"?PO(e.name.value,"object"):PO(e.name.value,"input")}}function xte(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}function qte(e){switch(e.name){case Tr.GraphQLInt.name:return Tr.GraphQLInt;case Tr.GraphQLFloat.name:return Tr.GraphQLFloat;case Tr.GraphQLString.name:return Tr.GraphQLString;case Tr.GraphQLBoolean.name:return Tr.GraphQLBoolean;case Tr.GraphQLID.name:return Tr.GraphQLID;default:return e}}});var PT=w(LO=>{"use strict";m();T();N();Object.defineProperty(LO,"__esModule",{value:!0});LO.rewireTypes=Vte;var Zn=Oe(),Fk=wO();function Vte(e,t){let n=Object.create(null);for(let I in e)n[I]=e[I];let r=Object.create(null);for(let I in n){let v=n[I];if(v==null||I.startsWith("__"))continue;let A=v.name;if(!A.startsWith("__")){if(r[A]!=null){console.warn(`Duplicate schema type name ${A} found; keeping the existing one found in the schema`);continue}r[A]=v}}for(let I in r)r[I]=c(r[I]);let i=t.map(I=>a(I));return{typeMap:r,directives:i};function a(I){if((0,Zn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Zn.GraphQLDirective(v)}function o(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function c(I){if((0,Zn.isObjectType)(I)){let v=I.toConfig(),A=Q(M({},v),{fields:()=>l(v.fields),interfaces:()=>p(v.interfaces)});return new Zn.GraphQLObjectType(A)}else if((0,Zn.isInterfaceType)(I)){let v=I.toConfig(),A=Q(M({},v),{fields:()=>l(v.fields)});return"interfaces"in A&&(A.interfaces=()=>p(v.interfaces)),new Zn.GraphQLInterfaceType(A)}else if((0,Zn.isUnionType)(I)){let v=I.toConfig(),A=Q(M({},v),{types:()=>p(v.types)});return new Zn.GraphQLUnionType(A)}else if((0,Zn.isInputObjectType)(I)){let v=I.toConfig(),A=Q(M({},v),{fields:()=>d(v.fields)});return new Zn.GraphQLInputObjectType(A)}else if((0,Zn.isEnumType)(I)){let v=I.toConfig();return new Zn.GraphQLEnumType(v)}else if((0,Zn.isScalarType)(I)){if((0,Zn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Zn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&U.args&&(U.type=j,U.args=o(U.args),v[A]=U)}return v}function d(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function p(I){let v=[];for(let A of I){let U=E(A);U!=null&&v.push(U)}return v}function E(I){if((0,Zn.isListType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLList(v):null}else if((0,Zn.isNonNullType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLNonNull(v):null}else if((0,Zn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,Fk.isNamedStub)(I)?(0,Fk.getBuiltInForStub)(I):c(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}});var CO=w($l=>{"use strict";m();T();N();Object.defineProperty($l,"__esModule",{value:!0});$l.transformInputValue=Gl;$l.serializeInputValue=Kte;$l.parseInputValue=Gte;$l.parseInputValueLiteral=$te;var FT=Oe(),jte=xl();function Gl(e,t,n=null,r=null){if(t==null)return t;let i=(0,FT.getNullableType)(e);if((0,FT.isLeafType)(i))return n!=null?n(i,t):t;if((0,FT.isListType)(i))return(0,jte.asArray)(t).map(a=>Gl(i.ofType,a,n,r));if((0,FT.isInputObjectType)(i)){let a=i.getFields(),o={};for(let c in t){let l=a[c];l!=null&&(o[c]=Gl(l.type,t[c],n,r))}return r!=null?r(i,o):o}}function Kte(e,t){return Gl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}function Gte(e,t){return Gl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}function $te(e,t){return Gl(e,t,(n,r)=>n.parseLiteral(r,{}))}});var Yl=w(LT=>{"use strict";m();T();N();Object.defineProperty(LT,"__esModule",{value:!0});LT.mapSchema=Yte;LT.correctASTNodes=Yf;var st=Oe(),Ql=RO(),Rt=_c(),Qte=PT(),wk=CO();function Yte(e,t={}){let n=Bk(Ck(BO(Lk(Hte(BO(Lk(e.getTypeMap(),e,wk.serializeInputValue),e,t,c=>(0,st.isLeafType)(c)),e,t),e,wk.parseInputValue),e,t,c=>!(0,st.isLeafType)(c)),e,t),e,t),r=e.getDirectives(),i=zte(r,e,t),{typeMap:a,directives:o}=(0,Qte.rewireTypes)(n,i);return new st.GraphQLSchema(Q(M({},e.toConfig()),{query:(0,Ql.getObjectTypeFromTypeMap)(a,(0,Ql.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,Ql.getObjectTypeFromTypeMap)(a,(0,Ql.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,Ql.getObjectTypeFromTypeMap)(a,(0,Ql.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}var Jte=["String","ID","Int","Float","Boolean"];function BO(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")&&!Jte.includes(a)){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let c=Xte(t,n,a);if(c==null){i[a]=o;continue}let l=c(o,t);if(l===void 0){i[a]=o;continue}i[a]=l}return i}function Hte(e,t,n){let r=rne(n);return r?BO(e,t,{[Rt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,c={};for(let l in o){let d=o[l],p=r(d,i.name,t,l);if(p===void 0)c[l]=d;else if(Array.isArray(p)){let[E,I]=p;c[E]=I===void 0?d:I}else p!==null&&(c[l]=p)}return Yf(new st.GraphQLEnumType(Q(M({},a),{values:c})))}},i=>(0,st.isEnumType)(i)):e}function Lk(e,t,n){let r=Bk(e,t,{[Rt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=wT(e,i.type);if(a!=null)return Q(M({},i),{defaultValue:n(a,i.defaultValue)})}});return Ck(r,t,{[Rt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=wT(r,i.type);if(a!=null)return Q(M({},i),{defaultValue:n(a,i.defaultValue)})}})}function wT(e,t){if((0,st.isListType)(t)){let n=wT(e,t.ofType);return n!=null?new st.GraphQLList(n):null}else if((0,st.isNonNullType)(t)){let n=wT(e,t.ofType);return n!=null?new st.GraphQLNonNull(n):null}else if((0,st.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function Ck(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)&&!(0,st.isInputObjectType)(a)){r[i]=a;continue}let o=ene(t,n,i);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let p in l){let E=l[p],I=o(E,p,i,t);if(I===void 0)d[p]=E;else if(Array.isArray(I)){let[v,A]=I;A.astNode!=null&&(A.astNode=Q(M({},A.astNode),{name:Q(M({},A.astNode.name),{value:v})})),d[v]=A===void 0?E:A}else I!==null&&(d[p]=I)}(0,st.isObjectType)(a)?r[i]=Yf(new st.GraphQLObjectType(Q(M({},c),{fields:d}))):(0,st.isInterfaceType)(a)?r[i]=Yf(new st.GraphQLInterfaceType(Q(M({},c),{fields:d}))):r[i]=Yf(new st.GraphQLInputObjectType(Q(M({},c),{fields:d})))}return r}function Bk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)){r[i]=a;continue}let o=tne(n);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let p in l){let E=l[p],I=E.args;if(I==null){d[p]=E;continue}let v=Object.keys(I);if(!v.length){d[p]=E;continue}let A={};for(let U of v){let j=I[U],$=o(j,p,i,t);if($===void 0)A[U]=j;else if(Array.isArray($)){let[re,ee]=$;A[re]=ee}else $!==null&&(A[U]=$)}d[p]=Q(M({},E),{args:A})}(0,st.isObjectType)(a)?r[i]=new st.GraphQLObjectType(Q(M({},c),{fields:d})):(0,st.isInterfaceType)(a)?r[i]=new st.GraphQLInterfaceType(Q(M({},c),{fields:d})):r[i]=new st.GraphQLInputObjectType(Q(M({},c),{fields:d}))}return r}function zte(e,t,n){let r=nne(n);if(r==null)return e.slice();let i=[];for(let a of e){let o=r(a,t);o===void 0?i.push(a):o!==null&&i.push(o)}return i}function Wte(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.TYPE];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.SUBSCRIPTION)):(0,st.isInputObjectType)(n)?r.push(Rt.MapperKind.INPUT_OBJECT_TYPE):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.INTERFACE_TYPE):(0,st.isUnionType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.UNION_TYPE):(0,st.isEnumType)(n)?r.push(Rt.MapperKind.ENUM_TYPE):(0,st.isScalarType)(n)&&r.push(Rt.MapperKind.SCALAR_TYPE),r}function Xte(e,t,n){let r=Wte(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Zte(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.FIELD];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.INTERFACE_FIELD):(0,st.isInputObjectType)(n)&&r.push(Rt.MapperKind.INPUT_OBJECT_FIELD),r}function ene(e,t,n){let r=Zte(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function tne(e){let t=e[Rt.MapperKind.ARGUMENT];return t!=null?t:null}function nne(e){let t=e[Rt.MapperKind.DIRECTIVE];return t!=null?t:null}function rne(e){let t=e[Rt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Yf(e){if((0,st.isObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{kind:st.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{kind:st.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLObjectType(t)}else if((0,st.isInterfaceType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{kind:st.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{kind:st.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInterfaceType(t)}else if((0,st.isInputObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{kind:st.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{kind:st.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInputObjectType(t)}else if((0,st.isEnumType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.values){let i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{values:void 0}))),new st.GraphQLEnumType(t)}else return e}});var Uk=w(MO=>{"use strict";m();T();N();Object.defineProperty(MO,"__esModule",{value:!0});MO.filterSchema=ane;var CT=Oe(),Ea=_c(),ine=Yl();function ane({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:a=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:c=void 0,directiveFilter:l=void 0,enumValueFilter:d=void 0}){return(0,ine.mapSchema)(e,{[Ea.MapperKind.QUERY]:E=>UO(E,"Query",r,c),[Ea.MapperKind.MUTATION]:E=>UO(E,"Mutation",r,c),[Ea.MapperKind.SUBSCRIPTION]:E=>UO(E,"Subscription",r,c),[Ea.MapperKind.OBJECT_TYPE]:E=>t(E.name,E)?kO(CT.GraphQLObjectType,E,i||n,c):null,[Ea.MapperKind.INTERFACE_TYPE]:E=>t(E.name,E)?kO(CT.GraphQLInterfaceType,E,a||n,c):null,[Ea.MapperKind.INPUT_OBJECT_TYPE]:E=>t(E.name,E)?kO(CT.GraphQLInputObjectType,E,o||n):null,[Ea.MapperKind.UNION_TYPE]:E=>t(E.name,E)?void 0:null,[Ea.MapperKind.ENUM_TYPE]:E=>t(E.name,E)?void 0:null,[Ea.MapperKind.SCALAR_TYPE]:E=>t(E.name,E)?void 0:null,[Ea.MapperKind.DIRECTIVE]:E=>l&&!l(E.name,E)?null:void 0,[Ea.MapperKind.ENUM_VALUE]:(E,I,v,A)=>d&&!d(I,A,E)?null:void 0})}function UO(e,t,n,r){if(n||r){let i=e.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t,a,i.fields[a]))delete i.fields[a];else if(r&&o.args)for(let c in o.args)r(e.name,a,c,o.args[c])||delete o.args[c]}return new CT.GraphQLObjectType(i)}return e}function kO(e,t,n,r){if(n||r){let i=t.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t.name,a,i.fields[a]))delete i.fields[a];else if(r&&"args"in o)for(let c in o.args)r(t.name,a,c,o.args[c])||delete o.args[c]}return new e(i)}}});var Mk=w(BT=>{"use strict";m();T();N();Object.defineProperty(BT,"__esModule",{value:!0});BT.healSchema=sne;BT.healTypes=kk;var Ha=Oe();function sne(e){return kk(e.getTypeMap(),e.getDirectives()),e}function kk(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let E=p.name;if(!E.startsWith("__")){if(n[E]!=null){console.warn(`Duplicate schema type name ${E} found; keeping the existing one found in the schema`);continue}n[E]=p}}for(let d in n){let p=n[d];e[d]=p}for(let d of t)d.args=d.args.filter(p=>(p.type=l(p.type),p.type!==null));for(let d in e){let p=e[d];!d.startsWith("__")&&d in n&&p!=null&&r(p)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,Ha.isObjectType)(d)){i(d),a(d);return}else if((0,Ha.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,Ha.isUnionType)(d)){c(d);return}else if((0,Ha.isInputObjectType)(d)){o(d);return}else if((0,Ha.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.args.map(v=>(v.type=l(v.type),v.type===null?null:v)).filter(Boolean),I.type=l(I.type),I.type===null&&delete p[E]}function a(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.type=l(I.type),I.type===null&&delete p[E]}function c(d){let p=d.getTypes();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}function l(d){if((0,Ha.isListType)(d)){let p=l(d.ofType);return p!=null?new Ha.GraphQLList(p):null}else if((0,Ha.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new Ha.GraphQLNonNull(p):null}else if((0,Ha.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}});var xk=w(xO=>{"use strict";m();T();N();Object.defineProperty(xO,"__esModule",{value:!0});xO.getResolversFromSchema=one;var vc=Oe();function one(e,t){var i,a;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let c=r[o];if((0,vc.isScalarType)(c)){if(!(0,vc.isSpecifiedScalarType)(c)){let l=c.toConfig();delete l.astNode,n[o]=new vc.GraphQLScalarType(l)}}else if((0,vc.isEnumType)(c)){n[o]={};let l=c.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,vc.isInterfaceType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,vc.isUnionType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,vc.isObjectType)(c)){n[o]={},c.isTypeOf!=null&&(n[o].__isTypeOf=c.isTypeOf);let l=c.getFields();for(let d in l){let p=l[d];if(p.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=p.subscribe),p.resolve!=null&&((i=p.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=p.resolve)==null?void 0:a.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}});var Vk=w(qO=>{"use strict";m();T();N();Object.defineProperty(qO,"__esModule",{value:!0});qO.forEachField=une;var qk=Oe();function une(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,qk.getNamedType)(i).name.startsWith("__")&&(0,qk.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];t(c,r,o)}}}}});var jk=w(jO=>{"use strict";m();T();N();Object.defineProperty(jO,"__esModule",{value:!0});jO.forEachDefaultValue=cne;var VO=Oe();function cne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,VO.getNamedType)(i).name.startsWith("__")){if((0,VO.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];for(let l of c.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,VO.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];c.defaultValue=t(c.type,c.defaultValue)}}}}}});var QO=w($O=>{"use strict";m();T();N();Object.defineProperty($O,"__esModule",{value:!0});$O.addTypes=dne;var KO=Oe(),GO=RO(),lne=PT();function dne(e,t){let n=e.toConfig(),r={};for(let c of n.types)r[c.name]=c;let i={};for(let c of n.directives)i[c.name]=c;for(let c of t)(0,KO.isNamedType)(c)?r[c.name]=c:(0,KO.isDirective)(c)&&(i[c.name]=c);let{typeMap:a,directives:o}=(0,lne.rewireTypes)(r,Object.values(i));return new KO.GraphQLSchema(Q(M({},n),{query:(0,GO.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,GO.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,GO.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}});var Gk=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.pruneSchema=Tne;var er=Oe(),fne=cO(),pne=_c(),mne=Yl(),Nne=jf();function Tne(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,c=[],l=e;do{let d=Ene(l);if(i){let p=[];for(let E in l.getTypeMap()){if(E.startsWith("__"))continue;let I=l.getType(E);I&&i(I)&&p.push(E)}d=Kk(p,l,d)}c=[],l=(0,mne.mapSchema)(l,{[pne.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,er.isSpecifiedScalarType)(p)?((0,er.isUnionType)(p)||(0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p)||(0,er.isScalarType)(p))&&(o||(0,er.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,er.isInterfaceType)(p)&&a)?p:(c.push(p.name),d.delete(p.name),null):p})}while(c.length);return l}function Ene(e){let t=[];for(let n of(0,Nne.getRootTypes)(e))t.push(n.name);return Kk(t,e)}function Kk(e,t,n=new Set){let r=new Map;for(;e.length;){let i=e.pop();if(n.has(i)&&r[i]!==!0)continue;let a=t.getType(i);if(a){if((0,er.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,er.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,fne.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>UT(t,o))),"getInterfaces"in a&&e.push(...a.getInterfaces().map(o=>o.name)),"getFields"in a){let o=a.getFields(),c=Object.entries(o);if(!c.length)continue;for(let[,l]of c){(0,er.isObjectType)(a)&&e.push(...l.args.flatMap(p=>{let E=[(0,er.getNamedType)(p.type).name];return E.push(...UT(t,p)),E}));let d=(0,er.getNamedType)(l.type);e.push(d.name),e.push(...UT(t,l)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}e.push(...UT(t,a)),n.add(i)}}return n}function UT(e,t){var r,i;let n=new Set;if((r=t.astNode)!=null&&r.directives)for(let a of t.astNode.directives){let o=e.getDirective(a.name.value);if(o!=null&&o.args)for(let c of o.args){let l=(0,er.getNamedType)(c.type);n.add(l.name)}}if((i=t.extensions)!=null&&i.directives)for(let a in t.extensions.directives){let o=e.getDirective(a);if(o!=null&&o.args)for(let c of o.args){let l=(0,er.getNamedType)(c.type);n.add(l.name)}}return[...n]}});var HO=w(JO=>{"use strict";m();T();N();Object.defineProperty(JO,"__esModule",{value:!0});JO.mergeDeep=kT;var hne=xl();function kT(e,t=!1,n=!1,r=!1){if(e.length===0)return;if(e.length===1)return e[0];let i,a=!0,o=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else a=!1;return!1});if(r&&o)return new Array(i).fill(null).map((d,p)=>kT(e.map(E=>E[p]),t,n,r));if(a)return e.flat(1);let c,l;t&&(l=e.find(d=>$k(d)),l&&(c==null&&(c={}),Object.setPrototypeOf(c,Object.create(Object.getPrototypeOf(l)))));for(let d of e)if(d!=null)if($k(d)){if(l){let p=Object.getPrototypeOf(c),E=Object.getPrototypeOf(d);if(E)for(let I of Object.getOwnPropertyNames(E)){let v=Object.getOwnPropertyDescriptor(E,I);(0,hne.isSome)(v)&&Object.defineProperty(p,I,v)}}for(let p in d)c==null&&(c={}),p in c?c[p]=kT([c[p],d[p]],t,n,r):c[p]=d[p]}else Array.isArray(d)&&Array.isArray(c)?c=kT([c,d],t,n,r):c=d;return c}function $k(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var Qk=w(zO=>{"use strict";m();T();N();Object.defineProperty(zO,"__esModule",{value:!0});zO.parseSelectionSet=Ine;var yne=Oe();function Ine(e,t){return(0,yne.parse)(e,t).definitions[0].selectionSet}});var Yk=w(WO=>{"use strict";m();T();N();Object.defineProperty(WO,"__esModule",{value:!0});WO.getResponseKeyFromInfo=gne;function gne(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}});var Jk=w(Jl=>{"use strict";m();T();N();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.appendObjectFields=vne;Jl.removeObjectFields=One;Jl.selectObjectFields=Sne;Jl.modifyObjectFields=Dne;var MT=Oe(),_ne=QO(),xT=_c(),Oc=Yl();function vne(e,t,n){return e.getType(t)==null?(0,_ne.addTypes)(e,[new MT.GraphQLObjectType({name:t,fields:n})]):(0,Oc.mapSchema)(e,{[xT.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),a=i.fields,o={};for(let c in a)o[c]=a[c];for(let c in n)o[c]=n[c];return(0,Oc.correctASTNodes)(new MT.GraphQLObjectType(Q(M({},i),{fields:o})))}}})}function One(e,t,n){let r={};return[(0,Oc.mapSchema)(e,{[xT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),c=o.fields,l={};for(let d in c){let p=c[d];n(d,p)?r[d]=p:l[d]=p}return(0,Oc.correctASTNodes)(new MT.GraphQLObjectType(Q(M({},o),{fields:l})))}}}),r]}function Sne(e,t,n){let r={};return(0,Oc.mapSchema)(e,{[xT.MapperKind.OBJECT_TYPE]:i=>{if(i.name===t){let o=i.toConfig().fields;for(let c in o){let l=o[c];n(c,l)&&(r[c]=l)}}}}),r}function Dne(e,t,n,r){let i={};return[(0,Oc.mapSchema)(e,{[xT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let c=o.toConfig(),l=c.fields,d={};for(let p in l){let E=l[p];n(p,E)?i[p]=E:d[p]=E}for(let p in r){let E=r[p];d[p]=E}return(0,Oc.correctASTNodes)(new MT.GraphQLObjectType(Q(M({},c),{fields:d})))}}}),i]}});var Hk=w(XO=>{"use strict";m();T();N();Object.defineProperty(XO,"__esModule",{value:!0});XO.renameType=bne;var Yi=Oe();function bne(e,t){if((0,Yi.isObjectType)(e))return new Yi.GraphQLObjectType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isInterfaceType)(e))return new Yi.GraphQLInterfaceType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isUnionType)(e))return new Yi.GraphQLUnionType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isInputObjectType)(e))return new Yi.GraphQLInputObjectType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isEnumType)(e))return new Yi.GraphQLEnumType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isScalarType)(e))return new Yi.GraphQLScalarType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}});var zk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.updateArgument=Rne;qT.createVariableNameGenerator=Pne;var Sc=Oe(),Ane=OT();function Rne(e,t,n,r,i,a,o){if(e[r]={kind:Sc.Kind.ARGUMENT,name:{kind:Sc.Kind.NAME,value:r},value:{kind:Sc.Kind.VARIABLE,name:{kind:Sc.Kind.NAME,value:i}}},t[i]={kind:Sc.Kind.VARIABLE_DEFINITION,variable:{kind:Sc.Kind.VARIABLE,name:{kind:Sc.Kind.NAME,value:i}},type:(0,Ane.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}function Pne(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}});var Wk=w(eS=>{"use strict";m();T();N();Object.defineProperty(eS,"__esModule",{value:!0});eS.implementsAbstractType=Fne;var ZO=Oe();function Fne(e,t,n){return n==null||t==null?!1:t===n?!0:(0,ZO.isCompositeType)(t)&&(0,ZO.isCompositeType)(n)?(0,ZO.doTypesOverlap)(e,t,n):!1}});var Zk=w(tS=>{"use strict";m();T();N();Object.defineProperty(tS,"__esModule",{value:!0});tS.observableToAsyncIterable=wne;var Xk=xf();function wne(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},a=p=>{t.length!==0?t.shift()({value:{errors:[p]},done:!1}):n.push({value:{errors:[p]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(p=>{if(n.length!==0){let E=n.shift();p(E)}else t.push(p)}),l=e.subscribe({next(p){return i(p)},error(p){return a(p)},complete(){return o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let p of t)p({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),(0,Xk.fakePromise)({value:void 0,done:!0})},throw(p){return d(),(0,Xk.fakeRejectPromise)(p)},[Symbol.asyncIterator](){return this}}}});var eM=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.AccumulatorMap=void 0;var nS=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};VT.AccumulatorMap=nS});var rS=w(Hl=>{"use strict";m();T();N();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.GraphQLStreamDirective=Hl.GraphQLDeferDirective=void 0;var Ji=Oe();Hl.GraphQLDeferDirective=new Ji.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Ji.DirectiveLocation.FRAGMENT_SPREAD,Ji.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Ji.GraphQLNonNull(Ji.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Ji.GraphQLString,description:"Unique name"}}});Hl.GraphQLStreamDirective=new Ji.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Ji.DirectiveLocation.FIELD],args:{if:{type:new Ji.GraphQLNonNull(Ji.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Ji.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Ji.GraphQLInt,description:"Number of items to return immediately"}}})});var sS=w(Fs=>{"use strict";m();T();N();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.collectSubFields=void 0;Fs.collectFields=Bne;Fs.shouldIncludeNode=jT;Fs.doesFragmentConditionMatch=iS;Fs.getFieldEntryKey=tM;Fs.getDeferValues=aS;var za=Oe(),KT=eM(),Lne=rS(),Cne=Ou();function zl(e,t,n,r,i,a,o,c){for(let l of i.selections)switch(l.kind){case za.Kind.FIELD:{if(!jT(n,l))continue;a.add(tM(l),l);break}case za.Kind.INLINE_FRAGMENT:{if(!jT(n,l)||!iS(e,l,r))continue;let d=aS(n,l);if(d){let p=new KT.AccumulatorMap;zl(e,t,n,r,l.selectionSet,p,o,c),o.push({label:d.label,fields:p})}else zl(e,t,n,r,l.selectionSet,a,o,c);break}case za.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!jT(n,l))continue;let p=aS(n,l);if(c.has(d)&&!p)continue;let E=t[d];if(!E||!iS(e,E,r))continue;if(p||c.add(d),p){let I=new KT.AccumulatorMap;zl(e,t,n,r,E.selectionSet,I,o,c),o.push({label:p.label,fields:I})}else zl(e,t,n,r,E.selectionSet,a,o,c);break}}}function Bne(e,t,n,r,i){let a=new KT.AccumulatorMap,o=[];return zl(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}function jT(e,t){let n=(0,za.getDirectiveValues)(za.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,za.getDirectiveValues)(za.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function iS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,za.typeFromAST)(e,r);return i===n?!0:(0,za.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}function tM(e){return e.alias?e.alias.value:e.name.value}function aS(e,t){let n=(0,za.getDirectiveValues)(Lne.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Fs.collectSubFields=(0,Cne.memoize5)(function(t,n,r,i,a){let o=new KT.AccumulatorMap,c=new Set,l=[],d={fields:o,patches:l};for(let p of a)p.selectionSet&&zl(t,n,r,i,p.selectionSet,o,l,c);return d})});var oS=w(Jf=>{"use strict";m();T();N();Object.defineProperty(Jf,"__esModule",{value:!0});Jf.getOperationASTFromRequest=void 0;Jf.getOperationASTFromDocument=nM;var Une=Oe(),kne=Ou();function nM(e,t){let n=(0,Une.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}Jf.getOperationASTFromRequest=(0,kne.memoize1)(function(t){return nM(t.document,t.operationName)})});var aM=w(Hf=>{"use strict";m();T();N();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.visitData=cS;Hf.visitErrors=xne;Hf.visitResult=qne;var Su=Oe(),uS=sS(),Mne=oS();function cS(e,t,n){if(Array.isArray(e))return e.map(r=>cS(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let a=r[i];Object.defineProperty(r,i,{value:cS(a,t,n)})}return n!=null?n(r):r}return e}function xne(e,t){return e.map(n=>t(n))}function qne(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===Su.Kind.FRAGMENT_DEFINITION&&(I[v.name.value]=v),I),{}),o=t.variables||{},c={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,E=(0,Mne.getOperationASTFromRequest)(t);return l!=null&&E!=null&&(e.data=Kne(l,E,n,a,o,r,p?d:void 0,c)),d!=null&&i&&(e.errors=Vne(d,i,c)),e}function Vne(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,a=t.__unpathed;return e.map(o=>{let c=r.get(o),l=c==null?o:c.reduceRight((d,p)=>{let E=p.type.name,I=t[E];if(I==null)return d;let v=I[p.fieldName];return v==null?d:v(d,p.pathIndex)},o);return a&&i.has(o)?a(l):l})}function jne(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function Kne(e,t,n,r,i,a,o,c){let l=jne(n,t),{fields:d}=(0,uS.collectFields)(n,r,i,l,t.selectionSet);return lS(e,l,d,n,r,i,a,0,o,c)}function lS(e,t,n,r,i,a,o,c,l,d){var re;let p=t.getFields(),E=o==null?void 0:o[t.name],I=E==null?void 0:E.__enter,v=I!=null?I(e):e,A,U=null;if(l!=null){A=$ne(l,c),U=A.errorMap;for(let ee of A.unpathedErrors)d.unpathedErrors.add(ee)}for(let[ee,me]of n){let ue=me[0].name.value,Ae=(re=p[ue])==null?void 0:re.type;if(Ae==null)switch(ue){case"__typename":Ae=Su.TypeNameMetaFieldDef.type;break;case"__schema":Ae=Su.SchemaMetaFieldDef.type;break;case"__type":Ae=Su.TypeMetaFieldDef.type;break}let xe=c+1,Ze;U&&(Ze=U[ee],Ze!=null&&delete U[ee],Qne(t,ue,xe,Ze,d));let Z=iM(e[ee],Ae,me,r,i,a,o,xe,Ze,d);rM(v,ee,Z,E,ue)}let j=v.__typename;if(j!=null&&rM(v,"__typename",j,E,"__typename"),U)for(let ee in U){let me=U[ee];for(let ue of me)d.unpathedErrors.add(ue)}let $=E==null?void 0:E.__leave;return $!=null?$(v):v}function rM(e,t,n,r,i){if(r==null){e[t]=n;return}let a=r[i];if(a==null){e[t]=n;return}let o=a(n);if(o===void 0){delete e[t];return}e[t]=o}function Gne(e,t,n,r,i,a,o,c,l,d){return e.map(p=>iM(p,t,n,r,i,a,o,c+1,l,d))}function iM(e,t,n,r,i,a,o,c,l=[],d){if(e==null)return e;let p=(0,Su.getNullableType)(t);if((0,Su.isListType)(p))return Gne(e,p.ofType,n,r,i,a,o,c,l,d);if((0,Su.isAbstractType)(p)){let v=r.getType(e.__typename),{fields:A,patches:U}=(0,uS.collectSubFields)(r,i,a,v,n);if(U.length){A=new Map(A);for(let j of U)for(let[$,re]of j.fields){let ee=A.get($);ee?ee.push(...re):A.set($,re)}}return lS(e,v,A,r,i,a,o,c,l,d)}else if((0,Su.isObjectType)(p)){let{fields:v,patches:A}=(0,uS.collectSubFields)(r,i,a,p,n);if(A.length){v=new Map(v);for(let U of A)for(let[j,$]of U.fields){let re=v.get(j);re?re.push(...$):v.set(j,$)}}return lS(e,p,v,r,i,a,o,c,l,d)}let E=o==null?void 0:o[p.name];if(E==null)return e;let I=E(e);return I===void 0?e:I}function $ne(e,t){var i;let n=Object.create(null),r=new Set;for(let a of e){let o=(i=a.path)==null?void 0:i[t];if(o==null){r.add(a);continue}o in n?n[o].push(a):n[o]=[a]}return{errorMap:n,unpathedErrors:r}}function Qne(e,t,n,r=[],i){for(let a of r){let o={type:e,fieldName:t,pathIndex:n},c=i.segmentInfoMap.get(a);c==null?i.segmentInfoMap.set(a,[o]):c.push(o)}}});var sM=w(fS=>{"use strict";m();T();N();Object.defineProperty(fS,"__esModule",{value:!0});fS.valueMatchesCriteria=dS;function dS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>dS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>dS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}});var oM=w(pS=>{"use strict";m();T();N();Object.defineProperty(pS,"__esModule",{value:!0});pS.isAsyncIterable=Yne;function Yne(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}});var uM=w(mS=>{"use strict";m();T();N();Object.defineProperty(mS,"__esModule",{value:!0});mS.isDocumentNode=Hne;var Jne=Oe();function Hne(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===Jne.Kind.DOCUMENT}});var cM=w(()=>{"use strict";m();T();N()});var pM=w(zf=>{"use strict";m();T();N();Object.defineProperty(zf,"__esModule",{value:!0});zf.getAsyncIteratorWithCancel=dM;zf.getAsyncIterableWithCancel=fM;zf.withCancel=fM;var zne=Ou();function Wne(e){return Ai(this,null,function*(){return{value:e,done:!0}})}var lM=(0,zne.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function dM(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let a=Reflect.get(n,r,i);if(r==="return"){let o=a||Wne;return function(l){return Ai(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return lM(n,a);return a}})}function fM(e,t){return new Proxy(e,{get(n,r,i){let a=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let c=Reflect.apply(a,n,[]);return dM(c,t)}:typeof a=="function"?lM(n,a):a}})}});var mM=w(NS=>{"use strict";m();T();N();Object.defineProperty(NS,"__esModule",{value:!0});NS.fixSchemaAst=tre;var Xne=Oe(),Zne=IO();function ere(e,t){let n=(0,Zne.getDocumentNodeFromSchema)(e);return(0,Xne.buildASTSchema)(n,M({},t||{}))}function tre(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=ere(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}});var NM=w(TS=>{"use strict";m();T();N();Object.defineProperty(TS,"__esModule",{value:!0});TS.extractExtensionsFromSchema=ire;var nre=xl(),ws=_c(),rre=Yl();function ha(e,t){e=e||{};let a=e,{directives:n}=a,r=kR(a,["directives"]),i=M({},r);if(!t&&n!=null){let o={};for(let c in n)o[c]=[...(0,nre.asArray)(n[c])];i.directives=o}return i}function ire(e,t=!1){let n={schemaExtensions:ha(e.extensions,t),types:{}};return(0,rre.mapSchema)(e,{[ws.MapperKind.OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"object",extensions:ha(r.extensions,t)},r),[ws.MapperKind.INTERFACE_TYPE]:r=>(n.types[r.name]={fields:{},type:"interface",extensions:ha(r.extensions,t)},r),[ws.MapperKind.FIELD]:(r,i,a)=>{n.types[a].fields[i]={arguments:{},extensions:ha(r.extensions,t)};let o=r.args;if(o!=null)for(let c in o)n.types[a].fields[i].arguments[c]=ha(o[c].extensions,t);return r},[ws.MapperKind.ENUM_TYPE]:r=>(n.types[r.name]={values:{},type:"enum",extensions:ha(r.extensions,t)},r),[ws.MapperKind.ENUM_VALUE]:(r,i,a,o)=>(n.types[i].values[o]=ha(r.extensions,t),r),[ws.MapperKind.SCALAR_TYPE]:r=>(n.types[r.name]={type:"scalar",extensions:ha(r.extensions,t)},r),[ws.MapperKind.UNION_TYPE]:r=>(n.types[r.name]={type:"union",extensions:ha(r.extensions,t)},r),[ws.MapperKind.INPUT_OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"input",extensions:ha(r.extensions,t)},r),[ws.MapperKind.INPUT_OBJECT_FIELD]:(r,i,a)=>(n.types[a].fields[i]={extensions:ha(r.extensions,t)},r)}),n}});var TM=w(Wf=>{"use strict";m();T();N();Object.defineProperty(Wf,"__esModule",{value:!0});Wf.addPath=are;Wf.pathToArray=sre;Wf.printPathArray=ore;function are(e,t,n){return{prev:e,key:t,typename:n}}function sre(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function ore(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var hM=w(hS=>{"use strict";m();T();N();Object.defineProperty(hS,"__esModule",{value:!0});hS.mergeIncrementalResult=EM;var ure=HO();function EM({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)ES(t,n,i),n[n.length-1]++;e.data&&ES(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&ES(t,["extensions"],e.extensions),e.incremental&&e.incremental.forEach(i=>{EM({incrementalResult:i,executionResult:t})})}function ES(e,t,n){let r=e,i;for(i=0;i{"use strict";m();T();N();Object.defineProperty(GT,"__esModule",{value:!0});GT.debugTimerStart=cre;GT.debugTimerEnd=lre;var yM=new Set;function cre(e){var n,r;let t=((r=(n=globalThis.process)==null?void 0:n.env)==null?void 0:r.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(yM.add(e),console.time(e))}function lre(e){yM.has(e)&&console.timeEnd(e)}});var vM=w(Xf=>{"use strict";m();T();N();Object.defineProperty(Xf,"__esModule",{value:!0});Xf.getAbortPromise=void 0;Xf.registerAbortSignalListener=_M;var dre=xf(),gM=Ou(),fre=(0,gM.memoize1)(function(t){let n=new Set;return t.addEventListener("abort",r=>{for(let i of n)i(r)},{once:!0}),n});function _M(e,t){if(e.aborted){t();return}fre(e).add(t)}Xf.getAbortPromise=(0,gM.memoize1)(function(t){return t.aborted?(0,dre.fakeRejectPromise)(t.reason):new Promise((n,r)=>{if(t.aborted){r(t.reason);return}_M(t,()=>{r(t.reason)})})})});var ya=w(Le=>{"use strict";m();T();N();Object.defineProperty(Le,"__esModule",{value:!0});Le.createDeferred=Le.fakePromise=Le.mapMaybePromise=Le.mapAsyncIterator=Le.inspect=void 0;var Ye=(bU(),Lm(DU));Ye.__exportStar(AU(),Le);Ye.__exportStar(xl(),Le);Ye.__exportStar(rO(),Le);Ye.__exportStar(aO(),Le);Ye.__exportStar(VU(),Le);Ye.__exportStar(cO(),Le);Ye.__exportStar(IO(),Le);Ye.__exportStar(aO(),Le);Ye.__exportStar(ak(),Le);Ye.__exportStar(sk(),Le);Ye.__exportStar(yk(),Le);Ye.__exportStar(bk(),Le);Ye.__exportStar(Rk(),Le);Ye.__exportStar(Uk(),Le);Ye.__exportStar(Mk(),Le);Ye.__exportStar(xk(),Le);Ye.__exportStar(Vk(),Le);Ye.__exportStar(jk(),Le);Ye.__exportStar(Yl(),Le);Ye.__exportStar(QO(),Le);Ye.__exportStar(PT(),Le);Ye.__exportStar(Gk(),Le);Ye.__exportStar(HO(),Le);Ye.__exportStar(_c(),Le);Ye.__exportStar(wO(),Le);Ye.__exportStar(Qk(),Le);Ye.__exportStar(Yk(),Le);Ye.__exportStar(Jk(),Le);Ye.__exportStar(Hk(),Le);Ye.__exportStar(CO(),Le);Ye.__exportStar(zk(),Le);Ye.__exportStar(OT(),Le);Ye.__exportStar(Wk(),Le);Ye.__exportStar(hT(),Le);Ye.__exportStar(Zk(),Le);Ye.__exportStar(aM(),Le);Ye.__exportStar(eO(),Le);Ye.__exportStar(sM(),Le);Ye.__exportStar(oM(),Le);Ye.__exportStar(uM(),Le);Ye.__exportStar(qf(),Le);Ye.__exportStar(cM(),Le);Ye.__exportStar(pM(),Le);Ye.__exportStar(jf(),Le);Ye.__exportStar(vO(),Le);Ye.__exportStar(sS(),Le);var pre=Mf();Object.defineProperty(Le,"inspect",{enumerable:!0,get:function(){return pre.inspect}});Ye.__exportStar(Ou(),Le);Ye.__exportStar(mM(),Le);Ye.__exportStar(oS(),Le);Ye.__exportStar(NM(),Le);Ye.__exportStar(TM(),Le);Ye.__exportStar(gT(),Le);Ye.__exportStar(rS(),Le);Ye.__exportStar(hM(),Le);Ye.__exportStar(IM(),Le);Ye.__exportStar(nO(),Le);var $T=xf();Object.defineProperty(Le,"mapAsyncIterator",{enumerable:!0,get:function(){return $T.mapAsyncIterator}});Object.defineProperty(Le,"mapMaybePromise",{enumerable:!0,get:function(){return $T.mapMaybePromise}});Object.defineProperty(Le,"fakePromise",{enumerable:!0,get:function(){return $T.fakePromise}});Object.defineProperty(Le,"createDeferred",{enumerable:!0,get:function(){return $T.createDeferredPromise}});Ye.__exportStar(vM(),Le)});var SM=w(QT=>{"use strict";m();T();N();Object.defineProperty(QT,"__esModule",{value:!0});QT.mergeResolvers=void 0;var mre=ya();function OM(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};let n=new Array;for(let i of e)Array.isArray(i)&&(i=OM(i)),typeof i=="object"&&i&&n.push(i);let r=(0,mre.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[a,o]=i.split(".");!o||o==="*"?delete r[a]:r[a]&&delete r[a][o]}return r}QT.mergeResolvers=OM});var yS=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.mergeArguments=void 0;var DM=ya();function Nre(e,t,n){let r=Tre([...t,...e].filter(DM.isSome),n);return n&&n.sort&&r.sort(DM.compareNodes),r}YT.mergeArguments=Nre;function Tre(e,t){return e.reduce((n,r)=>{let i=n.findIndex(a=>a.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Hi=w(Wl=>{"use strict";m();T();N();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.mergeDirective=Wl.mergeDirectives=void 0;var bM=Oe(),Ere=ya();function hre(e,t){return!!e.find(n=>n.name.value===t.name.value)}function AM(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function yre(e,t){return t.some(({value:n})=>n===e.value)}function RM(e,t){let n=[...t];for(let r of e){let i=n.findIndex(a=>a.name.value===r.name.value);if(i>-1){let a=n[i];if(a.value.kind==="ListValue"){let o=a.value.values,c=r.value.values;a.value.values=Ore(o,c,(l,d)=>{let p=l.value;return!p||!d.some(E=>E.value===p)})}else a.value=r.value}else n.push(r)}return n}function Ire(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!AM(n,t)){let o=i[a];return n.arguments=RM(n.arguments,o.arguments),null}return n}).filter(Ere.isSome)}function gre(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,c=Ire([...a],r);for(let l of o)if(hre(c,l)&&!AM(l,r)){let d=c.findIndex(E=>E.name.value===l.name.value),p=c[d];c[d].arguments=RM(l.arguments||[],p.arguments||[])}else c.push(l);return c}Wl.mergeDirectives=gre;function _re(e,t){let n=(0,bM.print)(Q(M({},e),{description:void 0})),r=(0,bM.print)(Q(M({},t),{description:void 0})),i=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(n.replace(i,"")===r.replace(i,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". +`+o,block:!0})}):Q(M({},i),{description:{kind:Qi.Kind.STRING,value:o,block:c}})}}}})}function Ik(e){return(0,Qi.isTypeSystemDefinitionNode)(e)||e.kind===Qi.Kind.FIELD_DEFINITION||e.kind===Qi.Kind.INPUT_VALUE_DEFINITION||e.kind===Qi.Kind.ENUM_VALUE_DEFINITION}});var Rk=w(AO=>{"use strict";m();T();N();Object.defineProperty(AO,"__esModule",{value:!0});AO.buildOperationNodeForField=kte;var ct=Oe(),Ute=Vf(),Sk=Kf(),bO=[],RT=new Map;function Dk(e){bO.push(e)}function _k(){bO=[]}function vk(){RT=new Map}function kte({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l=!0}){_k(),vk();let d=(0,Sk.getRootTypeNames)(e),p=Mte({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:c,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...bO],_k(),vk(),p}function Mte({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l,rootTypeNames:d}){let p=(0,Sk.getDefinedRootType)(e,n),E=p.getFields()[t],I=`${t}_${n}`;if(E.args)for(let v of E.args){let A=v.name;(!c||c.includes(A))&&Dk(bk(v,A))}return{kind:ct.Kind.OPERATION_DEFINITION,operation:n,name:{kind:ct.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:ct.Kind.SELECTION_SET,selections:[Ak({type:p,field:E,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:c,selectedFields:l,rootTypeNames:d})]}}}function DO({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&p>c)){if((0,ct.isUnionType)(t)){let A=t.getTypes();return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!SO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:DO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,$;return(($=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:$.length)>0})}}if((0,ct.isInterfaceType)(t)){let A=Object.values(d.getTypeMap()).filter(U=>(0,ct.isObjectType)(U)&&U.getInterfaces().includes(t));return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!SO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:DO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,$;return(($=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:$.length)>0})}}if((0,ct.isObjectType)(t)&&!v.has(t.name)){let A=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),U=n.includes(t.name);if(!r&&U&&!A)return{kind:ct.Kind.SELECTION_SET,selections:[{kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:ct.Kind.SELECTION_SET,selections:Object.keys(j).filter($=>!SO([...a,(0,ct.getNamedType)(j[$].type)],{depth:l})).map($=>{let re=typeof I=="object"?I[$]:!0;return re?Ak({type:t,field:j[$],models:n,path:[...i,$],ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:re,rootTypeNames:v}):null}).filter($=>{var re,ee;return $==null?!1:"selectionSet"in $?!!((ee=(re=$.selectionSet)==null?void 0:re.selections)!=null&&ee.length):!0})}}}}function bk(e,t){function n(i){return(0,ct.isListType)(i)?{kind:ct.Kind.LIST_TYPE,type:n(i.ofType)}:(0,ct.isNonNullType)(i)?{kind:ct.Kind.NON_NULL_TYPE,type:n(i.ofType)}:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:i.name}}}let r;try{let i=(0,ct.astFromValue)(e.defaultValue,e.type);i==null?r=void 0:r=i}catch(i){let a=(0,Ute.astFromValueUntyped)(e.defaultValue);a==null?r=void 0:r=a}return{kind:ct.Kind.VARIABLE_DEFINITION,variable:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:t||e.name}},type:n(e.type),defaultValue:r}}function Ok(e,t){return[...t,e].join("_")}function Ak({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){let A=(0,ct.getNamedType)(t.type),U=[],j=!1;if(t.args&&t.args.length&&(U=t.args.map(me=>{let ue=Ok(me.name,i);return E&&!E.includes(ue)?((0,ct.isNonNullType)(me.type)&&(j=!0),null):(r||Dk(bk(me,ue)),{kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:me.name},value:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:Ok(me.name,i)}}})}).filter(Boolean)),j)return null;let $=[...i,t.name],re=$.join("."),ee=t.name;return RT.has(re)&&RT.get(re)!==t.type.toString()&&(ee+=t.type.toString().replace(/!/g,"NonNull").replace(/\[/g,"List").replace(/\]/g,"")),RT.set(re,t.type.toString()),!(0,ct.isScalarType)(A)&&!(0,ct.isEnumType)(A)?Q(M({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ee!==t.name&&{alias:{kind:ct.Kind.NAME,value:ee}}),{selectionSet:DO({parent:e,type:A,models:n,firstCall:r,path:$,ancestors:[...a,e],ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:p+1,argNames:E,selectedFields:I,rootTypeNames:v})||void 0,arguments:U}):Q(M({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ee!==t.name&&{alias:{kind:ct.Kind.NAME,value:ee}}),{arguments:U})}function SO(e,t={depth:1}){let n=e[e.length-1];return(0,ct.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var Fk=w(PT=>{"use strict";m();T();N();Object.defineProperty(PT,"__esModule",{value:!0});PT.DirectiveLocation=void 0;var Pk;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Pk||(PT.DirectiveLocation=Pk={}))});var vc=w(FT=>{"use strict";m();T();N();Object.defineProperty(FT,"__esModule",{value:!0});FT.MapperKind=void 0;var wk;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(wk||(FT.MapperKind=wk={}))});var PO=w(RO=>{"use strict";m();T();N();Object.defineProperty(RO,"__esModule",{value:!0});RO.getObjectTypeFromTypeMap=qte;var xte=Oe();function qte(e,t){if(t){let n=e[t.name];if((0,xte.isObjectType)(n))return n}}});var LO=w(Gl=>{"use strict";m();T();N();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.createNamedStub=FO;Gl.createStub=wO;Gl.isNamedStub=Vte;Gl.getBuiltInForStub=jte;var Tr=Oe();function FO(e,t){let n;return t==="object"?n=Tr.GraphQLObjectType:t==="interface"?n=Tr.GraphQLInterfaceType:n=Tr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Tr.GraphQLString}}})}function wO(e,t){switch(e.kind){case Tr.Kind.LIST_TYPE:return new Tr.GraphQLList(wO(e.type,t));case Tr.Kind.NON_NULL_TYPE:return new Tr.GraphQLNonNull(wO(e.type,t));default:return t==="output"?FO(e.name.value,"object"):FO(e.name.value,"input")}}function Vte(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}function jte(e){switch(e.name){case Tr.GraphQLInt.name:return Tr.GraphQLInt;case Tr.GraphQLFloat.name:return Tr.GraphQLFloat;case Tr.GraphQLString.name:return Tr.GraphQLString;case Tr.GraphQLBoolean.name:return Tr.GraphQLBoolean;case Tr.GraphQLID.name:return Tr.GraphQLID;default:return e}}});var wT=w(CO=>{"use strict";m();T();N();Object.defineProperty(CO,"__esModule",{value:!0});CO.rewireTypes=Kte;var Zn=Oe(),Lk=LO();function Kte(e,t){let n=Object.create(null);for(let I in e)n[I]=e[I];let r=Object.create(null);for(let I in n){let v=n[I];if(v==null||I.startsWith("__"))continue;let A=v.name;if(!A.startsWith("__")){if(r[A]!=null){console.warn(`Duplicate schema type name ${A} found; keeping the existing one found in the schema`);continue}r[A]=v}}for(let I in r)r[I]=c(r[I]);let i=t.map(I=>a(I));return{typeMap:r,directives:i};function a(I){if((0,Zn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Zn.GraphQLDirective(v)}function o(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function c(I){if((0,Zn.isObjectType)(I)){let v=I.toConfig(),A=Q(M({},v),{fields:()=>l(v.fields),interfaces:()=>p(v.interfaces)});return new Zn.GraphQLObjectType(A)}else if((0,Zn.isInterfaceType)(I)){let v=I.toConfig(),A=Q(M({},v),{fields:()=>l(v.fields)});return"interfaces"in A&&(A.interfaces=()=>p(v.interfaces)),new Zn.GraphQLInterfaceType(A)}else if((0,Zn.isUnionType)(I)){let v=I.toConfig(),A=Q(M({},v),{types:()=>p(v.types)});return new Zn.GraphQLUnionType(A)}else if((0,Zn.isInputObjectType)(I)){let v=I.toConfig(),A=Q(M({},v),{fields:()=>d(v.fields)});return new Zn.GraphQLInputObjectType(A)}else if((0,Zn.isEnumType)(I)){let v=I.toConfig();return new Zn.GraphQLEnumType(v)}else if((0,Zn.isScalarType)(I)){if((0,Zn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Zn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&U.args&&(U.type=j,U.args=o(U.args),v[A]=U)}return v}function d(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function p(I){let v=[];for(let A of I){let U=E(A);U!=null&&v.push(U)}return v}function E(I){if((0,Zn.isListType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLList(v):null}else if((0,Zn.isNonNullType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLNonNull(v):null}else if((0,Zn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,Lk.isNamedStub)(I)?(0,Lk.getBuiltInForStub)(I):c(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}});var BO=w(Ql=>{"use strict";m();T();N();Object.defineProperty(Ql,"__esModule",{value:!0});Ql.transformInputValue=$l;Ql.serializeInputValue=$te;Ql.parseInputValue=Qte;Ql.parseInputValueLiteral=Yte;var LT=Oe(),Gte=ql();function $l(e,t,n=null,r=null){if(t==null)return t;let i=(0,LT.getNullableType)(e);if((0,LT.isLeafType)(i))return n!=null?n(i,t):t;if((0,LT.isListType)(i))return(0,Gte.asArray)(t).map(a=>$l(i.ofType,a,n,r));if((0,LT.isInputObjectType)(i)){let a=i.getFields(),o={};for(let c in t){let l=a[c];l!=null&&(o[c]=$l(l.type,t[c],n,r))}return r!=null?r(i,o):o}}function $te(e,t){return $l(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}function Qte(e,t){return $l(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}function Yte(e,t){return $l(e,t,(n,r)=>n.parseLiteral(r,{}))}});var Jl=w(BT=>{"use strict";m();T();N();Object.defineProperty(BT,"__esModule",{value:!0});BT.mapSchema=Hte;BT.correctASTNodes=Jf;var st=Oe(),Yl=PO(),Rt=vc(),Jte=wT(),Ck=BO();function Hte(e,t={}){let n=kk(Uk(UO(Bk(Wte(UO(Bk(e.getTypeMap(),e,Ck.serializeInputValue),e,t,c=>(0,st.isLeafType)(c)),e,t),e,Ck.parseInputValue),e,t,c=>!(0,st.isLeafType)(c)),e,t),e,t),r=e.getDirectives(),i=Xte(r,e,t),{typeMap:a,directives:o}=(0,Jte.rewireTypes)(n,i);return new st.GraphQLSchema(Q(M({},e.toConfig()),{query:(0,Yl.getObjectTypeFromTypeMap)(a,(0,Yl.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,Yl.getObjectTypeFromTypeMap)(a,(0,Yl.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,Yl.getObjectTypeFromTypeMap)(a,(0,Yl.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}var zte=["String","ID","Int","Float","Boolean"];function UO(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")&&!zte.includes(a)){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let c=ene(t,n,a);if(c==null){i[a]=o;continue}let l=c(o,t);if(l===void 0){i[a]=o;continue}i[a]=l}return i}function Wte(e,t,n){let r=ane(n);return r?UO(e,t,{[Rt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,c={};for(let l in o){let d=o[l],p=r(d,i.name,t,l);if(p===void 0)c[l]=d;else if(Array.isArray(p)){let[E,I]=p;c[E]=I===void 0?d:I}else p!==null&&(c[l]=p)}return Jf(new st.GraphQLEnumType(Q(M({},a),{values:c})))}},i=>(0,st.isEnumType)(i)):e}function Bk(e,t,n){let r=kk(e,t,{[Rt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=CT(e,i.type);if(a!=null)return Q(M({},i),{defaultValue:n(a,i.defaultValue)})}});return Uk(r,t,{[Rt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=CT(r,i.type);if(a!=null)return Q(M({},i),{defaultValue:n(a,i.defaultValue)})}})}function CT(e,t){if((0,st.isListType)(t)){let n=CT(e,t.ofType);return n!=null?new st.GraphQLList(n):null}else if((0,st.isNonNullType)(t)){let n=CT(e,t.ofType);return n!=null?new st.GraphQLNonNull(n):null}else if((0,st.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function Uk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)&&!(0,st.isInputObjectType)(a)){r[i]=a;continue}let o=nne(t,n,i);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let p in l){let E=l[p],I=o(E,p,i,t);if(I===void 0)d[p]=E;else if(Array.isArray(I)){let[v,A]=I;A.astNode!=null&&(A.astNode=Q(M({},A.astNode),{name:Q(M({},A.astNode.name),{value:v})})),d[v]=A===void 0?E:A}else I!==null&&(d[p]=I)}(0,st.isObjectType)(a)?r[i]=Jf(new st.GraphQLObjectType(Q(M({},c),{fields:d}))):(0,st.isInterfaceType)(a)?r[i]=Jf(new st.GraphQLInterfaceType(Q(M({},c),{fields:d}))):r[i]=Jf(new st.GraphQLInputObjectType(Q(M({},c),{fields:d})))}return r}function kk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)){r[i]=a;continue}let o=rne(n);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let p in l){let E=l[p],I=E.args;if(I==null){d[p]=E;continue}let v=Object.keys(I);if(!v.length){d[p]=E;continue}let A={};for(let U of v){let j=I[U],$=o(j,p,i,t);if($===void 0)A[U]=j;else if(Array.isArray($)){let[re,ee]=$;A[re]=ee}else $!==null&&(A[U]=$)}d[p]=Q(M({},E),{args:A})}(0,st.isObjectType)(a)?r[i]=new st.GraphQLObjectType(Q(M({},c),{fields:d})):(0,st.isInterfaceType)(a)?r[i]=new st.GraphQLInterfaceType(Q(M({},c),{fields:d})):r[i]=new st.GraphQLInputObjectType(Q(M({},c),{fields:d}))}return r}function Xte(e,t,n){let r=ine(n);if(r==null)return e.slice();let i=[];for(let a of e){let o=r(a,t);o===void 0?i.push(a):o!==null&&i.push(o)}return i}function Zte(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.TYPE];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.SUBSCRIPTION)):(0,st.isInputObjectType)(n)?r.push(Rt.MapperKind.INPUT_OBJECT_TYPE):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.INTERFACE_TYPE):(0,st.isUnionType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.UNION_TYPE):(0,st.isEnumType)(n)?r.push(Rt.MapperKind.ENUM_TYPE):(0,st.isScalarType)(n)&&r.push(Rt.MapperKind.SCALAR_TYPE),r}function ene(e,t,n){let r=Zte(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function tne(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.FIELD];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.INTERFACE_FIELD):(0,st.isInputObjectType)(n)&&r.push(Rt.MapperKind.INPUT_OBJECT_FIELD),r}function nne(e,t,n){let r=tne(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function rne(e){let t=e[Rt.MapperKind.ARGUMENT];return t!=null?t:null}function ine(e){let t=e[Rt.MapperKind.DIRECTIVE];return t!=null?t:null}function ane(e){let t=e[Rt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Jf(e){if((0,st.isObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{kind:st.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{kind:st.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLObjectType(t)}else if((0,st.isInterfaceType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{kind:st.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{kind:st.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInterfaceType(t)}else if((0,st.isInputObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{kind:st.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{kind:st.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInputObjectType(t)}else if((0,st.isEnumType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.values){let i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=Q(M({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(M({},n),{values:void 0}))),new st.GraphQLEnumType(t)}else return e}});var Mk=w(xO=>{"use strict";m();T();N();Object.defineProperty(xO,"__esModule",{value:!0});xO.filterSchema=one;var UT=Oe(),Ea=vc(),sne=Jl();function one({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:a=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:c=void 0,directiveFilter:l=void 0,enumValueFilter:d=void 0}){return(0,sne.mapSchema)(e,{[Ea.MapperKind.QUERY]:E=>kO(E,"Query",r,c),[Ea.MapperKind.MUTATION]:E=>kO(E,"Mutation",r,c),[Ea.MapperKind.SUBSCRIPTION]:E=>kO(E,"Subscription",r,c),[Ea.MapperKind.OBJECT_TYPE]:E=>t(E.name,E)?MO(UT.GraphQLObjectType,E,i||n,c):null,[Ea.MapperKind.INTERFACE_TYPE]:E=>t(E.name,E)?MO(UT.GraphQLInterfaceType,E,a||n,c):null,[Ea.MapperKind.INPUT_OBJECT_TYPE]:E=>t(E.name,E)?MO(UT.GraphQLInputObjectType,E,o||n):null,[Ea.MapperKind.UNION_TYPE]:E=>t(E.name,E)?void 0:null,[Ea.MapperKind.ENUM_TYPE]:E=>t(E.name,E)?void 0:null,[Ea.MapperKind.SCALAR_TYPE]:E=>t(E.name,E)?void 0:null,[Ea.MapperKind.DIRECTIVE]:E=>l&&!l(E.name,E)?null:void 0,[Ea.MapperKind.ENUM_VALUE]:(E,I,v,A)=>d&&!d(I,A,E)?null:void 0})}function kO(e,t,n,r){if(n||r){let i=e.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t,a,i.fields[a]))delete i.fields[a];else if(r&&o.args)for(let c in o.args)r(e.name,a,c,o.args[c])||delete o.args[c]}return new UT.GraphQLObjectType(i)}return e}function MO(e,t,n,r){if(n||r){let i=t.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t.name,a,i.fields[a]))delete i.fields[a];else if(r&&"args"in o)for(let c in o.args)r(t.name,a,c,o.args[c])||delete o.args[c]}return new e(i)}}});var qk=w(kT=>{"use strict";m();T();N();Object.defineProperty(kT,"__esModule",{value:!0});kT.healSchema=une;kT.healTypes=xk;var Ha=Oe();function une(e){return xk(e.getTypeMap(),e.getDirectives()),e}function xk(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let E=p.name;if(!E.startsWith("__")){if(n[E]!=null){console.warn(`Duplicate schema type name ${E} found; keeping the existing one found in the schema`);continue}n[E]=p}}for(let d in n){let p=n[d];e[d]=p}for(let d of t)d.args=d.args.filter(p=>(p.type=l(p.type),p.type!==null));for(let d in e){let p=e[d];!d.startsWith("__")&&d in n&&p!=null&&r(p)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,Ha.isObjectType)(d)){i(d),a(d);return}else if((0,Ha.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,Ha.isUnionType)(d)){c(d);return}else if((0,Ha.isInputObjectType)(d)){o(d);return}else if((0,Ha.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.args.map(v=>(v.type=l(v.type),v.type===null?null:v)).filter(Boolean),I.type=l(I.type),I.type===null&&delete p[E]}function a(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.type=l(I.type),I.type===null&&delete p[E]}function c(d){let p=d.getTypes();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}function l(d){if((0,Ha.isListType)(d)){let p=l(d.ofType);return p!=null?new Ha.GraphQLList(p):null}else if((0,Ha.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new Ha.GraphQLNonNull(p):null}else if((0,Ha.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}});var Vk=w(qO=>{"use strict";m();T();N();Object.defineProperty(qO,"__esModule",{value:!0});qO.getResolversFromSchema=cne;var Oc=Oe();function cne(e,t){var i,a;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let c=r[o];if((0,Oc.isScalarType)(c)){if(!(0,Oc.isSpecifiedScalarType)(c)){let l=c.toConfig();delete l.astNode,n[o]=new Oc.GraphQLScalarType(l)}}else if((0,Oc.isEnumType)(c)){n[o]={};let l=c.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Oc.isInterfaceType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,Oc.isUnionType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,Oc.isObjectType)(c)){n[o]={},c.isTypeOf!=null&&(n[o].__isTypeOf=c.isTypeOf);let l=c.getFields();for(let d in l){let p=l[d];if(p.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=p.subscribe),p.resolve!=null&&((i=p.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=p.resolve)==null?void 0:a.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}});var Kk=w(VO=>{"use strict";m();T();N();Object.defineProperty(VO,"__esModule",{value:!0});VO.forEachField=lne;var jk=Oe();function lne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,jk.getNamedType)(i).name.startsWith("__")&&(0,jk.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];t(c,r,o)}}}}});var Gk=w(KO=>{"use strict";m();T();N();Object.defineProperty(KO,"__esModule",{value:!0});KO.forEachDefaultValue=dne;var jO=Oe();function dne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,jO.getNamedType)(i).name.startsWith("__")){if((0,jO.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];for(let l of c.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,jO.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];c.defaultValue=t(c.type,c.defaultValue)}}}}}});var YO=w(QO=>{"use strict";m();T();N();Object.defineProperty(QO,"__esModule",{value:!0});QO.addTypes=pne;var GO=Oe(),$O=PO(),fne=wT();function pne(e,t){let n=e.toConfig(),r={};for(let c of n.types)r[c.name]=c;let i={};for(let c of n.directives)i[c.name]=c;for(let c of t)(0,GO.isNamedType)(c)?r[c.name]=c:(0,GO.isDirective)(c)&&(i[c.name]=c);let{typeMap:a,directives:o}=(0,fne.rewireTypes)(r,Object.values(i));return new GO.GraphQLSchema(Q(M({},n),{query:(0,$O.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,$O.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,$O.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}});var Qk=w(JO=>{"use strict";m();T();N();Object.defineProperty(JO,"__esModule",{value:!0});JO.pruneSchema=hne;var er=Oe(),mne=lO(),Nne=vc(),Tne=Jl(),Ene=Kf();function hne(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,c=[],l=e;do{let d=yne(l);if(i){let p=[];for(let E in l.getTypeMap()){if(E.startsWith("__"))continue;let I=l.getType(E);I&&i(I)&&p.push(E)}d=$k(p,l,d)}c=[],l=(0,Tne.mapSchema)(l,{[Nne.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,er.isSpecifiedScalarType)(p)?((0,er.isUnionType)(p)||(0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p)||(0,er.isScalarType)(p))&&(o||(0,er.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,er.isInterfaceType)(p)&&a)?p:(c.push(p.name),d.delete(p.name),null):p})}while(c.length);return l}function yne(e){let t=[];for(let n of(0,Ene.getRootTypes)(e))t.push(n.name);return $k(t,e)}function $k(e,t,n=new Set){let r=new Map;for(;e.length;){let i=e.pop();if(n.has(i)&&r[i]!==!0)continue;let a=t.getType(i);if(a){if((0,er.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,er.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,mne.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>MT(t,o))),"getInterfaces"in a&&e.push(...a.getInterfaces().map(o=>o.name)),"getFields"in a){let o=a.getFields(),c=Object.entries(o);if(!c.length)continue;for(let[,l]of c){(0,er.isObjectType)(a)&&e.push(...l.args.flatMap(p=>{let E=[(0,er.getNamedType)(p.type).name];return E.push(...MT(t,p)),E}));let d=(0,er.getNamedType)(l.type);e.push(d.name),e.push(...MT(t,l)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}e.push(...MT(t,a)),n.add(i)}}return n}function MT(e,t){var r,i;let n=new Set;if((r=t.astNode)!=null&&r.directives)for(let a of t.astNode.directives){let o=e.getDirective(a.name.value);if(o!=null&&o.args)for(let c of o.args){let l=(0,er.getNamedType)(c.type);n.add(l.name)}}if((i=t.extensions)!=null&&i.directives)for(let a in t.extensions.directives){let o=e.getDirective(a);if(o!=null&&o.args)for(let c of o.args){let l=(0,er.getNamedType)(c.type);n.add(l.name)}}return[...n]}});var zO=w(HO=>{"use strict";m();T();N();Object.defineProperty(HO,"__esModule",{value:!0});HO.mergeDeep=xT;var Ine=ql();function xT(e,t=!1,n=!1,r=!1){if(e.length===0)return;if(e.length===1)return e[0];let i,a=!0,o=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else a=!1;return!1});if(r&&o)return new Array(i).fill(null).map((d,p)=>xT(e.map(E=>E[p]),t,n,r));if(a)return e.flat(1);let c,l;t&&(l=e.find(d=>Yk(d)),l&&(c==null&&(c={}),Object.setPrototypeOf(c,Object.create(Object.getPrototypeOf(l)))));for(let d of e)if(d!=null)if(Yk(d)){if(l){let p=Object.getPrototypeOf(c),E=Object.getPrototypeOf(d);if(E)for(let I of Object.getOwnPropertyNames(E)){let v=Object.getOwnPropertyDescriptor(E,I);(0,Ine.isSome)(v)&&Object.defineProperty(p,I,v)}}for(let p in d)c==null&&(c={}),p in c?c[p]=xT([c[p],d[p]],t,n,r):c[p]=d[p]}else Array.isArray(d)&&Array.isArray(c)?c=xT([c,d],t,n,r):c=d;return c}function Yk(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var Jk=w(WO=>{"use strict";m();T();N();Object.defineProperty(WO,"__esModule",{value:!0});WO.parseSelectionSet=_ne;var gne=Oe();function _ne(e,t){return(0,gne.parse)(e,t).definitions[0].selectionSet}});var Hk=w(XO=>{"use strict";m();T();N();Object.defineProperty(XO,"__esModule",{value:!0});XO.getResponseKeyFromInfo=vne;function vne(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}});var zk=w(Hl=>{"use strict";m();T();N();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.appendObjectFields=Sne;Hl.removeObjectFields=Dne;Hl.selectObjectFields=bne;Hl.modifyObjectFields=Ane;var qT=Oe(),One=YO(),VT=vc(),Sc=Jl();function Sne(e,t,n){return e.getType(t)==null?(0,One.addTypes)(e,[new qT.GraphQLObjectType({name:t,fields:n})]):(0,Sc.mapSchema)(e,{[VT.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),a=i.fields,o={};for(let c in a)o[c]=a[c];for(let c in n)o[c]=n[c];return(0,Sc.correctASTNodes)(new qT.GraphQLObjectType(Q(M({},i),{fields:o})))}}})}function Dne(e,t,n){let r={};return[(0,Sc.mapSchema)(e,{[VT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),c=o.fields,l={};for(let d in c){let p=c[d];n(d,p)?r[d]=p:l[d]=p}return(0,Sc.correctASTNodes)(new qT.GraphQLObjectType(Q(M({},o),{fields:l})))}}}),r]}function bne(e,t,n){let r={};return(0,Sc.mapSchema)(e,{[VT.MapperKind.OBJECT_TYPE]:i=>{if(i.name===t){let o=i.toConfig().fields;for(let c in o){let l=o[c];n(c,l)&&(r[c]=l)}}}}),r}function Ane(e,t,n,r){let i={};return[(0,Sc.mapSchema)(e,{[VT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let c=o.toConfig(),l=c.fields,d={};for(let p in l){let E=l[p];n(p,E)?i[p]=E:d[p]=E}for(let p in r){let E=r[p];d[p]=E}return(0,Sc.correctASTNodes)(new qT.GraphQLObjectType(Q(M({},c),{fields:d})))}}}),i]}});var Wk=w(ZO=>{"use strict";m();T();N();Object.defineProperty(ZO,"__esModule",{value:!0});ZO.renameType=Rne;var Yi=Oe();function Rne(e,t){if((0,Yi.isObjectType)(e))return new Yi.GraphQLObjectType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isInterfaceType)(e))return new Yi.GraphQLInterfaceType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isUnionType)(e))return new Yi.GraphQLUnionType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isInputObjectType)(e))return new Yi.GraphQLInputObjectType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isEnumType)(e))return new Yi.GraphQLEnumType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));if((0,Yi.isScalarType)(e))return new Yi.GraphQLScalarType(Q(M({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(M({},e.astNode),{name:Q(M({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(M({},n),{name:Q(M({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}});var Xk=w(jT=>{"use strict";m();T();N();Object.defineProperty(jT,"__esModule",{value:!0});jT.updateArgument=Fne;jT.createVariableNameGenerator=wne;var Dc=Oe(),Pne=DT();function Fne(e,t,n,r,i,a,o){if(e[r]={kind:Dc.Kind.ARGUMENT,name:{kind:Dc.Kind.NAME,value:r},value:{kind:Dc.Kind.VARIABLE,name:{kind:Dc.Kind.NAME,value:i}}},t[i]={kind:Dc.Kind.VARIABLE_DEFINITION,variable:{kind:Dc.Kind.VARIABLE,name:{kind:Dc.Kind.NAME,value:i}},type:(0,Pne.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}function wne(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}});var Zk=w(tS=>{"use strict";m();T();N();Object.defineProperty(tS,"__esModule",{value:!0});tS.implementsAbstractType=Lne;var eS=Oe();function Lne(e,t,n){return n==null||t==null?!1:t===n?!0:(0,eS.isCompositeType)(t)&&(0,eS.isCompositeType)(n)?(0,eS.doTypesOverlap)(e,t,n):!1}});var tM=w(nS=>{"use strict";m();T();N();Object.defineProperty(nS,"__esModule",{value:!0});nS.observableToAsyncIterable=Cne;var eM=qf();function Cne(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},a=p=>{t.length!==0?t.shift()({value:{errors:[p]},done:!1}):n.push({value:{errors:[p]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(p=>{if(n.length!==0){let E=n.shift();p(E)}else t.push(p)}),l=e.subscribe({next(p){return i(p)},error(p){return a(p)},complete(){return o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let p of t)p({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),(0,eM.fakePromise)({value:void 0,done:!0})},throw(p){return d(),(0,eM.fakeRejectPromise)(p)},[Symbol.asyncIterator](){return this}}}});var nM=w(KT=>{"use strict";m();T();N();Object.defineProperty(KT,"__esModule",{value:!0});KT.AccumulatorMap=void 0;var rS=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};KT.AccumulatorMap=rS});var iS=w(zl=>{"use strict";m();T();N();Object.defineProperty(zl,"__esModule",{value:!0});zl.GraphQLStreamDirective=zl.GraphQLDeferDirective=void 0;var Ji=Oe();zl.GraphQLDeferDirective=new Ji.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Ji.DirectiveLocation.FRAGMENT_SPREAD,Ji.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Ji.GraphQLNonNull(Ji.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Ji.GraphQLString,description:"Unique name"}}});zl.GraphQLStreamDirective=new Ji.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Ji.DirectiveLocation.FIELD],args:{if:{type:new Ji.GraphQLNonNull(Ji.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Ji.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Ji.GraphQLInt,description:"Number of items to return immediately"}}})});var oS=w(Fs=>{"use strict";m();T();N();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.collectSubFields=void 0;Fs.collectFields=kne;Fs.shouldIncludeNode=GT;Fs.doesFragmentConditionMatch=aS;Fs.getFieldEntryKey=rM;Fs.getDeferValues=sS;var za=Oe(),$T=nM(),Bne=iS(),Une=Su();function Wl(e,t,n,r,i,a,o,c){for(let l of i.selections)switch(l.kind){case za.Kind.FIELD:{if(!GT(n,l))continue;a.add(rM(l),l);break}case za.Kind.INLINE_FRAGMENT:{if(!GT(n,l)||!aS(e,l,r))continue;let d=sS(n,l);if(d){let p=new $T.AccumulatorMap;Wl(e,t,n,r,l.selectionSet,p,o,c),o.push({label:d.label,fields:p})}else Wl(e,t,n,r,l.selectionSet,a,o,c);break}case za.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!GT(n,l))continue;let p=sS(n,l);if(c.has(d)&&!p)continue;let E=t[d];if(!E||!aS(e,E,r))continue;if(p||c.add(d),p){let I=new $T.AccumulatorMap;Wl(e,t,n,r,E.selectionSet,I,o,c),o.push({label:p.label,fields:I})}else Wl(e,t,n,r,E.selectionSet,a,o,c);break}}}function kne(e,t,n,r,i){let a=new $T.AccumulatorMap,o=[];return Wl(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}function GT(e,t){let n=(0,za.getDirectiveValues)(za.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,za.getDirectiveValues)(za.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function aS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,za.typeFromAST)(e,r);return i===n?!0:(0,za.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}function rM(e){return e.alias?e.alias.value:e.name.value}function sS(e,t){let n=(0,za.getDirectiveValues)(Bne.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Fs.collectSubFields=(0,Une.memoize5)(function(t,n,r,i,a){let o=new $T.AccumulatorMap,c=new Set,l=[],d={fields:o,patches:l};for(let p of a)p.selectionSet&&Wl(t,n,r,i,p.selectionSet,o,l,c);return d})});var uS=w(Hf=>{"use strict";m();T();N();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.getOperationASTFromRequest=void 0;Hf.getOperationASTFromDocument=iM;var Mne=Oe(),xne=Su();function iM(e,t){let n=(0,Mne.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}Hf.getOperationASTFromRequest=(0,xne.memoize1)(function(t){return iM(t.document,t.operationName)})});var oM=w(zf=>{"use strict";m();T();N();Object.defineProperty(zf,"__esModule",{value:!0});zf.visitData=lS;zf.visitErrors=Vne;zf.visitResult=jne;var Du=Oe(),cS=oS(),qne=uS();function lS(e,t,n){if(Array.isArray(e))return e.map(r=>lS(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let a=r[i];Object.defineProperty(r,i,{value:lS(a,t,n)})}return n!=null?n(r):r}return e}function Vne(e,t){return e.map(n=>t(n))}function jne(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===Du.Kind.FRAGMENT_DEFINITION&&(I[v.name.value]=v),I),{}),o=t.variables||{},c={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,E=(0,qne.getOperationASTFromRequest)(t);return l!=null&&E!=null&&(e.data=$ne(l,E,n,a,o,r,p?d:void 0,c)),d!=null&&i&&(e.errors=Kne(d,i,c)),e}function Kne(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,a=t.__unpathed;return e.map(o=>{let c=r.get(o),l=c==null?o:c.reduceRight((d,p)=>{let E=p.type.name,I=t[E];if(I==null)return d;let v=I[p.fieldName];return v==null?d:v(d,p.pathIndex)},o);return a&&i.has(o)?a(l):l})}function Gne(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function $ne(e,t,n,r,i,a,o,c){let l=Gne(n,t),{fields:d}=(0,cS.collectFields)(n,r,i,l,t.selectionSet);return dS(e,l,d,n,r,i,a,0,o,c)}function dS(e,t,n,r,i,a,o,c,l,d){var re;let p=t.getFields(),E=o==null?void 0:o[t.name],I=E==null?void 0:E.__enter,v=I!=null?I(e):e,A,U=null;if(l!=null){A=Yne(l,c),U=A.errorMap;for(let ee of A.unpathedErrors)d.unpathedErrors.add(ee)}for(let[ee,me]of n){let ue=me[0].name.value,Ae=(re=p[ue])==null?void 0:re.type;if(Ae==null)switch(ue){case"__typename":Ae=Du.TypeNameMetaFieldDef.type;break;case"__schema":Ae=Du.SchemaMetaFieldDef.type;break;case"__type":Ae=Du.TypeMetaFieldDef.type;break}let xe=c+1,Ze;U&&(Ze=U[ee],Ze!=null&&delete U[ee],Jne(t,ue,xe,Ze,d));let Z=sM(e[ee],Ae,me,r,i,a,o,xe,Ze,d);aM(v,ee,Z,E,ue)}let j=v.__typename;if(j!=null&&aM(v,"__typename",j,E,"__typename"),U)for(let ee in U){let me=U[ee];for(let ue of me)d.unpathedErrors.add(ue)}let $=E==null?void 0:E.__leave;return $!=null?$(v):v}function aM(e,t,n,r,i){if(r==null){e[t]=n;return}let a=r[i];if(a==null){e[t]=n;return}let o=a(n);if(o===void 0){delete e[t];return}e[t]=o}function Qne(e,t,n,r,i,a,o,c,l,d){return e.map(p=>sM(p,t,n,r,i,a,o,c+1,l,d))}function sM(e,t,n,r,i,a,o,c,l=[],d){if(e==null)return e;let p=(0,Du.getNullableType)(t);if((0,Du.isListType)(p))return Qne(e,p.ofType,n,r,i,a,o,c,l,d);if((0,Du.isAbstractType)(p)){let v=r.getType(e.__typename),{fields:A,patches:U}=(0,cS.collectSubFields)(r,i,a,v,n);if(U.length){A=new Map(A);for(let j of U)for(let[$,re]of j.fields){let ee=A.get($);ee?ee.push(...re):A.set($,re)}}return dS(e,v,A,r,i,a,o,c,l,d)}else if((0,Du.isObjectType)(p)){let{fields:v,patches:A}=(0,cS.collectSubFields)(r,i,a,p,n);if(A.length){v=new Map(v);for(let U of A)for(let[j,$]of U.fields){let re=v.get(j);re?re.push(...$):v.set(j,$)}}return dS(e,p,v,r,i,a,o,c,l,d)}let E=o==null?void 0:o[p.name];if(E==null)return e;let I=E(e);return I===void 0?e:I}function Yne(e,t){var i;let n=Object.create(null),r=new Set;for(let a of e){let o=(i=a.path)==null?void 0:i[t];if(o==null){r.add(a);continue}o in n?n[o].push(a):n[o]=[a]}return{errorMap:n,unpathedErrors:r}}function Jne(e,t,n,r=[],i){for(let a of r){let o={type:e,fieldName:t,pathIndex:n},c=i.segmentInfoMap.get(a);c==null?i.segmentInfoMap.set(a,[o]):c.push(o)}}});var uM=w(pS=>{"use strict";m();T();N();Object.defineProperty(pS,"__esModule",{value:!0});pS.valueMatchesCriteria=fS;function fS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>fS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>fS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}});var cM=w(mS=>{"use strict";m();T();N();Object.defineProperty(mS,"__esModule",{value:!0});mS.isAsyncIterable=Hne;function Hne(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}});var lM=w(NS=>{"use strict";m();T();N();Object.defineProperty(NS,"__esModule",{value:!0});NS.isDocumentNode=Wne;var zne=Oe();function Wne(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===zne.Kind.DOCUMENT}});var dM=w(()=>{"use strict";m();T();N()});var NM=w(Wf=>{"use strict";m();T();N();Object.defineProperty(Wf,"__esModule",{value:!0});Wf.getAsyncIteratorWithCancel=pM;Wf.getAsyncIterableWithCancel=mM;Wf.withCancel=mM;var Xne=Su();function Zne(e){return Ai(this,null,function*(){return{value:e,done:!0}})}var fM=(0,Xne.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function pM(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let a=Reflect.get(n,r,i);if(r==="return"){let o=a||Zne;return function(l){return Ai(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return fM(n,a);return a}})}function mM(e,t){return new Proxy(e,{get(n,r,i){let a=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let c=Reflect.apply(a,n,[]);return pM(c,t)}:typeof a=="function"?fM(n,a):a}})}});var TM=w(TS=>{"use strict";m();T();N();Object.defineProperty(TS,"__esModule",{value:!0});TS.fixSchemaAst=rre;var ere=Oe(),tre=gO();function nre(e,t){let n=(0,tre.getDocumentNodeFromSchema)(e);return(0,ere.buildASTSchema)(n,M({},t||{}))}function rre(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=nre(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}});var EM=w(ES=>{"use strict";m();T();N();Object.defineProperty(ES,"__esModule",{value:!0});ES.extractExtensionsFromSchema=sre;var ire=ql(),ws=vc(),are=Jl();function ha(e,t){e=e||{};let a=e,{directives:n}=a,r=xR(a,["directives"]),i=M({},r);if(!t&&n!=null){let o={};for(let c in n)o[c]=[...(0,ire.asArray)(n[c])];i.directives=o}return i}function sre(e,t=!1){let n={schemaExtensions:ha(e.extensions,t),types:{}};return(0,are.mapSchema)(e,{[ws.MapperKind.OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"object",extensions:ha(r.extensions,t)},r),[ws.MapperKind.INTERFACE_TYPE]:r=>(n.types[r.name]={fields:{},type:"interface",extensions:ha(r.extensions,t)},r),[ws.MapperKind.FIELD]:(r,i,a)=>{n.types[a].fields[i]={arguments:{},extensions:ha(r.extensions,t)};let o=r.args;if(o!=null)for(let c in o)n.types[a].fields[i].arguments[c]=ha(o[c].extensions,t);return r},[ws.MapperKind.ENUM_TYPE]:r=>(n.types[r.name]={values:{},type:"enum",extensions:ha(r.extensions,t)},r),[ws.MapperKind.ENUM_VALUE]:(r,i,a,o)=>(n.types[i].values[o]=ha(r.extensions,t),r),[ws.MapperKind.SCALAR_TYPE]:r=>(n.types[r.name]={type:"scalar",extensions:ha(r.extensions,t)},r),[ws.MapperKind.UNION_TYPE]:r=>(n.types[r.name]={type:"union",extensions:ha(r.extensions,t)},r),[ws.MapperKind.INPUT_OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"input",extensions:ha(r.extensions,t)},r),[ws.MapperKind.INPUT_OBJECT_FIELD]:(r,i,a)=>(n.types[a].fields[i]={extensions:ha(r.extensions,t)},r)}),n}});var hM=w(Xf=>{"use strict";m();T();N();Object.defineProperty(Xf,"__esModule",{value:!0});Xf.addPath=ore;Xf.pathToArray=ure;Xf.printPathArray=cre;function ore(e,t,n){return{prev:e,key:t,typename:n}}function ure(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function cre(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var IM=w(yS=>{"use strict";m();T();N();Object.defineProperty(yS,"__esModule",{value:!0});yS.mergeIncrementalResult=yM;var lre=zO();function yM({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)hS(t,n,i),n[n.length-1]++;e.data&&hS(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&hS(t,["extensions"],e.extensions),e.incremental&&e.incremental.forEach(i=>{yM({incrementalResult:i,executionResult:t})})}function hS(e,t,n){let r=e,i;for(i=0;i{"use strict";m();T();N();Object.defineProperty(QT,"__esModule",{value:!0});QT.debugTimerStart=dre;QT.debugTimerEnd=fre;var gM=new Set;function dre(e){var n,r;let t=((r=(n=globalThis.process)==null?void 0:n.env)==null?void 0:r.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(gM.add(e),console.time(e))}function fre(e){gM.has(e)&&console.timeEnd(e)}});var SM=w(Zf=>{"use strict";m();T();N();Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getAbortPromise=void 0;Zf.registerAbortSignalListener=OM;var pre=qf(),vM=Su(),mre=(0,vM.memoize1)(function(t){let n=new Set;return t.addEventListener("abort",r=>{for(let i of n)i(r)},{once:!0}),n});function OM(e,t){if(e.aborted){t();return}mre(e).add(t)}Zf.getAbortPromise=(0,vM.memoize1)(function(t){return t.aborted?(0,pre.fakeRejectPromise)(t.reason):new Promise((n,r)=>{if(t.aborted){r(t.reason);return}OM(t,()=>{r(t.reason)})})})});var ya=w(Le=>{"use strict";m();T();N();Object.defineProperty(Le,"__esModule",{value:!0});Le.createDeferred=Le.fakePromise=Le.mapMaybePromise=Le.mapAsyncIterator=Le.inspect=void 0;var Ye=(RU(),Bm(AU));Ye.__exportStar(PU(),Le);Ye.__exportStar(ql(),Le);Ye.__exportStar(iO(),Le);Ye.__exportStar(sO(),Le);Ye.__exportStar(KU(),Le);Ye.__exportStar(lO(),Le);Ye.__exportStar(gO(),Le);Ye.__exportStar(sO(),Le);Ye.__exportStar(ok(),Le);Ye.__exportStar(uk(),Le);Ye.__exportStar(gk(),Le);Ye.__exportStar(Rk(),Le);Ye.__exportStar(Fk(),Le);Ye.__exportStar(Mk(),Le);Ye.__exportStar(qk(),Le);Ye.__exportStar(Vk(),Le);Ye.__exportStar(Kk(),Le);Ye.__exportStar(Gk(),Le);Ye.__exportStar(Jl(),Le);Ye.__exportStar(YO(),Le);Ye.__exportStar(wT(),Le);Ye.__exportStar(Qk(),Le);Ye.__exportStar(zO(),Le);Ye.__exportStar(vc(),Le);Ye.__exportStar(LO(),Le);Ye.__exportStar(Jk(),Le);Ye.__exportStar(Hk(),Le);Ye.__exportStar(zk(),Le);Ye.__exportStar(Wk(),Le);Ye.__exportStar(BO(),Le);Ye.__exportStar(Xk(),Le);Ye.__exportStar(DT(),Le);Ye.__exportStar(Zk(),Le);Ye.__exportStar(IT(),Le);Ye.__exportStar(tM(),Le);Ye.__exportStar(oM(),Le);Ye.__exportStar(tO(),Le);Ye.__exportStar(uM(),Le);Ye.__exportStar(cM(),Le);Ye.__exportStar(lM(),Le);Ye.__exportStar(Vf(),Le);Ye.__exportStar(dM(),Le);Ye.__exportStar(NM(),Le);Ye.__exportStar(Kf(),Le);Ye.__exportStar(OO(),Le);Ye.__exportStar(oS(),Le);var Nre=xf();Object.defineProperty(Le,"inspect",{enumerable:!0,get:function(){return Nre.inspect}});Ye.__exportStar(Su(),Le);Ye.__exportStar(TM(),Le);Ye.__exportStar(uS(),Le);Ye.__exportStar(EM(),Le);Ye.__exportStar(hM(),Le);Ye.__exportStar(vT(),Le);Ye.__exportStar(iS(),Le);Ye.__exportStar(IM(),Le);Ye.__exportStar(_M(),Le);Ye.__exportStar(rO(),Le);var YT=qf();Object.defineProperty(Le,"mapAsyncIterator",{enumerable:!0,get:function(){return YT.mapAsyncIterator}});Object.defineProperty(Le,"mapMaybePromise",{enumerable:!0,get:function(){return YT.mapMaybePromise}});Object.defineProperty(Le,"fakePromise",{enumerable:!0,get:function(){return YT.fakePromise}});Object.defineProperty(Le,"createDeferred",{enumerable:!0,get:function(){return YT.createDeferredPromise}});Ye.__exportStar(SM(),Le)});var bM=w(JT=>{"use strict";m();T();N();Object.defineProperty(JT,"__esModule",{value:!0});JT.mergeResolvers=void 0;var Tre=ya();function DM(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};let n=new Array;for(let i of e)Array.isArray(i)&&(i=DM(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Tre.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[a,o]=i.split(".");!o||o==="*"?delete r[a]:r[a]&&delete r[a][o]}return r}JT.mergeResolvers=DM});var IS=w(HT=>{"use strict";m();T();N();Object.defineProperty(HT,"__esModule",{value:!0});HT.mergeArguments=void 0;var AM=ya();function Ere(e,t,n){let r=hre([...t,...e].filter(AM.isSome),n);return n&&n.sort&&r.sort(AM.compareNodes),r}HT.mergeArguments=Ere;function hre(e,t){return e.reduce((n,r)=>{let i=n.findIndex(a=>a.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Hi=w(Xl=>{"use strict";m();T();N();Object.defineProperty(Xl,"__esModule",{value:!0});Xl.mergeDirective=Xl.mergeDirectives=void 0;var RM=Oe(),yre=ya();function Ire(e,t){return!!e.find(n=>n.name.value===t.name.value)}function PM(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function gre(e,t){return t.some(({value:n})=>n===e.value)}function FM(e,t){let n=[...t];for(let r of e){let i=n.findIndex(a=>a.name.value===r.name.value);if(i>-1){let a=n[i];if(a.value.kind==="ListValue"){let o=a.value.values,c=r.value.values;a.value.values=Dre(o,c,(l,d)=>{let p=l.value;return!p||!d.some(E=>E.value===p)})}else a.value=r.value}else n.push(r)}return n}function _re(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!PM(n,t)){let o=i[a];return n.arguments=FM(n.arguments,o.arguments),null}return n}).filter(yre.isSome)}function vre(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,c=_re([...a],r);for(let l of o)if(Ire(c,l)&&!PM(l,r)){let d=c.findIndex(E=>E.name.value===l.name.value),p=c[d];c[d].arguments=FM(l.arguments||[],p.arguments||[])}else c.push(l);return c}Xl.mergeDirectives=vre;function Ore(e,t){let n=(0,RM.print)(Q(M({},e),{description:void 0})),r=(0,RM.print)(Q(M({},t),{description:void 0})),i=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(n.replace(i,"")===r.replace(i,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". Existing directive: ${r} Received directive: - ${n}`)}function vre(e,t){return t?(_re(e,t),Q(M({},e),{locations:[...t.locations,...e.locations.filter(n=>!yre(n,t.locations))]})):e}Wl.mergeDirective=vre;function Ore(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var IS=w(JT=>{"use strict";m();T();N();Object.defineProperty(JT,"__esModule",{value:!0});JT.mergeEnumValues=void 0;var Sre=Hi(),Dre=ya();function bre(e,t,n,r){if(n!=null&&n.consistentEnumMerge){let o=[];e&&o.push(...e),e=t,t=o}let i=new Map;if(e)for(let o of e)i.set(o.name.value,o);if(t)for(let o of t){let c=o.name.value;if(i.has(c)){let l=i.get(c);l.description=o.description||l.description,l.directives=(0,Sre.mergeDirectives)(o.directives,l.directives,r)}else i.set(c,o)}let a=[...i.values()];return n&&n.sort&&a.sort(Dre.compareNodes),a}JT.mergeEnumValues=bre});var gS=w(HT=>{"use strict";m();T();N();Object.defineProperty(HT,"__esModule",{value:!0});HT.mergeEnum=void 0;var Are=Oe(),Rre=Hi(),Pre=IS();function Fre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:(0,Rre.mergeDirectives)(e.directives,t.directives,n,r),values:(0,Pre.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:Are.Kind.ENUM_TYPE_DEFINITION}):e}HT.mergeEnum=Fre});var zT=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.defaultStringComparator=Kn.CompareVal=Kn.printTypeNode=Kn.isNonNullTypeNode=Kn.isListTypeNode=Kn.isWrappingTypeNode=Kn.extractType=Kn.isSourceTypes=Kn.isStringTypes=void 0;var Zf=Oe();function wre(e){return typeof e=="string"}Kn.isStringTypes=wre;function Lre(e){return e instanceof Zf.Source}Kn.isSourceTypes=Lre;function Cre(e){let t=e;for(;t.kind===Zf.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Kn.extractType=Cre;function Bre(e){return e.kind!==Zf.Kind.NAMED_TYPE}Kn.isWrappingTypeNode=Bre;function PM(e){return e.kind===Zf.Kind.LIST_TYPE}Kn.isListTypeNode=PM;function FM(e){return e.kind===Zf.Kind.NON_NULL_TYPE}Kn.isNonNullTypeNode=FM;function _S(e){return PM(e)?`[${_S(e.type)}]`:FM(e)?`${_S(e.type)}!`:e.name.value}Kn.printTypeNode=_S;var Dc;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(Dc=Kn.CompareVal||(Kn.CompareVal={}));function Ure(e,t){return e==null&&t==null?Dc.A_EQUALS_B:e==null?Dc.A_SMALLER_THAN_B:t==null?Dc.A_GREATER_THAN_B:et?Dc.A_GREATER_THAN_B:Dc.A_EQUALS_B}Kn.defaultStringComparator=Ure});var tp=w(WT=>{"use strict";m();T();N();Object.defineProperty(WT,"__esModule",{value:!0});WT.mergeFields=void 0;var ni=zT(),kre=Hi(),Mre=ya(),xre=yS();function qre(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Vre(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[c,l]=qre(a,o);if(c&&!(r!=null&&r.ignoreFieldConflicts)){let d=(r==null?void 0:r.onFieldTypeConflict)&&r.onFieldTypeConflict(c,o,e,r==null?void 0:r.throwOnConflict)||jre(e,c,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,xre.mergeArguments)(o.arguments||[],c.arguments||[],r),d.directives=(0,kre.mergeDirectives)(o.directives,c.directives,r,i),d.description=o.description||c.description,a[l]=d}else a.push(o)}if(r&&r.sort&&a.sort(Mre.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(c=>!o.includes(`${e.name.value}.${c.name.value}`))}return a}WT.mergeFields=Vre;function jre(e,t,n,r=!1){let i=(0,ni.printTypeNode)(t.type),a=(0,ni.printTypeNode)(n.type);if(i!==a){let o=(0,ni.extractType)(t.type),c=(0,ni.extractType)(n.type);if(o.name.value!==c.name.value)throw new Error(`Field "${n.name.value}" already defined with a different type. Declared as "${o.name.value}", but you tried to override with "${c.name.value}"`);if(!ep(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,ni.isNonNullTypeNode)(n.type)&&!(0,ni.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function ep(e,t,n=!1){if(!(0,ni.isWrappingTypeNode)(e)&&!(0,ni.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,ni.isNonNullTypeNode)(t)){let r=(0,ni.isNonNullTypeNode)(e)?e.type:e;return ep(r,t.type)}return(0,ni.isNonNullTypeNode)(e)?ep(t,e,n):(0,ni.isListTypeNode)(e)?(0,ni.isListTypeNode)(t)&&ep(e.type,t.type)||(0,ni.isNonNullTypeNode)(t)&&ep(e,t.type):!1}});var vS=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.mergeInputType=void 0;var Kre=Oe(),Gre=tp(),$re=Hi();function Qre(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:(0,Gre.mergeFields)(e,e.fields,t.fields,n),directives:(0,$re.mergeDirectives)(e.directives,t.directives,n,r)}}catch(i){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?Q(M({},e),{kind:Kre.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}XT.mergeInputType=Qre});var np=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.mergeNamedTypeArray=void 0;var Yre=ya();function Jre(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Hre(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!Jre(t,i))];return n&&n.sort&&r.sort(Yre.compareNodes),r}ZT.mergeNamedTypeArray=Hre});var OS=w(eE=>{"use strict";m();T();N();Object.defineProperty(eE,"__esModule",{value:!0});eE.mergeInterface=void 0;var zre=Oe(),Wre=tp(),Xre=Hi(),Zre=np();function eie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:(0,Wre.mergeFields)(e,e.fields,t.fields,n),directives:(0,Xre.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,Zre.mergeNamedTypeArray)(e.interfaces,t.interfaces,n):void 0}}catch(i){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?Q(M({},e),{kind:zre.Kind.INTERFACE_TYPE_DEFINITION}):e}eE.mergeInterface=eie});var SS=w(tE=>{"use strict";m();T();N();Object.defineProperty(tE,"__esModule",{value:!0});tE.mergeType=void 0;var tie=Oe(),nie=tp(),rie=Hi(),iie=np();function aie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:(0,nie.mergeFields)(e,e.fields,t.fields,n),directives:(0,rie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,iie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n)}}catch(i){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?Q(M({},e),{kind:tie.Kind.OBJECT_TYPE_DEFINITION}):e}tE.mergeType=aie});var DS=w(nE=>{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.mergeScalar=void 0;var sie=Oe(),oie=Hi();function uie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:(0,oie.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:sie.Kind.SCALAR_TYPE_DEFINITION}):e}nE.mergeScalar=uie});var AS=w(rE=>{"use strict";m();T();N();Object.defineProperty(rE,"__esModule",{value:!0});rE.mergeUnion=void 0;var bS=Oe(),cie=Hi(),lie=np();function die(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,cie.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?bS.Kind.UNION_TYPE_DEFINITION:bS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,lie.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:bS.Kind.UNION_TYPE_DEFINITION}):e}rE.mergeUnion=die});var RS=w(bc=>{"use strict";m();T();N();Object.defineProperty(bc,"__esModule",{value:!0});bc.mergeSchemaDefs=bc.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var rp=Oe(),fie=Hi();bc.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function pie(e=[],t=[]){let n=[];for(let r in bc.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(a=>a.operation===r)||t.find(a=>a.operation===r);i&&n.push(i)}return n}function mie(e,t,n,r){return t?{kind:e.kind===rp.Kind.SCHEMA_DEFINITION||t.kind===rp.Kind.SCHEMA_DEFINITION?rp.Kind.SCHEMA_DEFINITION:rp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,fie.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:pie(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:rp.Kind.SCHEMA_DEFINITION}):e}bc.mergeSchemaDefs=mie});var PS=w(Wa=>{"use strict";m();T();N();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.mergeGraphQLNodes=Wa.isNamedDefinitionNode=Wa.schemaDefSymbol=void 0;var jr=Oe(),Nie=SS(),Tie=gS(),Eie=DS(),hie=AS(),yie=vS(),Iie=OS(),gie=Hi(),_ie=RS(),vie=ya();Wa.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function wM(e){return"name"in e}Wa.isNamedDefinitionNode=wM;function Oie(e,t,n={}){var i,a,o;let r=n;for(let c of e)if(wM(c)){let l=(i=c.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,vie.collectComment)(c),l==null)continue;if((a=t==null?void 0:t.exclusions)!=null&&a.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(c.kind){case jr.Kind.OBJECT_TYPE_DEFINITION:case jr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Nie.mergeType)(c,r[l],t,n);break;case jr.Kind.ENUM_TYPE_DEFINITION:case jr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,Tie.mergeEnum)(c,r[l],t,n);break;case jr.Kind.UNION_TYPE_DEFINITION:case jr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,hie.mergeUnion)(c,r[l],t,n);break;case jr.Kind.SCALAR_TYPE_DEFINITION:case jr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,Eie.mergeScalar)(c,r[l],t,n);break;case jr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case jr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,yie.mergeInputType)(c,r[l],t,n);break;case jr.Kind.INTERFACE_TYPE_DEFINITION:case jr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Iie.mergeInterface)(c,r[l],t,n);break;case jr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,gie.mergeDirective)(c,r[l]);break}}else(c.kind===jr.Kind.SCHEMA_DEFINITION||c.kind===jr.Kind.SCHEMA_EXTENSION)&&(r[Wa.schemaDefSymbol]=(0,_ie.mergeSchemaDefs)(c,r[Wa.schemaDefSymbol],t));return r}Wa.mergeGraphQLNodes=Oie});var BM=w(td=>{"use strict";m();T();N();Object.defineProperty(td,"__esModule",{value:!0});td.mergeGraphQLTypes=td.mergeTypeDefs=void 0;var zi=Oe(),FS=zT(),Xl=PS(),ed=ya(),LM=RS();function Sie(e,t){(0,ed.resetComments)();let n={kind:zi.Kind.DOCUMENT,definitions:CM(e,M({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,ed.printWithComments)(n):r=n,(0,ed.resetComments)(),r}td.mergeTypeDefs=Sie;function Zl(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")Zl(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)Zl(a,t,n,r,i);else if((0,zi.isSchema)(e)){let a=(0,ed.getDocumentNodeFromSchema)(e,t);Zl(a.definitions,t,n,r,i)}else if((0,FS.isStringTypes)(e)||(0,FS.isSourceTypes)(e)){let a=(0,zi.parse)(e,t);Zl(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,zi.isDefinitionNode)(e))e.kind===zi.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,ed.isDocumentNode)(e))Zl(e.definitions,t,n,r,i);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return{allDirectives:n,allNodes:r}}function CM(e,t){var c,l,d;(0,ed.resetComments)();let{allDirectives:n,allNodes:r}=Zl(e,t),i=(0,Xl.mergeGraphQLNodes)(n,t),a=(0,Xl.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=a[Xl.schemaDefSymbol]||{kind:zi.Kind.SCHEMA_DEFINITION,operationTypes:[]},E=p.operationTypes;for(let I in LM.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!E.find(A=>A.operation===I)){let A=LM.DEFAULT_OPERATION_TYPE_NAME_MAP[I],U=a[A];U!=null&&U.name!=null&&E.push({kind:zi.Kind.OPERATION_TYPE_DEFINITION,type:{kind:zi.Kind.NAMED_TYPE,name:U.name},operation:I})}((c=p==null?void 0:p.operationTypes)==null?void 0:c.length)!=null&&p.operationTypes.length>0&&(a[Xl.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[Xl.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[Xl.schemaDefSymbol]={kind:zi.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:zi.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:zi.Kind.NAMED_TYPE,name:{kind:zi.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:FS.defaultStringComparator;o.sort((E,I)=>{var v,A;return p((v=E.name)==null?void 0:v.value,(A=I.name)==null?void 0:A.value)})}return o}td.mergeGraphQLTypes=CM});var UM=w(Cr=>{"use strict";m();T();N();Object.defineProperty(Cr,"__esModule",{value:!0});var ri=($v(),Lm(Gv));ri.__exportStar(yS(),Cr);ri.__exportStar(Hi(),Cr);ri.__exportStar(IS(),Cr);ri.__exportStar(gS(),Cr);ri.__exportStar(tp(),Cr);ri.__exportStar(vS(),Cr);ri.__exportStar(OS(),Cr);ri.__exportStar(np(),Cr);ri.__exportStar(PS(),Cr);ri.__exportStar(BM(),Cr);ri.__exportStar(DS(),Cr);ri.__exportStar(SS(),Cr);ri.__exportStar(AS(),Cr);ri.__exportStar(zT(),Cr)});var MM=w(Du=>{"use strict";m();T();N();Object.defineProperty(Du,"__esModule",{value:!0});Du.applyExtensions=Du.mergeExtensions=Du.extractExtensionsFromSchema=void 0;var kM=ya(),Die=ya();Object.defineProperty(Du,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return Die.extractExtensionsFromSchema}});function bie(e){return(0,kM.mergeDeep)(e)}Du.mergeExtensions=bie;function nd(e,t){e&&(e.extensions=(0,kM.mergeDeep)([e.extensions||{},t||{}]))}function Aie(e,t){nd(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(nd(i,r.extensions),r.type==="object"||r.type==="interface")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];if(c){nd(c,o.extensions);for(let[l,d]of Object.entries(o.arguments))nd(c.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];nd(c,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let c=i.getValue(a);nd(c,o)}}}return e}Du.applyExtensions=Aie});var iE=w(ip=>{"use strict";m();T();N();Object.defineProperty(ip,"__esModule",{value:!0});var wS=($v(),Lm(Gv));wS.__exportStar(SM(),ip);wS.__exportStar(UM(),ip);wS.__exportStar(MM(),ip)});var qi=w(z=>{"use strict";m();T();N();Object.defineProperty(z,"__esModule",{value:!0});z.semanticNonNullArgumentErrorMessage=z.invalidEventProviderIdErrorMessage=z.invalidNatsStreamConfigurationDefinitionErrorMessage=z.invalidEdfsPublishResultObjectErrorMessage=z.invalidNatsStreamInputErrorMessage=z.inlineFragmentInFieldSetErrorMessage=z.inaccessibleQueryRootTypeError=z.subgraphValidationFailureError=z.minimumSubgraphRequirementError=void 0;z.multipleNamedTypeDefinitionError=Fie;z.incompatibleInputValueDefaultValueTypeError=wie;z.incompatibleMergedTypesError=Lie;z.incompatibleInputValueDefaultValuesError=Cie;z.incompatibleSharedEnumError=Bie;z.invalidSubgraphNamesError=Uie;z.duplicateDirectiveDefinitionError=kie;z.duplicateEnumValueDefinitionError=Mie;z.duplicateFieldDefinitionError=xie;z.duplicateInputFieldDefinitionError=qie;z.duplicateImplementedInterfaceError=Vie;z.duplicateUnionMemberDefinitionError=jie;z.duplicateTypeDefinitionError=Kie;z.duplicateOperationTypeDefinitionError=Gie;z.noBaseDefinitionForExtensionError=$ie;z.noBaseScalarDefinitionError=Qie;z.noDefinedUnionMembersError=Yie;z.noDefinedEnumValuesError=Jie;z.operationDefinitionError=Hie;z.invalidFieldShareabilityError=zie;z.undefinedDirectiveError=Wie;z.undefinedTypeError=Xie;z.invalidRepeatedDirectiveErrorMessage=Zie;z.invalidDirectiveError=eae;z.invalidRepeatedFederatedDirectiveErrorMessage=tae;z.invalidDirectiveLocationErrorMessage=nae;z.undefinedRequiredArgumentsErrorMessage=rae;z.unexpectedDirectiveArgumentErrorMessage=iae;z.duplicateDirectiveArgumentDefinitionsErrorMessage=aae;z.invalidArgumentValueErrorMessage=sae;z.maximumTypeNestingExceededError=oae;z.unexpectedKindFatalError=uae;z.incompatibleParentKindFatalError=cae;z.unexpectedEdgeFatalError=lae;z.incompatibleParentTypeMergeError=fae;z.unexpectedTypeNodeKindFatalError=pae;z.invalidKeyFatalError=mae;z.unexpectedParentKindForChildError=Nae;z.subgraphValidationError=Tae;z.invalidSubgraphNameErrorMessage=Eae;z.invalidOperationTypeDefinitionError=hae;z.invalidRootTypeDefinitionError=yae;z.subgraphInvalidSyntaxError=Iae;z.invalidInterfaceImplementationError=gae;z.invalidRequiredInputValueError=_ae;z.duplicateArgumentsError=vae;z.noQueryRootTypeError=Oae;z.expectedEntityError=Sae;z.abstractTypeInKeyFieldSetErrorMessage=Dae;z.unknownTypeInFieldSetErrorMessage=bae;z.invalidSelectionSetErrorMessage=Aae;z.invalidSelectionSetDefinitionErrorMessage=Rae;z.undefinedFieldInFieldSetErrorMessage=Pae;z.unparsableFieldSetErrorMessage=Fae;z.unparsableFieldSetSelectionErrorMessage=wae;z.undefinedCompositeOutputTypeError=Lae;z.unexpectedArgumentErrorMessage=Cae;z.argumentsInKeyFieldSetErrorMessage=Bae;z.invalidProvidesOrRequiresDirectivesError=Uae;z.duplicateFieldInFieldSetErrorMessage=kae;z.invalidConfigurationDataErrorMessage=Mae;z.incompatibleTypeWithProvidesErrorMessage=xae;z.invalidInlineFragmentTypeErrorMessage=qae;z.inlineFragmentWithoutTypeConditionErrorMessage=Vae;z.unknownInlineFragmentTypeConditionErrorMessage=jae;z.invalidInlineFragmentTypeConditionTypeErrorMessage=Kae;z.invalidInlineFragmentTypeConditionErrorMessage=Gae;z.invalidSelectionOnUnionErrorMessage=$ae;z.duplicateOverriddenFieldErrorMessage=Qae;z.duplicateOverriddenFieldsError=Yae;z.noFieldDefinitionsError=Jae;z.noInputValueDefinitionsError=Hae;z.allChildDefinitionsAreInaccessibleError=zae;z.equivalentSourceAndTargetOverrideErrorMessage=Wae;z.undefinedEntityInterfaceImplementationsError=Xae;z.orScopesLimitError=Zae;z.invalidEventDrivenGraphError=ese;z.invalidRootTypeFieldEventsDirectivesErrorMessage=tse;z.invalidEventDrivenMutationResponseTypeErrorMessage=nse;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=rse;z.invalidNatsStreamInputFieldsErrorMessage=ise;z.invalidKeyFieldSetsEventDrivenErrorMessage=ase;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=sse;z.nonKeyFieldNamesEventDrivenErrorMessage=ose;z.nonEntityObjectExtensionsEventDrivenErrorMessage=use;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=cse;z.invalidEdfsDirectiveName=lse;z.invalidImplementedTypeError=dse;z.selfImplementationError=fse;z.invalidEventSubjectErrorMessage=pse;z.invalidEventSubjectsErrorMessage=mse;z.invalidEventSubjectsItemErrorMessage=Nse;z.invalidEventSubjectsArgumentErrorMessage=Tse;z.undefinedEventSubjectsArgumentErrorMessage=Ese;z.invalidEventDirectiveError=hse;z.invalidReferencesOfInaccessibleTypeError=yse;z.inaccessibleRequiredInputValueError=Ise;z.invalidUnionMemberTypeError=gse;z.invalidRootTypeError=_se;z.invalidSubscriptionFilterLocationError=vse;z.invalidSubscriptionFilterDirectiveError=Ose;z.subscriptionFilterNamedTypeErrorMessage=Sse;z.subscriptionFilterConditionDepthExceededErrorMessage=Dse;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=bse;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=Ase;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=Rse;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Pse;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Fse;z.invalidInputFieldTypeErrorMessage=wse;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Lse;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Cse;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Bse;z.unknownFieldSubgraphNameError=Use;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=kse;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Mse;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=xse;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=qse;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Vse;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=jse;z.unresolvablePathError=Kse;z.allExternalFieldInstancesError=Gse;z.externalInterfaceFieldsError=$se;z.nonExternalConditionalFieldError=Qse;z.incompatibleFederatedFieldNamedTypeError=Yse;z.unknownNamedTypeErrorMessage=GM;z.unknownNamedTypeError=Jse;z.unknownFieldDataError=Hse;z.unexpectedNonCompositeOutputTypeError=zse;z.invalidExternalDirectiveError=Wse;z.configureDescriptionNoDescriptionError=Xse;z.configureDescriptionPropagationError=Zse;z.duplicateDirectiveDefinitionArgumentErrorMessage=eoe;z.duplicateDirectiveDefinitionLocationErrorMessage=toe;z.invalidDirectiveDefinitionLocationErrorMessage=noe;z.invalidDirectiveDefinitionError=roe;z.typeNameAlreadyProvidedErrorMessage=ioe;z.fieldAlreadyProvidedErrorMessage=aoe;z.invalidInterfaceObjectImplementationDefinitionsError=soe;z.invalidNamedTypeError=ooe;z.semanticNonNullLevelsNaNIndexErrorMessage=uoe;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=coe;z.semanticNonNullLevelsNonNullErrorMessage=loe;z.semanticNonNullInconsistentLevelsError=doe;z.oneOfRequiredFieldsError=foe;var xM=Oe(),Je=zn(),qM=wl(),Ac=Fr(),Rie=Ul(),Pie=iE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function Fie(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". -However, there must be only one type named "${e}".`)}function wie(e,t,n,r){return new Error(`The ${e} of type "${n}" defined on path "${t}" is incompatible with the default value of "${r}".`)}function Lie({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":Je.FIELD} "${t}": - Expected type "${n}" but received "${e}".`)}function Cie(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". + ${n}`)}function Sre(e,t){return t?(Ore(e,t),Q(M({},e),{locations:[...t.locations,...e.locations.filter(n=>!gre(n,t.locations))]})):e}Xl.mergeDirective=Sre;function Dre(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var gS=w(zT=>{"use strict";m();T();N();Object.defineProperty(zT,"__esModule",{value:!0});zT.mergeEnumValues=void 0;var bre=Hi(),Are=ya();function Rre(e,t,n,r){if(n!=null&&n.consistentEnumMerge){let o=[];e&&o.push(...e),e=t,t=o}let i=new Map;if(e)for(let o of e)i.set(o.name.value,o);if(t)for(let o of t){let c=o.name.value;if(i.has(c)){let l=i.get(c);l.description=o.description||l.description,l.directives=(0,bre.mergeDirectives)(o.directives,l.directives,r)}else i.set(c,o)}let a=[...i.values()];return n&&n.sort&&a.sort(Are.compareNodes),a}zT.mergeEnumValues=Rre});var _S=w(WT=>{"use strict";m();T();N();Object.defineProperty(WT,"__esModule",{value:!0});WT.mergeEnum=void 0;var Pre=Oe(),Fre=Hi(),wre=gS();function Lre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:(0,Fre.mergeDirectives)(e.directives,t.directives,n,r),values:(0,wre.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:Pre.Kind.ENUM_TYPE_DEFINITION}):e}WT.mergeEnum=Lre});var XT=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.defaultStringComparator=Kn.CompareVal=Kn.printTypeNode=Kn.isNonNullTypeNode=Kn.isListTypeNode=Kn.isWrappingTypeNode=Kn.extractType=Kn.isSourceTypes=Kn.isStringTypes=void 0;var ep=Oe();function Cre(e){return typeof e=="string"}Kn.isStringTypes=Cre;function Bre(e){return e instanceof ep.Source}Kn.isSourceTypes=Bre;function Ure(e){let t=e;for(;t.kind===ep.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Kn.extractType=Ure;function kre(e){return e.kind!==ep.Kind.NAMED_TYPE}Kn.isWrappingTypeNode=kre;function wM(e){return e.kind===ep.Kind.LIST_TYPE}Kn.isListTypeNode=wM;function LM(e){return e.kind===ep.Kind.NON_NULL_TYPE}Kn.isNonNullTypeNode=LM;function vS(e){return wM(e)?`[${vS(e.type)}]`:LM(e)?`${vS(e.type)}!`:e.name.value}Kn.printTypeNode=vS;var bc;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(bc=Kn.CompareVal||(Kn.CompareVal={}));function Mre(e,t){return e==null&&t==null?bc.A_EQUALS_B:e==null?bc.A_SMALLER_THAN_B:t==null?bc.A_GREATER_THAN_B:et?bc.A_GREATER_THAN_B:bc.A_EQUALS_B}Kn.defaultStringComparator=Mre});var np=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.mergeFields=void 0;var ni=XT(),xre=Hi(),qre=ya(),Vre=IS();function jre(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Kre(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[c,l]=jre(a,o);if(c&&!(r!=null&&r.ignoreFieldConflicts)){let d=(r==null?void 0:r.onFieldTypeConflict)&&r.onFieldTypeConflict(c,o,e,r==null?void 0:r.throwOnConflict)||Gre(e,c,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Vre.mergeArguments)(o.arguments||[],c.arguments||[],r),d.directives=(0,xre.mergeDirectives)(o.directives,c.directives,r,i),d.description=o.description||c.description,a[l]=d}else a.push(o)}if(r&&r.sort&&a.sort(qre.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(c=>!o.includes(`${e.name.value}.${c.name.value}`))}return a}ZT.mergeFields=Kre;function Gre(e,t,n,r=!1){let i=(0,ni.printTypeNode)(t.type),a=(0,ni.printTypeNode)(n.type);if(i!==a){let o=(0,ni.extractType)(t.type),c=(0,ni.extractType)(n.type);if(o.name.value!==c.name.value)throw new Error(`Field "${n.name.value}" already defined with a different type. Declared as "${o.name.value}", but you tried to override with "${c.name.value}"`);if(!tp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,ni.isNonNullTypeNode)(n.type)&&!(0,ni.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function tp(e,t,n=!1){if(!(0,ni.isWrappingTypeNode)(e)&&!(0,ni.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,ni.isNonNullTypeNode)(t)){let r=(0,ni.isNonNullTypeNode)(e)?e.type:e;return tp(r,t.type)}return(0,ni.isNonNullTypeNode)(e)?tp(t,e,n):(0,ni.isListTypeNode)(e)?(0,ni.isListTypeNode)(t)&&tp(e.type,t.type)||(0,ni.isNonNullTypeNode)(t)&&tp(e,t.type):!1}});var OS=w(eE=>{"use strict";m();T();N();Object.defineProperty(eE,"__esModule",{value:!0});eE.mergeInputType=void 0;var $re=Oe(),Qre=np(),Yre=Hi();function Jre(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:(0,Qre.mergeFields)(e,e.fields,t.fields,n),directives:(0,Yre.mergeDirectives)(e.directives,t.directives,n,r)}}catch(i){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?Q(M({},e),{kind:$re.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}eE.mergeInputType=Jre});var rp=w(tE=>{"use strict";m();T();N();Object.defineProperty(tE,"__esModule",{value:!0});tE.mergeNamedTypeArray=void 0;var Hre=ya();function zre(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Wre(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!zre(t,i))];return n&&n.sort&&r.sort(Hre.compareNodes),r}tE.mergeNamedTypeArray=Wre});var SS=w(nE=>{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.mergeInterface=void 0;var Xre=Oe(),Zre=np(),eie=Hi(),tie=rp();function nie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:(0,Zre.mergeFields)(e,e.fields,t.fields,n),directives:(0,eie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,tie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n):void 0}}catch(i){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?Q(M({},e),{kind:Xre.Kind.INTERFACE_TYPE_DEFINITION}):e}nE.mergeInterface=nie});var DS=w(rE=>{"use strict";m();T();N();Object.defineProperty(rE,"__esModule",{value:!0});rE.mergeType=void 0;var rie=Oe(),iie=np(),aie=Hi(),sie=rp();function oie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:(0,iie.mergeFields)(e,e.fields,t.fields,n),directives:(0,aie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,sie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n)}}catch(i){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?Q(M({},e),{kind:rie.Kind.OBJECT_TYPE_DEFINITION}):e}rE.mergeType=oie});var bS=w(iE=>{"use strict";m();T();N();Object.defineProperty(iE,"__esModule",{value:!0});iE.mergeScalar=void 0;var uie=Oe(),cie=Hi();function lie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:(0,cie.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:uie.Kind.SCALAR_TYPE_DEFINITION}):e}iE.mergeScalar=lie});var RS=w(aE=>{"use strict";m();T();N();Object.defineProperty(aE,"__esModule",{value:!0});aE.mergeUnion=void 0;var AS=Oe(),die=Hi(),fie=rp();function pie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,die.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?AS.Kind.UNION_TYPE_DEFINITION:AS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,fie.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:AS.Kind.UNION_TYPE_DEFINITION}):e}aE.mergeUnion=pie});var PS=w(Ac=>{"use strict";m();T();N();Object.defineProperty(Ac,"__esModule",{value:!0});Ac.mergeSchemaDefs=Ac.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var ip=Oe(),mie=Hi();Ac.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Nie(e=[],t=[]){let n=[];for(let r in Ac.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(a=>a.operation===r)||t.find(a=>a.operation===r);i&&n.push(i)}return n}function Tie(e,t,n,r){return t?{kind:e.kind===ip.Kind.SCHEMA_DEFINITION||t.kind===ip.Kind.SCHEMA_DEFINITION?ip.Kind.SCHEMA_DEFINITION:ip.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,mie.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Nie(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?Q(M({},e),{kind:ip.Kind.SCHEMA_DEFINITION}):e}Ac.mergeSchemaDefs=Tie});var FS=w(Wa=>{"use strict";m();T();N();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.mergeGraphQLNodes=Wa.isNamedDefinitionNode=Wa.schemaDefSymbol=void 0;var jr=Oe(),Eie=DS(),hie=_S(),yie=bS(),Iie=RS(),gie=OS(),_ie=SS(),vie=Hi(),Oie=PS(),Sie=ya();Wa.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function CM(e){return"name"in e}Wa.isNamedDefinitionNode=CM;function Die(e,t,n={}){var i,a,o;let r=n;for(let c of e)if(CM(c)){let l=(i=c.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Sie.collectComment)(c),l==null)continue;if((a=t==null?void 0:t.exclusions)!=null&&a.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(c.kind){case jr.Kind.OBJECT_TYPE_DEFINITION:case jr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Eie.mergeType)(c,r[l],t,n);break;case jr.Kind.ENUM_TYPE_DEFINITION:case jr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,hie.mergeEnum)(c,r[l],t,n);break;case jr.Kind.UNION_TYPE_DEFINITION:case jr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Iie.mergeUnion)(c,r[l],t,n);break;case jr.Kind.SCALAR_TYPE_DEFINITION:case jr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,yie.mergeScalar)(c,r[l],t,n);break;case jr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case jr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,gie.mergeInputType)(c,r[l],t,n);break;case jr.Kind.INTERFACE_TYPE_DEFINITION:case jr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,_ie.mergeInterface)(c,r[l],t,n);break;case jr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,vie.mergeDirective)(c,r[l]);break}}else(c.kind===jr.Kind.SCHEMA_DEFINITION||c.kind===jr.Kind.SCHEMA_EXTENSION)&&(r[Wa.schemaDefSymbol]=(0,Oie.mergeSchemaDefs)(c,r[Wa.schemaDefSymbol],t));return r}Wa.mergeGraphQLNodes=Die});var kM=w(nd=>{"use strict";m();T();N();Object.defineProperty(nd,"__esModule",{value:!0});nd.mergeGraphQLTypes=nd.mergeTypeDefs=void 0;var zi=Oe(),wS=XT(),Zl=FS(),td=ya(),BM=PS();function bie(e,t){(0,td.resetComments)();let n={kind:zi.Kind.DOCUMENT,definitions:UM(e,M({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,td.printWithComments)(n):r=n,(0,td.resetComments)(),r}nd.mergeTypeDefs=bie;function ed(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")ed(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)ed(a,t,n,r,i);else if((0,zi.isSchema)(e)){let a=(0,td.getDocumentNodeFromSchema)(e,t);ed(a.definitions,t,n,r,i)}else if((0,wS.isStringTypes)(e)||(0,wS.isSourceTypes)(e)){let a=(0,zi.parse)(e,t);ed(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,zi.isDefinitionNode)(e))e.kind===zi.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,td.isDocumentNode)(e))ed(e.definitions,t,n,r,i);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return{allDirectives:n,allNodes:r}}function UM(e,t){var c,l,d;(0,td.resetComments)();let{allDirectives:n,allNodes:r}=ed(e,t),i=(0,Zl.mergeGraphQLNodes)(n,t),a=(0,Zl.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=a[Zl.schemaDefSymbol]||{kind:zi.Kind.SCHEMA_DEFINITION,operationTypes:[]},E=p.operationTypes;for(let I in BM.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!E.find(A=>A.operation===I)){let A=BM.DEFAULT_OPERATION_TYPE_NAME_MAP[I],U=a[A];U!=null&&U.name!=null&&E.push({kind:zi.Kind.OPERATION_TYPE_DEFINITION,type:{kind:zi.Kind.NAMED_TYPE,name:U.name},operation:I})}((c=p==null?void 0:p.operationTypes)==null?void 0:c.length)!=null&&p.operationTypes.length>0&&(a[Zl.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[Zl.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[Zl.schemaDefSymbol]={kind:zi.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:zi.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:zi.Kind.NAMED_TYPE,name:{kind:zi.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:wS.defaultStringComparator;o.sort((E,I)=>{var v,A;return p((v=E.name)==null?void 0:v.value,(A=I.name)==null?void 0:A.value)})}return o}nd.mergeGraphQLTypes=UM});var MM=w(Cr=>{"use strict";m();T();N();Object.defineProperty(Cr,"__esModule",{value:!0});var ri=(Qv(),Bm($v));ri.__exportStar(IS(),Cr);ri.__exportStar(Hi(),Cr);ri.__exportStar(gS(),Cr);ri.__exportStar(_S(),Cr);ri.__exportStar(np(),Cr);ri.__exportStar(OS(),Cr);ri.__exportStar(SS(),Cr);ri.__exportStar(rp(),Cr);ri.__exportStar(FS(),Cr);ri.__exportStar(kM(),Cr);ri.__exportStar(bS(),Cr);ri.__exportStar(DS(),Cr);ri.__exportStar(RS(),Cr);ri.__exportStar(XT(),Cr)});var qM=w(bu=>{"use strict";m();T();N();Object.defineProperty(bu,"__esModule",{value:!0});bu.applyExtensions=bu.mergeExtensions=bu.extractExtensionsFromSchema=void 0;var xM=ya(),Aie=ya();Object.defineProperty(bu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return Aie.extractExtensionsFromSchema}});function Rie(e){return(0,xM.mergeDeep)(e)}bu.mergeExtensions=Rie;function rd(e,t){e&&(e.extensions=(0,xM.mergeDeep)([e.extensions||{},t||{}]))}function Pie(e,t){rd(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(rd(i,r.extensions),r.type==="object"||r.type==="interface")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];if(c){rd(c,o.extensions);for(let[l,d]of Object.entries(o.arguments))rd(c.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];rd(c,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let c=i.getValue(a);rd(c,o)}}}return e}bu.applyExtensions=Pie});var sE=w(ap=>{"use strict";m();T();N();Object.defineProperty(ap,"__esModule",{value:!0});var LS=(Qv(),Bm($v));LS.__exportStar(bM(),ap);LS.__exportStar(MM(),ap);LS.__exportStar(qM(),ap)});var qi=w(z=>{"use strict";m();T();N();Object.defineProperty(z,"__esModule",{value:!0});z.semanticNonNullArgumentErrorMessage=z.invalidEventProviderIdErrorMessage=z.invalidNatsStreamConfigurationDefinitionErrorMessage=z.invalidEdfsPublishResultObjectErrorMessage=z.invalidNatsStreamInputErrorMessage=z.inlineFragmentInFieldSetErrorMessage=z.inaccessibleQueryRootTypeError=z.subgraphValidationFailureError=z.minimumSubgraphRequirementError=void 0;z.multipleNamedTypeDefinitionError=Lie;z.incompatibleInputValueDefaultValueTypeError=Cie;z.incompatibleMergedTypesError=Bie;z.incompatibleInputValueDefaultValuesError=Uie;z.incompatibleSharedEnumError=kie;z.invalidSubgraphNamesError=Mie;z.duplicateDirectiveDefinitionError=xie;z.duplicateEnumValueDefinitionError=qie;z.duplicateFieldDefinitionError=Vie;z.duplicateInputFieldDefinitionError=jie;z.duplicateImplementedInterfaceError=Kie;z.duplicateUnionMemberDefinitionError=Gie;z.duplicateTypeDefinitionError=$ie;z.duplicateOperationTypeDefinitionError=Qie;z.noBaseDefinitionForExtensionError=Yie;z.noBaseScalarDefinitionError=Jie;z.noDefinedUnionMembersError=Hie;z.noDefinedEnumValuesError=zie;z.operationDefinitionError=Wie;z.invalidFieldShareabilityError=Xie;z.undefinedDirectiveError=Zie;z.undefinedTypeError=eae;z.invalidRepeatedDirectiveErrorMessage=tae;z.invalidDirectiveError=nae;z.invalidRepeatedFederatedDirectiveErrorMessage=rae;z.invalidDirectiveLocationErrorMessage=iae;z.undefinedRequiredArgumentsErrorMessage=aae;z.unexpectedDirectiveArgumentErrorMessage=sae;z.duplicateDirectiveArgumentDefinitionsErrorMessage=oae;z.invalidArgumentValueErrorMessage=uae;z.maximumTypeNestingExceededError=cae;z.unexpectedKindFatalError=lae;z.incompatibleParentKindFatalError=dae;z.unexpectedEdgeFatalError=fae;z.incompatibleParentTypeMergeError=mae;z.unexpectedTypeNodeKindFatalError=Nae;z.invalidKeyFatalError=Tae;z.unexpectedParentKindForChildError=Eae;z.subgraphValidationError=hae;z.invalidSubgraphNameErrorMessage=yae;z.invalidOperationTypeDefinitionError=Iae;z.invalidRootTypeDefinitionError=gae;z.subgraphInvalidSyntaxError=_ae;z.invalidInterfaceImplementationError=vae;z.invalidRequiredInputValueError=Oae;z.duplicateArgumentsError=Sae;z.noQueryRootTypeError=Dae;z.expectedEntityError=bae;z.abstractTypeInKeyFieldSetErrorMessage=Aae;z.unknownTypeInFieldSetErrorMessage=Rae;z.invalidSelectionSetErrorMessage=Pae;z.invalidSelectionSetDefinitionErrorMessage=Fae;z.undefinedFieldInFieldSetErrorMessage=wae;z.unparsableFieldSetErrorMessage=Lae;z.unparsableFieldSetSelectionErrorMessage=Cae;z.undefinedCompositeOutputTypeError=Bae;z.unexpectedArgumentErrorMessage=Uae;z.argumentsInKeyFieldSetErrorMessage=kae;z.invalidProvidesOrRequiresDirectivesError=Mae;z.duplicateFieldInFieldSetErrorMessage=xae;z.invalidConfigurationDataErrorMessage=qae;z.incompatibleTypeWithProvidesErrorMessage=Vae;z.invalidInlineFragmentTypeErrorMessage=jae;z.inlineFragmentWithoutTypeConditionErrorMessage=Kae;z.unknownInlineFragmentTypeConditionErrorMessage=Gae;z.invalidInlineFragmentTypeConditionTypeErrorMessage=$ae;z.invalidInlineFragmentTypeConditionErrorMessage=Qae;z.invalidSelectionOnUnionErrorMessage=Yae;z.duplicateOverriddenFieldErrorMessage=Jae;z.duplicateOverriddenFieldsError=Hae;z.noFieldDefinitionsError=zae;z.noInputValueDefinitionsError=Wae;z.allChildDefinitionsAreInaccessibleError=Xae;z.equivalentSourceAndTargetOverrideErrorMessage=Zae;z.undefinedEntityInterfaceImplementationsError=ese;z.orScopesLimitError=tse;z.invalidEventDrivenGraphError=nse;z.invalidRootTypeFieldEventsDirectivesErrorMessage=rse;z.invalidEventDrivenMutationResponseTypeErrorMessage=ise;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=ase;z.invalidNatsStreamInputFieldsErrorMessage=sse;z.invalidKeyFieldSetsEventDrivenErrorMessage=ose;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=use;z.nonKeyFieldNamesEventDrivenErrorMessage=cse;z.nonEntityObjectExtensionsEventDrivenErrorMessage=lse;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=dse;z.invalidEdfsDirectiveName=fse;z.invalidImplementedTypeError=pse;z.selfImplementationError=mse;z.invalidEventSubjectErrorMessage=Nse;z.invalidEventSubjectsErrorMessage=Tse;z.invalidEventSubjectsItemErrorMessage=Ese;z.invalidEventSubjectsArgumentErrorMessage=hse;z.undefinedEventSubjectsArgumentErrorMessage=yse;z.invalidEventDirectiveError=Ise;z.invalidReferencesOfInaccessibleTypeError=gse;z.inaccessibleRequiredInputValueError=_se;z.invalidUnionMemberTypeError=vse;z.invalidRootTypeError=Ose;z.invalidSubscriptionFilterLocationError=Sse;z.invalidSubscriptionFilterDirectiveError=Dse;z.subscriptionFilterNamedTypeErrorMessage=bse;z.subscriptionFilterConditionDepthExceededErrorMessage=Ase;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=Rse;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=Pse;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=Fse;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=wse;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Lse;z.invalidInputFieldTypeErrorMessage=Cse;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Bse;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Use;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=kse;z.unknownFieldSubgraphNameError=Mse;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=xse;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=qse;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=Vse;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=jse;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Kse;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Gse;z.unresolvablePathError=$se;z.allExternalFieldInstancesError=Qse;z.externalInterfaceFieldsError=Yse;z.nonExternalConditionalFieldError=Jse;z.incompatibleFederatedFieldNamedTypeError=Hse;z.unknownNamedTypeErrorMessage=QM;z.unknownNamedTypeError=zse;z.unknownFieldDataError=Wse;z.unexpectedNonCompositeOutputTypeError=Xse;z.invalidExternalDirectiveError=Zse;z.configureDescriptionNoDescriptionError=eoe;z.configureDescriptionPropagationError=toe;z.duplicateDirectiveDefinitionArgumentErrorMessage=noe;z.duplicateDirectiveDefinitionLocationErrorMessage=roe;z.invalidDirectiveDefinitionLocationErrorMessage=ioe;z.invalidDirectiveDefinitionError=aoe;z.typeNameAlreadyProvidedErrorMessage=soe;z.fieldAlreadyProvidedErrorMessage=ooe;z.invalidInterfaceObjectImplementationDefinitionsError=uoe;z.invalidNamedTypeError=coe;z.semanticNonNullLevelsNaNIndexErrorMessage=loe;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=doe;z.semanticNonNullLevelsNonNullErrorMessage=foe;z.semanticNonNullInconsistentLevelsError=poe;z.oneOfRequiredFieldsError=moe;var VM=Oe(),Je=zn(),jM=Ll(),Rc=Fr(),Fie=kl(),wie=sE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function Lie(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". +However, there must be only one type named "${e}".`)}function Cie(e,t,n,r){return new Error(`The ${e} of type "${n}" defined on path "${t}" is incompatible with the default value of "${r}".`)}function Bie({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":Je.FIELD} "${t}": + Expected type "${n}" but received "${e}".`)}function Uie(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". "However, the default value "${i}" is defined in the following subgraph`+(n.length>1?"s":"")+`: "`+n.join(Je.QUOTATION_JOIN)+`" -If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function Bie(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs. To update an Enum used as both an input and output, add any new Enum values with the @inaccessible directive in the origin subgraph. Next, add those new Enum values to all other subgraphs that define the Enum\u2014this time without the @inaccessible directive. Finally, once all subgraphs have been updated, remove @inaccessible from the Enum values in the origin subgraph.`)}function Uie(e,t){let n="Subgraphs to be federated must each have a unique, non-empty name.";e.length>0&&(n+=` +If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function kie(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs. To update an Enum used as both an input and output, add any new Enum values with the @inaccessible directive in the origin subgraph. Next, add those new Enum values to all other subgraphs that define the Enum\u2014this time without the @inaccessible directive. Finally, once all subgraphs have been updated, remove @inaccessible from the Enum values in the origin subgraph.`)}function Mie(e,t){let n="Subgraphs to be federated must each have a unique, non-empty name.";e.length>0&&(n+=` The following subgraph names are not unique: "`+e.join('", "')+'"');for(let r of t)n+=` - ${r}`;return new Error(n)}function kie(e){return new Error(`The directive "${e}" must only be defined once.`)}function Mie(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function xie(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function qie(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function Vie(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function jie(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function Kie(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function Gie(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function $ie(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function Qie(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function Yie(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function Jie(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function Hie(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function zie(e,t){let n=e.name,r=[];for(let[i,a]of e.fieldDataByName){if(!t.has(i))continue;let o=[],c=[];for(let[l,d]of a.isShareableBySubgraphName)d?o.push(l):c.push(l);o.length<1?r.push(` + ${r}`;return new Error(n)}function xie(e){return new Error(`The directive "${e}" must only be defined once.`)}function qie(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function Vie(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function jie(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function Kie(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function Gie(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function $ie(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function Qie(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function Yie(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function Jie(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function Hie(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function zie(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function Wie(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function Xie(e,t){let n=e.name,r=[];for(let[i,a]of e.fieldDataByName){if(!t.has(i))continue;let o=[],c=[];for(let[l,d]of a.isShareableBySubgraphName)d?o.push(l):c.push(l);o.length<1?r.push(` The field "${i}" is defined in the following subgraphs: "${[...a.subgraphNames].join('", "')}". However, it is not declared "@shareable" in any of them.`):r.push(` The field "${i}" is defined and declared "@shareable" in the following subgraph`+(o.length>1?"s":"")+': "'+o.join(Je.QUOTATION_JOIN)+`". However, it is not declared "@shareable" in the following subgraph`+(c.length>1?"s":"")+`: "${c.join(Je.QUOTATION_JOIN)}".`)}return new Error(`The Object "${n}" defines the same fields in multiple subgraphs without the "@shareable" directive:${r.join(` -`)}`)}function Wie(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function Xie(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function Zie(e){return`The definition for the directive "@${e}" does not define it as repeatable, but it is declared more than once on these coordinates.`}function eae(e,t,n,r){return new Error(`The ${n} instance of the directive "@${e}" declared on coordinates "${t}" is invalid for the following reason`+(r.length>1?`s: +`)}`)}function Zie(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function eae(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function tae(e){return`The definition for the directive "@${e}" does not define it as repeatable, but it is declared more than once on these coordinates.`}function nae(e,t,n,r){return new Error(`The ${n} instance of the directive "@${e}" declared on coordinates "${t}" is invalid for the following reason`+(r.length>1?`s: `:`: `)+r.join(` -`))}function tae(e,t){return new Error(`The definition for the directive "@${e}" does not define it as repeatable, but the directive has been declared on more than one instance of the type "${t}".`)}function nae(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function rae(e,t,n){let r=` The definition for "@${e}" defines the following `+t.length+" required argument"+(t.length>1?"s: ":": ")+'"'+t.join('", "')+`". - However,`;return n.length<1?r+" no arguments are defined on this instance.":r+" the following required argument"+(n.length>1?"s are":" is")+' not defined on this instance: "'+n.join(Je.QUOTATION_JOIN)+'".'}function iae(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(Je.QUOTATION_JOIN)+'".'}function aae(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(Je.QUOTATION_JOIN)+'"'}function sae(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function oae(e){return new Error(` The type defined at path "${e}" has more than ${qM.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function uae(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function cae(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Ac.kindToNodeType)(t)} but received "${(0,Ac.kindToNodeType)(n)}".`)}function lae(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: - " ${t.join(Je.QUOTATION_JOIN)}".`)}var dae='"Interface Object" (an "Object" type that also defines the "@interfaceObject" directive)';function fae({existingData:e,incomingNodeType:t,incomingSubgraphName:n}){let r=[...e.subgraphNames],i=t?`"${t}"`:dae;return new Error(` "${e.name}" is defined using incompatible types across subgraphs. It is defined as type "${(0,Ac.kindToNodeType)(e.kind)}" in subgraph`+(r.length>1?"s":"")+` "${r.join(Je.QUOTATION_JOIN)}" but type ${i} in subgraph "${n}".`)}function pae(e){return new Error(`Fatal: Expected all constituent types at path "${e}" to be one of the following: "LIST_TYPE", "NAMED_TYPE", or "NON_NULL_TYPE".`)}function mae(e,t){return new Error(`Fatal: Expected key "${e}" to exist in the map "${t}".`)}z.subgraphValidationFailureError=new Error(" Fatal: Subgraph validation did not return a valid AST.");function Nae(e,t,n,r,i){return new Error(` Expected "${e}" to be type "${t}" but received "${n}" when handling child "${r}" of type "${i}".`)}function Tae(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: +`))}function rae(e,t){return new Error(`The definition for the directive "@${e}" does not define it as repeatable, but the directive has been declared on more than one instance of the type "${t}".`)}function iae(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function aae(e,t,n){let r=` The definition for "@${e}" defines the following `+t.length+" required argument"+(t.length>1?"s: ":": ")+'"'+t.join('", "')+`". + However,`;return n.length<1?r+" no arguments are defined on this instance.":r+" the following required argument"+(n.length>1?"s are":" is")+' not defined on this instance: "'+n.join(Je.QUOTATION_JOIN)+'".'}function sae(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(Je.QUOTATION_JOIN)+'".'}function oae(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(Je.QUOTATION_JOIN)+'"'}function uae(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function cae(e){return new Error(` The type defined at path "${e}" has more than ${jM.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function lae(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function dae(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Rc.kindToNodeType)(t)} but received "${(0,Rc.kindToNodeType)(n)}".`)}function fae(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: + " ${t.join(Je.QUOTATION_JOIN)}".`)}var pae='"Interface Object" (an "Object" type that also defines the "@interfaceObject" directive)';function mae({existingData:e,incomingNodeType:t,incomingSubgraphName:n}){let r=[...e.subgraphNames],i=t?`"${t}"`:pae;return new Error(` "${e.name}" is defined using incompatible types across subgraphs. It is defined as type "${(0,Rc.kindToNodeType)(e.kind)}" in subgraph`+(r.length>1?"s":"")+` "${r.join(Je.QUOTATION_JOIN)}" but type ${i} in subgraph "${n}".`)}function Nae(e){return new Error(`Fatal: Expected all constituent types at path "${e}" to be one of the following: "LIST_TYPE", "NAMED_TYPE", or "NON_NULL_TYPE".`)}function Tae(e,t){return new Error(`Fatal: Expected key "${e}" to exist in the map "${t}".`)}z.subgraphValidationFailureError=new Error(" Fatal: Subgraph validation did not return a valid AST.");function Eae(e,t,n,r,i){return new Error(` Expected "${e}" to be type "${t}" but received "${n}" when handling child "${r}" of type "${i}".`)}function hae(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: `+t.map(n=>n.message).join(` -`))}function Eae(e,t){return`The ${(0,Ac.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function hae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, "${t}" was also used for the "${n}" operation. - If explicitly defined, each operation type must be a unique and valid Object type.`)}function yae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, the schema also defines another type named "${n}", which is the default (root) type name for the "${e}" operation. -For federation, it is only possible to use the default root types names ("Mutation", "Query", "Subscription") as operation definitions. No other definitions with these default root type names are valid.`)}function Iae(e){let t="The subgraph has syntax errors and could not be parsed.";return e&&(t+=` - The reason provided was: `+e.message),new Error(t)}function gae(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: +`))}function yae(e,t){return`The ${(0,Rc.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function Iae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, "${t}" was also used for the "${n}" operation. + If explicitly defined, each operation type must be a unique and valid Object type.`)}function gae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, the schema also defines another type named "${n}", which is the default (root) type name for the "${e}" operation. +For federation, it is only possible to use the default root types names ("Mutation", "Query", "Subscription") as operation definitions. No other definitions with these default root type names are valid.`)}function _ae(e){let t="The subgraph has syntax errors and could not be parsed.";return e&&(t+=` + The reason provided was: `+e.message),new Error(t)}function vae(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: `,c=a.unimplementedFields.length;c&&(o+=` The following field${c>1?"s are":" is"} not implemented: "`+a.unimplementedFields.join('", "')+`" `);for(let[l,d]of a.invalidFieldImplementations){let p=d.unimplementedArguments.size,E=d.invalidImplementedArguments.length,I=d.invalidAdditionalArguments.size;if(o+=` The field "${l}" is invalid because: `,p&&(o+=` The following argument${p>1?"s are":" is"} not implemented: "`+[...d.unimplementedArguments].join('", "')+`" @@ -268,87 +268,87 @@ For federation, it is only possible to use the default root types names ("Mutati Consequently, the Interface implementation cannot be satisfied. `)}r.push(o)}return new Error(`The ${t} "${e}" has the following Interface implementation errors: `+r.join(` -`))}function _ae(e,t,n,r=!0){let i=r?Je.ARGUMENT:Je.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: +`))}function Oae(e,t,n,r=!0){let i=r?Je.ARGUMENT:Je.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: `;for(let o of n)a+=` The ${i} "${o.inputValueName}" is required in the following subgraph`+(o.requiredSubgraphs.length>1?"s":"")+': "'+o.requiredSubgraphs.join('", "')+`" However, the ${i} "${o.inputValueName}" is not defined in the following subgraph`+(o.missingSubgraphs.length>1?"s":"")+': "'+o.missingSubgraphs.join('", "')+`" If an ${i} is required on a ${e} in any one subgraph, it must be at least defined as optional on all other definitions of that ${e} in all other subgraphs. -`;return new Error(a)}function vae(e,t){return new Error(`The field "${e}" is invalid because: +`;return new Error(a)}function Sae(e,t){return new Error(`The field "${e}" is invalid because: The following argument`+(t.length>1?"s are":" is")+' defined more than once: "'+t.join(Je.QUOTATION_JOIN)+`" -`)}function Oae(e=!0){return new Error(`The ${e?"router":"client"} schema does not define at least one accessible query root type field after federation was completed, which is necessary for a federated graph to be valid. +`)}function Dae(e=!0){return new Error(`The ${e?"router":"client"} schema does not define at least one accessible query root type field after federation was completed, which is necessary for a federated graph to be valid. For example: type Query { dummy: String - }`)}z.inaccessibleQueryRootTypeError=new Error('The root query type "Query" must be present in the client schema; consequently, it must not be declared "@inaccessible".');function Sae(e){return new Error(`Expected object "${e}" to define a "key" directive, but it defines no directives.`)}z.inlineFragmentInFieldSetErrorMessage=" Inline fragments are not currently supported within a field set argument.";function Dae(e,t,n,r){return` The following field set is invalid: + }`)}z.inaccessibleQueryRootTypeError=new Error('The root query type "Query" must be present in the client schema; consequently, it must not be declared "@inaccessible".');function bae(e){return new Error(`Expected object "${e}" to define a "key" directive, but it defines no directives.`)}z.inlineFragmentInFieldSetErrorMessage=" Inline fragments are not currently supported within a field set argument.";function Aae(e,t,n,r){return` The following field set is invalid: "${e}" This is because "${t}" returns "${n}", which is type "${r}". - Fields that return abstract types (Interfaces and Unions) cannot be included in the field set of "@key" directives.`}function bae(e,t,n){return` The following field set is invalid: + Fields that return abstract types (Interfaces and Unions) cannot be included in the field set of "@key" directives.`}function Rae(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" returns the unknown type "${n}".`}function Aae(e,t,n,r){return` The following field set is invalid: + This is because "${t}" returns the unknown type "${n}".`}function Pae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+aE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function Rae(e,t,n,r){return` The following field set is invalid: + This is because of the selection set corresponding to the `+oE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function Fae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+aE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function Pae(e,t,n){return` The following field set is invalid: + This is because of the selection set corresponding to the `+oE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function wae(e,t,n){return` The following field set is invalid: "${e}" This is because of the selection set corresponding to the field coordinates "${t}.${n}". - The type "${t}" does not define a field named "${n}".`}function Fae(e,t){let n=` The following field set is invalid: + The type "${t}" does not define a field named "${n}".`}function Lae(e,t){let n=` The following field set is invalid: "${e}" The field set could not be parsed.`;return t&&(n+=` - The reason provided was: `+t.message),n}function wae(e,t){return` The following field set is invalid: + The reason provided was: `+t.message),n}function Cae(e,t){return` The following field set is invalid: "${e}" - This is because the selection set defined on "${t}" could not be parsed.`}function Lae(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function Cae(e,t,n){return` The following field set is invalid: + This is because the selection set defined on "${t}" could not be parsed.`}function Bae(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function Uae(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" does not define an argument named "${n}".`}function Bae(e,t){return` The following field set is invalid: + This is because "${t}" does not define an argument named "${n}".`}function kae(e,t){return` The following field set is invalid: "${e}" This is because "${t}" defines arguments. - Fields that define arguments cannot be included in the field set of @key directives.`}function Uae(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: + Fields that define arguments cannot be included in the field set of @key directives.`}function Mae(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: `+t.join(` -`))}function kae(e,t){return` The following field set is invalid: +`))}function xae(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" was included in the field set more than once.`}function Mae(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function xae({fieldCoords:e,responseType:t,subgraphName:n}){return` A "@provides" directive is declared on field "${e}" in subgraph "${n}". - However, the response type "${t}" is not an Object nor Interface.`}function LS(e,t,n=!1){return e.length<1?`enclosing type name "${t}". + This is because "${t}" was included in the field set more than once.`}function qae(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function Vae({fieldCoords:e,responseType:t,subgraphName:n}){return` A "@provides" directive is declared on field "${e}" in subgraph "${n}". + However, the response type "${t}" is not an Object nor Interface.`}function CS(e,t,n=!1){return e.length<1?`enclosing type name "${t}". `:`field coordinates "${e[e.length-1]}"`+(n?` that returns "${t}"`:"")+`. -`}function aE(e,t,n){return e.length<1?`enclosing type name "${t}", which is type "${n}". +`}function oE(e,t,n){return e.length<1?`enclosing type name "${t}", which is type "${n}". `:`field coordinates "${e[e.length-1]}" that returns "${t}", which is type "${n}". -`}function qae(e,t,n,r){return` The following field set is invalid: +`}function jae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+LS(t,r,!0)+` However, "${r}" is not an abstract (Interface or Union) type. - Consequently, the only valid type condition at this selection set would be "${r}".`}function Vae(e,t){return` The following field set is invalid: + This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+CS(t,r,!0)+` However, "${r}" is not an abstract (Interface or Union) type. + Consequently, the only valid type condition at this selection set would be "${r}".`}function Kae(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" defines an inline fragment without a type condition.`}function jae(e,t,n,r){return` The following field set is invalid: + This is because "${t}" defines an inline fragment without a type condition.`}function Gae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because an inline fragment with the unknown type condition "${r}" is defined on the selection set corresponding to the `+LS(t,n)}function Kae(e,t,n,r,i){return` The following field set is invalid: + This is because an inline fragment with the unknown type condition "${r}" is defined on the selection set corresponding to the `+CS(t,n)}function $ae(e,t,n,r,i){return` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${r}" is defined on the selection set corresponding to the `+LS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function Gae(e,t,n,r,i){let a=` The following field set is invalid: + This is because an inline fragment with the type condition "${r}" is defined on the selection set corresponding to the `+CS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function Qae(e,t,n,r,i){let a=` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+aE(t,i,r);return r===Je.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function $ae(e,t,n){return` The following field set is invalid: + This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+oE(t,i,r);return r===Je.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function Yae(e,t,n){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+aE(t,n,Je.UNION)+` Union types such as "${n}" must define field selections (besides "__typename") on an inline fragment whose type condition corresponds to a constituent union member.`}function Qae(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(Je.QUOTATION_JOIN)+'".'}function Yae(e){return new Error('The "@override" directive must only be declared on one single instance of a field. However, an "@override" directive was declared on more than one instance of the following field'+(e.length>1?"s":"")+': "'+e.join(Je.QUOTATION_JOIN)+`". -`)}function Jae(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function Hae(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function zae(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function Wae(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function Xae(e,t){let n=`Federation was unsuccessful because any one subgraph that defines a specific entity Interface must also define each and every entity Object that implements that entity Interface. + This is because of the selection set corresponding to the `+oE(t,n,Je.UNION)+` Union types such as "${n}" must define field selections (besides "__typename") on an inline fragment whose type condition corresponds to a constituent union member.`}function Jae(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(Je.QUOTATION_JOIN)+'".'}function Hae(e){return new Error('The "@override" directive must only be declared on one single instance of a field. However, an "@override" directive was declared on more than one instance of the following field'+(e.length>1?"s":"")+': "'+e.join(Je.QUOTATION_JOIN)+`". +`)}function zae(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function Wae(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function Xae(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function Zae(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function ese(e,t){let n=`Federation was unsuccessful because any one subgraph that defines a specific entity Interface must also define each and every entity Object that implements that entity Interface. Each entity Object must also explicitly define its implementation of the entity Interface. -`;for(let[r,i]of e){let o=(0,Ac.getOrThrowError)(t,r,"entityInterfaceFederationDataByTypeName").concreteTypeNames;n+=` Across all subgraphs, the entity interface "${r}" is implemented by the following entit`+(o.size>1?"ies":"y")+`: +`;for(let[r,i]of e){let o=(0,Rc.getOrThrowError)(t,r,"entityInterfaceFederationDataByTypeName").concreteTypeNames;n+=` Across all subgraphs, the entity interface "${r}" is implemented by the following entit`+(o.size>1?"ies":"y")+`: "`+Array.from(o).join(Je.QUOTATION_JOIN)+`" However, the definition of at least one of these implementations is missing in a subgraph that defines the entity interface "${r}": -`;for(let{subgraphName:c,definedConcreteTypeNames:l}of i){let d=(0,Ac.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${c}" does not define the following implementations: "`+d.join(Je.QUOTATION_JOIN)+`" -`}}return new Error(n)}function Zae(e,t){return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${e}. However, the following coordinates attempt to define more: +`;for(let{subgraphName:c,definedConcreteTypeNames:l}of i){let d=(0,Rc.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${c}" does not define the following implementations: "`+d.join(Je.QUOTATION_JOIN)+`" +`}}return new Error(n)}function tse(e,t){return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${e}. However, the following coordinates attempt to define more: "`+t.join(Je.QUOTATION_JOIN)+`" -If you require more, please contact support.`)}function ese(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. +If you require more, please contact support.`)}function nse(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. Consequently, any "@key" definitions must also include the "resolvable: false" argument. Moreover, only fields that compose part of an entity's (composite) key and are declared "@external" are permitted. `+e.join(` -`))}function tse(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: +`))}function rse(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: Mutation type fields must define either a edfs publish or request directive." Query type fields must define "@edfs__natsRequest" Subscription type fields must define an edfs subscribe directive The following root field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)r.definesDirectives?t+=` The root field path "${n}" defines the following invalid events directive`+(r.invalidDirectiveNames.length>1?"s":"")+': "@'+r.invalidDirectiveNames.join('", "@')+`" `:t+=` The root field path "${n}" does not define any valid events directives. -`;return t}function nse(e){let t=` Mutation type fields defined in an Event Driven graph must return the non-nullable type "edfs__PublishResult!", which has the following definition: +`;return t}function ise(e){let t=` Mutation type fields defined in an Event Driven graph must return the non-nullable type "edfs__PublishResult!", which has the following definition: type edfs__PublishResult { success: Boolean! } However, the following mutation field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)t+=` The mutation field path "${n}" returns "${r}". -`;return t}function rse(e){let t=` The named response type of root type fields defined in an Event Driven graph must be a non-nullable, non-list named type that is either an entity, an interface implemented by an entity, or a union of which an entity is a member. +`;return t}function ase(e){let t=` The named response type of root type fields defined in an Event Driven graph must be a non-nullable, non-list named type that is either an entity, an interface implemented by an entity, or a union of which an entity is a member. Consequently, the following root field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)t+=` The root field path "${n}", which returns the invalid type "${r}" `;return t}z.invalidNatsStreamInputErrorMessage=`The "streamConfiguration" argument must be a valid input object with the following form: @@ -356,19 +356,19 @@ Moreover, only fields that compose part of an entity's (composite) key and are d consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function ise(e,t,n,r){let i=z.invalidNatsStreamInputErrorMessage,a=[];return e.length>0&&a.push("The following required field"+(e.length>1?"s were":" was")+' not defined: "'+e.join(Je.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(Je.QUOTATION_JOIN)+'".'),n.length>0&&a.push("The following required field"+(n.length>1?"s were":" was")+' not type "String!" with a minimum length of 1: "'+n.join(Je.QUOTATION_JOIN)+'".'),r.length>0&&a.push("The following field"+(r.length>1?"s are":" is")+' not part of a valid "edfs__NatsStreamConfiguration" input definition: "'+r.join(Je.QUOTATION_JOIN)+'".'),i+=` + }`;function sse(e,t,n,r){let i=z.invalidNatsStreamInputErrorMessage,a=[];return e.length>0&&a.push("The following required field"+(e.length>1?"s were":" was")+' not defined: "'+e.join(Je.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(Je.QUOTATION_JOIN)+'".'),n.length>0&&a.push("The following required field"+(n.length>1?"s were":" was")+' not type "String!" with a minimum length of 1: "'+n.join(Je.QUOTATION_JOIN)+'".'),r.length>0&&a.push("The following field"+(r.length>1?"s are":" is")+' not part of a valid "edfs__NatsStreamConfiguration" input definition: "'+r.join(Je.QUOTATION_JOIN)+'".'),i+=` However, the provided input was invalid for the following reason`+(a.length>1?"s":"")+`: `+a.join(` - `),i}function ase(e=new Map){let t="";for(let[n,r]of e)t+=' The following "@key" field set'+(r.length>1?"s are":" is")+` defined on the entity "${n}" without a "resolvable: false" argument: + `),i}function ose(e=new Map){let t="";for(let[n,r]of e)t+=' The following "@key" field set'+(r.length>1?"s are":" is")+` defined on the entity "${n}" without a "resolvable: false" argument: "`+r.join(Je.QUOTATION_JOIN)+`" -`;return t}function sse(e){let t=" The following field"+(e.size>1?"s are referenced":" is referenced")+` within an entity "@key" field without an "@external" declaration: +`;return t}function use(e){let t=" The following field"+(e.size>1?"s are referenced":" is referenced")+` within an entity "@key" field without an "@external" declaration: `;for(let[n,r]of e)t+=` field "${r}" defined on path "${n}" -`;return t}function ose(e){let t=" The following field"+(e.size>1?"s are":" is")+` defined despite not composing part of a "@key" directive field set: +`;return t}function cse(e){let t=" The following field"+(e.size>1?"s are":" is")+` defined despite not composing part of a "@key" directive field set: `;for(let[n,r]of e)t+=` Field "${r}" defined on path "${n}" -`;return t}function use(e){return`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may be defined as object extensions in an Event Driven graph. +`;return t}function lse(e){return`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may be defined as object extensions in an Event Driven graph. Consequently, the following object extension definition`+(e.length>1?"s are":" is")+` invalid: "`+e.join(Je.QUOTATION_JOIN)+`" -`}function cse(e){return` Only object definitions whose fields compose part of a "@key" directive's field set may be defined in an Event Driven graph. Consequently, the following object type definition`+(e.length>1?"s are":" is")+` invalid: +`}function dse(e){return` Only object definitions whose fields compose part of a "@key" directive's field set may be defined in an Event Driven graph. Consequently, the following object type definition`+(e.length>1?"s are":" is")+` invalid: "`+e.join(Je.QUOTATION_JOIN)+`" `}z.invalidEdfsPublishResultObjectErrorMessage=` The object "edfs__PublishResult" that was defined in the Event Driven graph is invalid and must instead have the following definition: type edfs__PublishResult { @@ -378,20 +378,20 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function lse(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function dse(e,t){let n=` Only interfaces can be implemented. However, the type "${e}" attempts to implement the following invalid type`+(t.size>1?"s":"")+`: + }`;function fse(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function pse(e,t){let n=` Only interfaces can be implemented. However, the type "${e}" attempts to implement the following invalid type`+(t.size>1?"s":"")+`: `;for(let[r,i]of t)n+=` "${r}", which is type "${i}" -`;return new Error(n)}function fse(e){return new Error(` The interface "${e}" must not implement itself.`)}function pse(e){return`The "${e}" argument must be string with a minimum length of one.`}function mse(e){return`The "${e}" argument must be a list of strings.`}function Nse(e){return`Each item in the "${e}" argument list must be a string with a minimum length of one. However, at least one value provided in the list was invalid.`}function Tse(e){return`An argument template references the invalid argument "${e}".`}function Ese(e){return`An argument template references the undefined argument "${e}".`}z.invalidEventProviderIdErrorMessage='If explicitly defined, the "providerId" argument must be a string with a minimum length of one.';function hse(e,t,n){return new Error(`The event directive "${e}" declared on "${t}" is invalid for the following reason`+(n.length>1?"s":"")+`: +`;return new Error(n)}function mse(e){return new Error(` The interface "${e}" must not implement itself.`)}function Nse(e){return`The "${e}" argument must be string with a minimum length of one.`}function Tse(e){return`The "${e}" argument must be a list of strings.`}function Ese(e){return`Each item in the "${e}" argument list must be a string with a minimum length of one. However, at least one value provided in the list was invalid.`}function hse(e){return`An argument template references the invalid argument "${e}".`}function yse(e){return`An argument template references the undefined argument "${e}".`}z.invalidEventProviderIdErrorMessage='If explicitly defined, the "providerId" argument must be a string with a minimum length of one.';function Ise(e,t,n){return new Error(`The event directive "${e}" declared on "${t}" is invalid for the following reason`+(n.length>1?"s":"")+`: `+n.join(` - `))}function yse(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: + `))}function gse(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: "`+n.join(Je.QUOTATION_JOIN)+`" -`)}function Ise(e,t){return new Error(`The ${e.kind===xM.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===xM.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function gse(e,t){return new Error(` The union "${e}" defines the following member`+(t.length>1?"s that are not object types":" that is not an object type")+`: +`)}function _se(e,t){return new Error(`The ${e.kind===VM.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===VM.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function vse(e,t){return new Error(` The union "${e}" defines the following member`+(t.length>1?"s that are not object types":" that is not an object type")+`: `+t.join(` - `))}function _se(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function vse(e){return new Error(`The "@${Je.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Ose(e,t){return new Error(`The "@${Je.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: + `))}function Ose(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function Sse(e){return new Error(`The "@${Je.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Dse(e,t){return new Error(`The "@${Je.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: `+t.join(` -`))}function Sse(e){return` Unknown type "${e}".`}function Dse(e){return` The input path "${e}" exceeds the maximum depth of ${qM.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. - If you require a larger maximum depth, please contact support.`}var VM=` Each "${Je.SUBSCRIPTION_FILTER_CONDITION}" input object must define exactly one of the following input value fields: "${Je.AND_UPPER}", "${Je.IN_UPPER}", "${Je.NOT_UPPER}", or "${Je.OR_UPPER}". -`;function bse(e,t){return VM+` However, input path "${e}" defines ${t} fields.`}function Ase(e,t){return VM+` However, input path "${e}" defines the invalid input value field "${t}".`}function Rse(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var jM=` An AND or OR input field defined on a "${Je.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. -`;function Pse(e,t){let n=t.length>1;return jM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function Fse(e,t){return jM+` However, the list defined on input path "${e}" has a length of ${t}.`}function wse(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function Lse(e,t,n,r,i){let a=` Each "${Je.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${Je.FIELD_PATH}" and "${Je.VALUES}". +`))}function bse(e){return` Unknown type "${e}".`}function Ase(e){return` The input path "${e}" exceeds the maximum depth of ${jM.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. + If you require a larger maximum depth, please contact support.`}var KM=` Each "${Je.SUBSCRIPTION_FILTER_CONDITION}" input object must define exactly one of the following input value fields: "${Je.AND_UPPER}", "${Je.IN_UPPER}", "${Je.NOT_UPPER}", or "${Je.OR_UPPER}". +`;function Rse(e,t){return KM+` However, input path "${e}" defines ${t} fields.`}function Pse(e,t){return KM+` However, input path "${e}" defines the invalid input value field "${t}".`}function Fse(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var GM=` An AND or OR input field defined on a "${Je.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. +`;function wse(e,t){let n=t.length>1;return GM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function Lse(e,t){return GM+` However, the list defined on input path "${e}" has a length of ${t}.`}function Cse(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function Bse(e,t,n,r,i){let a=` Each "${Je.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${Je.FIELD_PATH}" and "${Je.VALUES}". However, input path "${e}" is invalid because:`;return t.length>0&&(a+=` The following required field`+(t.length>1?"s are":" is")+` not defined: "`+t.join(Je.QUOTATION_JOIN)+'"'),n.length>0&&(a+=` @@ -400,64 +400,64 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i The following invalid field`+(r.length>1?"s are":" is")+` defined: "`+r.join(Je.QUOTATION_JOIN)+'"'),i.length>0&&(a+=` `+i.join(` - `)),a}var KM=` A "${Je.SUBSCRIPTION_FIELD_CONDITION}" input object must define a "values" input value field with a list of at least one valid "${Je.SUBSCRIPTION_FILTER_VALUE}" kind (boolean, enum, float, int, null, or string). -`;function Cse(e,t){let n=t.length>1;return KM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${Je.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function Bse(e){return KM+` However, the list defined on input path "${e}" is empty.`}function Use(e){return new Error(` Field "${e}" defined no subgraph names.`)}function kse(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function Mse(e,t,n){return` Input path "${e}" defines the value "${t}". - However, "${n}" is not type "object"`}function xse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". - However, the path "${n}" is invalid because no field named "${r}" exists on type "${i}".`}function qse(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". + `)),a}var $M=` A "${Je.SUBSCRIPTION_FIELD_CONDITION}" input object must define a "values" input value field with a list of at least one valid "${Je.SUBSCRIPTION_FILTER_VALUE}" kind (boolean, enum, float, int, null, or string). +`;function Use(e,t){let n=t.length>1;return $M+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${Je.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function kse(e){return $M+` However, the list defined on input path "${e}" is empty.`}function Mse(e){return new Error(` Field "${e}" defined no subgraph names.`)}function xse(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function qse(e,t,n){return` Input path "${e}" defines the value "${t}". + However, "${n}" is not type "object"`}function Vse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". + However, the path "${n}" is invalid because no field named "${r}" exists on type "${i}".`}function jse(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". However, only fields that are defined in the same graph as the "@${Je.SUBSCRIPTION_FILTER}" directive can compose part of an "IN" condition's "fieldPath" input value field. - Consequently, the path "${n}" is invalid because field "${r}" is not defined in subgraph "${i}".`}function Vse(e,t,n,r){return` Input path "${e}" defines the value "${t}". - The path segment "${n}" is invalid because it refers to "${r}", which is declared "@inaccessible".`}function jse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". - However, the final field "${n}" is ${r} "${i}", which is not a leaf type; therefore, it requires further selections.`}function Kse({fieldName:e,selectionSet:t},n){let r=`The field "${e}" is unresolvable at the following path: + Consequently, the path "${n}" is invalid because field "${r}" is not defined in subgraph "${i}".`}function Kse(e,t,n,r){return` Input path "${e}" defines the value "${t}". + The path segment "${n}" is invalid because it refers to "${r}", which is declared "@inaccessible".`}function Gse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". + However, the final field "${n}" is ${r} "${i}", which is not a leaf type; therefore, it requires further selections.`}function $se({fieldName:e,selectionSet:t},n){let r=`The field "${e}" is unresolvable at the following path: ${t} This is because: - `+n.join(` - - `);return new Error(r)}function Gse(e,t){let n=`The Object "${e}" is invalid because the following field definition`+(t.size>1?"s are":" is")+` declared "@external" on all instances of that field: + - `);return new Error(r)}function Qse(e,t){let n=`The Object "${e}" is invalid because the following field definition`+(t.size>1?"s are":" is")+` declared "@external" on all instances of that field: `;for(let[r,i]of t)n+=` "${r}" in subgraph`+(i.length>1?"s":"")+' "'+i.join(Je.QUOTATION_JOIN)+`" -`;return n+='At least one instance of a field definition must always be resolvable (and therefore not declared "@external").',new Error(n)}function $se(e,t){return new Error(`The interface "${e}" is invalid because the following field definition`+(t.length>1?"s are":" is")+` declared "@external": +`;return n+='At least one instance of a field definition must always be resolvable (and therefore not declared "@external").',new Error(n)}function Yse(e,t){return new Error(`The interface "${e}" is invalid because the following field definition`+(t.length>1?"s are":" is")+` declared "@external": "`+t.join(Je.QUOTATION_JOIN)+`" -Interface fields should not be declared "@external". This is because interface fields do not resolve directly, but the "@external" directive relates to whether a field instance can be resolved by the subgraph in which it is defined.`)}function Qse({directiveCoords:e,fieldSet:t,directiveName:n,subgraphName:r,targetCoords:i}){let a=i.split(Je.LITERAL_PERIOD),o=a[a.length-1]===Je.TYPENAME;return new Error(`The field "${e}" in subgraph "${r}" defines a "@${n}" directive with the following field set: +Interface fields should not be declared "@external". This is because interface fields do not resolve directly, but the "@external" directive relates to whether a field instance can be resolved by the subgraph in which it is defined.`)}function Jse({directiveCoords:e,fieldSet:t,directiveName:n,subgraphName:r,targetCoords:i}){let a=i.split(Je.LITERAL_PERIOD),o=a[a.length-1]===Je.TYPENAME;return new Error(`The field "${e}" in subgraph "${r}" defines a "@${n}" directive with the following field set: "${t}".`+(o?` However, none of the field set ancestors of "__typename" is declared "@external".`:` However, neither the field "${i}" nor any of its field set ancestors are declared "@external".`)+` -Consequently, "${i}" is already provided by subgraph "${r}" and should not form part of a "@${n}" directive field set.`)}function Yse(e,t){let n=[];for(let[r,i]of t){let a=[...i];n.push(` The named type "${r}" is returned by the following subgraph`+(a.length>1?"s":"")+': "'+a.join(Je.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. +Consequently, "${i}" is already provided by subgraph "${r}" and should not form part of a "@${n}" directive field set.`)}function Hse(e,t){let n=[];for(let[r,i]of t){let a=[...i];n.push(` The named type "${r}" is returned by the following subgraph`+(a.length>1?"s":"")+': "'+a.join(Je.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. The field "${e}" could not be federated due to incompatible types across subgraphs. The discrepancies are as follows: `+n.join(` -`))}function GM(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function Jse(e,t){return new Error(GM(e,t))}function Hse(e){return new Error(`Could not find FieldData for field "${e}" -.This should never happen. Please report this issue on GitHub.`)}function zse(e,t){return new Error(`Expected named type "${e}" to be a composite output type (Object or Interface) but received "${t}". -This should never happen. Please report this issue on GitHub.`)}function Wse(e){return new Error(`The Object field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`)}function Xse(e,t){return new Error(`The "@openfed__configureDescription" directive defined on ${e} "${t}" is invalid because neither a description nor the "descriptionOverride" argument is defined.`)}function Zse(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: +`))}function QM(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function zse(e,t){return new Error(QM(e,t))}function Wse(e){return new Error(`Could not find FieldData for field "${e}" +.This should never happen. Please report this issue on GitHub.`)}function Xse(e,t){return new Error(`Expected named type "${e}" to be a composite output type (Object or Interface) but received "${t}". +This should never happen. Please report this issue on GitHub.`)}function Zse(e){return new Error(`The Object field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`)}function eoe(e,t){return new Error(`The "@openfed__configureDescription" directive defined on ${e} "${t}" is invalid because neither a description nor the "descriptionOverride" argument is defined.`)}function toe(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: "`+t.join(Je.QUOTATION_JOIN)+`" -A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function eoe(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: - "`+e.join(Je.QUOTATION_JOIN)+'"'}function toe(e){return`- The location "${e}" is defined multiple times.`}function noe(e){return`- "${e}" is not a valid directive location.`}function roe(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: -`+t.join(Je.LITERAL_NEW_LINE)+'"')}function ioe(e,t){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@provides" field set.`}function aoe(e,t,n){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@${n}" field set. Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`}function soe(e,t,n){return new Error(`The subgraph that defines an entity Interface Object (using "@interfaceObject") must not define any implementation types of that interface. However, the subgraph "${t}" defines the entity Interface "${e}" as an Interface Object alongside the following implementation type`+(n.length>1?"s":"")+` of "${e}": - "`+n.join(Je.QUOTATION_JOIN)+'"')}function ooe({data:e,namedTypeData:t,nodeType:n}){let r=(0,Rie.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,Pie.printTypeNode)(e.type)+`; however, ${(0,Ac.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function uoe(e){return`Index "${e}" is not a valid integer.`}function coe({maxIndex:e,typeString:t,value:n}){return`Index "${n}" is out of bounds for type ${t}; `+(e>0?`valid indices are 0-${e} inclusive.`:"the only valid index is 0.")}function loe({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${Je.LEVELS}" validation error.`;function doe(e){let t=`${e.renamedParentTypeName}.${e.name}`,n=`The "@semanticNonNull" directive defined on field "${t}" is invalid due to inconsistent values provided to the "levels" argument across the following subgraphs: +A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function noe(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: + "`+e.join(Je.QUOTATION_JOIN)+'"'}function roe(e){return`- The location "${e}" is defined multiple times.`}function ioe(e){return`- "${e}" is not a valid directive location.`}function aoe(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: +`+t.join(Je.LITERAL_NEW_LINE)+'"')}function soe(e,t){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@provides" field set.`}function ooe(e,t,n){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@${n}" field set. Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`}function uoe(e,t,n){return new Error(`The subgraph that defines an entity Interface Object (using "@interfaceObject") must not define any implementation types of that interface. However, the subgraph "${t}" defines the entity Interface "${e}" as an Interface Object alongside the following implementation type`+(n.length>1?"s":"")+` of "${e}": + "`+n.join(Je.QUOTATION_JOIN)+'"')}function coe({data:e,namedTypeData:t,nodeType:n}){let r=(0,Fie.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,wie.printTypeNode)(e.type)+`; however, ${(0,Rc.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function loe(e){return`Index "${e}" is not a valid integer.`}function doe({maxIndex:e,typeString:t,value:n}){return`Index "${n}" is out of bounds for type ${t}; `+(e>0?`valid indices are 0-${e} inclusive.`:"the only valid index is 0.")}function foe({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${Je.LEVELS}" validation error.`;function poe(e){let t=`${e.renamedParentTypeName}.${e.name}`,n=`The "@semanticNonNull" directive defined on field "${t}" is invalid due to inconsistent values provided to the "levels" argument across the following subgraphs: `;for(let[r,i]of e.nullLevelsBySubgraphName)n+=` Subgraph "${r}" defines levels ${Array.from(i).sort((a,o)=>a-o)}. -`;return n+=`The list value provided to the "levels" argument must be consistently defined across all subgraphs that define "@semanticNonNull" on field "${t}".`,new Error(n)}function foe({requiredFieldNames:e,typeName:t}){return new Error(`The "@oneOf" directive defined on Input Object "${t}" is invalid because all Input fields must be optional (nullable); however, the following Input field`+(e.length>1?"s are":" is")+' required (non-nullable): "'+e.join(Je.QUOTATION_JOIN)+'".')}});var QM=w($M=>{"use strict";m();T();N();Object.defineProperty($M,"__esModule",{value:!0})});var oE=w(sE=>{"use strict";m();T();N();Object.defineProperty(sE,"__esModule",{value:!0});sE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;sE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var uE=w(Er=>{"use strict";m();T();N();Object.defineProperty(Er,"__esModule",{value:!0});Er.SUBSCRIPTION_FILTER_VALUE_DEFINITION=Er.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=Er.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=Er.SCOPE_SCALAR_DEFINITION=Er.LINK_PURPOSE_DEFINITION=Er.LINK_IMPORT_DEFINITION=Er.FIELD_SET_SCALAR_DEFINITION=Er.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=void 0;var Zt=Oe(),dn=Pr(),fn=zn(),poe=oE();Er.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.CONSUMER_INACTIVE_THRESHOLD),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.INT_SCALAR)},defaultValue:{kind:Zt.Kind.INT,value:poe.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.CONSUMER_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.STREAM_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}}]};Er.FIELD_SET_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.FIELD_SET_SCALAR)};Er.LINK_IMPORT_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.LINK_IMPORT)};Er.LINK_PURPOSE_DEFINITION={kind:Zt.Kind.ENUM_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.LINK_PURPOSE),values:[{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.EXECUTION)},{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SECURITY)}]};Er.SCOPE_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SCOPE_SCALAR)};Er.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.FIELD_PATH),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.VALUES),type:{kind:Zt.Kind.NON_NULL_TYPE,type:{kind:Zt.Kind.LIST_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_VALUE)}}}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FIELD_CONDITION)};Er.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.AND_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.IN_UPPER),type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FIELD_CONDITION)},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.OR_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.NOT_UPPER),type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FILTER_CONDITION)};Er.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FILTER_VALUE)}});var rd=w(tr=>{"use strict";m();T();N();Object.defineProperty(tr,"__esModule",{value:!0});tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=tr.IGNORED_FEDERATED_TYPE_NAMES=tr.DEPENDENCIES_BY_DIRECTIVE_NAME=tr.COMPOSITE_OUTPUT_NODE_KINDS=tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=tr.SUBSCRIPTION_FILTER_INPUT_NAMES=tr.STREAM_CONFIGURATION_FIELD_NAMES=tr.EVENT_DIRECTIVE_NAMES=tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var nt=zn(),cE=Oe(),Ia=uE();tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([nt.ARGUMENT_DEFINITION_UPPER,nt.ENUM_UPPER,nt.ENUM_VALUE_UPPER,nt.FIELD_DEFINITION_UPPER,nt.INPUT_FIELD_DEFINITION_UPPER,nt.INPUT_OBJECT_UPPER,nt.INTERFACE_UPPER,nt.OBJECT_UPPER,nt.SCALAR_UPPER,nt.SCHEMA_UPPER,nt.UNION_UPPER]);tr.EVENT_DIRECTIVE_NAMES=new Set([nt.EDFS_KAFKA_PUBLISH,nt.EDFS_KAFKA_SUBSCRIBE,nt.EDFS_NATS_PUBLISH,nt.EDFS_NATS_REQUEST,nt.EDFS_NATS_SUBSCRIBE,nt.EDFS_REDIS_PUBLISH,nt.EDFS_REDIS_SUBSCRIBE]);tr.STREAM_CONFIGURATION_FIELD_NAMES=new Set([nt.CONSUMER_INACTIVE_THRESHOLD,nt.CONSUMER_NAME,nt.STREAM_NAME]);tr.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([nt.AND_UPPER,nt.IN_UPPER,nt.NOT_UPPER,nt.OR_UPPER]);tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([nt.AND_UPPER,nt.OR_UPPER]);tr.COMPOSITE_OUTPUT_NODE_KINDS=new Set([cE.Kind.INTERFACE_TYPE_DEFINITION,cE.Kind.INTERFACE_TYPE_EXTENSION,cE.Kind.OBJECT_TYPE_DEFINITION,cE.Kind.OBJECT_TYPE_EXTENSION]);tr.DEPENDENCIES_BY_DIRECTIVE_NAME=new Map([[nt.CONNECT_FIELD_RESOLVER,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.EDFS_NATS_SUBSCRIBE,[Ia.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION]],[nt.KEY,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.LINK,[Ia.LINK_IMPORT_DEFINITION,Ia.LINK_PURPOSE_DEFINITION]],[nt.PROVIDES,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES_SCOPES,[Ia.SCOPE_SCALAR_DEFINITION]],[nt.SUBSCRIPTION_FILTER,[Ia.SUBSCRIPTION_FIELD_CONDITION_DEFINITION,Ia.SUBSCRIPTION_FILTER_CONDITION_DEFINITION,Ia.SUBSCRIPTION_FILTER_VALUE_DEFINITION]]]);tr.IGNORED_FEDERATED_TYPE_NAMES=new Set([nt.BOOLEAN_SCALAR,nt.EDFS_NATS_STREAM_CONFIGURATION,nt.FIELD_SET_SCALAR,nt.ID_SCALAR,nt.INT_SCALAR,nt.FLOAT_SCALAR,nt.LINK_IMPORT,nt.LINK_PURPOSE,nt.STRING_SCALAR,nt.SUBSCRIPTION_FIELD_CONDITION,nt.SUBSCRIPTION_FILTER_CONDITION,nt.SUBSCRIPTION_FILTER_VALUE]);tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=new Set([nt.DEPRECATED,nt.ONE_OF,nt.SEMANTIC_NON_NULL])});var Wi=w((CS,YM)=>{"use strict";m();T();N();var ap=function(e){return e&&e.Math===Math&&e};YM.exports=ap(typeof globalThis=="object"&&globalThis)||ap(typeof window=="object"&&window)||ap(typeof self=="object"&&self)||ap(typeof global=="object"&&global)||ap(typeof CS=="object"&&CS)||function(){return this}()||Function("return this")()});var Ls=w((NPe,JM)=>{"use strict";m();T();N();JM.exports=function(e){try{return!!e()}catch(t){return!0}}});var bu=w((yPe,HM)=>{"use strict";m();T();N();var moe=Ls();HM.exports=!moe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var BS=w((vPe,zM)=>{"use strict";m();T();N();var Noe=Ls();zM.exports=!Noe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Rc=w((bPe,WM)=>{"use strict";m();T();N();var Toe=BS(),lE=Function.prototype.call;WM.exports=Toe?lE.bind(lE):function(){return lE.apply(lE,arguments)}});var tx=w(ex=>{"use strict";m();T();N();var XM={}.propertyIsEnumerable,ZM=Object.getOwnPropertyDescriptor,Eoe=ZM&&!XM.call({1:2},1);ex.f=Eoe?function(t){var n=ZM(this,t);return!!n&&n.enumerable}:XM});var US=w((BPe,nx)=>{"use strict";m();T();N();nx.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Ei=w((xPe,ax)=>{"use strict";m();T();N();var rx=BS(),ix=Function.prototype,kS=ix.call,hoe=rx&&ix.bind.bind(kS,kS);ax.exports=rx?hoe:function(e){return function(){return kS.apply(e,arguments)}}});var ux=w((KPe,ox)=>{"use strict";m();T();N();var sx=Ei(),yoe=sx({}.toString),Ioe=sx("".slice);ox.exports=function(e){return Ioe(yoe(e),8,-1)}});var lx=w((YPe,cx)=>{"use strict";m();T();N();var goe=Ei(),_oe=Ls(),voe=ux(),MS=Object,Ooe=goe("".split);cx.exports=_oe(function(){return!MS("z").propertyIsEnumerable(0)})?function(e){return voe(e)==="String"?Ooe(e,""):MS(e)}:MS});var xS=w((WPe,dx)=>{"use strict";m();T();N();dx.exports=function(e){return e==null}});var qS=w((tFe,fx)=>{"use strict";m();T();N();var Soe=xS(),Doe=TypeError;fx.exports=function(e){if(Soe(e))throw new Doe("Can't call method on "+e);return e}});var dE=w((aFe,px)=>{"use strict";m();T();N();var boe=lx(),Aoe=qS();px.exports=function(e){return boe(Aoe(e))}});var ga=w((cFe,mx)=>{"use strict";m();T();N();var VS=typeof document=="object"&&document.all;mx.exports=typeof VS=="undefined"&&VS!==void 0?function(e){return typeof e=="function"||e===VS}:function(e){return typeof e=="function"}});var id=w((pFe,Nx)=>{"use strict";m();T();N();var Roe=ga();Nx.exports=function(e){return typeof e=="object"?e!==null:Roe(e)}});var fE=w((EFe,Tx)=>{"use strict";m();T();N();var jS=Wi(),Poe=ga(),Foe=function(e){return Poe(e)?e:void 0};Tx.exports=function(e,t){return arguments.length<2?Foe(jS[e]):jS[e]&&jS[e][t]}});var hx=w((gFe,Ex)=>{"use strict";m();T();N();var woe=Ei();Ex.exports=woe({}.isPrototypeOf)});var _x=w((SFe,gx)=>{"use strict";m();T();N();var Loe=Wi(),yx=Loe.navigator,Ix=yx&&yx.userAgent;gx.exports=Ix?String(Ix):""});var Rx=w((RFe,Ax)=>{"use strict";m();T();N();var bx=Wi(),KS=_x(),vx=bx.process,Ox=bx.Deno,Sx=vx&&vx.versions||Ox&&Ox.version,Dx=Sx&&Sx.v8,_a,pE;Dx&&(_a=Dx.split("."),pE=_a[0]>0&&_a[0]<4?1:+(_a[0]+_a[1]));!pE&&KS&&(_a=KS.match(/Edge\/(\d+)/),(!_a||_a[1]>=74)&&(_a=KS.match(/Chrome\/(\d+)/),_a&&(pE=+_a[1])));Ax.exports=pE});var GS=w((LFe,Fx)=>{"use strict";m();T();N();var Px=Rx(),Coe=Ls(),Boe=Wi(),Uoe=Boe.String;Fx.exports=!!Object.getOwnPropertySymbols&&!Coe(function(){var e=Symbol("symbol detection");return!Uoe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Px&&Px<41})});var $S=w((kFe,wx)=>{"use strict";m();T();N();var koe=GS();wx.exports=koe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var QS=w((VFe,Lx)=>{"use strict";m();T();N();var Moe=fE(),xoe=ga(),qoe=hx(),Voe=$S(),joe=Object;Lx.exports=Voe?function(e){return typeof e=="symbol"}:function(e){var t=Moe("Symbol");return xoe(t)&&qoe(t.prototype,joe(e))}});var Bx=w(($Fe,Cx)=>{"use strict";m();T();N();var Koe=String;Cx.exports=function(e){try{return Koe(e)}catch(t){return"Object"}}});var mE=w((HFe,Ux)=>{"use strict";m();T();N();var Goe=ga(),$oe=Bx(),Qoe=TypeError;Ux.exports=function(e){if(Goe(e))return e;throw new Qoe($oe(e)+" is not a function")}});var YS=w((ZFe,kx)=>{"use strict";m();T();N();var Yoe=mE(),Joe=xS();kx.exports=function(e,t){var n=e[t];return Joe(n)?void 0:Yoe(n)}});var xx=w((rwe,Mx)=>{"use strict";m();T();N();var JS=Rc(),HS=ga(),zS=id(),Hoe=TypeError;Mx.exports=function(e,t){var n,r;if(t==="string"&&HS(n=e.toString)&&!zS(r=JS(n,e))||HS(n=e.valueOf)&&!zS(r=JS(n,e))||t!=="string"&&HS(n=e.toString)&&!zS(r=JS(n,e)))return r;throw new Hoe("Can't convert object to primitive value")}});var Vx=w((owe,qx)=>{"use strict";m();T();N();qx.exports=!1});var NE=w((dwe,Kx)=>{"use strict";m();T();N();var jx=Wi(),zoe=Object.defineProperty;Kx.exports=function(e,t){try{zoe(jx,e,{value:t,configurable:!0,writable:!0})}catch(n){jx[e]=t}return t}});var TE=w((Nwe,Qx)=>{"use strict";m();T();N();var Woe=Vx(),Xoe=Wi(),Zoe=NE(),Gx="__core-js_shared__",$x=Qx.exports=Xoe[Gx]||Zoe(Gx,{});($x.versions||($x.versions=[])).push({version:"3.41.0",mode:Woe?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var WS=w((ywe,Jx)=>{"use strict";m();T();N();var Yx=TE();Jx.exports=function(e,t){return Yx[e]||(Yx[e]=t||{})}});var zx=w((vwe,Hx)=>{"use strict";m();T();N();var eue=qS(),tue=Object;Hx.exports=function(e){return tue(eue(e))}});var Au=w((bwe,Wx)=>{"use strict";m();T();N();var nue=Ei(),rue=zx(),iue=nue({}.hasOwnProperty);Wx.exports=Object.hasOwn||function(t,n){return iue(rue(t),n)}});var XS=w((Fwe,Xx)=>{"use strict";m();T();N();var aue=Ei(),sue=0,oue=Math.random(),uue=aue(1 .toString);Xx.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+uue(++sue+oue,36)}});var tq=w((Bwe,eq)=>{"use strict";m();T();N();var cue=Wi(),lue=WS(),Zx=Au(),due=XS(),fue=GS(),pue=$S(),ad=cue.Symbol,ZS=lue("wks"),mue=pue?ad.for||ad:ad&&ad.withoutSetter||due;eq.exports=function(e){return Zx(ZS,e)||(ZS[e]=fue&&Zx(ad,e)?ad[e]:mue("Symbol."+e)),ZS[e]}});var aq=w((xwe,iq)=>{"use strict";m();T();N();var Nue=Rc(),nq=id(),rq=QS(),Tue=YS(),Eue=xx(),hue=tq(),yue=TypeError,Iue=hue("toPrimitive");iq.exports=function(e,t){if(!nq(e)||rq(e))return e;var n=Tue(e,Iue),r;if(n){if(t===void 0&&(t="default"),r=Nue(n,e,t),!nq(r)||rq(r))return r;throw new yue("Can't convert object to primitive value")}return t===void 0&&(t="number"),Eue(e,t)}});var eD=w((Kwe,sq)=>{"use strict";m();T();N();var gue=aq(),_ue=QS();sq.exports=function(e){var t=gue(e,"string");return _ue(t)?t:t+""}});var cq=w((Ywe,uq)=>{"use strict";m();T();N();var vue=Wi(),oq=id(),tD=vue.document,Oue=oq(tD)&&oq(tD.createElement);uq.exports=function(e){return Oue?tD.createElement(e):{}}});var nD=w((Wwe,lq)=>{"use strict";m();T();N();var Sue=bu(),Due=Ls(),bue=cq();lq.exports=!Sue&&!Due(function(){return Object.defineProperty(bue("div"),"a",{get:function(){return 7}}).a!==7})});var rD=w(fq=>{"use strict";m();T();N();var Aue=bu(),Rue=Rc(),Pue=tx(),Fue=US(),wue=dE(),Lue=eD(),Cue=Au(),Bue=nD(),dq=Object.getOwnPropertyDescriptor;fq.f=Aue?dq:function(t,n){if(t=wue(t),n=Lue(n),Bue)try{return dq(t,n)}catch(r){}if(Cue(t,n))return Fue(!Rue(Pue.f,t,n),t[n])}});var mq=w((aLe,pq)=>{"use strict";m();T();N();var Uue=bu(),kue=Ls();pq.exports=Uue&&kue(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var sp=w((cLe,Nq)=>{"use strict";m();T();N();var Mue=id(),xue=String,que=TypeError;Nq.exports=function(e){if(Mue(e))return e;throw new que(xue(e)+" is not an object")}});var hE=w(Eq=>{"use strict";m();T();N();var Vue=bu(),jue=nD(),Kue=mq(),EE=sp(),Tq=eD(),Gue=TypeError,iD=Object.defineProperty,$ue=Object.getOwnPropertyDescriptor,aD="enumerable",sD="configurable",oD="writable";Eq.f=Vue?Kue?function(t,n,r){if(EE(t),n=Tq(n),EE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&oD in r&&!r[oD]){var i=$ue(t,n);i&&i[oD]&&(t[n]=r.value,r={configurable:sD in r?r[sD]:i[sD],enumerable:aD in r?r[aD]:i[aD],writable:!1})}return iD(t,n,r)}:iD:function(t,n,r){if(EE(t),n=Tq(n),EE(r),jue)try{return iD(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new Gue("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var uD=w((ELe,hq)=>{"use strict";m();T();N();var Que=bu(),Yue=hE(),Jue=US();hq.exports=Que?function(e,t,n){return Yue.f(e,t,Jue(1,n))}:function(e,t,n){return e[t]=n,e}});var gq=w((gLe,Iq)=>{"use strict";m();T();N();var cD=bu(),Hue=Au(),yq=Function.prototype,zue=cD&&Object.getOwnPropertyDescriptor,lD=Hue(yq,"name"),Wue=lD&&function(){}.name==="something",Xue=lD&&(!cD||cD&&zue(yq,"name").configurable);Iq.exports={EXISTS:lD,PROPER:Wue,CONFIGURABLE:Xue}});var vq=w((SLe,_q)=>{"use strict";m();T();N();var Zue=Ei(),ece=ga(),dD=TE(),tce=Zue(Function.toString);ece(dD.inspectSource)||(dD.inspectSource=function(e){return tce(e)});_q.exports=dD.inspectSource});var Dq=w((RLe,Sq)=>{"use strict";m();T();N();var nce=Wi(),rce=ga(),Oq=nce.WeakMap;Sq.exports=rce(Oq)&&/native code/.test(String(Oq))});var Rq=w((LLe,Aq)=>{"use strict";m();T();N();var ice=WS(),ace=XS(),bq=ice("keys");Aq.exports=function(e){return bq[e]||(bq[e]=ace(e))}});var fD=w((kLe,Pq)=>{"use strict";m();T();N();Pq.exports={}});var Cq=w((VLe,Lq)=>{"use strict";m();T();N();var sce=Dq(),wq=Wi(),oce=id(),uce=uD(),pD=Au(),mD=TE(),cce=Rq(),lce=fD(),Fq="Object already initialized",ND=wq.TypeError,dce=wq.WeakMap,yE,op,IE,fce=function(e){return IE(e)?op(e):yE(e,{})},pce=function(e){return function(t){var n;if(!oce(t)||(n=op(t)).type!==e)throw new ND("Incompatible receiver, "+e+" required");return n}};sce||mD.state?(va=mD.state||(mD.state=new dce),va.get=va.get,va.has=va.has,va.set=va.set,yE=function(e,t){if(va.has(e))throw new ND(Fq);return t.facade=e,va.set(e,t),t},op=function(e){return va.get(e)||{}},IE=function(e){return va.has(e)}):(Pc=cce("state"),lce[Pc]=!0,yE=function(e,t){if(pD(e,Pc))throw new ND(Fq);return t.facade=e,uce(e,Pc,t),t},op=function(e){return pD(e,Pc)?e[Pc]:{}},IE=function(e){return pD(e,Pc)});var va,Pc;Lq.exports={set:yE,get:op,has:IE,enforce:fce,getterFor:pce}});var Mq=w(($Le,kq)=>{"use strict";m();T();N();var ED=Ei(),mce=Ls(),Nce=ga(),gE=Au(),TD=bu(),Tce=gq().CONFIGURABLE,Ece=vq(),Uq=Cq(),hce=Uq.enforce,yce=Uq.get,Bq=String,_E=Object.defineProperty,Ice=ED("".slice),gce=ED("".replace),_ce=ED([].join),vce=TD&&!mce(function(){return _E(function(){},"length",{value:8}).length!==8}),Oce=String(String).split("String"),Sce=kq.exports=function(e,t,n){Ice(Bq(t),0,7)==="Symbol("&&(t="["+gce(Bq(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!gE(e,"name")||Tce&&e.name!==t)&&(TD?_E(e,"name",{value:t,configurable:!0}):e.name=t),vce&&n&&gE(n,"arity")&&e.length!==n.arity&&_E(e,"length",{value:n.arity});try{n&&gE(n,"constructor")&&n.constructor?TD&&_E(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=hce(e);return gE(r,"source")||(r.source=_ce(Oce,typeof t=="string"?t:"")),e};Function.prototype.toString=Sce(function(){return Nce(this)&&yce(this).source||Ece(this)},"toString")});var qq=w((HLe,xq)=>{"use strict";m();T();N();var Dce=ga(),bce=hE(),Ace=Mq(),Rce=NE();xq.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Dce(n)&&Ace(n,a,r),r.global)i?e[t]=n:Rce(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:bce.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var jq=w((ZLe,Vq)=>{"use strict";m();T();N();var Pce=Math.ceil,Fce=Math.floor;Vq.exports=Math.trunc||function(t){var n=+t;return(n>0?Fce:Pce)(n)}});var vE=w((rCe,Kq)=>{"use strict";m();T();N();var wce=jq();Kq.exports=function(e){var t=+e;return t!==t||t===0?0:wce(t)}});var $q=w((oCe,Gq)=>{"use strict";m();T();N();var Lce=vE(),Cce=Math.max,Bce=Math.min;Gq.exports=function(e,t){var n=Lce(e);return n<0?Cce(n+t,0):Bce(n,t)}});var Yq=w((dCe,Qq)=>{"use strict";m();T();N();var Uce=vE(),kce=Math.min;Qq.exports=function(e){var t=Uce(e);return t>0?kce(t,9007199254740991):0}});var Hq=w((NCe,Jq)=>{"use strict";m();T();N();var Mce=Yq();Jq.exports=function(e){return Mce(e.length)}});var Xq=w((yCe,Wq)=>{"use strict";m();T();N();var xce=dE(),qce=$q(),Vce=Hq(),zq=function(e){return function(t,n,r){var i=xce(t),a=Vce(i);if(a===0)return!e&&-1;var o=qce(r,a),c;if(e&&n!==n){for(;a>o;)if(c=i[o++],c!==c)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}};Wq.exports={includes:zq(!0),indexOf:zq(!1)}});var t1=w((vCe,e1)=>{"use strict";m();T();N();var jce=Ei(),hD=Au(),Kce=dE(),Gce=Xq().indexOf,$ce=fD(),Zq=jce([].push);e1.exports=function(e,t){var n=Kce(e),r=0,i=[],a;for(a in n)!hD($ce,a)&&hD(n,a)&&Zq(i,a);for(;t.length>r;)hD(n,a=t[r++])&&(~Gce(i,a)||Zq(i,a));return i}});var r1=w((bCe,n1)=>{"use strict";m();T();N();n1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var a1=w(i1=>{"use strict";m();T();N();var Qce=t1(),Yce=r1(),Jce=Yce.concat("length","prototype");i1.f=Object.getOwnPropertyNames||function(t){return Qce(t,Jce)}});var o1=w(s1=>{"use strict";m();T();N();s1.f=Object.getOwnPropertySymbols});var c1=w((xCe,u1)=>{"use strict";m();T();N();var Hce=fE(),zce=Ei(),Wce=a1(),Xce=o1(),Zce=sp(),ele=zce([].concat);u1.exports=Hce("Reflect","ownKeys")||function(t){var n=Wce.f(Zce(t)),r=Xce.f;return r?ele(n,r(t)):n}});var f1=w((KCe,d1)=>{"use strict";m();T();N();var l1=Au(),tle=c1(),nle=rD(),rle=hE();d1.exports=function(e,t,n){for(var r=tle(t),i=rle.f,a=nle.f,o=0;o{"use strict";m();T();N();var ile=Ls(),ale=ga(),sle=/#|\.prototype\./,up=function(e,t){var n=ule[ole(e)];return n===lle?!0:n===cle?!1:ale(t)?ile(t):!!t},ole=up.normalize=function(e){return String(e).replace(sle,".").toLowerCase()},ule=up.data={},cle=up.NATIVE="N",lle=up.POLYFILL="P";p1.exports=up});var yD=w((WCe,N1)=>{"use strict";m();T();N();var OE=Wi(),dle=rD().f,fle=uD(),ple=qq(),mle=NE(),Nle=f1(),Tle=m1();N1.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,c,l,d,p;if(r?o=OE:i?o=OE[n]||mle(n,{}):o=OE[n]&&OE[n].prototype,o)for(c in t){if(d=t[c],e.dontCallGetSet?(p=dle(o,c),l=p&&p.value):l=o[c],a=Tle(r?c:n+(i?".":"#")+c,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Nle(d,l)}(e.sham||l&&l.sham)&&fle(d,"sham",!0),ple(o,c,d,e)}}});var cp=w((tBe,T1)=>{"use strict";m();T();N();var ID=Ei(),SE=Set.prototype;T1.exports={Set,add:ID(SE.add),has:ID(SE.has),remove:ID(SE.delete),proto:SE}});var gD=w((aBe,E1)=>{"use strict";m();T();N();var Ele=cp().has;E1.exports=function(e){return Ele(e),e}});var y1=w((cBe,h1)=>{"use strict";m();T();N();var hle=Ei(),yle=mE();h1.exports=function(e,t,n){try{return hle(yle(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var _D=w((pBe,I1)=>{"use strict";m();T();N();var Ile=y1(),gle=cp();I1.exports=Ile(gle.proto,"size","get")||function(e){return e.size}});var vD=w((EBe,g1)=>{"use strict";m();T();N();var _le=Rc();g1.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=_le(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var b1=w((gBe,D1)=>{"use strict";m();T();N();var _1=Ei(),vle=vD(),v1=cp(),Ole=v1.Set,O1=v1.proto,Sle=_1(O1.forEach),S1=_1(O1.keys),Dle=S1(new Ole).next;D1.exports=function(e,t,n){return n?vle({iterator:S1(e),next:Dle},t):Sle(e,t)}});var R1=w((SBe,A1)=>{"use strict";m();T();N();A1.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var OD=w((RBe,B1)=>{"use strict";m();T();N();var P1=mE(),L1=sp(),F1=Rc(),ble=vE(),Ale=R1(),w1="Invalid size",Rle=RangeError,Ple=TypeError,Fle=Math.max,C1=function(e,t){this.set=e,this.size=Fle(t,0),this.has=P1(e.has),this.keys=P1(e.keys)};C1.prototype={getIterator:function(){return Ale(L1(F1(this.keys,this.set)))},includes:function(e){return F1(this.has,this.set,e)}};B1.exports=function(e){L1(e);var t=+e.size;if(t!==t)throw new Ple(w1);var n=ble(t);if(n<0)throw new Rle(w1);return new C1(e,n)}});var k1=w((LBe,U1)=>{"use strict";m();T();N();var wle=gD(),Lle=_D(),Cle=b1(),Ble=OD();U1.exports=function(t){var n=wle(this),r=Ble(t);return Lle(n)>r.size?!1:Cle(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var SD=w((kBe,q1)=>{"use strict";m();T();N();var Ule=fE(),M1=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},x1=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};q1.exports=function(e,t){var n=Ule("Set");try{new n()[e](M1(0));try{return new n()[e](M1(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](x1(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](x1(1/0)))}}}catch(i){return!1}}});var V1=w(()=>{"use strict";m();T();N();var kle=yD(),Mle=k1(),xle=SD(),qle=!xle("isSubsetOf",function(e){return e});kle({target:"Set",proto:!0,real:!0,forced:qle},{isSubsetOf:Mle})});var j1=w(()=>{"use strict";m();T();N();V1()});var $1=w((WBe,G1)=>{"use strict";m();T();N();var Vle=Rc(),K1=sp(),jle=YS();G1.exports=function(e,t,n){var r,i;K1(e);try{if(r=jle(e,"return"),!r){if(t==="throw")throw n;return n}r=Vle(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return K1(r),n}});var Y1=w((tUe,Q1)=>{"use strict";m();T();N();var Kle=gD(),Gle=cp().has,$le=_D(),Qle=OD(),Yle=vD(),Jle=$1();Q1.exports=function(t){var n=Kle(this),r=Qle(t);if($le(n){"use strict";m();T();N();var Hle=yD(),zle=Y1(),Wle=SD(),Xle=!Wle("isSupersetOf",function(e){return!e});Hle({target:"Set",proto:!0,real:!0,forced:Xle},{isSupersetOf:zle})});var H1=w(()=>{"use strict";m();T();N();J1()});var lp=w(Pn=>{"use strict";m();T();N();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.subtractSet=ede;Pn.mapToArrayOfValues=tde;Pn.kindToConvertedTypeString=nde;Pn.fieldDatasToSimpleFieldDatas=rde;Pn.isNodeLeaf=ide;Pn.newEntityInterfaceFederationData=ade;Pn.upsertEntityInterfaceFederationData=sde;Pn.upsertEntityData=ude;Pn.updateEntityData=z1;Pn.newFieldAuthorizationData=cde;Pn.newAuthorizationData=lde;Pn.addScopes=DD;Pn.mergeRequiredScopesByAND=AE;Pn.mergeRequiredScopesByOR=bD;Pn.upsertFieldAuthorizationData=W1;Pn.upsertAuthorizationData=pde;Pn.upsertAuthorizationConfiguration=mde;Pn.isObjectNodeKind=Nde;Pn.isCompositeOutputNodeKind=Tde;Pn.isObjectDefinitionData=Ede;Pn.getNodeCoords=hde;var Kt=Oe(),ii=zn(),DE=Fr(),bE=gu();j1();H1();var Zle=rd();function ede(e,t){for(let n of e)t.delete(n)}function tde(e){let t=[];for(let n of e.values())t.push(n);return t}function nde(e){switch(e){case Kt.Kind.BOOLEAN:return ii.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:case Kt.Kind.ENUM_TYPE_EXTENSION:return ii.ENUM;case Kt.Kind.ENUM_VALUE_DEFINITION:return ii.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return ii.FIELD;case Kt.Kind.FLOAT:return ii.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ii.INPUT_OBJECT;case Kt.Kind.INPUT_VALUE_DEFINITION:return ii.INPUT_VALUE;case Kt.Kind.INT:return ii.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:case Kt.Kind.INTERFACE_TYPE_EXTENSION:return ii.INTERFACE;case Kt.Kind.NULL:return ii.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:case Kt.Kind.OBJECT_TYPE_EXTENSION:return ii.OBJECT;case Kt.Kind.STRING:return ii.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:case Kt.Kind.SCALAR_TYPE_EXTENSION:return ii.SCALAR;case Kt.Kind.UNION_TYPE_DEFINITION:case Kt.Kind.UNION_TYPE_EXTENSION:return ii.UNION;default:return e}}function rde(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function ide(e){if(!e)return!0;switch(e){case Kt.Kind.OBJECT_TYPE_DEFINITION:case Kt.Kind.INTERFACE_TYPE_DEFINITION:case Kt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function ade(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphNames:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function sde(e,t,n){(0,DE.addIterableToSet)({source:t.concreteTypeNames,target:e.concreteTypeNames}),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,DE.addIterableToSet)({source:t.interfaceFieldNames,target:e.interfaceFieldNames}),(0,DE.addIterableToSet)({source:t.interfaceObjectFieldNames,target:e.interfaceObjectFieldNames}),t.isInterfaceObject&&e.interfaceObjectSubgraphNames.add(n)}function ode({keyFieldSetDataByFieldSet:e,subgraphName:t,typeName:n}){let r=new Map([[t,e]]),i=new Map;for(let[a,{documentNode:o,isUnresolvable:c}]of e)c||i.set(a,o);return{keyFieldSetDatasBySubgraphName:r,documentNodeByKeyFieldSet:i,keyFieldSets:new Set,subgraphNames:new Set([t]),typeName:n}}function ude({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?z1({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,ode({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function z1({entityData:e,keyFieldSetDataByFieldSet:t,subgraphName:n}){e.subgraphNames.add(n);let r=e.keyFieldSetDatasBySubgraphName.get(n);if(!r){e.keyFieldSetDatasBySubgraphName.set(n,t);for(let[i,{documentNode:a,isUnresolvable:o}]of t)o||e.documentNodeByKeyFieldSet.set(i,a);return}for(let[i,a]of t){a.isUnresolvable||e.documentNodeByKeyFieldSet.set(i,a.documentNode);let o=r.get(i);if(o){o.isUnresolvable||(o.isUnresolvable=a.isUnresolvable);continue}r.set(i,a)}}function cde(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function lde(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function DD(e,t){for(let n=e.length-1;n>-1;n--){if(e[n].isSubsetOf(t))return;e[n].isSupersetOf(t)&&e.splice(n,1)}e.push(t)}function AE(e,t){if(e.length<1||t.length<1){for(let r of t)e.push(new Set(r));return e}let n=[];for(let r of t)for(let i of e){let a=(0,DE.addSets)(r,i);DD(n,a)}return n}function bD(e,t){for(let n of t)DD(e,n);return e.length<=bE.MAX_OR_SCOPES}function W1(e,t){var i,a;let n=t.fieldName,r=e.get(n);return r?((i=r.inheritedData).requiresAuthentication||(i.requiresAuthentication=t.inheritedData.requiresAuthentication),(a=r.originalData).requiresAuthentication||(a.requiresAuthentication=t.originalData.requiresAuthentication),!bD(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>bE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>bE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=AE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=AE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,X1(t)),!0)}function dde(e){let t=new Map;for(let[n,r]of e)t.set(n,X1(r));return t}function X1(e){return{fieldName:e.fieldName,inheritedData:{requiredScopes:[...e.inheritedData.requiredScopes],requiredScopesByOR:[...e.inheritedData.requiredScopes],requiresAuthentication:e.inheritedData.requiresAuthentication},originalData:{requiredScopes:[...e.originalData.requiredScopes],requiresAuthentication:e.originalData.requiresAuthentication}}}function fde(e){return{fieldAuthDataByFieldName:dde(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function pde(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,fde(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!bD(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>bE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=AE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)W1(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function mde(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthDataByFieldName){let a=`${n}.${r}`,o=e.get(a);o?(o.requiresAuthentication=i.inheritedData.requiresAuthentication,o.requiredScopes=i.inheritedData.requiredScopes.map(c=>[...c]),o.requiredScopesByOR=i.inheritedData.requiredScopesByOR.map(c=>[...c])):e.set(a,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.inheritedData.requiresAuthentication,requiredScopes:i.inheritedData.requiredScopes.map(c=>[...c]),requiredScopesByOR:i.inheritedData.requiredScopesByOR.map(c=>[...c])})}}function Nde(e){return e===Kt.Kind.OBJECT_TYPE_DEFINITION||e===Kt.Kind.OBJECT_TYPE_EXTENSION}function Tde(e){return Zle.COMPOSITE_OUTPUT_NODE_KINDS.has(e)}function Ede(e){return e?e.kind===Kt.Kind.OBJECT_TYPE_DEFINITION:!1}function hde(e){switch(e.kind){case Kt.Kind.ARGUMENT:case Kt.Kind.FIELD_DEFINITION:case Kt.Kind.INPUT_VALUE_DEFINITION:case Kt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var AD=w(Ge=>{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.TAG_DEFINITION_DATA=Ge.SUBSCRIPTION_FILTER_DEFINITION_DATA=Ge.SHAREABLE_DEFINITION_DATA=Ge.SPECIFIED_BY_DEFINITION_DATA=Ge.SEMANTIC_NON_NULL_DATA=Ge.REQUIRES_SCOPES_DEFINITION_DATA=Ge.REQUIRE_FETCH_REASONS_DEFINITION_DATA=Ge.REDIS_SUBSCRIBE_DEFINITION_DATA=Ge.REDIS_PUBLISH_DEFINITION_DATA=Ge.REQUIRES_DEFINITION_DATA=Ge.PROVIDES_DEFINITION_DATA=Ge.LINK_DEFINITION_DATA=Ge.KEY_DEFINITION_DATA=Ge.OVERRIDE_DEFINITION_DATA=Ge.ONE_OF_DEFINITION_DATA=Ge.NATS_SUBSCRIBE_DEFINITION_DATA=Ge.NATS_REQUEST_DEFINITION_DATA=Ge.NATS_PUBLISH_DEFINITION_DATA=Ge.KAFKA_SUBSCRIBE_DEFINITION_DATA=Ge.KAFKA_PUBLISH_DEFINITION_DATA=Ge.INTERFACE_OBJECT_DEFINITION_DATA=Ge.INACCESSIBLE_DEFINITION_DATA=Ge.EXTERNAL_DEFINITION_DATA=Ge.EXTENDS_DEFINITION_DATA=Ge.DEPRECATED_DEFINITION_DATA=Ge.CONNECT_FIELD_RESOLVER_DEFINITION_DATA=Ge.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=Ge.CONFIGURE_DESCRIPTION_DEFINITION_DATA=Ge.COMPOSE_DIRECTIVE_DEFINITION_DATA=Ge.AUTHENTICATED_DEFINITION_DATA=void 0;var Xi=Pr(),Gt=Oe(),x=zn(),en=kf(),Fn=sT();Ge.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.AUTHENTICATED,node:en.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.COMPOSE_DIRECTIVE,node:en.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])};Ge.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}],[x.DESCRIPTION_OVERRIDE,{name:x.DESCRIPTION_OVERRIDE,typeNode:(0,Xi.stringToNamedTypeNode)(x.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.INPUT_OBJECT_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.SCHEMA_UPPER,x.UNION_UPPER]),name:x.CONFIGURE_DESCRIPTION,node:en.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE,x.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};Ge.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.CONFIGURE_CHILD_DESCRIPTIONS,node:en.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE]),requiredArgumentNames:new Set};Ge.CONNECT_FIELD_RESOLVER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONTEXT,{name:x.CONTEXT,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.CONNECT_FIELD_RESOLVER,node:en.CONNECT_FIELD_RESOLVER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONTEXT])};Ge.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.REASON,{name:x.REASON,typeNode:(0,Xi.stringToNamedTypeNode)(x.STRING_SCALAR),defaultValue:{kind:Gt.Kind.STRING,value:Gt.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER]),name:x.DEPRECATED,node:en.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([x.REASON]),requiredArgumentNames:new Set};Ge.EXTENDS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.EXTENDS,node:en.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.EXTERNAL,node:en.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.INACCESSIBLE,node:en.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.OBJECT_UPPER]),name:x.INTERFACE_OBJECT,node:en.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPIC,{name:x.TOPIC,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_PUBLISH,node:en.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPIC])};Ge.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPICS,{name:x.TOPICS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_SUBSCRIBE,node:en.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPICS])};Ge.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_PUBLISH,node:en.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ge.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_REQUEST,node:en.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ge.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECTS,{name:x.SUBJECTS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}],[x.STREAM_CONFIGURATION,{name:x.STREAM_CONFIGURATION,typeNode:(0,Xi.stringToNamedTypeNode)(x.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_SUBSCRIBE,node:en.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID,x.STREAM_CONFIGURATION]),requiredArgumentNames:new Set([x.SUBJECTS])};Ge.ONE_OF_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.INPUT_OBJECT_UPPER]),name:x.ONE_OF,node:en.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FROM,{name:x.FROM,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.OVERRIDE,node:en.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FROM])};Ge.KEY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}],[x.RESOLVABLE,{name:x.RESOLVABLE,typeNode:(0,Xi.stringToNamedTypeNode)(x.BOOLEAN_SCALAR),defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.KEY,node:en.KEY_DEFINITION,optionalArgumentNames:new Set([x.RESOLVABLE]),requiredArgumentNames:new Set([x.FIELDS])};Ge.LINK_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.AS,{name:x.AS,typeNode:(0,Xi.stringToNamedTypeNode)(x.STRING_SCALAR)}],[x.FOR,{name:x.FOR,typeNode:(0,Xi.stringToNamedTypeNode)(x.LINK_PURPOSE)}],[x.IMPORT,{name:x.IMPORT,typeNode:{kind:Gt.Kind.LIST_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.LINK,node:en.LINK_DEFINITION,optionalArgumentNames:new Set([x.AS,x.FOR,x.IMPORT]),requiredArgumentNames:new Set([x.URL_LOWER])};Ge.PROVIDES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.PROVIDES,node:en.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ge.REQUIRES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.REQUIRES,node:en.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ge.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNEL,{name:x.CHANNEL,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_PUBLISH,node:en.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNEL])};Ge.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNELS,{name:x.CHANNELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_SUBSCRIBE,node:en.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNELS])};Ge.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.REQUIRE_FETCH_REASONS,node:en.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SCOPES,{name:x.SCOPES,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.REQUIRES_SCOPES,node:en.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.SCOPES])};Ge.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByName:new Map([[x.LEVELS,{name:x.LEVELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.INT_SCALAR)}}},defaultValue:{kind:Gt.Kind.LIST,values:[{kind:Gt.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SEMANTIC_NON_NULL,node:en.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([x.LEVELS]),requiredArgumentNames:new Set};Ge.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.SCALAR_UPPER]),name:x.SPECIFIED_BY,node:en.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.URL_LOWER])};Ge.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.SHAREABLE,node:en.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONDITION,{name:x.CONDITION,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SUBSCRIPTION_FILTER,node:en.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONDITION])};Ge.TAG_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.TAG,node:en.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])}});var dp=w(Oa=>{"use strict";m();T();N();Object.defineProperty(Oa,"__esModule",{value:!0});Oa.newFieldSetData=yde;Oa.extractFieldSetValue=Ide;Oa.getNormalizedFieldSet=gde;Oa.getInitialFieldCoordsPath=_de;Oa.validateKeyFieldSets=vde;Oa.getConditionalFieldSetDirectiveName=Ode;Oa.isNodeQuery=Sde;Oa.validateArgumentTemplateReferences=Dde;Oa.initializeDirectiveDefinitionDatas=bde;var Gn=Oe(),Z1=Pr(),vr=qi(),eV=gu(),RD=Iu(),tn=AD(),It=zn(),Cs=Fr();function yde(){return{provides:new Map,requires:new Map}}function Ide(e,t,n){if(!n||n.length>1)return;let r=n[0].arguments;if(!r||r.length!==1)return;let i=r[0];i.name.value!==It.FIELDS||i.value.kind!==Gn.Kind.STRING||t.set(e,i.value.value)}function gde(e){return(0,Gn.print)((0,Z1.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function _de(e,t){return e?[t]:[]}function vde(e,t,n){let r=e.entityInterfaceDataByTypeName.get(t.name),i=t.name,a=[],o=[],c=r?void 0:e.internalGraph.addEntityDataNode(t.name),l=e.internalGraph.addOrUpdateNode(t.name),d=0;for(let[p,{documentNode:E,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let A=[],U=[t],j=[],$=[],re=new Set,ee=-1,me=!0,ue="";if((0,Gn.visit)(E,{Argument:{enter(Ae){return A.push((0,vr.unexpectedArgumentErrorMessage)(v,`${U[ee].name}.${ue}`,Ae.name.value)),Gn.BREAK}},Field:{enter(Ae){let xe=U[ee],Ze=xe.name;if(me){let wn=`${Ze}.${ue}`,$t=xe.fieldDataByName.get(ue);if(!$t)return A.push((0,vr.undefinedFieldInFieldSetErrorMessage)(v,wn,ue)),Gn.BREAK;let Tn=(0,RD.getTypeNodeNamedTypeName)($t.node.type),Ur=e.parentDefinitionDataByTypeName.get(Tn),lr=Ur?Ur.kind:Gn.Kind.SCALAR_TYPE_DEFINITION;return A.push((0,vr.invalidSelectionSetErrorMessage)(v,[wn],Tn,(0,Cs.kindToNodeType)(lr))),Gn.BREAK}let Z=Ae.name.value,_e=`${Ze}.${Z}`;if(ue=Z,Z===It.TYPENAME)return;let vt=xe.fieldDataByName.get(Z);if(!vt)return A.push((0,vr.undefinedFieldInFieldSetErrorMessage)(v,Ze,Z)),Gn.BREAK;if(vt.argumentDataByName.size)return A.push((0,vr.argumentsInKeyFieldSetErrorMessage)(v,_e)),Gn.BREAK;if(j[ee].has(Z))return A.push((0,vr.duplicateFieldInFieldSetErrorMessage)(v,_e)),Gn.BREAK;(0,Cs.getValueOrDefault)((0,Cs.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,_e,()=>new Map),i,()=>new Set).add(p),$.push(Z),vt.isShareableBySubgraphName.set(e.subgraphName,!0),j[ee].add(Z),(0,Cs.getValueOrDefault)(e.keyFieldNamesByParentTypeName,Ze,()=>new Set).add(Z);let rn=(0,RD.getTypeNodeNamedTypeName)(vt.node.type);if(eV.BASE_SCALARS.has(rn)){re.add($.join(It.LITERAL_PERIOD)),$.pop();return}let an=e.parentDefinitionDataByTypeName.get(rn);if(!an)return A.push((0,vr.unknownTypeInFieldSetErrorMessage)(v,_e,rn)),Gn.BREAK;if(an.kind===Gn.Kind.OBJECT_TYPE_DEFINITION){me=!0,U.push(an);return}if((0,Z1.isKindAbstract)(an.kind))return A.push((0,vr.abstractTypeInKeyFieldSetErrorMessage)(v,_e,rn,(0,Cs.kindToNodeType)(an.kind))),Gn.BREAK;re.add($.join(It.LITERAL_PERIOD)),$.pop()}},InlineFragment:{enter(){return A.push(vr.inlineFragmentInFieldSetErrorMessage),Gn.BREAK}},SelectionSet:{enter(){if(!me){let Ae=U[ee],Ze=`${Ae.name}.${ue}`;if(ue===It.TYPENAME)return A.push((0,vr.invalidSelectionSetDefinitionErrorMessage)(v,[Ze],It.STRING_SCALAR,(0,Cs.kindToNodeType)(Gn.Kind.SCALAR_TYPE_DEFINITION))),Gn.BREAK;let Z=Ae.fieldDataByName.get(ue);if(!Z)return A.push((0,vr.undefinedFieldInFieldSetErrorMessage)(v,Ze,ue)),Gn.BREAK;let _e=(0,RD.getTypeNodeNamedTypeName)(Z.node.type),vt=e.parentDefinitionDataByTypeName.get(_e),rn=vt?vt.kind:Gn.Kind.SCALAR_TYPE_DEFINITION;return A.push((0,vr.invalidSelectionSetDefinitionErrorMessage)(v,[Ze],_e,(0,Cs.kindToNodeType)(rn))),Gn.BREAK}if(ee+=1,me=!1,ee<0||ee>=U.length)return A.push((0,vr.unparsableFieldSetSelectionErrorMessage)(v,ue)),Gn.BREAK;j.push(new Set)},leave(){if(me){let xe=U[ee].name,Ze=U[ee+1],Z=`${xe}.${ue}`;A.push((0,vr.invalidSelectionSetErrorMessage)(v,[Z],Ze.name,(0,Cs.kindToNodeType)(Ze.kind))),me=!1}ee-=1,U.pop(),j.pop()}}}),A.length>0){e.errors.push((0,vr.invalidDirectiveError)(It.KEY,i,(0,Cs.numberToOrdinal)(d),A));continue}a.push(M({fieldName:"",selectionSet:p},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(p),!I&&(c==null||c.addTargetSubgraphByFieldSet(p,e.subgraphName),o.push(re))}if(a.length>0)return a}function Ode(e){return e?It.PROVIDES:It.REQUIRES}function Sde(e,t){return e===It.QUERY||t===Gn.OperationTypeNode.QUERY}function Dde(e,t,n){let r=e.matchAll(eV.EDFS_ARGS_REGEXP),i=new Set,a=new Set;for(let o of r){if(o.length<2){a.add(o[0]);continue}t.has(o[1])||i.add(o[1])}for(let o of i)n.push((0,vr.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,vr.invalidEventSubjectsArgumentErrorMessage)(o))}function bde(){return new Map([[It.AUTHENTICATED,tn.AUTHENTICATED_DEFINITION_DATA],[It.COMPOSE_DIRECTIVE,tn.COMPOSE_DIRECTIVE_DEFINITION_DATA],[It.CONFIGURE_DESCRIPTION,tn.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[It.CONFIGURE_CHILD_DESCRIPTIONS,tn.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[It.CONNECT_FIELD_RESOLVER,tn.CONNECT_FIELD_RESOLVER_DEFINITION_DATA],[It.DEPRECATED,tn.DEPRECATED_DEFINITION_DATA],[It.EDFS_KAFKA_PUBLISH,tn.KAFKA_PUBLISH_DEFINITION_DATA],[It.EDFS_KAFKA_SUBSCRIBE,tn.KAFKA_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_NATS_PUBLISH,tn.NATS_PUBLISH_DEFINITION_DATA],[It.EDFS_NATS_REQUEST,tn.NATS_REQUEST_DEFINITION_DATA],[It.EDFS_NATS_SUBSCRIBE,tn.NATS_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_REDIS_PUBLISH,tn.REDIS_PUBLISH_DEFINITION_DATA],[It.EDFS_REDIS_SUBSCRIBE,tn.REDIS_SUBSCRIBE_DEFINITION_DATA],[It.EXTENDS,tn.EXTENDS_DEFINITION_DATA],[It.EXTERNAL,tn.EXTERNAL_DEFINITION_DATA],[It.INACCESSIBLE,tn.INACCESSIBLE_DEFINITION_DATA],[It.INTERFACE_OBJECT,tn.INTERFACE_OBJECT_DEFINITION_DATA],[It.KEY,tn.KEY_DEFINITION_DATA],[It.LINK,tn.LINK_DEFINITION_DATA],[It.ONE_OF,tn.ONE_OF_DEFINITION_DATA],[It.OVERRIDE,tn.OVERRIDE_DEFINITION_DATA],[It.PROVIDES,tn.PROVIDES_DEFINITION_DATA],[It.REQUIRE_FETCH_REASONS,tn.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[It.REQUIRES,tn.REQUIRES_DEFINITION_DATA],[It.REQUIRES_SCOPES,tn.REQUIRES_SCOPES_DEFINITION_DATA],[It.SEMANTIC_NON_NULL,tn.SEMANTIC_NON_NULL_DATA],[It.SHAREABLE,tn.SHAREABLE_DEFINITION_DATA],[It.SPECIFIED_BY,tn.SPECIFIED_BY_DEFINITION_DATA],[It.SUBSCRIPTION_FILTER,tn.SUBSCRIPTION_FILTER_DEFINITION_DATA],[It.TAG,tn.TAG_DEFINITION_DATA]])}});var FD=w(PD=>{"use strict";m();T();N();Object.defineProperty(PD,"__esModule",{value:!0});PD.recordSubgraphName=Ade;function Ade(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var LD=w(RE=>{"use strict";m();T();N();Object.defineProperty(RE,"__esModule",{value:!0});RE.Warning=void 0;var wD=class extends Error{constructor(n){super(n.message);_(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};RE.Warning=wD});var fp=w(hi=>{"use strict";m();T();N();Object.defineProperty(hi,"__esModule",{value:!0});hi.invalidOverrideTargetSubgraphNameWarning=Rde;hi.externalInterfaceFieldsWarning=Pde;hi.nonExternalConditionalFieldWarning=Fde;hi.unimplementedInterfaceOutputTypeWarning=wde;hi.invalidExternalFieldWarning=Lde;hi.requiresDefinedOnNonEntityFieldWarning=Cde;hi.consumerInactiveThresholdInvalidValueWarning=Bde;hi.externalEntityExtensionKeyFieldWarning=Ude;hi.fieldAlreadyProvidedWarning=kde;hi.singleSubgraphInputFieldOneOfWarning=Mde;hi.singleFederatedInputFieldOneOfWarning=xde;var Sa=LD(),CD=zn();function Rde(e,t,n,r){return new Sa.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(CD.QUOTATION_JOIN)+`". +`;return n+=`The list value provided to the "levels" argument must be consistently defined across all subgraphs that define "@semanticNonNull" on field "${t}".`,new Error(n)}function moe({requiredFieldNames:e,typeName:t}){return new Error(`The "@oneOf" directive defined on Input Object "${t}" is invalid because all Input fields must be optional (nullable); however, the following Input field`+(e.length>1?"s are":" is")+' required (non-nullable): "'+e.join(Je.QUOTATION_JOIN)+'".')}});var JM=w(YM=>{"use strict";m();T();N();Object.defineProperty(YM,"__esModule",{value:!0})});var cE=w(uE=>{"use strict";m();T();N();Object.defineProperty(uE,"__esModule",{value:!0});uE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;uE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var lE=w(Er=>{"use strict";m();T();N();Object.defineProperty(Er,"__esModule",{value:!0});Er.SUBSCRIPTION_FILTER_VALUE_DEFINITION=Er.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=Er.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=Er.SCOPE_SCALAR_DEFINITION=Er.LINK_PURPOSE_DEFINITION=Er.LINK_IMPORT_DEFINITION=Er.FIELD_SET_SCALAR_DEFINITION=Er.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=void 0;var Zt=Oe(),dn=Pr(),fn=zn(),Noe=cE();Er.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.CONSUMER_INACTIVE_THRESHOLD),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.INT_SCALAR)},defaultValue:{kind:Zt.Kind.INT,value:Noe.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.CONSUMER_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.STREAM_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}}]};Er.FIELD_SET_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.FIELD_SET_SCALAR)};Er.LINK_IMPORT_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.LINK_IMPORT)};Er.LINK_PURPOSE_DEFINITION={kind:Zt.Kind.ENUM_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.LINK_PURPOSE),values:[{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.EXECUTION)},{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SECURITY)}]};Er.SCOPE_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SCOPE_SCALAR)};Er.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.FIELD_PATH),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.VALUES),type:{kind:Zt.Kind.NON_NULL_TYPE,type:{kind:Zt.Kind.LIST_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_VALUE)}}}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FIELD_CONDITION)};Er.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.AND_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.IN_UPPER),type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FIELD_CONDITION)},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.OR_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.NOT_UPPER),type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FILTER_CONDITION)};Er.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FILTER_VALUE)}});var id=w(tr=>{"use strict";m();T();N();Object.defineProperty(tr,"__esModule",{value:!0});tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=tr.IGNORED_FEDERATED_TYPE_NAMES=tr.DEPENDENCIES_BY_DIRECTIVE_NAME=tr.COMPOSITE_OUTPUT_NODE_KINDS=tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=tr.SUBSCRIPTION_FILTER_INPUT_NAMES=tr.STREAM_CONFIGURATION_FIELD_NAMES=tr.EVENT_DIRECTIVE_NAMES=tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var nt=zn(),dE=Oe(),Ia=lE();tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([nt.ARGUMENT_DEFINITION_UPPER,nt.ENUM_UPPER,nt.ENUM_VALUE_UPPER,nt.FIELD_DEFINITION_UPPER,nt.INPUT_FIELD_DEFINITION_UPPER,nt.INPUT_OBJECT_UPPER,nt.INTERFACE_UPPER,nt.OBJECT_UPPER,nt.SCALAR_UPPER,nt.SCHEMA_UPPER,nt.UNION_UPPER]);tr.EVENT_DIRECTIVE_NAMES=new Set([nt.EDFS_KAFKA_PUBLISH,nt.EDFS_KAFKA_SUBSCRIBE,nt.EDFS_NATS_PUBLISH,nt.EDFS_NATS_REQUEST,nt.EDFS_NATS_SUBSCRIBE,nt.EDFS_REDIS_PUBLISH,nt.EDFS_REDIS_SUBSCRIBE]);tr.STREAM_CONFIGURATION_FIELD_NAMES=new Set([nt.CONSUMER_INACTIVE_THRESHOLD,nt.CONSUMER_NAME,nt.STREAM_NAME]);tr.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([nt.AND_UPPER,nt.IN_UPPER,nt.NOT_UPPER,nt.OR_UPPER]);tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([nt.AND_UPPER,nt.OR_UPPER]);tr.COMPOSITE_OUTPUT_NODE_KINDS=new Set([dE.Kind.INTERFACE_TYPE_DEFINITION,dE.Kind.INTERFACE_TYPE_EXTENSION,dE.Kind.OBJECT_TYPE_DEFINITION,dE.Kind.OBJECT_TYPE_EXTENSION]);tr.DEPENDENCIES_BY_DIRECTIVE_NAME=new Map([[nt.CONNECT_FIELD_RESOLVER,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.EDFS_NATS_SUBSCRIBE,[Ia.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION]],[nt.KEY,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.LINK,[Ia.LINK_IMPORT_DEFINITION,Ia.LINK_PURPOSE_DEFINITION]],[nt.PROVIDES,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES,[Ia.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES_SCOPES,[Ia.SCOPE_SCALAR_DEFINITION]],[nt.SUBSCRIPTION_FILTER,[Ia.SUBSCRIPTION_FIELD_CONDITION_DEFINITION,Ia.SUBSCRIPTION_FILTER_CONDITION_DEFINITION,Ia.SUBSCRIPTION_FILTER_VALUE_DEFINITION]]]);tr.IGNORED_FEDERATED_TYPE_NAMES=new Set([nt.BOOLEAN_SCALAR,nt.EDFS_NATS_STREAM_CONFIGURATION,nt.FIELD_SET_SCALAR,nt.ID_SCALAR,nt.INT_SCALAR,nt.FLOAT_SCALAR,nt.LINK_IMPORT,nt.LINK_PURPOSE,nt.STRING_SCALAR,nt.SUBSCRIPTION_FIELD_CONDITION,nt.SUBSCRIPTION_FILTER_CONDITION,nt.SUBSCRIPTION_FILTER_VALUE]);tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=new Set([nt.DEPRECATED,nt.ONE_OF,nt.SEMANTIC_NON_NULL])});var Wi=w((BS,HM)=>{"use strict";m();T();N();var sp=function(e){return e&&e.Math===Math&&e};HM.exports=sp(typeof globalThis=="object"&&globalThis)||sp(typeof window=="object"&&window)||sp(typeof self=="object"&&self)||sp(typeof global=="object"&&global)||sp(typeof BS=="object"&&BS)||function(){return this}()||Function("return this")()});var Ls=w((EPe,zM)=>{"use strict";m();T();N();zM.exports=function(e){try{return!!e()}catch(t){return!0}}});var Au=w((gPe,WM)=>{"use strict";m();T();N();var Toe=Ls();WM.exports=!Toe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var US=w((SPe,XM)=>{"use strict";m();T();N();var Eoe=Ls();XM.exports=!Eoe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Pc=w((RPe,ZM)=>{"use strict";m();T();N();var hoe=US(),fE=Function.prototype.call;ZM.exports=hoe?fE.bind(fE):function(){return fE.apply(fE,arguments)}});var rx=w(nx=>{"use strict";m();T();N();var ex={}.propertyIsEnumerable,tx=Object.getOwnPropertyDescriptor,yoe=tx&&!ex.call({1:2},1);nx.f=yoe?function(t){var n=tx(this,t);return!!n&&n.enumerable}:ex});var kS=w((kPe,ix)=>{"use strict";m();T();N();ix.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Ei=w((VPe,ox)=>{"use strict";m();T();N();var ax=US(),sx=Function.prototype,MS=sx.call,Ioe=ax&&sx.bind.bind(MS,MS);ox.exports=ax?Ioe:function(e){return function(){return MS.apply(e,arguments)}}});var lx=w(($Pe,cx)=>{"use strict";m();T();N();var ux=Ei(),goe=ux({}.toString),_oe=ux("".slice);cx.exports=function(e){return _oe(goe(e),8,-1)}});var fx=w((HPe,dx)=>{"use strict";m();T();N();var voe=Ei(),Ooe=Ls(),Soe=lx(),xS=Object,Doe=voe("".split);dx.exports=Ooe(function(){return!xS("z").propertyIsEnumerable(0)})?function(e){return Soe(e)==="String"?Doe(e,""):xS(e)}:xS});var qS=w((ZPe,px)=>{"use strict";m();T();N();px.exports=function(e){return e==null}});var VS=w((rFe,mx)=>{"use strict";m();T();N();var boe=qS(),Aoe=TypeError;mx.exports=function(e){if(boe(e))throw new Aoe("Can't call method on "+e);return e}});var pE=w((oFe,Nx)=>{"use strict";m();T();N();var Roe=fx(),Poe=VS();Nx.exports=function(e){return Roe(Poe(e))}});var ga=w((dFe,Tx)=>{"use strict";m();T();N();var jS=typeof document=="object"&&document.all;Tx.exports=typeof jS=="undefined"&&jS!==void 0?function(e){return typeof e=="function"||e===jS}:function(e){return typeof e=="function"}});var ad=w((NFe,Ex)=>{"use strict";m();T();N();var Foe=ga();Ex.exports=function(e){return typeof e=="object"?e!==null:Foe(e)}});var mE=w((yFe,hx)=>{"use strict";m();T();N();var KS=Wi(),woe=ga(),Loe=function(e){return woe(e)?e:void 0};hx.exports=function(e,t){return arguments.length<2?Loe(KS[e]):KS[e]&&KS[e][t]}});var Ix=w((vFe,yx)=>{"use strict";m();T();N();var Coe=Ei();yx.exports=Coe({}.isPrototypeOf)});var Ox=w((bFe,vx)=>{"use strict";m();T();N();var Boe=Wi(),gx=Boe.navigator,_x=gx&&gx.userAgent;vx.exports=_x?String(_x):""});var Fx=w((FFe,Px)=>{"use strict";m();T();N();var Rx=Wi(),GS=Ox(),Sx=Rx.process,Dx=Rx.Deno,bx=Sx&&Sx.versions||Dx&&Dx.version,Ax=bx&&bx.v8,_a,NE;Ax&&(_a=Ax.split("."),NE=_a[0]>0&&_a[0]<4?1:+(_a[0]+_a[1]));!NE&&GS&&(_a=GS.match(/Edge\/(\d+)/),(!_a||_a[1]>=74)&&(_a=GS.match(/Chrome\/(\d+)/),_a&&(NE=+_a[1])));Px.exports=NE});var $S=w((BFe,Lx)=>{"use strict";m();T();N();var wx=Fx(),Uoe=Ls(),koe=Wi(),Moe=koe.String;Lx.exports=!!Object.getOwnPropertySymbols&&!Uoe(function(){var e=Symbol("symbol detection");return!Moe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&wx&&wx<41})});var QS=w((xFe,Cx)=>{"use strict";m();T();N();var xoe=$S();Cx.exports=xoe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var YS=w((KFe,Bx)=>{"use strict";m();T();N();var qoe=mE(),Voe=ga(),joe=Ix(),Koe=QS(),Goe=Object;Bx.exports=Koe?function(e){return typeof e=="symbol"}:function(e){var t=qoe("Symbol");return Voe(t)&&joe(t.prototype,Goe(e))}});var kx=w((YFe,Ux)=>{"use strict";m();T();N();var $oe=String;Ux.exports=function(e){try{return $oe(e)}catch(t){return"Object"}}});var TE=w((WFe,Mx)=>{"use strict";m();T();N();var Qoe=ga(),Yoe=kx(),Joe=TypeError;Mx.exports=function(e){if(Qoe(e))return e;throw new Joe(Yoe(e)+" is not a function")}});var JS=w((twe,xx)=>{"use strict";m();T();N();var Hoe=TE(),zoe=qS();xx.exports=function(e,t){var n=e[t];return zoe(n)?void 0:Hoe(n)}});var Vx=w((awe,qx)=>{"use strict";m();T();N();var HS=Pc(),zS=ga(),WS=ad(),Woe=TypeError;qx.exports=function(e,t){var n,r;if(t==="string"&&zS(n=e.toString)&&!WS(r=HS(n,e))||zS(n=e.valueOf)&&!WS(r=HS(n,e))||t!=="string"&&zS(n=e.toString)&&!WS(r=HS(n,e)))return r;throw new Woe("Can't convert object to primitive value")}});var Kx=w((cwe,jx)=>{"use strict";m();T();N();jx.exports=!1});var EE=w((pwe,$x)=>{"use strict";m();T();N();var Gx=Wi(),Xoe=Object.defineProperty;$x.exports=function(e,t){try{Xoe(Gx,e,{value:t,configurable:!0,writable:!0})}catch(n){Gx[e]=t}return t}});var hE=w((Ewe,Jx)=>{"use strict";m();T();N();var Zoe=Kx(),eue=Wi(),tue=EE(),Qx="__core-js_shared__",Yx=Jx.exports=eue[Qx]||tue(Qx,{});(Yx.versions||(Yx.versions=[])).push({version:"3.41.0",mode:Zoe?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var XS=w((gwe,zx)=>{"use strict";m();T();N();var Hx=hE();zx.exports=function(e,t){return Hx[e]||(Hx[e]=t||{})}});var Xx=w((Swe,Wx)=>{"use strict";m();T();N();var nue=VS(),rue=Object;Wx.exports=function(e){return rue(nue(e))}});var Ru=w((Rwe,Zx)=>{"use strict";m();T();N();var iue=Ei(),aue=Xx(),sue=iue({}.hasOwnProperty);Zx.exports=Object.hasOwn||function(t,n){return sue(aue(t),n)}});var ZS=w((Lwe,eq)=>{"use strict";m();T();N();var oue=Ei(),uue=0,cue=Math.random(),lue=oue(1 .toString);eq.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+lue(++uue+cue,36)}});var rq=w((kwe,nq)=>{"use strict";m();T();N();var due=Wi(),fue=XS(),tq=Ru(),pue=ZS(),mue=$S(),Nue=QS(),sd=due.Symbol,eD=fue("wks"),Tue=Nue?sd.for||sd:sd&&sd.withoutSetter||pue;nq.exports=function(e){return tq(eD,e)||(eD[e]=mue&&tq(sd,e)?sd[e]:Tue("Symbol."+e)),eD[e]}});var oq=w((Vwe,sq)=>{"use strict";m();T();N();var Eue=Pc(),iq=ad(),aq=YS(),hue=JS(),yue=Vx(),Iue=rq(),gue=TypeError,_ue=Iue("toPrimitive");sq.exports=function(e,t){if(!iq(e)||aq(e))return e;var n=hue(e,_ue),r;if(n){if(t===void 0&&(t="default"),r=Eue(n,e,t),!iq(r)||aq(r))return r;throw new gue("Can't convert object to primitive value")}return t===void 0&&(t="number"),yue(e,t)}});var tD=w(($we,uq)=>{"use strict";m();T();N();var vue=oq(),Oue=YS();uq.exports=function(e){var t=vue(e,"string");return Oue(t)?t:t+""}});var dq=w((Hwe,lq)=>{"use strict";m();T();N();var Sue=Wi(),cq=ad(),nD=Sue.document,Due=cq(nD)&&cq(nD.createElement);lq.exports=function(e){return Due?nD.createElement(e):{}}});var rD=w((Zwe,fq)=>{"use strict";m();T();N();var bue=Au(),Aue=Ls(),Rue=dq();fq.exports=!bue&&!Aue(function(){return Object.defineProperty(Rue("div"),"a",{get:function(){return 7}}).a!==7})});var iD=w(mq=>{"use strict";m();T();N();var Pue=Au(),Fue=Pc(),wue=rx(),Lue=kS(),Cue=pE(),Bue=tD(),Uue=Ru(),kue=rD(),pq=Object.getOwnPropertyDescriptor;mq.f=Pue?pq:function(t,n){if(t=Cue(t),n=Bue(n),kue)try{return pq(t,n)}catch(r){}if(Uue(t,n))return Lue(!Fue(wue.f,t,n),t[n])}});var Tq=w((oLe,Nq)=>{"use strict";m();T();N();var Mue=Au(),xue=Ls();Nq.exports=Mue&&xue(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var op=w((dLe,Eq)=>{"use strict";m();T();N();var que=ad(),Vue=String,jue=TypeError;Eq.exports=function(e){if(que(e))return e;throw new jue(Vue(e)+" is not an object")}});var IE=w(yq=>{"use strict";m();T();N();var Kue=Au(),Gue=rD(),$ue=Tq(),yE=op(),hq=tD(),Que=TypeError,aD=Object.defineProperty,Yue=Object.getOwnPropertyDescriptor,sD="enumerable",oD="configurable",uD="writable";yq.f=Kue?$ue?function(t,n,r){if(yE(t),n=hq(n),yE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&uD in r&&!r[uD]){var i=Yue(t,n);i&&i[uD]&&(t[n]=r.value,r={configurable:oD in r?r[oD]:i[oD],enumerable:sD in r?r[sD]:i[sD],writable:!1})}return aD(t,n,r)}:aD:function(t,n,r){if(yE(t),n=hq(n),yE(r),Gue)try{return aD(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new Que("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var cD=w((yLe,Iq)=>{"use strict";m();T();N();var Jue=Au(),Hue=IE(),zue=kS();Iq.exports=Jue?function(e,t,n){return Hue.f(e,t,zue(1,n))}:function(e,t,n){return e[t]=n,e}});var vq=w((vLe,_q)=>{"use strict";m();T();N();var lD=Au(),Wue=Ru(),gq=Function.prototype,Xue=lD&&Object.getOwnPropertyDescriptor,dD=Wue(gq,"name"),Zue=dD&&function(){}.name==="something",ece=dD&&(!lD||lD&&Xue(gq,"name").configurable);_q.exports={EXISTS:dD,PROPER:Zue,CONFIGURABLE:ece}});var Sq=w((bLe,Oq)=>{"use strict";m();T();N();var tce=Ei(),nce=ga(),fD=hE(),rce=tce(Function.toString);nce(fD.inspectSource)||(fD.inspectSource=function(e){return rce(e)});Oq.exports=fD.inspectSource});var Aq=w((FLe,bq)=>{"use strict";m();T();N();var ice=Wi(),ace=ga(),Dq=ice.WeakMap;bq.exports=ace(Dq)&&/native code/.test(String(Dq))});var Fq=w((BLe,Pq)=>{"use strict";m();T();N();var sce=XS(),oce=ZS(),Rq=sce("keys");Pq.exports=function(e){return Rq[e]||(Rq[e]=oce(e))}});var pD=w((xLe,wq)=>{"use strict";m();T();N();wq.exports={}});var Uq=w((KLe,Bq)=>{"use strict";m();T();N();var uce=Aq(),Cq=Wi(),cce=ad(),lce=cD(),mD=Ru(),ND=hE(),dce=Fq(),fce=pD(),Lq="Object already initialized",TD=Cq.TypeError,pce=Cq.WeakMap,gE,up,_E,mce=function(e){return _E(e)?up(e):gE(e,{})},Nce=function(e){return function(t){var n;if(!cce(t)||(n=up(t)).type!==e)throw new TD("Incompatible receiver, "+e+" required");return n}};uce||ND.state?(va=ND.state||(ND.state=new pce),va.get=va.get,va.has=va.has,va.set=va.set,gE=function(e,t){if(va.has(e))throw new TD(Lq);return t.facade=e,va.set(e,t),t},up=function(e){return va.get(e)||{}},_E=function(e){return va.has(e)}):(Fc=dce("state"),fce[Fc]=!0,gE=function(e,t){if(mD(e,Fc))throw new TD(Lq);return t.facade=e,lce(e,Fc,t),t},up=function(e){return mD(e,Fc)?e[Fc]:{}},_E=function(e){return mD(e,Fc)});var va,Fc;Bq.exports={set:gE,get:up,has:_E,enforce:mce,getterFor:Nce}});var qq=w((YLe,xq)=>{"use strict";m();T();N();var hD=Ei(),Tce=Ls(),Ece=ga(),vE=Ru(),ED=Au(),hce=vq().CONFIGURABLE,yce=Sq(),Mq=Uq(),Ice=Mq.enforce,gce=Mq.get,kq=String,OE=Object.defineProperty,_ce=hD("".slice),vce=hD("".replace),Oce=hD([].join),Sce=ED&&!Tce(function(){return OE(function(){},"length",{value:8}).length!==8}),Dce=String(String).split("String"),bce=xq.exports=function(e,t,n){_ce(kq(t),0,7)==="Symbol("&&(t="["+vce(kq(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!vE(e,"name")||hce&&e.name!==t)&&(ED?OE(e,"name",{value:t,configurable:!0}):e.name=t),Sce&&n&&vE(n,"arity")&&e.length!==n.arity&&OE(e,"length",{value:n.arity});try{n&&vE(n,"constructor")&&n.constructor?ED&&OE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=Ice(e);return vE(r,"source")||(r.source=Oce(Dce,typeof t=="string"?t:"")),e};Function.prototype.toString=bce(function(){return Ece(this)&&gce(this).source||yce(this)},"toString")});var jq=w((WLe,Vq)=>{"use strict";m();T();N();var Ace=ga(),Rce=IE(),Pce=qq(),Fce=EE();Vq.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Ace(n)&&Pce(n,a,r),r.global)i?e[t]=n:Fce(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Rce.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var Gq=w((tCe,Kq)=>{"use strict";m();T();N();var wce=Math.ceil,Lce=Math.floor;Kq.exports=Math.trunc||function(t){var n=+t;return(n>0?Lce:wce)(n)}});var SE=w((aCe,$q)=>{"use strict";m();T();N();var Cce=Gq();$q.exports=function(e){var t=+e;return t!==t||t===0?0:Cce(t)}});var Yq=w((cCe,Qq)=>{"use strict";m();T();N();var Bce=SE(),Uce=Math.max,kce=Math.min;Qq.exports=function(e,t){var n=Bce(e);return n<0?Uce(n+t,0):kce(n,t)}});var Hq=w((pCe,Jq)=>{"use strict";m();T();N();var Mce=SE(),xce=Math.min;Jq.exports=function(e){var t=Mce(e);return t>0?xce(t,9007199254740991):0}});var Wq=w((ECe,zq)=>{"use strict";m();T();N();var qce=Hq();zq.exports=function(e){return qce(e.length)}});var e1=w((gCe,Zq)=>{"use strict";m();T();N();var Vce=pE(),jce=Yq(),Kce=Wq(),Xq=function(e){return function(t,n,r){var i=Vce(t),a=Kce(i);if(a===0)return!e&&-1;var o=jce(r,a),c;if(e&&n!==n){for(;a>o;)if(c=i[o++],c!==c)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}};Zq.exports={includes:Xq(!0),indexOf:Xq(!1)}});var r1=w((SCe,n1)=>{"use strict";m();T();N();var Gce=Ei(),yD=Ru(),$ce=pE(),Qce=e1().indexOf,Yce=pD(),t1=Gce([].push);n1.exports=function(e,t){var n=$ce(e),r=0,i=[],a;for(a in n)!yD(Yce,a)&&yD(n,a)&&t1(i,a);for(;t.length>r;)yD(n,a=t[r++])&&(~Qce(i,a)||t1(i,a));return i}});var a1=w((RCe,i1)=>{"use strict";m();T();N();i1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var o1=w(s1=>{"use strict";m();T();N();var Jce=r1(),Hce=a1(),zce=Hce.concat("length","prototype");s1.f=Object.getOwnPropertyNames||function(t){return Jce(t,zce)}});var c1=w(u1=>{"use strict";m();T();N();u1.f=Object.getOwnPropertySymbols});var d1=w((VCe,l1)=>{"use strict";m();T();N();var Wce=mE(),Xce=Ei(),Zce=o1(),ele=c1(),tle=op(),nle=Xce([].concat);l1.exports=Wce("Reflect","ownKeys")||function(t){var n=Zce.f(tle(t)),r=ele.f;return r?nle(n,r(t)):n}});var m1=w(($Ce,p1)=>{"use strict";m();T();N();var f1=Ru(),rle=d1(),ile=iD(),ale=IE();p1.exports=function(e,t,n){for(var r=rle(t),i=ale.f,a=ile.f,o=0;o{"use strict";m();T();N();var sle=Ls(),ole=ga(),ule=/#|\.prototype\./,cp=function(e,t){var n=lle[cle(e)];return n===fle?!0:n===dle?!1:ole(t)?sle(t):!!t},cle=cp.normalize=function(e){return String(e).replace(ule,".").toLowerCase()},lle=cp.data={},dle=cp.NATIVE="N",fle=cp.POLYFILL="P";N1.exports=cp});var ID=w((ZCe,E1)=>{"use strict";m();T();N();var DE=Wi(),ple=iD().f,mle=cD(),Nle=jq(),Tle=EE(),Ele=m1(),hle=T1();E1.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,c,l,d,p;if(r?o=DE:i?o=DE[n]||Tle(n,{}):o=DE[n]&&DE[n].prototype,o)for(c in t){if(d=t[c],e.dontCallGetSet?(p=ple(o,c),l=p&&p.value):l=o[c],a=hle(r?c:n+(i?".":"#")+c,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Ele(d,l)}(e.sham||l&&l.sham)&&mle(d,"sham",!0),Nle(o,c,d,e)}}});var lp=w((rBe,h1)=>{"use strict";m();T();N();var gD=Ei(),bE=Set.prototype;h1.exports={Set,add:gD(bE.add),has:gD(bE.has),remove:gD(bE.delete),proto:bE}});var _D=w((oBe,y1)=>{"use strict";m();T();N();var yle=lp().has;y1.exports=function(e){return yle(e),e}});var g1=w((dBe,I1)=>{"use strict";m();T();N();var Ile=Ei(),gle=TE();I1.exports=function(e,t,n){try{return Ile(gle(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var vD=w((NBe,_1)=>{"use strict";m();T();N();var _le=g1(),vle=lp();_1.exports=_le(vle.proto,"size","get")||function(e){return e.size}});var OD=w((yBe,v1)=>{"use strict";m();T();N();var Ole=Pc();v1.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=Ole(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var R1=w((vBe,A1)=>{"use strict";m();T();N();var O1=Ei(),Sle=OD(),S1=lp(),Dle=S1.Set,D1=S1.proto,ble=O1(D1.forEach),b1=O1(D1.keys),Ale=b1(new Dle).next;A1.exports=function(e,t,n){return n?Sle({iterator:b1(e),next:Ale},t):ble(e,t)}});var F1=w((bBe,P1)=>{"use strict";m();T();N();P1.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var SD=w((FBe,k1)=>{"use strict";m();T();N();var w1=TE(),B1=op(),L1=Pc(),Rle=SE(),Ple=F1(),C1="Invalid size",Fle=RangeError,wle=TypeError,Lle=Math.max,U1=function(e,t){this.set=e,this.size=Lle(t,0),this.has=w1(e.has),this.keys=w1(e.keys)};U1.prototype={getIterator:function(){return Ple(B1(L1(this.keys,this.set)))},includes:function(e){return L1(this.has,this.set,e)}};k1.exports=function(e){B1(e);var t=+e.size;if(t!==t)throw new wle(C1);var n=Rle(t);if(n<0)throw new Fle(C1);return new U1(e,n)}});var x1=w((BBe,M1)=>{"use strict";m();T();N();var Cle=_D(),Ble=vD(),Ule=R1(),kle=SD();M1.exports=function(t){var n=Cle(this),r=kle(t);return Ble(n)>r.size?!1:Ule(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var DD=w((xBe,j1)=>{"use strict";m();T();N();var Mle=mE(),q1=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},V1=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};j1.exports=function(e,t){var n=Mle("Set");try{new n()[e](q1(0));try{return new n()[e](q1(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](V1(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](V1(1/0)))}}}catch(i){return!1}}});var K1=w(()=>{"use strict";m();T();N();var xle=ID(),qle=x1(),Vle=DD(),jle=!Vle("isSubsetOf",function(e){return e});xle({target:"Set",proto:!0,real:!0,forced:jle},{isSubsetOf:qle})});var G1=w(()=>{"use strict";m();T();N();K1()});var Y1=w((ZBe,Q1)=>{"use strict";m();T();N();var Kle=Pc(),$1=op(),Gle=JS();Q1.exports=function(e,t,n){var r,i;$1(e);try{if(r=Gle(e,"return"),!r){if(t==="throw")throw n;return n}r=Kle(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return $1(r),n}});var H1=w((rUe,J1)=>{"use strict";m();T();N();var $le=_D(),Qle=lp().has,Yle=vD(),Jle=SD(),Hle=OD(),zle=Y1();J1.exports=function(t){var n=$le(this),r=Jle(t);if(Yle(n){"use strict";m();T();N();var Wle=ID(),Xle=H1(),Zle=DD(),ede=!Zle("isSupersetOf",function(e){return!e});Wle({target:"Set",proto:!0,real:!0,forced:ede},{isSupersetOf:Xle})});var W1=w(()=>{"use strict";m();T();N();z1()});var dp=w(Pn=>{"use strict";m();T();N();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.subtractSet=nde;Pn.mapToArrayOfValues=rde;Pn.kindToConvertedTypeString=ide;Pn.fieldDatasToSimpleFieldDatas=ade;Pn.isNodeLeaf=sde;Pn.newEntityInterfaceFederationData=ode;Pn.upsertEntityInterfaceFederationData=ude;Pn.upsertEntityData=lde;Pn.updateEntityData=X1;Pn.newFieldAuthorizationData=dde;Pn.newAuthorizationData=fde;Pn.addScopes=bD;Pn.mergeRequiredScopesByAND=PE;Pn.mergeRequiredScopesByOR=AD;Pn.upsertFieldAuthorizationData=Z1;Pn.upsertAuthorizationData=Nde;Pn.upsertAuthorizationConfiguration=Tde;Pn.isObjectNodeKind=Ede;Pn.isCompositeOutputNodeKind=hde;Pn.isObjectDefinitionData=yde;Pn.getNodeCoords=Ide;var Kt=Oe(),ii=zn(),AE=Fr(),RE=_u();G1();W1();var tde=id();function nde(e,t){for(let n of e)t.delete(n)}function rde(e){let t=[];for(let n of e.values())t.push(n);return t}function ide(e){switch(e){case Kt.Kind.BOOLEAN:return ii.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:case Kt.Kind.ENUM_TYPE_EXTENSION:return ii.ENUM;case Kt.Kind.ENUM_VALUE_DEFINITION:return ii.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return ii.FIELD;case Kt.Kind.FLOAT:return ii.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ii.INPUT_OBJECT;case Kt.Kind.INPUT_VALUE_DEFINITION:return ii.INPUT_VALUE;case Kt.Kind.INT:return ii.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:case Kt.Kind.INTERFACE_TYPE_EXTENSION:return ii.INTERFACE;case Kt.Kind.NULL:return ii.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:case Kt.Kind.OBJECT_TYPE_EXTENSION:return ii.OBJECT;case Kt.Kind.STRING:return ii.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:case Kt.Kind.SCALAR_TYPE_EXTENSION:return ii.SCALAR;case Kt.Kind.UNION_TYPE_DEFINITION:case Kt.Kind.UNION_TYPE_EXTENSION:return ii.UNION;default:return e}}function ade(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function sde(e){if(!e)return!0;switch(e){case Kt.Kind.OBJECT_TYPE_DEFINITION:case Kt.Kind.INTERFACE_TYPE_DEFINITION:case Kt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function ode(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphNames:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function ude(e,t,n){(0,AE.addIterableToSet)({source:t.concreteTypeNames,target:e.concreteTypeNames}),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,AE.addIterableToSet)({source:t.interfaceFieldNames,target:e.interfaceFieldNames}),(0,AE.addIterableToSet)({source:t.interfaceObjectFieldNames,target:e.interfaceObjectFieldNames}),t.isInterfaceObject&&e.interfaceObjectSubgraphNames.add(n)}function cde({keyFieldSetDataByFieldSet:e,subgraphName:t,typeName:n}){let r=new Map([[t,e]]),i=new Map;for(let[a,{documentNode:o,isUnresolvable:c}]of e)c||i.set(a,o);return{keyFieldSetDatasBySubgraphName:r,documentNodeByKeyFieldSet:i,keyFieldSets:new Set,subgraphNames:new Set([t]),typeName:n}}function lde({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?X1({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,cde({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function X1({entityData:e,keyFieldSetDataByFieldSet:t,subgraphName:n}){e.subgraphNames.add(n);let r=e.keyFieldSetDatasBySubgraphName.get(n);if(!r){e.keyFieldSetDatasBySubgraphName.set(n,t);for(let[i,{documentNode:a,isUnresolvable:o}]of t)o||e.documentNodeByKeyFieldSet.set(i,a);return}for(let[i,a]of t){a.isUnresolvable||e.documentNodeByKeyFieldSet.set(i,a.documentNode);let o=r.get(i);if(o){o.isUnresolvable||(o.isUnresolvable=a.isUnresolvable);continue}r.set(i,a)}}function dde(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function fde(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function bD(e,t){for(let n=e.length-1;n>-1;n--){if(e[n].isSubsetOf(t))return;e[n].isSupersetOf(t)&&e.splice(n,1)}e.push(t)}function PE(e,t){if(e.length<1||t.length<1){for(let r of t)e.push(new Set(r));return e}let n=[];for(let r of t)for(let i of e){let a=(0,AE.addSets)(r,i);bD(n,a)}return n}function AD(e,t){for(let n of t)bD(e,n);return e.length<=RE.MAX_OR_SCOPES}function Z1(e,t){var i,a;let n=t.fieldName,r=e.get(n);return r?((i=r.inheritedData).requiresAuthentication||(i.requiresAuthentication=t.inheritedData.requiresAuthentication),(a=r.originalData).requiresAuthentication||(a.requiresAuthentication=t.originalData.requiresAuthentication),!AD(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>RE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>RE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=PE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=PE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,eV(t)),!0)}function pde(e){let t=new Map;for(let[n,r]of e)t.set(n,eV(r));return t}function eV(e){return{fieldName:e.fieldName,inheritedData:{requiredScopes:[...e.inheritedData.requiredScopes],requiredScopesByOR:[...e.inheritedData.requiredScopes],requiresAuthentication:e.inheritedData.requiresAuthentication},originalData:{requiredScopes:[...e.originalData.requiredScopes],requiresAuthentication:e.originalData.requiresAuthentication}}}function mde(e){return{fieldAuthDataByFieldName:pde(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function Nde(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,mde(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!AD(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>RE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=PE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)Z1(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function Tde(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthDataByFieldName){let a=`${n}.${r}`,o=e.get(a);o?(o.requiresAuthentication=i.inheritedData.requiresAuthentication,o.requiredScopes=i.inheritedData.requiredScopes.map(c=>[...c]),o.requiredScopesByOR=i.inheritedData.requiredScopesByOR.map(c=>[...c])):e.set(a,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.inheritedData.requiresAuthentication,requiredScopes:i.inheritedData.requiredScopes.map(c=>[...c]),requiredScopesByOR:i.inheritedData.requiredScopesByOR.map(c=>[...c])})}}function Ede(e){return e===Kt.Kind.OBJECT_TYPE_DEFINITION||e===Kt.Kind.OBJECT_TYPE_EXTENSION}function hde(e){return tde.COMPOSITE_OUTPUT_NODE_KINDS.has(e)}function yde(e){return e?e.kind===Kt.Kind.OBJECT_TYPE_DEFINITION:!1}function Ide(e){switch(e.kind){case Kt.Kind.ARGUMENT:case Kt.Kind.FIELD_DEFINITION:case Kt.Kind.INPUT_VALUE_DEFINITION:case Kt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var RD=w(Ge=>{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.TAG_DEFINITION_DATA=Ge.SUBSCRIPTION_FILTER_DEFINITION_DATA=Ge.SHAREABLE_DEFINITION_DATA=Ge.SPECIFIED_BY_DEFINITION_DATA=Ge.SEMANTIC_NON_NULL_DATA=Ge.REQUIRES_SCOPES_DEFINITION_DATA=Ge.REQUIRE_FETCH_REASONS_DEFINITION_DATA=Ge.REDIS_SUBSCRIBE_DEFINITION_DATA=Ge.REDIS_PUBLISH_DEFINITION_DATA=Ge.REQUIRES_DEFINITION_DATA=Ge.PROVIDES_DEFINITION_DATA=Ge.LINK_DEFINITION_DATA=Ge.KEY_DEFINITION_DATA=Ge.OVERRIDE_DEFINITION_DATA=Ge.ONE_OF_DEFINITION_DATA=Ge.NATS_SUBSCRIBE_DEFINITION_DATA=Ge.NATS_REQUEST_DEFINITION_DATA=Ge.NATS_PUBLISH_DEFINITION_DATA=Ge.KAFKA_SUBSCRIBE_DEFINITION_DATA=Ge.KAFKA_PUBLISH_DEFINITION_DATA=Ge.INTERFACE_OBJECT_DEFINITION_DATA=Ge.INACCESSIBLE_DEFINITION_DATA=Ge.EXTERNAL_DEFINITION_DATA=Ge.EXTENDS_DEFINITION_DATA=Ge.DEPRECATED_DEFINITION_DATA=Ge.CONNECT_FIELD_RESOLVER_DEFINITION_DATA=Ge.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=Ge.CONFIGURE_DESCRIPTION_DEFINITION_DATA=Ge.COMPOSE_DIRECTIVE_DEFINITION_DATA=Ge.AUTHENTICATED_DEFINITION_DATA=void 0;var Xi=Pr(),Gt=Oe(),x=zn(),en=Mf(),Fn=uT();Ge.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.AUTHENTICATED,node:en.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.COMPOSE_DIRECTIVE,node:en.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])};Ge.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}],[x.DESCRIPTION_OVERRIDE,{name:x.DESCRIPTION_OVERRIDE,typeNode:(0,Xi.stringToNamedTypeNode)(x.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.INPUT_OBJECT_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.SCHEMA_UPPER,x.UNION_UPPER]),name:x.CONFIGURE_DESCRIPTION,node:en.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE,x.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};Ge.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.CONFIGURE_CHILD_DESCRIPTIONS,node:en.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE]),requiredArgumentNames:new Set};Ge.CONNECT_FIELD_RESOLVER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONTEXT,{name:x.CONTEXT,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.CONNECT_FIELD_RESOLVER,node:en.CONNECT_FIELD_RESOLVER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONTEXT])};Ge.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.REASON,{name:x.REASON,typeNode:(0,Xi.stringToNamedTypeNode)(x.STRING_SCALAR),defaultValue:{kind:Gt.Kind.STRING,value:Gt.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER]),name:x.DEPRECATED,node:en.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([x.REASON]),requiredArgumentNames:new Set};Ge.EXTENDS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.EXTENDS,node:en.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.EXTERNAL,node:en.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.INACCESSIBLE,node:en.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.OBJECT_UPPER]),name:x.INTERFACE_OBJECT,node:en.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPIC,{name:x.TOPIC,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_PUBLISH,node:en.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPIC])};Ge.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPICS,{name:x.TOPICS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_SUBSCRIBE,node:en.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPICS])};Ge.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_PUBLISH,node:en.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ge.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_REQUEST,node:en.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ge.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECTS,{name:x.SUBJECTS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}],[x.STREAM_CONFIGURATION,{name:x.STREAM_CONFIGURATION,typeNode:(0,Xi.stringToNamedTypeNode)(x.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_SUBSCRIBE,node:en.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID,x.STREAM_CONFIGURATION]),requiredArgumentNames:new Set([x.SUBJECTS])};Ge.ONE_OF_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.INPUT_OBJECT_UPPER]),name:x.ONE_OF,node:en.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FROM,{name:x.FROM,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.OVERRIDE,node:en.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FROM])};Ge.KEY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}],[x.RESOLVABLE,{name:x.RESOLVABLE,typeNode:(0,Xi.stringToNamedTypeNode)(x.BOOLEAN_SCALAR),defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.KEY,node:en.KEY_DEFINITION,optionalArgumentNames:new Set([x.RESOLVABLE]),requiredArgumentNames:new Set([x.FIELDS])};Ge.LINK_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.AS,{name:x.AS,typeNode:(0,Xi.stringToNamedTypeNode)(x.STRING_SCALAR)}],[x.FOR,{name:x.FOR,typeNode:(0,Xi.stringToNamedTypeNode)(x.LINK_PURPOSE)}],[x.IMPORT,{name:x.IMPORT,typeNode:{kind:Gt.Kind.LIST_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.LINK,node:en.LINK_DEFINITION,optionalArgumentNames:new Set([x.AS,x.FOR,x.IMPORT]),requiredArgumentNames:new Set([x.URL_LOWER])};Ge.PROVIDES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.PROVIDES,node:en.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ge.REQUIRES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.REQUIRES,node:en.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ge.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNEL,{name:x.CHANNEL,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_PUBLISH,node:en.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNEL])};Ge.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNELS,{name:x.CHANNELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_SUBSCRIBE,node:en.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNELS])};Ge.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.REQUIRE_FETCH_REASONS,node:en.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SCOPES,{name:x.SCOPES,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.REQUIRES_SCOPES,node:en.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.SCOPES])};Ge.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByName:new Map([[x.LEVELS,{name:x.LEVELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.INT_SCALAR)}}},defaultValue:{kind:Gt.Kind.LIST,values:[{kind:Gt.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SEMANTIC_NON_NULL,node:en.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([x.LEVELS]),requiredArgumentNames:new Set};Ge.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.SCALAR_UPPER]),name:x.SPECIFIED_BY,node:en.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.URL_LOWER])};Ge.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.SHAREABLE,node:en.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ge.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONDITION,{name:x.CONDITION,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,Xi.stringToNamedTypeNode)(x.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SUBSCRIPTION_FILTER,node:en.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONDITION])};Ge.TAG_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.TAG,node:en.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])}});var fp=w(Oa=>{"use strict";m();T();N();Object.defineProperty(Oa,"__esModule",{value:!0});Oa.newFieldSetData=gde;Oa.extractFieldSetValue=_de;Oa.getNormalizedFieldSet=vde;Oa.getInitialFieldCoordsPath=Ode;Oa.validateKeyFieldSets=Sde;Oa.getConditionalFieldSetDirectiveName=Dde;Oa.isNodeQuery=bde;Oa.validateArgumentTemplateReferences=Ade;Oa.initializeDirectiveDefinitionDatas=Rde;var Gn=Oe(),tV=Pr(),vr=qi(),nV=_u(),PD=gu(),tn=RD(),It=zn(),Cs=Fr();function gde(){return{provides:new Map,requires:new Map}}function _de(e,t,n){if(!n||n.length>1)return;let r=n[0].arguments;if(!r||r.length!==1)return;let i=r[0];i.name.value!==It.FIELDS||i.value.kind!==Gn.Kind.STRING||t.set(e,i.value.value)}function vde(e){return(0,Gn.print)((0,tV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function Ode(e,t){return e?[t]:[]}function Sde(e,t,n){let r=e.entityInterfaceDataByTypeName.get(t.name),i=t.name,a=[],o=[],c=r?void 0:e.internalGraph.addEntityDataNode(t.name),l=e.internalGraph.addOrUpdateNode(t.name),d=0;for(let[p,{documentNode:E,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let A=[],U=[t],j=[],$=[],re=new Set,ee=-1,me=!0,ue="";if((0,Gn.visit)(E,{Argument:{enter(Ae){return A.push((0,vr.unexpectedArgumentErrorMessage)(v,`${U[ee].name}.${ue}`,Ae.name.value)),Gn.BREAK}},Field:{enter(Ae){let xe=U[ee],Ze=xe.name;if(me){let wn=`${Ze}.${ue}`,$t=xe.fieldDataByName.get(ue);if(!$t)return A.push((0,vr.undefinedFieldInFieldSetErrorMessage)(v,wn,ue)),Gn.BREAK;let Tn=(0,PD.getTypeNodeNamedTypeName)($t.node.type),Ur=e.parentDefinitionDataByTypeName.get(Tn),lr=Ur?Ur.kind:Gn.Kind.SCALAR_TYPE_DEFINITION;return A.push((0,vr.invalidSelectionSetErrorMessage)(v,[wn],Tn,(0,Cs.kindToNodeType)(lr))),Gn.BREAK}let Z=Ae.name.value,_e=`${Ze}.${Z}`;if(ue=Z,Z===It.TYPENAME)return;let vt=xe.fieldDataByName.get(Z);if(!vt)return A.push((0,vr.undefinedFieldInFieldSetErrorMessage)(v,Ze,Z)),Gn.BREAK;if(vt.argumentDataByName.size)return A.push((0,vr.argumentsInKeyFieldSetErrorMessage)(v,_e)),Gn.BREAK;if(j[ee].has(Z))return A.push((0,vr.duplicateFieldInFieldSetErrorMessage)(v,_e)),Gn.BREAK;(0,Cs.getValueOrDefault)((0,Cs.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,_e,()=>new Map),i,()=>new Set).add(p),$.push(Z),vt.isShareableBySubgraphName.set(e.subgraphName,!0),j[ee].add(Z),(0,Cs.getValueOrDefault)(e.keyFieldNamesByParentTypeName,Ze,()=>new Set).add(Z);let rn=(0,PD.getTypeNodeNamedTypeName)(vt.node.type);if(nV.BASE_SCALARS.has(rn)){re.add($.join(It.LITERAL_PERIOD)),$.pop();return}let an=e.parentDefinitionDataByTypeName.get(rn);if(!an)return A.push((0,vr.unknownTypeInFieldSetErrorMessage)(v,_e,rn)),Gn.BREAK;if(an.kind===Gn.Kind.OBJECT_TYPE_DEFINITION){me=!0,U.push(an);return}if((0,tV.isKindAbstract)(an.kind))return A.push((0,vr.abstractTypeInKeyFieldSetErrorMessage)(v,_e,rn,(0,Cs.kindToNodeType)(an.kind))),Gn.BREAK;re.add($.join(It.LITERAL_PERIOD)),$.pop()}},InlineFragment:{enter(){return A.push(vr.inlineFragmentInFieldSetErrorMessage),Gn.BREAK}},SelectionSet:{enter(){if(!me){let Ae=U[ee],Ze=`${Ae.name}.${ue}`;if(ue===It.TYPENAME)return A.push((0,vr.invalidSelectionSetDefinitionErrorMessage)(v,[Ze],It.STRING_SCALAR,(0,Cs.kindToNodeType)(Gn.Kind.SCALAR_TYPE_DEFINITION))),Gn.BREAK;let Z=Ae.fieldDataByName.get(ue);if(!Z)return A.push((0,vr.undefinedFieldInFieldSetErrorMessage)(v,Ze,ue)),Gn.BREAK;let _e=(0,PD.getTypeNodeNamedTypeName)(Z.node.type),vt=e.parentDefinitionDataByTypeName.get(_e),rn=vt?vt.kind:Gn.Kind.SCALAR_TYPE_DEFINITION;return A.push((0,vr.invalidSelectionSetDefinitionErrorMessage)(v,[Ze],_e,(0,Cs.kindToNodeType)(rn))),Gn.BREAK}if(ee+=1,me=!1,ee<0||ee>=U.length)return A.push((0,vr.unparsableFieldSetSelectionErrorMessage)(v,ue)),Gn.BREAK;j.push(new Set)},leave(){if(me){let xe=U[ee].name,Ze=U[ee+1],Z=`${xe}.${ue}`;A.push((0,vr.invalidSelectionSetErrorMessage)(v,[Z],Ze.name,(0,Cs.kindToNodeType)(Ze.kind))),me=!1}ee-=1,U.pop(),j.pop()}}}),A.length>0){e.errors.push((0,vr.invalidDirectiveError)(It.KEY,i,(0,Cs.numberToOrdinal)(d),A));continue}a.push(M({fieldName:"",selectionSet:p},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(p),!I&&(c==null||c.addTargetSubgraphByFieldSet(p,e.subgraphName),o.push(re))}if(a.length>0)return a}function Dde(e){return e?It.PROVIDES:It.REQUIRES}function bde(e,t){return e===It.QUERY||t===Gn.OperationTypeNode.QUERY}function Ade(e,t,n){let r=e.matchAll(nV.EDFS_ARGS_REGEXP),i=new Set,a=new Set;for(let o of r){if(o.length<2){a.add(o[0]);continue}t.has(o[1])||i.add(o[1])}for(let o of i)n.push((0,vr.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,vr.invalidEventSubjectsArgumentErrorMessage)(o))}function Rde(){return new Map([[It.AUTHENTICATED,tn.AUTHENTICATED_DEFINITION_DATA],[It.COMPOSE_DIRECTIVE,tn.COMPOSE_DIRECTIVE_DEFINITION_DATA],[It.CONFIGURE_DESCRIPTION,tn.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[It.CONFIGURE_CHILD_DESCRIPTIONS,tn.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[It.CONNECT_FIELD_RESOLVER,tn.CONNECT_FIELD_RESOLVER_DEFINITION_DATA],[It.DEPRECATED,tn.DEPRECATED_DEFINITION_DATA],[It.EDFS_KAFKA_PUBLISH,tn.KAFKA_PUBLISH_DEFINITION_DATA],[It.EDFS_KAFKA_SUBSCRIBE,tn.KAFKA_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_NATS_PUBLISH,tn.NATS_PUBLISH_DEFINITION_DATA],[It.EDFS_NATS_REQUEST,tn.NATS_REQUEST_DEFINITION_DATA],[It.EDFS_NATS_SUBSCRIBE,tn.NATS_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_REDIS_PUBLISH,tn.REDIS_PUBLISH_DEFINITION_DATA],[It.EDFS_REDIS_SUBSCRIBE,tn.REDIS_SUBSCRIBE_DEFINITION_DATA],[It.EXTENDS,tn.EXTENDS_DEFINITION_DATA],[It.EXTERNAL,tn.EXTERNAL_DEFINITION_DATA],[It.INACCESSIBLE,tn.INACCESSIBLE_DEFINITION_DATA],[It.INTERFACE_OBJECT,tn.INTERFACE_OBJECT_DEFINITION_DATA],[It.KEY,tn.KEY_DEFINITION_DATA],[It.LINK,tn.LINK_DEFINITION_DATA],[It.ONE_OF,tn.ONE_OF_DEFINITION_DATA],[It.OVERRIDE,tn.OVERRIDE_DEFINITION_DATA],[It.PROVIDES,tn.PROVIDES_DEFINITION_DATA],[It.REQUIRE_FETCH_REASONS,tn.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[It.REQUIRES,tn.REQUIRES_DEFINITION_DATA],[It.REQUIRES_SCOPES,tn.REQUIRES_SCOPES_DEFINITION_DATA],[It.SEMANTIC_NON_NULL,tn.SEMANTIC_NON_NULL_DATA],[It.SHAREABLE,tn.SHAREABLE_DEFINITION_DATA],[It.SPECIFIED_BY,tn.SPECIFIED_BY_DEFINITION_DATA],[It.SUBSCRIPTION_FILTER,tn.SUBSCRIPTION_FILTER_DEFINITION_DATA],[It.TAG,tn.TAG_DEFINITION_DATA]])}});var wD=w(FD=>{"use strict";m();T();N();Object.defineProperty(FD,"__esModule",{value:!0});FD.recordSubgraphName=Pde;function Pde(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var CD=w(FE=>{"use strict";m();T();N();Object.defineProperty(FE,"__esModule",{value:!0});FE.Warning=void 0;var LD=class extends Error{constructor(n){super(n.message);g(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};FE.Warning=LD});var pp=w(hi=>{"use strict";m();T();N();Object.defineProperty(hi,"__esModule",{value:!0});hi.invalidOverrideTargetSubgraphNameWarning=Fde;hi.externalInterfaceFieldsWarning=wde;hi.nonExternalConditionalFieldWarning=Lde;hi.unimplementedInterfaceOutputTypeWarning=Cde;hi.invalidExternalFieldWarning=Bde;hi.requiresDefinedOnNonEntityFieldWarning=Ude;hi.consumerInactiveThresholdInvalidValueWarning=kde;hi.externalEntityExtensionKeyFieldWarning=Mde;hi.fieldAlreadyProvidedWarning=xde;hi.singleSubgraphInputFieldOneOfWarning=qde;hi.singleFederatedInputFieldOneOfWarning=Vde;var Sa=CD(),BD=zn();function Fde(e,t,n,r){return new Sa.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(BD.QUOTATION_JOIN)+`". The required "from" argument of type "String!" should be provided with an existing subgraph name. However, a subgraph by the name of "${e}" does not exist. -If this subgraph has been recently deleted, remember to clean up unused "@override" directives that reference this subgraph.`,subgraph:{name:r}})}function PE(e){return`The subgraph "${e}" is currently a "version one" subgraph, but if it were updated to "version two" in its current state, composition would be unsuccessful due to the following warning that would instead propagate as an error: -`}function Pde(e,t,n){return new Sa.Warning({message:PE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": - "`+n.join(CD.QUOTATION_JOIN)+`" -Interface fields should not be declared "@external". This is because Interface fields do not resolve directly, but the "@external" directive relates to whether a Field instance can be resolved by the subgraph in which it is defined.`,subgraph:{name:e}})}function Fde(e,t,n,r,i){return new Sa.Warning({message:PE(t)+`The Field "${e}" in subgraph "${t}" defines a "@${i}" directive with the following field set: +If this subgraph has been recently deleted, remember to clean up unused "@override" directives that reference this subgraph.`,subgraph:{name:r}})}function wE(e){return`The subgraph "${e}" is currently a "version one" subgraph, but if it were updated to "version two" in its current state, composition would be unsuccessful due to the following warning that would instead propagate as an error: +`}function wde(e,t,n){return new Sa.Warning({message:wE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": + "`+n.join(BD.QUOTATION_JOIN)+`" +Interface fields should not be declared "@external". This is because Interface fields do not resolve directly, but the "@external" directive relates to whether a Field instance can be resolved by the subgraph in which it is defined.`,subgraph:{name:e}})}function Lde(e,t,n,r,i){return new Sa.Warning({message:wE(t)+`The Field "${e}" in subgraph "${t}" defines a "@${i}" directive with the following field set: "${r}". However, neither the field "${n}" nor any of its field set ancestors are declared @external. -Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`,subgraph:{name:t}})}function wde(e,t){return new Sa.Warning({message:`Subgraph "${e}": The Interface "${t}" is used as an output type without at least one Object type implementation defined in the schema.`,subgraph:{name:e}})}function Lde(e,t){return new Sa.Warning({message:PE(t)+` The Object Field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`,subgraph:{name:t}})}function Cde(e,t){return new Sa.Warning({message:` The Object Field "${e}" defines a "@requires" directive, but the Object is not an entity. Consequently, the "@requires" FieldSet cannot be satisfied because there is no entity resolver with which to provide the required Fields.`,subgraph:{name:t}})}function Bde(e,t=""){return new Sa.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` -${t}`:"",subgraph:{name:e}})}function Ude(e,t,n,r){return new Sa.Warning({message:`The entity extension "${e}" defined in subgraph "${r}" defines a "@key" directive with the field set "${t}". +Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`,subgraph:{name:t}})}function Cde(e,t){return new Sa.Warning({message:`Subgraph "${e}": The Interface "${t}" is used as an output type without at least one Object type implementation defined in the schema.`,subgraph:{name:e}})}function Bde(e,t){return new Sa.Warning({message:wE(t)+` The Object Field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`,subgraph:{name:t}})}function Ude(e,t){return new Sa.Warning({message:` The Object Field "${e}" defines a "@requires" directive, but the Object is not an entity. Consequently, the "@requires" FieldSet cannot be satisfied because there is no entity resolver with which to provide the required Fields.`,subgraph:{name:t}})}function kde(e,t=""){return new Sa.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` +${t}`:"",subgraph:{name:e}})}function Mde(e,t,n,r){return new Sa.Warning({message:`The entity extension "${e}" defined in subgraph "${r}" defines a "@key" directive with the field set "${t}". The following field coordinates that form part of that field set are declared "@external": - "`+n.join(CD.QUOTATION_JOIN)+`" -Please note fields that form part of entity extension "@key" field sets are always provided in that subgraph. Any such "@external" declarations are unnecessary relics of Federation Version 1 syntax and are effectively ignored.`,subgraph:{name:r}})}function kde(e,t,n,r){return new Sa.Warning({message:PE(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. + "`+n.join(BD.QUOTATION_JOIN)+`" +Please note fields that form part of entity extension "@key" field sets are always provided in that subgraph. Any such "@external" declarations are unnecessary relics of Federation Version 1 syntax and are effectively ignored.`,subgraph:{name:r}})}function xde(e,t,n,r){return new Sa.Warning({message:wE(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. However, "${e}" forms part of the "@${t}" field set defined "${n}". -Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`,subgraph:{name:r}})}function Mde({fieldName:e,subgraphName:t,typeName:n}){return new Sa.Warning({message:`The directive "@oneOf" is defined on Input Object "${n}", but only one optional Input field, "${e}", is defined. Consider removing "@oneOf" and changing "${e}" to a required type instead.`,subgraph:{name:t}})}function xde({fieldName:e,typeName:t}){return new Sa.Warning({message:`The directive "@oneOf" is defined on Input Object "${t}", but only one optional Input field, "${e}", is propagated to the federated graph. Consider removing "@oneOf", changing "${e}" to a required type, and removing any other remaining optional Input fields instead.`,subgraph:{name:""}})}});var kD=w(wE=>{"use strict";m();T();N();Object.defineProperty(wE,"__esModule",{value:!0});wE.upsertDirectiveSchemaAndEntityDefinitions=jde;wE.upsertParentsAndChildren=Kde;var $n=Oe(),Ru=qi(),UD=gu(),FE=lp(),od=Pr(),BD=dp(),qde=rd(),sd=Ul(),pp=Iu(),Vde=fp(),Zi=zn(),hr=Fr();function jde(e,t){(0,$n.visit)(t,{Directive:{enter(n){let r=n.name.value;return e.referencedDirectiveNames.add(r),qde.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),UD.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r)&&(e.isSubgraphVersionTwo=!0),!1}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitionByName.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,od.isObjectLikeNodeEntity)(n))return;let i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,FE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,hr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},InterfaceTypeExtension:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,od.isObjectLikeNodeEntity)(n))return;let i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,FE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,hr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},ObjectTypeDefinition:{enter(n){if(!(0,od.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,od.isNodeInterfaceObject)(n)&&(e.entityInterfaceDataByTypeName.set(r,{concreteTypeNames:new Set,fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,resolvable:!1,typeName:r}),e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}));let i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,FE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,od.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,FE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},OperationTypeDefinition:{enter(n){let r=n.operation,i=e.schemaData.operationTypes.get(r),a=(0,pp.getTypeNodeNamedTypeName)(n.type);if(i)return e.errors.push((0,Ru.duplicateOperationTypeDefinitionError)(r,a,(0,pp.getTypeNodeNamedTypeName)(i.type))),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Ru.invalidOperationTypeDefinitionError)(o,a,r)),!1):(e.operationTypeNodeByTypeName.set(a,r),e.schemaData.operationTypes.set(r,n),!1)}},SchemaDefinition:{enter(n){e.schemaData.description=n.description,e.extractDirectives(n,e.schemaData.directivesByName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByName)}}})}function Kde(e,t){let n=!1,r;(0,$n.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,hr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Zi.PARENT_DEFINITION_DATA);if(o.kind!==$n.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Ru.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,hr.kindToNodeType)(o.kind),a,(0,hr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByName.has(a)){e.errors.push((0,Ru.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:$n.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,pp.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,sd.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,od.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=$n.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&Zi.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,pp.getTypeNodeNamedTypeName)(i.type);(0,hr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),UD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,hr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Zi.PARENT_DEFINITION_DATA);if(!(0,sd.isParentDataCompositeOutputType)(c)){e.errors.push((0,Ru.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,hr.kindToNodeType)(c.kind),a,(0,hr.kindToNodeType)(i.kind)));return}if(c.fieldDataByName.has(a)){e.errors.push((0,Ru.duplicateFieldDefinitionError)((0,hr.kindToNodeType)(c.kind),c.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),p=new Set;e.handleFieldInheritableDirectives({directivesByName:d,fieldName:a,inheritedDirectiveNames:p,parentData:c});let E=e.addFieldDataByNode(c.fieldDataByName,i,l,d,p);n&&e.extractEventDirectivesToConfiguration(i,l);let I=E.directivesByName.get(Zi.PROVIDES),v=E.directivesByName.get(Zi.REQUIRES);if(!v&&!I)return;let A=e.entityDataByTypeName.get(e.originalParentTypeName),U=(0,hr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,BD.newFieldSetData);I&&(0,BD.extractFieldSetValue)(a,U.provides,I),v&&(A||e.warnings.push((0,Vde.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,BD.extractFieldSetValue)(a,U.requires,v))},leave(){e.lastChildNodeKind=$n.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=$n.Kind.NULL,e.originalParentTypeName=""}},InputObjectTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==$n.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==$n.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,pp.getTypeNodeNamedTypeName)(i.type);UD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,hr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Zi.PARENT_DEFINITION_DATA);if(c.kind!==$n.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Ru.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,hr.kindToNodeType)(c.kind),a,(0,hr.kindToNodeType)(i.kind))),!1;if(c.inputValueDataByName.has(a)){e.errors.push((0,Ru.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:c.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===$n.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=$n.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===Zi.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,sd.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,sd.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===Zi.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,sd.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,sd.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i,!0)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===Zi.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===Zi.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},UnionTypeDefinition:{enter(i){if(i.name.value===Zi.ENTITY_UNION)return!1;e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===Zi.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var jD=w(Xa=>{"use strict";m();T();N();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.EntityDataNode=Xa.RootNode=Xa.GraphNode=Xa.Edge=void 0;var LE=Fr(),MD=class{constructor(t,n,r,i=!1){_(this,"edgeName");_(this,"id");_(this,"isAbstractEdge");_(this,"isInaccessible",!1);_(this,"node");_(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}};Xa.Edge=MD;var xD=class{constructor(t,n,r){_(this,"fieldDataByName",new Map);_(this,"headToTailEdges",new Map);_(this,"entityEdges",new Array);_(this,"nodeName");_(this,"hasEntitySiblings",!1);_(this,"isAbstract");_(this,"isInaccessible",!1);_(this,"isLeaf",!1);_(this,"isRootNode",!1);_(this,"satisfiedFieldSets",new Set);_(this,"subgraphName");_(this,"typeName");this.isAbstract=!!(r!=null&&r.isAbstract),this.isLeaf=!!(r!=null&&r.isLeaf),this.nodeName=`${t}.${n}`,this.subgraphName=t,this.typeName=n}handleInaccessibleEdges(){if(this.isAbstract)return;let t=(0,LE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByName);for(let n of t){let r=this.headToTailEdges.get(n);r&&(r.isInaccessible=!0)}}getAllAccessibleEntityNodeNames(){let t=new Set([this.nodeName]);return this.getAccessibleEntityNodeNames(this,t),t.delete(this.nodeName),t}getAccessibleEntityNodeNames(t,n){for(let r of t.entityEdges)(0,LE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};Xa.GraphNode=xD;var qD=class{constructor(t){_(this,"fieldDataByName",new Map);_(this,"headToSharedTailEdges",new Map);_(this,"isAbstract",!1);_(this,"isRootNode",!0);_(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToSharedTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};Xa.RootNode=qD;var VD=class{constructor(t){_(this,"fieldSetsByTargetSubgraphName",new Map);_(this,"targetSubgraphNamesByFieldSet",new Map);_(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,LE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,LE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};Xa.EntityDataNode=VD});var KD=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ROOT_TYPE_NAMES=Qn.QUOTATION_JOIN=Qn.NOT_APPLICABLE=Qn.LITERAL_SPACE=Qn.LITERAL_PERIOD=Qn.SUBSCRIPTION=Qn.QUERY=Qn.MUTATION=void 0;Qn.MUTATION="Mutation";Qn.QUERY="Query";Qn.SUBSCRIPTION="Subscription";Qn.LITERAL_PERIOD=".";Qn.LITERAL_SPACE=" ";Qn.NOT_APPLICABLE="N/A";Qn.QUOTATION_JOIN='", "';Qn.ROOT_TYPE_NAMES=new Set([Qn.MUTATION,Qn.QUERY,Qn.SUBSCRIPTION])});var YD=w(Da=>{"use strict";m();T();N();Object.defineProperty(Da,"__esModule",{value:!0});Da.newRootFieldData=Gde;Da.generateResolvabilityErrorReasons=QD;Da.generateSharedResolvabilityErrorReasons=tV;Da.generateSelectionSetSegments=CE;Da.renderSelectionSet=BE;Da.generateRootResolvabilityErrors=Qde;Da.generateEntityResolvabilityErrors=Yde;Da.generateSharedEntityResolvabilityErrors=Jde;Da.getMultipliedRelativeOriginPaths=Hde;var GD=qi(),$D=Fr(),Za=KD();function Gde(e,t,n){return{coords:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(Za.QUOTATION_JOIN)}".`,subgraphNames:n}}function $de(e,t){return e.isLeaf?e.name+` <-- +Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`,subgraph:{name:r}})}function qde({fieldName:e,subgraphName:t,typeName:n}){return new Sa.Warning({message:`The directive "@oneOf" is defined on Input Object "${n}", but only one optional Input field, "${e}", is defined. Consider removing "@oneOf" and changing "${e}" to a required type instead.`,subgraph:{name:t}})}function Vde({fieldName:e,typeName:t}){return new Sa.Warning({message:`The directive "@oneOf" is defined on Input Object "${t}", but only one optional Input field, "${e}", is propagated to the federated graph. Consider removing "@oneOf", changing "${e}" to a required type, and removing any other remaining optional Input fields instead.`,subgraph:{name:""}})}});var MD=w(CE=>{"use strict";m();T();N();Object.defineProperty(CE,"__esModule",{value:!0});CE.upsertDirectiveSchemaAndEntityDefinitions=Gde;CE.upsertParentsAndChildren=$de;var $n=Oe(),Pu=qi(),kD=_u(),LE=dp(),ud=Pr(),UD=fp(),jde=id(),od=kl(),mp=gu(),Kde=pp(),Zi=zn(),hr=Fr();function Gde(e,t){(0,$n.visit)(t,{Directive:{enter(n){let r=n.name.value;return e.referencedDirectiveNames.add(r),jde.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),kD.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r)&&(e.isSubgraphVersionTwo=!0),!1}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitionByName.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,ud.isObjectLikeNodeEntity)(n))return;let i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,LE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,hr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},InterfaceTypeExtension:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,ud.isObjectLikeNodeEntity)(n))return;let i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,LE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,hr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},ObjectTypeDefinition:{enter(n){if(!(0,ud.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,ud.isNodeInterfaceObject)(n)&&(e.entityInterfaceDataByTypeName.set(r,{concreteTypeNames:new Set,fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,resolvable:!1,typeName:r}),e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}));let i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,LE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,ud.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,hr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,LE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},OperationTypeDefinition:{enter(n){let r=n.operation,i=e.schemaData.operationTypes.get(r),a=(0,mp.getTypeNodeNamedTypeName)(n.type);if(i)return e.errors.push((0,Pu.duplicateOperationTypeDefinitionError)(r,a,(0,mp.getTypeNodeNamedTypeName)(i.type))),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Pu.invalidOperationTypeDefinitionError)(o,a,r)),!1):(e.operationTypeNodeByTypeName.set(a,r),e.schemaData.operationTypes.set(r,n),!1)}},SchemaDefinition:{enter(n){e.schemaData.description=n.description,e.extractDirectives(n,e.schemaData.directivesByName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByName)}}})}function $de(e,t){let n=!1,r;(0,$n.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,hr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Zi.PARENT_DEFINITION_DATA);if(o.kind!==$n.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Pu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,hr.kindToNodeType)(o.kind),a,(0,hr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByName.has(a)){e.errors.push((0,Pu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:$n.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,mp.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,od.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,ud.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=$n.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&Zi.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,mp.getTypeNodeNamedTypeName)(i.type);(0,hr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),kD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,hr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Zi.PARENT_DEFINITION_DATA);if(!(0,od.isParentDataCompositeOutputType)(c)){e.errors.push((0,Pu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,hr.kindToNodeType)(c.kind),a,(0,hr.kindToNodeType)(i.kind)));return}if(c.fieldDataByName.has(a)){e.errors.push((0,Pu.duplicateFieldDefinitionError)((0,hr.kindToNodeType)(c.kind),c.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),p=new Set;e.handleFieldInheritableDirectives({directivesByName:d,fieldName:a,inheritedDirectiveNames:p,parentData:c});let E=e.addFieldDataByNode(c.fieldDataByName,i,l,d,p);n&&e.extractEventDirectivesToConfiguration(i,l);let I=E.directivesByName.get(Zi.PROVIDES),v=E.directivesByName.get(Zi.REQUIRES);if(!v&&!I)return;let A=e.entityDataByTypeName.get(e.originalParentTypeName),U=(0,hr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,UD.newFieldSetData);I&&(0,UD.extractFieldSetValue)(a,U.provides,I),v&&(A||e.warnings.push((0,Kde.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,UD.extractFieldSetValue)(a,U.requires,v))},leave(){e.lastChildNodeKind=$n.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=$n.Kind.NULL,e.originalParentTypeName=""}},InputObjectTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==$n.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==$n.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,mp.getTypeNodeNamedTypeName)(i.type);kD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,hr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Zi.PARENT_DEFINITION_DATA);if(c.kind!==$n.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Pu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,hr.kindToNodeType)(c.kind),a,(0,hr.kindToNodeType)(i.kind))),!1;if(c.inputValueDataByName.has(a)){e.errors.push((0,Pu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:c.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===$n.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=$n.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===Zi.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,od.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,od.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===Zi.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,od.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,od.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i,!0)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===Zi.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===Zi.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=$n.Kind.NULL}},UnionTypeDefinition:{enter(i){if(i.name.value===Zi.ENTITY_UNION)return!1;e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===Zi.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var KD=w(Xa=>{"use strict";m();T();N();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.EntityDataNode=Xa.RootNode=Xa.GraphNode=Xa.Edge=void 0;var BE=Fr(),xD=class{constructor(t,n,r,i=!1){g(this,"edgeName");g(this,"id");g(this,"isAbstractEdge");g(this,"isInaccessible",!1);g(this,"node");g(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}};Xa.Edge=xD;var qD=class{constructor(t,n,r){g(this,"fieldDataByName",new Map);g(this,"headToTailEdges",new Map);g(this,"entityEdges",new Array);g(this,"nodeName");g(this,"hasEntitySiblings",!1);g(this,"isAbstract");g(this,"isInaccessible",!1);g(this,"isLeaf",!1);g(this,"isRootNode",!1);g(this,"satisfiedFieldSets",new Set);g(this,"subgraphName");g(this,"typeName");this.isAbstract=!!(r!=null&&r.isAbstract),this.isLeaf=!!(r!=null&&r.isLeaf),this.nodeName=`${t}.${n}`,this.subgraphName=t,this.typeName=n}handleInaccessibleEdges(){if(this.isAbstract)return;let t=(0,BE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByName);for(let n of t){let r=this.headToTailEdges.get(n);r&&(r.isInaccessible=!0)}}getAllAccessibleEntityNodeNames(){let t=new Set([this.nodeName]);return this.getAccessibleEntityNodeNames(this,t),t.delete(this.nodeName),t}getAccessibleEntityNodeNames(t,n){for(let r of t.entityEdges)(0,BE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};Xa.GraphNode=qD;var VD=class{constructor(t){g(this,"fieldDataByName",new Map);g(this,"headToSharedTailEdges",new Map);g(this,"isAbstract",!1);g(this,"isRootNode",!0);g(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToSharedTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};Xa.RootNode=VD;var jD=class{constructor(t){g(this,"fieldSetsByTargetSubgraphName",new Map);g(this,"targetSubgraphNamesByFieldSet",new Map);g(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,BE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,BE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};Xa.EntityDataNode=jD});var GD=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ROOT_TYPE_NAMES=Qn.QUOTATION_JOIN=Qn.NOT_APPLICABLE=Qn.LITERAL_SPACE=Qn.LITERAL_PERIOD=Qn.SUBSCRIPTION=Qn.QUERY=Qn.MUTATION=void 0;Qn.MUTATION="Mutation";Qn.QUERY="Query";Qn.SUBSCRIPTION="Subscription";Qn.LITERAL_PERIOD=".";Qn.LITERAL_SPACE=" ";Qn.NOT_APPLICABLE="N/A";Qn.QUOTATION_JOIN='", "';Qn.ROOT_TYPE_NAMES=new Set([Qn.MUTATION,Qn.QUERY,Qn.SUBSCRIPTION])});var JD=w(Da=>{"use strict";m();T();N();Object.defineProperty(Da,"__esModule",{value:!0});Da.newRootFieldData=Qde;Da.generateResolvabilityErrorReasons=YD;Da.generateSharedResolvabilityErrorReasons=rV;Da.generateSelectionSetSegments=UE;Da.renderSelectionSet=kE;Da.generateRootResolvabilityErrors=Jde;Da.generateEntityResolvabilityErrors=Hde;Da.generateSharedEntityResolvabilityErrors=zde;Da.getMultipliedRelativeOriginPaths=Wde;var $D=qi(),QD=Fr(),Za=GD();function Qde(e,t,n){return{coords:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(Za.QUOTATION_JOIN)}".`,subgraphNames:n}}function Yde(e,t){return e.isLeaf?e.name+` <-- `:e.name+` { <-- `+Za.LITERAL_SPACE.repeat(t+3)+`... `+Za.LITERAL_SPACE.repeat(t+2)+`} -`}function QD({entityAncestorData:e,rootFieldData:t,unresolvableFieldData:n}){let{fieldName:r,typeName:i,subgraphNames:a}=n,o=[t.message,`The field "${i}.${r}" is defined in the following subgraph`+(a.size>1?"s":"")+`: "${[...a].join(Za.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let p of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${p}" to access subgraph "${l}".`)}c||o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`),o.push(`The type "${i}" is not a descendant of any other entity ancestors that can provide a shared route to access "${r}".`)}else t.subgraphNames.size>1&&o.push(`None of the subgraphs that shares the same root type field "${t.coords}" can provide a route to access "${r}".`),o.push(`The type "${i}" is not a descendant of an entity ancestor that can provide a shared route to access "${r}".`);return i!==(e==null?void 0:e.typeName)&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function tV({entityAncestors:e,rootFieldData:t,unresolvableFieldData:n}){let{fieldName:r,typeName:i,subgraphNames:a}=n,o=[t.message,`The field "${i}.${r}" is defined in the following subgraph`+(a.size>1?"s":"")+`: "${[...a].join(Za.QUOTATION_JOIN)}".`],c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let p=e.subgraphNames.filter(I=>I!==l),E=p.length>1;c=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${E?"s":""} "${p.join(Za.QUOTATION_JOIN)}" do${E?"":"es"} not satisfy the key field set "${I}" to access subgraph "${l}".`)}if(!c){let l=e.subgraphNames.length>1;o.push(`The entity ancestor "${e.typeName}" in subgraph${l?"s":""} "${e.subgraphNames.join(Za.QUOTATION_JOIN)}" ha${l?"ve":"s"} no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`)}return o.push(`The type "${i}" is not a descendant of any other entity ancestors that can provide a shared route to access "${r}".`),i!==e.typeName&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function CE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i1?"s":"")+`: "${[...a].join(Za.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let p of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${p}" to access subgraph "${l}".`)}c||o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`),o.push(`The type "${i}" is not a descendant of any other entity ancestors that can provide a shared route to access "${r}".`)}else t.subgraphNames.size>1&&o.push(`None of the subgraphs that shares the same root type field "${t.coords}" can provide a route to access "${r}".`),o.push(`The type "${i}" is not a descendant of an entity ancestor that can provide a shared route to access "${r}".`);return i!==(e==null?void 0:e.typeName)&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function rV({entityAncestors:e,rootFieldData:t,unresolvableFieldData:n}){let{fieldName:r,typeName:i,subgraphNames:a}=n,o=[t.message,`The field "${i}.${r}" is defined in the following subgraph`+(a.size>1?"s":"")+`: "${[...a].join(Za.QUOTATION_JOIN)}".`],c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let p=e.subgraphNames.filter(I=>I!==l),E=p.length>1;c=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${E?"s":""} "${p.join(Za.QUOTATION_JOIN)}" do${E?"":"es"} not satisfy the key field set "${I}" to access subgraph "${l}".`)}if(!c){let l=e.subgraphNames.length>1;o.push(`The entity ancestor "${e.typeName}" in subgraph${l?"s":""} "${e.subgraphNames.join(Za.QUOTATION_JOIN)}" ha${l?"ve":"s"} no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`)}return o.push(`The type "${i}" is not a descendant of any other entity ancestors that can provide a shared route to access "${r}".`),i!==e.typeName&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function UE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(UE,"__esModule",{value:!0});UE.NodeResolutionData=void 0;var zde=qi(),Fc,HD=class HD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){Yu(this,Fc,!1);_(this,"fieldDataByName");_(this,"resolvedDescendantNames");_(this,"resolvedFieldNames");_(this,"typeName");Ky(this,Fc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData(t){for(let n of t.resolvedFieldNames)this.addResolvedFieldName(n);for(let n of t.resolvedDescendantNames)this.resolvedDescendantNames.add(n)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,zde.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){return new HD({fieldDataByName:this.fieldDataByName,isResolved:jy(this,Fc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(jy(this,Fc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return Ky(this,Fc,!0),!0}};Fc=new WeakMap;var JD=HD;UE.NodeResolutionData=JD});var rV=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.EntityWalker=void 0;var Wde=kE(),es=Fr(),zD=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,subgraphNameByUnresolvablePath:o,visitedEntities:c}){_(this,"encounteredEntityNodeNames");_(this,"index");_(this,"resDataByNodeName");_(this,"resDataByRelativeOriginPath");_(this,"selectionPathByEntityNodeName",new Map);_(this,"subgraphNameByUnresolvablePath");_(this,"visitedEntities");_(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.visitedEntities=c,this.subgraphNameByUnresolvablePath=o}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,es.getValueOrDefault)(this.resDataByNodeName,n,()=>new Wde.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,`${c}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!1}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,es.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,es.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):(this.removeUnresolvablePaths({selectionPath:`${n}.${t.edgeName}`,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{visited:c,areDescendantsResolved:l,isRevisitedNode:d}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:r,nodeName:t.nodeName,selectionPath:n,visited:c})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,nodeName:i,selectionPath:a,visited:o}){if(!o)return;let c=(0,es.getValueOrDefault)(this.resDataByNodeName,i,()=>n.copy());if(n.addResolvedFieldName(r),c.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let d of this.relativeOriginPaths){let p=(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());p.addResolvedFieldName(r),t&&(p.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let l=(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,es.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,es.getValueOrDefault)(this.subgraphNameByUnresolvablePath,`${r}${t}`,()=>n)}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&this.subgraphNameByUnresolvablePath.delete(r);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&this.subgraphNameByUnresolvablePath.delete(a)}}};ME.EntityWalker=zD});var iV=w(qE=>{"use strict";m();T();N();Object.defineProperty(qE,"__esModule",{value:!0});qE.RootFieldWalker=void 0;var ts=Fr(),xE=kE(),WD=class{constructor({index:t,nodeResolutionDataByNodeName:n}){_(this,"index");_(this,"resDataByNodeName");_(this,"resDataByPath",new Map);_(this,"entityNodeNamesByPath",new Map);_(this,"pathsByEntityNodeName",new Map);_(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ts.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ts.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{visited:c,areDescendantsResolved:l}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:i,node:t,selectionPath:n,visited:c})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ts.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ts.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:c}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:c,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ts.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new xE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ts.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ts.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new xE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ts.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,selectionPath:a,visited:o}){if(!o)return;n.addResolvedFieldName(r);let c=(0,ts.getValueOrDefault)(this.resDataByPath,a,()=>new xE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));c.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),c.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ts.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new xE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};qE.RootFieldWalker=WD});var ZD=w(jE=>{"use strict";m();T();N();Object.defineProperty(jE,"__esModule",{value:!0});jE.Graph=void 0;var ud=jD(),wc=YD(),ea=Fr(),VE=KD(),Xde=rV(),Zde=iV(),XD=class{constructor(){_(this,"edgeId",-1);_(this,"entityDataNodeByTypeName",new Map);_(this,"nodeByNodeName",new Map);_(this,"nodesByTypeName",new Map);_(this,"resolvedRootFieldNodeNames",new Set);_(this,"rootNodeByTypeName",new Map);_(this,"subgraphName",VE.NOT_APPLICABLE);_(this,"resDataByNodeName",new Map);_(this,"resDataByRelativePathByEntity",new Map);_(this,"visitedEntitiesByOriginEntity",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,ea.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new ud.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new ud.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ea.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new ud.Edge(this.getNextEdgeId(),n,r);return(0,ea.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new ud.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new ud.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(VE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){let c=r.targetSubgraphNamesByFieldSet.get(o);for(let l of c!=null?c:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new ud.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}){let c=this.nodeByNodeName.get(n);if(!c)throw new Error(`Fatal: Could not find entity node for "${n}".`);o.add(n);let l=this.nodesByTypeName.get(c.typeName);if(!(l!=null&&l.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let d=new Xde.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),p=c.getAllAccessibleEntityNodeNames();for(let E of l){if(E.nodeName!==c.nodeName&&!p.has(E.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:E,selectionPath:""});if(I)return}for(let[E,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:E,relativeOriginPaths:(0,wc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:I}),resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new Zde.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let c=(0,ea.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,wc.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,wc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),c=(0,ea.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(c.addData(l),l.addData(c),!c.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ea.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=i.resDataByPath.get(c);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){for(let[r,i]of n.entityNodeNamesByPath){let a=new Map,o=new Map;for(let l of i)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:l,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n}),a.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n});let c=new Array;if(a.size>0&&c.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:i,resDataByPath:o,pathFromRoot:r,rootFieldData:t,subgraphNameByUnresolvablePath:a})),n.unresolvablePaths.size>0&&c.push(...(0,wc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,wc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var r;for(let[i,a]of n.pathsByEntityNodeName){let o=new Map;if(this.resDataByNodeName.has(i))continue;let c=(0,ea.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,ea.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,ea.getFirstEntry)(a))!=null?r:"",rootFieldData:t,subgraphNameByUnresolvablePath:o}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ea.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(VE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,ea.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,wc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:c,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,c=new Array;for(let d of t){let p=d.split(VE.LITERAL_PERIOD);o!=null||(o=p[1]),c.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ea.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,wc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};jE.Graph=XD});var eb=w(KE=>{"use strict";m();T();N();Object.defineProperty(KE,"__esModule",{value:!0});KE.newFieldSetConditionData=efe;KE.newConfigurationData=tfe;function efe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function tfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var rb=w(Lc=>{"use strict";m();T();N();Object.defineProperty(Lc,"__esModule",{value:!0});Lc.NormalizationFactory=void 0;Lc.normalizeSubgraphFromString=afe;Lc.normalizeSubgraph=oV;Lc.batchNormalize=sfe;var W=Oe(),Dn=Pr(),ai=dp(),Br=gu(),Yn=lp(),se=qi(),mp=rd(),nfe=Cv(),yi=iE(),rfe=FD(),rs=fp(),aV=kD(),ns=Uf(),nn=Ul(),cr=Iu(),nb=ZD(),GE=oE(),X=zn(),ife=wl(),je=Fr(),Np=eb(),sV=uE();function afe(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Tp(new nb.Graph).normalize(r)}function oV(e,t,n){return new Tp(n||new nb.Graph,t).normalize(e)}var Ep,tb,$E,uV,Tp=class{constructor(t,n){Yu(this,Ep);Yu(this,$E);_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitionByName",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByName",new Map);_(this,"directiveDefinitionDataByName",(0,ai.initializeDirectiveDefinitionDatas)());_(this,"doesParentRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",new Array);_(this,"entityDataByTypeName",new Map);_(this,"entityInterfaceDataByTypeName",new Map);_(this,"eventsConfigurations",new Map);_(this,"fieldSetDataByTypeName",new Map);_(this,"internalGraph");_(this,"invalidConfigureDescriptionNodeDatas",[]);_(this,"invalidORScopesCoords",new Set);_(this,"invalidRepeatedDirectiveNameByCoords",new Map);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",W.Kind.NULL);_(this,"lastChildNodeKind",W.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);_(this,"keyFieldNamesByParentTypeName",new Map);_(this,"fieldCoordsByNamedTypeName",new Map);_(this,"operationTypeNodeByTypeName",new Map);_(this,"originalParentTypeName","");_(this,"originalTypeNameByRenamedTypeName",new Map);_(this,"overridesByTargetSubgraphName",new Map);_(this,"parentDefinitionDataByTypeName",new Map);_(this,"schemaData");_(this,"referencedDirectiveNames",new Set);_(this,"referencedTypeNames",new Set);_(this,"renamedParentTypeName","");_(this,"subgraphName");_(this,"unvalidatedExternalFieldCoords",new Set);_(this,"usesEdfsNatsStreamConfiguration",!1);_(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,cr.getTypeNodeNamedTypeName)(r.type);if(Br.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,cr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,je.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,je.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,je.getValueOrDefault)(n,o,()=>[a]):(0,je.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=c===X.OVERRIDE,I=c===X.REQUIRES_SCOPES,v=c===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,yi.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,$=[];for(let me of i.arguments){let ue=me.name.value;if(A.has(ue)){U.add(ue);continue}A.add(ue);let Ae=n.argumentTypeNodeByName.get(ue);if(!Ae){j.add(ue);continue}if(!this.isArgumentValueValid(Ae.typeNode,me.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(me.value),`@${c}`,ue,(0,yi.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:me.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||ue!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:me.value.values,requiredScopes:$})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(c,[...j]));let re=(0,je.getEntriesNotInHashSet)(o,A);if(re.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(c,o,re)),a.length>0||!I)return a;let ee=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ee.requiredScopes.push(...$);else{let me=(0,je.getValueOrDefault)(ee.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));me.inheritedData.requiredScopes.push(...$),me.originalData.requiredScopes.push(...$)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),c.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?ns.ExtensionType.REAL:r||!n.has(X.EXTENDS)?ns.ExtensionType.NONE:ns.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case ns.ExtensionType.EXTENDS:case ns.ExtensionType.NONE:{if(n===ns.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,je.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let c of n.arguments){let l=c.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:c,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let c of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:c,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!mp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let c=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){c.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return c.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Br.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Br.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:c}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:c}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,c=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,cr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Br.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,cr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,cr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,Dn.formatDescription)(n.description)};return Br.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let c=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,yi.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,E=(0,cr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Br.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,cr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,cr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,Dn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),c=this.entityInterfaceDataByTypeName.get(r);if(c&&t.fields)for(let d of t.fields)c.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,cr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,cr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let c={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,cr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let c={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,cr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c),{success:!0,data:c}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let c={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,cr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Br.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let c={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,cr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){c=void 0;break}if(v.value.kind!==W.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:p}=(0,Dn.safeParse)("{"+c+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,je.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(c,d)]));continue}let E=(0,ai.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,cr.getTypeNodeNamedTypeName)(a.node.type),c=`${i}.${r}`;if(Br.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:c,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:c,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(c,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,ai.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,ai.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],$=-1,re=!0,ee=r,me=!1;return(0,W.visit)(c,{Argument:{enter(){return!1}},Field:{enter(ue){var Tn,Ur;let Ae=d[$],xe=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,xe)),W.BREAK;let Ze=ue.name.value,Z=`${xe}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),re)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ee=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&cl(Tn=l,Ep,tb).call(Tn,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let _e=Ae.fieldDataByName.get(Ze);if(!_e)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,xe,Ze)),W.BREAK;if(E[$].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[$].add(Ze);let{isDefinedExternal:vt,isUnconditionallyProvided:rn}=(0,je.getOrThrowError)(_e.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),an=vt&&!rn;rn||(me=!0);let wn=(0,cr.getTypeNodeNamedTypeName)(_e.node.type),$t=l.parentDefinitionDataByTypeName.get(wn);if(Br.BASE_SCALARS.has(wn)||($t==null?void 0:$t.kind)===W.Kind.SCALAR_TYPE_DEFINITION||($t==null?void 0:$t.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!vt){cl(Ur=l,Ep,tb).call(Ur,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,rs.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!an&&!i)return;let lr=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),gn=(0,Np.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?lr.providedBy.push(gn):lr.requiredBy.push(gn);return}if(!$t)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,wn)),W.BREAK;if(vt&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Np.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),$t.kind===W.Kind.OBJECT_TYPE_DEFINITION||$t.kind===W.Kind.INTERFACE_TYPE_DEFINITION||$t.kind===W.Kind.UNION_TYPE_DEFINITION){re=!0,d.push($t);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(ue){let Ae=d[$],xe=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!ue.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=ue.typeCondition.name.value;if(Z===xe){d.push(Ae),re=!0;return}if(!(0,Dn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,xe)),W.BREAK;let _e=l.parentDefinitionDataByTypeName.get(Z);if(!_e)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,Z)),W.BREAK;switch(re=!0,_e.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!_e.implementedInterfaceTypeNames.has(xe))break;d.push(_e);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let vt=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!vt||!vt.has(Z))break;d.push(_e);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(_e);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,Z,(0,je.kindToNodeType)(_e.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,je.kindToNodeType)(Ae.kind),xe)),W.BREAK}},SelectionSet:{enter(){if(!re){let ue=d[$];if(ue.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ee)),W.BREAK;if(ee===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,je.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=ue.fieldDataByName.get(ee);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,ue.name,ee)),W.BREAK;let xe=(0,cr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(xe),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Z))),W.BREAK}if($+=1,re=!1,$<0||$>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ee)),W.BREAK;E.push(new Set)},leave(){if(re){let ue=d[$+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,ue.name,(0,je.kindToNodeType)(ue.kind))),re=!1}$-=1,d.pop(),E.pop()}}}),j.length>0||!me?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,ai.getNormalizedFieldSet)(c)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,c,o),E=`${o}.${c}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${E}": - -`+I.join(X.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,ai.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(X.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(Br.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){i.set(c.name,(0,je.kindToNodeType)(c.kind));continue}if(t.name===c.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,yi.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,yi.printTypeNode)(v.node.type));let U=new Set;for(let[j,$]of E.argumentDataByName){U.add(j);let re=v.argumentDataByName.get(j);if(!re){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let ee=(0,yi.printTypeNode)(re.type),me=(0,yi.printTypeNode)($.type);me!==ee&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:ee,argumentName:j,expectedType:me}))}for(let[j,$]of v.argumentDataByName)U.has(j)||$.type.kind===W.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===W.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,je.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,je.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case W.Kind.LIST_TYPE:{o+=1,a=a.type;break}case W.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===X.LEVELS);if(!c||c.value.kind!==W.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,yi.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Br.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.TOPIC:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.TOPIC));continue}(0,ai.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.TOPICS:{if(c.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.TOPICS));continue}for(let l of c.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.TOPICS));break}(0,ai.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=X.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case X.SUBJECT:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(X.SUBJECT));continue}(0,ai.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case X.PROVIDER_ID:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:X.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID,c=GE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case X.SUBJECTS:{if(p.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==W.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.SUBJECTS));break}(0,ai.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case X.PROVIDER_ID:{if(p.value.kind!==W.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case X.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==W.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(mp.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([X.CONSUMER_NAME,X.STREAM_NAME]),U=new Set,j=new Set;for(let $ of p.value.fields){let re=$.name.value;if(!mp.STREAM_CONFIGURATION_FIELD_NAMES.has(re)){I.add(re),E=!1;continue}if(v.has(re))v.delete(re);else{U.add(re),E=!1;continue}switch(A.has(re)&&A.delete(re),re){case X.CONSUMER_NAME:if($.value.kind!=W.Kind.STRING||$.value.value.length<1){j.add(re),E=!1;continue}l=$.value.value;break;case X.STREAM_NAME:if($.value.kind!=W.Kind.STRING||$.value.value.length<1){j.add(re),E=!1;continue}d=$.value.value;break;case X.CONSUMER_INACTIVE_THRESHOLD:if($.value.kind!=W.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)($.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1;continue}try{c=parseInt($.value.value,10)}catch(ee){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)($.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return c<0?(c=GE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,rs.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${GE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>ife.MAX_INT32&&(c=0,this.warnings.push((0,rs.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),M({fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_NATS,subjects:a,type:X.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.CHANNEL:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.CHANNEL));continue}(0,ai.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.CHANNELS:{if(c.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.CHANNELS));break}(0,ai.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===W.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===X.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],c;switch(a.name.value){case X.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case X.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case X.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(X.PUBLISH,a,n,r,o);break}case X.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(X.REQUEST,a,n,r,o);break}case X.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case X.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case X.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case W.OperationTypeNode.MUTATION:return new Set([X.EDFS_KAFKA_PUBLISH,X.EDFS_NATS_PUBLISH,X.EDFS_NATS_REQUEST,X.EDFS_REDIS_PUBLISH]);case W.OperationTypeNode.QUERY:return new Set([X.EDFS_NATS_REQUEST]);case W.OperationTypeNode.SUBSCRIPTION:return new Set([X.EDFS_KAFKA_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case X.MUTATION:return W.OperationTypeNode.MUTATION;case X.QUERY:return W.OperationTypeNode.QUERY;case X.SUBSCRIPTION:return W.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,p=new Set;for(let j of mp.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===W.OperationTypeNode.MUTATION){let j=(0,yi.printTypeNode)(l.type);j!==X.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,yi.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,je.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,c]of t){let l=`${c.originalParentTypeName}.${o}`;if(n.has(o)){(a=c.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(X.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==W.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==X.SUCCESS||(0,yi.printTypeNode)(r.type)!==X.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case X.CONSUMER_INACTIVE_THRESHOLD:{if((0,yi.printTypeNode)(r.type)!==X.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==W.Kind.INT||r.defaultValue.value!==`${GE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case X.CONSUMER_NAME:case X.STREAM_NAME:{if((0,yi.printTypeNode)(r.type)!==X.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===X.EDFS_PUBLISH_RESULT||p===X.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==W.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,c)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(X.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(X.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(X.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(sV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of sV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:X.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),c.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Np.newConfigurationData)(!0,i)),o=(0,ai.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&X.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let p=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==X.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return Q(M({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let c=[i],l=new Map,d=-1,p=!0;if((0,W.visit)(o.documentNode,{Argument:{enter(){return W.BREAK}},Field:{enter(E){let I=c[d],v=I.name;if(p)return W.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return W.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let $=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&$&&$.isDefinedExternal&&!$.isUnconditionallyProvided&&i.extensionType!==ns.ExtensionType.NONE&&($.isUnconditionallyProvided=!0,(0,je.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let re=(0,cr.getTypeNodeNamedTypeName)(j.node.type);if(Br.BASE_SCALARS.has(re))return;let ee=a.parentDefinitionDataByTypeName.get(re);if(!ee)return W.BREAK;if(ee.kind===W.Kind.OBJECT_TYPE_DEFINITION){p=!0,c.push(ee);return}if((0,Dn.isKindAbstract)(ee.kind))return W.BREAK}},InlineFragment:{enter(){return W.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=c.length))return W.BREAK},leave(){p&&(p=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,rs.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Np.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let c=this.validateProvidesOrRequires(r,n.requires,!1);c&&(a.requires=c)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(X.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,rs.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,je.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,aV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,aV.upsertParentsAndChildren)(this,t);let n=[];cl(this,$E,uV).call(this,n),this.validateDirectives(this.schemaData,X.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===W.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[c,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,c);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Br.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let c of this.invalidConfigureDescriptionNodeDatas)c.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(c.kind),c.name));this.evaluateExternalKeyFields();for(let[c,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case W.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(c));break}n.push(this.getEnumNodeByData(l));break}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(c));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==W.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,je.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;c!==X.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(c),p=this.operationTypeNodeByTypeName.get(c),E=l.kind===W.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===ns.ExtensionType.EXTENDS&&(l.extensionType=ns.ExtensionType.NONE),p&&(l.fieldDataByName.delete(X.SERVICE_FIELD),l.fieldDataByName.delete(X.ENTITIES_FIELD));let I=[];for(let[$,re]of l.fieldDataByName){if(!E&&((o=re.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push($),this.validateArguments(re,l.kind),re.namedTypeKind!==W.Kind.NULL)continue;let ee=this.parentDefinitionDataByTypeName.get(re.namedTypeName);if(ee){if(!(0,nn.isOutputNodeKind)(ee.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:re,namedTypeData:ee,nodeType:`${(0,je.kindToNodeType)(l.kind)} field`}));continue}re.namedTypeKind=this.entityInterfaceDataByTypeName.get(ee.name)?W.Kind.INTERFACE_TYPE_DEFINITION:ee.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(c,I)):this.warnings.push((0,rs.externalInterfaceFieldsWarning)(this.subgraphName,c,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,je.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Np.newConfigurationData)(d,c)),U=this.entityInterfaceDataByTypeName.get(c);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let $=this.concreteTypeNamesByAbstractTypeName.get(c);$&&(0,je.addIterableToSet)({source:$,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,ai.isNodeQuery)(c,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,je.kindToNodeType)(l.kind),c)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case W.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===ns.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(c));break}n.push(this.getScalarNodeByData(l));break}case W.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(c)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let c of Object.values(W.OperationTypeNode)){let l=this.schemaData.operationTypes.get(c),d=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,c,X.OPERATION_TO_DEFAULT),p=l?(0,cr.getTypeNodeNamedTypeName)(l.type):d;if(Br.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(c,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,c)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,c,E.kind))}for(let c of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(c);if(!l){this.errors.push((0,se.undefinedTypeError)(c));continue}if(l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(c);(!d||d.size<1)&&this.warnings.push((0,rs.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,c))}let i=new Map;for(let c of this.directiveDefinitionByName.values()){let l=(0,Dn.extractExecutableDirectiveLocations)(c.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,c,l)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let c of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(c)):this.warnings.push((0,rs.invalidExternalFieldWarning)(c,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:W.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,W.print)(a),schema:(0,nfe.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Ep=new WeakSet,tb=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,rs.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},$E=new WeakSet,uV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Br.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,je.addOptionalIterableToSet)({source:mp.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};Lc.NormalizationFactory=Tp;function sfe(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,c=new Set,l=new Map,d=new Set,p=new Set,E=[],I=new Set,v=new Map,A=[],U=[];for(let re of e)re.name&&(0,rfe.recordSubgraphName)(re.name,d,p);let j=new nb.Graph;for(let re=0;re0&&A.push(...ue.warnings),!ue.success){U.push((0,se.subgraphValidationError)(me,ue.errors));continue}if(!ue){U.push((0,se.subgraphValidationError)(me,[se.subgraphValidationFailureError]));continue}l.set(me,ue.parentDefinitionDataByTypeName);for(let Ae of ue.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(t,Ae,I);for(let[Ae,xe]of ue.fieldCoordsByNamedTypeName)(0,je.addIterableToSet)({source:xe,target:(0,je.getValueOrDefault)(v,Ae,()=>new Set)});for(let[Ae,xe]of ue.concreteTypeNamesByAbstractTypeName){let Ze=n.get(Ae);if(!Ze){n.set(Ae,new Set(xe));continue}(0,je.addIterableToSet)({source:xe,target:Ze})}for(let[Ae,xe]of ue.entityDataByTypeName){let Ze=xe.keyFieldSetDatasBySubgraphName.get(me);Ze&&(0,Yn.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:Ze,typeName:Ae,subgraphName:me})}if(ee.name&&i.set(me,{conditionalFieldDataByCoordinates:ue.conditionalFieldDataByCoordinates,configurationDataByTypeName:ue.configurationDataByTypeName,definitions:ue.subgraphAST,directiveDefinitionByName:ue.directiveDefinitionByName,entityInterfaces:ue.entityInterfaces,isVersionTwo:ue.isVersionTwo,keyFieldNamesByParentTypeName:ue.keyFieldNamesByParentTypeName,name:me,operationTypes:ue.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:ue.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:ue.persistedDirectiveDefinitionDataByDirectiveName,schema:ue.schema,schemaNode:ue.schemaNode,url:ee.url}),!(ue.overridesByTargetSubgraphName.size<1))for(let[Ae,xe]of ue.overridesByTargetSubgraphName){let Ze=d.has(Ae);for(let[Z,_e]of xe){let vt=ue.originalTypeNameByRenamedTypeName.get(Z)||Z;if(!Ze)A.push((0,rs.invalidOverrideTargetSubgraphNameWarning)(Ae,vt,[..._e],ee.name));else{let rn=(0,je.getValueOrDefault)(a,Ae,()=>new Map),an=(0,je.getValueOrDefault)(rn,Z,()=>new Set(_e));(0,je.addIterableToSet)({source:_e,target:an})}for(let rn of _e){let an=`${vt}.${rn}`,wn=o.get(an);if(!wn){o.set(an,[me]);continue}wn.push(me),c.add(an)}}}}let $=[];if(I.size>0&&$.push((0,se.orScopesLimitError)(Br.MAX_OR_SCOPES,[...I])),(E.length>0||p.size>0)&&$.push((0,se.invalidSubgraphNamesError)([...p],E)),c.size>0){let re=[];for(let ee of c){let me=(0,je.getOrThrowError)(o,ee,"overrideSourceSubgraphNamesByFieldPath");re.push((0,se.duplicateOverriddenFieldErrorMessage)(ee,me))}$.push((0,se.duplicateOverriddenFieldsError)(re))}if($.push(...U),$.length>0)return{errors:$,success:!1,warnings:A};for(let[re,ee]of a){let me=(0,je.getOrThrowError)(i,re,"internalSubgraphBySubgraphName");me.overriddenFieldNamesByParentTypeName=ee;for(let[ue,Ae]of ee){let xe=me.configurationDataByTypeName.get(ue);xe&&((0,Yn.subtractSet)(Ae,xe.fieldNames),xe.fieldNames.size<1&&me.configurationDataByTypeName.delete(ue))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:j,success:!0,warnings:A}}});var QE=w(Uc=>{"use strict";m();T();N();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.DivergentType=void 0;Uc.getLeastRestrictiveMergedTypeNode=ufe;Uc.getMostRestrictiveMergedTypeNode=cfe;Uc.renameNamedTypeName=lfe;var Cc=Oe(),lV=qi(),ofe=Iu(),cV=Pr(),dV=wl(),Bc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(Bc||(Uc.DivergentType=Bc={}));function fV(e,t,n,r,i){t=(0,ofe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=Bc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(ab,"__esModule",{value:!0});ab.renameRootTypes=pfe;var dfe=Oe(),ib=Pr(),ffe=QE(),Pu=zn(),kc=Fr();function pfe(e,t){let n,r=!1,i;(0,dfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Pu.SERVICE_FIELD||o===Pu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,kc.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,kc.getOrThrowError)(ib.operationTypeNodeToDefaultType,d,Pu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,ffe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,kc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Pu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,kc.getOrThrowError)(ib.operationTypeNodeToDefaultType,c,Pu.OPERATION_TO_DEFAULT):o;n=(0,kc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Pu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,kc.getOrThrowError)(ib.operationTypeNodeToDefaultType,c,Pu.OPERATION_TO_DEFAULT):o;n=(0,kc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Pu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var pV=w((cd,hp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",c=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,$=8,re=16,ee=32,me=64,ue=128,Ae=256,xe=512,Ze=30,Z="...",_e=800,vt=16,rn=1,an=2,wn=3,$t=1/0,Tn=9007199254740991,Ur=17976931348623157e292,lr=NaN,gn=4294967295,Ht=gn-1,Ln=gn>>>1,ae=[["ary",ue],["bind",A],["bindKey",U],["curry",$],["curryRight",re],["flip",xe],["partial",ee],["partialRight",me],["rearg",Ae]],De="[object Arguments]",Ie="[object Array]",Ce="[object AsyncFunction]",St="[object Boolean]",Y="[object Date]",ie="[object DOMException]",qe="[object Error]",He="[object Function]",Bt="[object GeneratorFunction]",it="[object Map]",Pt="[object Number]",us="[object Null]",Qr="[object Object]",cs="[object Promise]",Hc="[object Proxy]",Pa="[object RegExp]",yr="[object Set]",si="[object String]",xt="[object Symbol]",Ir="[object Undefined]",Bu="[object WeakMap]",Fa="[object WeakSet]",Uu="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",g="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",ce="[object Uint8Array]",Tt="[object Uint8ClampedArray]",En="[object Uint16Array]",un="[object Uint32Array]",_n=/\b__p \+= '';/g,sn=/\b(__p \+=) '' \+/g,Jj=/(__e\(.*?\)|\b__t\)) \+\n'';/g,o0=/&(?:amp|lt|gt|quot|#39);/g,u0=/[&<>"']/g,Hj=RegExp(o0.source),zj=RegExp(u0.source),Wj=/<%-([\s\S]+?)%>/g,Xj=/<%([\s\S]+?)%>/g,c0=/<%=([\s\S]+?)%>/g,Zj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eK=/^\w*$/,tK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bh=/[\\^$.*+?()[\]{}|]/g,nK=RegExp(bh.source),Ah=/^\s+/,rK=/\s/,iK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,aK=/\{\n\/\* \[wrapped with (.+)\] \*/,sK=/,? & /,oK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uK=/[()=,{}\[\]\/\s]/,cK=/\\(\\)?/g,lK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,l0=/\w*$/,dK=/^[-+]0x[0-9a-f]+$/i,fK=/^0b[01]+$/i,pK=/^\[object .+?Constructor\]$/,mK=/^0o[0-7]+$/i,NK=/^(?:0|[1-9]\d*)$/,TK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kp=/($^)/,EK=/['\n\r\u2028\u2029\\]/g,Gp="\\ud800-\\udfff",hK="\\u0300-\\u036f",yK="\\ufe20-\\ufe2f",IK="\\u20d0-\\u20ff",d0=hK+yK+IK,f0="\\u2700-\\u27bf",p0="a-z\\xdf-\\xf6\\xf8-\\xff",gK="\\xac\\xb1\\xd7\\xf7",_K="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vK="\\u2000-\\u206f",OK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",m0="A-Z\\xc0-\\xd6\\xd8-\\xde",N0="\\ufe0e\\ufe0f",T0=gK+_K+vK+OK,Rh="['\u2019]",SK="["+Gp+"]",E0="["+T0+"]",$p="["+d0+"]",h0="\\d+",DK="["+f0+"]",y0="["+p0+"]",I0="[^"+Gp+T0+h0+f0+p0+m0+"]",Ph="\\ud83c[\\udffb-\\udfff]",bK="(?:"+$p+"|"+Ph+")",g0="[^"+Gp+"]",Fh="(?:\\ud83c[\\udde6-\\uddff]){2}",wh="[\\ud800-\\udbff][\\udc00-\\udfff]",zc="["+m0+"]",_0="\\u200d",v0="(?:"+y0+"|"+I0+")",AK="(?:"+zc+"|"+I0+")",O0="(?:"+Rh+"(?:d|ll|m|re|s|t|ve))?",S0="(?:"+Rh+"(?:D|LL|M|RE|S|T|VE))?",D0=bK+"?",b0="["+N0+"]?",RK="(?:"+_0+"(?:"+[g0,Fh,wh].join("|")+")"+b0+D0+")*",PK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",FK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",A0=b0+D0+RK,wK="(?:"+[DK,Fh,wh].join("|")+")"+A0,LK="(?:"+[g0+$p+"?",$p,Fh,wh,SK].join("|")+")",CK=RegExp(Rh,"g"),BK=RegExp($p,"g"),Lh=RegExp(Ph+"(?="+Ph+")|"+LK+A0,"g"),UK=RegExp([zc+"?"+y0+"+"+O0+"(?="+[E0,zc,"$"].join("|")+")",AK+"+"+S0+"(?="+[E0,zc+v0,"$"].join("|")+")",zc+"?"+v0+"+"+O0,zc+"+"+S0,FK,PK,h0,wK].join("|"),"g"),kK=RegExp("["+_0+Gp+d0+N0+"]"),MK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qK=-1,yn={};yn[y]=yn[g]=yn[B]=yn[K]=yn[te]=yn[ce]=yn[Tt]=yn[En]=yn[un]=!0,yn[De]=yn[Ie]=yn[Uu]=yn[St]=yn[P]=yn[Y]=yn[qe]=yn[He]=yn[it]=yn[Pt]=yn[Qr]=yn[Pa]=yn[yr]=yn[si]=yn[Bu]=!1;var hn={};hn[De]=hn[Ie]=hn[Uu]=hn[P]=hn[St]=hn[Y]=hn[y]=hn[g]=hn[B]=hn[K]=hn[te]=hn[it]=hn[Pt]=hn[Qr]=hn[Pa]=hn[yr]=hn[si]=hn[xt]=hn[ce]=hn[Tt]=hn[En]=hn[un]=!0,hn[qe]=hn[He]=hn[Bu]=!1;var VK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},jK={"&":"&","<":"<",">":">",'"':""","'":"'"},KK={"&":"&","<":"<",">":">",""":'"',"'":"'"},GK={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$K=parseFloat,QK=parseInt,R0=typeof global=="object"&&global&&global.Object===Object&&global,YK=typeof self=="object"&&self&&self.Object===Object&&self,dr=R0||YK||Function("return this")(),Ch=typeof cd=="object"&&cd&&!cd.nodeType&&cd,ku=Ch&&typeof hp=="object"&&hp&&!hp.nodeType&&hp,P0=ku&&ku.exports===Ch,Bh=P0&&R0.process,Ii=function(){try{var G=ku&&ku.require&&ku.require("util").types;return G||Bh&&Bh.binding&&Bh.binding("util")}catch(oe){}}(),F0=Ii&&Ii.isArrayBuffer,w0=Ii&&Ii.isDate,L0=Ii&&Ii.isMap,C0=Ii&&Ii.isRegExp,B0=Ii&&Ii.isSet,U0=Ii&&Ii.isTypedArray;function oi(G,oe,ne){switch(ne.length){case 0:return G.call(oe);case 1:return G.call(oe,ne[0]);case 2:return G.call(oe,ne[0],ne[1]);case 3:return G.call(oe,ne[0],ne[1],ne[2])}return G.apply(oe,ne)}function JK(G,oe,ne,Be){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function Uh(G,oe,ne){for(var Be=-1,dt=G==null?0:G.length;++Be-1;);return ne}function G0(G,oe){for(var ne=G.length;ne--&&Wc(oe,G[ne],0)>-1;);return ne}function rG(G,oe){for(var ne=G.length,Be=0;ne--;)G[ne]===oe&&++Be;return Be}var iG=qh(VK),aG=qh(jK);function sG(G){return"\\"+GK[G]}function oG(G,oe){return G==null?e:G[oe]}function Xc(G){return kK.test(G)}function uG(G){return MK.test(G)}function cG(G){for(var oe,ne=[];!(oe=G.next()).done;)ne.push(oe.value);return ne}function Gh(G){var oe=-1,ne=Array(G.size);return G.forEach(function(Be,dt){ne[++oe]=[dt,Be]}),ne}function $0(G,oe){return function(ne){return G(oe(ne))}}function Zo(G,oe){for(var ne=-1,Be=G.length,dt=0,Qt=[];++ne-1}function zG(s,u){var f=this.__data__,h=cm(f,s);return h<0?(++this.size,f.push([s,u])):f[h][1]=u,this}ls.prototype.clear=QG,ls.prototype.delete=YG,ls.prototype.get=JG,ls.prototype.has=HG,ls.prototype.set=zG;function ds(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function Oi(s,u,f,h,O,L){var k,V=u&d,J=u&p,le=u&E;if(f&&(k=O?f(s,h,O,L):f(s)),k!==e)return k;if(!bn(s))return s;var de=ft(s);if(de){if(k=eQ(s),!V)return Yr(s,k)}else{var Te=Sr(s),be=Te==He||Te==Bt;if(su(s))return bA(s,V);if(Te==Qr||Te==De||be&&!O){if(k=J||be?{}:QA(s),!V)return J?K$(s,f$(k,s)):j$(s,rA(k,s))}else{if(!hn[Te])return O?s:{};k=tQ(s,Te,V)}}L||(L=new ra);var $e=L.get(s);if($e)return $e;L.set(s,k),gR(s)?s.forEach(function(tt){k.add(Oi(tt,u,f,tt,s,L))}):yR(s)&&s.forEach(function(tt,Dt){k.set(Dt,Oi(tt,u,f,Dt,s,L))});var et=le?J?Ty:Ny:J?Hr:fr,yt=de?e:et(s);return gi(yt||s,function(tt,Dt){yt&&(Dt=tt,tt=s[Dt]),bd(k,Dt,Oi(tt,u,f,Dt,s,L))}),k}function p$(s){var u=fr(s);return function(f){return iA(f,s,u)}}function iA(s,u,f){var h=f.length;if(s==null)return!h;for(s=mn(s);h--;){var O=f[h],L=u[O],k=s[O];if(k===e&&!(O in s)||!L(k))return!1}return!0}function aA(s,u,f){if(typeof s!="function")throw new _i(i);return Cd(function(){s.apply(e,f)},u)}function Ad(s,u,f,h){var O=-1,L=Qp,k=!0,V=s.length,J=[],le=u.length;if(!V)return J;f&&(u=vn(u,ui(f))),h?(L=Uh,k=!1):u.length>=n&&(L=gd,k=!1,u=new qu(u));e:for(;++OO?0:O+f),h=h===e||h>O?O:Et(h),h<0&&(h+=O),h=f>h?0:vR(h);f0&&f(V)?u>1?gr(V,u-1,f,h,O):Xo(O,V):h||(O[O.length]=V)}return O}var Wh=LA(),uA=LA(!0);function wa(s,u){return s&&Wh(s,u,fr)}function Xh(s,u){return s&&uA(s,u,fr)}function dm(s,u){return Wo(u,function(f){return Ts(s[f])})}function ju(s,u){u=iu(u,s);for(var f=0,h=u.length;s!=null&&fu}function T$(s,u){return s!=null&&on.call(s,u)}function E$(s,u){return s!=null&&u in mn(s)}function h$(s,u,f){return s>=Or(u,f)&&s=120&&de.length>=120)?new qu(k&&de):e}de=s[0];var Te=-1,be=V[0];e:for(;++Te-1;)V!==s&&nm.call(V,J,1),nm.call(s,J,1);return s}function yA(s,u){for(var f=s?u.length:0,h=f-1;f--;){var O=u[f];if(f==h||O!==L){var L=O;Ns(O)?nm.call(s,O,1):uy(s,O)}}return s}function ay(s,u){return s+am(Z0()*(u-s+1))}function F$(s,u,f,h){for(var O=-1,L=rr(im((u-s)/(f||1)),0),k=ne(L);L--;)k[h?L:++O]=s,s+=f;return k}function sy(s,u){var f="";if(!s||u<1||u>Tn)return f;do u%2&&(f+=s),u=am(u/2),u&&(s+=s);while(u);return f}function gt(s,u){return vy(HA(s,u,zr),s+"")}function w$(s){return nA(ul(s))}function L$(s,u){var f=ul(s);return _m(f,Vu(u,0,f.length))}function Fd(s,u,f,h){if(!bn(s))return s;u=iu(u,s);for(var O=-1,L=u.length,k=L-1,V=s;V!=null&&++OO?0:O+u),f=f>O?O:f,f<0&&(f+=O),O=u>f?0:f-u>>>0,u>>>=0;for(var L=ne(O);++h>>1,k=s[L];k!==null&&!li(k)&&(f?k<=u:k=n){var le=u?null:Y$(s);if(le)return Jp(le);k=!1,O=gd,J=new qu}else J=u?[]:V;e:for(;++h=h?s:Si(s,u,f)}var DA=OG||function(s){return dr.clearTimeout(s)};function bA(s,u){if(u)return s.slice();var f=s.length,h=J0?J0(f):new s.constructor(f);return s.copy(h),h}function fy(s){var u=new s.constructor(s.byteLength);return new em(u).set(new em(s)),u}function M$(s,u){var f=u?fy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function x$(s){var u=new s.constructor(s.source,l0.exec(s));return u.lastIndex=s.lastIndex,u}function q$(s){return Dd?mn(Dd.call(s)):{}}function AA(s,u){var f=u?fy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function RA(s,u){if(s!==u){var f=s!==e,h=s===null,O=s===s,L=li(s),k=u!==e,V=u===null,J=u===u,le=li(u);if(!V&&!le&&!L&&s>u||L&&k&&J&&!V&&!le||h&&k&&J||!f&&J||!O)return 1;if(!h&&!L&&!le&&s=V)return J;var le=f[h];return J*(le=="desc"?-1:1)}}return s.index-u.index}function PA(s,u,f,h){for(var O=-1,L=s.length,k=f.length,V=-1,J=u.length,le=rr(L-k,0),de=ne(J+le),Te=!h;++V1?f[O-1]:e,k=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,k&&Mr(f[0],f[1],k)&&(L=O<3?e:L,O=1),u=mn(u);++h-1?O[L?u[k]:k]:e}}function UA(s){return ms(function(u){var f=u.length,h=f,O=vi.prototype.thru;for(s&&u.reverse();h--;){var L=u[h];if(typeof L!="function")throw new _i(i);if(O&&!k&&Im(L)=="wrapper")var k=new vi([],!0)}for(h=k?h:f;++h1&&Ft.reverse(),de&&JV))return!1;var le=L.get(s),de=L.get(u);if(le&&de)return le==u&&de==s;var Te=-1,be=!0,$e=f&v?new qu:e;for(L.set(s,u),L.set(u,s);++Te1?"& ":"")+u[h],u=u.join(f>2?", ":" "),s.replace(iK,`{ +`+r;return{outputEnd:r,outputStart:n,pathNodes:t}}function kE({outputEnd:e,outputStart:t,pathNodes:n},r){return t+Za.LITERAL_SPACE.repeat(n.length+1)+Yde(r,n.length)+e}function iV(e,t){return t?e?`${t}${e}`:t:e}function Jde({resDataByPath:e,rootFieldData:t,unresolvablePaths:n}){let r=new Array;for(let a of n){let o=(0,QD.getOrThrowError)(e,a,"resDataByPath"),c=new Map;for(let[d,p]of o.fieldDataByName)o.resolvedFieldNames.has(d)||c.set(d,p);let l=UE(a);for(let[d,p]of c)r.push({fieldName:d,selectionSet:kE(l,p),subgraphNames:p.subgraphNames,typeName:o.typeName})}let i=new Array;for(let a of r)i.push((0,$D.unresolvablePathError)(a,YD({rootFieldData:t,unresolvableFieldData:a})));return i}function Hde({entityAncestorData:e,resDataByPath:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=new Array;for(let[o,c]of i){let l=new Array,d=(0,QD.getOrThrowError)(t,o,"resDataByPath"),p=new Map;for(let[v,A]of d.fieldDataByName)d.resolvedFieldNames.has(v)||p.set(v,A);let E=iV(o,n),I=UE(E);for(let[v,A]of p)l.push({fieldName:v,selectionSet:kE(I,A),subgraphNames:A.subgraphNames,typeName:d.typeName});e.subgraphName=c;for(let v of l)a.push((0,$D.unresolvablePathError)(v,YD({rootFieldData:r,unresolvableFieldData:v,entityAncestorData:e})))}return a}function zde({entityAncestors:e,resDataByPath:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=new Array;for(let o of i.keys()){let c=new Array,l=(0,QD.getOrThrowError)(t,o,"resDataByPath"),d=new Map;for(let[I,v]of l.fieldDataByName)l.resolvedFieldNames.has(I)||d.set(I,v);let p=iV(o,n),E=UE(p);for(let[I,v]of d)c.push({fieldName:I,selectionSet:kE(E,v),subgraphNames:v.subgraphNames,typeName:l.typeName});for(let I of c)a.push((0,$D.unresolvablePathError)(I,rV({rootFieldData:r,unresolvableFieldData:I,entityAncestors:e})))}return a}function Wde({relativeOriginPaths:e,selectionPath:t}){if(!e)return new Set([t]);let n=new Set;for(let r of e)n.add(`${r}${t}`);return n}});var xE=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.NodeResolutionData=void 0;var Xde=qi(),wc,zD=class zD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){Ju(this,wc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");Gy(this,wc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData(t){for(let n of t.resolvedFieldNames)this.addResolvedFieldName(n);for(let n of t.resolvedDescendantNames)this.resolvedDescendantNames.add(n)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,Xde.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){return new zD({fieldDataByName:this.fieldDataByName,isResolved:Ky(this,wc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Ky(this,wc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return Gy(this,wc,!0),!0}};wc=new WeakMap;var HD=zD;ME.NodeResolutionData=HD});var aV=w(qE=>{"use strict";m();T();N();Object.defineProperty(qE,"__esModule",{value:!0});qE.EntityWalker=void 0;var Zde=xE(),es=Fr(),WD=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,subgraphNameByUnresolvablePath:o,visitedEntities:c}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.visitedEntities=c,this.subgraphNameByUnresolvablePath=o}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,es.getValueOrDefault)(this.resDataByNodeName,n,()=>new Zde.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,`${c}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!1}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,es.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,es.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):(this.removeUnresolvablePaths({selectionPath:`${n}.${t.edgeName}`,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{visited:c,areDescendantsResolved:l,isRevisitedNode:d}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:r,nodeName:t.nodeName,selectionPath:n,visited:c})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,nodeName:i,selectionPath:a,visited:o}){if(!o)return;let c=(0,es.getValueOrDefault)(this.resDataByNodeName,i,()=>n.copy());if(n.addResolvedFieldName(r),c.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let d of this.relativeOriginPaths){let p=(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());p.addResolvedFieldName(r),t&&(p.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let l=(0,es.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,es.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,es.getValueOrDefault)(this.subgraphNameByUnresolvablePath,`${r}${t}`,()=>n)}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&this.subgraphNameByUnresolvablePath.delete(r);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&this.subgraphNameByUnresolvablePath.delete(a)}}};qE.EntityWalker=WD});var sV=w(jE=>{"use strict";m();T();N();Object.defineProperty(jE,"__esModule",{value:!0});jE.RootFieldWalker=void 0;var ts=Fr(),VE=xE(),XD=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ts.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ts.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{visited:c,areDescendantsResolved:l}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:i,node:t,selectionPath:n,visited:c})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ts.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ts.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:c}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:c,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ts.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new VE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ts.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ts.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new VE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ts.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,selectionPath:a,visited:o}){if(!o)return;n.addResolvedFieldName(r);let c=(0,ts.getValueOrDefault)(this.resDataByPath,a,()=>new VE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));c.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),c.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ts.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new VE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};jE.RootFieldWalker=XD});var eb=w(GE=>{"use strict";m();T();N();Object.defineProperty(GE,"__esModule",{value:!0});GE.Graph=void 0;var cd=KD(),Lc=JD(),ea=Fr(),KE=GD(),efe=aV(),tfe=sV(),ZD=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",KE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ea.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new cd.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new cd.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ea.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new cd.Edge(this.getNextEdgeId(),n,r);return(0,ea.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new cd.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new cd.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(KE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){let c=r.targetSubgraphNamesByFieldSet.get(o);for(let l of c!=null?c:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new cd.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}){let c=this.nodeByNodeName.get(n);if(!c)throw new Error(`Fatal: Could not find entity node for "${n}".`);o.add(n);let l=this.nodesByTypeName.get(c.typeName);if(!(l!=null&&l.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let d=new efe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),p=c.getAllAccessibleEntityNodeNames();for(let E of l){if(E.nodeName!==c.nodeName&&!p.has(E.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:E,selectionPath:""});if(I)return}for(let[E,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:E,relativeOriginPaths:(0,Lc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:I}),resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new tfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let c=(0,ea.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,Lc.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,Lc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),c=(0,ea.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(c.addData(l),l.addData(c),!c.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ea.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=i.resDataByPath.get(c);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){for(let[r,i]of n.entityNodeNamesByPath){let a=new Map,o=new Map;for(let l of i)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:l,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n}),a.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n});let c=new Array;if(a.size>0&&c.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:i,resDataByPath:o,pathFromRoot:r,rootFieldData:t,subgraphNameByUnresolvablePath:a})),n.unresolvablePaths.size>0&&c.push(...(0,Lc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,Lc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var r;for(let[i,a]of n.pathsByEntityNodeName){let o=new Map;if(this.resDataByNodeName.has(i))continue;let c=(0,ea.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,ea.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,ea.getFirstEntry)(a))!=null?r:"",rootFieldData:t,subgraphNameByUnresolvablePath:o}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ea.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(KE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,ea.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,Lc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:c,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,c=new Array;for(let d of t){let p=d.split(KE.LITERAL_PERIOD);o!=null||(o=p[1]),c.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ea.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,Lc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};GE.Graph=ZD});var tb=w($E=>{"use strict";m();T();N();Object.defineProperty($E,"__esModule",{value:!0});$E.newFieldSetConditionData=nfe;$E.newConfigurationData=rfe;function nfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function rfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var ib=w(Cc=>{"use strict";m();T();N();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.NormalizationFactory=void 0;Cc.normalizeSubgraphFromString=ofe;Cc.normalizeSubgraph=cV;Cc.batchNormalize=ufe;var W=Oe(),Dn=Pr(),ai=fp(),Br=_u(),Yn=dp(),se=qi(),Np=id(),ife=Bv(),yi=sE(),afe=wD(),rs=pp(),oV=MD(),ns=kf(),nn=kl(),cr=gu(),rb=eb(),QE=cE(),X=zn(),sfe=Ll(),je=Fr(),Tp=tb(),uV=lE();function ofe(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Ep(new rb.Graph).normalize(r)}function cV(e,t,n){return new Ep(n||new rb.Graph,t).normalize(e)}var hp,nb,YE,lV,Ep=class{constructor(t,n){Ju(this,hp);Ju(this,YE);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,ai.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",W.Kind.NULL);g(this,"lastChildNodeKind",W.Kind.NULL);g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,cr.getTypeNodeNamedTypeName)(r.type);if(Br.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,cr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,je.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,je.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,je.getValueOrDefault)(n,o,()=>[a]):(0,je.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=c===X.OVERRIDE,I=c===X.REQUIRES_SCOPES,v=c===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,yi.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,$=[];for(let me of i.arguments){let ue=me.name.value;if(A.has(ue)){U.add(ue);continue}A.add(ue);let Ae=n.argumentTypeNodeByName.get(ue);if(!Ae){j.add(ue);continue}if(!this.isArgumentValueValid(Ae.typeNode,me.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(me.value),`@${c}`,ue,(0,yi.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:me.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||ue!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:me.value.values,requiredScopes:$})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(c,[...j]));let re=(0,je.getEntriesNotInHashSet)(o,A);if(re.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(c,o,re)),a.length>0||!I)return a;let ee=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ee.requiredScopes.push(...$);else{let me=(0,je.getValueOrDefault)(ee.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));me.inheritedData.requiredScopes.push(...$),me.originalData.requiredScopes.push(...$)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),c.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?ns.ExtensionType.REAL:r||!n.has(X.EXTENDS)?ns.ExtensionType.NONE:ns.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case ns.ExtensionType.EXTENDS:case ns.ExtensionType.NONE:{if(n===ns.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,je.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let c of n.arguments){let l=c.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:c,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let c of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:c,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!Np.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let c=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){c.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return c.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Br.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Br.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:c}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:c}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,c=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,cr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Br.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,cr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,cr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,Dn.formatDescription)(n.description)};return Br.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let c=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,yi.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,E=(0,cr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Br.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,cr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,cr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,Dn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),c=this.entityInterfaceDataByTypeName.get(r);if(c&&t.fields)for(let d of t.fields)c.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,cr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,cr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let c={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,cr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let c={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,cr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c),{success:!0,data:c}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let c={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,cr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Br.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let c={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,cr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(c),this.parentDefinitionDataByTypeName.set(r,c)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){c=void 0;break}if(v.value.kind!==W.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:p}=(0,Dn.safeParse)("{"+c+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,je.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(c,d)]));continue}let E=(0,ai.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,cr.getTypeNodeNamedTypeName)(a.node.type),c=`${i}.${r}`;if(Br.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:c,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:c,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(c,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,ai.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,ai.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],$=-1,re=!0,ee=r,me=!1;return(0,W.visit)(c,{Argument:{enter(){return!1}},Field:{enter(ue){var Tn,Ur;let Ae=d[$],xe=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,xe)),W.BREAK;let Ze=ue.name.value,Z=`${xe}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),re)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ee=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&ll(Tn=l,hp,nb).call(Tn,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let _e=Ae.fieldDataByName.get(Ze);if(!_e)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,xe,Ze)),W.BREAK;if(E[$].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[$].add(Ze);let{isDefinedExternal:vt,isUnconditionallyProvided:rn}=(0,je.getOrThrowError)(_e.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),an=vt&&!rn;rn||(me=!0);let wn=(0,cr.getTypeNodeNamedTypeName)(_e.node.type),$t=l.parentDefinitionDataByTypeName.get(wn);if(Br.BASE_SCALARS.has(wn)||($t==null?void 0:$t.kind)===W.Kind.SCALAR_TYPE_DEFINITION||($t==null?void 0:$t.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!vt){ll(Ur=l,hp,nb).call(Ur,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,rs.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!an&&!i)return;let lr=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),gn=(0,Tp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?lr.providedBy.push(gn):lr.requiredBy.push(gn);return}if(!$t)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,wn)),W.BREAK;if(vt&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Tp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),$t.kind===W.Kind.OBJECT_TYPE_DEFINITION||$t.kind===W.Kind.INTERFACE_TYPE_DEFINITION||$t.kind===W.Kind.UNION_TYPE_DEFINITION){re=!0,d.push($t);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(ue){let Ae=d[$],xe=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!ue.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=ue.typeCondition.name.value;if(Z===xe){d.push(Ae),re=!0;return}if(!(0,Dn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,xe)),W.BREAK;let _e=l.parentDefinitionDataByTypeName.get(Z);if(!_e)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,Z)),W.BREAK;switch(re=!0,_e.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!_e.implementedInterfaceTypeNames.has(xe))break;d.push(_e);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let vt=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!vt||!vt.has(Z))break;d.push(_e);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(_e);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,Z,(0,je.kindToNodeType)(_e.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,je.kindToNodeType)(Ae.kind),xe)),W.BREAK}},SelectionSet:{enter(){if(!re){let ue=d[$];if(ue.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ee)),W.BREAK;if(ee===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,je.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=ue.fieldDataByName.get(ee);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,ue.name,ee)),W.BREAK;let xe=(0,cr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(xe),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Z))),W.BREAK}if($+=1,re=!1,$<0||$>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ee)),W.BREAK;E.push(new Set)},leave(){if(re){let ue=d[$+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,ue.name,(0,je.kindToNodeType)(ue.kind))),re=!1}$-=1,d.pop(),E.pop()}}}),j.length>0||!me?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,ai.getNormalizedFieldSet)(c)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,c,o),E=`${o}.${c}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${E}": + -`+I.join(X.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,ai.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(X.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(Br.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){i.set(c.name,(0,je.kindToNodeType)(c.kind));continue}if(t.name===c.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,yi.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,yi.printTypeNode)(v.node.type));let U=new Set;for(let[j,$]of E.argumentDataByName){U.add(j);let re=v.argumentDataByName.get(j);if(!re){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let ee=(0,yi.printTypeNode)(re.type),me=(0,yi.printTypeNode)($.type);me!==ee&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:ee,argumentName:j,expectedType:me}))}for(let[j,$]of v.argumentDataByName)U.has(j)||$.type.kind===W.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===W.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,je.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,je.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case W.Kind.LIST_TYPE:{o+=1,a=a.type;break}case W.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===X.LEVELS);if(!c||c.value.kind!==W.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,yi.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Br.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.TOPIC:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.TOPIC));continue}(0,ai.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.TOPICS:{if(c.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.TOPICS));continue}for(let l of c.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.TOPICS));break}(0,ai.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=X.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case X.SUBJECT:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(X.SUBJECT));continue}(0,ai.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case X.PROVIDER_ID:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:X.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID,c=QE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case X.SUBJECTS:{if(p.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==W.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.SUBJECTS));break}(0,ai.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case X.PROVIDER_ID:{if(p.value.kind!==W.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case X.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==W.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(Np.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([X.CONSUMER_NAME,X.STREAM_NAME]),U=new Set,j=new Set;for(let $ of p.value.fields){let re=$.name.value;if(!Np.STREAM_CONFIGURATION_FIELD_NAMES.has(re)){I.add(re),E=!1;continue}if(v.has(re))v.delete(re);else{U.add(re),E=!1;continue}switch(A.has(re)&&A.delete(re),re){case X.CONSUMER_NAME:if($.value.kind!=W.Kind.STRING||$.value.value.length<1){j.add(re),E=!1;continue}l=$.value.value;break;case X.STREAM_NAME:if($.value.kind!=W.Kind.STRING||$.value.value.length<1){j.add(re),E=!1;continue}d=$.value.value;break;case X.CONSUMER_INACTIVE_THRESHOLD:if($.value.kind!=W.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)($.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1;continue}try{c=parseInt($.value.value,10)}catch(ee){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)($.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return c<0?(c=QE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,rs.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${QE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>sfe.MAX_INT32&&(c=0,this.warnings.push((0,rs.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),M({fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_NATS,subjects:a,type:X.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.CHANNEL:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.CHANNEL));continue}(0,ai.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case X.CHANNELS:{if(c.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.CHANNELS));break}(0,ai.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(c.value.kind!==W.Kind.STRING||c.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===W.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===X.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],c;switch(a.name.value){case X.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case X.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case X.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(X.PUBLISH,a,n,r,o);break}case X.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(X.REQUEST,a,n,r,o);break}case X.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case X.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case X.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case W.OperationTypeNode.MUTATION:return new Set([X.EDFS_KAFKA_PUBLISH,X.EDFS_NATS_PUBLISH,X.EDFS_NATS_REQUEST,X.EDFS_REDIS_PUBLISH]);case W.OperationTypeNode.QUERY:return new Set([X.EDFS_NATS_REQUEST]);case W.OperationTypeNode.SUBSCRIPTION:return new Set([X.EDFS_KAFKA_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case X.MUTATION:return W.OperationTypeNode.MUTATION;case X.QUERY:return W.OperationTypeNode.QUERY;case X.SUBSCRIPTION:return W.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,p=new Set;for(let j of Np.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===W.OperationTypeNode.MUTATION){let j=(0,yi.printTypeNode)(l.type);j!==X.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,yi.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,je.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,c]of t){let l=`${c.originalParentTypeName}.${o}`;if(n.has(o)){(a=c.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(X.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==W.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==X.SUCCESS||(0,yi.printTypeNode)(r.type)!==X.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case X.CONSUMER_INACTIVE_THRESHOLD:{if((0,yi.printTypeNode)(r.type)!==X.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==W.Kind.INT||r.defaultValue.value!==`${QE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case X.CONSUMER_NAME:case X.STREAM_NAME:{if((0,yi.printTypeNode)(r.type)!==X.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===X.EDFS_PUBLISH_RESULT||p===X.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==W.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,c)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(X.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(X.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(X.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(uV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of uV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:X.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),c.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Tp.newConfigurationData)(!0,i)),o=(0,ai.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&X.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let p=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==X.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return Q(M({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let c=[i],l=new Map,d=-1,p=!0;if((0,W.visit)(o.documentNode,{Argument:{enter(){return W.BREAK}},Field:{enter(E){let I=c[d],v=I.name;if(p)return W.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return W.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let $=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&$&&$.isDefinedExternal&&!$.isUnconditionallyProvided&&i.extensionType!==ns.ExtensionType.NONE&&($.isUnconditionallyProvided=!0,(0,je.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let re=(0,cr.getTypeNodeNamedTypeName)(j.node.type);if(Br.BASE_SCALARS.has(re))return;let ee=a.parentDefinitionDataByTypeName.get(re);if(!ee)return W.BREAK;if(ee.kind===W.Kind.OBJECT_TYPE_DEFINITION){p=!0,c.push(ee);return}if((0,Dn.isKindAbstract)(ee.kind))return W.BREAK}},InlineFragment:{enter(){return W.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=c.length))return W.BREAK},leave(){p&&(p=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,rs.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Tp.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let c=this.validateProvidesOrRequires(r,n.requires,!1);c&&(a.requires=c)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(X.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,rs.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,je.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,oV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,oV.upsertParentsAndChildren)(this,t);let n=[];ll(this,YE,lV).call(this,n),this.validateDirectives(this.schemaData,X.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===W.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[c,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,c);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Br.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let c of this.invalidConfigureDescriptionNodeDatas)c.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(c.kind),c.name));this.evaluateExternalKeyFields();for(let[c,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case W.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(c));break}n.push(this.getEnumNodeByData(l));break}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(c));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==W.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,je.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;c!==X.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(c),p=this.operationTypeNodeByTypeName.get(c),E=l.kind===W.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===ns.ExtensionType.EXTENDS&&(l.extensionType=ns.ExtensionType.NONE),p&&(l.fieldDataByName.delete(X.SERVICE_FIELD),l.fieldDataByName.delete(X.ENTITIES_FIELD));let I=[];for(let[$,re]of l.fieldDataByName){if(!E&&((o=re.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push($),this.validateArguments(re,l.kind),re.namedTypeKind!==W.Kind.NULL)continue;let ee=this.parentDefinitionDataByTypeName.get(re.namedTypeName);if(ee){if(!(0,nn.isOutputNodeKind)(ee.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:re,namedTypeData:ee,nodeType:`${(0,je.kindToNodeType)(l.kind)} field`}));continue}re.namedTypeKind=this.entityInterfaceDataByTypeName.get(ee.name)?W.Kind.INTERFACE_TYPE_DEFINITION:ee.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(c,I)):this.warnings.push((0,rs.externalInterfaceFieldsWarning)(this.subgraphName,c,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,je.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Tp.newConfigurationData)(d,c)),U=this.entityInterfaceDataByTypeName.get(c);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let $=this.concreteTypeNamesByAbstractTypeName.get(c);$&&(0,je.addIterableToSet)({source:$,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,ai.isNodeQuery)(c,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,je.kindToNodeType)(l.kind),c)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case W.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===ns.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(c));break}n.push(this.getScalarNodeByData(l));break}case W.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(c)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let c of Object.values(W.OperationTypeNode)){let l=this.schemaData.operationTypes.get(c),d=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,c,X.OPERATION_TO_DEFAULT),p=l?(0,cr.getTypeNodeNamedTypeName)(l.type):d;if(Br.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(c,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,c)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,c,E.kind))}for(let c of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(c);if(!l){this.errors.push((0,se.undefinedTypeError)(c));continue}if(l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(c);(!d||d.size<1)&&this.warnings.push((0,rs.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,c))}let i=new Map;for(let c of this.directiveDefinitionByName.values()){let l=(0,Dn.extractExecutableDirectiveLocations)(c.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,c,l)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let c of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(c)):this.warnings.push((0,rs.invalidExternalFieldWarning)(c,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:W.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,W.print)(a),schema:(0,ife.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};hp=new WeakSet,nb=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,rs.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},YE=new WeakSet,lV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Br.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,je.addOptionalIterableToSet)({source:Np.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};Cc.NormalizationFactory=Ep;function ufe(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,c=new Set,l=new Map,d=new Set,p=new Set,E=[],I=new Set,v=new Map,A=[],U=[];for(let re of e)re.name&&(0,afe.recordSubgraphName)(re.name,d,p);let j=new rb.Graph;for(let re=0;re0&&A.push(...ue.warnings),!ue.success){U.push((0,se.subgraphValidationError)(me,ue.errors));continue}if(!ue){U.push((0,se.subgraphValidationError)(me,[se.subgraphValidationFailureError]));continue}l.set(me,ue.parentDefinitionDataByTypeName);for(let Ae of ue.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(t,Ae,I);for(let[Ae,xe]of ue.fieldCoordsByNamedTypeName)(0,je.addIterableToSet)({source:xe,target:(0,je.getValueOrDefault)(v,Ae,()=>new Set)});for(let[Ae,xe]of ue.concreteTypeNamesByAbstractTypeName){let Ze=n.get(Ae);if(!Ze){n.set(Ae,new Set(xe));continue}(0,je.addIterableToSet)({source:xe,target:Ze})}for(let[Ae,xe]of ue.entityDataByTypeName){let Ze=xe.keyFieldSetDatasBySubgraphName.get(me);Ze&&(0,Yn.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:Ze,typeName:Ae,subgraphName:me})}if(ee.name&&i.set(me,{conditionalFieldDataByCoordinates:ue.conditionalFieldDataByCoordinates,configurationDataByTypeName:ue.configurationDataByTypeName,definitions:ue.subgraphAST,directiveDefinitionByName:ue.directiveDefinitionByName,entityInterfaces:ue.entityInterfaces,isVersionTwo:ue.isVersionTwo,keyFieldNamesByParentTypeName:ue.keyFieldNamesByParentTypeName,name:me,operationTypes:ue.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:ue.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:ue.persistedDirectiveDefinitionDataByDirectiveName,schema:ue.schema,schemaNode:ue.schemaNode,url:ee.url}),!(ue.overridesByTargetSubgraphName.size<1))for(let[Ae,xe]of ue.overridesByTargetSubgraphName){let Ze=d.has(Ae);for(let[Z,_e]of xe){let vt=ue.originalTypeNameByRenamedTypeName.get(Z)||Z;if(!Ze)A.push((0,rs.invalidOverrideTargetSubgraphNameWarning)(Ae,vt,[..._e],ee.name));else{let rn=(0,je.getValueOrDefault)(a,Ae,()=>new Map),an=(0,je.getValueOrDefault)(rn,Z,()=>new Set(_e));(0,je.addIterableToSet)({source:_e,target:an})}for(let rn of _e){let an=`${vt}.${rn}`,wn=o.get(an);if(!wn){o.set(an,[me]);continue}wn.push(me),c.add(an)}}}}let $=[];if(I.size>0&&$.push((0,se.orScopesLimitError)(Br.MAX_OR_SCOPES,[...I])),(E.length>0||p.size>0)&&$.push((0,se.invalidSubgraphNamesError)([...p],E)),c.size>0){let re=[];for(let ee of c){let me=(0,je.getOrThrowError)(o,ee,"overrideSourceSubgraphNamesByFieldPath");re.push((0,se.duplicateOverriddenFieldErrorMessage)(ee,me))}$.push((0,se.duplicateOverriddenFieldsError)(re))}if($.push(...U),$.length>0)return{errors:$,success:!1,warnings:A};for(let[re,ee]of a){let me=(0,je.getOrThrowError)(i,re,"internalSubgraphBySubgraphName");me.overriddenFieldNamesByParentTypeName=ee;for(let[ue,Ae]of ee){let xe=me.configurationDataByTypeName.get(ue);xe&&((0,Yn.subtractSet)(Ae,xe.fieldNames),xe.fieldNames.size<1&&me.configurationDataByTypeName.delete(ue))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:j,success:!0,warnings:A}}});var JE=w(kc=>{"use strict";m();T();N();Object.defineProperty(kc,"__esModule",{value:!0});kc.DivergentType=void 0;kc.getLeastRestrictiveMergedTypeNode=lfe;kc.getMostRestrictiveMergedTypeNode=dfe;kc.renameNamedTypeName=ffe;var Bc=Oe(),fV=qi(),cfe=gu(),dV=Pr(),pV=Ll(),Uc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(Uc||(kc.DivergentType=Uc={}));function mV(e,t,n,r,i){t=(0,cfe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=Uc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(sb,"__esModule",{value:!0});sb.renameRootTypes=Nfe;var pfe=Oe(),ab=Pr(),mfe=JE(),Fu=zn(),Mc=Fr();function Nfe(e,t){let n,r=!1,i;(0,pfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Fu.SERVICE_FIELD||o===Fu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,Mc.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,Mc.getOrThrowError)(ab.operationTypeNodeToDefaultType,d,Fu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,mfe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,Mc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,Mc.getOrThrowError)(ab.operationTypeNodeToDefaultType,c,Fu.OPERATION_TO_DEFAULT):o;n=(0,Mc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,Mc.getOrThrowError)(ab.operationTypeNodeToDefaultType,c,Fu.OPERATION_TO_DEFAULT):o;n=(0,Mc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var NV=w((ld,yp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",c=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,$=8,re=16,ee=32,me=64,ue=128,Ae=256,xe=512,Ze=30,Z="...",_e=800,vt=16,rn=1,an=2,wn=3,$t=1/0,Tn=9007199254740991,Ur=17976931348623157e292,lr=NaN,gn=4294967295,Ht=gn-1,Ln=gn>>>1,ae=[["ary",ue],["bind",A],["bindKey",U],["curry",$],["curryRight",re],["flip",xe],["partial",ee],["partialRight",me],["rearg",Ae]],De="[object Arguments]",Ie="[object Array]",Ce="[object AsyncFunction]",St="[object Boolean]",Y="[object Date]",ie="[object DOMException]",qe="[object Error]",He="[object Function]",Bt="[object GeneratorFunction]",it="[object Map]",Pt="[object Number]",us="[object Null]",Qr="[object Object]",cs="[object Promise]",zc="[object Proxy]",Pa="[object RegExp]",yr="[object Set]",si="[object String]",xt="[object Symbol]",Ir="[object Undefined]",Uu="[object WeakMap]",Fa="[object WeakSet]",ku="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",ce="[object Uint8Array]",Tt="[object Uint8ClampedArray]",En="[object Uint16Array]",un="[object Uint32Array]",_n=/\b__p \+= '';/g,sn=/\b(__p \+=) '' \+/g,zj=/(__e\(.*?\)|\b__t\)) \+\n'';/g,c0=/&(?:amp|lt|gt|quot|#39);/g,l0=/[&<>"']/g,Wj=RegExp(c0.source),Xj=RegExp(l0.source),Zj=/<%-([\s\S]+?)%>/g,eK=/<%([\s\S]+?)%>/g,d0=/<%=([\s\S]+?)%>/g,tK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nK=/^\w*$/,rK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ah=/[\\^$.*+?()[\]{}|]/g,iK=RegExp(Ah.source),Rh=/^\s+/,aK=/\s/,sK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oK=/\{\n\/\* \[wrapped with (.+)\] \*/,uK=/,? & /,cK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lK=/[()=,{}\[\]\/\s]/,dK=/\\(\\)?/g,fK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,f0=/\w*$/,pK=/^[-+]0x[0-9a-f]+$/i,mK=/^0b[01]+$/i,NK=/^\[object .+?Constructor\]$/,TK=/^0o[0-7]+$/i,EK=/^(?:0|[1-9]\d*)$/,hK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$p=/($^)/,yK=/['\n\r\u2028\u2029\\]/g,Qp="\\ud800-\\udfff",IK="\\u0300-\\u036f",gK="\\ufe20-\\ufe2f",_K="\\u20d0-\\u20ff",p0=IK+gK+_K,m0="\\u2700-\\u27bf",N0="a-z\\xdf-\\xf6\\xf8-\\xff",vK="\\xac\\xb1\\xd7\\xf7",OK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",SK="\\u2000-\\u206f",DK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",T0="A-Z\\xc0-\\xd6\\xd8-\\xde",E0="\\ufe0e\\ufe0f",h0=vK+OK+SK+DK,Ph="['\u2019]",bK="["+Qp+"]",y0="["+h0+"]",Yp="["+p0+"]",I0="\\d+",AK="["+m0+"]",g0="["+N0+"]",_0="[^"+Qp+h0+I0+m0+N0+T0+"]",Fh="\\ud83c[\\udffb-\\udfff]",RK="(?:"+Yp+"|"+Fh+")",v0="[^"+Qp+"]",wh="(?:\\ud83c[\\udde6-\\uddff]){2}",Lh="[\\ud800-\\udbff][\\udc00-\\udfff]",Wc="["+T0+"]",O0="\\u200d",S0="(?:"+g0+"|"+_0+")",PK="(?:"+Wc+"|"+_0+")",D0="(?:"+Ph+"(?:d|ll|m|re|s|t|ve))?",b0="(?:"+Ph+"(?:D|LL|M|RE|S|T|VE))?",A0=RK+"?",R0="["+E0+"]?",FK="(?:"+O0+"(?:"+[v0,wh,Lh].join("|")+")"+R0+A0+")*",wK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",LK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",P0=R0+A0+FK,CK="(?:"+[AK,wh,Lh].join("|")+")"+P0,BK="(?:"+[v0+Yp+"?",Yp,wh,Lh,bK].join("|")+")",UK=RegExp(Ph,"g"),kK=RegExp(Yp,"g"),Ch=RegExp(Fh+"(?="+Fh+")|"+BK+P0,"g"),MK=RegExp([Wc+"?"+g0+"+"+D0+"(?="+[y0,Wc,"$"].join("|")+")",PK+"+"+b0+"(?="+[y0,Wc+S0,"$"].join("|")+")",Wc+"?"+S0+"+"+D0,Wc+"+"+b0,LK,wK,I0,CK].join("|"),"g"),xK=RegExp("["+O0+Qp+p0+E0+"]"),qK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,VK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jK=-1,yn={};yn[y]=yn[_]=yn[B]=yn[K]=yn[te]=yn[ce]=yn[Tt]=yn[En]=yn[un]=!0,yn[De]=yn[Ie]=yn[ku]=yn[St]=yn[P]=yn[Y]=yn[qe]=yn[He]=yn[it]=yn[Pt]=yn[Qr]=yn[Pa]=yn[yr]=yn[si]=yn[Uu]=!1;var hn={};hn[De]=hn[Ie]=hn[ku]=hn[P]=hn[St]=hn[Y]=hn[y]=hn[_]=hn[B]=hn[K]=hn[te]=hn[it]=hn[Pt]=hn[Qr]=hn[Pa]=hn[yr]=hn[si]=hn[xt]=hn[ce]=hn[Tt]=hn[En]=hn[un]=!0,hn[qe]=hn[He]=hn[Uu]=!1;var KK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},GK={"&":"&","<":"<",">":">",'"':""","'":"'"},$K={"&":"&","<":"<",">":">",""":'"',"'":"'"},QK={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},YK=parseFloat,JK=parseInt,F0=typeof global=="object"&&global&&global.Object===Object&&global,HK=typeof self=="object"&&self&&self.Object===Object&&self,dr=F0||HK||Function("return this")(),Bh=typeof ld=="object"&&ld&&!ld.nodeType&&ld,Mu=Bh&&typeof yp=="object"&&yp&&!yp.nodeType&&yp,w0=Mu&&Mu.exports===Bh,Uh=w0&&F0.process,Ii=function(){try{var G=Mu&&Mu.require&&Mu.require("util").types;return G||Uh&&Uh.binding&&Uh.binding("util")}catch(oe){}}(),L0=Ii&&Ii.isArrayBuffer,C0=Ii&&Ii.isDate,B0=Ii&&Ii.isMap,U0=Ii&&Ii.isRegExp,k0=Ii&&Ii.isSet,M0=Ii&&Ii.isTypedArray;function oi(G,oe,ne){switch(ne.length){case 0:return G.call(oe);case 1:return G.call(oe,ne[0]);case 2:return G.call(oe,ne[0],ne[1]);case 3:return G.call(oe,ne[0],ne[1],ne[2])}return G.apply(oe,ne)}function zK(G,oe,ne,Be){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function kh(G,oe,ne){for(var Be=-1,dt=G==null?0:G.length;++Be-1;);return ne}function Q0(G,oe){for(var ne=G.length;ne--&&Xc(oe,G[ne],0)>-1;);return ne}function aG(G,oe){for(var ne=G.length,Be=0;ne--;)G[ne]===oe&&++Be;return Be}var sG=Vh(KK),oG=Vh(GK);function uG(G){return"\\"+QK[G]}function cG(G,oe){return G==null?e:G[oe]}function Zc(G){return xK.test(G)}function lG(G){return qK.test(G)}function dG(G){for(var oe,ne=[];!(oe=G.next()).done;)ne.push(oe.value);return ne}function $h(G){var oe=-1,ne=Array(G.size);return G.forEach(function(Be,dt){ne[++oe]=[dt,Be]}),ne}function Y0(G,oe){return function(ne){return G(oe(ne))}}function eu(G,oe){for(var ne=-1,Be=G.length,dt=0,Qt=[];++ne-1}function XG(s,u){var f=this.__data__,h=dm(f,s);return h<0?(++this.size,f.push([s,u])):f[h][1]=u,this}ls.prototype.clear=JG,ls.prototype.delete=HG,ls.prototype.get=zG,ls.prototype.has=WG,ls.prototype.set=XG;function ds(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function Oi(s,u,f,h,O,L){var k,V=u&d,J=u&p,le=u&E;if(f&&(k=O?f(s,h,O,L):f(s)),k!==e)return k;if(!bn(s))return s;var de=ft(s);if(de){if(k=nQ(s),!V)return Yr(s,k)}else{var Te=Sr(s),be=Te==He||Te==Bt;if(ou(s))return RA(s,V);if(Te==Qr||Te==De||be&&!O){if(k=J||be?{}:JA(s),!V)return J?$$(s,m$(k,s)):G$(s,aA(k,s))}else{if(!hn[Te])return O?s:{};k=rQ(s,Te,V)}}L||(L=new ra);var $e=L.get(s);if($e)return $e;L.set(s,k),vR(s)?s.forEach(function(tt){k.add(Oi(tt,u,f,tt,s,L))}):gR(s)&&s.forEach(function(tt,Dt){k.set(Dt,Oi(tt,u,f,Dt,s,L))});var et=le?J?Ey:Ty:J?Hr:fr,yt=de?e:et(s);return gi(yt||s,function(tt,Dt){yt&&(Dt=tt,tt=s[Dt]),Ad(k,Dt,Oi(tt,u,f,Dt,s,L))}),k}function N$(s){var u=fr(s);return function(f){return sA(f,s,u)}}function sA(s,u,f){var h=f.length;if(s==null)return!h;for(s=mn(s);h--;){var O=f[h],L=u[O],k=s[O];if(k===e&&!(O in s)||!L(k))return!1}return!0}function oA(s,u,f){if(typeof s!="function")throw new _i(i);return Bd(function(){s.apply(e,f)},u)}function Rd(s,u,f,h){var O=-1,L=Jp,k=!0,V=s.length,J=[],le=u.length;if(!V)return J;f&&(u=vn(u,ui(f))),h?(L=kh,k=!1):u.length>=n&&(L=_d,k=!1,u=new Vu(u));e:for(;++OO?0:O+f),h=h===e||h>O?O:Et(h),h<0&&(h+=O),h=f>h?0:SR(h);f0&&f(V)?u>1?gr(V,u-1,f,h,O):Zo(O,V):h||(O[O.length]=V)}return O}var Xh=BA(),lA=BA(!0);function wa(s,u){return s&&Xh(s,u,fr)}function Zh(s,u){return s&&lA(s,u,fr)}function pm(s,u){return Xo(u,function(f){return Ts(s[f])})}function Ku(s,u){u=au(u,s);for(var f=0,h=u.length;s!=null&&fu}function h$(s,u){return s!=null&&on.call(s,u)}function y$(s,u){return s!=null&&u in mn(s)}function I$(s,u,f){return s>=Or(u,f)&&s=120&&de.length>=120)?new Vu(k&&de):e}de=s[0];var Te=-1,be=V[0];e:for(;++Te-1;)V!==s&&im.call(V,J,1),im.call(s,J,1);return s}function gA(s,u){for(var f=s?u.length:0,h=f-1;f--;){var O=u[f];if(f==h||O!==L){var L=O;Ns(O)?im.call(s,O,1):cy(s,O)}}return s}function sy(s,u){return s+om(tA()*(u-s+1))}function L$(s,u,f,h){for(var O=-1,L=rr(sm((u-s)/(f||1)),0),k=ne(L);L--;)k[h?L:++O]=s,s+=f;return k}function oy(s,u){var f="";if(!s||u<1||u>Tn)return f;do u%2&&(f+=s),u=om(u/2),u&&(s+=s);while(u);return f}function gt(s,u){return Oy(WA(s,u,zr),s+"")}function C$(s){return iA(cl(s))}function B$(s,u){var f=cl(s);return Om(f,ju(u,0,f.length))}function wd(s,u,f,h){if(!bn(s))return s;u=au(u,s);for(var O=-1,L=u.length,k=L-1,V=s;V!=null&&++OO?0:O+u),f=f>O?O:f,f<0&&(f+=O),O=u>f?0:f-u>>>0,u>>>=0;for(var L=ne(O);++h>>1,k=s[L];k!==null&&!li(k)&&(f?k<=u:k=n){var le=u?null:H$(s);if(le)return zp(le);k=!1,O=_d,J=new Vu}else J=u?[]:V;e:for(;++h=h?s:Si(s,u,f)}var AA=DG||function(s){return dr.clearTimeout(s)};function RA(s,u){if(u)return s.slice();var f=s.length,h=z0?z0(f):new s.constructor(f);return s.copy(h),h}function py(s){var u=new s.constructor(s.byteLength);return new nm(u).set(new nm(s)),u}function q$(s,u){var f=u?py(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function V$(s){var u=new s.constructor(s.source,f0.exec(s));return u.lastIndex=s.lastIndex,u}function j$(s){return bd?mn(bd.call(s)):{}}function PA(s,u){var f=u?py(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function FA(s,u){if(s!==u){var f=s!==e,h=s===null,O=s===s,L=li(s),k=u!==e,V=u===null,J=u===u,le=li(u);if(!V&&!le&&!L&&s>u||L&&k&&J&&!V&&!le||h&&k&&J||!f&&J||!O)return 1;if(!h&&!L&&!le&&s=V)return J;var le=f[h];return J*(le=="desc"?-1:1)}}return s.index-u.index}function wA(s,u,f,h){for(var O=-1,L=s.length,k=f.length,V=-1,J=u.length,le=rr(L-k,0),de=ne(J+le),Te=!h;++V1?f[O-1]:e,k=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,k&&Mr(f[0],f[1],k)&&(L=O<3?e:L,O=1),u=mn(u);++h-1?O[L?u[k]:k]:e}}function MA(s){return ms(function(u){var f=u.length,h=f,O=vi.prototype.thru;for(s&&u.reverse();h--;){var L=u[h];if(typeof L!="function")throw new _i(i);if(O&&!k&&_m(L)=="wrapper")var k=new vi([],!0)}for(h=k?h:f;++h1&&Ft.reverse(),de&&JV))return!1;var le=L.get(s),de=L.get(u);if(le&&de)return le==u&&de==s;var Te=-1,be=!0,$e=f&v?new Vu:e;for(L.set(s,u),L.set(u,s);++Te1?"& ":"")+u[h],u=u.join(f>2?", ":" "),s.replace(sK,`{ /* [wrapped with `+u+`] */ -`)}function rQ(s){return ft(s)||$u(s)||!!(W0&&s&&s[W0])}function Ns(s,u){var f=typeof s;return u=u==null?Tn:u,!!u&&(f=="number"||f!="symbol"&&NK.test(s))&&s>-1&&s%1==0&&s0){if(++u>=_e)return arguments[0]}else u=0;return s.apply(e,arguments)}}function _m(s,u){var f=-1,h=s.length,O=h-1;for(u=u===e?h:u;++f1?s[u-1]:e;return f=typeof f=="function"?(s.pop(),f):e,oR(s,f)});function uR(s){var u=F(s);return u.__chain__=!0,u}function mY(s,u){return u(s),s}function vm(s,u){return u(s)}var NY=ms(function(s){var u=s.length,f=u?s[0]:0,h=this.__wrapped__,O=function(L){return zh(L,s)};return u>1||this.__actions__.length||!(h instanceof bt)||!Ns(f)?this.thru(O):(h=h.slice(f,+f+(u?1:0)),h.__actions__.push({func:vm,args:[O],thisArg:e}),new vi(h,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function TY(){return uR(this)}function EY(){return new vi(this.value(),this.__chain__)}function hY(){this.__values__===e&&(this.__values__=_R(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function yY(){return this}function IY(s){for(var u,f=this;f instanceof um;){var h=tR(f);h.__index__=0,h.__values__=e,u?O.__wrapped__=h:u=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,u}function gY(){var s=this.__wrapped__;if(s instanceof bt){var u=s;return this.__actions__.length&&(u=new bt(this)),u=u.reverse(),u.__actions__.push({func:vm,args:[Oy],thisArg:e}),new vi(u,this.__chain__)}return this.thru(Oy)}function _Y(){return OA(this.__wrapped__,this.__actions__)}var vY=Nm(function(s,u,f){on.call(s,f)?++s[f]:fs(s,f,1)});function OY(s,u,f){var h=ft(s)?k0:m$;return f&&Mr(s,u,f)&&(u=e),h(s,We(u,3))}function SY(s,u){var f=ft(s)?Wo:oA;return f(s,We(u,3))}var DY=BA(nR),bY=BA(rR);function AY(s,u){return gr(Om(s,u),1)}function RY(s,u){return gr(Om(s,u),$t)}function PY(s,u,f){return f=f===e?1:Et(f),gr(Om(s,u),f)}function cR(s,u){var f=ft(s)?gi:nu;return f(s,We(u,3))}function lR(s,u){var f=ft(s)?HK:sA;return f(s,We(u,3))}var FY=Nm(function(s,u,f){on.call(s,f)?s[f].push(u):fs(s,f,[u])});function wY(s,u,f,h){s=Jr(s)?s:ul(s),f=f&&!h?Et(f):0;var O=s.length;return f<0&&(f=rr(O+f,0)),Rm(s)?f<=O&&s.indexOf(u,f)>-1:!!O&&Wc(s,u,f)>-1}var LY=gt(function(s,u,f){var h=-1,O=typeof u=="function",L=Jr(s)?ne(s.length):[];return nu(s,function(k){L[++h]=O?oi(u,k,f):Rd(k,u,f)}),L}),CY=Nm(function(s,u,f){fs(s,f,u)});function Om(s,u){var f=ft(s)?vn:pA;return f(s,We(u,3))}function BY(s,u,f,h){return s==null?[]:(ft(u)||(u=u==null?[]:[u]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),EA(s,u,f))}var UY=Nm(function(s,u,f){s[f?0:1].push(u)},function(){return[[],[]]});function kY(s,u,f){var h=ft(s)?kh:V0,O=arguments.length<3;return h(s,We(u,4),f,O,nu)}function MY(s,u,f){var h=ft(s)?zK:V0,O=arguments.length<3;return h(s,We(u,4),f,O,sA)}function xY(s,u){var f=ft(s)?Wo:oA;return f(s,bm(We(u,3)))}function qY(s){var u=ft(s)?nA:w$;return u(s)}function VY(s,u,f){(f?Mr(s,u,f):u===e)?u=1:u=Et(u);var h=ft(s)?c$:L$;return h(s,u)}function jY(s){var u=ft(s)?l$:B$;return u(s)}function KY(s){if(s==null)return 0;if(Jr(s))return Rm(s)?Zc(s):s.length;var u=Sr(s);return u==it||u==yr?s.size:ny(s).length}function GY(s,u,f){var h=ft(s)?Mh:U$;return f&&Mr(s,u,f)&&(u=e),h(s,We(u,3))}var $Y=gt(function(s,u){if(s==null)return[];var f=u.length;return f>1&&Mr(s,u[0],u[1])?u=[]:f>2&&Mr(u[0],u[1],u[2])&&(u=[u[0]]),EA(s,gr(u,1),[])}),Sm=SG||function(){return dr.Date.now()};function QY(s,u){if(typeof u!="function")throw new _i(i);return s=Et(s),function(){if(--s<1)return u.apply(this,arguments)}}function dR(s,u,f){return u=f?e:u,u=s&&u==null?s.length:u,ps(s,ue,e,e,e,e,u)}function fR(s,u){var f;if(typeof u!="function")throw new _i(i);return s=Et(s),function(){return--s>0&&(f=u.apply(this,arguments)),s<=1&&(u=e),f}}var Dy=gt(function(s,u,f){var h=A;if(f.length){var O=Zo(f,sl(Dy));h|=ee}return ps(s,h,u,f,O)}),pR=gt(function(s,u,f){var h=A|U;if(f.length){var O=Zo(f,sl(pR));h|=ee}return ps(u,h,s,f,O)});function mR(s,u,f){u=f?e:u;var h=ps(s,$,e,e,e,e,e,u);return h.placeholder=mR.placeholder,h}function NR(s,u,f){u=f?e:u;var h=ps(s,re,e,e,e,e,e,u);return h.placeholder=NR.placeholder,h}function TR(s,u,f){var h,O,L,k,V,J,le=0,de=!1,Te=!1,be=!0;if(typeof s!="function")throw new _i(i);u=bi(u)||0,bn(f)&&(de=!!f.leading,Te="maxWait"in f,L=Te?rr(bi(f.maxWait)||0,u):L,be="trailing"in f?!!f.trailing:be);function $e(Vn){var aa=h,hs=O;return h=O=e,le=Vn,k=s.apply(hs,aa),k}function et(Vn){return le=Vn,V=Cd(Dt,u),de?$e(Vn):k}function yt(Vn){var aa=Vn-J,hs=Vn-le,BR=u-aa;return Te?Or(BR,L-hs):BR}function tt(Vn){var aa=Vn-J,hs=Vn-le;return J===e||aa>=u||aa<0||Te&&hs>=L}function Dt(){var Vn=Sm();if(tt(Vn))return Ft(Vn);V=Cd(Dt,yt(Vn))}function Ft(Vn){return V=e,be&&h?$e(Vn):(h=O=e,k)}function di(){V!==e&&DA(V),le=0,h=J=O=V=e}function xr(){return V===e?k:Ft(Sm())}function fi(){var Vn=Sm(),aa=tt(Vn);if(h=arguments,O=this,J=Vn,aa){if(V===e)return et(J);if(Te)return DA(V),V=Cd(Dt,u),$e(J)}return V===e&&(V=Cd(Dt,u)),k}return fi.cancel=di,fi.flush=xr,fi}var YY=gt(function(s,u){return aA(s,1,u)}),JY=gt(function(s,u,f){return aA(s,bi(u)||0,f)});function HY(s){return ps(s,xe)}function Dm(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new _i(i);var f=function(){var h=arguments,O=u?u.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var k=s.apply(this,h);return f.cache=L.set(O,k)||L,k};return f.cache=new(Dm.Cache||ds),f}Dm.Cache=ds;function bm(s){if(typeof s!="function")throw new _i(i);return function(){var u=arguments;switch(u.length){case 0:return!s.call(this);case 1:return!s.call(this,u[0]);case 2:return!s.call(this,u[0],u[1]);case 3:return!s.call(this,u[0],u[1],u[2])}return!s.apply(this,u)}}function zY(s){return fR(2,s)}var WY=k$(function(s,u){u=u.length==1&&ft(u[0])?vn(u[0],ui(We())):vn(gr(u,1),ui(We()));var f=u.length;return gt(function(h){for(var O=-1,L=Or(h.length,f);++O=u}),$u=lA(function(){return arguments}())?lA:function(s){return Cn(s)&&on.call(s,"callee")&&!z0.call(s,"callee")},ft=ne.isArray,f2=F0?ui(F0):I$;function Jr(s){return s!=null&&Am(s.length)&&!Ts(s)}function qn(s){return Cn(s)&&Jr(s)}function p2(s){return s===!0||s===!1||Cn(s)&&kr(s)==St}var su=bG||My,m2=w0?ui(w0):g$;function N2(s){return Cn(s)&&s.nodeType===1&&!Bd(s)}function T2(s){if(s==null)return!0;if(Jr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||su(s)||ol(s)||$u(s)))return!s.length;var u=Sr(s);if(u==it||u==yr)return!s.size;if(Ld(s))return!ny(s).length;for(var f in s)if(on.call(s,f))return!1;return!0}function E2(s,u){return Pd(s,u)}function h2(s,u,f){f=typeof f=="function"?f:e;var h=f?f(s,u):e;return h===e?Pd(s,u,e,f):!!h}function Ay(s){if(!Cn(s))return!1;var u=kr(s);return u==qe||u==ie||typeof s.message=="string"&&typeof s.name=="string"&&!Bd(s)}function y2(s){return typeof s=="number"&&X0(s)}function Ts(s){if(!bn(s))return!1;var u=kr(s);return u==He||u==Bt||u==Ce||u==Hc}function hR(s){return typeof s=="number"&&s==Et(s)}function Am(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Tn}function bn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Cn(s){return s!=null&&typeof s=="object"}var yR=L0?ui(L0):v$;function I2(s,u){return s===u||ty(s,u,hy(u))}function g2(s,u,f){return f=typeof f=="function"?f:e,ty(s,u,hy(u),f)}function _2(s){return IR(s)&&s!=+s}function v2(s){if(sQ(s))throw new dt(r);return dA(s)}function O2(s){return s===null}function S2(s){return s==null}function IR(s){return typeof s=="number"||Cn(s)&&kr(s)==Pt}function Bd(s){if(!Cn(s)||kr(s)!=Qr)return!1;var u=tm(s);if(u===null)return!0;var f=on.call(u,"constructor")&&u.constructor;return typeof f=="function"&&f instanceof f&&Wp.call(f)==gG}var Ry=C0?ui(C0):O$;function D2(s){return hR(s)&&s>=-Tn&&s<=Tn}var gR=B0?ui(B0):S$;function Rm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&kr(s)==si}function li(s){return typeof s=="symbol"||Cn(s)&&kr(s)==xt}var ol=U0?ui(U0):D$;function b2(s){return s===e}function A2(s){return Cn(s)&&Sr(s)==Bu}function R2(s){return Cn(s)&&kr(s)==Fa}var P2=ym(ry),F2=ym(function(s,u){return s<=u});function _R(s){if(!s)return[];if(Jr(s))return Rm(s)?na(s):Yr(s);if(_d&&s[_d])return cG(s[_d]());var u=Sr(s),f=u==it?Gh:u==yr?Jp:ul;return f(s)}function Es(s){if(!s)return s===0?s:0;if(s=bi(s),s===$t||s===-$t){var u=s<0?-1:1;return u*Ur}return s===s?s:0}function Et(s){var u=Es(s),f=u%1;return u===u?f?u-f:u:0}function vR(s){return s?Vu(Et(s),0,gn):0}function bi(s){if(typeof s=="number")return s;if(li(s))return lr;if(bn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=bn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=j0(s);var f=fK.test(s);return f||mK.test(s)?QK(s.slice(2),f?2:8):dK.test(s)?lr:+s}function OR(s){return La(s,Hr(s))}function w2(s){return s?Vu(Et(s),-Tn,Tn):s===0?s:0}function zt(s){return s==null?"":ci(s)}var L2=il(function(s,u){if(Ld(u)||Jr(u)){La(u,fr(u),s);return}for(var f in u)on.call(u,f)&&bd(s,f,u[f])}),SR=il(function(s,u){La(u,Hr(u),s)}),Pm=il(function(s,u,f,h){La(u,Hr(u),s,h)}),C2=il(function(s,u,f,h){La(u,fr(u),s,h)}),B2=ms(zh);function U2(s,u){var f=rl(s);return u==null?f:rA(f,u)}var k2=gt(function(s,u){s=mn(s);var f=-1,h=u.length,O=h>2?u[2]:e;for(O&&Mr(u[0],u[1],O)&&(h=1);++f1),L}),La(s,Ty(s),f),h&&(f=Oi(f,d|p|E,J$));for(var O=u.length;O--;)uy(f,u[O]);return f});function tJ(s,u){return bR(s,bm(We(u)))}var nJ=ms(function(s,u){return s==null?{}:R$(s,u)});function bR(s,u){if(s==null)return{};var f=vn(Ty(s),function(h){return[h]});return u=We(u),hA(s,f,function(h,O){return u(h,O[0])})}function rJ(s,u,f){u=iu(u,s);var h=-1,O=u.length;for(O||(O=1,s=e);++hu){var h=s;s=u,u=h}if(f||s%1||u%1){var O=Z0();return Or(s+O*(u-s+$K("1e-"+((O+"").length-1))),u)}return ay(s,u)}var mJ=al(function(s,u,f){return u=u.toLowerCase(),s+(f?PR(u):u)});function PR(s){return wy(zt(s).toLowerCase())}function FR(s){return s=zt(s),s&&s.replace(TK,iG).replace(BK,"")}function NJ(s,u,f){s=zt(s),u=ci(u);var h=s.length;f=f===e?h:Vu(Et(f),0,h);var O=f;return f-=u.length,f>=0&&s.slice(f,O)==u}function TJ(s){return s=zt(s),s&&zj.test(s)?s.replace(u0,aG):s}function EJ(s){return s=zt(s),s&&nK.test(s)?s.replace(bh,"\\$&"):s}var hJ=al(function(s,u,f){return s+(f?"-":"")+u.toLowerCase()}),yJ=al(function(s,u,f){return s+(f?" ":"")+u.toLowerCase()}),IJ=CA("toLowerCase");function gJ(s,u,f){s=zt(s),u=Et(u);var h=u?Zc(s):0;if(!u||h>=u)return s;var O=(u-h)/2;return hm(am(O),f)+s+hm(im(O),f)}function _J(s,u,f){s=zt(s),u=Et(u);var h=u?Zc(s):0;return u&&h>>0,f?(s=zt(s),s&&(typeof u=="string"||u!=null&&!Ry(u))&&(u=ci(u),!u&&Xc(s))?au(na(s),0,f):s.split(u,f)):[]}var RJ=al(function(s,u,f){return s+(f?" ":"")+wy(u)});function PJ(s,u,f){return s=zt(s),f=f==null?0:Vu(Et(f),0,s.length),u=ci(u),s.slice(f,f+u.length)==u}function FJ(s,u,f){var h=F.templateSettings;f&&Mr(s,u,f)&&(u=e),s=zt(s),u=Pm({},u,h,VA);var O=Pm({},u.imports,h.imports,VA),L=fr(O),k=Kh(O,L),V,J,le=0,de=u.interpolate||Kp,Te="__p += '",be=$h((u.escape||Kp).source+"|"+de.source+"|"+(de===c0?lK:Kp).source+"|"+(u.evaluate||Kp).source+"|$","g"),$e="//# sourceURL="+(on.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qK+"]")+` -`;s.replace(be,function(tt,Dt,Ft,di,xr,fi){return Ft||(Ft=di),Te+=s.slice(le,fi).replace(EK,sG),Dt&&(V=!0,Te+=`' + +`)}function aQ(s){return ft(s)||Qu(s)||!!(Z0&&s&&s[Z0])}function Ns(s,u){var f=typeof s;return u=u==null?Tn:u,!!u&&(f=="number"||f!="symbol"&&EK.test(s))&&s>-1&&s%1==0&&s0){if(++u>=_e)return arguments[0]}else u=0;return s.apply(e,arguments)}}function Om(s,u){var f=-1,h=s.length,O=h-1;for(u=u===e?h:u;++f1?s[u-1]:e;return f=typeof f=="function"?(s.pop(),f):e,cR(s,f)});function lR(s){var u=F(s);return u.__chain__=!0,u}function TY(s,u){return u(s),s}function Sm(s,u){return u(s)}var EY=ms(function(s){var u=s.length,f=u?s[0]:0,h=this.__wrapped__,O=function(L){return Wh(L,s)};return u>1||this.__actions__.length||!(h instanceof bt)||!Ns(f)?this.thru(O):(h=h.slice(f,+f+(u?1:0)),h.__actions__.push({func:Sm,args:[O],thisArg:e}),new vi(h,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function hY(){return lR(this)}function yY(){return new vi(this.value(),this.__chain__)}function IY(){this.__values__===e&&(this.__values__=OR(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function gY(){return this}function _Y(s){for(var u,f=this;f instanceof lm;){var h=rR(f);h.__index__=0,h.__values__=e,u?O.__wrapped__=h:u=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,u}function vY(){var s=this.__wrapped__;if(s instanceof bt){var u=s;return this.__actions__.length&&(u=new bt(this)),u=u.reverse(),u.__actions__.push({func:Sm,args:[Sy],thisArg:e}),new vi(u,this.__chain__)}return this.thru(Sy)}function OY(){return DA(this.__wrapped__,this.__actions__)}var SY=Em(function(s,u,f){on.call(s,f)?++s[f]:fs(s,f,1)});function DY(s,u,f){var h=ft(s)?x0:T$;return f&&Mr(s,u,f)&&(u=e),h(s,We(u,3))}function bY(s,u){var f=ft(s)?Xo:cA;return f(s,We(u,3))}var AY=kA(iR),RY=kA(aR);function PY(s,u){return gr(Dm(s,u),1)}function FY(s,u){return gr(Dm(s,u),$t)}function wY(s,u,f){return f=f===e?1:Et(f),gr(Dm(s,u),f)}function dR(s,u){var f=ft(s)?gi:ru;return f(s,We(u,3))}function fR(s,u){var f=ft(s)?WK:uA;return f(s,We(u,3))}var LY=Em(function(s,u,f){on.call(s,f)?s[f].push(u):fs(s,f,[u])});function CY(s,u,f,h){s=Jr(s)?s:cl(s),f=f&&!h?Et(f):0;var O=s.length;return f<0&&(f=rr(O+f,0)),Fm(s)?f<=O&&s.indexOf(u,f)>-1:!!O&&Xc(s,u,f)>-1}var BY=gt(function(s,u,f){var h=-1,O=typeof u=="function",L=Jr(s)?ne(s.length):[];return ru(s,function(k){L[++h]=O?oi(u,k,f):Pd(k,u,f)}),L}),UY=Em(function(s,u,f){fs(s,f,u)});function Dm(s,u){var f=ft(s)?vn:NA;return f(s,We(u,3))}function kY(s,u,f,h){return s==null?[]:(ft(u)||(u=u==null?[]:[u]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),yA(s,u,f))}var MY=Em(function(s,u,f){s[f?0:1].push(u)},function(){return[[],[]]});function xY(s,u,f){var h=ft(s)?Mh:K0,O=arguments.length<3;return h(s,We(u,4),f,O,ru)}function qY(s,u,f){var h=ft(s)?XK:K0,O=arguments.length<3;return h(s,We(u,4),f,O,uA)}function VY(s,u){var f=ft(s)?Xo:cA;return f(s,Rm(We(u,3)))}function jY(s){var u=ft(s)?iA:C$;return u(s)}function KY(s,u,f){(f?Mr(s,u,f):u===e)?u=1:u=Et(u);var h=ft(s)?d$:B$;return h(s,u)}function GY(s){var u=ft(s)?f$:k$;return u(s)}function $Y(s){if(s==null)return 0;if(Jr(s))return Fm(s)?el(s):s.length;var u=Sr(s);return u==it||u==yr?s.size:ry(s).length}function QY(s,u,f){var h=ft(s)?xh:M$;return f&&Mr(s,u,f)&&(u=e),h(s,We(u,3))}var YY=gt(function(s,u){if(s==null)return[];var f=u.length;return f>1&&Mr(s,u[0],u[1])?u=[]:f>2&&Mr(u[0],u[1],u[2])&&(u=[u[0]]),yA(s,gr(u,1),[])}),bm=bG||function(){return dr.Date.now()};function JY(s,u){if(typeof u!="function")throw new _i(i);return s=Et(s),function(){if(--s<1)return u.apply(this,arguments)}}function pR(s,u,f){return u=f?e:u,u=s&&u==null?s.length:u,ps(s,ue,e,e,e,e,u)}function mR(s,u){var f;if(typeof u!="function")throw new _i(i);return s=Et(s),function(){return--s>0&&(f=u.apply(this,arguments)),s<=1&&(u=e),f}}var by=gt(function(s,u,f){var h=A;if(f.length){var O=eu(f,ol(by));h|=ee}return ps(s,h,u,f,O)}),NR=gt(function(s,u,f){var h=A|U;if(f.length){var O=eu(f,ol(NR));h|=ee}return ps(u,h,s,f,O)});function TR(s,u,f){u=f?e:u;var h=ps(s,$,e,e,e,e,e,u);return h.placeholder=TR.placeholder,h}function ER(s,u,f){u=f?e:u;var h=ps(s,re,e,e,e,e,e,u);return h.placeholder=ER.placeholder,h}function hR(s,u,f){var h,O,L,k,V,J,le=0,de=!1,Te=!1,be=!0;if(typeof s!="function")throw new _i(i);u=bi(u)||0,bn(f)&&(de=!!f.leading,Te="maxWait"in f,L=Te?rr(bi(f.maxWait)||0,u):L,be="trailing"in f?!!f.trailing:be);function $e(Vn){var aa=h,hs=O;return h=O=e,le=Vn,k=s.apply(hs,aa),k}function et(Vn){return le=Vn,V=Bd(Dt,u),de?$e(Vn):k}function yt(Vn){var aa=Vn-J,hs=Vn-le,kR=u-aa;return Te?Or(kR,L-hs):kR}function tt(Vn){var aa=Vn-J,hs=Vn-le;return J===e||aa>=u||aa<0||Te&&hs>=L}function Dt(){var Vn=bm();if(tt(Vn))return Ft(Vn);V=Bd(Dt,yt(Vn))}function Ft(Vn){return V=e,be&&h?$e(Vn):(h=O=e,k)}function di(){V!==e&&AA(V),le=0,h=J=O=V=e}function xr(){return V===e?k:Ft(bm())}function fi(){var Vn=bm(),aa=tt(Vn);if(h=arguments,O=this,J=Vn,aa){if(V===e)return et(J);if(Te)return AA(V),V=Bd(Dt,u),$e(J)}return V===e&&(V=Bd(Dt,u)),k}return fi.cancel=di,fi.flush=xr,fi}var HY=gt(function(s,u){return oA(s,1,u)}),zY=gt(function(s,u,f){return oA(s,bi(u)||0,f)});function WY(s){return ps(s,xe)}function Am(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new _i(i);var f=function(){var h=arguments,O=u?u.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var k=s.apply(this,h);return f.cache=L.set(O,k)||L,k};return f.cache=new(Am.Cache||ds),f}Am.Cache=ds;function Rm(s){if(typeof s!="function")throw new _i(i);return function(){var u=arguments;switch(u.length){case 0:return!s.call(this);case 1:return!s.call(this,u[0]);case 2:return!s.call(this,u[0],u[1]);case 3:return!s.call(this,u[0],u[1],u[2])}return!s.apply(this,u)}}function XY(s){return mR(2,s)}var ZY=x$(function(s,u){u=u.length==1&&ft(u[0])?vn(u[0],ui(We())):vn(gr(u,1),ui(We()));var f=u.length;return gt(function(h){for(var O=-1,L=Or(h.length,f);++O=u}),Qu=fA(function(){return arguments}())?fA:function(s){return Cn(s)&&on.call(s,"callee")&&!X0.call(s,"callee")},ft=ne.isArray,m2=L0?ui(L0):_$;function Jr(s){return s!=null&&Pm(s.length)&&!Ts(s)}function qn(s){return Cn(s)&&Jr(s)}function N2(s){return s===!0||s===!1||Cn(s)&&kr(s)==St}var ou=RG||xy,T2=C0?ui(C0):v$;function E2(s){return Cn(s)&&s.nodeType===1&&!Ud(s)}function h2(s){if(s==null)return!0;if(Jr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||ou(s)||ul(s)||Qu(s)))return!s.length;var u=Sr(s);if(u==it||u==yr)return!s.size;if(Cd(s))return!ry(s).length;for(var f in s)if(on.call(s,f))return!1;return!0}function y2(s,u){return Fd(s,u)}function I2(s,u,f){f=typeof f=="function"?f:e;var h=f?f(s,u):e;return h===e?Fd(s,u,e,f):!!h}function Ry(s){if(!Cn(s))return!1;var u=kr(s);return u==qe||u==ie||typeof s.message=="string"&&typeof s.name=="string"&&!Ud(s)}function g2(s){return typeof s=="number"&&eA(s)}function Ts(s){if(!bn(s))return!1;var u=kr(s);return u==He||u==Bt||u==Ce||u==zc}function IR(s){return typeof s=="number"&&s==Et(s)}function Pm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Tn}function bn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Cn(s){return s!=null&&typeof s=="object"}var gR=B0?ui(B0):S$;function _2(s,u){return s===u||ny(s,u,yy(u))}function v2(s,u,f){return f=typeof f=="function"?f:e,ny(s,u,yy(u),f)}function O2(s){return _R(s)&&s!=+s}function S2(s){if(uQ(s))throw new dt(r);return pA(s)}function D2(s){return s===null}function b2(s){return s==null}function _R(s){return typeof s=="number"||Cn(s)&&kr(s)==Pt}function Ud(s){if(!Cn(s)||kr(s)!=Qr)return!1;var u=rm(s);if(u===null)return!0;var f=on.call(u,"constructor")&&u.constructor;return typeof f=="function"&&f instanceof f&&Zp.call(f)==vG}var Py=U0?ui(U0):D$;function A2(s){return IR(s)&&s>=-Tn&&s<=Tn}var vR=k0?ui(k0):b$;function Fm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&kr(s)==si}function li(s){return typeof s=="symbol"||Cn(s)&&kr(s)==xt}var ul=M0?ui(M0):A$;function R2(s){return s===e}function P2(s){return Cn(s)&&Sr(s)==Uu}function F2(s){return Cn(s)&&kr(s)==Fa}var w2=gm(iy),L2=gm(function(s,u){return s<=u});function OR(s){if(!s)return[];if(Jr(s))return Fm(s)?na(s):Yr(s);if(vd&&s[vd])return dG(s[vd]());var u=Sr(s),f=u==it?$h:u==yr?zp:cl;return f(s)}function Es(s){if(!s)return s===0?s:0;if(s=bi(s),s===$t||s===-$t){var u=s<0?-1:1;return u*Ur}return s===s?s:0}function Et(s){var u=Es(s),f=u%1;return u===u?f?u-f:u:0}function SR(s){return s?ju(Et(s),0,gn):0}function bi(s){if(typeof s=="number")return s;if(li(s))return lr;if(bn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=bn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=G0(s);var f=mK.test(s);return f||TK.test(s)?JK(s.slice(2),f?2:8):pK.test(s)?lr:+s}function DR(s){return La(s,Hr(s))}function C2(s){return s?ju(Et(s),-Tn,Tn):s===0?s:0}function zt(s){return s==null?"":ci(s)}var B2=al(function(s,u){if(Cd(u)||Jr(u)){La(u,fr(u),s);return}for(var f in u)on.call(u,f)&&Ad(s,f,u[f])}),bR=al(function(s,u){La(u,Hr(u),s)}),wm=al(function(s,u,f,h){La(u,Hr(u),s,h)}),U2=al(function(s,u,f,h){La(u,fr(u),s,h)}),k2=ms(Wh);function M2(s,u){var f=il(s);return u==null?f:aA(f,u)}var x2=gt(function(s,u){s=mn(s);var f=-1,h=u.length,O=h>2?u[2]:e;for(O&&Mr(u[0],u[1],O)&&(h=1);++f1),L}),La(s,Ey(s),f),h&&(f=Oi(f,d|p|E,z$));for(var O=u.length;O--;)cy(f,u[O]);return f});function rJ(s,u){return RR(s,Rm(We(u)))}var iJ=ms(function(s,u){return s==null?{}:F$(s,u)});function RR(s,u){if(s==null)return{};var f=vn(Ey(s),function(h){return[h]});return u=We(u),IA(s,f,function(h,O){return u(h,O[0])})}function aJ(s,u,f){u=au(u,s);var h=-1,O=u.length;for(O||(O=1,s=e);++hu){var h=s;s=u,u=h}if(f||s%1||u%1){var O=tA();return Or(s+O*(u-s+YK("1e-"+((O+"").length-1))),u)}return sy(s,u)}var TJ=sl(function(s,u,f){return u=u.toLowerCase(),s+(f?wR(u):u)});function wR(s){return Ly(zt(s).toLowerCase())}function LR(s){return s=zt(s),s&&s.replace(hK,sG).replace(kK,"")}function EJ(s,u,f){s=zt(s),u=ci(u);var h=s.length;f=f===e?h:ju(Et(f),0,h);var O=f;return f-=u.length,f>=0&&s.slice(f,O)==u}function hJ(s){return s=zt(s),s&&Xj.test(s)?s.replace(l0,oG):s}function yJ(s){return s=zt(s),s&&iK.test(s)?s.replace(Ah,"\\$&"):s}var IJ=sl(function(s,u,f){return s+(f?"-":"")+u.toLowerCase()}),gJ=sl(function(s,u,f){return s+(f?" ":"")+u.toLowerCase()}),_J=UA("toLowerCase");function vJ(s,u,f){s=zt(s),u=Et(u);var h=u?el(s):0;if(!u||h>=u)return s;var O=(u-h)/2;return Im(om(O),f)+s+Im(sm(O),f)}function OJ(s,u,f){s=zt(s),u=Et(u);var h=u?el(s):0;return u&&h>>0,f?(s=zt(s),s&&(typeof u=="string"||u!=null&&!Py(u))&&(u=ci(u),!u&&Zc(s))?su(na(s),0,f):s.split(u,f)):[]}var FJ=sl(function(s,u,f){return s+(f?" ":"")+Ly(u)});function wJ(s,u,f){return s=zt(s),f=f==null?0:ju(Et(f),0,s.length),u=ci(u),s.slice(f,f+u.length)==u}function LJ(s,u,f){var h=F.templateSettings;f&&Mr(s,u,f)&&(u=e),s=zt(s),u=wm({},u,h,KA);var O=wm({},u.imports,h.imports,KA),L=fr(O),k=Gh(O,L),V,J,le=0,de=u.interpolate||$p,Te="__p += '",be=Qh((u.escape||$p).source+"|"+de.source+"|"+(de===d0?fK:$p).source+"|"+(u.evaluate||$p).source+"|$","g"),$e="//# sourceURL="+(on.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jK+"]")+` +`;s.replace(be,function(tt,Dt,Ft,di,xr,fi){return Ft||(Ft=di),Te+=s.slice(le,fi).replace(yK,uG),Dt&&(V=!0,Te+=`' + __e(`+Dt+`) + '`),xr&&(J=!0,Te+=`'; `+xr+`; @@ -467,16 +467,16 @@ __p += '`),Ft&&(Te+=`' + `;var et=on.call(u,"variable")&&u.variable;if(!et)Te=`with (obj) { `+Te+` } -`;else if(uK.test(et))throw new dt(a);Te=(J?Te.replace(_n,""):Te).replace(sn,"$1").replace(Jj,"$1;"),Te="function("+(et||"obj")+`) { +`;else if(lK.test(et))throw new dt(a);Te=(J?Te.replace(_n,""):Te).replace(sn,"$1").replace(zj,"$1;"),Te="function("+(et||"obj")+`) { `+(et?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(J?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Te+`return __p -}`;var yt=LR(function(){return Qt(L,$e+"return "+Te).apply(e,k)});if(yt.source=Te,Ay(yt))throw yt;return yt}function wJ(s){return zt(s).toLowerCase()}function LJ(s){return zt(s).toUpperCase()}function CJ(s,u,f){if(s=zt(s),s&&(f||u===e))return j0(s);if(!s||!(u=ci(u)))return s;var h=na(s),O=na(u),L=K0(h,O),k=G0(h,O)+1;return au(h,L,k).join("")}function BJ(s,u,f){if(s=zt(s),s&&(f||u===e))return s.slice(0,Q0(s)+1);if(!s||!(u=ci(u)))return s;var h=na(s),O=G0(h,na(u))+1;return au(h,0,O).join("")}function UJ(s,u,f){if(s=zt(s),s&&(f||u===e))return s.replace(Ah,"");if(!s||!(u=ci(u)))return s;var h=na(s),O=K0(h,na(u));return au(h,O).join("")}function kJ(s,u){var f=Ze,h=Z;if(bn(u)){var O="separator"in u?u.separator:O;f="length"in u?Et(u.length):f,h="omission"in u?ci(u.omission):h}s=zt(s);var L=s.length;if(Xc(s)){var k=na(s);L=k.length}if(f>=L)return s;var V=f-Zc(h);if(V<1)return h;var J=k?au(k,0,V).join(""):s.slice(0,V);if(O===e)return J+h;if(k&&(V+=J.length-V),Ry(O)){if(s.slice(V).search(O)){var le,de=J;for(O.global||(O=$h(O.source,zt(l0.exec(O))+"g")),O.lastIndex=0;le=O.exec(de);)var Te=le.index;J=J.slice(0,Te===e?V:Te)}}else if(s.indexOf(ci(O),V)!=V){var be=J.lastIndexOf(O);be>-1&&(J=J.slice(0,be))}return J+h}function MJ(s){return s=zt(s),s&&Hj.test(s)?s.replace(o0,pG):s}var xJ=al(function(s,u,f){return s+(f?" ":"")+u.toUpperCase()}),wy=CA("toUpperCase");function wR(s,u,f){return s=zt(s),u=f?e:u,u===e?uG(s)?TG(s):ZK(s):s.match(u)||[]}var LR=gt(function(s,u){try{return oi(s,e,u)}catch(f){return Ay(f)?f:new dt(f)}}),qJ=ms(function(s,u){return gi(u,function(f){f=Ca(f),fs(s,f,Dy(s[f],s))}),s});function VJ(s){var u=s==null?0:s.length,f=We();return s=u?vn(s,function(h){if(typeof h[1]!="function")throw new _i(i);return[f(h[0]),h[1]]}):[],gt(function(h){for(var O=-1;++OTn)return[];var f=gn,h=Or(s,gn);u=We(u),s-=gn;for(var O=jh(h,u);++f0||u<0)?new bt(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),u!==e&&(u=Et(u),f=u<0?f.dropRight(-u):f.take(u-s)),f)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(gn)},wa(bt.prototype,function(s,u){var f=/^(?:filter|find|map|reject)|While$/.test(u),h=/^(?:head|last)$/.test(u),O=F[h?"take"+(u=="last"?"Right":""):u],L=h||/^find/.test(u);O&&(F.prototype[u]=function(){var k=this.__wrapped__,V=h?[1]:arguments,J=k instanceof bt,le=V[0],de=J||ft(k),Te=function(Dt){var Ft=O.apply(F,Xo([Dt],V));return h&&be?Ft[0]:Ft};de&&f&&typeof le=="function"&&le.length!=1&&(J=de=!1);var be=this.__chain__,$e=!!this.__actions__.length,et=L&&!be,yt=J&&!$e;if(!L&&de){k=yt?k:new bt(this);var tt=s.apply(k,V);return tt.__actions__.push({func:vm,args:[Te],thisArg:e}),new vi(tt,be)}return et&&yt?s.apply(this,V):(tt=this.thru(Te),et?h?tt.value()[0]:tt.value():tt)})}),gi(["pop","push","shift","sort","splice","unshift"],function(s){var u=Hp[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",h=/^(?:pop|shift)$/.test(s);F.prototype[s]=function(){var O=arguments;if(h&&!this.__chain__){var L=this.value();return u.apply(ft(L)?L:[],O)}return this[f](function(k){return u.apply(ft(k)?k:[],O)})}}),wa(bt.prototype,function(s,u){var f=F[u];if(f){var h=f.name+"";on.call(nl,h)||(nl[h]=[]),nl[h].push({name:u,func:f})}}),nl[Tm(e,U).name]=[{name:"wrapper",func:e}],bt.prototype.clone=MG,bt.prototype.reverse=xG,bt.prototype.value=qG,F.prototype.at=NY,F.prototype.chain=TY,F.prototype.commit=EY,F.prototype.next=hY,F.prototype.plant=IY,F.prototype.reverse=gY,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=_Y,F.prototype.first=F.prototype.head,_d&&(F.prototype[_d]=yY),F},eu=EG();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(dr._=eu,define(function(){return eu})):ku?((ku.exports=eu)._=eu,Ch._=eu):dr._=eu}).call(cd)});var hV=w(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.FederationFactory=void 0;qc.federateSubgraphs=hfe;qc.federateSubgraphsWithContracts=yfe;qc.federateSubgraphsContract=Ife;var Re=Oe(),mV=Iu(),Kr=Pr(),Pe=qi(),Mc=oT(),xc=rd(),Gr=lp(),YE=iE(),yp=gu(),mfe=rb(),Nfe=dp(),NV=Uf(),ge=Ul(),Tfe=sb(),TV=pV(),ld=QE(),ve=zn(),JE=wl(),Ne=Fr(),Efe=fp(),Fu=kf(),zE,EV,HE=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:c,internalSubgraphBySubgraphName:l,warnings:d}){Yu(this,zE);_(this,"authorizationDataByParentTypeName");_(this,"coordsByNamedTypeName",new Map);_(this,"disableResolvabilityValidation",!1);_(this,"directiveDefinitionByName",new Map);_(this,"clientDefinitions",[]);_(this,"currentSubgraphName","");_(this,"concreteTypeNamesByAbstractTypeName");_(this,"subgraphNamesByNamedTypeNameByFieldCoords",new Map);_(this,"entityDataByTypeName");_(this,"entityInterfaceFederationDataByTypeName");_(this,"errors",[]);_(this,"fieldConfigurationByFieldCoords",new Map);_(this,"fieldCoordsByNamedTypeName");_(this,"inaccessibleCoords",new Set);_(this,"inaccessibleRequiredInputValueErrorByCoords",new Map);_(this,"internalGraph");_(this,"internalSubgraphBySubgraphName");_(this,"invalidORScopesCoords",new Set);_(this,"isMaxDepth",!1);_(this,"isVersionTwo",!1);_(this,"namedInputValueTypeNames",new Set);_(this,"namedOutputTypeNames",new Set);_(this,"parentDefinitionDataByTypeName",new Map);_(this,"parentTagDataByTypeName",new Map);_(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[ve.AUTHENTICATED,Fu.AUTHENTICATED_DEFINITION],[ve.DEPRECATED,Fu.DEPRECATED_DEFINITION],[ve.INACCESSIBLE,Fu.INACCESSIBLE_DEFINITION],[ve.ONE_OF,Fu.ONE_OF_DEFINITION],[ve.REQUIRES_SCOPES,Fu.REQUIRES_SCOPES_DEFINITION],[ve.SEMANTIC_NON_NULL,Fu.SEMANTIC_NON_NULL_DEFINITION],[ve.TAG,Fu.TAG_DEFINITION]]));_(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);_(this,"referencedPersistedDirectiveNames",new Set);_(this,"routerDefinitions",[]);_(this,"subscriptionFilterDataByFieldPath",new Map);_(this,"tagNamesByCoords",new Map);_(this,"warnings");this.authorizationDataByParentTypeName=t,this.concreteTypeNamesByAbstractTypeName=n,this.disableResolvabilityValidation=r!=null?r:!1,this.entityDataByTypeName=i,this.entityInterfaceFederationDataByTypeName=a,this.fieldCoordsByNamedTypeName=o,this.internalGraph=c,this.internalSubgraphBySubgraphName=l,this.warnings=d}extractPersistedDirectives({data:t,directivesByName:n}){for(let[r,i]of n)if(this.persistedDirectiveDefinitionByDirectiveName.get(r)&&(this.referencedPersistedDirectiveNames.add(r),!(ve.AUTHORIZATION_DIRECTIVES.has(r)||i.length<1)))switch(r){case ve.DEPRECATED:{t.isDeprecated=!0,(0,ge.upsertDeprecatedDirective)(t,i[0]);break}case ve.TAG:{(0,ge.upsertTagDirectives)(t,i);break}default:{let o=t.directivesByName.get(r);if(!o){t.directivesByName.set(r,[...i]);break}if(ve.NON_REPEATABLE_PERSISTED_DIRECTIVES.has(r))break;o.push(...i)}}return t}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,ge.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let c of t.implementedInterfaceTypeNames){n.push((0,Kr.stringToNamedTypeNode)(c));let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,c,ve.PARENT_DEFINITION_DATA);if(l.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ne.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[E,I]of l.fieldDataByName){let v=!1,A=t.fieldDataByName.get(E);if(!A){p=!0,d.unimplementedFields.push(E);continue}let U={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,YE.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,ge.isTypeValidImplementation)(I.node.type,A.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,v=!0,U.implementedResponseType=(0,YE.printTypeNode)(A.node.type));let j=new Set;for(let[$,re]of I.argumentDataByName){let ee=re.node;j.add($);let me=(o=A.argumentDataByName.get($))==null?void 0:o.node;if(!me){p=!0,v=!0,U.unimplementedArguments.add($);continue}let ue=(0,YE.printTypeNode)(me.type),Ae=(0,YE.printTypeNode)(ee.type);Ae!==ue&&(p=!0,v=!0,U.invalidImplementedArguments.push({actualType:ue,argumentName:$,expectedType:Ae}))}for(let[$,re]of A.argumentDataByName){let ee=re.node;j.has($)||ee.type.kind===Re.Kind.NON_NULL_TYPE&&(p=!0,v=!0,U.invalidAdditionalArguments.add($))}!r&&A.isInaccessible&&!I.isInaccessible&&(p=!0,v=!0,U.isInaccessible=!0),v&&d.invalidFieldImplementations.set(E,U)}p&&i.set(c,d)}return a.size>0&&this.errors.push((0,Pe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Pe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ne.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Re.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Re.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let c=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Mc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[E,I]of this.entityInterfaceFederationDataByTypeName){if(!((p=I.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(E);v&&(0,Mc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:v,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l})}if(c.length<1)return;if(!o.keys||o.keys.length<1){o.isRootNode=!0,o.keys=c;return}let d=new Set(o.keys.map(E=>E.selectionSet));for(let E of c)d.has(E.selectionSet)||(o.keys.push(E),d.add(E.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,ge.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Re.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Re.Kind.NULL);let c=(0,Ne.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Mc.validateImplicitFieldSets)({conditionalFieldDataByCoords:t.conditionalFieldDataByCoordinates,currentSubgraphName:t.name,entityData:r,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:a,graphNode:i}),l.length<1)return;if(!c.keys||c.keys.length<1){c.isRootNode=!0,c.keys=l;return}let d=new Set(c.keys.map(p=>p.selectionSet));for(let p of l)d.has(p.selectionSet)||(c.keys.push(p),d.add(p.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?ge.MergeMethod.CONSISTENT:ge.MergeMethod.INTERSECTION:ge.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(ve.LITERAL_PERIOD);if(r.length<1)continue;let i=(0,Ne.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Mc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Mc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Mc.newChildTagData)(r[1])),c=(0,Ne.getValueOrDefault)(o.tagNamesByArgumentName,r[2],()=>new Set);for(let l of n)c.add(l);break;default:break}}}upsertEnumValueData(t,n,r){let i=t.get(n.name),a=i||this.copyEnumValueData(n);this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=(0,ge.isNodeDataInaccessible)(n);if((r||o)&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}a.appearances+=1,(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(a,n),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if(this.extractPersistedDirectives({data:o.persistedDirectivesData,directivesByName:n.directivesByName}),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(o,n),(0,Ne.addIterableToSet)({source:n.requiredSubgraphNames,target:o.requiredSubgraphNames}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:o.subgraphNames}),this.handleInputValueInaccessibility(i,o,r);let c=(0,ld.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);c.success?o.type=c.typeNode:this.errors.push((0,Pe.incompatibleMergedTypesError)({actualType:c.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:c.expectedType})),(0,ge.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,ge.isNodeDataInaccessible)(n)){if((0,ge.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Pe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByName.get(ve.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ne.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Pe.unknownFieldSubgraphNameError)(t.federatedCoords));return}this.subscriptionFilterDataByFieldPath.set(t.federatedCoords,{directive:r[0],fieldData:n||t,directiveSubgraphName:i})}federateOutputType({current:t,other:n,coords:r,mostRestrictive:i}){n=(0,mV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=ld.DivergentType.NONE,c=a;for(let l=0;lnew Set)})}upsertFieldData(t,n,r){let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,ge.isNodeDataInaccessible)(n));(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=r||(0,ge.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}let c=this.federateOutputType({current:a.type,other:n.type,coords:a.federatedCoords,mostRestrictive:!1});if(c.success)if(a.type=c.typeNode,a.namedTypeName!==n.namedTypeName){let l=(0,Ne.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ne.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let p of a.subgraphNames)n.subgraphNames.has(p)||d.add(p);(0,Ne.addIterableToSet)({source:n.subgraphNames,target:(0,Ne.getValueOrDefault)(l,n.namedTypeName,()=>new Set)})}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let l of n.argumentDataByName.values())this.upsertInputValueData(a.argumentDataByName,l,a.federatedCoords,o);(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ne.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ne.addMapEntries)({source:n.isShareableBySubgraphName,target:a.isShareableBySubgraphName}),(0,Ne.addMapEntries)({source:n.nullLevelsBySubgraphName,target:a.nullLevelsBySubgraphName}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessibleCoords.has(r)||n.push(i);return n}recordTagNamesByCoords(t,n){let r=n||t.name;if(t.persistedDirectivesData.tagDirectiveByName.size<1)return;let i=(0,Ne.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),description:(0,ge.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),subgraphNames:new Set(t.subgraphNames),description:(0,ge.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),federatedCoords:t.federatedCoords,fieldName:t.fieldName,includeDefaultValue:t.includeDefaultValue,isArgument:t.isArgument,kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{directives:[],kind:Re.Kind.INPUT_VALUE_DEFINITION,name:(0,Kr.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,ge.getInitialFederatedDescription)(t)}}copyInputValueDataByValueName(t,n,r){let i=new Map;for(let[a,o]of t){let c=this.copyInputValueData(o);this.handleInputValueInaccessibility(n,c,r),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,c.namedTypeName,()=>new Set).add(c.federatedCoords),this.namedInputValueTypeNames.add(c.namedTypeName),this.recordTagNamesByCoords(c,`${r}.${o.name}`),i.set(a,c)}return i}copyFieldData(t,n){return{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),externalFieldDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.externalFieldDataBySubgraphName),federatedCoords:t.federatedCoords,inheritedDirectiveNames:new Set,isInaccessible:t.isInaccessible,isShareableBySubgraphName:new Map(t.isShareableBySubgraphName),kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{arguments:[],directives:[],kind:t.kind,name:(0,Kr.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,ge.getInitialFederatedDescription)(t)}}copyEnumValueDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,ge.isNodeDataInaccessible)(o))&&this.inaccessibleCoords.add(o.federatedCoords),r.set(i,o)}return r}copyFieldDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=n||(0,ge.isNodeDataInaccessible)(a),c=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(c),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,c.namedTypeName,()=>new Set).add(c.federatedCoords),this.namedOutputTypeNames.add(c.namedTypeName),this.recordTagNamesByCoords(c,c.federatedCoords),o&&this.inaccessibleCoords.add(c.federatedCoords),r.set(i,c)}return r}copyParentDefinitionData(t){let n=this.copyMutualParentDefinitionData(t);switch(t.kind){case Re.Kind.ENUM_TYPE_DEFINITION:return Q(M({},n),{appearances:t.appearances,enumValueDataByName:this.copyEnumValueDataByName(t.enumValueDataByName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Q(M({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INTERFACE_TYPE_DEFINITION:return Q(M({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},requireFetchReasonsFieldNames:new Set,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.OBJECT_TYPE_DEFINITION:return Q(M({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,isRootType:t.isRootType,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.SCALAR_TYPE_DEFINITION:return Q(M({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.UNION_TYPE_DEFINITION:return Q(M({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},memberByMemberTypeName:new Map(t.memberByMemberTypeName),subgraphNames:new Set(t.subgraphNames)})}}getParentTargetData({existingData:t,incomingData:n}){if(!t){let r=this.copyParentDefinitionData(n);return(0,ge.isParentDataRootType)(r)&&(r.extensionType=NV.ExtensionType.NONE),r}return this.extractPersistedDirectives({data:t.persistedDirectivesData,directivesByName:n.directivesByName}),t}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),a=this.getParentTargetData({existingData:i,incomingData:t});this.recordTagNamesByCoords(a);let o=(0,ge.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphNames.has(n)){if(i&&i.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:i,incomingSubgraphName:n}));return}a.kind=Re.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Re.Kind.INTERFACE_TYPE_DEFINITION}if(!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphNames.has(n)||a.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:a,incomingNodeType:(0,Ne.kindToNodeType)(t.kind),incomingSubgraphName:n}));return}switch((0,Ne.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(a,t),(0,ge.setParentDataExtensionType)(a,t),a.kind){case Re.Kind.ENUM_TYPE_DEFINITION:if(!(0,ge.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.enumValueDataByName.values())this.upsertEnumValueData(a.enumValueDataByName,l,o);return;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,ge.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:let c=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:c.implementedInterfaceTypeNames,target:a.implementedInterfaceTypeNames}),(0,Ne.addIterableToSet)({source:c.subgraphNames,target:a.subgraphNames});for(let l of c.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Re.Kind.UNION_TYPE_DEFINITION:if(!(0,ge.areKindsEqual)(a,t))return;(0,Ne.addMapEntries)({source:t.memberByMemberTypeName,target:a.memberByMemberTypeName}),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return;default:(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByName.values())this.inaccessibleCoords.add(n.federatedCoords);break;default:for(let n of t.fieldDataByName.values()){this.inaccessibleCoords.add(n.federatedCoords);for(let r of n.argumentDataByName.values())this.inaccessibleCoords.add(r.federatedCoords)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let a=new Map;for(let o of t.argumentDataByName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByName:a,executableLocations:new Set(t.executableLocations),name:r,repeatable:t.repeatable,subgraphNames:new Set(t.subgraphNames),description:t.description});return}if(i.subgraphNames.size+1!==n){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}if((0,ge.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByName.values())this.namedInputValueTypeNames.add((0,mV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByName,a,`@${i.name}`,!1);(0,ge.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:i.subgraphNames})}shouldUpdateFederatedFieldAbstractNamedType(t,n){if(!t)return!1;let r=this.concreteTypeNamesByAbstractTypeName.get(t);if(!r||r.size<1)return!1;for(let i of n)if(!r.has(i))return!1;return!0}updateTypeNodeNamedType(t,n){let r=t;for(let i=0;i1){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Re.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[E,I]of o)if(p!==E&&!I.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,c)){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}a.namedTypeName=d,this.updateTypeNodeNamedType(a.type,d)}}federateInternalSubgraphData(){let t=0,n=!1;for(let r of this.internalSubgraphBySubgraphName.values()){t+=1,this.currentSubgraphName=r.name,this.isVersionTwo||(this.isVersionTwo=r.isVersionTwo),(0,Tfe.renameRootTypes)(this,r);for(let i of r.parentDefinitionDataByTypeName.values())this.upsertParentDefinitionData(i,r.name);if(!n){if(!r.persistedDirectiveDefinitionDataByDirectiveName.size){n=!0;continue}for(let i of r.persistedDirectiveDefinitionDataByDirectiveName.values())this.upsertPersistedDirectiveDefinitionData(i,t);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.size<1&&(n=!0)}}this.handleDisparateFieldNamedTypes()}handleInterfaceObjectForInternalGraph({entityData:t,internalSubgraph:n,interfaceObjectData:r,interfaceObjectNode:i,resolvableKeyFieldSets:a,subgraphName:o}){let c=this.internalGraph.addOrUpdateNode(t.typeName),l=this.internalGraph.addEntityDataNode(t.typeName);for(let p of i.satisfiedFieldSets)c.satisfiedFieldSets.add(p),a.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:E}of d||[])this.internalGraph.addEdge(c,this.internalGraph.addOrUpdateNode(E),p);this.internalGraph.addEdge(i,c,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,c)}handleEntityInterfaces(){var t;for(let[n,r]of this.entityInterfaceFederationDataByTypeName){let i=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,n,ve.PARENT_DEFINITION_DATA);if(i.kind===Re.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphNames){let o=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),c=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ne.getOrThrowError)(c,n,"configurationDataByTypeName"),p=d.keys;if(!p)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let E=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,I,ve.PARENT_DEFINITION_DATA);if(!(0,Gr.isObjectDefinitionData)(v))continue;let A=(0,Ne.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");A.subgraphNames.add(a);let U=c.get(I);if(U)if((0,Ne.addIterableToSet)({source:d.fieldNames,target:U.fieldNames}),!U.keys)U.keys=[...p];else e:for(let ee of p){for(let{selectionSet:me}of U.keys)if(ee.selectionSet===me)continue e;U.keys.push(ee)}else c.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...p],typeName:I});let j=new Set;for(let ee of p.filter(me=>!me.disableEntityResolver))j.add(ee.selectionSet);let $=this.authorizationDataByParentTypeName.get(n),re=(0,Ne.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Gr.isObjectDefinitionData)(re)){for(let[ee,me]of re.fieldDataByName){let ue=`${I}.${ee}`;(0,Ne.getValueOrDefault)(this.fieldCoordsByNamedTypeName,me.namedTypeName,()=>new Set).add(ue);let Ae=$==null?void 0:$.fieldAuthDataByFieldName.get(ee);if(Ae){let Z=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Gr.newAuthorizationData)(I));(0,Gr.upsertFieldAuthorizationData)(Z.fieldAuthDataByFieldName,Ae)||this.invalidORScopesCoords.add(ue)}let xe=v.fieldDataByName.get(ee);if(xe){let Z=(t=me.isShareableBySubgraphName.get(a))!=null?t:!1;xe.isShareableBySubgraphName.set(a,Z),xe.subgraphNames.add(a);let _e=me.externalFieldDataBySubgraphName.get(a);if(!_e)continue;xe.externalFieldDataBySubgraphName.set(a,M({},_e));continue}let Ze=i.isInaccessible||v.isInaccessible||me.isInaccessible;v.fieldDataByName.set(ee,this.copyFieldData(me,Ze))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:E,resolvableKeyFieldSets:j,entityData:A})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Gr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Gr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByName){if(a===ve.SEMANTIC_NON_NULL&&(0,ge.isFieldData)(t)){r.push((0,Ne.generateSemanticNonNullDirective)((i=(0,Ne.getFirstEntry)(t.nullLevelsBySubgraphName))!=null?i:new Set([0])));continue}let c=this.persistedDirectiveDefinitionByDirectiveName.get(a);if(c){if(o.length<2){r.push(...o);continue}if(!c.repeatable){this.errors.push((0,Pe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,ge.generateDeprecatedDirective)(t.persistedDirectivesData.deprecatedReason)),n.push(...this.getValidFlattenedPersistedDirectiveNodeArray(t)),n}getFederatedGraphNodeDescription(t){if(t.configureDescriptionDataBySubgraphName.size<1)return t.description;let n=[],r="";for(let[i,{propagate:a,description:o}]of t.configureDescriptionDataBySubgraphName)a&&(n.push(i),r=o);if(n.length===1)return(0,Mc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,ge.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,Kr.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,Kr.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.includeDefaultValue&&(t.node.defaultValue=t.defaultValue),t.node}getValidFieldArgumentNodes(t){let n=[],r=[],i=[],a=`${t.renamedParentTypeName}.${t.name}`;for(let[o,c]of t.argumentDataByName)t.subgraphNames.size===c.subgraphNames.size?(r.push(o),n.push(this.getNodeWithPersistedDirectivesByInputValueData(c))):(0,ge.isTypeRequired)(c.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames),requiredSubgraphs:[...c.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(ve.FIELD,a,i)):r.length>0&&((0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,a,()=>({argumentNames:r,fieldName:t.name,typeName:t.renamedParentTypeName})).argumentNames=r),n}getNodeWithPersistedDirectivesByFieldData(t,n){return t.node.arguments=n,t.node.name=(0,Kr.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}validateSemanticNonNull(t){let n;for(let r of t.nullLevelsBySubgraphName.values()){if(!n){n=r;continue}if(n.size!==r.size){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByName.has(ve.ONE_OF)?r.size>0?(this.errors.push((0,Pe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,Efe.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==NV.ExtensionType.NONE&&this.errors.push((0,Pe.noBaseDefinitionForExtensionError)((0,Ne.kindToNodeType)(r.kind),n)),r.kind){case Re.Kind.ENUM_TYPE_DEFINITION:{if(xc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,ge.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let c of r.enumValueDataByName.values()){let l=this.getNodeForRouterSchemaByData(c),d=(0,ge.isNodeDataInaccessible)(c),p=Q(M({},c.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(c)});switch(o){case ge.MergeMethod.CONSISTENT:!d&&r.appearances>c.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(p);break;case ge.MergeMethod.INTERSECTION:r.appearances===c.appearances&&(i.push(l),d||a.push(p));break;default:i.push(l),d||a.push(p);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,ve.ENUM_VALUE));break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),values:a}));break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(xc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=new Array,a=new Array,o=new Array,c=new Set;for(let[l,d]of r.inputValueDataByName)if((0,ge.isTypeRequired)(d.type)&&c.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,ge.isNodeDataInaccessible)(d))continue;o.push(Q(M({},d.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(d)}))}else(0,ge.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(ve.INPUT_OBJECT,n,i,!1));break}if(!this.validateOneOfDirective({data:r,inputValueNodes:a,requiredFieldNames:c}))break;if(r.node.fields=a,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,c=(0,ge.newInvalidFieldNames)(),l=r.kind===Re.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,ge.propagateAuthDirectives)(r,d);for(let[E,I]of r.fieldDataByName){(0,ge.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,ge.validateExternalAndShareable)(I,c),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,ge.isNodeDataInaccessible)(I)&&(a.push((0,ge.getClientSchemaFieldNodeByFieldData)(I)),o.set(E,this.fieldDataToGraphFieldData(I)))}if(l&&(c.byShareable.size>0&&this.errors.push((0,Pe.invalidFieldShareabilityError)(r,c.byShareable)),c.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Pe.allExternalFieldInstancesError)(n,c.subgraphNamesByExternalFieldName))),r.node.fields=i,this.internalGraph.initializeNode(n,o),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:a});break}this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r));let p=(0,Nfe.isNodeQuery)(n);if((0,ge.isNodeDataInaccessible)(r)){if(p){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let E=p?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,ve.FIELD);this.errors.push(E);break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Re.Kind.SCALAR_TYPE_DEFINITION:{if(xc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;if((0,ge.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r)}));break}case Re.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Gr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)(ve.UNION,n,"union member type"));break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),types:i}));break}}}pushNamedTypeAuthDataToFields(){var t;for(let[n,r]of this.authorizationDataByParentTypeName){if(!r.requiresAuthentication&&r.requiredScopes.length<1)continue;let i=this.fieldCoordsByNamedTypeName.get(n);if(i)for(let a of i){let o=a.split(ve.LITERAL_PERIOD);switch(o.length){case 2:{let c=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Gr.newAuthorizationData)(o[0])),l=(0,Ne.getValueOrDefault)(c.fieldAuthDataByFieldName,o[1],()=>(0,Gr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>yp.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),cl(this,zE,EV).call(this),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(n)),(0,ge.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let a of n.implementedInterfaceTypeNames)this.inaccessibleCoords.has(a)||i.push((0,Kr.stringToNamedTypeNode)(a));this.clientDefinitions.push(Q(M({},n.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(ve.LEFT_PARENTHESIS)[0].split(ve.LITERAL_PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,Ne.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(ve.QUERY);if(!t||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,ge.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(ve.LITERAL_PERIOD);if(o.length<1)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let c=n;if(this.inaccessibleCoords.has(c.renamedTypeName))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],c.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,c.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let E=c.fieldDataByName.get(p);if(!E)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,c.renamedTypeName)),[];let I=`${c.renamedTypeName}.${p}`;if(!E.subgraphNames.has(i))return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(yp.BASE_SCALARS.has(E.namedTypeName)){c={kind:Re.Kind.SCALAR_TYPE_DEFINITION,name:E.namedTypeName};continue}c=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,E.namedTypeName,ve.PARENT_DEFINITION_DATA)}return(0,ge.isLeafKind)(c.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ne.kindToNodeType)(c.kind),c.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,c){if(i>JE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([ve.FIELD_PATH,ve.VALUES]),p=new Set,E=new Set,I=[];for(let v of t.fields){let A=v.name.value,U=a+`.${A}`;switch(A){case ve.FIELD_PATH:{if(d.has(ve.FIELD_PATH))d.delete(ve.FIELD_PATH);else{l=!0,p.add(ve.FIELD_PATH);break}if(v.value.kind!==Re.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,ve.STRING,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,U,o,I);if(j.length<1){l=!0;break}n.fieldPath=j;break}case ve.VALUES:{if(d.has(ve.VALUES))d.delete(ve.VALUES);else{l=!0,p.add(ve.VALUES);break}let j=v.value.kind;if(j==Re.Kind.NULL||j==Re.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,ve.LIST,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}if(j!==Re.Kind.LIST){n.values=[(0,ge.getSubscriptionFilterValue)(v.value)];break}let $=new Set,re=[];for(let ee=0;ee0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(U,re));continue}if($.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(U));continue}n.values=[...$];break}default:l=!0,E.add(A)}}return l?(c.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...p],[...E],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,c){if(i>JE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!xc.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let p=a+`.${d}`;switch(l.value.kind){case Re.Kind.OBJECT:switch(d){case ve.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,c);case ve.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,c);default:return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,ve.LIST,ve.OBJECT)),!1}case Re.Kind.LIST:{let E=[];switch(d){case ve.AND_UPPER:{n.and=E;break}case ve.OR_UPPER:{n.or=E;break}default:return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,ve.OBJECT,ve.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return c.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,I)),!1;let v=!0,A=[];for(let U=0;U0?(c.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,A)),!1):v}default:{let E=xc.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?ve.LIST:ve.OBJECT;return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,E,(0,Ne.kindToNodeType)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,a,o){if(!t.arguments||t.arguments.length!==1)return;let c=t.arguments[0];if(c.value.kind!==Re.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(ve.CONDITION,ve.OBJECT,(0,Ne.kindToNodeType)(c.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(c.value,l,n,0,ve.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,r,()=>({argumentNames:[],fieldName:i,typeName:a})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessibleCoords.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(t,[(0,Pe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,ge.isNodeDataInaccessible)(r)||r.kind===Re.Kind.OBJECT_TYPE_DEFINITION&&this.validateSubscriptionFilterAndGenerateConfiguration(n.directive,r,t,n.fieldData.name,n.fieldData.renamedParentTypeName,n.directiveSubgraphName)}}buildFederationResult(){this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration(),this.invalidORScopesCoords.size>0&&this.errors.push((0,Pe.orScopesLimitError)(yp.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,ge.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,a,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType();for(let a of this.inaccessibleRequiredInputValueErrorByCoords.values())this.errors.push(a);if(this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};if(!this.disableResolvabilityValidation&&this.internalSubgraphBySubgraphName.size>1){let a=this.internalGraph.validate();if(!a.success)return{errors:a.errors,success:!1,warnings:this.warnings}}let n={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:c,name:l,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E}of this.internalSubgraphBySubgraphName.values())i.set(l,{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:c,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E});for(let a of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return M({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:n,federatedGraphSchema:(0,Re.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:i,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}getClientSchemaObjectBoolean(){return this.inaccessibleCoords.size<1&&this.tagNamesByCoords.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let a=n.size;for(let[o,c]of r){let l=(0,Ne.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,ge.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(c.tagNames)||((0,Ne.getValueOrDefault)(l.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,c]of n){if((0,ge.isNodeDataInaccessible)(c)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ne.getValueOrDefault)(c.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Fu.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,c]of this.parentTagDataByTypeName){let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,o,ve.PARENT_DEFINITION_DATA);if(!(0,ge.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(c.tagNames)){l.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(c.childTagDataByChildName.size<1))switch(l.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:break;case Re.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[p,E]of c.childTagDataByChildName){let I=(0,Ne.getOrThrowError)(l.fieldDataByName,p,`${o}.fieldDataByFieldName`);if((0,ge.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(E.tagNames)){(0,Ne.getValueOrDefault)(I.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,A]of E.tagNamesByArgumentName){let U=(0,Ne.getOrThrowError)(I.argumentDataByName,v,`${p}.argumentDataByArgumentName`);(0,ge.isNodeDataInaccessible)(U)||t.tagNamesToExclude.isDisjointFrom(A)||((0,Ne.getValueOrDefault)(U.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(U.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,c]of this.parentDefinitionDataByTypeName){if((0,ge.isNodeDataInaccessible)(c))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){c.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){c.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(c.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:continue;case Re.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.enumValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=c.fieldDataByName.size;for(let[p,E]of c.fieldDataByName){if((0,ge.isNodeDataInaccessible)(E)){d-=1;continue}let I=l.childTagDataByChildName.get(p);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ne.getValueOrDefault)(E.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(E.federatedCoords),d-=1)}d<1&&(c.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,ge.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,o,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let n=[];if(this.pushParentDefinitionDataToDocumentDefinitions(n),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(n),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};let r={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let{configurationDataByTypeName:o,directiveDefinitionByName:c,isVersionTwo:l,name:d,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I}of this.internalSubgraphBySubgraphName.values())a.set(d,{configurationDataByTypeName:o,directiveDefinitionByName:c,isVersionTwo:l,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I});for(let o of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return M({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:r,federatedGraphSchema:(0,Re.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:a,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};zE=new WeakSet,EV=function(){var r;let t=new Set,n=new Set;for(let i of this.referencedPersistedDirectiveNames){let a=yp.DIRECTIVE_DEFINITION_BY_NAME.get(i);if(!a)continue;let o=(r=xc.DEPENDENCIES_BY_DIRECTIVE_NAME.get(i))!=null?r:[];this.directiveDefinitionByName.set(i,a),xc.CLIENT_PERSISTED_DIRECTIVE_NAMES.has(i)&&(this.clientDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:t})),this.routerDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:n})}this.clientDefinitions.push(...t),this.routerDefinitions.push(...n)};qc.FederationFactory=HE;function ob({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,mfe.batchNormalize)(t);if(!n.success)return{errors:n.errors,success:!1,warnings:n.warnings};let r=new Map,i=new Map;for(let[c,l]of n.internalSubgraphBySubgraphName)for(let[d,p]of l.entityInterfaces){let E=r.get(d);if(!E){r.set(d,(0,Gr.newEntityInterfaceFederationData)(p,c));continue}(0,Gr.upsertEntityInterfaceFederationData)(E,p,c)}let a=new Array,o=new Map;for(let[c,l]of r){let d=l.concreteTypeNames.size;for(let[p,E]of l.subgraphDataByTypeName){let I=(0,Ne.getValueOrDefault)(o,p,()=>new Set);if((0,Ne.addIterableToSet)({source:E.concreteTypeNames,target:I}),!E.isInterfaceObject){E.resolvable&&E.concreteTypeNames.size!==d&&(0,Ne.getValueOrDefault)(i,c,()=>new Array).push({subgraphName:p,definedConcreteTypeNames:new Set(E.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ne.addIterableToSet)({source:l.concreteTypeNames,target:I});let{parentDefinitionDataByTypeName:v}=(0,Ne.getOrThrowError)(n.internalSubgraphBySubgraphName,p,"internalSubgraphBySubgraphName"),A=[];for(let U of l.concreteTypeNames)v.has(U)&&A.push(U);A.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(c,p,A))}}for(let[c,l]of i){let d=new Array;for(let p of l){let E=o.get(p.subgraphName);if(!E){d.push(p);continue}let I=p.requiredConcreteTypeNames.intersection(E);p.requiredConcreteTypeNames.size!==I.size&&(p.definedConcreteTypeNames=I,d.push(p))}if(d.length>0){i.set(c,d);continue}i.delete(c)}return i.size>0&&a.push((0,Pe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new HE({authorizationDataByParentTypeName:n.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:n.concreteTypeNamesByAbstractTypeName,disableResolvabilityValidation:e,entityDataByTypeName:n.entityDataByTypeName,entityInterfaceFederationDataByTypeName:r,fieldCoordsByNamedTypeName:n.fieldCoordsByNamedTypeName,internalSubgraphBySubgraphName:n.internalSubgraphBySubgraphName,internalGraph:n.internalGraph,warnings:n.warnings}),success:!0,warnings:n.warnings}}function hfe({disableResolvabilityValidation:e,subgraphs:t}){let n=ob({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function yfe({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=ob({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,TV.cloneDeep)(r.federationFactory)],a=r.federationFactory.buildFederationResult();if(!a.success)return{errors:a.errors,success:!1,warnings:a.warnings};let o=t.size-1,c=new Map,l=0;for(let[d,p]of t){l!==o&&i.push((0,TV.cloneDeep)(i[l]));let E=i[l].buildFederationContractResult(p);c.set(d,E),l++}return Q(M({},a),{federationResultByContractName:c})}function Ife({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=ob({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var WE=w(Bs=>{"use strict";m();T();N();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.LATEST_ROUTER_COMPATIBILITY_VERSION=Bs.ROUTER_COMPATIBILITY_VERSIONS=Bs.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;Bs.ROUTER_COMPATIBILITY_VERSION_ONE="1";Bs.ROUTER_COMPATIBILITY_VERSIONS=new Set([Bs.ROUTER_COMPATIBILITY_VERSION_ONE]);Bs.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var yV=w(Ip=>{"use strict";m();T();N();Object.defineProperty(Ip,"__esModule",{value:!0});Ip.federateSubgraphs=gfe;Ip.federateSubgraphsWithContracts=_fe;Ip.federateSubgraphsContract=vfe;var ub=hV(),cb=WE();function gfe({disableResolvabilityValidation:e,subgraphs:t,version:n=cb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,ub.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function _fe({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=cb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,ub.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function vfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=cb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,ub.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var gV=w(IV=>{"use strict";m();T();N();Object.defineProperty(IV,"__esModule",{value:!0})});var _V=w(gp=>{"use strict";m();T();N();Object.defineProperty(gp,"__esModule",{value:!0});gp.normalizeSubgraphFromString=Ofe;gp.normalizeSubgraph=Sfe;gp.batchNormalize=Dfe;var lb=rb(),db=WE();function Ofe(e,t=!0,n=db.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,lb.normalizeSubgraphFromString)(e,t)}}function Sfe(e,t,n,r=db.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,lb.normalizeSubgraph)(e,t,n)}}function Dfe(e,t=db.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,lb.batchNormalize)(e)}}});var OV=w(vV=>{"use strict";m();T();N();Object.defineProperty(vV,"__esModule",{value:!0})});var DV=w(SV=>{"use strict";m();T();N();Object.defineProperty(SV,"__esModule",{value:!0})});var AV=w(bV=>{"use strict";m();T();N();Object.defineProperty(bV,"__esModule",{value:!0})});var PV=w(RV=>{"use strict";m();T();N();Object.defineProperty(RV,"__esModule",{value:!0})});var wV=w(FV=>{"use strict";m();T();N();Object.defineProperty(FV,"__esModule",{value:!0})});var CV=w(LV=>{"use strict";m();T();N();Object.defineProperty(LV,"__esModule",{value:!0})});var BV=w(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.COMPOSITION_VERSION=void 0;XE.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var kV=w(UV=>{"use strict";m();T();N();Object.defineProperty(UV,"__esModule",{value:!0})});var xV=w(MV=>{"use strict";m();T();N();Object.defineProperty(MV,"__esModule",{value:!0})});var VV=w(qV=>{"use strict";m();T();N();Object.defineProperty(qV,"__esModule",{value:!0})});var KV=w(jV=>{"use strict";m();T();N();Object.defineProperty(jV,"__esModule",{value:!0})});var ZE=w(Xe=>{"use strict";m();T();N();var bfe=Xe&&Xe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lt=Xe&&Xe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&bfe(t,e,n)};Object.defineProperty(Xe,"__esModule",{value:!0});lt(Pr(),Xe);lt(Cv(),Xe);lt(qi(),Xe);lt(QM(),Xe);lt(yV(),Xe);lt(gV(),Xe);lt(_V(),Xe);lt(OV(),Xe);lt(ZD(),Xe);lt(jD(),Xe);lt(kE(),Xe);lt(DV(),Xe);lt(AV(),Xe);lt(YD(),Xe);lt(WE(),Xe);lt(PV(),Xe);lt(eb(),Xe);lt(Iu(),Xe);lt(Uf(),Xe);lt(Ul(),Xe);lt(wV(),Xe);lt(CV(),Xe);lt(BV(),Xe);lt(kV(),Xe);lt(zn(),Xe);lt(xV(),Xe);lt(Fr(),Xe);lt(LD(),Xe);lt(gu(),Xe);lt(kf(),Xe);lt(oE(),Xe);lt(uE(),Xe);lt(rd(),Xe);lt(sT(),Xe);lt(oT(),Xe);lt(sb(),Xe);lt(VV(),Xe);lt(AD(),Xe);lt(dp(),Xe);lt(KV(),Xe);lt(kD(),Xe);lt(QE(),Xe);lt(FD(),Xe);lt(lp(),Xe);lt(fp(),Xe)});var Ipe={};wm(Ipe,{buildRouterConfiguration:()=>ype,federateSubgraphs:()=>hpe});m();T();N();var Yc=ys(ZE());m();T();N();m();T();N();function fb(e){if(!e)return e;if(!URL.canParse(e))throw new Error("Invalid URL");let t=e.indexOf("?"),n=e.indexOf("#"),r=e;return t>0?r=r.slice(0,n>0?Math.min(t,n):t):n>0&&(r=r.slice(0,n)),r}m();T();N();m();T();N();var GV={};m();T();N();function $V(e){return e!=null}m();T();N();m();T();N();var zV=ys(Oe(),1);m();T();N();var QV;if(typeof AggregateError=="undefined"){class e extends Error{constructor(n,r=""){super(r),this.errors=n,this.name="AggregateError",Error.captureStackTrace(this,e)}}QV=function(t,n){return new e(t,n)}}else QV=AggregateError;function YV(e){return"errors"in e&&Array.isArray(e.errors)}var WV=3;function XV(e){return eh(e,[])}function eh(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Afe(e,t);default:return String(e)}}function JV(e){return e instanceof zV.GraphQLError?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function Afe(e,t){if(e===null)return"null";if(e instanceof Error)return YV(e)?JV(e)+` -`+HV(e.errors,t):JV(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Rfe(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:eh(r,n)}else if(Array.isArray(e))return HV(e,n);return Pfe(e,n)}function Rfe(e){return typeof e.toJSON=="function"}function Pfe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>WV?"["+Ffe(e)+"]":"{ "+n.map(([i,a])=>i+": "+eh(a,t)).join(", ")+" }"}function HV(e,t){if(e.length===0)return"[]";if(t.length>WV)return"[Array]";let n=e.length,r=[];for(let i=0;in==null?n:n[r],e==null?void 0:e.extensions)}m();T();N();var Fe=ys(Oe(),1);m();T();N();var is=ys(Oe(),1);function as(e){if((0,is.isNonNullType)(e)){let t=as(e.ofType);if(t.kind===is.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${XV(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:is.Kind.NON_NULL_TYPE,type:t}}else if((0,is.isListType)(e))return{kind:is.Kind.LIST_TYPE,type:as(e.ofType)};return{kind:is.Kind.NAMED_TYPE,name:{kind:is.Kind.NAME,value:e.name}}}m();T();N();var ss=ys(Oe(),1);function nh(e){if(e===null)return{kind:ss.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=nh(n);r!=null&&t.push(r)}return{kind:ss.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=nh(r);i&&t.push({kind:ss.Kind.OBJECT_FIELD,name:{kind:ss.Kind.NAME,value:n},value:i})}return{kind:ss.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:ss.Kind.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){let t=String(e);return wfe.test(t)?{kind:ss.Kind.INT,value:t}:{kind:ss.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:ss.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var wfe=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();m();T();N();function rh(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}var Gxe=rh(function(t){let n=Lfe(t);return new Set([...n].map(r=>r.name))}),Lfe=rh(function(t){let n=pb(t);return new Set(n.values())}),pb=rh(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n});function Cfe(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Bfe(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,Fe.isSpecifiedDirective)(c)||a.push(Ufe(c,e,n));for(let c in r){let l=r[c],d=(0,Fe.isSpecifiedScalarType)(l),p=(0,Fe.isIntrospectionType)(l);if(!(d||p))if((0,Fe.isObjectType)(l))a.push(kfe(l,e,n));else if((0,Fe.isInterfaceType)(l))a.push(Mfe(l,e,n));else if((0,Fe.isUnionType)(l))a.push(xfe(l,e,n));else if((0,Fe.isInputObjectType)(l))a.push(qfe(l,e,n));else if((0,Fe.isEnumType)(l))a.push(Vfe(l,e,n));else if((0,Fe.isScalarType)(l))a.push(jfe(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Fe.Kind.DOCUMENT,definitions:a}}function ZV(e,t={}){let n=Cfe(e,t);return(0,Fe.print)(n)}function Bfe(e,t){var n,r;let i=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),a=[];if(e.astNode!=null&&a.push(e.astNode),e.extensionASTNodes!=null)for(let p of e.extensionASTNodes)a.push(p);for(let p of a)if(p.operationTypes)for(let E of p.operationTypes)i.set(E.operation,E);let o=pb(e);for(let[p,E]of i){let I=o.get(p);if(I!=null){let v=as(I);E!=null?E.type=v:i.set(p,{kind:Fe.Kind.OPERATION_TYPE_DEFINITION,operation:p,type:v})}}let c=[...i.values()].filter($V),l=dd(e,e,t);if(!c.length&&!l.length)return null;let d={kind:c!=null?Fe.Kind.SCHEMA_DEFINITION:Fe.Kind.SCHEMA_EXTENSION,operationTypes:c,directives:l};return d.description=((r=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&r!==void 0?r:e.description!=null)?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,d}function Ufe(e,t,n){var r,i,a,o;return{kind:Fe.Kind.DIRECTIVE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},arguments:(a=e.args)===null||a===void 0?void 0:a.map(c=>ej(c,t,n)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(c=>({kind:Fe.Kind.NAME,value:c})))||[]}}function dd(e,t,n){let r=th(e,n),i=[];e.astNode!=null&&i.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(i=i.concat(e.extensionASTNodes));let a;if(r!=null)a=mb(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}function ah(e,t,n){var r,i;let a=[],o=null,c=th(e,n),l;return c!=null?l=mb(t,c):l=(r=e.astNode)===null||r===void 0?void 0:r.directives,l!=null&&(a=l.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(o=(i=l.filter(d=>d.name.value==="deprecated"))===null||i===void 0?void 0:i[0])),e.deprecationReason!=null&&o==null&&(o=$fe(e.deprecationReason)),o==null?a:[o].concat(a)}function ej(e,t,n){var r,i,a;return{kind:Fe.Kind.INPUT_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},type:as(e.type),defaultValue:e.defaultValue!==void 0&&(a=(0,Fe.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0,directives:ah(e,t,n)}}function kfe(e,t,n){var r,i;return{kind:Fe.Kind.OBJECT_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>tj(a,t,n)),interfaces:Object.values(e.getInterfaces()).map(a=>as(a)),directives:dd(e,t,n)}}function Mfe(e,t,n){var r,i;let a={kind:Fe.Kind.INTERFACE_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>tj(o,t,n)),directives:dd(e,t,n)};return"getInterfaces"in e&&(a.interfaces=Object.values(e.getInterfaces()).map(o=>as(o))),a}function xfe(e,t,n){var r,i;return{kind:Fe.Kind.UNION_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},directives:dd(e,t,n),types:e.getTypes().map(a=>as(a))}}function qfe(e,t,n){var r,i;return{kind:Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>Kfe(a,t,n)),directives:dd(e,t,n)}}function Vfe(e,t,n){var r,i;return{kind:Fe.Kind.ENUM_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(a=>Gfe(a,t,n)),directives:dd(e,t,n)}}function jfe(e,t,n){var r,i,a;let o=th(e,n),c=o?mb(t,o):((r=e.astNode)===null||r===void 0?void 0:r.directives)||[],l=e.specifiedByUrl||e.specifiedByURL;if(l&&!c.some(d=>d.name.value==="specifiedBy")){let d={url:l};c.push(ih("specifiedBy",d))}return{kind:Fe.Kind.SCALAR_TYPE_DEFINITION,description:(a=(i=e.astNode)===null||i===void 0?void 0:i.description)!==null&&a!==void 0?a:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},directives:c}}function tj(e,t,n){var r,i;return{kind:Fe.Kind.FIELD_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},arguments:e.args.map(a=>ej(a,t,n)),type:as(e.type),directives:ah(e,t,n)}}function Kfe(e,t,n){var r,i,a;return{kind:Fe.Kind.INPUT_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},type:as(e.type),directives:ah(e,t,n),defaultValue:(a=(0,Fe.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0}}function Gfe(e,t,n){var r,i;return{kind:Fe.Kind.ENUM_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},directives:ah(e,t,n)}}function $fe(e){return ih("deprecated",{reason:e},Fe.GraphQLDeprecatedDirective)}function ih(e,t,n){let r=[];if(n!=null)for(let i of n.args){let a=i.name,o=t[a];if(o!==void 0){let c=(0,Fe.astFromValue)(o,i.type);c&&r.push({kind:Fe.Kind.ARGUMENT,name:{kind:Fe.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=nh(a);o&&r.push({kind:Fe.Kind.ARGUMENT,name:{kind:Fe.Kind.NAME,value:i},value:o})}return{kind:Fe.Kind.DIRECTIVE,name:{kind:Fe.Kind.NAME,value:e},arguments:r}}function mb(e,t){let n=[];for(let r in t){let i=t[r],a=e==null?void 0:e.getDirective(r);if(Array.isArray(i))for(let o of i)n.push(ih(r,o,a));else n.push(ih(r,i,a))}return n}var Id=ys(ZE(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function pn(e,t){if(!e)throw new Error(t)}var Qfe=34028234663852886e22,Yfe=-34028234663852886e22,Jfe=4294967295,Hfe=2147483647,zfe=-2147483648;function fd(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>Hfe||eJfe||e<0)throw new Error("invalid uint 32: "+e)}function sh(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>Qfe||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function Tb(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let c=aj(o);a.push(c),r[o.name]=c,i[o.no]=c}return{typeName:e,values:a,findName(o){return r[o]},findNumber(o){return i[o]}}}function ij(e,t,n){let r={};for(let i of t){let a=aj(i);r[a.localName]=a.no,r[a.no]=a.localName}return Nb(r,e,t,n),r}function aj(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var we=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){let r=this.getType(),i=r.runtime.bin,a=i.makeReadOptions(n);return i.readMessage(this,a.readerFactory(t),t.byteLength,a),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,a=i.makeReadOptions(n);return i.readMessage(r,t,a,this),this}fromJsonString(t,n){let r;try{r=JSON.parse(t)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(r,n)}toBinary(t){let n=this.getType(),r=n.runtime.bin,i=r.makeWriteOptions(t),a=i.writerFactory();return r.writeMessage(this,a,i),a.finish()}toJson(t){let n=this.getType(),r=n.runtime.json,i=r.makeWriteOptions(t);return r.writeMessage(this,i)}toJsonString(t){var n;let r=this.toJson(t);return JSON.stringify(r,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function sj(e,t,n,r){var i;let a=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[a]:function(c){e.util.initFields(this),e.util.initPartial(c,this)}}[a];return Object.setPrototypeOf(o.prototype,new we),Object.assign(o,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(c,l){return new o().fromBinary(c,l)},fromJson(c,l){return new o().fromJson(c,l)},fromJsonString(c,l){return new o().fromJsonString(c,l)},equals(c,l){return e.util.equals(o,c,l)}}),o}m();T();N();m();T();N();m();T();N();m();T();N();function uj(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>a,c=!(!(o>>>7)&&t==0),l=(c?o|128:o)&255;if(n.push(l),!c)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,c=!!(o>>>7),l=(c?o|128:o)&255;if(n.push(l),!c)return}n.push(t>>>31&1)}}var oh=4294967296;function Eb(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(o,c){let l=Number(e.slice(o,c));i*=n,r=r*n+l,r>=oh&&(i=i+(r/oh|0),r=r%oh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?lj(r,i):yb(r,i)}function cj(e,t){let n=yb(e,t),r=n.hi&2147483648;r&&(n=lj(n.lo,n.hi));let i=hb(n.lo,n.hi);return r?"-"+i:i}function hb(e,t){if({lo:e,hi:t}=Wfe(e,t),t<=2097151)return String(oh*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,c=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(c+=Math.floor(o/l),o%=l),c.toString()+oj(o)+oj(a)}function Wfe(e,t){return{lo:e>>>0,hi:t>>>0}}function yb(e,t){return{lo:e|0,hi:t|0}}function lj(e,t){return t=~t,e?e=~e+1:t+=1,yb(e,t)}var oj=e=>{let t=String(e);return"0000000".slice(t.length)+t};function Ib(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function dj(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function Xfe(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof S!="object"||typeof S.env!="object"||S.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),o=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||dc||dpn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>pn(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),n(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),r(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),n(i),Eb(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),Eb(i)},dec(i,a){return cj(i,a)},uDec(i,a){return hb(i,a)}}}var Jn=Xfe();m();T();N();var fe;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(fe||(fe={}));var ba;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(ba||(ba={}));function Us(e,t,n){if(t===n)return!0;if(e==fe.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let r=0;r>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(_p(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return fd(t),Ib(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){sh(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){_p(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){fd(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return fd(t),t=(t<<1^t>>31)>>>0,Ib(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Jn.enc(t);return uh(n.lo,n.hi,this.buf),this}sint64(t){let n=Jn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return uh(i,a,this.buf),this}uint64(t){let n=Jn.uEnc(t);return uh(n.lo,n.hi,this.buf),this}},dh=class{constructor(t,n){this.varint64=uj,this.uint32=dj,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case xn.Varint:for(;this.buf[this.pos++]&128;);break;case xn.Bit64:this.pos+=4;case xn.Bit32:this.pos+=4;break;case xn.LengthDelimited:let r=this.uint32();this.pos+=r;break;case xn.StartGroup:let i;for(;(i=this.tag()[1])!==xn.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Jn.dec(...this.varint64())}uint64(){return Jn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Jn.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}};function fj(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let a=typeof r=="function"?r():r;a.name=t.split(".").pop(),a.jsonName=`[${t}]`,i=e.util.newFieldList([a]).list()[0]}return i},runtime:e}}function fh(e){let t=e.field.localName,n=Object.create(null);return n[t]=Zfe(e),[n,()=>n[t]]}function Zfe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return Aa(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}function pj(e,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(n=>n.no===t.no)}m();T();N();m();T();N();var ks="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),ph=[];for(let e=0;e>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a>2],i=(r&3)<<4,n=1;break;case 1:t+=ks[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=ks[i|r>>6],t+=ks[r&63],n=0;break}return n&&(t+=ks[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function mj(e,t,n){Tj(t,e);let r=t.runtime.bin.makeReadOptions(n),i=pj(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=fh(t);for(let c of i)t.runtime.bin.readField(a,r.readerFactory(c.data),t.field,c.wireType,r);return o()}function Nj(e,t,n,r){Tj(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(_b(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(p=>p.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let p of d)e.getType().runtime.bin.onUnknownField(e,p.no,p.wireType,p.data)}let o=a.writerFactory(),c=t.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(c,n,o,a);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function Tj(e,t){pn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function mh(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?t[n]!==void 0:e.kind=="enum"?t[n]!==e.T.values[0].no:!ch(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function vb(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?Aa(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ra(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(we.prototype).every(r=>r in e&&typeof e[r]=="function"))return!1;let n=e.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:t===void 0?!0:n.typeName==t.typeName}function Nh(e,t){return Ra(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var v1e={"google.protobuf.DoubleValue":fe.DOUBLE,"google.protobuf.FloatValue":fe.FLOAT,"google.protobuf.Int64Value":fe.INT64,"google.protobuf.UInt64Value":fe.UINT64,"google.protobuf.Int32Value":fe.INT32,"google.protobuf.UInt32Value":fe.UINT32,"google.protobuf.BoolValue":fe.BOOL,"google.protobuf.StringValue":fe.STRING,"google.protobuf.BytesValue":fe.BYTES};var Ej={ignoreUnknownFields:!1},hj={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function epe(e){return e?Object.assign(Object.assign({},Ej),e):Ej}function tpe(e){return e?Object.assign(Object.assign({},hj),e):hj}var hh=Symbol(),Th=Symbol();function gj(){return{makeReadOptions:epe,makeWriteOptions:tpe,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${os(t)}`);r=r!=null?r:new e;let i=new Map,a=n.typeRegistry;for(let[o,c]of Object.entries(t)){let l=e.fields.findJsonName(o);if(l){if(l.oneof){if(c===null&&l.kind=="scalar")continue;let d=i.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${o}"`);i.set(l.oneof,o)}yj(r,c,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=a.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[E,I]=fh(p);yj(E,c,p.field,n,p),Nj(r,p,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!mh(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!rpe(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],c=Ij(i,o,t);c!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=c)}let a=t.typeRegistry;if(a!=null&&a.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let c=a.findExtensionFor(n.typeName,o.no);if(c&&_b(e,c)){let l=mj(e,c,t),d=Ij(c.field,l,t);d!==void 0&&(r[c.field.jsonName]=d)}}}catch(a){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=a instanceof Error?a.message:String(a);throw new Error(o+(c.length>0?`: ${c}`:""))}return r},readScalar(e,t,n){return vp(e,t,n!=null?n:ba.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||ch(e,t)))return Eh(e,t)},debug:os}}function os(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function yj(e,t,n,r,i){let a=n.localName;if(n.repeated){if(pn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(t)}`);let o=e[a];for(let c of t){if(c===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(c)}`);switch(n.kind){case"message":o.push(n.T.fromJson(c,r));break;case"enum":let l=Ob(n.T,c,r.ignoreUnknownFields,!0);l!==Th&&o.push(l);break;case"scalar":try{o.push(vp(n.T,c,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(c)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}}else if(n.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(t)}`);let o=e[a];for(let[c,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let d;try{d=npe(n.K,c)}catch(p){let E=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${os(t)}`;throw p instanceof Error&&p.message.length>0&&(E+=`: ${p.message}`),new Error(E)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=Ob(n.V.T,l,r.ignoreUnknownFields,!0);p!==Th&&(o[d]=p);break;case"scalar":try{o[d]=vp(n.V.T,l,ba.BIGINT,!0)}catch(E){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${os(t)}`;throw E instanceof Error&&E.message.length>0&&(I+=`: ${E.message}`),new Error(I)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let c=e[a];Ra(c)?c.fromJson(t,r):(e[a]=c=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(c)));break;case"enum":let l=Ob(n.T,t,r.ignoreUnknownFields,!1);switch(l){case hh:vb(n,e);break;case Th:break;default:e[a]=l;break}break;case"scalar":try{let d=vp(n.T,t,n.L,!1);switch(d){case hh:vb(n,e);break;default:e[a]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function npe(e,t){if(e===fe.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return vp(e,t,ba.BIGINT,!0).toString()}function vp(e,t,n,r){if(t===null)return r?Aa(e,n):hh;switch(e){case fe.DOUBLE:case fe.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==fe.FLOAT&&sh(i),i;case fe.INT32:case fe.FIXED32:case fe.SFIXED32:case fe.SINT32:case fe.UINT32:let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==fe.UINT32||e==fe.FIXED32?_p(a):fd(a),a;case fe.INT64:case fe.SFIXED64:case fe.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Jn.parse(t);return n?o.toString():o;case fe.FIXED64:case fe.UINT64:if(typeof t!="number"&&typeof t!="string")break;let c=Jn.uParse(t);return n?c.toString():c;case fe.BOOL:if(typeof t!="boolean")break;return t;case fe.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case fe.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return gb.dec(t)}throw new Error}function Ob(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:hh;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(i!==void 0)return i.no;if(n)return Th;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${os(t)}`)}function rpe(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function Ij(e,t,n){if(e.kind=="map"){pn(typeof t=="object"&&t!=null);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[o,c]of i)r[o.toString()]=Eh(e.V.T,c);break;case"message":for(let[o,c]of i)r[o.toString()]=c.toJson(n);break;case"enum":let a=e.V.T;for(let[o,c]of i)r[o.toString()]=Sb(a,c,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){pn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return Eh(e.T,t);case"enum":return Sb(e.T,t,n.enumAsInteger);case"message":return Nh(e.T,t).toJson(n)}}function Sb(e,t,n){var r;if(pn(typeof t=="number"),e.typeName=="google.protobuf.NullValue")return null;if(n)return t;let i=e.findNumber(t);return(r=i==null?void 0:i.name)!==null&&r!==void 0?r:t}function Eh(e,t){switch(e){case fe.INT32:case fe.SFIXED32:case fe.SINT32:case fe.FIXED32:case fe.UINT32:return pn(typeof t=="number"),t;case fe.FLOAT:case fe.DOUBLE:return pn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case fe.STRING:return pn(typeof t=="string"),t;case fe.BOOL:return pn(typeof t=="boolean"),t;case fe.UINT64:case fe.FIXED64:case fe.INT64:case fe.SFIXED64:case fe.SINT64:return pn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case fe.BYTES:return pn(t instanceof Uint8Array),gb.enc(t)}}m();T();N();var pd=Symbol("@bufbuild/protobuf/unknown-fields"),_j={readUnknownFields:!0,readerFactory:e=>new dh(e)},vj={writeUnknownFields:!0,writerFactory:()=>new lh};function ipe(e){return e?Object.assign(Object.assign({},_j),e):_j}function ape(e){return e?Object.assign(Object.assign({},vj),e):vj}function bj(){return{makeReadOptions:ipe,makeWriteOptions:ape,listUnknownFields(e){var t;return(t=e[pd])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[pd]},writeUnknownFields(e,t){let r=e[pd];if(r)for(let i of r)t.tag(i.no,i.wireType).raw(i.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[pd])||(i[pd]=[]),i[pd].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,c,l;for(;t.pos0&&(l=ope),a){let I=e[o];if(r==xn.LengthDelimited&&c!=fe.STRING&&c!=fe.BYTES){let A=t.uint32()+t.pos;for(;t.posRa(I,E)?I:new E(I));else{let I=o[i];E.fieldWrapper?E.typeName==="google.protobuf.BytesValue"?a[i]=Sp(I):a[i]=I:a[i]=Ra(I,E)?I:new E(I)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],a=n[r.localName];if(r.repeated){if(i.length!==a.length)return!1;switch(r.kind){case"message":return i.every((o,c)=>r.T.equals(o,a[c]));case"scalar":return i.every((o,c)=>Us(r.T,o,a[c]));case"enum":return i.every((o,c)=>Us(fe.INT32,o,a[c]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,a);case"enum":return Us(fe.INT32,i,a);case"scalar":return Us(r.T,i,a);case"oneof":if(i.case!==a.case)return!1;let o=r.findField(i.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(i.value,a.value);case"enum":return Us(fe.INT32,i.value,a.value);case"scalar":return Us(o.T,i.value,a.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let c=Object.keys(i).concat(Object.keys(a));switch(r.V.kind){case"message":let l=r.V.T;return c.every(p=>l.equals(i[p],a[p]));case"enum":return c.every(p=>Us(fe.INT32,i[p],a[p]));case"scalar":let d=r.V.T;return c.every(p=>Us(d,i[p],a[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let a=e[i.localName],o;if(i.repeated)o=a.map(gh);else if(i.kind=="map"){o=r[i.localName];for(let[c,l]of Object.entries(a))o[c]=gh(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:gh(a.value)}:{case:void 0}:o=gh(a);r[i.localName]=o}for(let i of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,i.no,i.wireType,i.data);return n}}}function gh(e){if(e===void 0)return e;if(Ra(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Sp(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Pj(e,t,n){return{syntax:e,json:gj(),bin:bj(),util:Object.assign(Object.assign({},Rj()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return sj(this,r,i,a)},makeEnum:ij,makeEnumType:Tb,getEnumType:rj,makeExtension(r,i,a){return fj(this,r,i,a)}}}m();T();N();var _h=class{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){let n={};for(let r of this.list())n[r.jsonName]=n[r.name]=r;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){let n={};for(let r of this.list())n[r.no]=r;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,n;for(let r of this.list())r.oneof?r.oneof!==n&&(n=r.oneof,t.push(n)):t.push(r)}return this.members}};m();T();N();m();T();N();m();T();N();function Db(e,t){let n=Lj(e);return t?n:ppe(fpe(n))}function Fj(e){return Db(e,!1)}var wj=Lj;function Lj(e){let t=!1,n=[];for(let r=0;r`${e}$`,fpe=e=>dpe.has(e)?Cj(e):e,ppe=e=>lpe.has(e)?Cj(e):e;var vh=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=Fj(t)}addField(t){pn(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;nnew _h(e,t=>Bj(t,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case"oneof":r[n]={case:void 0};break;case"enum":r[n]=0;break;case"map":r[n]={};break;case"scalar":r[n]=Aa(t.T,t.L);break;case"message":break}}});var md;(function(e){e[e.OK=0]="OK",e[e.ERR=1]="ERR",e[e.ERR_NOT_FOUND=2]="ERR_NOT_FOUND",e[e.ERR_ALREADY_EXISTS=3]="ERR_ALREADY_EXISTS",e[e.ERR_INVALID_SUBGRAPH_SCHEMA=4]="ERR_INVALID_SUBGRAPH_SCHEMA",e[e.ERR_SUBGRAPH_COMPOSITION_FAILED=5]="ERR_SUBGRAPH_COMPOSITION_FAILED",e[e.ERR_SUBGRAPH_CHECK_FAILED=6]="ERR_SUBGRAPH_CHECK_FAILED",e[e.ERR_INVALID_LABELS=7]="ERR_INVALID_LABELS",e[e.ERR_ANALYTICS_DISABLED=8]="ERR_ANALYTICS_DISABLED",e[e.ERROR_NOT_AUTHENTICATED=9]="ERROR_NOT_AUTHENTICATED",e[e.ERR_OPENAI_DISABLED=10]="ERR_OPENAI_DISABLED",e[e.ERR_FREE_TRIAL_EXPIRED=11]="ERR_FREE_TRIAL_EXPIRED",e[e.ERROR_NOT_AUTHORIZED=12]="ERROR_NOT_AUTHORIZED",e[e.ERR_LIMIT_REACHED=13]="ERR_LIMIT_REACHED",e[e.ERR_DEPLOYMENT_FAILED=14]="ERR_DEPLOYMENT_FAILED",e[e.ERR_INVALID_NAME=15]="ERR_INVALID_NAME",e[e.ERR_UPGRADE_PLAN=16]="ERR_UPGRADE_PLAN",e[e.ERR_BAD_REQUEST=17]="ERR_BAD_REQUEST",e[e.ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL=18]="ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"})(md||(md={}));C.util.setEnumType(md,"wg.cosmo.common.EnumStatusCode",[{no:0,name:"OK"},{no:1,name:"ERR"},{no:2,name:"ERR_NOT_FOUND"},{no:3,name:"ERR_ALREADY_EXISTS"},{no:4,name:"ERR_INVALID_SUBGRAPH_SCHEMA"},{no:5,name:"ERR_SUBGRAPH_COMPOSITION_FAILED"},{no:6,name:"ERR_SUBGRAPH_CHECK_FAILED"},{no:7,name:"ERR_INVALID_LABELS"},{no:8,name:"ERR_ANALYTICS_DISABLED"},{no:9,name:"ERROR_NOT_AUTHENTICATED"},{no:10,name:"ERR_OPENAI_DISABLED"},{no:11,name:"ERR_FREE_TRIAL_EXPIRED"},{no:12,name:"ERROR_NOT_AUTHORIZED"},{no:13,name:"ERR_LIMIT_REACHED"},{no:14,name:"ERR_DEPLOYMENT_FAILED"},{no:15,name:"ERR_INVALID_NAME"},{no:16,name:"ERR_UPGRADE_PLAN"},{no:17,name:"ERR_BAD_REQUEST"},{no:18,name:"ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"}]);var Ms;(function(e){e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS=0]="GRAPHQL_SUBSCRIPTION_PROTOCOL_WS",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE=1]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST=2]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"})(Ms||(Ms={}));C.util.setEnumType(Ms,"wg.cosmo.common.GraphQLSubscriptionProtocol",[{no:0,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},{no:1,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE"},{no:2,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"}]);var xs;(function(e){e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO=0]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS=1]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS=2]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"})(xs||(xs={}));C.util.setEnumType(xs,"wg.cosmo.common.GraphQLWebsocketSubprotocol",[{no:0,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO"},{no:1,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS"},{no:2,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"}]);var $j=ys(Oe(),1);m();T();N();var bb;(function(e){e[e.RENDER_ARGUMENT_DEFAULT=0]="RENDER_ARGUMENT_DEFAULT",e[e.RENDER_ARGUMENT_AS_GRAPHQL_VALUE=1]="RENDER_ARGUMENT_AS_GRAPHQL_VALUE",e[e.RENDER_ARGUMENT_AS_ARRAY_CSV=2]="RENDER_ARGUMENT_AS_ARRAY_CSV"})(bb||(bb={}));C.util.setEnumType(bb,"wg.cosmo.node.v1.ArgumentRenderConfiguration",[{no:0,name:"RENDER_ARGUMENT_DEFAULT"},{no:1,name:"RENDER_ARGUMENT_AS_GRAPHQL_VALUE"},{no:2,name:"RENDER_ARGUMENT_AS_ARRAY_CSV"}]);var jc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(jc||(jc={}));C.util.setEnumType(jc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var wu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(wu||(wu={}));C.util.setEnumType(wu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var Dp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.RESOLVE=1]="RESOLVE",e[e.REQUIRES=2]="REQUIRES"})(Dp||(Dp={}));C.util.setEnumType(Dp,"wg.cosmo.node.v1.LookupType",[{no:0,name:"LOOKUP_TYPE_UNSPECIFIED"},{no:1,name:"LOOKUP_TYPE_RESOLVE"},{no:2,name:"LOOKUP_TYPE_REQUIRES"}]);var bp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(bp||(bp={}));C.util.setEnumType(bp,"wg.cosmo.node.v1.OperationType",[{no:0,name:"OPERATION_TYPE_UNSPECIFIED"},{no:1,name:"OPERATION_TYPE_QUERY"},{no:2,name:"OPERATION_TYPE_MUTATION"},{no:3,name:"OPERATION_TYPE_SUBSCRIPTION"}]);var Ho;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(Ho||(Ho={}));C.util.setEnumType(Ho,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Lu;(function(e){e[e.STATIC_CONFIGURATION_VARIABLE=0]="STATIC_CONFIGURATION_VARIABLE",e[e.ENV_CONFIGURATION_VARIABLE=1]="ENV_CONFIGURATION_VARIABLE",e[e.PLACEHOLDER_CONFIGURATION_VARIABLE=2]="PLACEHOLDER_CONFIGURATION_VARIABLE"})(Lu||(Lu={}));C.util.setEnumType(Lu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Kc;(function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS"})(Kc||(Kc={}));C.util.setEnumType(Kc,"wg.cosmo.node.v1.HTTPMethod",[{no:0,name:"GET"},{no:1,name:"POST"},{no:2,name:"PUT"},{no:3,name:"DELETE"},{no:4,name:"OPTIONS"}]);var qs=class qs extends we{constructor(n){super();_(this,"id","");_(this,"name","");_(this,"routingUrl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qs().fromBinary(n,r)}static fromJson(n,r){return new qs().fromJson(n,r)}static fromJsonString(n,r){return new qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qs,n,r)}};_(qs,"runtime",C),_(qs,"typeName","wg.cosmo.node.v1.Subgraph"),_(qs,"fields",C.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"routing_url",kind:"scalar",T:9}]));var Oh=qs,Vs=class Vs extends we{constructor(n){super();_(this,"configByFeatureFlagName",{});C.util.initPartial(n,this)}static fromBinary(n,r){return new Vs().fromBinary(n,r)}static fromJson(n,r){return new Vs().fromJson(n,r)}static fromJsonString(n,r){return new Vs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vs,n,r)}};_(Vs,"runtime",C),_(Vs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),_(Vs,"fields",C.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:Rb}}]));var Ab=Vs,js=class js extends we{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new js().fromBinary(n,r)}static fromJson(n,r){return new js().fromJson(n,r)}static fromJsonString(n,r){return new js().fromJsonString(n,r)}static equals(n,r){return C.util.equals(js,n,r)}};_(js,"runtime",C),_(js,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),_(js,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Nd},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:Oh,repeated:!0}]));var Rb=js,Ks=class Ks extends we{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);_(this,"featureFlagConfigs");_(this,"compatibilityVersion","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ks().fromBinary(n,r)}static fromJson(n,r){return new Ks().fromJson(n,r)}static fromJsonString(n,r){return new Ks().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ks,n,r)}};_(Ks,"runtime",C),_(Ks,"typeName","wg.cosmo.node.v1.RouterConfig"),_(Ks,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Nd},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:Oh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:Ab,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var Ap=Ks,Gs=class Gs extends we{constructor(n){super();_(this,"code",md.OK);_(this,"details");C.util.initPartial(n,this)}static fromBinary(n,r){return new Gs().fromBinary(n,r)}static fromJson(n,r){return new Gs().fromJson(n,r)}static fromJsonString(n,r){return new Gs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Gs,n,r)}};_(Gs,"runtime",C),_(Gs,"typeName","wg.cosmo.node.v1.Response"),_(Gs,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:C.getEnumType(md)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var Pb=Gs,$s=class $s extends we{constructor(n){super();_(this,"code",0);_(this,"message","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $s().fromBinary(n,r)}static fromJson(n,r){return new $s().fromJson(n,r)}static fromJsonString(n,r){return new $s().fromJsonString(n,r)}static equals(n,r){return C.util.equals($s,n,r)}};_($s,"runtime",C),_($s,"typeName","wg.cosmo.node.v1.ResponseStatus"),_($s,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var Uj=$s,Qs=class Qs extends we{constructor(n){super();_(this,"accountLimits");_(this,"graphPublicKey","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qs().fromBinary(n,r)}static fromJson(n,r){return new Qs().fromJson(n,r)}static fromJsonString(n,r){return new Qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qs,n,r)}};_(Qs,"runtime",C),_(Qs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),_(Qs,"fields",C.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:wb},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var Fb=Qs,Ys=class Ys extends we{constructor(n){super();_(this,"traceSamplingRate",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ys().fromBinary(n,r)}static fromJson(n,r){return new Ys().fromJson(n,r)}static fromJsonString(n,r){return new Ys().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ys,n,r)}};_(Ys,"runtime",C),_(Ys,"typeName","wg.cosmo.node.v1.AccountLimits"),_(Ys,"fields",C.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var wb=Ys,Js=class Js extends we{constructor(t){super(),C.util.initPartial(t,this)}static fromBinary(t,n){return new Js().fromBinary(t,n)}static fromJson(t,n){return new Js().fromJson(t,n)}static fromJsonString(t,n){return new Js().fromJsonString(t,n)}static equals(t,n){return C.util.equals(Js,t,n)}};_(Js,"runtime",C),_(Js,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),_(Js,"fields",C.util.newFieldList(()=>[]));var kj=Js,Hs=class Hs extends we{constructor(n){super();_(this,"response");_(this,"registrationInfo");C.util.initPartial(n,this)}static fromBinary(n,r){return new Hs().fromBinary(n,r)}static fromJson(n,r){return new Hs().fromJson(n,r)}static fromJsonString(n,r){return new Hs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Hs,n,r)}};_(Hs,"runtime",C),_(Hs,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),_(Hs,"fields",C.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:Pb},{no:2,name:"registrationInfo",kind:"message",T:Fb,opt:!0}]));var Mj=Hs,zs=class zs extends we{constructor(n){super();_(this,"defaultFlushInterval",Jn.zero);_(this,"datasourceConfigurations",[]);_(this,"fieldConfigurations",[]);_(this,"graphqlSchema","");_(this,"typeConfigurations",[]);_(this,"stringStorage",{});_(this,"graphqlClientSchema");C.util.initPartial(n,this)}static fromBinary(n,r){return new zs().fromBinary(n,r)}static fromJson(n,r){return new zs().fromJson(n,r)}static fromJsonString(n,r){return new zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zs,n,r)}};_(zs,"runtime",C),_(zs,"typeName","wg.cosmo.node.v1.EngineConfiguration"),_(zs,"fields",C.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:Rp,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:wp,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:Lb,repeated:!0},{no:6,name:"string_storage",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"graphql_client_schema",kind:"scalar",T:9,opt:!0}]));var Nd=zs,Ws=class Ws extends we{constructor(n){super();_(this,"kind",wu.STATIC);_(this,"rootNodes",[]);_(this,"childNodes",[]);_(this,"overrideFieldPathFromAlias",!1);_(this,"customGraphql");_(this,"customStatic");_(this,"directives",[]);_(this,"requestTimeoutSeconds",Jn.zero);_(this,"id","");_(this,"keys",[]);_(this,"provides",[]);_(this,"requires",[]);_(this,"customEvents");_(this,"entityInterfaces",[]);_(this,"interfaceObjects",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ws().fromBinary(n,r)}static fromJson(n,r){return new Ws().fromJson(n,r)}static fromJsonString(n,r){return new Ws().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ws,n,r)}};_(Ws,"runtime",C),_(Ws,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),_(Ws,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(wu)},{no:2,name:"root_nodes",kind:"message",T:Td,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:Td,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Bp},{no:6,name:"custom_static",kind:"message",T:$b},{no:7,name:"directives",kind:"message",T:Qb,repeated:!0},{no:8,name:"request_timeout_seconds",kind:"scalar",T:3},{no:9,name:"id",kind:"scalar",T:9},{no:10,name:"keys",kind:"message",T:Vc,repeated:!0},{no:11,name:"provides",kind:"message",T:Vc,repeated:!0},{no:12,name:"requires",kind:"message",T:Vc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:$c},{no:14,name:"entity_interfaces",kind:"message",T:Ed,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:Ed,repeated:!0}]));var Rp=Ws,Xs=class Xs extends we{constructor(n){super();_(this,"name","");_(this,"sourceType",jc.OBJECT_FIELD);C.util.initPartial(n,this)}static fromBinary(n,r){return new Xs().fromBinary(n,r)}static fromJson(n,r){return new Xs().fromJson(n,r)}static fromJsonString(n,r){return new Xs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Xs,n,r)}};_(Xs,"runtime",C),_(Xs,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),_(Xs,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:C.getEnumType(jc)}]));var Pp=Xs,Zs=class Zs extends we{constructor(n){super();_(this,"requiredAndScopes",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Zs().fromBinary(n,r)}static fromJson(n,r){return new Zs().fromJson(n,r)}static fromJsonString(n,r){return new Zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zs,n,r)}};_(Zs,"runtime",C),_(Zs,"typeName","wg.cosmo.node.v1.Scopes"),_(Zs,"fields",C.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Gc=Zs,eo=class eo extends we{constructor(n){super();_(this,"requiresAuthentication",!1);_(this,"requiredOrScopes",[]);_(this,"requiredOrScopesByOr",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new eo().fromBinary(n,r)}static fromJson(n,r){return new eo().fromJson(n,r)}static fromJsonString(n,r){return new eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(eo,n,r)}};_(eo,"runtime",C),_(eo,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),_(eo,"fields",C.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Gc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Gc,repeated:!0}]));var Fp=eo,to=class to extends we{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"argumentsConfiguration",[]);_(this,"authorizationConfiguration");_(this,"subscriptionFilterCondition");C.util.initPartial(n,this)}static fromBinary(n,r){return new to().fromBinary(n,r)}static fromJson(n,r){return new to().fromJson(n,r)}static fromJsonString(n,r){return new to().fromJsonString(n,r)}static equals(n,r){return C.util.equals(to,n,r)}};_(to,"runtime",C),_(to,"typeName","wg.cosmo.node.v1.FieldConfiguration"),_(to,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"arguments_configuration",kind:"message",T:Pp,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:Fp},{no:5,name:"subscription_filter_condition",kind:"message",T:Cu,opt:!0}]));var wp=to,no=class no extends we{constructor(n){super();_(this,"typeName","");_(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new no().fromBinary(n,r)}static fromJson(n,r){return new no().fromJson(n,r)}static fromJsonString(n,r){return new no().fromJsonString(n,r)}static equals(n,r){return C.util.equals(no,n,r)}};_(no,"runtime",C),_(no,"typeName","wg.cosmo.node.v1.TypeConfiguration"),_(no,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var Lb=no,ro=class ro extends we{constructor(n){super();_(this,"typeName","");_(this,"fieldNames",[]);_(this,"externalFieldNames",[]);_(this,"requireFetchReasonsFieldNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ro().fromBinary(n,r)}static fromJson(n,r){return new ro().fromJson(n,r)}static fromJsonString(n,r){return new ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ro,n,r)}};_(ro,"runtime",C),_(ro,"typeName","wg.cosmo.node.v1.TypeField"),_(ro,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_names",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_field_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"require_fetch_reasons_field_names",kind:"scalar",T:9,repeated:!0}]));var Td=ro,io=class io extends we{constructor(n){super();_(this,"fieldName","");_(this,"typeName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new io().fromBinary(n,r)}static fromJson(n,r){return new io().fromJson(n,r)}static fromJsonString(n,r){return new io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(io,n,r)}};_(io,"runtime",C),_(io,"typeName","wg.cosmo.node.v1.FieldCoordinates"),_(io,"fields",C.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var Lp=io,ao=class ao extends we{constructor(n){super();_(this,"fieldCoordinatesPath",[]);_(this,"fieldPath",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ao().fromBinary(n,r)}static fromJson(n,r){return new ao().fromJson(n,r)}static fromJsonString(n,r){return new ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ao,n,r)}};_(ao,"runtime",C),_(ao,"typeName","wg.cosmo.node.v1.FieldSetCondition"),_(ao,"fields",C.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:Lp,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Cp=ao,so=class so extends we{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"selectionSet","");_(this,"disableEntityResolver",!1);_(this,"conditions",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new so().fromBinary(n,r)}static fromJson(n,r){return new so().fromJson(n,r)}static fromJsonString(n,r){return new so().fromJsonString(n,r)}static equals(n,r){return C.util.equals(so,n,r)}};_(so,"runtime",C),_(so,"typeName","wg.cosmo.node.v1.RequiredField"),_(so,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"selection_set",kind:"scalar",T:9},{no:4,name:"disable_entity_resolver",kind:"scalar",T:8},{no:5,name:"conditions",kind:"message",T:Cp,repeated:!0}]));var Vc=so,oo=class oo extends we{constructor(n){super();_(this,"interfaceTypeName","");_(this,"concreteTypeNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new oo().fromBinary(n,r)}static fromJson(n,r){return new oo().fromJson(n,r)}static fromJsonString(n,r){return new oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(oo,n,r)}};_(oo,"runtime",C),_(oo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),_(oo,"fields",C.util.newFieldList(()=>[{no:1,name:"interface_type_name",kind:"scalar",T:9},{no:2,name:"concrete_type_names",kind:"scalar",T:9,repeated:!0}]));var Ed=oo,uo=class uo extends we{constructor(n){super();_(this,"url");_(this,"method",Kc.GET);_(this,"header",{});_(this,"body");_(this,"query",[]);_(this,"urlEncodeBody",!1);_(this,"mtls");_(this,"baseUrl");_(this,"path");_(this,"httpProxyUrl");C.util.initPartial(n,this)}static fromBinary(n,r){return new uo().fromBinary(n,r)}static fromJson(n,r){return new uo().fromJson(n,r)}static fromJsonString(n,r){return new uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(uo,n,r)}};_(uo,"runtime",C),_(uo,"typeName","wg.cosmo.node.v1.FetchConfiguration"),_(uo,"fields",C.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:$r},{no:2,name:"method",kind:"enum",T:C.getEnumType(Kc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:Jb}},{no:4,name:"body",kind:"message",T:$r},{no:5,name:"query",kind:"message",T:Yb,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:Hb},{no:9,name:"base_url",kind:"message",T:$r},{no:10,name:"path",kind:"message",T:$r},{no:11,name:"http_proxy_url",kind:"message",T:$r,opt:!0}]));var Cb=uo,co=class co extends we{constructor(n){super();_(this,"statusCode",Jn.zero);_(this,"typeName","");_(this,"injectStatusCodeIntoBody",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new co().fromBinary(n,r)}static fromJson(n,r){return new co().fromJson(n,r)}static fromJsonString(n,r){return new co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(co,n,r)}};_(co,"runtime",C),_(co,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),_(co,"fields",C.util.newFieldList(()=>[{no:1,name:"status_code",kind:"scalar",T:3},{no:2,name:"type_name",kind:"scalar",T:9},{no:3,name:"inject_status_code_into_body",kind:"scalar",T:8}]));var xj=co,lo=class lo extends we{constructor(n){super();_(this,"fetch");_(this,"subscription");_(this,"federation");_(this,"upstreamSchema");_(this,"customScalarTypeFields",[]);_(this,"grpc");C.util.initPartial(n,this)}static fromBinary(n,r){return new lo().fromBinary(n,r)}static fromJson(n,r){return new lo().fromJson(n,r)}static fromJsonString(n,r){return new lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(lo,n,r)}};_(lo,"runtime",C),_(lo,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),_(lo,"fields",C.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:Cb},{no:2,name:"subscription",kind:"message",T:zb},{no:3,name:"federation",kind:"message",T:Wb},{no:4,name:"upstream_schema",kind:"message",T:Vp},{no:6,name:"custom_scalar_type_fields",kind:"message",T:Xb,repeated:!0},{no:7,name:"grpc",kind:"message",T:hd}]));var Bp=lo,fo=class fo extends we{constructor(n){super();_(this,"mapping");_(this,"protoSchema","");_(this,"plugin");C.util.initPartial(n,this)}static fromBinary(n,r){return new fo().fromBinary(n,r)}static fromJson(n,r){return new fo().fromJson(n,r)}static fromJsonString(n,r){return new fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(fo,n,r)}};_(fo,"runtime",C),_(fo,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),_(fo,"fields",C.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:Ub},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Up}]));var hd=fo,po=class po extends we{constructor(n){super();_(this,"repository","");_(this,"reference","");C.util.initPartial(n,this)}static fromBinary(n,r){return new po().fromBinary(n,r)}static fromJson(n,r){return new po().fromJson(n,r)}static fromJsonString(n,r){return new po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(po,n,r)}};_(po,"runtime",C),_(po,"typeName","wg.cosmo.node.v1.ImageReference"),_(po,"fields",C.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var Bb=po,mo=class mo extends we{constructor(n){super();_(this,"name","");_(this,"version","");_(this,"imageReference");C.util.initPartial(n,this)}static fromBinary(n,r){return new mo().fromBinary(n,r)}static fromJson(n,r){return new mo().fromJson(n,r)}static fromJsonString(n,r){return new mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(mo,n,r)}};_(mo,"runtime",C),_(mo,"typeName","wg.cosmo.node.v1.PluginConfiguration"),_(mo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"image_reference",kind:"message",T:Bb,opt:!0}]));var Up=mo,No=class No extends we{constructor(n){super();_(this,"enabled",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new No().fromBinary(n,r)}static fromJson(n,r){return new No().fromJson(n,r)}static fromJsonString(n,r){return new No().fromJsonString(n,r)}static equals(n,r){return C.util.equals(No,n,r)}};_(No,"runtime",C),_(No,"typeName","wg.cosmo.node.v1.SSLConfiguration"),_(No,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var qj=No,To=class To extends we{constructor(n){super();_(this,"version",0);_(this,"service","");_(this,"operationMappings",[]);_(this,"entityMappings",[]);_(this,"typeFieldMappings",[]);_(this,"enumMappings",[]);_(this,"resolveMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new To().fromBinary(n,r)}static fromJson(n,r){return new To().fromJson(n,r)}static fromJsonString(n,r){return new To().fromJsonString(n,r)}static equals(n,r){return C.util.equals(To,n,r)}};_(To,"runtime",C),_(To,"typeName","wg.cosmo.node.v1.GRPCMapping"),_(To,"fields",C.util.newFieldList(()=>[{no:1,name:"version",kind:"scalar",T:5},{no:2,name:"service",kind:"scalar",T:9},{no:3,name:"operation_mappings",kind:"message",T:xb,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:qb,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:Vb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:Kb,repeated:!0},{no:7,name:"resolve_mappings",kind:"message",T:kb,repeated:!0}]));var Ub=To,Eo=class Eo extends we{constructor(n){super();_(this,"type",Dp.UNSPECIFIED);_(this,"lookupMapping");_(this,"rpc","");_(this,"request","");_(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Eo().fromBinary(n,r)}static fromJson(n,r){return new Eo().fromJson(n,r)}static fromJsonString(n,r){return new Eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Eo,n,r)}};_(Eo,"runtime",C),_(Eo,"typeName","wg.cosmo.node.v1.LookupMapping"),_(Eo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(Dp)},{no:2,name:"lookup_mapping",kind:"message",T:Mb},{no:3,name:"rpc",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var kb=Eo,ho=class ho extends we{constructor(n){super();_(this,"type","");_(this,"fieldMapping");C.util.initPartial(n,this)}static fromBinary(n,r){return new ho().fromBinary(n,r)}static fromJson(n,r){return new ho().fromJson(n,r)}static fromJsonString(n,r){return new ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ho,n,r)}};_(ho,"runtime",C),_(ho,"typeName","wg.cosmo.node.v1.LookupFieldMapping"),_(ho,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mapping",kind:"message",T:Sh}]));var Mb=ho,yo=class yo extends we{constructor(n){super();_(this,"type",bp.UNSPECIFIED);_(this,"original","");_(this,"mapped","");_(this,"request","");_(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new yo().fromBinary(n,r)}static fromJson(n,r){return new yo().fromJson(n,r)}static fromJsonString(n,r){return new yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(yo,n,r)}};_(yo,"runtime",C),_(yo,"typeName","wg.cosmo.node.v1.OperationMapping"),_(yo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(bp)},{no:2,name:"original",kind:"scalar",T:9},{no:3,name:"mapped",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var xb=yo,Io=class Io extends we{constructor(n){super();_(this,"typeName","");_(this,"kind","");_(this,"key","");_(this,"rpc","");_(this,"request","");_(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Io().fromBinary(n,r)}static fromJson(n,r){return new Io().fromJson(n,r)}static fromJsonString(n,r){return new Io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Io,n,r)}};_(Io,"runtime",C),_(Io,"typeName","wg.cosmo.node.v1.EntityMapping"),_(Io,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"kind",kind:"scalar",T:9},{no:3,name:"key",kind:"scalar",T:9},{no:4,name:"rpc",kind:"scalar",T:9},{no:5,name:"request",kind:"scalar",T:9},{no:6,name:"response",kind:"scalar",T:9}]));var qb=Io,go=class go extends we{constructor(n){super();_(this,"type","");_(this,"fieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new go().fromBinary(n,r)}static fromJson(n,r){return new go().fromJson(n,r)}static fromJsonString(n,r){return new go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(go,n,r)}};_(go,"runtime",C),_(go,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),_(go,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:Sh,repeated:!0}]));var Vb=go,_o=class _o extends we{constructor(n){super();_(this,"original","");_(this,"mapped","");_(this,"argumentMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new _o().fromBinary(n,r)}static fromJson(n,r){return new _o().fromJson(n,r)}static fromJsonString(n,r){return new _o().fromJsonString(n,r)}static equals(n,r){return C.util.equals(_o,n,r)}};_(_o,"runtime",C),_(_o,"typeName","wg.cosmo.node.v1.FieldMapping"),_(_o,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9},{no:3,name:"argument_mappings",kind:"message",T:jb,repeated:!0}]));var Sh=_o,vo=class vo extends we{constructor(n){super();_(this,"original","");_(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new vo().fromBinary(n,r)}static fromJson(n,r){return new vo().fromJson(n,r)}static fromJsonString(n,r){return new vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(vo,n,r)}};_(vo,"runtime",C),_(vo,"typeName","wg.cosmo.node.v1.ArgumentMapping"),_(vo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var jb=vo,Oo=class Oo extends we{constructor(n){super();_(this,"type","");_(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Oo().fromBinary(n,r)}static fromJson(n,r){return new Oo().fromJson(n,r)}static fromJsonString(n,r){return new Oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Oo,n,r)}};_(Oo,"runtime",C),_(Oo,"typeName","wg.cosmo.node.v1.EnumMapping"),_(Oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:Gb,repeated:!0}]));var Kb=Oo,So=class So extends we{constructor(n){super();_(this,"original","");_(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new So().fromBinary(n,r)}static fromJson(n,r){return new So().fromJson(n,r)}static fromJsonString(n,r){return new So().fromJsonString(n,r)}static equals(n,r){return C.util.equals(So,n,r)}};_(So,"runtime",C),_(So,"typeName","wg.cosmo.node.v1.EnumValueMapping"),_(So,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Gb=So,Do=class Do extends we{constructor(n){super();_(this,"consumerName","");_(this,"streamName","");_(this,"consumerInactiveThreshold",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Do().fromBinary(n,r)}static fromJson(n,r){return new Do().fromJson(n,r)}static fromJsonString(n,r){return new Do().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Do,n,r)}};_(Do,"runtime",C),_(Do,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),_(Do,"fields",C.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9},{no:3,name:"consumer_inactive_threshold",kind:"scalar",T:5}]));var kp=Do,bo=class bo extends we{constructor(n){super();_(this,"engineEventConfiguration");_(this,"subjects",[]);_(this,"streamConfiguration");C.util.initPartial(n,this)}static fromBinary(n,r){return new bo().fromBinary(n,r)}static fromJson(n,r){return new bo().fromJson(n,r)}static fromJsonString(n,r){return new bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(bo,n,r)}};_(bo,"runtime",C),_(bo,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),_(bo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:zo},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:kp}]));var Mp=bo,Ao=class Ao extends we{constructor(n){super();_(this,"engineEventConfiguration");_(this,"topics",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ao().fromBinary(n,r)}static fromJson(n,r){return new Ao().fromJson(n,r)}static fromJsonString(n,r){return new Ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ao,n,r)}};_(Ao,"runtime",C),_(Ao,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),_(Ao,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:zo},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var xp=Ao,Ro=class Ro extends we{constructor(n){super();_(this,"engineEventConfiguration");_(this,"channels",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ro().fromBinary(n,r)}static fromJson(n,r){return new Ro().fromJson(n,r)}static fromJsonString(n,r){return new Ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ro,n,r)}};_(Ro,"runtime",C),_(Ro,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),_(Ro,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:zo},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var qp=Ro,Po=class Po extends we{constructor(n){super();_(this,"providerId","");_(this,"type",Ho.PUBLISH);_(this,"typeName","");_(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Po().fromBinary(n,r)}static fromJson(n,r){return new Po().fromJson(n,r)}static fromJsonString(n,r){return new Po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Po,n,r)}};_(Po,"runtime",C),_(Po,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),_(Po,"fields",C.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(Ho)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var zo=Po,Fo=class Fo extends we{constructor(n){super();_(this,"nats",[]);_(this,"kafka",[]);_(this,"redis",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Fo().fromBinary(n,r)}static fromJson(n,r){return new Fo().fromJson(n,r)}static fromJsonString(n,r){return new Fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Fo,n,r)}};_(Fo,"runtime",C),_(Fo,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),_(Fo,"fields",C.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:Mp,repeated:!0},{no:2,name:"kafka",kind:"message",T:xp,repeated:!0},{no:3,name:"redis",kind:"message",T:qp,repeated:!0}]));var $c=Fo,wo=class wo extends we{constructor(n){super();_(this,"data");C.util.initPartial(n,this)}static fromBinary(n,r){return new wo().fromBinary(n,r)}static fromJson(n,r){return new wo().fromJson(n,r)}static fromJsonString(n,r){return new wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(wo,n,r)}};_(wo,"runtime",C),_(wo,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),_(wo,"fields",C.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:$r}]));var $b=wo,Lo=class Lo extends we{constructor(n){super();_(this,"kind",Lu.STATIC_CONFIGURATION_VARIABLE);_(this,"staticVariableContent","");_(this,"environmentVariableName","");_(this,"environmentVariableDefaultValue","");_(this,"placeholderVariableName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Lo().fromBinary(n,r)}static fromJson(n,r){return new Lo().fromJson(n,r)}static fromJsonString(n,r){return new Lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Lo,n,r)}};_(Lo,"runtime",C),_(Lo,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),_(Lo,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(Lu)},{no:2,name:"static_variable_content",kind:"scalar",T:9},{no:3,name:"environment_variable_name",kind:"scalar",T:9},{no:4,name:"environment_variable_default_value",kind:"scalar",T:9},{no:5,name:"placeholder_variable_name",kind:"scalar",T:9}]));var $r=Lo,Co=class Co extends we{constructor(n){super();_(this,"directiveName","");_(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Co().fromBinary(n,r)}static fromJson(n,r){return new Co().fromJson(n,r)}static fromJsonString(n,r){return new Co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Co,n,r)}};_(Co,"runtime",C),_(Co,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),_(Co,"fields",C.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var Qb=Co,Bo=class Bo extends we{constructor(n){super();_(this,"name","");_(this,"value","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Bo().fromBinary(n,r)}static fromJson(n,r){return new Bo().fromJson(n,r)}static fromJsonString(n,r){return new Bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Bo,n,r)}};_(Bo,"runtime",C),_(Bo,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),_(Bo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var Yb=Bo,Uo=class Uo extends we{constructor(n){super();_(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Uo().fromBinary(n,r)}static fromJson(n,r){return new Uo().fromJson(n,r)}static fromJsonString(n,r){return new Uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Uo,n,r)}};_(Uo,"runtime",C),_(Uo,"typeName","wg.cosmo.node.v1.HTTPHeader"),_(Uo,"fields",C.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:$r,repeated:!0}]));var Jb=Uo,ko=class ko extends we{constructor(n){super();_(this,"key");_(this,"cert");_(this,"insecureSkipVerify",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new ko().fromBinary(n,r)}static fromJson(n,r){return new ko().fromJson(n,r)}static fromJsonString(n,r){return new ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ko,n,r)}};_(ko,"runtime",C),_(ko,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),_(ko,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:$r},{no:2,name:"cert",kind:"message",T:$r},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var Hb=ko,Mo=class Mo extends we{constructor(n){super();_(this,"enabled",!1);_(this,"url");_(this,"useSSE");_(this,"protocol");_(this,"websocketSubprotocol");C.util.initPartial(n,this)}static fromBinary(n,r){return new Mo().fromBinary(n,r)}static fromJson(n,r){return new Mo().fromJson(n,r)}static fromJsonString(n,r){return new Mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Mo,n,r)}};_(Mo,"runtime",C),_(Mo,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),_(Mo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:$r},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:C.getEnumType(Ms),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:C.getEnumType(xs),opt:!0}]));var zb=Mo,xo=class xo extends we{constructor(n){super();_(this,"enabled",!1);_(this,"serviceSdl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new xo().fromBinary(n,r)}static fromJson(n,r){return new xo().fromJson(n,r)}static fromJsonString(n,r){return new xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(xo,n,r)}};_(xo,"runtime",C),_(xo,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),_(xo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var Wb=xo,qo=class qo extends we{constructor(n){super();_(this,"key","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qo().fromBinary(n,r)}static fromJson(n,r){return new qo().fromJson(n,r)}static fromJsonString(n,r){return new qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qo,n,r)}};_(qo,"runtime",C),_(qo,"typeName","wg.cosmo.node.v1.InternedString"),_(qo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var Vp=qo,Vo=class Vo extends we{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Vo().fromBinary(n,r)}static fromJson(n,r){return new Vo().fromJson(n,r)}static fromJsonString(n,r){return new Vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vo,n,r)}};_(Vo,"runtime",C),_(Vo,"typeName","wg.cosmo.node.v1.SingleTypeField"),_(Vo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var Xb=Vo,jo=class jo extends we{constructor(n){super();_(this,"fieldPath",[]);_(this,"json","");C.util.initPartial(n,this)}static fromBinary(n,r){return new jo().fromBinary(n,r)}static fromJson(n,r){return new jo().fromJson(n,r)}static fromJsonString(n,r){return new jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(jo,n,r)}};_(jo,"runtime",C),_(jo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),_(jo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var jp=jo,ta=class ta extends we{constructor(n){super();_(this,"and",[]);_(this,"in");_(this,"not");_(this,"or",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ta().fromBinary(n,r)}static fromJson(n,r){return new ta().fromJson(n,r)}static fromJsonString(n,r){return new ta().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ta,n,r)}};_(ta,"runtime",C),_(ta,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),_(ta,"fields",C.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:ta,repeated:!0},{no:2,name:"in",kind:"message",T:jp,opt:!0},{no:3,name:"not",kind:"message",T:ta,opt:!0},{no:4,name:"or",kind:"message",T:ta,repeated:!0}]));var Cu=ta,Ko=class Ko extends we{constructor(n){super();_(this,"operations",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ko().fromBinary(n,r)}static fromJson(n,r){return new Ko().fromJson(n,r)}static fromJsonString(n,r){return new Ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ko,n,r)}};_(Ko,"runtime",C),_(Ko,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),_(Ko,"fields",C.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:Zb,repeated:!0}]));var Vj=Ko,Go=class Go extends we{constructor(n){super();_(this,"request");_(this,"client");C.util.initPartial(n,this)}static fromBinary(n,r){return new Go().fromBinary(n,r)}static fromJson(n,r){return new Go().fromJson(n,r)}static fromJsonString(n,r){return new Go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Go,n,r)}};_(Go,"runtime",C),_(Go,"typeName","wg.cosmo.node.v1.Operation"),_(Go,"fields",C.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:e0},{no:2,name:"client",kind:"message",T:r0}]));var Zb=Go,$o=class $o extends we{constructor(n){super();_(this,"operationName","");_(this,"query","");_(this,"extensions");C.util.initPartial(n,this)}static fromBinary(n,r){return new $o().fromBinary(n,r)}static fromJson(n,r){return new $o().fromJson(n,r)}static fromJsonString(n,r){return new $o().fromJsonString(n,r)}static equals(n,r){return C.util.equals($o,n,r)}};_($o,"runtime",C),_($o,"typeName","wg.cosmo.node.v1.OperationRequest"),_($o,"fields",C.util.newFieldList(()=>[{no:1,name:"operation_name",kind:"scalar",T:9},{no:2,name:"query",kind:"scalar",T:9},{no:3,name:"extensions",kind:"message",T:t0}]));var e0=$o,Qo=class Qo extends we{constructor(n){super();_(this,"persistedQuery");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qo().fromBinary(n,r)}static fromJson(n,r){return new Qo().fromJson(n,r)}static fromJsonString(n,r){return new Qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qo,n,r)}};_(Qo,"runtime",C),_(Qo,"typeName","wg.cosmo.node.v1.Extension"),_(Qo,"fields",C.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:n0}]));var t0=Qo,Yo=class Yo extends we{constructor(n){super();_(this,"sha256Hash","");_(this,"version",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Yo().fromBinary(n,r)}static fromJson(n,r){return new Yo().fromJson(n,r)}static fromJsonString(n,r){return new Yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Yo,n,r)}};_(Yo,"runtime",C),_(Yo,"typeName","wg.cosmo.node.v1.PersistedQuery"),_(Yo,"fields",C.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var n0=Yo,Jo=class Jo extends we{constructor(n){super();_(this,"name","");_(this,"version","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Jo().fromBinary(n,r)}static fromJson(n,r){return new Jo().fromJson(n,r)}static fromJsonString(n,r){return new Jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Jo,n,r)}};_(Jo,"runtime",C),_(Jo,"typeName","wg.cosmo.node.v1.ClientInfo"),_(Jo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var r0=Jo;m();T();N();function i0(e){return new Error(`Normalization failed to return a ${e}.`)}function jj(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var yd=ys(ZE(),1);function mpe(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let a=i.split(".");if(a.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new Lp({fieldName:a[1],typeName:a[0]}))}t.push(new Cp({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function a0(e,t,n){if(e)for(let r of e){let i=mpe(r);t.push(new Vc(M(M({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function s0(e){switch(e){case"publish":return Ho.PUBLISH;case"request":return Ho.REQUEST;case"subscribe":return Ho.SUBSCRIBE}}function Kj(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new $c({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new Td({fieldNames:a,typeName:i});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.requireFetchReasonsFieldNames&&r.requireFetchReasonsFieldNames.length>0&&(o.requireFetchReasonsFieldNames=[...r.requireFetchReasonsFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let p=new Ed({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(p):t.entityInterfaces.push(p)}a0(r.keys,t.keys,i),a0(r.provides,t.provides,i),a0(r.requires,t.requires,i);let c=[],l=[],d=[];for(let p of(n=r.events)!=null?n:[])switch(p.providerType){case yd.PROVIDER_TYPE_KAFKA:{l.push(new xp({engineEventConfiguration:new zo({fieldName:p.fieldName,providerId:p.providerId,type:s0(p.type),typeName:i}),topics:p.topics}));break}case yd.PROVIDER_TYPE_NATS:{c.push(new Mp(M({engineEventConfiguration:new zo({fieldName:p.fieldName,providerId:p.providerId,type:s0(p.type),typeName:i}),subjects:p.subjects},p.streamConfiguration?{streamConfiguration:new kp({consumerInactiveThreshold:p.streamConfiguration.consumerInactiveThreshold,consumerName:p.streamConfiguration.consumerName,streamName:p.streamConfiguration.streamName})}:{})));break}case yd.PROVIDER_TYPE_REDIS:{d.push(new qp({engineEventConfiguration:new zo({fieldName:p.fieldName,providerId:p.providerId,type:s0(p.type),typeName:i}),channels:p.channels}));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...c),t.events.kafka.push(...l),t.events.redis.push(...d)}return t}function Gj(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(p=>new Pp({name:p,sourceType:jc.FIELD_ARGUMENT})),o=new wp({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),c=((n=i.requiredScopes)==null?void 0:n.map(p=>new Gc({requiredAndScopes:p})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(p=>new Gc({requiredAndScopes:p})))||[],d=c.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new Fp({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:c,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let p=new Cu;Dh(p,i.subscriptionFilterCondition),o.subscriptionFilterCondition=p}t.push(o)}return t}function Dh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Cu;Dh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new jp({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Cu,Dh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Cu;Dh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var Qc;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(Qc||(Qc={}));var Npe=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new Vp({key:n})},Tpe=e=>{switch(e){case"ws":return Ms.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return Ms.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return Ms.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},Epe=e=>{switch(e){case"auto":return xs.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return xs.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return xs.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},Qj=function(e){if(!Id.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw jj(e.routerCompatibilityVersion);let t=new Nd({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw i0("ConfigurationDataByTypeName");if(!n.schema)throw i0("GraphQLSchema");let r={enabled:!0},i=Npe(t,ZV((0,$j.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:c,interfaceObjects:l,keys:d,provides:p,requires:E,rootNodes:I}=Kj(n.configurationDataByTypeName),v;switch(n.kind){case Qc.Standard:{r.enabled=!0,r.protocol=Tpe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=Epe(n.websocketSubprotocol||"auto"),r.url=new $r({kind:Lu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case Qc.Plugin:{v=new hd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Up({name:n.name,version:n.version,imageReference:n.imageReference})});break}case Qc.GRPC:{v=new hd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let A,U,j;if(c.kafka.length>0||c.nats.length>0||c.redis.length>0){A=wu.PUBSUB,j=new $c({kafka:c.kafka,nats:c.nats,redis:c.redis});let re=ue=>Id.ROOT_TYPE_NAMES.has(ue.typeName),ee=0,me=0;for(;ee({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${Id.COMPOSITION_VERSION}`})};m();T();N();var Jc=ys(Oe());function Yj(e){let t;try{t=(0,Jc.parse)(e.schema)}catch(n){throw new Error(`could not parse schema for Graph ${e.name}: ${n}`)}return{definitions:t,name:e.name,url:e.url}}function hpe(e){let t=(0,Yc.federateSubgraphs)({subgraphs:e.map(Yj),version:Yc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(n=>n.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:(0,Jc.print)(t.federatedGraphAST)}}function ype(e){let t=(0,Yc.federateSubgraphs)({subgraphs:e.map(Yj),version:Yc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return Qj({federatedClientSDL:(0,Jc.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,Jc.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:Yc.LATEST_ROUTER_COMPATIBILITY_VERSION,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let a=t.subgraphConfigBySubgraphName.get(r.name),o=a==null?void 0:a.schema,c=a==null?void 0:a.configurationDataByTypeName;return{kind:Qc.Standard,id:`${i}`,name:r.name,url:fb(r.url),sdl:r.schema,subscriptionUrl:fb((l=r.subscription_url)!=null?l:r.url),subscriptionProtocol:(d=r.subscription_protocol)!=null?d:"ws",websocketSubprotocol:r.subscription_protocol==="ws"?r.websocketSubprotocol||"auto":void 0,schema:o,configurationDataByTypeName:c}})}).toJsonString()}return Lm(Ipe);})(); +}`;var yt=BR(function(){return Qt(L,$e+"return "+Te).apply(e,k)});if(yt.source=Te,Ry(yt))throw yt;return yt}function CJ(s){return zt(s).toLowerCase()}function BJ(s){return zt(s).toUpperCase()}function UJ(s,u,f){if(s=zt(s),s&&(f||u===e))return G0(s);if(!s||!(u=ci(u)))return s;var h=na(s),O=na(u),L=$0(h,O),k=Q0(h,O)+1;return su(h,L,k).join("")}function kJ(s,u,f){if(s=zt(s),s&&(f||u===e))return s.slice(0,J0(s)+1);if(!s||!(u=ci(u)))return s;var h=na(s),O=Q0(h,na(u))+1;return su(h,0,O).join("")}function MJ(s,u,f){if(s=zt(s),s&&(f||u===e))return s.replace(Rh,"");if(!s||!(u=ci(u)))return s;var h=na(s),O=$0(h,na(u));return su(h,O).join("")}function xJ(s,u){var f=Ze,h=Z;if(bn(u)){var O="separator"in u?u.separator:O;f="length"in u?Et(u.length):f,h="omission"in u?ci(u.omission):h}s=zt(s);var L=s.length;if(Zc(s)){var k=na(s);L=k.length}if(f>=L)return s;var V=f-el(h);if(V<1)return h;var J=k?su(k,0,V).join(""):s.slice(0,V);if(O===e)return J+h;if(k&&(V+=J.length-V),Py(O)){if(s.slice(V).search(O)){var le,de=J;for(O.global||(O=Qh(O.source,zt(f0.exec(O))+"g")),O.lastIndex=0;le=O.exec(de);)var Te=le.index;J=J.slice(0,Te===e?V:Te)}}else if(s.indexOf(ci(O),V)!=V){var be=J.lastIndexOf(O);be>-1&&(J=J.slice(0,be))}return J+h}function qJ(s){return s=zt(s),s&&Wj.test(s)?s.replace(c0,NG):s}var VJ=sl(function(s,u,f){return s+(f?" ":"")+u.toUpperCase()}),Ly=UA("toUpperCase");function CR(s,u,f){return s=zt(s),u=f?e:u,u===e?lG(s)?hG(s):tG(s):s.match(u)||[]}var BR=gt(function(s,u){try{return oi(s,e,u)}catch(f){return Ry(f)?f:new dt(f)}}),jJ=ms(function(s,u){return gi(u,function(f){f=Ca(f),fs(s,f,by(s[f],s))}),s});function KJ(s){var u=s==null?0:s.length,f=We();return s=u?vn(s,function(h){if(typeof h[1]!="function")throw new _i(i);return[f(h[0]),h[1]]}):[],gt(function(h){for(var O=-1;++OTn)return[];var f=gn,h=Or(s,gn);u=We(u),s-=gn;for(var O=Kh(h,u);++f0||u<0)?new bt(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),u!==e&&(u=Et(u),f=u<0?f.dropRight(-u):f.take(u-s)),f)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(gn)},wa(bt.prototype,function(s,u){var f=/^(?:filter|find|map|reject)|While$/.test(u),h=/^(?:head|last)$/.test(u),O=F[h?"take"+(u=="last"?"Right":""):u],L=h||/^find/.test(u);O&&(F.prototype[u]=function(){var k=this.__wrapped__,V=h?[1]:arguments,J=k instanceof bt,le=V[0],de=J||ft(k),Te=function(Dt){var Ft=O.apply(F,Zo([Dt],V));return h&&be?Ft[0]:Ft};de&&f&&typeof le=="function"&&le.length!=1&&(J=de=!1);var be=this.__chain__,$e=!!this.__actions__.length,et=L&&!be,yt=J&&!$e;if(!L&&de){k=yt?k:new bt(this);var tt=s.apply(k,V);return tt.__actions__.push({func:Sm,args:[Te],thisArg:e}),new vi(tt,be)}return et&&yt?s.apply(this,V):(tt=this.thru(Te),et?h?tt.value()[0]:tt.value():tt)})}),gi(["pop","push","shift","sort","splice","unshift"],function(s){var u=Wp[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",h=/^(?:pop|shift)$/.test(s);F.prototype[s]=function(){var O=arguments;if(h&&!this.__chain__){var L=this.value();return u.apply(ft(L)?L:[],O)}return this[f](function(k){return u.apply(ft(k)?k:[],O)})}}),wa(bt.prototype,function(s,u){var f=F[u];if(f){var h=f.name+"";on.call(rl,h)||(rl[h]=[]),rl[h].push({name:u,func:f})}}),rl[hm(e,U).name]=[{name:"wrapper",func:e}],bt.prototype.clone=qG,bt.prototype.reverse=VG,bt.prototype.value=jG,F.prototype.at=EY,F.prototype.chain=hY,F.prototype.commit=yY,F.prototype.next=IY,F.prototype.plant=_Y,F.prototype.reverse=vY,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=OY,F.prototype.first=F.prototype.head,vd&&(F.prototype[vd]=gY),F},tu=yG();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(dr._=tu,define(function(){return tu})):Mu?((Mu.exports=tu)._=tu,Bh._=tu):dr._=tu}).call(ld)});var IV=w(Vc=>{"use strict";m();T();N();Object.defineProperty(Vc,"__esModule",{value:!0});Vc.FederationFactory=void 0;Vc.federateSubgraphs=Ife;Vc.federateSubgraphsWithContracts=gfe;Vc.federateSubgraphsContract=_fe;var Re=Oe(),TV=gu(),Kr=Pr(),Pe=qi(),xc=cT(),qc=id(),Gr=dp(),HE=sE(),Ip=_u(),Tfe=ib(),Efe=fp(),EV=kf(),ge=kl(),hfe=ob(),hV=NV(),dd=JE(),ve=zn(),zE=Ll(),Ne=Fr(),yfe=pp(),wu=Mf(),XE,yV,WE=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:c,internalSubgraphBySubgraphName:l,warnings:d}){Ju(this,XE);g(this,"authorizationDataByParentTypeName");g(this,"coordsByNamedTypeName",new Map);g(this,"disableResolvabilityValidation",!1);g(this,"directiveDefinitionByName",new Map);g(this,"clientDefinitions",[]);g(this,"currentSubgraphName","");g(this,"concreteTypeNamesByAbstractTypeName");g(this,"subgraphNamesByNamedTypeNameByFieldCoords",new Map);g(this,"entityDataByTypeName");g(this,"entityInterfaceFederationDataByTypeName");g(this,"errors",[]);g(this,"fieldConfigurationByFieldCoords",new Map);g(this,"fieldCoordsByNamedTypeName");g(this,"inaccessibleCoords",new Set);g(this,"inaccessibleRequiredInputValueErrorByCoords",new Map);g(this,"internalGraph");g(this,"internalSubgraphBySubgraphName");g(this,"invalidORScopesCoords",new Set);g(this,"isMaxDepth",!1);g(this,"isVersionTwo",!1);g(this,"namedInputValueTypeNames",new Set);g(this,"namedOutputTypeNames",new Set);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"parentTagDataByTypeName",new Map);g(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[ve.AUTHENTICATED,wu.AUTHENTICATED_DEFINITION],[ve.DEPRECATED,wu.DEPRECATED_DEFINITION],[ve.INACCESSIBLE,wu.INACCESSIBLE_DEFINITION],[ve.ONE_OF,wu.ONE_OF_DEFINITION],[ve.REQUIRES_SCOPES,wu.REQUIRES_SCOPES_DEFINITION],[ve.SEMANTIC_NON_NULL,wu.SEMANTIC_NON_NULL_DEFINITION],[ve.TAG,wu.TAG_DEFINITION]]));g(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);g(this,"referencedPersistedDirectiveNames",new Set);g(this,"routerDefinitions",[]);g(this,"subscriptionFilterDataByFieldPath",new Map);g(this,"tagNamesByCoords",new Map);g(this,"warnings");this.authorizationDataByParentTypeName=t,this.concreteTypeNamesByAbstractTypeName=n,this.disableResolvabilityValidation=r!=null?r:!1,this.entityDataByTypeName=i,this.entityInterfaceFederationDataByTypeName=a,this.fieldCoordsByNamedTypeName=o,this.internalGraph=c,this.internalSubgraphBySubgraphName=l,this.warnings=d}extractPersistedDirectives({data:t,directivesByName:n}){for(let[r,i]of n)if(this.persistedDirectiveDefinitionByDirectiveName.get(r)&&(this.referencedPersistedDirectiveNames.add(r),!(ve.AUTHORIZATION_DIRECTIVES.has(r)||i.length<1)))switch(r){case ve.DEPRECATED:{t.isDeprecated=!0,(0,ge.upsertDeprecatedDirective)(t,i[0]);break}case ve.TAG:{(0,ge.upsertTagDirectives)(t,i);break}default:{let o=t.directivesByName.get(r);if(!o){t.directivesByName.set(r,[...i]);break}if(ve.NON_REPEATABLE_PERSISTED_DIRECTIVES.has(r))break;o.push(...i)}}return t}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,ge.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let c of t.implementedInterfaceTypeNames){n.push((0,Kr.stringToNamedTypeNode)(c));let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,c,ve.PARENT_DEFINITION_DATA);if(l.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ne.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[E,I]of l.fieldDataByName){let v=!1,A=t.fieldDataByName.get(E);if(!A){p=!0,d.unimplementedFields.push(E);continue}let U={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,HE.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,ge.isTypeValidImplementation)(I.node.type,A.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,v=!0,U.implementedResponseType=(0,HE.printTypeNode)(A.node.type));let j=new Set;for(let[$,re]of I.argumentDataByName){let ee=re.node;j.add($);let me=(o=A.argumentDataByName.get($))==null?void 0:o.node;if(!me){p=!0,v=!0,U.unimplementedArguments.add($);continue}let ue=(0,HE.printTypeNode)(me.type),Ae=(0,HE.printTypeNode)(ee.type);Ae!==ue&&(p=!0,v=!0,U.invalidImplementedArguments.push({actualType:ue,argumentName:$,expectedType:Ae}))}for(let[$,re]of A.argumentDataByName){let ee=re.node;j.has($)||ee.type.kind===Re.Kind.NON_NULL_TYPE&&(p=!0,v=!0,U.invalidAdditionalArguments.add($))}!r&&A.isInaccessible&&!I.isInaccessible&&(p=!0,v=!0,U.isInaccessible=!0),v&&d.invalidFieldImplementations.set(E,U)}p&&i.set(c,d)}return a.size>0&&this.errors.push((0,Pe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Pe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ne.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Re.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Re.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let c=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,xc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[E,I]of this.entityInterfaceFederationDataByTypeName){if(!((p=I.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(E);v&&(0,xc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:v,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l})}if(c.length<1)return;if(!o.keys||o.keys.length<1){o.isRootNode=!0,o.keys=c;return}let d=new Set(o.keys.map(E=>E.selectionSet));for(let E of c)d.has(E.selectionSet)||(o.keys.push(E),d.add(E.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,ge.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Re.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Re.Kind.NULL);let c=(0,Ne.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,xc.validateImplicitFieldSets)({conditionalFieldDataByCoords:t.conditionalFieldDataByCoordinates,currentSubgraphName:t.name,entityData:r,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:a,graphNode:i}),l.length<1)return;if(!c.keys||c.keys.length<1){c.isRootNode=!0,c.keys=l;return}let d=new Set(c.keys.map(p=>p.selectionSet));for(let p of l)d.has(p.selectionSet)||(c.keys.push(p),d.add(p.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?ge.MergeMethod.CONSISTENT:ge.MergeMethod.INTERSECTION:ge.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(ve.LITERAL_PERIOD);if(r.length<1)continue;let i=(0,Ne.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,xc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,xc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,xc.newChildTagData)(r[1])),c=(0,Ne.getValueOrDefault)(o.tagNamesByArgumentName,r[2],()=>new Set);for(let l of n)c.add(l);break;default:break}}}upsertEnumValueData(t,n,r){let i=t.get(n.name),a=i||this.copyEnumValueData(n);this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=(0,ge.isNodeDataInaccessible)(n);if((r||o)&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}a.appearances+=1,(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(a,n),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if(this.extractPersistedDirectives({data:o.persistedDirectivesData,directivesByName:n.directivesByName}),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(o,n),(0,Ne.addIterableToSet)({source:n.requiredSubgraphNames,target:o.requiredSubgraphNames}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:o.subgraphNames}),this.handleInputValueInaccessibility(i,o,r);let c=(0,dd.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);c.success?o.type=c.typeNode:this.errors.push((0,Pe.incompatibleMergedTypesError)({actualType:c.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:c.expectedType})),(0,ge.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,ge.isNodeDataInaccessible)(n)){if((0,ge.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Pe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByName.get(ve.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ne.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Pe.unknownFieldSubgraphNameError)(t.federatedCoords));return}this.subscriptionFilterDataByFieldPath.set(t.federatedCoords,{directive:r[0],fieldData:n||t,directiveSubgraphName:i})}federateOutputType({current:t,other:n,coords:r,mostRestrictive:i}){n=(0,TV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=dd.DivergentType.NONE,c=a;for(let l=0;lnew Set)})}upsertFieldData(t,n,r){let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,ge.isNodeDataInaccessible)(n));(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=r||(0,ge.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}let c=this.federateOutputType({current:a.type,other:n.type,coords:a.federatedCoords,mostRestrictive:!1});if(c.success)if(a.type=c.typeNode,a.namedTypeName!==n.namedTypeName){let l=(0,Ne.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ne.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let p of a.subgraphNames)n.subgraphNames.has(p)||d.add(p);(0,Ne.addIterableToSet)({source:n.subgraphNames,target:(0,Ne.getValueOrDefault)(l,n.namedTypeName,()=>new Set)})}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let l of n.argumentDataByName.values())this.upsertInputValueData(a.argumentDataByName,l,a.federatedCoords,o);(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ne.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ne.addMapEntries)({source:n.isShareableBySubgraphName,target:a.isShareableBySubgraphName}),(0,Ne.addMapEntries)({source:n.nullLevelsBySubgraphName,target:a.nullLevelsBySubgraphName}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessibleCoords.has(r)||n.push(i);return n}recordTagNamesByCoords(t,n){let r=n||t.name;if(t.persistedDirectivesData.tagDirectiveByName.size<1)return;let i=(0,Ne.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),description:(0,ge.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),subgraphNames:new Set(t.subgraphNames),description:(0,ge.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),federatedCoords:t.federatedCoords,fieldName:t.fieldName,includeDefaultValue:t.includeDefaultValue,isArgument:t.isArgument,kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{directives:[],kind:Re.Kind.INPUT_VALUE_DEFINITION,name:(0,Kr.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,ge.getInitialFederatedDescription)(t)}}copyInputValueDataByValueName(t,n,r){let i=new Map;for(let[a,o]of t){let c=this.copyInputValueData(o);this.handleInputValueInaccessibility(n,c,r),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,c.namedTypeName,()=>new Set).add(c.federatedCoords),this.namedInputValueTypeNames.add(c.namedTypeName),this.recordTagNamesByCoords(c,`${r}.${o.name}`),i.set(a,c)}return i}copyFieldData(t,n){return{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),externalFieldDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.externalFieldDataBySubgraphName),federatedCoords:t.federatedCoords,inheritedDirectiveNames:new Set,isInaccessible:t.isInaccessible,isShareableBySubgraphName:new Map(t.isShareableBySubgraphName),kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{arguments:[],directives:[],kind:t.kind,name:(0,Kr.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ge.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,ge.getInitialFederatedDescription)(t)}}copyEnumValueDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,ge.isNodeDataInaccessible)(o))&&this.inaccessibleCoords.add(o.federatedCoords),r.set(i,o)}return r}copyFieldDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=n||(0,ge.isNodeDataInaccessible)(a),c=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(c),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,c.namedTypeName,()=>new Set).add(c.federatedCoords),this.namedOutputTypeNames.add(c.namedTypeName),this.recordTagNamesByCoords(c,c.federatedCoords),o&&this.inaccessibleCoords.add(c.federatedCoords),r.set(i,c)}return r}copyParentDefinitionData(t){let n=this.copyMutualParentDefinitionData(t);switch(t.kind){case Re.Kind.ENUM_TYPE_DEFINITION:return Q(M({},n),{appearances:t.appearances,enumValueDataByName:this.copyEnumValueDataByName(t.enumValueDataByName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Q(M({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INTERFACE_TYPE_DEFINITION:return Q(M({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},requireFetchReasonsFieldNames:new Set,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.OBJECT_TYPE_DEFINITION:return Q(M({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,isRootType:t.isRootType,kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.SCALAR_TYPE_DEFINITION:return Q(M({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.UNION_TYPE_DEFINITION:return Q(M({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Kr.stringToNameNode)(t.name)},memberByMemberTypeName:new Map(t.memberByMemberTypeName),subgraphNames:new Set(t.subgraphNames)})}}getParentTargetData({existingData:t,incomingData:n}){if(!t){let r=this.copyParentDefinitionData(n);return(0,ge.isParentDataRootType)(r)&&(r.extensionType=EV.ExtensionType.NONE),r}return this.extractPersistedDirectives({data:t.persistedDirectivesData,directivesByName:n.directivesByName}),t}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),a=this.getParentTargetData({existingData:i,incomingData:t});this.recordTagNamesByCoords(a);let o=(0,ge.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphNames.has(n)){if(i&&i.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:i,incomingSubgraphName:n}));return}a.kind=Re.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Re.Kind.INTERFACE_TYPE_DEFINITION}if(!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphNames.has(n)||a.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:a,incomingNodeType:(0,Ne.kindToNodeType)(t.kind),incomingSubgraphName:n}));return}switch((0,Ne.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,ge.setLongestDescription)(a,t),(0,ge.setParentDataExtensionType)(a,t),a.kind){case Re.Kind.ENUM_TYPE_DEFINITION:if(!(0,ge.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.enumValueDataByName.values())this.upsertEnumValueData(a.enumValueDataByName,l,o);return;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,ge.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:let c=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:c.implementedInterfaceTypeNames,target:a.implementedInterfaceTypeNames}),(0,Ne.addIterableToSet)({source:c.subgraphNames,target:a.subgraphNames});for(let l of c.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Re.Kind.UNION_TYPE_DEFINITION:if(!(0,ge.areKindsEqual)(a,t))return;(0,Ne.addMapEntries)({source:t.memberByMemberTypeName,target:a.memberByMemberTypeName}),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return;default:(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByName.values())this.inaccessibleCoords.add(n.federatedCoords);break;default:for(let n of t.fieldDataByName.values()){this.inaccessibleCoords.add(n.federatedCoords);for(let r of n.argumentDataByName.values())this.inaccessibleCoords.add(r.federatedCoords)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let a=new Map;for(let o of t.argumentDataByName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByName:a,executableLocations:new Set(t.executableLocations),name:r,repeatable:t.repeatable,subgraphNames:new Set(t.subgraphNames),description:t.description});return}if(i.subgraphNames.size+1!==n){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}if((0,ge.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByName.values())this.namedInputValueTypeNames.add((0,TV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByName,a,`@${i.name}`,!1);(0,ge.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:i.subgraphNames})}shouldUpdateFederatedFieldAbstractNamedType(t,n){if(!t)return!1;let r=this.concreteTypeNamesByAbstractTypeName.get(t);if(!r||r.size<1)return!1;for(let i of n)if(!r.has(i))return!1;return!0}updateTypeNodeNamedType(t,n){let r=t;for(let i=0;i1){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Re.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[E,I]of o)if(p!==E&&!I.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,c)){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}a.namedTypeName=d,this.updateTypeNodeNamedType(a.type,d)}}federateInternalSubgraphData(){let t=0,n=!1;for(let r of this.internalSubgraphBySubgraphName.values()){t+=1,this.currentSubgraphName=r.name,this.isVersionTwo||(this.isVersionTwo=r.isVersionTwo),(0,hfe.renameRootTypes)(this,r);for(let i of r.parentDefinitionDataByTypeName.values())this.upsertParentDefinitionData(i,r.name);if(!n){if(!r.persistedDirectiveDefinitionDataByDirectiveName.size){n=!0;continue}for(let i of r.persistedDirectiveDefinitionDataByDirectiveName.values())this.upsertPersistedDirectiveDefinitionData(i,t);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.size<1&&(n=!0)}}this.handleDisparateFieldNamedTypes()}handleInterfaceObjectForInternalGraph({entityData:t,internalSubgraph:n,interfaceObjectData:r,interfaceObjectNode:i,resolvableKeyFieldSets:a,subgraphName:o}){let c=this.internalGraph.addOrUpdateNode(t.typeName),l=this.internalGraph.addEntityDataNode(t.typeName);for(let p of i.satisfiedFieldSets)c.satisfiedFieldSets.add(p),a.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:E}of d||[])this.internalGraph.addEdge(c,this.internalGraph.addOrUpdateNode(E),p);this.internalGraph.addEdge(i,c,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,c)}handleEntityInterfaces(){var t;for(let[n,r]of this.entityInterfaceFederationDataByTypeName){let i=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,n,ve.PARENT_DEFINITION_DATA);if(i.kind===Re.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphNames){let o=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),c=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ne.getOrThrowError)(c,n,"configurationDataByTypeName"),p=d.keys;if(!p)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let E=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,I,ve.PARENT_DEFINITION_DATA);if(!(0,Gr.isObjectDefinitionData)(v))continue;let A=(0,Ne.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");A.subgraphNames.add(a);let U=c.get(I);if(U)if((0,Ne.addIterableToSet)({source:d.fieldNames,target:U.fieldNames}),!U.keys)U.keys=[...p];else e:for(let ee of p){for(let{selectionSet:me}of U.keys)if(ee.selectionSet===me)continue e;U.keys.push(ee)}else c.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...p],typeName:I});let j=new Set;for(let ee of p.filter(me=>!me.disableEntityResolver))j.add(ee.selectionSet);let $=this.authorizationDataByParentTypeName.get(n),re=(0,Ne.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Gr.isObjectDefinitionData)(re)){for(let[ee,me]of re.fieldDataByName){let ue=`${I}.${ee}`;(0,Ne.getValueOrDefault)(this.fieldCoordsByNamedTypeName,me.namedTypeName,()=>new Set).add(ue);let Ae=$==null?void 0:$.fieldAuthDataByFieldName.get(ee);if(Ae){let Z=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Gr.newAuthorizationData)(I));(0,Gr.upsertFieldAuthorizationData)(Z.fieldAuthDataByFieldName,Ae)||this.invalidORScopesCoords.add(ue)}let xe=v.fieldDataByName.get(ee);if(xe){let Z=(t=me.isShareableBySubgraphName.get(a))!=null?t:!1;xe.isShareableBySubgraphName.set(a,Z),xe.subgraphNames.add(a);let _e=me.externalFieldDataBySubgraphName.get(a);if(!_e)continue;xe.externalFieldDataBySubgraphName.set(a,M({},_e));continue}let Ze=i.isInaccessible||v.isInaccessible||me.isInaccessible;v.fieldDataByName.set(ee,this.copyFieldData(me,Ze))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:E,resolvableKeyFieldSets:j,entityData:A})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Gr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Gr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByName){if(a===ve.SEMANTIC_NON_NULL&&(0,ge.isFieldData)(t)){r.push((0,Ne.generateSemanticNonNullDirective)((i=(0,Ne.getFirstEntry)(t.nullLevelsBySubgraphName))!=null?i:new Set([0])));continue}let c=this.persistedDirectiveDefinitionByDirectiveName.get(a);if(c){if(o.length<2){r.push(...o);continue}if(!c.repeatable){this.errors.push((0,Pe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,ge.generateDeprecatedDirective)(t.persistedDirectivesData.deprecatedReason)),n.push(...this.getValidFlattenedPersistedDirectiveNodeArray(t)),n}getFederatedGraphNodeDescription(t){if(t.configureDescriptionDataBySubgraphName.size<1)return t.description;let n=[],r="";for(let[i,{propagate:a,description:o}]of t.configureDescriptionDataBySubgraphName)a&&(n.push(i),r=o);if(n.length===1)return(0,xc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,ge.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,Kr.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,Kr.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.includeDefaultValue&&(t.node.defaultValue=t.defaultValue),t.node}getValidFieldArgumentNodes(t){let n=[],r=[],i=[],a=`${t.renamedParentTypeName}.${t.name}`;for(let[o,c]of t.argumentDataByName)t.subgraphNames.size===c.subgraphNames.size?(r.push(o),n.push(this.getNodeWithPersistedDirectivesByInputValueData(c))):(0,ge.isTypeRequired)(c.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames),requiredSubgraphs:[...c.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(ve.FIELD,a,i)):r.length>0&&((0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,a,()=>({argumentNames:r,fieldName:t.name,typeName:t.renamedParentTypeName})).argumentNames=r),n}getNodeWithPersistedDirectivesByFieldData(t,n){return t.node.arguments=n,t.node.name=(0,Kr.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}validateSemanticNonNull(t){let n;for(let r of t.nullLevelsBySubgraphName.values()){if(!n){n=r;continue}if(n.size!==r.size){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByName.has(ve.ONE_OF)?r.size>0?(this.errors.push((0,Pe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,yfe.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==EV.ExtensionType.NONE&&this.errors.push((0,Pe.noBaseDefinitionForExtensionError)((0,Ne.kindToNodeType)(r.kind),n)),r.kind){case Re.Kind.ENUM_TYPE_DEFINITION:{if(qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,ge.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let c of r.enumValueDataByName.values()){let l=this.getNodeForRouterSchemaByData(c),d=(0,ge.isNodeDataInaccessible)(c),p=Q(M({},c.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(c)});switch(o){case ge.MergeMethod.CONSISTENT:!d&&r.appearances>c.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(p);break;case ge.MergeMethod.INTERSECTION:r.appearances===c.appearances&&(i.push(l),d||a.push(p));break;default:i.push(l),d||a.push(p);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,ve.ENUM_VALUE));break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),values:a}));break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=new Array,a=new Array,o=new Array,c=new Set;for(let[l,d]of r.inputValueDataByName)if((0,ge.isTypeRequired)(d.type)&&c.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,ge.isNodeDataInaccessible)(d))continue;o.push(Q(M({},d.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(d)}))}else(0,ge.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(ve.INPUT_OBJECT,n,i,!1));break}if(!this.validateOneOfDirective({data:r,inputValueNodes:a,requiredFieldNames:c}))break;if(r.node.fields=a,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,c=(0,ge.newInvalidFieldNames)(),l=r.kind===Re.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,ge.propagateAuthDirectives)(r,d);for(let[E,I]of r.fieldDataByName){(0,ge.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,ge.validateExternalAndShareable)(I,c),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,ge.isNodeDataInaccessible)(I)&&(a.push((0,ge.getClientSchemaFieldNodeByFieldData)(I)),o.set(E,this.fieldDataToGraphFieldData(I)))}if(l&&(c.byShareable.size>0&&this.errors.push((0,Pe.invalidFieldShareabilityError)(r,c.byShareable)),c.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Pe.allExternalFieldInstancesError)(n,c.subgraphNamesByExternalFieldName))),r.node.fields=i,this.internalGraph.initializeNode(n,o),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:a});break}this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r));let p=(0,Efe.isNodeQuery)(n);if((0,ge.isNodeDataInaccessible)(r)){if(p){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let E=p?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,ve.FIELD);this.errors.push(E);break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Re.Kind.SCALAR_TYPE_DEFINITION:{if(qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;if((0,ge.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r)}));break}case Re.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Gr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ge.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)(ve.UNION,n,"union member type"));break}this.clientDefinitions.push(Q(M({},r.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(r),types:i}));break}}}pushNamedTypeAuthDataToFields(){var t;for(let[n,r]of this.authorizationDataByParentTypeName){if(!r.requiresAuthentication&&r.requiredScopes.length<1)continue;let i=this.fieldCoordsByNamedTypeName.get(n);if(i)for(let a of i){let o=a.split(ve.LITERAL_PERIOD);switch(o.length){case 2:{let c=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Gr.newAuthorizationData)(o[0])),l=(0,Ne.getValueOrDefault)(c.fieldAuthDataByFieldName,o[1],()=>(0,Gr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Ip.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),ll(this,XE,yV).call(this),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(n)),(0,ge.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let a of n.implementedInterfaceTypeNames)this.inaccessibleCoords.has(a)||i.push((0,Kr.stringToNamedTypeNode)(a));this.clientDefinitions.push(Q(M({},n.node),{directives:(0,ge.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(ve.LEFT_PARENTHESIS)[0].split(ve.LITERAL_PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,Ne.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(ve.QUERY);if(!t||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,ge.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(ve.LITERAL_PERIOD);if(o.length<1)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let c=n;if(this.inaccessibleCoords.has(c.renamedTypeName))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],c.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,c.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let E=c.fieldDataByName.get(p);if(!E)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,c.renamedTypeName)),[];let I=`${c.renamedTypeName}.${p}`;if(!E.subgraphNames.has(i))return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Ip.BASE_SCALARS.has(E.namedTypeName)){c={kind:Re.Kind.SCALAR_TYPE_DEFINITION,name:E.namedTypeName};continue}c=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,E.namedTypeName,ve.PARENT_DEFINITION_DATA)}return(0,ge.isLeafKind)(c.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ne.kindToNodeType)(c.kind),c.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,c){if(i>zE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([ve.FIELD_PATH,ve.VALUES]),p=new Set,E=new Set,I=[];for(let v of t.fields){let A=v.name.value,U=a+`.${A}`;switch(A){case ve.FIELD_PATH:{if(d.has(ve.FIELD_PATH))d.delete(ve.FIELD_PATH);else{l=!0,p.add(ve.FIELD_PATH);break}if(v.value.kind!==Re.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,ve.STRING,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,U,o,I);if(j.length<1){l=!0;break}n.fieldPath=j;break}case ve.VALUES:{if(d.has(ve.VALUES))d.delete(ve.VALUES);else{l=!0,p.add(ve.VALUES);break}let j=v.value.kind;if(j==Re.Kind.NULL||j==Re.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,ve.LIST,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}if(j!==Re.Kind.LIST){n.values=[(0,ge.getSubscriptionFilterValue)(v.value)];break}let $=new Set,re=[];for(let ee=0;ee0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(U,re));continue}if($.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(U));continue}n.values=[...$];break}default:l=!0,E.add(A)}}return l?(c.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...p],[...E],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,c){if(i>zE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!qc.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let p=a+`.${d}`;switch(l.value.kind){case Re.Kind.OBJECT:switch(d){case ve.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,c);case ve.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,c);default:return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,ve.LIST,ve.OBJECT)),!1}case Re.Kind.LIST:{let E=[];switch(d){case ve.AND_UPPER:{n.and=E;break}case ve.OR_UPPER:{n.or=E;break}default:return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,ve.OBJECT,ve.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return c.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,I)),!1;let v=!0,A=[];for(let U=0;U0?(c.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,A)),!1):v}default:{let E=qc.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?ve.LIST:ve.OBJECT;return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,E,(0,Ne.kindToNodeType)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,a,o){if(!t.arguments||t.arguments.length!==1)return;let c=t.arguments[0];if(c.value.kind!==Re.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(ve.CONDITION,ve.OBJECT,(0,Ne.kindToNodeType)(c.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(c.value,l,n,0,ve.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,r,()=>({argumentNames:[],fieldName:i,typeName:a})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessibleCoords.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(t,[(0,Pe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,ge.isNodeDataInaccessible)(r)||r.kind===Re.Kind.OBJECT_TYPE_DEFINITION&&this.validateSubscriptionFilterAndGenerateConfiguration(n.directive,r,t,n.fieldData.name,n.fieldData.renamedParentTypeName,n.directiveSubgraphName)}}buildFederationResult(){this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration(),this.invalidORScopesCoords.size>0&&this.errors.push((0,Pe.orScopesLimitError)(Ip.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,ge.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,a,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType();for(let a of this.inaccessibleRequiredInputValueErrorByCoords.values())this.errors.push(a);if(this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};if(!this.disableResolvabilityValidation&&this.internalSubgraphBySubgraphName.size>1){let a=this.internalGraph.validate();if(!a.success)return{errors:a.errors,success:!1,warnings:this.warnings}}let n={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:c,name:l,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E}of this.internalSubgraphBySubgraphName.values())i.set(l,{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:c,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E});for(let a of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return M({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:n,federatedGraphSchema:(0,Re.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:i,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}getClientSchemaObjectBoolean(){return this.inaccessibleCoords.size<1&&this.tagNamesByCoords.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let a=n.size;for(let[o,c]of r){let l=(0,Ne.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,ge.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(c.tagNames)||((0,Ne.getValueOrDefault)(l.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,c]of n){if((0,ge.isNodeDataInaccessible)(c)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ne.getValueOrDefault)(c.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(wu.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,c]of this.parentTagDataByTypeName){let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,o,ve.PARENT_DEFINITION_DATA);if(!(0,ge.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(c.tagNames)){l.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(c.childTagDataByChildName.size<1))switch(l.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:break;case Re.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[p,E]of c.childTagDataByChildName){let I=(0,Ne.getOrThrowError)(l.fieldDataByName,p,`${o}.fieldDataByFieldName`);if((0,ge.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(E.tagNames)){(0,Ne.getValueOrDefault)(I.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,A]of E.tagNamesByArgumentName){let U=(0,Ne.getOrThrowError)(I.argumentDataByName,v,`${p}.argumentDataByArgumentName`);(0,ge.isNodeDataInaccessible)(U)||t.tagNamesToExclude.isDisjointFrom(A)||((0,Ne.getValueOrDefault)(U.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(U.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,c]of this.parentDefinitionDataByTypeName){if((0,ge.isNodeDataInaccessible)(c))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){c.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){c.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(c.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:continue;case Re.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.enumValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=c.fieldDataByName.size;for(let[p,E]of c.fieldDataByName){if((0,ge.isNodeDataInaccessible)(E)){d-=1;continue}let I=l.childTagDataByChildName.get(p);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ne.getValueOrDefault)(E.persistedDirectivesData.directivesByName,ve.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(E.federatedCoords),d-=1)}d<1&&(c.persistedDirectivesData.directivesByName.set(ve.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(ve.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,ge.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,o,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let n=[];if(this.pushParentDefinitionDataToDocumentDefinitions(n),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(n),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};let r={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let{configurationDataByTypeName:o,directiveDefinitionByName:c,isVersionTwo:l,name:d,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I}of this.internalSubgraphBySubgraphName.values())a.set(d,{configurationDataByTypeName:o,directiveDefinitionByName:c,isVersionTwo:l,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I});for(let o of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return M({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:r,federatedGraphSchema:(0,Re.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:a,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};XE=new WeakSet,yV=function(){var r;let t=new Set,n=new Set;for(let i of this.referencedPersistedDirectiveNames){let a=Ip.DIRECTIVE_DEFINITION_BY_NAME.get(i);if(!a)continue;let o=(r=qc.DEPENDENCIES_BY_DIRECTIVE_NAME.get(i))!=null?r:[];this.directiveDefinitionByName.set(i,a),qc.CLIENT_PERSISTED_DIRECTIVE_NAMES.has(i)&&(this.clientDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:t})),this.routerDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:n})}this.clientDefinitions.push(...t),this.routerDefinitions.push(...n)};Vc.FederationFactory=WE;function ub({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,Tfe.batchNormalize)(t);if(!n.success)return{errors:n.errors,success:!1,warnings:n.warnings};let r=new Map,i=new Map;for(let[c,l]of n.internalSubgraphBySubgraphName)for(let[d,p]of l.entityInterfaces){let E=r.get(d);if(!E){r.set(d,(0,Gr.newEntityInterfaceFederationData)(p,c));continue}(0,Gr.upsertEntityInterfaceFederationData)(E,p,c)}let a=new Array,o=new Map;for(let[c,l]of r){let d=l.concreteTypeNames.size;for(let[p,E]of l.subgraphDataByTypeName){let I=(0,Ne.getValueOrDefault)(o,p,()=>new Set);if((0,Ne.addIterableToSet)({source:E.concreteTypeNames,target:I}),!E.isInterfaceObject){E.resolvable&&E.concreteTypeNames.size!==d&&(0,Ne.getValueOrDefault)(i,c,()=>new Array).push({subgraphName:p,definedConcreteTypeNames:new Set(E.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ne.addIterableToSet)({source:l.concreteTypeNames,target:I});let{parentDefinitionDataByTypeName:v}=(0,Ne.getOrThrowError)(n.internalSubgraphBySubgraphName,p,"internalSubgraphBySubgraphName"),A=[];for(let U of l.concreteTypeNames)v.has(U)&&A.push(U);A.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(c,p,A))}}for(let[c,l]of i){let d=new Array;for(let p of l){let E=o.get(p.subgraphName);if(!E){d.push(p);continue}let I=p.requiredConcreteTypeNames.intersection(E);p.requiredConcreteTypeNames.size!==I.size&&(p.definedConcreteTypeNames=I,d.push(p))}if(d.length>0){i.set(c,d);continue}i.delete(c)}return i.size>0&&a.push((0,Pe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new WE({authorizationDataByParentTypeName:n.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:n.concreteTypeNamesByAbstractTypeName,disableResolvabilityValidation:e,entityDataByTypeName:n.entityDataByTypeName,entityInterfaceFederationDataByTypeName:r,fieldCoordsByNamedTypeName:n.fieldCoordsByNamedTypeName,internalSubgraphBySubgraphName:n.internalSubgraphBySubgraphName,internalGraph:n.internalGraph,warnings:n.warnings}),success:!0,warnings:n.warnings}}function Ife({disableResolvabilityValidation:e,subgraphs:t}){let n=ub({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function gfe({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=ub({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,hV.cloneDeep)(r.federationFactory)],a=r.federationFactory.buildFederationResult();if(!a.success)return{errors:a.errors,success:!1,warnings:a.warnings};let o=t.size-1,c=new Map,l=0;for(let[d,p]of t){l!==o&&i.push((0,hV.cloneDeep)(i[l]));let E=i[l].buildFederationContractResult(p);c.set(d,E),l++}return Q(M({},a),{federationResultByContractName:c})}function _fe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=ub({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var ZE=w(Bs=>{"use strict";m();T();N();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.LATEST_ROUTER_COMPATIBILITY_VERSION=Bs.ROUTER_COMPATIBILITY_VERSIONS=Bs.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;Bs.ROUTER_COMPATIBILITY_VERSION_ONE="1";Bs.ROUTER_COMPATIBILITY_VERSIONS=new Set([Bs.ROUTER_COMPATIBILITY_VERSION_ONE]);Bs.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var gV=w(gp=>{"use strict";m();T();N();Object.defineProperty(gp,"__esModule",{value:!0});gp.federateSubgraphs=vfe;gp.federateSubgraphsWithContracts=Ofe;gp.federateSubgraphsContract=Sfe;var cb=IV(),lb=ZE();function vfe({disableResolvabilityValidation:e,subgraphs:t,version:n=lb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,cb.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function Ofe({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=lb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,cb.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function Sfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=lb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,cb.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var vV=w(_V=>{"use strict";m();T();N();Object.defineProperty(_V,"__esModule",{value:!0})});var OV=w(_p=>{"use strict";m();T();N();Object.defineProperty(_p,"__esModule",{value:!0});_p.normalizeSubgraphFromString=Dfe;_p.normalizeSubgraph=bfe;_p.batchNormalize=Afe;var db=ib(),fb=ZE();function Dfe(e,t=!0,n=fb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,db.normalizeSubgraphFromString)(e,t)}}function bfe(e,t,n,r=fb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,db.normalizeSubgraph)(e,t,n)}}function Afe(e,t=fb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,db.batchNormalize)(e)}}});var DV=w(SV=>{"use strict";m();T();N();Object.defineProperty(SV,"__esModule",{value:!0})});var AV=w(bV=>{"use strict";m();T();N();Object.defineProperty(bV,"__esModule",{value:!0})});var PV=w(RV=>{"use strict";m();T();N();Object.defineProperty(RV,"__esModule",{value:!0})});var wV=w(FV=>{"use strict";m();T();N();Object.defineProperty(FV,"__esModule",{value:!0})});var CV=w(LV=>{"use strict";m();T();N();Object.defineProperty(LV,"__esModule",{value:!0})});var UV=w(BV=>{"use strict";m();T();N();Object.defineProperty(BV,"__esModule",{value:!0})});var kV=w(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.COMPOSITION_VERSION=void 0;eh.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var xV=w(MV=>{"use strict";m();T();N();Object.defineProperty(MV,"__esModule",{value:!0})});var VV=w(qV=>{"use strict";m();T();N();Object.defineProperty(qV,"__esModule",{value:!0})});var KV=w(jV=>{"use strict";m();T();N();Object.defineProperty(jV,"__esModule",{value:!0})});var $V=w(GV=>{"use strict";m();T();N();Object.defineProperty(GV,"__esModule",{value:!0})});var th=w(Xe=>{"use strict";m();T();N();var Rfe=Xe&&Xe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lt=Xe&&Xe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Rfe(t,e,n)};Object.defineProperty(Xe,"__esModule",{value:!0});lt(Pr(),Xe);lt(Bv(),Xe);lt(qi(),Xe);lt(JM(),Xe);lt(gV(),Xe);lt(vV(),Xe);lt(OV(),Xe);lt(DV(),Xe);lt(eb(),Xe);lt(KD(),Xe);lt(xE(),Xe);lt(AV(),Xe);lt(PV(),Xe);lt(JD(),Xe);lt(ZE(),Xe);lt(wV(),Xe);lt(tb(),Xe);lt(gu(),Xe);lt(kf(),Xe);lt(kl(),Xe);lt(CV(),Xe);lt(UV(),Xe);lt(kV(),Xe);lt(xV(),Xe);lt(zn(),Xe);lt(VV(),Xe);lt(Fr(),Xe);lt(CD(),Xe);lt(_u(),Xe);lt(Mf(),Xe);lt(cE(),Xe);lt(lE(),Xe);lt(id(),Xe);lt(uT(),Xe);lt(cT(),Xe);lt(ob(),Xe);lt(KV(),Xe);lt(RD(),Xe);lt(fp(),Xe);lt($V(),Xe);lt(MD(),Xe);lt(JE(),Xe);lt(wD(),Xe);lt(dp(),Xe);lt(pp(),Xe)});var _pe={};Cm(_pe,{buildRouterConfiguration:()=>gpe,federateSubgraphs:()=>Ipe});m();T();N();var Jc=ys(th());m();T();N();m();T();N();function pb(e){if(!e)return e;if(!URL.canParse(e))throw new Error("Invalid URL");let t=e.indexOf("?"),n=e.indexOf("#"),r=e;return t>0?r=r.slice(0,n>0?Math.min(t,n):t):n>0&&(r=r.slice(0,n)),r}m();T();N();m();T();N();var QV={};m();T();N();function YV(e){return e!=null}m();T();N();m();T();N();var XV=ys(Oe(),1);m();T();N();var JV;if(typeof AggregateError=="undefined"){class e extends Error{constructor(n,r=""){super(r),this.errors=n,this.name="AggregateError",Error.captureStackTrace(this,e)}}JV=function(t,n){return new e(t,n)}}else JV=AggregateError;function HV(e){return"errors"in e&&Array.isArray(e.errors)}var ZV=3;function ej(e){return nh(e,[])}function nh(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Pfe(e,t);default:return String(e)}}function zV(e){return e instanceof XV.GraphQLError?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function Pfe(e,t){if(e===null)return"null";if(e instanceof Error)return HV(e)?zV(e)+` +`+WV(e.errors,t):zV(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Ffe(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:nh(r,n)}else if(Array.isArray(e))return WV(e,n);return wfe(e,n)}function Ffe(e){return typeof e.toJSON=="function"}function wfe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>ZV?"["+Lfe(e)+"]":"{ "+n.map(([i,a])=>i+": "+nh(a,t)).join(", ")+" }"}function WV(e,t){if(e.length===0)return"[]";if(t.length>ZV)return"[Array]";let n=e.length,r=[];for(let i=0;in==null?n:n[r],e==null?void 0:e.extensions)}m();T();N();var Fe=ys(Oe(),1);m();T();N();var is=ys(Oe(),1);function as(e){if((0,is.isNonNullType)(e)){let t=as(e.ofType);if(t.kind===is.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${ej(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:is.Kind.NON_NULL_TYPE,type:t}}else if((0,is.isListType)(e))return{kind:is.Kind.LIST_TYPE,type:as(e.ofType)};return{kind:is.Kind.NAMED_TYPE,name:{kind:is.Kind.NAME,value:e.name}}}m();T();N();var ss=ys(Oe(),1);function ih(e){if(e===null)return{kind:ss.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=ih(n);r!=null&&t.push(r)}return{kind:ss.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=ih(r);i&&t.push({kind:ss.Kind.OBJECT_FIELD,name:{kind:ss.Kind.NAME,value:n},value:i})}return{kind:ss.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:ss.Kind.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){let t=String(e);return Cfe.test(t)?{kind:ss.Kind.INT,value:t}:{kind:ss.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:ss.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var Cfe=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();m();T();N();function ah(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}var Qxe=ah(function(t){let n=Bfe(t);return new Set([...n].map(r=>r.name))}),Bfe=ah(function(t){let n=mb(t);return new Set(n.values())}),mb=ah(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n});function Ufe(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=kfe(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,Fe.isSpecifiedDirective)(c)||a.push(Mfe(c,e,n));for(let c in r){let l=r[c],d=(0,Fe.isSpecifiedScalarType)(l),p=(0,Fe.isIntrospectionType)(l);if(!(d||p))if((0,Fe.isObjectType)(l))a.push(xfe(l,e,n));else if((0,Fe.isInterfaceType)(l))a.push(qfe(l,e,n));else if((0,Fe.isUnionType)(l))a.push(Vfe(l,e,n));else if((0,Fe.isInputObjectType)(l))a.push(jfe(l,e,n));else if((0,Fe.isEnumType)(l))a.push(Kfe(l,e,n));else if((0,Fe.isScalarType)(l))a.push(Gfe(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Fe.Kind.DOCUMENT,definitions:a}}function tj(e,t={}){let n=Ufe(e,t);return(0,Fe.print)(n)}function kfe(e,t){var n,r;let i=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),a=[];if(e.astNode!=null&&a.push(e.astNode),e.extensionASTNodes!=null)for(let p of e.extensionASTNodes)a.push(p);for(let p of a)if(p.operationTypes)for(let E of p.operationTypes)i.set(E.operation,E);let o=mb(e);for(let[p,E]of i){let I=o.get(p);if(I!=null){let v=as(I);E!=null?E.type=v:i.set(p,{kind:Fe.Kind.OPERATION_TYPE_DEFINITION,operation:p,type:v})}}let c=[...i.values()].filter(YV),l=fd(e,e,t);if(!c.length&&!l.length)return null;let d={kind:c!=null?Fe.Kind.SCHEMA_DEFINITION:Fe.Kind.SCHEMA_EXTENSION,operationTypes:c,directives:l};return d.description=((r=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&r!==void 0?r:e.description!=null)?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,d}function Mfe(e,t,n){var r,i,a,o;return{kind:Fe.Kind.DIRECTIVE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},arguments:(a=e.args)===null||a===void 0?void 0:a.map(c=>nj(c,t,n)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(c=>({kind:Fe.Kind.NAME,value:c})))||[]}}function fd(e,t,n){let r=rh(e,n),i=[];e.astNode!=null&&i.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(i=i.concat(e.extensionASTNodes));let a;if(r!=null)a=Nb(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}function oh(e,t,n){var r,i;let a=[],o=null,c=rh(e,n),l;return c!=null?l=Nb(t,c):l=(r=e.astNode)===null||r===void 0?void 0:r.directives,l!=null&&(a=l.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(o=(i=l.filter(d=>d.name.value==="deprecated"))===null||i===void 0?void 0:i[0])),e.deprecationReason!=null&&o==null&&(o=Yfe(e.deprecationReason)),o==null?a:[o].concat(a)}function nj(e,t,n){var r,i,a;return{kind:Fe.Kind.INPUT_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},type:as(e.type),defaultValue:e.defaultValue!==void 0&&(a=(0,Fe.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0,directives:oh(e,t,n)}}function xfe(e,t,n){var r,i;return{kind:Fe.Kind.OBJECT_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>rj(a,t,n)),interfaces:Object.values(e.getInterfaces()).map(a=>as(a)),directives:fd(e,t,n)}}function qfe(e,t,n){var r,i;let a={kind:Fe.Kind.INTERFACE_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>rj(o,t,n)),directives:fd(e,t,n)};return"getInterfaces"in e&&(a.interfaces=Object.values(e.getInterfaces()).map(o=>as(o))),a}function Vfe(e,t,n){var r,i;return{kind:Fe.Kind.UNION_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},directives:fd(e,t,n),types:e.getTypes().map(a=>as(a))}}function jfe(e,t,n){var r,i;return{kind:Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>$fe(a,t,n)),directives:fd(e,t,n)}}function Kfe(e,t,n){var r,i;return{kind:Fe.Kind.ENUM_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(a=>Qfe(a,t,n)),directives:fd(e,t,n)}}function Gfe(e,t,n){var r,i,a;let o=rh(e,n),c=o?Nb(t,o):((r=e.astNode)===null||r===void 0?void 0:r.directives)||[],l=e.specifiedByUrl||e.specifiedByURL;if(l&&!c.some(d=>d.name.value==="specifiedBy")){let d={url:l};c.push(sh("specifiedBy",d))}return{kind:Fe.Kind.SCALAR_TYPE_DEFINITION,description:(a=(i=e.astNode)===null||i===void 0?void 0:i.description)!==null&&a!==void 0?a:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},directives:c}}function rj(e,t,n){var r,i;return{kind:Fe.Kind.FIELD_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},arguments:e.args.map(a=>nj(a,t,n)),type:as(e.type),directives:oh(e,t,n)}}function $fe(e,t,n){var r,i,a;return{kind:Fe.Kind.INPUT_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},type:as(e.type),directives:oh(e,t,n),defaultValue:(a=(0,Fe.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0}}function Qfe(e,t,n){var r,i;return{kind:Fe.Kind.ENUM_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:Fe.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:Fe.Kind.NAME,value:e.name},directives:oh(e,t,n)}}function Yfe(e){return sh("deprecated",{reason:e},Fe.GraphQLDeprecatedDirective)}function sh(e,t,n){let r=[];if(n!=null)for(let i of n.args){let a=i.name,o=t[a];if(o!==void 0){let c=(0,Fe.astFromValue)(o,i.type);c&&r.push({kind:Fe.Kind.ARGUMENT,name:{kind:Fe.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=ih(a);o&&r.push({kind:Fe.Kind.ARGUMENT,name:{kind:Fe.Kind.NAME,value:i},value:o})}return{kind:Fe.Kind.DIRECTIVE,name:{kind:Fe.Kind.NAME,value:e},arguments:r}}function Nb(e,t){let n=[];for(let r in t){let i=t[r],a=e==null?void 0:e.getDirective(r);if(Array.isArray(i))for(let o of i)n.push(sh(r,o,a));else n.push(sh(r,i,a))}return n}var gd=ys(th(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function pn(e,t){if(!e)throw new Error(t)}var Jfe=34028234663852886e22,Hfe=-34028234663852886e22,zfe=4294967295,Wfe=2147483647,Xfe=-2147483648;function pd(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>Wfe||ezfe||e<0)throw new Error("invalid uint 32: "+e)}function uh(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>Jfe||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function Eb(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let c=oj(o);a.push(c),r[o.name]=c,i[o.no]=c}return{typeName:e,values:a,findName(o){return r[o]},findNumber(o){return i[o]}}}function sj(e,t,n){let r={};for(let i of t){let a=oj(i);r[a.localName]=a.no,r[a.no]=a.localName}return Tb(r,e,t,n),r}function oj(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var we=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){let r=this.getType(),i=r.runtime.bin,a=i.makeReadOptions(n);return i.readMessage(this,a.readerFactory(t),t.byteLength,a),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,a=i.makeReadOptions(n);return i.readMessage(r,t,a,this),this}fromJsonString(t,n){let r;try{r=JSON.parse(t)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(r,n)}toBinary(t){let n=this.getType(),r=n.runtime.bin,i=r.makeWriteOptions(t),a=i.writerFactory();return r.writeMessage(this,a,i),a.finish()}toJson(t){let n=this.getType(),r=n.runtime.json,i=r.makeWriteOptions(t);return r.writeMessage(this,i)}toJsonString(t){var n;let r=this.toJson(t);return JSON.stringify(r,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function uj(e,t,n,r){var i;let a=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[a]:function(c){e.util.initFields(this),e.util.initPartial(c,this)}}[a];return Object.setPrototypeOf(o.prototype,new we),Object.assign(o,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(c,l){return new o().fromBinary(c,l)},fromJson(c,l){return new o().fromJson(c,l)},fromJsonString(c,l){return new o().fromJsonString(c,l)},equals(c,l){return e.util.equals(o,c,l)}}),o}m();T();N();m();T();N();m();T();N();m();T();N();function lj(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>a,c=!(!(o>>>7)&&t==0),l=(c?o|128:o)&255;if(n.push(l),!c)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,c=!!(o>>>7),l=(c?o|128:o)&255;if(n.push(l),!c)return}n.push(t>>>31&1)}}var ch=4294967296;function hb(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(o,c){let l=Number(e.slice(o,c));i*=n,r=r*n+l,r>=ch&&(i=i+(r/ch|0),r=r%ch)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?fj(r,i):Ib(r,i)}function dj(e,t){let n=Ib(e,t),r=n.hi&2147483648;r&&(n=fj(n.lo,n.hi));let i=yb(n.lo,n.hi);return r?"-"+i:i}function yb(e,t){if({lo:e,hi:t}=Zfe(e,t),t<=2097151)return String(ch*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,c=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(c+=Math.floor(o/l),o%=l),c.toString()+cj(o)+cj(a)}function Zfe(e,t){return{lo:e>>>0,hi:t>>>0}}function Ib(e,t){return{lo:e|0,hi:t|0}}function fj(e,t){return t=~t,e?e=~e+1:t+=1,Ib(e,t)}var cj=e=>{let t=String(e);return"0000000".slice(t.length)+t};function gb(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function pj(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function epe(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof S!="object"||typeof S.env!="object"||S.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),o=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||dc||dpn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>pn(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),n(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),r(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),n(i),hb(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),hb(i)},dec(i,a){return dj(i,a)},uDec(i,a){return yb(i,a)}}}var Jn=epe();m();T();N();var fe;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(fe||(fe={}));var ba;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(ba||(ba={}));function Us(e,t,n){if(t===n)return!0;if(e==fe.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let r=0;r>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(vp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return pd(t),gb(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){uh(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){vp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){pd(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return pd(t),t=(t<<1^t>>31)>>>0,gb(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Jn.enc(t);return lh(n.lo,n.hi,this.buf),this}sint64(t){let n=Jn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return lh(i,a,this.buf),this}uint64(t){let n=Jn.uEnc(t);return lh(n.lo,n.hi,this.buf),this}},ph=class{constructor(t,n){this.varint64=lj,this.uint32=pj,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case xn.Varint:for(;this.buf[this.pos++]&128;);break;case xn.Bit64:this.pos+=4;case xn.Bit32:this.pos+=4;break;case xn.LengthDelimited:let r=this.uint32();this.pos+=r;break;case xn.StartGroup:let i;for(;(i=this.tag()[1])!==xn.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Jn.dec(...this.varint64())}uint64(){return Jn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Jn.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}};function mj(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let a=typeof r=="function"?r():r;a.name=t.split(".").pop(),a.jsonName=`[${t}]`,i=e.util.newFieldList([a]).list()[0]}return i},runtime:e}}function mh(e){let t=e.field.localName,n=Object.create(null);return n[t]=tpe(e),[n,()=>n[t]]}function tpe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return Aa(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}function Nj(e,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(n=>n.no===t.no)}m();T();N();m();T();N();var ks="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Nh=[];for(let e=0;e>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a>2],i=(r&3)<<4,n=1;break;case 1:t+=ks[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=ks[i|r>>6],t+=ks[r&63],n=0;break}return n&&(t+=ks[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function Tj(e,t,n){hj(t,e);let r=t.runtime.bin.makeReadOptions(n),i=Nj(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=mh(t);for(let c of i)t.runtime.bin.readField(a,r.readerFactory(c.data),t.field,c.wireType,r);return o()}function Ej(e,t,n,r){hj(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(vb(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(p=>p.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let p of d)e.getType().runtime.bin.onUnknownField(e,p.no,p.wireType,p.data)}let o=a.writerFactory(),c=t.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(c,n,o,a);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function hj(e,t){pn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function Th(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?t[n]!==void 0:e.kind=="enum"?t[n]!==e.T.values[0].no:!dh(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function Ob(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?Aa(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ra(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(we.prototype).every(r=>r in e&&typeof e[r]=="function"))return!1;let n=e.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:t===void 0?!0:n.typeName==t.typeName}function Eh(e,t){return Ra(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var S1e={"google.protobuf.DoubleValue":fe.DOUBLE,"google.protobuf.FloatValue":fe.FLOAT,"google.protobuf.Int64Value":fe.INT64,"google.protobuf.UInt64Value":fe.UINT64,"google.protobuf.Int32Value":fe.INT32,"google.protobuf.UInt32Value":fe.UINT32,"google.protobuf.BoolValue":fe.BOOL,"google.protobuf.StringValue":fe.STRING,"google.protobuf.BytesValue":fe.BYTES};var yj={ignoreUnknownFields:!1},Ij={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function npe(e){return e?Object.assign(Object.assign({},yj),e):yj}function rpe(e){return e?Object.assign(Object.assign({},Ij),e):Ij}var Ih=Symbol(),hh=Symbol();function vj(){return{makeReadOptions:npe,makeWriteOptions:rpe,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${os(t)}`);r=r!=null?r:new e;let i=new Map,a=n.typeRegistry;for(let[o,c]of Object.entries(t)){let l=e.fields.findJsonName(o);if(l){if(l.oneof){if(c===null&&l.kind=="scalar")continue;let d=i.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${o}"`);i.set(l.oneof,o)}gj(r,c,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=a.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[E,I]=mh(p);gj(E,c,p.field,n,p),Ej(r,p,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!Th(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!ape(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],c=_j(i,o,t);c!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=c)}let a=t.typeRegistry;if(a!=null&&a.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let c=a.findExtensionFor(n.typeName,o.no);if(c&&vb(e,c)){let l=Tj(e,c,t),d=_j(c.field,l,t);d!==void 0&&(r[c.field.jsonName]=d)}}}catch(a){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=a instanceof Error?a.message:String(a);throw new Error(o+(c.length>0?`: ${c}`:""))}return r},readScalar(e,t,n){return Op(e,t,n!=null?n:ba.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||dh(e,t)))return yh(e,t)},debug:os}}function os(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function gj(e,t,n,r,i){let a=n.localName;if(n.repeated){if(pn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(t)}`);let o=e[a];for(let c of t){if(c===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(c)}`);switch(n.kind){case"message":o.push(n.T.fromJson(c,r));break;case"enum":let l=Sb(n.T,c,r.ignoreUnknownFields,!0);l!==hh&&o.push(l);break;case"scalar":try{o.push(Op(n.T,c,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(c)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}}else if(n.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(t)}`);let o=e[a];for(let[c,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let d;try{d=ipe(n.K,c)}catch(p){let E=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${os(t)}`;throw p instanceof Error&&p.message.length>0&&(E+=`: ${p.message}`),new Error(E)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=Sb(n.V.T,l,r.ignoreUnknownFields,!0);p!==hh&&(o[d]=p);break;case"scalar":try{o[d]=Op(n.V.T,l,ba.BIGINT,!0)}catch(E){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${os(t)}`;throw E instanceof Error&&E.message.length>0&&(I+=`: ${E.message}`),new Error(I)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let c=e[a];Ra(c)?c.fromJson(t,r):(e[a]=c=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(c)));break;case"enum":let l=Sb(n.T,t,r.ignoreUnknownFields,!1);switch(l){case Ih:Ob(n,e);break;case hh:break;default:e[a]=l;break}break;case"scalar":try{let d=Op(n.T,t,n.L,!1);switch(d){case Ih:Ob(n,e);break;default:e[a]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${os(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function ipe(e,t){if(e===fe.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return Op(e,t,ba.BIGINT,!0).toString()}function Op(e,t,n,r){if(t===null)return r?Aa(e,n):Ih;switch(e){case fe.DOUBLE:case fe.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==fe.FLOAT&&uh(i),i;case fe.INT32:case fe.FIXED32:case fe.SFIXED32:case fe.SINT32:case fe.UINT32:let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==fe.UINT32||e==fe.FIXED32?vp(a):pd(a),a;case fe.INT64:case fe.SFIXED64:case fe.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Jn.parse(t);return n?o.toString():o;case fe.FIXED64:case fe.UINT64:if(typeof t!="number"&&typeof t!="string")break;let c=Jn.uParse(t);return n?c.toString():c;case fe.BOOL:if(typeof t!="boolean")break;return t;case fe.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case fe.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return _b.dec(t)}throw new Error}function Sb(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:Ih;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(i!==void 0)return i.no;if(n)return hh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${os(t)}`)}function ape(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function _j(e,t,n){if(e.kind=="map"){pn(typeof t=="object"&&t!=null);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[o,c]of i)r[o.toString()]=yh(e.V.T,c);break;case"message":for(let[o,c]of i)r[o.toString()]=c.toJson(n);break;case"enum":let a=e.V.T;for(let[o,c]of i)r[o.toString()]=Db(a,c,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){pn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return yh(e.T,t);case"enum":return Db(e.T,t,n.enumAsInteger);case"message":return Eh(e.T,t).toJson(n)}}function Db(e,t,n){var r;if(pn(typeof t=="number"),e.typeName=="google.protobuf.NullValue")return null;if(n)return t;let i=e.findNumber(t);return(r=i==null?void 0:i.name)!==null&&r!==void 0?r:t}function yh(e,t){switch(e){case fe.INT32:case fe.SFIXED32:case fe.SINT32:case fe.FIXED32:case fe.UINT32:return pn(typeof t=="number"),t;case fe.FLOAT:case fe.DOUBLE:return pn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case fe.STRING:return pn(typeof t=="string"),t;case fe.BOOL:return pn(typeof t=="boolean"),t;case fe.UINT64:case fe.FIXED64:case fe.INT64:case fe.SFIXED64:case fe.SINT64:return pn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case fe.BYTES:return pn(t instanceof Uint8Array),_b.enc(t)}}m();T();N();var md=Symbol("@bufbuild/protobuf/unknown-fields"),Oj={readUnknownFields:!0,readerFactory:e=>new ph(e)},Sj={writeUnknownFields:!0,writerFactory:()=>new fh};function spe(e){return e?Object.assign(Object.assign({},Oj),e):Oj}function ope(e){return e?Object.assign(Object.assign({},Sj),e):Sj}function Rj(){return{makeReadOptions:spe,makeWriteOptions:ope,listUnknownFields(e){var t;return(t=e[md])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[md]},writeUnknownFields(e,t){let r=e[md];if(r)for(let i of r)t.tag(i.no,i.wireType).raw(i.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[md])||(i[md]=[]),i[md].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,c,l;for(;t.pos0&&(l=cpe),a){let I=e[o];if(r==xn.LengthDelimited&&c!=fe.STRING&&c!=fe.BYTES){let A=t.uint32()+t.pos;for(;t.posRa(I,E)?I:new E(I));else{let I=o[i];E.fieldWrapper?E.typeName==="google.protobuf.BytesValue"?a[i]=Dp(I):a[i]=I:a[i]=Ra(I,E)?I:new E(I)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],a=n[r.localName];if(r.repeated){if(i.length!==a.length)return!1;switch(r.kind){case"message":return i.every((o,c)=>r.T.equals(o,a[c]));case"scalar":return i.every((o,c)=>Us(r.T,o,a[c]));case"enum":return i.every((o,c)=>Us(fe.INT32,o,a[c]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,a);case"enum":return Us(fe.INT32,i,a);case"scalar":return Us(r.T,i,a);case"oneof":if(i.case!==a.case)return!1;let o=r.findField(i.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(i.value,a.value);case"enum":return Us(fe.INT32,i.value,a.value);case"scalar":return Us(o.T,i.value,a.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let c=Object.keys(i).concat(Object.keys(a));switch(r.V.kind){case"message":let l=r.V.T;return c.every(p=>l.equals(i[p],a[p]));case"enum":return c.every(p=>Us(fe.INT32,i[p],a[p]));case"scalar":let d=r.V.T;return c.every(p=>Us(d,i[p],a[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let a=e[i.localName],o;if(i.repeated)o=a.map(vh);else if(i.kind=="map"){o=r[i.localName];for(let[c,l]of Object.entries(a))o[c]=vh(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:vh(a.value)}:{case:void 0}:o=vh(a);r[i.localName]=o}for(let i of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,i.no,i.wireType,i.data);return n}}}function vh(e){if(e===void 0)return e;if(Ra(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Dp(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function wj(e,t,n){return{syntax:e,json:vj(),bin:Rj(),util:Object.assign(Object.assign({},Fj()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return uj(this,r,i,a)},makeEnum:sj,makeEnumType:Eb,getEnumType:aj,makeExtension(r,i,a){return mj(this,r,i,a)}}}m();T();N();var Oh=class{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){let n={};for(let r of this.list())n[r.jsonName]=n[r.name]=r;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){let n={};for(let r of this.list())n[r.no]=r;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,n;for(let r of this.list())r.oneof?r.oneof!==n&&(n=r.oneof,t.push(n)):t.push(r)}return this.members}};m();T();N();m();T();N();m();T();N();function bb(e,t){let n=Bj(e);return t?n:Npe(mpe(n))}function Lj(e){return bb(e,!1)}var Cj=Bj;function Bj(e){let t=!1,n=[];for(let r=0;r`${e}$`,mpe=e=>ppe.has(e)?Uj(e):e,Npe=e=>fpe.has(e)?Uj(e):e;var Sh=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=Lj(t)}addField(t){pn(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;nnew Oh(e,t=>kj(t,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case"oneof":r[n]={case:void 0};break;case"enum":r[n]=0;break;case"map":r[n]={};break;case"scalar":r[n]=Aa(t.T,t.L);break;case"message":break}}});var Nd;(function(e){e[e.OK=0]="OK",e[e.ERR=1]="ERR",e[e.ERR_NOT_FOUND=2]="ERR_NOT_FOUND",e[e.ERR_ALREADY_EXISTS=3]="ERR_ALREADY_EXISTS",e[e.ERR_INVALID_SUBGRAPH_SCHEMA=4]="ERR_INVALID_SUBGRAPH_SCHEMA",e[e.ERR_SUBGRAPH_COMPOSITION_FAILED=5]="ERR_SUBGRAPH_COMPOSITION_FAILED",e[e.ERR_SUBGRAPH_CHECK_FAILED=6]="ERR_SUBGRAPH_CHECK_FAILED",e[e.ERR_INVALID_LABELS=7]="ERR_INVALID_LABELS",e[e.ERR_ANALYTICS_DISABLED=8]="ERR_ANALYTICS_DISABLED",e[e.ERROR_NOT_AUTHENTICATED=9]="ERROR_NOT_AUTHENTICATED",e[e.ERR_OPENAI_DISABLED=10]="ERR_OPENAI_DISABLED",e[e.ERR_FREE_TRIAL_EXPIRED=11]="ERR_FREE_TRIAL_EXPIRED",e[e.ERROR_NOT_AUTHORIZED=12]="ERROR_NOT_AUTHORIZED",e[e.ERR_LIMIT_REACHED=13]="ERR_LIMIT_REACHED",e[e.ERR_DEPLOYMENT_FAILED=14]="ERR_DEPLOYMENT_FAILED",e[e.ERR_INVALID_NAME=15]="ERR_INVALID_NAME",e[e.ERR_UPGRADE_PLAN=16]="ERR_UPGRADE_PLAN",e[e.ERR_BAD_REQUEST=17]="ERR_BAD_REQUEST",e[e.ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL=18]="ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"})(Nd||(Nd={}));C.util.setEnumType(Nd,"wg.cosmo.common.EnumStatusCode",[{no:0,name:"OK"},{no:1,name:"ERR"},{no:2,name:"ERR_NOT_FOUND"},{no:3,name:"ERR_ALREADY_EXISTS"},{no:4,name:"ERR_INVALID_SUBGRAPH_SCHEMA"},{no:5,name:"ERR_SUBGRAPH_COMPOSITION_FAILED"},{no:6,name:"ERR_SUBGRAPH_CHECK_FAILED"},{no:7,name:"ERR_INVALID_LABELS"},{no:8,name:"ERR_ANALYTICS_DISABLED"},{no:9,name:"ERROR_NOT_AUTHENTICATED"},{no:10,name:"ERR_OPENAI_DISABLED"},{no:11,name:"ERR_FREE_TRIAL_EXPIRED"},{no:12,name:"ERROR_NOT_AUTHORIZED"},{no:13,name:"ERR_LIMIT_REACHED"},{no:14,name:"ERR_DEPLOYMENT_FAILED"},{no:15,name:"ERR_INVALID_NAME"},{no:16,name:"ERR_UPGRADE_PLAN"},{no:17,name:"ERR_BAD_REQUEST"},{no:18,name:"ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"}]);var Ms;(function(e){e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS=0]="GRAPHQL_SUBSCRIPTION_PROTOCOL_WS",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE=1]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST=2]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"})(Ms||(Ms={}));C.util.setEnumType(Ms,"wg.cosmo.common.GraphQLSubscriptionProtocol",[{no:0,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},{no:1,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE"},{no:2,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"}]);var xs;(function(e){e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO=0]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS=1]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS=2]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"})(xs||(xs={}));C.util.setEnumType(xs,"wg.cosmo.common.GraphQLWebsocketSubprotocol",[{no:0,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO"},{no:1,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS"},{no:2,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"}]);var Yj=ys(Oe(),1);m();T();N();var Ab;(function(e){e[e.RENDER_ARGUMENT_DEFAULT=0]="RENDER_ARGUMENT_DEFAULT",e[e.RENDER_ARGUMENT_AS_GRAPHQL_VALUE=1]="RENDER_ARGUMENT_AS_GRAPHQL_VALUE",e[e.RENDER_ARGUMENT_AS_ARRAY_CSV=2]="RENDER_ARGUMENT_AS_ARRAY_CSV"})(Ab||(Ab={}));C.util.setEnumType(Ab,"wg.cosmo.node.v1.ArgumentRenderConfiguration",[{no:0,name:"RENDER_ARGUMENT_DEFAULT"},{no:1,name:"RENDER_ARGUMENT_AS_GRAPHQL_VALUE"},{no:2,name:"RENDER_ARGUMENT_AS_ARRAY_CSV"}]);var Kc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(Kc||(Kc={}));C.util.setEnumType(Kc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var Lu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(Lu||(Lu={}));C.util.setEnumType(Lu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var bp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.RESOLVE=1]="RESOLVE",e[e.REQUIRES=2]="REQUIRES"})(bp||(bp={}));C.util.setEnumType(bp,"wg.cosmo.node.v1.LookupType",[{no:0,name:"LOOKUP_TYPE_UNSPECIFIED"},{no:1,name:"LOOKUP_TYPE_RESOLVE"},{no:2,name:"LOOKUP_TYPE_REQUIRES"}]);var Ap;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(Ap||(Ap={}));C.util.setEnumType(Ap,"wg.cosmo.node.v1.OperationType",[{no:0,name:"OPERATION_TYPE_UNSPECIFIED"},{no:1,name:"OPERATION_TYPE_QUERY"},{no:2,name:"OPERATION_TYPE_MUTATION"},{no:3,name:"OPERATION_TYPE_SUBSCRIPTION"}]);var zo;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(zo||(zo={}));C.util.setEnumType(zo,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Cu;(function(e){e[e.STATIC_CONFIGURATION_VARIABLE=0]="STATIC_CONFIGURATION_VARIABLE",e[e.ENV_CONFIGURATION_VARIABLE=1]="ENV_CONFIGURATION_VARIABLE",e[e.PLACEHOLDER_CONFIGURATION_VARIABLE=2]="PLACEHOLDER_CONFIGURATION_VARIABLE"})(Cu||(Cu={}));C.util.setEnumType(Cu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Gc;(function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS"})(Gc||(Gc={}));C.util.setEnumType(Gc,"wg.cosmo.node.v1.HTTPMethod",[{no:0,name:"GET"},{no:1,name:"POST"},{no:2,name:"PUT"},{no:3,name:"DELETE"},{no:4,name:"OPTIONS"}]);var qs=class qs extends we{constructor(n){super();g(this,"id","");g(this,"name","");g(this,"routingUrl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qs().fromBinary(n,r)}static fromJson(n,r){return new qs().fromJson(n,r)}static fromJsonString(n,r){return new qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qs,n,r)}};g(qs,"runtime",C),g(qs,"typeName","wg.cosmo.node.v1.Subgraph"),g(qs,"fields",C.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"routing_url",kind:"scalar",T:9}]));var Dh=qs,Vs=class Vs extends we{constructor(n){super();g(this,"configByFeatureFlagName",{});C.util.initPartial(n,this)}static fromBinary(n,r){return new Vs().fromBinary(n,r)}static fromJson(n,r){return new Vs().fromJson(n,r)}static fromJsonString(n,r){return new Vs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vs,n,r)}};g(Vs,"runtime",C),g(Vs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),g(Vs,"fields",C.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:Pb}}]));var Rb=Vs,js=class js extends we{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new js().fromBinary(n,r)}static fromJson(n,r){return new js().fromJson(n,r)}static fromJsonString(n,r){return new js().fromJsonString(n,r)}static equals(n,r){return C.util.equals(js,n,r)}};g(js,"runtime",C),g(js,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),g(js,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Td},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:Dh,repeated:!0}]));var Pb=js,Ks=class Ks extends we{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);g(this,"featureFlagConfigs");g(this,"compatibilityVersion","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ks().fromBinary(n,r)}static fromJson(n,r){return new Ks().fromJson(n,r)}static fromJsonString(n,r){return new Ks().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ks,n,r)}};g(Ks,"runtime",C),g(Ks,"typeName","wg.cosmo.node.v1.RouterConfig"),g(Ks,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Td},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:Dh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:Rb,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var Rp=Ks,Gs=class Gs extends we{constructor(n){super();g(this,"code",Nd.OK);g(this,"details");C.util.initPartial(n,this)}static fromBinary(n,r){return new Gs().fromBinary(n,r)}static fromJson(n,r){return new Gs().fromJson(n,r)}static fromJsonString(n,r){return new Gs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Gs,n,r)}};g(Gs,"runtime",C),g(Gs,"typeName","wg.cosmo.node.v1.Response"),g(Gs,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:C.getEnumType(Nd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var Fb=Gs,$s=class $s extends we{constructor(n){super();g(this,"code",0);g(this,"message","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $s().fromBinary(n,r)}static fromJson(n,r){return new $s().fromJson(n,r)}static fromJsonString(n,r){return new $s().fromJsonString(n,r)}static equals(n,r){return C.util.equals($s,n,r)}};g($s,"runtime",C),g($s,"typeName","wg.cosmo.node.v1.ResponseStatus"),g($s,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var Mj=$s,Qs=class Qs extends we{constructor(n){super();g(this,"accountLimits");g(this,"graphPublicKey","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qs().fromBinary(n,r)}static fromJson(n,r){return new Qs().fromJson(n,r)}static fromJsonString(n,r){return new Qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qs,n,r)}};g(Qs,"runtime",C),g(Qs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),g(Qs,"fields",C.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:Lb},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var wb=Qs,Ys=class Ys extends we{constructor(n){super();g(this,"traceSamplingRate",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ys().fromBinary(n,r)}static fromJson(n,r){return new Ys().fromJson(n,r)}static fromJsonString(n,r){return new Ys().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ys,n,r)}};g(Ys,"runtime",C),g(Ys,"typeName","wg.cosmo.node.v1.AccountLimits"),g(Ys,"fields",C.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var Lb=Ys,Js=class Js extends we{constructor(t){super(),C.util.initPartial(t,this)}static fromBinary(t,n){return new Js().fromBinary(t,n)}static fromJson(t,n){return new Js().fromJson(t,n)}static fromJsonString(t,n){return new Js().fromJsonString(t,n)}static equals(t,n){return C.util.equals(Js,t,n)}};g(Js,"runtime",C),g(Js,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),g(Js,"fields",C.util.newFieldList(()=>[]));var xj=Js,Hs=class Hs extends we{constructor(n){super();g(this,"response");g(this,"registrationInfo");C.util.initPartial(n,this)}static fromBinary(n,r){return new Hs().fromBinary(n,r)}static fromJson(n,r){return new Hs().fromJson(n,r)}static fromJsonString(n,r){return new Hs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Hs,n,r)}};g(Hs,"runtime",C),g(Hs,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),g(Hs,"fields",C.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:Fb},{no:2,name:"registrationInfo",kind:"message",T:wb,opt:!0}]));var qj=Hs,zs=class zs extends we{constructor(n){super();g(this,"defaultFlushInterval",Jn.zero);g(this,"datasourceConfigurations",[]);g(this,"fieldConfigurations",[]);g(this,"graphqlSchema","");g(this,"typeConfigurations",[]);g(this,"stringStorage",{});g(this,"graphqlClientSchema");C.util.initPartial(n,this)}static fromBinary(n,r){return new zs().fromBinary(n,r)}static fromJson(n,r){return new zs().fromJson(n,r)}static fromJsonString(n,r){return new zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zs,n,r)}};g(zs,"runtime",C),g(zs,"typeName","wg.cosmo.node.v1.EngineConfiguration"),g(zs,"fields",C.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:Pp,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:Lp,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:Cb,repeated:!0},{no:6,name:"string_storage",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"graphql_client_schema",kind:"scalar",T:9,opt:!0}]));var Td=zs,Ws=class Ws extends we{constructor(n){super();g(this,"kind",Lu.STATIC);g(this,"rootNodes",[]);g(this,"childNodes",[]);g(this,"overrideFieldPathFromAlias",!1);g(this,"customGraphql");g(this,"customStatic");g(this,"directives",[]);g(this,"requestTimeoutSeconds",Jn.zero);g(this,"id","");g(this,"keys",[]);g(this,"provides",[]);g(this,"requires",[]);g(this,"customEvents");g(this,"entityInterfaces",[]);g(this,"interfaceObjects",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ws().fromBinary(n,r)}static fromJson(n,r){return new Ws().fromJson(n,r)}static fromJsonString(n,r){return new Ws().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ws,n,r)}};g(Ws,"runtime",C),g(Ws,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),g(Ws,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(Lu)},{no:2,name:"root_nodes",kind:"message",T:Ed,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:Ed,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Up},{no:6,name:"custom_static",kind:"message",T:Yb},{no:7,name:"directives",kind:"message",T:Jb,repeated:!0},{no:8,name:"request_timeout_seconds",kind:"scalar",T:3},{no:9,name:"id",kind:"scalar",T:9},{no:10,name:"keys",kind:"message",T:jc,repeated:!0},{no:11,name:"provides",kind:"message",T:jc,repeated:!0},{no:12,name:"requires",kind:"message",T:jc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Qc},{no:14,name:"entity_interfaces",kind:"message",T:hd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:hd,repeated:!0}]));var Pp=Ws,Xs=class Xs extends we{constructor(n){super();g(this,"name","");g(this,"sourceType",Kc.OBJECT_FIELD);C.util.initPartial(n,this)}static fromBinary(n,r){return new Xs().fromBinary(n,r)}static fromJson(n,r){return new Xs().fromJson(n,r)}static fromJsonString(n,r){return new Xs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Xs,n,r)}};g(Xs,"runtime",C),g(Xs,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),g(Xs,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:C.getEnumType(Kc)}]));var Fp=Xs,Zs=class Zs extends we{constructor(n){super();g(this,"requiredAndScopes",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Zs().fromBinary(n,r)}static fromJson(n,r){return new Zs().fromJson(n,r)}static fromJsonString(n,r){return new Zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zs,n,r)}};g(Zs,"runtime",C),g(Zs,"typeName","wg.cosmo.node.v1.Scopes"),g(Zs,"fields",C.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var $c=Zs,eo=class eo extends we{constructor(n){super();g(this,"requiresAuthentication",!1);g(this,"requiredOrScopes",[]);g(this,"requiredOrScopesByOr",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new eo().fromBinary(n,r)}static fromJson(n,r){return new eo().fromJson(n,r)}static fromJsonString(n,r){return new eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(eo,n,r)}};g(eo,"runtime",C),g(eo,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),g(eo,"fields",C.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:$c,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:$c,repeated:!0}]));var wp=eo,to=class to extends we{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"argumentsConfiguration",[]);g(this,"authorizationConfiguration");g(this,"subscriptionFilterCondition");C.util.initPartial(n,this)}static fromBinary(n,r){return new to().fromBinary(n,r)}static fromJson(n,r){return new to().fromJson(n,r)}static fromJsonString(n,r){return new to().fromJsonString(n,r)}static equals(n,r){return C.util.equals(to,n,r)}};g(to,"runtime",C),g(to,"typeName","wg.cosmo.node.v1.FieldConfiguration"),g(to,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"arguments_configuration",kind:"message",T:Fp,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:wp},{no:5,name:"subscription_filter_condition",kind:"message",T:Bu,opt:!0}]));var Lp=to,no=class no extends we{constructor(n){super();g(this,"typeName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new no().fromBinary(n,r)}static fromJson(n,r){return new no().fromJson(n,r)}static fromJsonString(n,r){return new no().fromJsonString(n,r)}static equals(n,r){return C.util.equals(no,n,r)}};g(no,"runtime",C),g(no,"typeName","wg.cosmo.node.v1.TypeConfiguration"),g(no,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var Cb=no,ro=class ro extends we{constructor(n){super();g(this,"typeName","");g(this,"fieldNames",[]);g(this,"externalFieldNames",[]);g(this,"requireFetchReasonsFieldNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ro().fromBinary(n,r)}static fromJson(n,r){return new ro().fromJson(n,r)}static fromJsonString(n,r){return new ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ro,n,r)}};g(ro,"runtime",C),g(ro,"typeName","wg.cosmo.node.v1.TypeField"),g(ro,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_names",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_field_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"require_fetch_reasons_field_names",kind:"scalar",T:9,repeated:!0}]));var Ed=ro,io=class io extends we{constructor(n){super();g(this,"fieldName","");g(this,"typeName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new io().fromBinary(n,r)}static fromJson(n,r){return new io().fromJson(n,r)}static fromJsonString(n,r){return new io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(io,n,r)}};g(io,"runtime",C),g(io,"typeName","wg.cosmo.node.v1.FieldCoordinates"),g(io,"fields",C.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var Cp=io,ao=class ao extends we{constructor(n){super();g(this,"fieldCoordinatesPath",[]);g(this,"fieldPath",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ao().fromBinary(n,r)}static fromJson(n,r){return new ao().fromJson(n,r)}static fromJsonString(n,r){return new ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ao,n,r)}};g(ao,"runtime",C),g(ao,"typeName","wg.cosmo.node.v1.FieldSetCondition"),g(ao,"fields",C.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:Cp,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Bp=ao,so=class so extends we{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"selectionSet","");g(this,"disableEntityResolver",!1);g(this,"conditions",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new so().fromBinary(n,r)}static fromJson(n,r){return new so().fromJson(n,r)}static fromJsonString(n,r){return new so().fromJsonString(n,r)}static equals(n,r){return C.util.equals(so,n,r)}};g(so,"runtime",C),g(so,"typeName","wg.cosmo.node.v1.RequiredField"),g(so,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"selection_set",kind:"scalar",T:9},{no:4,name:"disable_entity_resolver",kind:"scalar",T:8},{no:5,name:"conditions",kind:"message",T:Bp,repeated:!0}]));var jc=so,oo=class oo extends we{constructor(n){super();g(this,"interfaceTypeName","");g(this,"concreteTypeNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new oo().fromBinary(n,r)}static fromJson(n,r){return new oo().fromJson(n,r)}static fromJsonString(n,r){return new oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(oo,n,r)}};g(oo,"runtime",C),g(oo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),g(oo,"fields",C.util.newFieldList(()=>[{no:1,name:"interface_type_name",kind:"scalar",T:9},{no:2,name:"concrete_type_names",kind:"scalar",T:9,repeated:!0}]));var hd=oo,uo=class uo extends we{constructor(n){super();g(this,"url");g(this,"method",Gc.GET);g(this,"header",{});g(this,"body");g(this,"query",[]);g(this,"urlEncodeBody",!1);g(this,"mtls");g(this,"baseUrl");g(this,"path");g(this,"httpProxyUrl");C.util.initPartial(n,this)}static fromBinary(n,r){return new uo().fromBinary(n,r)}static fromJson(n,r){return new uo().fromJson(n,r)}static fromJsonString(n,r){return new uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(uo,n,r)}};g(uo,"runtime",C),g(uo,"typeName","wg.cosmo.node.v1.FetchConfiguration"),g(uo,"fields",C.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:$r},{no:2,name:"method",kind:"enum",T:C.getEnumType(Gc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:zb}},{no:4,name:"body",kind:"message",T:$r},{no:5,name:"query",kind:"message",T:Hb,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:Wb},{no:9,name:"base_url",kind:"message",T:$r},{no:10,name:"path",kind:"message",T:$r},{no:11,name:"http_proxy_url",kind:"message",T:$r,opt:!0}]));var Bb=uo,co=class co extends we{constructor(n){super();g(this,"statusCode",Jn.zero);g(this,"typeName","");g(this,"injectStatusCodeIntoBody",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new co().fromBinary(n,r)}static fromJson(n,r){return new co().fromJson(n,r)}static fromJsonString(n,r){return new co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(co,n,r)}};g(co,"runtime",C),g(co,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),g(co,"fields",C.util.newFieldList(()=>[{no:1,name:"status_code",kind:"scalar",T:3},{no:2,name:"type_name",kind:"scalar",T:9},{no:3,name:"inject_status_code_into_body",kind:"scalar",T:8}]));var Vj=co,lo=class lo extends we{constructor(n){super();g(this,"fetch");g(this,"subscription");g(this,"federation");g(this,"upstreamSchema");g(this,"customScalarTypeFields",[]);g(this,"grpc");C.util.initPartial(n,this)}static fromBinary(n,r){return new lo().fromBinary(n,r)}static fromJson(n,r){return new lo().fromJson(n,r)}static fromJsonString(n,r){return new lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(lo,n,r)}};g(lo,"runtime",C),g(lo,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),g(lo,"fields",C.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:Bb},{no:2,name:"subscription",kind:"message",T:Xb},{no:3,name:"federation",kind:"message",T:Zb},{no:4,name:"upstream_schema",kind:"message",T:Kp},{no:6,name:"custom_scalar_type_fields",kind:"message",T:e0,repeated:!0},{no:7,name:"grpc",kind:"message",T:yd}]));var Up=lo,fo=class fo extends we{constructor(n){super();g(this,"mapping");g(this,"protoSchema","");g(this,"plugin");C.util.initPartial(n,this)}static fromBinary(n,r){return new fo().fromBinary(n,r)}static fromJson(n,r){return new fo().fromJson(n,r)}static fromJsonString(n,r){return new fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(fo,n,r)}};g(fo,"runtime",C),g(fo,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),g(fo,"fields",C.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:kb},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:kp}]));var yd=fo,po=class po extends we{constructor(n){super();g(this,"repository","");g(this,"reference","");C.util.initPartial(n,this)}static fromBinary(n,r){return new po().fromBinary(n,r)}static fromJson(n,r){return new po().fromJson(n,r)}static fromJsonString(n,r){return new po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(po,n,r)}};g(po,"runtime",C),g(po,"typeName","wg.cosmo.node.v1.ImageReference"),g(po,"fields",C.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var Ub=po,mo=class mo extends we{constructor(n){super();g(this,"name","");g(this,"version","");g(this,"imageReference");C.util.initPartial(n,this)}static fromBinary(n,r){return new mo().fromBinary(n,r)}static fromJson(n,r){return new mo().fromJson(n,r)}static fromJsonString(n,r){return new mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(mo,n,r)}};g(mo,"runtime",C),g(mo,"typeName","wg.cosmo.node.v1.PluginConfiguration"),g(mo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"image_reference",kind:"message",T:Ub,opt:!0}]));var kp=mo,No=class No extends we{constructor(n){super();g(this,"enabled",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new No().fromBinary(n,r)}static fromJson(n,r){return new No().fromJson(n,r)}static fromJsonString(n,r){return new No().fromJsonString(n,r)}static equals(n,r){return C.util.equals(No,n,r)}};g(No,"runtime",C),g(No,"typeName","wg.cosmo.node.v1.SSLConfiguration"),g(No,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var jj=No,To=class To extends we{constructor(n){super();g(this,"version",0);g(this,"service","");g(this,"operationMappings",[]);g(this,"entityMappings",[]);g(this,"typeFieldMappings",[]);g(this,"enumMappings",[]);g(this,"resolveMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new To().fromBinary(n,r)}static fromJson(n,r){return new To().fromJson(n,r)}static fromJsonString(n,r){return new To().fromJsonString(n,r)}static equals(n,r){return C.util.equals(To,n,r)}};g(To,"runtime",C),g(To,"typeName","wg.cosmo.node.v1.GRPCMapping"),g(To,"fields",C.util.newFieldList(()=>[{no:1,name:"version",kind:"scalar",T:5},{no:2,name:"service",kind:"scalar",T:9},{no:3,name:"operation_mappings",kind:"message",T:qb,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:Vb,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:Kb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:$b,repeated:!0},{no:7,name:"resolve_mappings",kind:"message",T:Mb,repeated:!0}]));var kb=To,Eo=class Eo extends we{constructor(n){super();g(this,"type",bp.UNSPECIFIED);g(this,"lookupMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Eo().fromBinary(n,r)}static fromJson(n,r){return new Eo().fromJson(n,r)}static fromJsonString(n,r){return new Eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Eo,n,r)}};g(Eo,"runtime",C),g(Eo,"typeName","wg.cosmo.node.v1.LookupMapping"),g(Eo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(bp)},{no:2,name:"lookup_mapping",kind:"message",T:xb},{no:3,name:"rpc",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var Mb=Eo,ho=class ho extends we{constructor(n){super();g(this,"type","");g(this,"fieldMapping");C.util.initPartial(n,this)}static fromBinary(n,r){return new ho().fromBinary(n,r)}static fromJson(n,r){return new ho().fromJson(n,r)}static fromJsonString(n,r){return new ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ho,n,r)}};g(ho,"runtime",C),g(ho,"typeName","wg.cosmo.node.v1.LookupFieldMapping"),g(ho,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mapping",kind:"message",T:Mp}]));var xb=ho,yo=class yo extends we{constructor(n){super();g(this,"type",Ap.UNSPECIFIED);g(this,"original","");g(this,"mapped","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new yo().fromBinary(n,r)}static fromJson(n,r){return new yo().fromJson(n,r)}static fromJsonString(n,r){return new yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(yo,n,r)}};g(yo,"runtime",C),g(yo,"typeName","wg.cosmo.node.v1.OperationMapping"),g(yo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(Ap)},{no:2,name:"original",kind:"scalar",T:9},{no:3,name:"mapped",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var qb=yo,Io=class Io extends we{constructor(n){super();g(this,"typeName","");g(this,"kind","");g(this,"key","");g(this,"rpc","");g(this,"request","");g(this,"response","");g(this,"requiredFieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Io().fromBinary(n,r)}static fromJson(n,r){return new Io().fromJson(n,r)}static fromJsonString(n,r){return new Io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Io,n,r)}};g(Io,"runtime",C),g(Io,"typeName","wg.cosmo.node.v1.EntityMapping"),g(Io,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"kind",kind:"scalar",T:9},{no:3,name:"key",kind:"scalar",T:9},{no:4,name:"rpc",kind:"scalar",T:9},{no:5,name:"request",kind:"scalar",T:9},{no:6,name:"response",kind:"scalar",T:9},{no:7,name:"required_field_mappings",kind:"message",T:jb,repeated:!0}]));var Vb=Io,go=class go extends we{constructor(n){super();g(this,"fieldMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new go().fromBinary(n,r)}static fromJson(n,r){return new go().fromJson(n,r)}static fromJsonString(n,r){return new go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(go,n,r)}};g(go,"runtime",C),g(go,"typeName","wg.cosmo.node.v1.RequiredFieldMapping"),g(go,"fields",C.util.newFieldList(()=>[{no:1,name:"field_mapping",kind:"message",T:Mp},{no:2,name:"rpc",kind:"scalar",T:9},{no:3,name:"request",kind:"scalar",T:9},{no:4,name:"response",kind:"scalar",T:9}]));var jb=go,_o=class _o extends we{constructor(n){super();g(this,"type","");g(this,"fieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new _o().fromBinary(n,r)}static fromJson(n,r){return new _o().fromJson(n,r)}static fromJsonString(n,r){return new _o().fromJsonString(n,r)}static equals(n,r){return C.util.equals(_o,n,r)}};g(_o,"runtime",C),g(_o,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),g(_o,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:Mp,repeated:!0}]));var Kb=_o,vo=class vo extends we{constructor(n){super();g(this,"original","");g(this,"mapped","");g(this,"argumentMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new vo().fromBinary(n,r)}static fromJson(n,r){return new vo().fromJson(n,r)}static fromJsonString(n,r){return new vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(vo,n,r)}};g(vo,"runtime",C),g(vo,"typeName","wg.cosmo.node.v1.FieldMapping"),g(vo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9},{no:3,name:"argument_mappings",kind:"message",T:Gb,repeated:!0}]));var Mp=vo,Oo=class Oo extends we{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Oo().fromBinary(n,r)}static fromJson(n,r){return new Oo().fromJson(n,r)}static fromJsonString(n,r){return new Oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Oo,n,r)}};g(Oo,"runtime",C),g(Oo,"typeName","wg.cosmo.node.v1.ArgumentMapping"),g(Oo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Gb=Oo,So=class So extends we{constructor(n){super();g(this,"type","");g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new So().fromBinary(n,r)}static fromJson(n,r){return new So().fromJson(n,r)}static fromJsonString(n,r){return new So().fromJsonString(n,r)}static equals(n,r){return C.util.equals(So,n,r)}};g(So,"runtime",C),g(So,"typeName","wg.cosmo.node.v1.EnumMapping"),g(So,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:Qb,repeated:!0}]));var $b=So,Do=class Do extends we{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Do().fromBinary(n,r)}static fromJson(n,r){return new Do().fromJson(n,r)}static fromJsonString(n,r){return new Do().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Do,n,r)}};g(Do,"runtime",C),g(Do,"typeName","wg.cosmo.node.v1.EnumValueMapping"),g(Do,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Qb=Do,bo=class bo extends we{constructor(n){super();g(this,"consumerName","");g(this,"streamName","");g(this,"consumerInactiveThreshold",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new bo().fromBinary(n,r)}static fromJson(n,r){return new bo().fromJson(n,r)}static fromJsonString(n,r){return new bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(bo,n,r)}};g(bo,"runtime",C),g(bo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),g(bo,"fields",C.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9},{no:3,name:"consumer_inactive_threshold",kind:"scalar",T:5}]));var xp=bo,Ao=class Ao extends we{constructor(n){super();g(this,"engineEventConfiguration");g(this,"subjects",[]);g(this,"streamConfiguration");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ao().fromBinary(n,r)}static fromJson(n,r){return new Ao().fromJson(n,r)}static fromJsonString(n,r){return new Ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ao,n,r)}};g(Ao,"runtime",C),g(Ao,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),g(Ao,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Wo},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:xp}]));var qp=Ao,Ro=class Ro extends we{constructor(n){super();g(this,"engineEventConfiguration");g(this,"topics",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ro().fromBinary(n,r)}static fromJson(n,r){return new Ro().fromJson(n,r)}static fromJsonString(n,r){return new Ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ro,n,r)}};g(Ro,"runtime",C),g(Ro,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),g(Ro,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Wo},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var Vp=Ro,Po=class Po extends we{constructor(n){super();g(this,"engineEventConfiguration");g(this,"channels",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Po().fromBinary(n,r)}static fromJson(n,r){return new Po().fromJson(n,r)}static fromJsonString(n,r){return new Po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Po,n,r)}};g(Po,"runtime",C),g(Po,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),g(Po,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Wo},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var jp=Po,Fo=class Fo extends we{constructor(n){super();g(this,"providerId","");g(this,"type",zo.PUBLISH);g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Fo().fromBinary(n,r)}static fromJson(n,r){return new Fo().fromJson(n,r)}static fromJsonString(n,r){return new Fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Fo,n,r)}};g(Fo,"runtime",C),g(Fo,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),g(Fo,"fields",C.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(zo)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var Wo=Fo,wo=class wo extends we{constructor(n){super();g(this,"nats",[]);g(this,"kafka",[]);g(this,"redis",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new wo().fromBinary(n,r)}static fromJson(n,r){return new wo().fromJson(n,r)}static fromJsonString(n,r){return new wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(wo,n,r)}};g(wo,"runtime",C),g(wo,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),g(wo,"fields",C.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:qp,repeated:!0},{no:2,name:"kafka",kind:"message",T:Vp,repeated:!0},{no:3,name:"redis",kind:"message",T:jp,repeated:!0}]));var Qc=wo,Lo=class Lo extends we{constructor(n){super();g(this,"data");C.util.initPartial(n,this)}static fromBinary(n,r){return new Lo().fromBinary(n,r)}static fromJson(n,r){return new Lo().fromJson(n,r)}static fromJsonString(n,r){return new Lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Lo,n,r)}};g(Lo,"runtime",C),g(Lo,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),g(Lo,"fields",C.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:$r}]));var Yb=Lo,Co=class Co extends we{constructor(n){super();g(this,"kind",Cu.STATIC_CONFIGURATION_VARIABLE);g(this,"staticVariableContent","");g(this,"environmentVariableName","");g(this,"environmentVariableDefaultValue","");g(this,"placeholderVariableName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Co().fromBinary(n,r)}static fromJson(n,r){return new Co().fromJson(n,r)}static fromJsonString(n,r){return new Co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Co,n,r)}};g(Co,"runtime",C),g(Co,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),g(Co,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(Cu)},{no:2,name:"static_variable_content",kind:"scalar",T:9},{no:3,name:"environment_variable_name",kind:"scalar",T:9},{no:4,name:"environment_variable_default_value",kind:"scalar",T:9},{no:5,name:"placeholder_variable_name",kind:"scalar",T:9}]));var $r=Co,Bo=class Bo extends we{constructor(n){super();g(this,"directiveName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Bo().fromBinary(n,r)}static fromJson(n,r){return new Bo().fromJson(n,r)}static fromJsonString(n,r){return new Bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Bo,n,r)}};g(Bo,"runtime",C),g(Bo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),g(Bo,"fields",C.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var Jb=Bo,Uo=class Uo extends we{constructor(n){super();g(this,"name","");g(this,"value","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Uo().fromBinary(n,r)}static fromJson(n,r){return new Uo().fromJson(n,r)}static fromJsonString(n,r){return new Uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Uo,n,r)}};g(Uo,"runtime",C),g(Uo,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),g(Uo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var Hb=Uo,ko=class ko extends we{constructor(n){super();g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ko().fromBinary(n,r)}static fromJson(n,r){return new ko().fromJson(n,r)}static fromJsonString(n,r){return new ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ko,n,r)}};g(ko,"runtime",C),g(ko,"typeName","wg.cosmo.node.v1.HTTPHeader"),g(ko,"fields",C.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:$r,repeated:!0}]));var zb=ko,Mo=class Mo extends we{constructor(n){super();g(this,"key");g(this,"cert");g(this,"insecureSkipVerify",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new Mo().fromBinary(n,r)}static fromJson(n,r){return new Mo().fromJson(n,r)}static fromJsonString(n,r){return new Mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Mo,n,r)}};g(Mo,"runtime",C),g(Mo,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),g(Mo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:$r},{no:2,name:"cert",kind:"message",T:$r},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var Wb=Mo,xo=class xo extends we{constructor(n){super();g(this,"enabled",!1);g(this,"url");g(this,"useSSE");g(this,"protocol");g(this,"websocketSubprotocol");C.util.initPartial(n,this)}static fromBinary(n,r){return new xo().fromBinary(n,r)}static fromJson(n,r){return new xo().fromJson(n,r)}static fromJsonString(n,r){return new xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(xo,n,r)}};g(xo,"runtime",C),g(xo,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),g(xo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:$r},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:C.getEnumType(Ms),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:C.getEnumType(xs),opt:!0}]));var Xb=xo,qo=class qo extends we{constructor(n){super();g(this,"enabled",!1);g(this,"serviceSdl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qo().fromBinary(n,r)}static fromJson(n,r){return new qo().fromJson(n,r)}static fromJsonString(n,r){return new qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qo,n,r)}};g(qo,"runtime",C),g(qo,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),g(qo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var Zb=qo,Vo=class Vo extends we{constructor(n){super();g(this,"key","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Vo().fromBinary(n,r)}static fromJson(n,r){return new Vo().fromJson(n,r)}static fromJsonString(n,r){return new Vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vo,n,r)}};g(Vo,"runtime",C),g(Vo,"typeName","wg.cosmo.node.v1.InternedString"),g(Vo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var Kp=Vo,jo=class jo extends we{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new jo().fromBinary(n,r)}static fromJson(n,r){return new jo().fromJson(n,r)}static fromJsonString(n,r){return new jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(jo,n,r)}};g(jo,"runtime",C),g(jo,"typeName","wg.cosmo.node.v1.SingleTypeField"),g(jo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var e0=jo,Ko=class Ko extends we{constructor(n){super();g(this,"fieldPath",[]);g(this,"json","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ko().fromBinary(n,r)}static fromJson(n,r){return new Ko().fromJson(n,r)}static fromJsonString(n,r){return new Ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ko,n,r)}};g(Ko,"runtime",C),g(Ko,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),g(Ko,"fields",C.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var Gp=Ko,ta=class ta extends we{constructor(n){super();g(this,"and",[]);g(this,"in");g(this,"not");g(this,"or",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ta().fromBinary(n,r)}static fromJson(n,r){return new ta().fromJson(n,r)}static fromJsonString(n,r){return new ta().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ta,n,r)}};g(ta,"runtime",C),g(ta,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),g(ta,"fields",C.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:ta,repeated:!0},{no:2,name:"in",kind:"message",T:Gp,opt:!0},{no:3,name:"not",kind:"message",T:ta,opt:!0},{no:4,name:"or",kind:"message",T:ta,repeated:!0}]));var Bu=ta,Go=class Go extends we{constructor(n){super();g(this,"operations",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Go().fromBinary(n,r)}static fromJson(n,r){return new Go().fromJson(n,r)}static fromJsonString(n,r){return new Go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Go,n,r)}};g(Go,"runtime",C),g(Go,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),g(Go,"fields",C.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:t0,repeated:!0}]));var Kj=Go,$o=class $o extends we{constructor(n){super();g(this,"request");g(this,"client");C.util.initPartial(n,this)}static fromBinary(n,r){return new $o().fromBinary(n,r)}static fromJson(n,r){return new $o().fromJson(n,r)}static fromJsonString(n,r){return new $o().fromJsonString(n,r)}static equals(n,r){return C.util.equals($o,n,r)}};g($o,"runtime",C),g($o,"typeName","wg.cosmo.node.v1.Operation"),g($o,"fields",C.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:n0},{no:2,name:"client",kind:"message",T:a0}]));var t0=$o,Qo=class Qo extends we{constructor(n){super();g(this,"operationName","");g(this,"query","");g(this,"extensions");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qo().fromBinary(n,r)}static fromJson(n,r){return new Qo().fromJson(n,r)}static fromJsonString(n,r){return new Qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qo,n,r)}};g(Qo,"runtime",C),g(Qo,"typeName","wg.cosmo.node.v1.OperationRequest"),g(Qo,"fields",C.util.newFieldList(()=>[{no:1,name:"operation_name",kind:"scalar",T:9},{no:2,name:"query",kind:"scalar",T:9},{no:3,name:"extensions",kind:"message",T:r0}]));var n0=Qo,Yo=class Yo extends we{constructor(n){super();g(this,"persistedQuery");C.util.initPartial(n,this)}static fromBinary(n,r){return new Yo().fromBinary(n,r)}static fromJson(n,r){return new Yo().fromJson(n,r)}static fromJsonString(n,r){return new Yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Yo,n,r)}};g(Yo,"runtime",C),g(Yo,"typeName","wg.cosmo.node.v1.Extension"),g(Yo,"fields",C.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:i0}]));var r0=Yo,Jo=class Jo extends we{constructor(n){super();g(this,"sha256Hash","");g(this,"version",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Jo().fromBinary(n,r)}static fromJson(n,r){return new Jo().fromJson(n,r)}static fromJsonString(n,r){return new Jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Jo,n,r)}};g(Jo,"runtime",C),g(Jo,"typeName","wg.cosmo.node.v1.PersistedQuery"),g(Jo,"fields",C.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var i0=Jo,Ho=class Ho extends we{constructor(n){super();g(this,"name","");g(this,"version","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ho().fromBinary(n,r)}static fromJson(n,r){return new Ho().fromJson(n,r)}static fromJsonString(n,r){return new Ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ho,n,r)}};g(Ho,"runtime",C),g(Ho,"typeName","wg.cosmo.node.v1.ClientInfo"),g(Ho,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var a0=Ho;m();T();N();function s0(e){return new Error(`Normalization failed to return a ${e}.`)}function Gj(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var Id=ys(th(),1);function Tpe(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let a=i.split(".");if(a.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new Cp({fieldName:a[1],typeName:a[0]}))}t.push(new Bp({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function o0(e,t,n){if(e)for(let r of e){let i=Tpe(r);t.push(new jc(M(M({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function u0(e){switch(e){case"publish":return zo.PUBLISH;case"request":return zo.REQUEST;case"subscribe":return zo.SUBSCRIBE}}function $j(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Qc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new Ed({fieldNames:a,typeName:i});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.requireFetchReasonsFieldNames&&r.requireFetchReasonsFieldNames.length>0&&(o.requireFetchReasonsFieldNames=[...r.requireFetchReasonsFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let p=new hd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(p):t.entityInterfaces.push(p)}o0(r.keys,t.keys,i),o0(r.provides,t.provides,i),o0(r.requires,t.requires,i);let c=[],l=[],d=[];for(let p of(n=r.events)!=null?n:[])switch(p.providerType){case Id.PROVIDER_TYPE_KAFKA:{l.push(new Vp({engineEventConfiguration:new Wo({fieldName:p.fieldName,providerId:p.providerId,type:u0(p.type),typeName:i}),topics:p.topics}));break}case Id.PROVIDER_TYPE_NATS:{c.push(new qp(M({engineEventConfiguration:new Wo({fieldName:p.fieldName,providerId:p.providerId,type:u0(p.type),typeName:i}),subjects:p.subjects},p.streamConfiguration?{streamConfiguration:new xp({consumerInactiveThreshold:p.streamConfiguration.consumerInactiveThreshold,consumerName:p.streamConfiguration.consumerName,streamName:p.streamConfiguration.streamName})}:{})));break}case Id.PROVIDER_TYPE_REDIS:{d.push(new jp({engineEventConfiguration:new Wo({fieldName:p.fieldName,providerId:p.providerId,type:u0(p.type),typeName:i}),channels:p.channels}));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...c),t.events.kafka.push(...l),t.events.redis.push(...d)}return t}function Qj(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(p=>new Fp({name:p,sourceType:Kc.FIELD_ARGUMENT})),o=new Lp({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),c=((n=i.requiredScopes)==null?void 0:n.map(p=>new $c({requiredAndScopes:p})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(p=>new $c({requiredAndScopes:p})))||[],d=c.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new wp({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:c,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let p=new Bu;bh(p,i.subscriptionFilterCondition),o.subscriptionFilterCondition=p}t.push(o)}return t}function bh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Bu;bh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new Gp({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Bu,bh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Bu;bh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var Yc;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(Yc||(Yc={}));var Epe=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new Kp({key:n})},hpe=e=>{switch(e){case"ws":return Ms.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return Ms.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return Ms.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},ype=e=>{switch(e){case"auto":return xs.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return xs.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return xs.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},Jj=function(e){if(!gd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw Gj(e.routerCompatibilityVersion);let t=new Td({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw s0("ConfigurationDataByTypeName");if(!n.schema)throw s0("GraphQLSchema");let r={enabled:!0},i=Epe(t,tj((0,Yj.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:c,interfaceObjects:l,keys:d,provides:p,requires:E,rootNodes:I}=$j(n.configurationDataByTypeName),v;switch(n.kind){case Yc.Standard:{r.enabled=!0,r.protocol=hpe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=ype(n.websocketSubprotocol||"auto"),r.url=new $r({kind:Cu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case Yc.Plugin:{v=new yd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new kp({name:n.name,version:n.version,imageReference:n.imageReference})});break}case Yc.GRPC:{v=new yd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let A,U,j;if(c.kafka.length>0||c.nats.length>0||c.redis.length>0){A=Lu.PUBSUB,j=new Qc({kafka:c.kafka,nats:c.nats,redis:c.redis});let re=ue=>gd.ROOT_TYPE_NAMES.has(ue.typeName),ee=0,me=0;for(;ee({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${gd.COMPOSITION_VERSION}`})};m();T();N();var Hc=ys(Oe());function Hj(e){let t;try{t=(0,Hc.parse)(e.schema)}catch(n){throw new Error(`could not parse schema for Graph ${e.name}: ${n}`)}return{definitions:t,name:e.name,url:e.url}}function Ipe(e){let t=(0,Jc.federateSubgraphs)({subgraphs:e.map(Hj),version:Jc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(n=>n.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:(0,Hc.print)(t.federatedGraphAST)}}function gpe(e){let t=(0,Jc.federateSubgraphs)({subgraphs:e.map(Hj),version:Jc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return Jj({federatedClientSDL:(0,Hc.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,Hc.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:Jc.LATEST_ROUTER_COMPATIBILITY_VERSION,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let a=t.subgraphConfigBySubgraphName.get(r.name),o=a==null?void 0:a.schema,c=a==null?void 0:a.configurationDataByTypeName;return{kind:Yc.Standard,id:`${i}`,name:r.name,url:pb(r.url),sdl:r.schema,subscriptionUrl:pb((l=r.subscription_url)!=null?l:r.url),subscriptionProtocol:(d=r.subscription_protocol)!=null?d:"ws",websocketSubprotocol:r.subscription_protocol==="ws"?r.websocketSubprotocol||"auto":void 0,schema:o,configurationDataByTypeName:c}})}).toJsonString()}return Bm(_pe);})(); /*! Bundled license information: @jspm/core/nodelibs/browser/buffer.js: From a7b4e9b75ac1e54d8e15cb83f637597cff001026 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 14:39:29 +0100 Subject: [PATCH 13/32] chore: mimimi --- protographic/src/abstract-selection-rewriter.ts | 2 +- protographic/src/required-fields-visitor.ts | 9 ++++----- protographic/src/sdl-to-mapping-visitor.ts | 1 - protographic/src/selection-set-validation-visitor.ts | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/protographic/src/abstract-selection-rewriter.ts b/protographic/src/abstract-selection-rewriter.ts index fb0cd08562..168682b921 100644 --- a/protographic/src/abstract-selection-rewriter.ts +++ b/protographic/src/abstract-selection-rewriter.ts @@ -22,7 +22,7 @@ import { GraphQLType, getNamedType, } from 'graphql'; -import { VisitContext } from './types'; +import { VisitContext } from './types.js'; /** * Rewrites GraphQL selection sets to normalize abstract type selections. diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 69dd7be5de..df99329695 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -18,7 +18,7 @@ import { SelectionSetNode, visit, } from 'graphql'; -import { CompositeMessageKind, ProtoMessage, ProtoMessageField, RPCMethod, VisitContext } from './types'; +import { CompositeMessageKind, ProtoMessage, ProtoMessageField, RPCMethod, VisitContext } from './types.js'; import { KEY_DIRECTIVE_NAME } from './string-constants'; import { createEntityLookupRequestKeyMessageName, @@ -28,10 +28,9 @@ import { graphqlFieldToProtoField, formatKeyElements, } from './naming-conventions'; -import { getProtoTypeFromGraphQL } from './proto-utils'; -import { AbstractSelectionRewriter } from './abstract-selection-rewriter'; -import { FieldMapping, TypeFieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; -import { getNormalizedFieldSet, safeParse } from '@wundergraph/composition'; +import { getProtoTypeFromGraphQL } from './proto-utils.js'; +import { AbstractSelectionRewriter } from './abstract-selection-rewriter.js'; +import { FieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; /** * Configuration options for the RequiredFieldsVisitor. diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index e940a2b7bd..dbc403064f 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -17,7 +17,6 @@ import { createEntityLookupMethodName, createOperationMethodName, createRequestMessageName, - createRequiredFieldsMethodName, createResolverMethodName, createResponseMessageName, graphqlArgumentToProtoField, diff --git a/protographic/src/selection-set-validation-visitor.ts b/protographic/src/selection-set-validation-visitor.ts index dd9d2cc6cf..f9c11809a8 100644 --- a/protographic/src/selection-set-validation-visitor.ts +++ b/protographic/src/selection-set-validation-visitor.ts @@ -17,8 +17,8 @@ import { SelectionSetNode, visit, } from 'graphql'; -import { VisitContext } from './types'; -import { ValidationResult } from './sdl-validation-visitor'; +import { VisitContext } from './types.js'; +import { ValidationResult } from './sdl-validation-visitor.js'; /** * Validates selection sets within @requires directive field sets. From 6dc699725be9aa0c049725927c08136b71683507 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 14:52:01 +0100 Subject: [PATCH 14/32] chore: do not duplicate messages --- protographic/src/required-fields-visitor.ts | 36 +++++++-- .../tests/field-set/01-basics.test.ts | 77 +++++++++++++++++++ 2 files changed, 105 insertions(+), 8 deletions(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index df99329695..2e4eb2cf8c 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -142,6 +142,10 @@ export class RequiredFieldsVisitor { public visit(): void { for (const keyDirective of this.keyDirectives) { const rawFieldSet = this.getKeyFieldsString(keyDirective); + if (rawFieldSet.length === 0) { + throw new Error(`Required field set is empty for key directive ${keyDirective.name.value}`); + } + this.currentKeyFieldsString = formatKeyElements(rawFieldSet).join(' '); if (this.mapping[this.currentKeyFieldsString]) { @@ -394,9 +398,17 @@ export class RequiredFieldsVisitor { this.handleCompositeType(fieldDefinition); } + const protoFieldName = graphqlFieldToProtoField(fieldDefinition.name); + + // Check if field already exists to avoid duplicates when reusing nested messages + const existingField = this.current.fields.find((f) => f.fieldName === protoFieldName); + if (existingField) { + return; + } + const typeInfo = getProtoTypeFromGraphQL(false, fieldDefinition.type); this.current.fields.push({ - fieldName: graphqlFieldToProtoField(fieldDefinition.name), + fieldName: protoFieldName, typeName: typeInfo.typeName, fieldNumber: this.current?.fields.length + 1, isRepeated: typeInfo.isRepeated, @@ -466,17 +478,25 @@ export class RequiredFieldsVisitor { this.ancestors.push(this.currentType); this.currentType = currentType; - // Create a new nested message for the current type. - let nested: ProtoMessage = { - messageName: this.currentType?.name ?? '', - fields: [], - }; - if (!this.current.nestedMessages) { this.current.nestedMessages = []; } - this.current.nestedMessages.push(nested); + // Check if a nested message with the same name already exists + const existingNested = this.current.nestedMessages.find((msg) => msg.messageName === this.currentType?.name); + + let nested: ProtoMessage; + if (existingNested) { + // Reuse the existing nested message to avoid duplicates + nested = existingNested; + } else { + // Create a new nested message for the current type + nested = { + messageName: this.currentType?.name ?? '', + fields: [], + }; + this.current.nestedMessages.push(nested); + } this.stack.push(this.current); this.current = nested; diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index 0c79440d4b..d411cd3b31 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -1077,3 +1077,80 @@ describe('Ambiguous @key directive deduplication', () => { expect(mapping).toHaveProperty('Sku'); }); }); + +describe('Nested message deduplication', () => { + it('should reuse nested message when multiple fields reference the same type', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + homeAddress: Address! @external + workAddress: Address! @external + computed: String! @requires(fields: "homeAddress { city street } workAddress { city zip }") + } + + type Address { + city: String! + street: String! + zip: String! + } + `, + entityName: 'User', + requiredFieldName: 'computed', + }); + + const { messageDefinitions } = execute(); + + const fieldsMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserComputedByIdFields'); + expect(fieldsMessage).toBeDefined(); + + // Should have two fields: homeAddress and workAddress + expect(fieldsMessage?.fields).toHaveLength(2); + expect(fieldsMessage?.fields.map((f) => f.fieldName)).toEqual( + expect.arrayContaining(['home_address', 'work_address']), + ); + + // Should have only ONE nested Address message, not two + expect(fieldsMessage?.nestedMessages).toHaveLength(1); + expect(fieldsMessage?.nestedMessages?.[0].messageName).toBe('Address'); + + // The single Address message should contain all fields from both selections (city, street, zip) + const addressMessage = fieldsMessage?.nestedMessages?.[0]; + expect(addressMessage?.fields).toHaveLength(3); + expect(addressMessage?.fields.map((f) => f.fieldName)).toEqual(expect.arrayContaining(['city', 'street', 'zip'])); + }); + + it('should create separate nested messages for different types', () => { + const { execute } = createVisitorSetup({ + sdl: ` + type User @key(fields: "id") { + id: ID! + homeAddress: Address! @external + profile: Profile! @external + computed: String! @requires(fields: "homeAddress { city } profile { bio }") + } + + type Address { + city: String! + } + + type Profile { + bio: String! + } + `, + entityName: 'User', + requiredFieldName: 'computed', + }); + + const { messageDefinitions } = execute(); + + const fieldsMessage = messageDefinitions.find((m) => m.messageName === 'RequireUserComputedByIdFields'); + expect(fieldsMessage).toBeDefined(); + + // Should have two different nested messages: Address and Profile + expect(fieldsMessage?.nestedMessages).toHaveLength(2); + expect(fieldsMessage?.nestedMessages?.map((m) => m.messageName)).toEqual( + expect.arrayContaining(['Address', 'Profile']), + ); + }); +}); From 1974e6df296acf5824ed046b7e29743addd0800d Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 14:53:35 +0100 Subject: [PATCH 15/32] chore: remove unused options --- protographic/src/required-fields-visitor.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 2e4eb2cf8c..e350eff72d 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -32,13 +32,6 @@ import { getProtoTypeFromGraphQL } from './proto-utils.js'; import { AbstractSelectionRewriter } from './abstract-selection-rewriter.js'; import { FieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; -/** - * Configuration options for the RequiredFieldsVisitor. - */ -type RequiredFieldsVisitorOptions = { - includeComments: boolean; -}; - /** * A record mapping key directive strings to their corresponding RequiredFieldMapping. * Each entity can have multiple @key directives, and each key needs its own RPC mapping. @@ -124,9 +117,6 @@ export class RequiredFieldsVisitor { private readonly objectType: GraphQLObjectType, private readonly requiredField: GraphQLField, fieldSet: string, - options: RequiredFieldsVisitorOptions = { - includeComments: false, - }, ) { this.resolveKeyDirectives(); this.fieldSetDoc = parse(`{ ${fieldSet} }`); @@ -401,8 +391,7 @@ export class RequiredFieldsVisitor { const protoFieldName = graphqlFieldToProtoField(fieldDefinition.name); // Check if field already exists to avoid duplicates when reusing nested messages - const existingField = this.current.fields.find((f) => f.fieldName === protoFieldName); - if (existingField) { + if (this.current.fields.some((f) => f.fieldName === protoFieldName)) { return; } From 506dd1a78f7698a82a313275ea19ba3a688b37d0 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 15:04:45 +0100 Subject: [PATCH 16/32] chore: pr reviews --- .../src/selection-set-validation-visitor.ts | 19 +++++++++++++------ .../tests/field-set/01-basics.test.ts | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/protographic/src/selection-set-validation-visitor.ts b/protographic/src/selection-set-validation-visitor.ts index f9c11809a8..39e612e24e 100644 --- a/protographic/src/selection-set-validation-visitor.ts +++ b/protographic/src/selection-set-validation-visitor.ts @@ -108,8 +108,12 @@ export class SelectionSetValidationVisitor { * @returns BREAK if validation fails to stop traversal, undefined otherwise */ private onEnterField(ctx: VisitContext): any { - const fieldDefitinion = this.getFieldDefinition(ctx.node); - const namedType = this.getUnderlyingType(fieldDefitinion.type); + const fieldDefinition = this.getFieldDefinition(ctx.node); + if (!fieldDefinition) { + return; + } + + const namedType = this.getUnderlyingType(fieldDefinition.type); if (this.isAbstractType(namedType)) { this.validationResult.errors.push( @@ -136,14 +140,17 @@ export class SelectionSetValidationVisitor { /** * Retrieves the field definition for a field node from the current type. + * If the field is not found, a validation error is recorded and null is returned. * * @param node - The field node to look up - * @returns The GraphQL field definition - * @throws Error if the field definition is not found on the current type + * @returns The GraphQL field definition, or null if not found */ - private getFieldDefinition(node: FieldNode): GraphQLField { + private getFieldDefinition(node: FieldNode): GraphQLField | null { const fieldDef = this.currentType.getFields()[node.name.value]; - if (!fieldDef) throw new Error(`Field definition not found for field ${node.name.value}`); + if (!fieldDef) { + this.validationResult.errors.push(`Field '${node.name.value}' not found on type '${this.currentType.name}'`); + return null; + } return fieldDef; } diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index d411cd3b31..2721fe96c2 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -171,7 +171,7 @@ describe('Field Set Visitor', () => { type User @key(fields: "id") { id: ID! name: String! @external - age: Int @requires(fields: "name") + age: Int @requires(fields: "name name") } `, entityName: 'User', From 20b6f8c490a01896b02e2a305dc2adc08d180ab2 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 15:12:16 +0100 Subject: [PATCH 17/32] chore: do not use type assertio9n --- protographic/src/sdl-to-mapping-visitor.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index dbc403064f..a3620e8113 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -184,15 +184,21 @@ export class GraphQLToProtoVisitor { } } + /** + * Extracts the required field set from a field's requires directive + * @param field - The GraphQL field to get the required field set from + * @returns The required field set string + * @throws Error if the required field set is not found or is not a string + */ private getRequiredFieldSet(field: GraphQLField): string { - const node = field.astNode?.directives + const arg = field.astNode?.directives ?.find((d) => d.name.value === REQUIRES_DIRECTIVE_NAME) - ?.arguments?.find((arg) => arg.name.value === 'fields')?.value as StringValueNode; - if (!node) { + ?.arguments?.find((arg) => arg.name.value === 'fields'); + if (!arg || arg.value.kind !== Kind.STRING) { throw new Error(`Required field set not found for field ${field.name}`); } - return node.value; + return arg.value.value; } /** From f9281b780b13762d9f515adc076abc6827f1770d Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 15:15:07 +0100 Subject: [PATCH 18/32] chore: remove unused function --- protographic/src/required-fields-visitor.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index e350eff72d..4856ed96b8 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -250,20 +250,6 @@ export class RequiredFieldsVisitor { } } - /** - * Creates a FieldMapping for a required field's proto message field. - * - * @param field - The proto message field to create a mapping for - * @returns A FieldMapping with original GraphQL name and mapped proto name - */ - private createFieldMappingForRequiredField(field: ProtoMessageField): FieldMapping { - return new FieldMapping({ - original: field.graphqlName ?? field.fieldName, - mapped: field.fieldName, - argumentMappings: [], // TODO: add argument mappings. - }); - } - /** * Handles entering the document node. * Creates the RPC method definition and all request/response message structures From 01f16fc206662f9d144f8bde936e723d6dc42f88 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 15:37:57 +0100 Subject: [PATCH 19/32] chore: return early --- protographic/src/abstract-selection-rewriter.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protographic/src/abstract-selection-rewriter.ts b/protographic/src/abstract-selection-rewriter.ts index 168682b921..38cc5aa9e3 100644 --- a/protographic/src/abstract-selection-rewriter.ts +++ b/protographic/src/abstract-selection-rewriter.ts @@ -122,6 +122,8 @@ export class AbstractSelectionRewriter { const fields = ctx.node.selections.filter((s) => s.kind === Kind.FIELD); const inlineFragments = ctx.node.selections.filter((s) => s.kind === Kind.INLINE_FRAGMENT); + if (fields.length === 0) return; + // Remove the interface-level fields from the selection set, keeping only inline fragments ctx.node.selections = [...inlineFragments]; From 9bac9ee450f74f12eab0c5b759f8561e6a9c1cd3 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 16:03:41 +0100 Subject: [PATCH 20/32] chore: import --- protographic/src/required-fields-visitor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 4856ed96b8..43bdfbd139 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -18,8 +18,8 @@ import { SelectionSetNode, visit, } from 'graphql'; -import { CompositeMessageKind, ProtoMessage, ProtoMessageField, RPCMethod, VisitContext } from './types.js'; -import { KEY_DIRECTIVE_NAME } from './string-constants'; +import { CompositeMessageKind, ProtoMessage, RPCMethod, VisitContext } from './types.js'; +import { KEY_DIRECTIVE_NAME } from './string-constants.js'; import { createEntityLookupRequestKeyMessageName, createRequestMessageName, From 0a22c6be4adf261544808d78acd8910c34aaee15 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 16:17:03 +0100 Subject: [PATCH 21/32] chore: install dependencies in related projects --- .github/workflows/protographic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protographic.yaml b/.github/workflows/protographic.yaml index 324ec39cce..fba042714b 100644 --- a/.github/workflows/protographic.yaml +++ b/.github/workflows/protographic.yaml @@ -24,7 +24,7 @@ jobs: - uses: ./.github/actions/node - name: Install dependencies - run: pnpm install --filter ./protographic + run: pnpm install --filter ./connect --filter ./composition --filter ./protographic - name: Generate code run: pnpm generate From 02de3609fcc73535ad9cf717d2b1aa48ea2ab1f2 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 16:23:49 +0100 Subject: [PATCH 22/32] chore: imports --- protographic/src/required-fields-visitor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 43bdfbd139..f80bd9abfc 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -27,7 +27,7 @@ import { createResponseMessageName, graphqlFieldToProtoField, formatKeyElements, -} from './naming-conventions'; +} from './naming-conventions.js'; import { getProtoTypeFromGraphQL } from './proto-utils.js'; import { AbstractSelectionRewriter } from './abstract-selection-rewriter.js'; import { FieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; From 5a40d1814a6c99fca6a59f9a41d9f695a8dc4ddc Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 16:42:47 +0100 Subject: [PATCH 23/32] chore: mroe cleanup --- protographic/src/operation-to-proto.ts | 8 +------- protographic/src/proto-utils.ts | 6 +++--- protographic/src/sdl-to-mapping-visitor.ts | 1 - 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/protographic/src/operation-to-proto.ts b/protographic/src/operation-to-proto.ts index cec2f5efeb..e44b52ad42 100644 --- a/protographic/src/operation-to-proto.ts +++ b/protographic/src/operation-to-proto.ts @@ -17,8 +17,6 @@ import { GraphQLEnumType, FragmentDefinitionNode, TypeNode, - NonNullTypeNode, - ListTypeNode, NamedTypeNode, Kind, validate, @@ -30,11 +28,7 @@ import { buildMessageFromSelectionSet } from './operations/message-builder.js'; import { buildRequestMessage, buildInputObjectMessage, buildEnumType } from './operations/request-builder.js'; import { rootToProtoText } from './operations/proto-text-generator.js'; import { mapGraphQLTypeToProto } from './operations/type-mapper.js'; -import { - createRequestMessageName, - createResponseMessageName, - createOperationMethodName, -} from './naming-conventions.js'; +import { createRequestMessageName, createResponseMessageName } from './naming-conventions.js'; import { upperFirst, camelCase } from 'lodash-es'; import { ProtoLock, ProtoLockManager } from './proto-lock.js'; import { IdempotencyLevel, MethodWithIdempotency } from './types.js'; diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts index c4bd42a47b..3ddd9e1004 100644 --- a/protographic/src/proto-utils.ts +++ b/protographic/src/proto-utils.ts @@ -17,9 +17,9 @@ import { RPCMethod, SCALAR_TYPE_MAP, SCALAR_WRAPPER_TYPE_MAP, -} from './types'; -import { unwrapNonNullType, isNestedListType, calculateNestingLevel } from './operations/list-type-utils'; -import { graphqlFieldToProtoField } from './naming-conventions'; +} from './types.js'; +import { unwrapNonNullType, isNestedListType, calculateNestingLevel } from './operations/list-type-utils.js'; +import { graphqlFieldToProtoField } from './naming-conventions.js'; const SPACE_INDENT = ' '; // 2 spaces const LINE_COMMENT_PREFIX = '// '; diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index a3620e8113..7ea1f4568a 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -11,7 +11,6 @@ import { isInputObjectType, isObjectType, Kind, - StringValueNode, } from 'graphql'; import { createEntityLookupMethodName, From 59f92b4185605e48365dc4e32c0b0db98c30e5a3 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 17:19:42 +0100 Subject: [PATCH 24/32] refactor: enable eslint to comply with rules in other packages --- protographic/.eslintignore | 4 + protographic/.eslintrc | 28 ++ protographic/package.json | 4 +- .../src/abstract-selection-rewriter.ts | 12 +- protographic/src/index.ts | 2 +- protographic/src/naming-conventions.ts | 12 +- protographic/src/operation-to-proto.ts | 13 +- .../src/operations/field-numbering.ts | 6 +- .../src/operations/message-builder.ts | 47 ++- .../src/operations/proto-field-options.ts | 2 +- .../src/operations/proto-text-generator.ts | 42 +-- .../src/operations/request-builder.ts | 10 +- protographic/src/operations/type-mapper.ts | 4 +- protographic/src/proto-lock.ts | 40 +-- protographic/src/proto-utils.ts | 34 +- protographic/src/required-fields-visitor.ts | 32 +- protographic/src/sdl-to-mapping-visitor.ts | 64 ++-- protographic/src/sdl-to-proto-visitor.ts | 127 ++++---- protographic/src/sdl-validation-visitor.ts | 49 +-- .../src/selection-set-validation-visitor.ts | 7 +- .../tests/field-set/01-basics.test.ts | 8 +- protographic/tests/naming-conventions.test.ts | 2 +- .../tests/operations/enum-support.test.ts | 8 +- .../tests/operations/field-numbering.test.ts | 2 +- .../field-ordering-stability.test.ts | 252 +++++++-------- .../fragment-spreads-interface-union.test.ts | 2 +- .../tests/operations/fragments.test.ts | 2 +- .../tests/operations/message-builder.test.ts | 2 +- .../nested-message-field-numbering.test.ts | 4 +- .../operations/operation-to-proto.test.ts | 4 +- .../operations/operation-validation.test.ts | 2 +- .../operations/proto-text-generator.test.ts | 4 +- .../operations/recursion-protection.test.ts | 6 +- .../tests/operations/request-builder.test.ts | 2 +- .../tests/operations/type-mapper.test.ts | 4 +- .../tests/operations/validation.test.ts | 4 +- .../tests/sdl-to-mapping/01-basics.test.ts | 2 +- .../sdl-to-mapping/02-complex-types.test.ts | 2 +- .../sdl-to-mapping/03-federation.test.ts | 2 +- .../sdl-to-mapping/04-field-resolvers.test.ts | 2 +- .../sdl-to-mapping/sdl-to-mapping.bench.ts | 2 +- .../tests/sdl-to-proto/01-basic-types.test.ts | 4 +- .../sdl-to-proto/02-complex-types.test.ts | 4 +- .../sdl-to-proto/03-interfaces-unions.test.ts | 4 +- .../tests/sdl-to-proto/04-federation.test.ts | 4 +- .../tests/sdl-to-proto/05-edge-cases.test.ts | 4 +- .../sdl-to-proto/06-field-ordering.test.ts | 294 +++++++++--------- .../sdl-to-proto/07-argument-ordering.test.ts | 254 +++++++-------- .../08-proto-lock-manager.test.ts | 4 +- .../tests/sdl-to-proto/09-comments.test.ts | 4 +- .../tests/sdl-to-proto/10-options.test.ts | 4 +- .../tests/sdl-to-proto/11-lists.test.ts | 4 +- .../tests/sdl-to-proto/12-directive.test.ts | 4 +- .../sdl-to-proto/13-field-arguments.test.ts | 4 +- .../tests/sdl-to-proto/sdl-to-proto.bench.ts | 2 +- .../01-basic-validation.test.ts | 2 +- protographic/tests/util.ts | 4 +- 57 files changed, 765 insertions(+), 692 deletions(-) create mode 100644 protographic/.eslintignore create mode 100644 protographic/.eslintrc diff --git a/protographic/.eslintignore b/protographic/.eslintignore new file mode 100644 index 0000000000..b1ae25de7e --- /dev/null +++ b/protographic/.eslintignore @@ -0,0 +1,4 @@ +dist +.output +node-modules +gen \ No newline at end of file diff --git a/protographic/.eslintrc b/protographic/.eslintrc new file mode 100644 index 0000000000..df537222e8 --- /dev/null +++ b/protographic/.eslintrc @@ -0,0 +1,28 @@ +{ + "extends": ["eslint-config-unjs", "plugin:require-extensions/recommended"], + "plugins": [ + "require-extensions" + ], + "rules": { + "space-before-function-paren": 0, + "arrow-parens": 0, + "comma-dangle": 0, + "semi": 0, + "unicorn/prevent-abbreviations": 0, + "quotes": 0, + "keyword-spacing": 0, + "no-undef": 0, + "indent": 0, + "unicorn/catch-error-name": 0, + "unicorn/no-null": 0, + "unicorn/no-useless-undefined": 0, + "unicorn/no-await-expression-member": 0, + "unicorn/no-array-push-push": 0, + "unicorn/filename-case": 0, + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-non-null-assertion": 0, + "unicorn/expiring-todo-comments": 0, + "no-useless-constructor": 0, + "unicorn/no-process-exit": 0 + } +} diff --git a/protographic/package.json b/protographic/package.json index 28f79da06a..cc75ed1edd 100644 --- a/protographic/package.json +++ b/protographic/package.json @@ -26,8 +26,8 @@ "build": "tsc", "bench": "vitest bench --run", "format": "prettier --write src tests", - "lint": "prettier --check src tests", - "lint:fix": "prettier --write src tests" + "lint": "eslint --cache --ext .ts,.mjs,.cjs . && prettier -c src", + "lint:fix": "eslint --cache --fix --ext .ts,.mjs,.cjs . && prettier --write -c src" }, "devDependencies": { "@types/lodash-es": "4.17.12", diff --git a/protographic/src/abstract-selection-rewriter.ts b/protographic/src/abstract-selection-rewriter.ts index 38cc5aa9e3..fc39f90f97 100644 --- a/protographic/src/abstract-selection-rewriter.ts +++ b/protographic/src/abstract-selection-rewriter.ts @@ -108,11 +108,11 @@ export class AbstractSelectionRewriter { * @param ctx - The visitor context containing the current node and its position in the AST */ private onEnterSelectionSet(ctx: VisitContext): void { - if (!ctx.parent) return; - if (!this.isFieldNode(ctx.parent)) return; + if (!ctx.parent) { return; } + if (!this.isFieldNode(ctx.parent)) { return; } const currentType = this.findNamedTypeForField(ctx.parent.name.value); - if (!currentType) return; + if (!currentType) { return; } // Only process selection sets for interface types if (!isInterfaceType(currentType)) { @@ -122,7 +122,7 @@ export class AbstractSelectionRewriter { const fields = ctx.node.selections.filter((s) => s.kind === Kind.FIELD); const inlineFragments = ctx.node.selections.filter((s) => s.kind === Kind.INLINE_FRAGMENT); - if (fields.length === 0) return; + if (fields.length === 0) { return; } // Remove the interface-level fields from the selection set, keeping only inline fragments ctx.node.selections = [...inlineFragments]; @@ -162,7 +162,7 @@ export class AbstractSelectionRewriter { * @returns true if the node is a FieldNode, false otherwise */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { - if (Array.isArray(node)) return false; + if (Array.isArray(node)) { return false; } return (node as ASTNode).kind === Kind.FIELD; } @@ -188,7 +188,7 @@ export class AbstractSelectionRewriter { private findNamedTypeForField(fieldName: string): GraphQLType | undefined { const fields = this.currentType.getFields(); const field = fields[fieldName]; - if (!field) return undefined; + if (!field) { return undefined; } return getNamedType(field.type); } diff --git a/protographic/src/index.ts b/protographic/src/index.ts index 9cdc4aad4f..24d3beb1a2 100644 --- a/protographic/src/index.ts +++ b/protographic/src/index.ts @@ -15,7 +15,7 @@ import { SDLValidationVisitor, type ValidationResult } from './sdl-validation-vi */ export function compileGraphQLToMapping( schemaOrSDL: GraphQLSchema | string, - serviceName: string = 'DefaultService', + serviceName = 'DefaultService', ): GRPCMapping { // If a string was provided, build the schema const schema = diff --git a/protographic/src/naming-conventions.ts b/protographic/src/naming-conventions.ts index d72b5a3806..8d4d3b16f1 100644 --- a/protographic/src/naming-conventions.ts +++ b/protographic/src/naming-conventions.ts @@ -63,7 +63,7 @@ export function createResponseMessageName(methodName: string): string { /** * Creates an entity lookup method name for an entity type */ -export function createEntityLookupMethodName(typeName: string, keyString: string = 'id'): string { +export function createEntityLookupMethodName(typeName: string, keyString = 'id'): string { const normalizedKey = createMethodSuffixFromEntityKey(keyString); return `Lookup${typeName}${normalizedKey}`; } @@ -74,7 +74,7 @@ export function createEntityLookupMethodName(typeName: string, keyString: string * @param keyString - The key string * @returns The name of the key message */ -export function createEntityLookupRequestKeyMessageName(typeName: string, keyString: string = 'id'): string { +export function createEntityLookupRequestKeyMessageName(typeName: string, keyString = 'id'): string { const requestName = createRequestMessageName(createEntityLookupMethodName(typeName, keyString)); return `${requestName}Key`; } @@ -91,7 +91,7 @@ export function createEntityLookupRequestKeyMessageName(typeName: string, keyStr * createRequiredFieldsMethodName('User', 'post', 'id name') // => 'RequireUserPostByIdAndName' * createRequiredFieldsMethodName('User', 'post', 'name,id') // => 'RequireUserPostByIdAndName' */ -export function createRequiredFieldsMethodName(typeName: string, fieldName: string, keyString: string = 'id'): string { +export function createRequiredFieldsMethodName(typeName: string, fieldName: string, keyString = 'id'): string { const normalizedKey = createMethodSuffixFromEntityKey(keyString); return `Require${typeName}${upperFirst(camelCase(fieldName))}${normalizedKey}`; } @@ -101,7 +101,7 @@ export function createRequiredFieldsMethodName(typeName: string, fieldName: stri * @param keyString - The key string * @returns The method suffix */ -export function createMethodSuffixFromEntityKey(keyString: string = 'id'): string { +export function createMethodSuffixFromEntityKey(keyString = 'id'): string { const normalizedKey = formatKeyElements(keyString).join('And'); return `By${normalizedKey}`; @@ -130,7 +130,7 @@ export function normalizeKeyString(keyString: string): string { } const normalizedFieldSet = getNormalizedFieldSet(documentNode); - return [...new Set(normalizedFieldSet.split(/[,\s]+/))].join(' '); + return [...new Set(normalizedFieldSet.split(/[\s,]+/))].join(' '); } /** @@ -150,7 +150,7 @@ export function normalizeKeyString(keyString: string): string { */ export function formatKeyElements(keyString: string): string[] { return normalizeKeyString(keyString) - .split(/[,\s]+/) + .split(/[\s,]+/) .map((field) => upperFirst(camelCase(field))); } diff --git a/protographic/src/operation-to-proto.ts b/protographic/src/operation-to-proto.ts index e44b52ad42..55289600bb 100644 --- a/protographic/src/operation-to-proto.ts +++ b/protographic/src/operation-to-proto.ts @@ -23,13 +23,13 @@ import { specifiedRules, KnownDirectivesRule, } from 'graphql'; +import { upperFirst, camelCase } from 'lodash-es'; import { createFieldNumberManager } from './operations/field-numbering.js'; import { buildMessageFromSelectionSet } from './operations/message-builder.js'; import { buildRequestMessage, buildInputObjectMessage, buildEnumType } from './operations/request-builder.js'; import { rootToProtoText } from './operations/proto-text-generator.js'; import { mapGraphQLTypeToProto } from './operations/type-mapper.js'; import { createRequestMessageName, createResponseMessageName } from './naming-conventions.js'; -import { upperFirst, camelCase } from 'lodash-es'; import { ProtoLock, ProtoLockManager } from './proto-lock.js'; import { IdempotencyLevel, MethodWithIdempotency } from './types.js'; @@ -261,7 +261,7 @@ class OperationsToProtoVisitor { // 2. Validate operation name starts with uppercase letter // This follows protobuf RPC naming conventions while allowing flexibility // Must start with uppercase letter, followed by letters/numbers - if (!/^[A-Z][a-zA-Z0-9]*$/.test(operationName)) { + if (!/^[A-Z][\dA-Za-z]*$/.test(operationName)) { const suggestedName = upperFirst(camelCase(operationName)); throw new Error( `Operation name "${operationName}" must start with an uppercase letter ` + @@ -448,12 +448,15 @@ class OperationsToProtoVisitor { */ private getRootType(operationType: OperationTypeNode): GraphQLObjectType { switch (operationType) { - case OperationTypeNode.QUERY: + case OperationTypeNode.QUERY: { return this.schema.getQueryType()!; - case OperationTypeNode.MUTATION: + } + case OperationTypeNode.MUTATION: { return this.schema.getMutationType()!; - case OperationTypeNode.SUBSCRIPTION: + } + case OperationTypeNode.SUBSCRIPTION: { return this.schema.getSubscriptionType()!; + } } } diff --git a/protographic/src/operations/field-numbering.ts b/protographic/src/operations/field-numbering.ts index 30618b37b8..1186fc9bbb 100644 --- a/protographic/src/operations/field-numbering.ts +++ b/protographic/src/operations/field-numbering.ts @@ -215,14 +215,14 @@ export function assignFieldNumbersFromLockData( fieldNumberManager?: FieldNumberManager, ): void { const lockData = fieldNumberManager?.getLockManager()?.getLockData(); - if (!lockData || !fieldNumberManager) return; + if (!lockData || !fieldNumberManager) { return; } const messageData = lockData.messages[messageName]; - if (!messageData) return; + if (!messageData) { return; } for (const protoFieldName of fieldNames) { const fieldNumber = messageData.fields[protoFieldName]; - if (!fieldNumber) continue; + if (!fieldNumber) { continue; } fieldNumberManager.assignFieldNumber(messageName, protoFieldName, fieldNumber); } diff --git a/protographic/src/operations/message-builder.ts b/protographic/src/operations/message-builder.ts index 262f6ca73b..8fdab80b8a 100644 --- a/protographic/src/operations/message-builder.ts +++ b/protographic/src/operations/message-builder.ts @@ -20,11 +20,11 @@ import { GraphQLInterfaceType, GraphQLUnionType, } from 'graphql'; +import { upperFirst, camelCase } from 'lodash-es'; +import { graphqlFieldToProtoField } from '../naming-conventions.js'; import { mapGraphQLTypeToProto, ProtoTypeInfo } from './type-mapper.js'; import { assignFieldNumbersFromLockData, FieldNumberManager } from './field-numbering.js'; -import { graphqlFieldToProtoField } from '../naming-conventions.js'; import { buildEnumType } from './request-builder.js'; -import { upperFirst, camelCase } from 'lodash-es'; /** * Default maximum recursion depth to prevent stack overflow @@ -126,7 +126,7 @@ export function buildMessageFromSelectionSet( for (const selection of selections) { switch (selection.kind) { - case 'Field': + case 'Field': { // Only object and interface types have fields that can be selected // Union types require inline fragments to access their constituent types if (isObjectType(currentType) || isInterfaceType(currentType)) { @@ -138,8 +138,9 @@ export function buildMessageFromSelectionSet( } } break; + } - case 'InlineFragment': + case 'InlineFragment': { if (selection.typeCondition && options?.schema) { const typeName = selection.typeCondition.name.value; const type = options.schema.getType(typeName); @@ -151,8 +152,9 @@ export function buildMessageFromSelectionSet( collectFields(selection.selectionSet.selections, currentType, depth + 1); } break; + } - case 'FragmentSpread': + case 'FragmentSpread': { if (options?.fragments) { const fragmentDef = options.fragments.get(selection.name.value); if (fragmentDef && options?.schema) { @@ -164,6 +166,7 @@ export function buildMessageFromSelectionSet( } } break; + } } } }; @@ -445,13 +448,24 @@ function processInlineFragment( // Process all selections in the inline fragment with the resolved type if (fragment.selectionSet) { for (const selection of fragment.selectionSet.selections) { - if (selection.kind === 'Field') { + switch (selection.kind) { + case 'Field': { processFieldSelection(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); - } else if (selection.kind === 'InlineFragment') { + + break; + } + case 'InlineFragment': { // Nested inline fragment processInlineFragment(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); - } else if (selection.kind === 'FragmentSpread') { + + break; + } + case 'FragmentSpread': { processFragmentSpread(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + // No default } } } @@ -501,13 +515,24 @@ function processFragmentSpread( // Process the fragment's selection set with the resolved type for (const selection of fragmentDef.selectionSet.selections) { - if (selection.kind === 'Field') { + switch (selection.kind) { + case 'Field': { processFieldSelection(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); - } else if (selection.kind === 'InlineFragment') { + + break; + } + case 'InlineFragment': { processInlineFragment(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); - } else if (selection.kind === 'FragmentSpread') { + + break; + } + case 'FragmentSpread': { // Nested fragment spread (fragment inside fragment) processFragmentSpread(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + // No default } } } diff --git a/protographic/src/operations/proto-field-options.ts b/protographic/src/operations/proto-field-options.ts index 89c99a6d4e..420faaa9cc 100644 --- a/protographic/src/operations/proto-field-options.ts +++ b/protographic/src/operations/proto-field-options.ts @@ -14,6 +14,6 @@ export interface ProtoFieldOption { * Field number 50001 is in the user-defined extension range. */ export const GRAPHQL_VARIABLE_NAME: ProtoFieldOption = { - fieldNumber: 50001, + fieldNumber: 50_001, optionName: '(graphql_variable_name)', } as const; diff --git a/protographic/src/operations/proto-text-generator.ts b/protographic/src/operations/proto-text-generator.ts index 02c58c698a..4230deb98c 100644 --- a/protographic/src/operations/proto-text-generator.ts +++ b/protographic/src/operations/proto-text-generator.ts @@ -109,10 +109,10 @@ function generateHeader(root: protobuf.Root, options?: ProtoTextOptions): string // Add custom imports if (options?.imports) { - options.imports.forEach((imp) => imports.add(imp)); + for (const imp of options.imports) { imports.add(imp); } } - for (const imp of Array.from(imports).sort()) { + for (const imp of [...imports].sort()) { lines.push(`import "${imp}";`); } @@ -175,9 +175,7 @@ export function serviceToProtoText(service: protobuf.Service, options?: ProtoTex // Sort methods for consistent output const methods = Object.values(service.methods).sort((a, b) => a.name.localeCompare(b.name)); - for (let i = 0; i < methods.length; i++) { - const method = methods[i]; - + for (const [i, method] of methods.entries()) { // Add blank line between methods for readability if (i > 0) { lines.push(''); @@ -213,7 +211,7 @@ export function serviceToProtoText(service: protobuf.Service, options?: ProtoTex /** * Converts a protobuf Type (message) to proto text */ -export function messageToProtoText(message: protobuf.Type, options?: ProtoTextOptions, indent: number = 0): string[] { +export function messageToProtoText(message: protobuf.Type, options?: ProtoTextOptions, indent = 0): string[] { const lines: string[] = []; // Message comment @@ -258,7 +256,7 @@ export function messageToProtoText(message: protobuf.Type, options?: ProtoTextOp /** * Converts a protobuf Enum to proto text */ -export function enumToProtoText(enumType: protobuf.Enum, options?: ProtoTextOptions, indent: number = 0): string[] { +export function enumToProtoText(enumType: protobuf.Enum, options?: ProtoTextOptions, indent = 0): string[] { const lines: string[] = []; // Enum comment @@ -292,7 +290,7 @@ export function enumToProtoText(enumType: protobuf.Enum, options?: ProtoTextOpti /** * Formats a protobuf field as proto text */ -export function formatField(field: protobuf.Field, options?: ProtoTextOptions, indent: number = 1): string[] { +export function formatField(field: protobuf.Field, options?: ProtoTextOptions, indent = 1): string[] { const lines: string[] = []; // Field comment @@ -335,7 +333,7 @@ export function formatField(field: protobuf.Field, options?: ProtoTextOptions, i * - reserved 2, 5 to 10; * - reserved "old_field", "deprecated_field"; */ -export function formatReserved(reserved: Array, indent: number = 1): string[] { +export function formatReserved(reserved: Array, indent = 1): string[] { const lines: string[] = []; // Separate numbers and names @@ -374,7 +372,7 @@ export function formatReserved(reserved: Array, indent: numbe * Handles both individual numbers and ranges (e.g., "2, 5 to 10, 15") */ function formatReservedNumbers(numbers: number[]): string { - if (numbers.length === 0) return ''; + if (numbers.length === 0) { return ''; } // Sort and deduplicate numbers const sortedNumbers = [...new Set(numbers)].sort((a, b) => a - b); @@ -407,11 +405,7 @@ function formatReservedNumbers(numbers: number[]): string { // Format the ranges return ranges .map(([start, end]) => { - if (start === end) { - return start.toString(); - } else { - return `${start} to ${end}`; - } + return start === end ? start.toString() : `${start} to ${end}`; }) .join(', '); } @@ -421,11 +415,9 @@ function formatReservedNumbers(numbers: number[]): string { */ function detectWrapperTypeUsage(root: protobuf.Root): boolean { for (const nested of root.nestedArray) { - if (nested instanceof protobuf.Type) { - if (messageUsesWrapperTypes(nested)) { + if (nested instanceof protobuf.Type && messageUsesWrapperTypes(nested)) { return true; } - } } return false; } @@ -443,11 +435,9 @@ function messageUsesWrapperTypes(message: protobuf.Type): boolean { // Check nested messages recursively for (const nested of message.nestedArray) { - if (nested instanceof protobuf.Type) { - if (messageUsesWrapperTypes(nested)) { + if (nested instanceof protobuf.Type && messageUsesWrapperTypes(nested)) { return true; } - } } return false; @@ -458,11 +448,9 @@ function messageUsesWrapperTypes(message: protobuf.Type): boolean { */ function detectGraphQLVariableNameUsage(root: protobuf.Root): boolean { for (const nested of root.nestedArray) { - if (nested instanceof protobuf.Type) { - if (messageUsesGraphQLVariableName(nested)) { + if (nested instanceof protobuf.Type && messageUsesGraphQLVariableName(nested)) { return true; } - } } return false; } @@ -480,11 +468,9 @@ function messageUsesGraphQLVariableName(message: protobuf.Type): boolean { // Check nested messages recursively for (const nested of message.nestedArray) { - if (nested instanceof protobuf.Type) { - if (messageUsesGraphQLVariableName(nested)) { + if (nested instanceof protobuf.Type && messageUsesGraphQLVariableName(nested)) { return true; } - } } return false; @@ -493,7 +479,7 @@ function messageUsesGraphQLVariableName(message: protobuf.Type): boolean { /** * Helper to format method definitions for services */ -export function formatMethod(method: protobuf.Method, options?: ProtoTextOptions, indent: number = 1): string[] { +export function formatMethod(method: protobuf.Method, options?: ProtoTextOptions, indent = 1): string[] { const lines: string[] = []; // Method comment diff --git a/protographic/src/operations/request-builder.ts b/protographic/src/operations/request-builder.ts index 22d5b84337..dc629e9f07 100644 --- a/protographic/src/operations/request-builder.ts +++ b/protographic/src/operations/request-builder.ts @@ -11,8 +11,6 @@ import { GraphQLEnumType, typeFromAST, } from 'graphql'; -import { mapGraphQLTypeToProto } from './type-mapper.js'; -import { assignFieldNumbersFromLockData, FieldNumberManager } from './field-numbering.js'; import { graphqlFieldToProtoField, graphqlArgumentToProtoField, @@ -20,6 +18,8 @@ import { graphqlEnumValueToProtoEnumValue, protoFieldToProtoJSON, } from '../naming-conventions.js'; +import { mapGraphQLTypeToProto } from './type-mapper.js'; +import { assignFieldNumbersFromLockData, FieldNumberManager } from './field-numbering.js'; import { GRAPHQL_VARIABLE_NAME } from './proto-field-options.js'; /** @@ -79,7 +79,7 @@ export function buildRequestMessage( let fieldNumber = 1; for (const protoVariableName of orderedVariableNames) { const variable = variableMap.get(protoVariableName); - if (!variable) continue; + if (!variable) { continue; } const variableName = variable.variable.name.value; const field = buildVariableField(variableName, variable.type, schema, messageName, options, fieldNumber); @@ -110,7 +110,7 @@ export function buildVariableField( schema: GraphQLSchema, messageName: string, options?: RequestBuilderOptions, - defaultFieldNumber: number = 1, + defaultFieldNumber = 1, ): protobuf.Field | null { const protoFieldName = graphqlArgumentToProtoField(variableName); const fieldNumberManager = options?.fieldNumberManager; @@ -209,7 +209,7 @@ export function buildInputObjectMessage( // Process fields in reconciled order for (const protoFieldName of orderedFieldNames) { const inputField = fieldMap.get(protoFieldName); - if (!inputField) continue; + if (!inputField) { continue; } const typeInfo = mapGraphQLTypeToProto(inputField.type, { customScalarMappings: options?.customScalarMappings, diff --git a/protographic/src/operations/type-mapper.ts b/protographic/src/operations/type-mapper.ts index fc39b23c63..a78ff43813 100644 --- a/protographic/src/operations/type-mapper.ts +++ b/protographic/src/operations/type-mapper.ts @@ -232,7 +232,7 @@ function handleListType(graphqlType: GraphQLType, options?: TypeMapperOptions): isWrapper: false, isScalar: false, requiresNestedWrapper: true, - nestingLevel: nestingLevel, + nestingLevel, }; } @@ -305,5 +305,5 @@ export function getRequiredImports(types: GraphQLType[], options?: TypeMapperOpt } } - return Array.from(imports); + return [...imports]; } diff --git a/protographic/src/proto-lock.ts b/protographic/src/proto-lock.ts index 7cf93257b5..12d70fe549 100644 --- a/protographic/src/proto-lock.ts +++ b/protographic/src/proto-lock.ts @@ -64,12 +64,12 @@ export class ProtoLockManager { const removedItems: Record = {}; // Identify removed items - Object.entries(fieldsMap).forEach(([item, number]) => { + for (const [item, number] of Object.entries(fieldsMap)) { if (!availableItems.includes(item)) { reservedNumbers.push(number); removedItems[item] = number; } - }); + } // Deduplicate reserved numbers reservedNumbers = [...new Set(reservedNumbers)]; @@ -78,7 +78,7 @@ export class ProtoLockManager { const newFieldsMap: Record = {}; // Preserve existing numbers for items that are still available - availableItems.forEach((item) => { + for (const item of availableItems) { const existingNumber = fieldsMap[item]; if (existingNumber !== undefined) { newFieldsMap[item] = existingNumber; @@ -89,13 +89,13 @@ export class ProtoLockManager { reservedNumbers.splice(index, 1); } } - }); + } // Get highest assigned number let maxNumber = 0; - Object.values(newFieldsMap).forEach((num) => { + for (const num of Object.values(newFieldsMap)) { maxNumber = Math.max(maxNumber, num); - }); + } // Also consider reserved numbers for max if (reservedNumbers.length > 0) { @@ -103,26 +103,17 @@ export class ProtoLockManager { } // Assign numbers to items that don't have one - availableItems.forEach((item) => { + for (const item of availableItems) { if (newFieldsMap[item] === undefined) { // Check if the item was previously removed (exists in our reservedNumbers) let reservedNumber: number | undefined; - Object.entries(removedItems).forEach(([removedItem, number]) => { + for (const [removedItem, number] of Object.entries(removedItems)) { if (removedItem === item && reservedNumbers.includes(number)) { reservedNumber = number; } - }); - - if (reservedNumber !== undefined) { - // Reuse the reserved number for this item - newFieldsMap[item] = reservedNumber; + } - // Remove from reserved list - const index = reservedNumbers.indexOf(reservedNumber); - if (index !== -1) { - reservedNumbers.splice(index, 1); - } - } else { + if (reservedNumber === undefined) { // Find next available number let nextNumber = maxNumber + 1; while (reservedNumbers.includes(nextNumber)) { @@ -131,9 +122,18 @@ export class ProtoLockManager { newFieldsMap[item] = nextNumber; maxNumber = nextNumber; + } else { + // Reuse the reserved number for this item + newFieldsMap[item] = reservedNumber; + + // Remove from reserved list + const index = reservedNumbers.indexOf(reservedNumber); + if (index !== -1) { + reservedNumbers.splice(index, 1); + } } } - }); + } // Update the fields map and reserved numbers container[itemName].fields = newFieldsMap; diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts index 3ddd9e1004..9b7468ac73 100644 --- a/protographic/src/proto-utils.ts +++ b/protographic/src/proto-utils.ts @@ -48,9 +48,9 @@ function buildProtoMessageWithIndent(includeComments: boolean, message: ProtoMes // if we have nested messages, we need to build them first if (message.nestedMessages && message.nestedMessages.length > 0) { - message.nestedMessages.forEach((nestedMessage) => { + for (const nestedMessage of message.nestedMessages) { messageLines.push(...buildProtoMessageWithIndent(includeComments, nestedMessage, indent + 1)); - }); + } } if (message.compositeType) { @@ -61,17 +61,17 @@ function buildProtoMessageWithIndent(includeComments: boolean, message: ProtoMes messageLines.push(indentContent(indent + 1, `reserved ${message.reservedNumbers};`)); } - message.fields.forEach((field) => { + for (const field of message.fields) { if (field.description) { messageLines.push(...formatComment(includeComments, field.description, indent + 1)); } - let repeated = field.isRepeated ? 'repeated ' : ''; + const repeated = field.isRepeated ? 'repeated ' : ''; messageLines.push( indentContent(indent + 1, `${repeated}${field.typeName} ${field.fieldName} = ${field.fieldNumber};`), ); - }); + } messageLines.push(indentContent(indent, '}'), ''); return messageLines; } @@ -128,11 +128,11 @@ function buildCompositeTypeMessage( indentContent(indent + 1, `oneof ${oneOfName} {`), ); - compositeTypes.forEach((compositeType, index) => { + for (const [index, compositeType] of compositeTypes.entries()) { lines.push( indentContent(indent + 2, `${compositeType} ${graphqlFieldToProtoField(compositeType)} = ${index + 1};`), ); - }); + } lines.push(indentContent(indent + 1, '}')); lines.push(indentContent(indent, '}')); @@ -149,7 +149,7 @@ function buildCompositeTypeMessage( export function formatComment( includeComments: boolean, description: string | undefined | null, - indentLevel: number = 0, + indentLevel = 0, ): string[] { if (!includeComments || !description) { return []; @@ -159,15 +159,13 @@ export function formatComment( const indent = SPACE_INDENT.repeat(indentLevel); const lines = description.trim().split('\n'); - if (lines.length === 1) { - return [`${indent}${LINE_COMMENT_PREFIX}${lines[0]}`]; - } else { - return [ + return lines.length === 1 +? [`${indent}${LINE_COMMENT_PREFIX}${lines[0]}`] +: [ `${indent}${BLOCK_COMMENT_START}`, ...lines.map((line) => `${indent} * ${line}`), `${indent} ${BLOCK_COMMENT_END}`, ]; - } } export function renderRPCMethod(includeComments: boolean, rpcMethod: RPCMethod): string[] { @@ -195,7 +193,7 @@ export function renderRPCMethod(includeComments: boolean, rpcMethod: RPCMethod): export function getProtoTypeFromGraphQL( includeComments: boolean, graphqlType: GraphQLType, - ignoreWrapperTypes: boolean = false, + ignoreWrapperTypes = false, ): ProtoFieldType { // Nullable lists need to be handled first, otherwise they will be treated as scalar types if (isListType(graphqlType) || (isNonNullType(graphqlType) && isListType(graphqlType.ofType))) { @@ -272,7 +270,7 @@ export function handleListType( const wrapperNestingLevel = isNested ? nestingLevel : 1; // Generate all required wrapper messages - let wrapperName = listNameByNestingLevel(wrapperNestingLevel, baseType); + const wrapperName = listNameByNestingLevel(wrapperNestingLevel, baseType); // For nested lists, never use repeated at field level to preserve nullability return { @@ -336,11 +334,7 @@ function buildWrapperMessage( lines.push(`message ${wrapperName} {`); let innerWrapperName = ''; - if (level > 1) { - innerWrapperName = `${'ListOf'.repeat(level - 1)}${baseType.name}`; - } else { - innerWrapperName = getProtoTypeFromGraphQL(includeComments, baseType, true).typeName; - } + innerWrapperName = level > 1 ? `${'ListOf'.repeat(level - 1)}${baseType.name}` : getProtoTypeFromGraphQL(includeComments, baseType, true).typeName; lines.push( formatIndent(1, `message List {`), diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index f80bd9abfc..081b2ffea9 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -18,6 +18,7 @@ import { SelectionSetNode, visit, } from 'graphql'; +import { FieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; import { CompositeMessageKind, ProtoMessage, RPCMethod, VisitContext } from './types.js'; import { KEY_DIRECTIVE_NAME } from './string-constants.js'; import { @@ -30,7 +31,6 @@ import { } from './naming-conventions.js'; import { getProtoTypeFromGraphQL } from './proto-utils.js'; import { AbstractSelectionRewriter } from './abstract-selection-rewriter.js'; -import { FieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; /** * A record mapping key directive strings to their corresponding RequiredFieldMapping. @@ -83,7 +83,7 @@ export class RequiredFieldsVisitor { private ancestors: GraphQLObjectType[] = []; private currentType: GraphQLObjectType | undefined = this.objectType; private keyDirectives: DirectiveNode[] = []; - private currentKeyFieldsString: string = ''; + private currentKeyFieldsString = ''; /** Collected RPC methods for the required fields */ private rpcMethods: RPCMethod[] = []; @@ -365,10 +365,10 @@ export class RequiredFieldsVisitor { * @throws Error if the field definition is not found on the current type */ private onEnterField(ctx: VisitContext): void { - if (!this.current) return; + if (!this.current) { return; } const fieldDefinition = this.fieldDefinition(ctx.node.name.value); - if (!fieldDefinition) throw new Error(`Field definition not found for field ${ctx.node.name.value}`); + if (!fieldDefinition) { throw new Error(`Field definition not found for field ${ctx.node.name.value}`); } if (this.isCompositeType(fieldDefinition.type)) { this.handleCompositeType(fieldDefinition); @@ -415,7 +415,7 @@ export class RequiredFieldsVisitor { const currentInlineFragment = this.currentInlineFragment; this.currentInlineFragment = this.inlineFragmentStack.pop() ?? undefined; - if (!this.current || !this.current.compositeType) return; + if (!this.current || !this.current.compositeType) { return; } if (this.current.compositeType.kind === CompositeMessageKind.UNION) { this.current.compositeType.memberTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); @@ -430,7 +430,7 @@ export class RequiredFieldsVisitor { * @param ctx - The visit context containing the selection set node and its parent */ private onEnterSelectionSet(ctx: VisitContext): void { - if (!ctx.parent || !this.current) return; + if (!ctx.parent || !this.current) { return; } let currentType: GraphQLType | undefined; if (this.isFieldNode(ctx.parent)) { @@ -441,14 +441,14 @@ export class RequiredFieldsVisitor { } } else if (this.isInlineFragmentNode(ctx.parent)) { const typeName = ctx.parent.typeCondition?.name.value; - if (!typeName) return; + if (!typeName) { return; } currentType = this.findObjectType(typeName) ?? undefined; } else { return; } - if (!this.currentType) return; + if (!this.currentType) { return; } this.ancestors.push(this.currentType); this.currentType = currentType; @@ -495,7 +495,7 @@ export class RequiredFieldsVisitor { * @param fieldDefinition - The field definition with a composite type */ private handleCompositeType(fieldDefinition: GraphQLField): void { - if (!this.current) return; + if (!this.current) { return; } const compositeType = getNamedType(fieldDefinition.type); if (isInterfaceType(compositeType)) { @@ -514,8 +514,6 @@ export class RequiredFieldsVisitor { memberTypes: [], typeName: compositeType.name, }; - - return; } } @@ -526,7 +524,7 @@ export class RequiredFieldsVisitor { * @returns True if the node is a FieldNode */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { - if (Array.isArray(node)) return false; + if (Array.isArray(node)) { return false; } return (node as ASTNode).kind === Kind.FIELD; } @@ -537,7 +535,7 @@ export class RequiredFieldsVisitor { * @returns True if the node is an InlineFragmentNode */ private isInlineFragmentNode(node: ASTNode | ReadonlyArray): node is InlineFragmentNode { - if (Array.isArray(node)) return false; + if (Array.isArray(node)) { return false; } return (node as ASTNode).kind === Kind.INLINE_FRAGMENT; } @@ -550,7 +548,7 @@ export class RequiredFieldsVisitor { private findObjectTypeForField(fieldName: string): GraphQLObjectType | undefined { const fields = this.currentType?.getFields() ?? {}; const field = fields[fieldName]; - if (!field) return undefined; + if (!field) { return undefined; } const namedType = getNamedType(field.type); if (isObjectType(namedType)) { @@ -578,9 +576,9 @@ export class RequiredFieldsVisitor { */ private findObjectType(typeName: string): GraphQLObjectType | undefined { const type = this.schema.getTypeMap()[typeName]; - if (!type) return undefined; + if (!type) { return undefined; } - if (!isObjectType(type)) return undefined; + if (!isObjectType(type)) { return undefined; } return type; } @@ -592,7 +590,7 @@ export class RequiredFieldsVisitor { */ private getKeyFieldsString(directive: DirectiveNode): string { const fieldsArg = directive.arguments?.find((arg) => arg.name.value === 'fields'); - if (!fieldsArg) return ''; + if (!fieldsArg) { return ''; } return fieldsArg.value.kind === Kind.STRING ? fieldsArg.value.value : ''; } diff --git a/protographic/src/sdl-to-mapping-visitor.ts b/protographic/src/sdl-to-mapping-visitor.ts index 7ea1f4568a..3f665d85c8 100644 --- a/protographic/src/sdl-to-mapping-visitor.ts +++ b/protographic/src/sdl-to-mapping-visitor.ts @@ -12,18 +12,6 @@ import { isObjectType, Kind, } from 'graphql'; -import { - createEntityLookupMethodName, - createOperationMethodName, - createRequestMessageName, - createResolverMethodName, - createResponseMessageName, - graphqlArgumentToProtoField, - graphqlEnumValueToProtoEnumValue, - graphqlFieldToProtoField, - formatKeyElements, - OperationTypeName, -} from './naming-conventions.js'; import { ArgumentMapping, EntityMapping, @@ -40,6 +28,18 @@ import { TypeFieldMapping, } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; import { Maybe } from 'graphql/jsutils/Maybe.js'; +import { + createEntityLookupMethodName, + createOperationMethodName, + createRequestMessageName, + createResolverMethodName, + createResponseMessageName, + graphqlArgumentToProtoField, + graphqlEnumValueToProtoEnumValue, + graphqlFieldToProtoField, + formatKeyElements, + OperationTypeName, +} from './naming-conventions.js'; import { REQUIRES_DIRECTIVE_NAME } from './string-constants.js'; import { RequiredFieldsVisitor } from './required-fields-visitor.js'; /** @@ -64,7 +64,7 @@ export class GraphQLToProtoVisitor { * @param schema - The GraphQL schema to process * @param serviceName - Name for the generated service (defaults to "DefaultService") */ - constructor(schema: GraphQLSchema, serviceName: string = 'DefaultService') { + constructor(schema: GraphQLSchema, serviceName = 'DefaultService') { this.schema = schema; this.mapping = new GRPCMapping({ version: 1, @@ -119,12 +119,16 @@ export class GraphQLToProtoVisitor { for (const [typeName, type] of Object.entries(typeMap)) { // Skip built-in types and query/mutation/subscription types - if (this.shouldSkipRootType(type)) continue; + if (this.shouldSkipRootType(type)) { + continue; + } // Check if this is an entity type (has @key directive) if (isObjectType(type)) { const keyDirectives = this.getKeyDirectives(type); - if (keyDirectives.length === 0) continue; + if (keyDirectives.length === 0) { + continue; + } // Process each @key directive separately for (const keyDirective of keyDirectives) { @@ -145,7 +149,9 @@ export class GraphQLToProtoVisitor { const fields = Object.values(type.getFields()).filter((field) => field.astNode?.directives?.some((d) => d.name.value === REQUIRES_DIRECTIVE_NAME), ); - if (fields.length === 0) return; + if (fields.length === 0) { + return; + } for (const field of fields) { const visitor = new RequiredFieldsVisitor(this.schema, type, field, this.getRequiredFieldSet(field)); @@ -226,7 +232,7 @@ export class GraphQLToProtoVisitor { typeName, kind: 'entity', key: keyField, - rpc: rpc, + rpc, request: createRequestMessageName(rpc), response: createResponseMessageName(rpc), requiredFieldMappings: [], @@ -293,14 +299,20 @@ export class GraphQLToProtoVisitor { for (const typeName in typeMap) { const type = typeMap[typeName]; - if (this.shouldSkipRootType(type)) continue; + if (this.shouldSkipRootType(type)) { + continue; + } - if (!isObjectType(type)) continue; + if (!isObjectType(type)) { + continue; + } const fields = type.getFields(); for (const field of Object.values(fields)) { - if (field.args.length === 0) continue; + if (field.args.length === 0) { + continue; + } this.createLookupMapping(LookupType.RESOLVE, type.name, field); } @@ -322,7 +334,9 @@ export class GraphQLToProtoVisitor { operationType: OperationType, graphqlType: Maybe, ): void { - if (!graphqlType) return; + if (!graphqlType) { + return; + } const typeFieldMapping = new TypeFieldMapping({ type: operationTypeName, @@ -333,7 +347,9 @@ export class GraphQLToProtoVisitor { for (const fieldName in fields) { // Skip special federation fields - if (fieldName === '_entities') continue; + if (fieldName === '_entities') { + continue; + } const field = fields[fieldName]; const mappedName = createOperationMethodName(operationTypeName, fieldName); @@ -391,7 +407,9 @@ export class GraphQLToProtoVisitor { for (const typeName in typeMap) { const type = typeMap[typeName]; - if (this.shouldSkipRootType(type)) continue; + if (this.shouldSkipRootType(type)) { + continue; + } // Process each type according to its kind if (isObjectType(type)) { diff --git a/protographic/src/sdl-to-proto-visitor.ts b/protographic/src/sdl-to-proto-visitor.ts index 85a92654fa..d1ddb17149 100644 --- a/protographic/src/sdl-to-proto-visitor.ts +++ b/protographic/src/sdl-to-proto-visitor.ts @@ -25,6 +25,7 @@ import { Kind, StringValueNode, } from 'graphql'; +import { camelCase } from 'lodash-es'; import { createEntityLookupMethodName, createEnumUnspecifiedValue, @@ -38,7 +39,6 @@ import { typeFieldArgsName, typeFieldContextName, } from './naming-conventions.js'; -import { camelCase } from 'lodash-es'; import { ProtoLock, ProtoLockManager } from './proto-lock.js'; import { CONNECT_FIELD_RESOLVER, @@ -170,7 +170,23 @@ export class GraphQLToProtoTextVisitor { * @param options - Configuration options for the visitor */ constructor(schema: GraphQLSchema, options: GraphQLToProtoTextVisitorOptions = {}) { - const { serviceName = 'DefaultService', packageName = 'service.v1', lockData, includeComments = true } = options; + const { + serviceName = 'DefaultService', + packageName = 'service.v1', + lockData, + includeComments = true, + goPackage, + javaPackage, + javaOuterClassname, + javaMultipleFiles, + csharpNamespace, + rubyPackage, + phpNamespace, + phpMetadataNamespace, + objcClassPrefix, + swiftPrefix, + protoOptions, + } = options; this.schema = schema; this.serviceName = serviceName; @@ -186,16 +202,16 @@ export class GraphQLToProtoTextVisitor { // Process language-specific proto options using buildProtoOptions const protoOptionsFromLanguageProps = buildProtoOptions( { - goPackage: options.goPackage, - javaPackage: options.javaPackage, - javaOuterClassname: options.javaOuterClassname, - javaMultipleFiles: options.javaMultipleFiles, - csharpNamespace: options.csharpNamespace, - rubyPackage: options.rubyPackage, - phpNamespace: options.phpNamespace, - phpMetadataNamespace: options.phpMetadataNamespace, - objcClassPrefix: options.objcClassPrefix, - swiftPrefix: options.swiftPrefix, + goPackage, + javaPackage, + javaOuterClassname, + javaMultipleFiles, + csharpNamespace, + rubyPackage, + phpNamespace, + phpMetadataNamespace, + objcClassPrefix, + swiftPrefix, }, packageName, ); @@ -206,8 +222,8 @@ export class GraphQLToProtoTextVisitor { } // Process custom protoOptions array (for backward compatibility) - if (options.protoOptions && options.protoOptions.length > 0) { - const processedOptions = options.protoOptions.map((opt) => `option ${opt.name} = ${opt.constant};`); + if (protoOptions && protoOptions.length > 0) { + const processedOptions = protoOptions.map((opt) => `option ${opt.name} = ${opt.constant};`); this.options.push(...processedOptions); } } @@ -303,7 +319,7 @@ export class GraphQLToProtoTextVisitor { // Add all wrapper messages first since they might be referenced by other messages if (this.nestedListWrappers.size > 0) { // Sort the wrappers by name for deterministic output - const sortedWrapperNames = Array.from(this.nestedListWrappers.keys()).sort(); + const sortedWrapperNames = [...this.nestedListWrappers.keys()].sort(); for (const wrapperName of sortedWrapperNames) { protoContent.push(this.nestedListWrappers.get(wrapperName)!); } @@ -604,10 +620,10 @@ export class GraphQLToProtoTextVisitor { } // Skip non-object types - if (!isObjectType(type)) continue; + if (!isObjectType(type)) { continue; } const keyDirectives = this.getKeyDirectives(type); // Skip types that don't have @key directives - if (keyDirectives.length === 0) continue; + if (keyDirectives.length === 0) { continue; } // Queue this type for message generation (only once) this.queueTypeForProcessing(type); @@ -617,13 +633,13 @@ export class GraphQLToProtoTextVisitor { const normalizedKeysSet = new Set(); for (const keyDirective of keyDirectives) { const keyInfo = this.getKeyInfoFromDirective(keyDirective); - if (!keyInfo) continue; + if (!keyInfo) { continue; } const { keyString, resolvable } = keyInfo; - if (!resolvable) continue; + if (!resolvable) { continue; } const normalizedKey = keyString - .split(/[,\s]+/) + .split(/[\s,]+/) .filter((field) => field.length > 0) .sort() .join(' '); @@ -685,7 +701,7 @@ export class GraphQLToProtoTextVisitor { // Get the root operation type (Query or Mutation) const rootType = operationType === 'Query' ? this.schema.getQueryType() : this.schema.getMutationType(); - if (!rootType) return result; + if (!rootType) { return result; } const fields = rootType.getFields(); @@ -695,9 +711,9 @@ export class GraphQLToProtoTextVisitor { for (const fieldName of orderedFieldNames) { // Skip special fields like _entities - if (fieldName === '_entities') continue; + if (fieldName === '_entities') { continue; } - if (!fields[fieldName]) continue; + if (!fields[fieldName]) { continue; } const field = fields[fieldName]; const mappedName = createOperationMethodName(operationType, fieldName); @@ -757,7 +773,7 @@ export class GraphQLToProtoTextVisitor { name: methodName, request: requestName, response: responseName, - description: description, + description, }); return rpcLines.join('\n'); @@ -800,7 +816,7 @@ export class GraphQLToProtoTextVisitor { // Add all key fields to the key message const protoKeyFields: string[] = []; - keyFields.forEach((keyField, index) => { + for (const [index, keyField] of keyFields.entries()) { const protoKeyField = graphqlFieldToProtoField(keyField); protoKeyFields.push(protoKeyField); @@ -812,7 +828,7 @@ export class GraphQLToProtoTextVisitor { messageLines.push(...this.formatComment(keyFieldComment, 1)); // Field comment, indent 1 level } messageLines.push(` string ${protoKeyField} = ${keyFieldNumber};`); - }); + } messageLines.push('}'); messageLines.push(''); @@ -954,7 +970,7 @@ Example: // Process arguments in the order specified by the lock manager for (const argName of orderedArgNames) { const arg = field.args.find((a) => a.name === argName); - if (!arg) continue; + if (!arg) { continue; } const argType = this.getProtoTypeFromGraphQL(arg.type); const argProtoName = graphqlFieldToProtoField(arg.name); @@ -1109,16 +1125,16 @@ Example: const typeMap = this.schema.getTypeMap(); const result: CollectionResult = { rpcMethods: [], methodNames: [], messageDefinitions: [] }; - Object.values(typeMap).forEach((type) => { + for (const type of Object.values(typeMap)) { if (!isObjectType(type) || this.isOperationType(type)) { - return; + continue; } const fields = type.getFields(); - Object.values(fields).forEach((field) => { + for (const field of Object.values(fields)) { if (field.args.length === 0) { - return; + continue; } const methodName = createResolverMethodName(type.name, field.name); @@ -1131,8 +1147,8 @@ Example: result.messageDefinitions.push(...this.createResolverRequestMessage(methodName, requestName, type, field)); result.messageDefinitions.push(...this.createResolverResponseMessage(methodName, responseName, field)); - }); - }); + } + } return result; } @@ -1162,7 +1178,7 @@ Example: result.rpcMethods.push(...rpcMethods.map((m) => renderRPCMethod(this.includeComments, m).join('\n'))); result.methodNames.push(...rpcMethods.map((m) => m.name)); - let messageLines = messageDefinitions.map((m) => buildProtoMessage(this.includeComments, m)).flat(); + const messageLines = messageDefinitions.flatMap((m) => buildProtoMessage(this.includeComments, m)); result.messageDefinitions.push(...messageLines); } } @@ -1197,15 +1213,18 @@ Example: const idFields = this.getIDFields(parent, field.name); switch (idFields.length) { - case 0: + case 0: { return { context: '', error: 'No fields with type ID found' }; - case 1: + } + case 1: { return { context: idFields[0].name, error: undefined }; - default: + } + default: { return { context: '', error: `Multiple fields with type ID found - provide a context with the fields you want to use in the @${CONNECT_FIELD_RESOLVER} directive`, }; + } } } @@ -1297,7 +1316,7 @@ Example: ); // filter the fields in the parent type that are in the context - const searchFields = context.split(/[,\s]+/).filter((field) => field.length > 0); + const searchFields = context.split(/[\s,]+/).filter((field) => field.length > 0); const fieldFilter = Object.values(parent.getFields()).filter((field) => searchFields.includes(field.name)); if (searchFields.length !== fieldFilter.length) { throw new Error(`Invalid field context for resolver. Could not find all fields in the parent type: ${context}`); @@ -1317,7 +1336,7 @@ Example: ); fieldNumber = 0; - let keyMessageFields: ProtoMessageField[] = []; + const keyMessageFields: ProtoMessageField[] = []; // add the context message to the key message keyMessageFields.push({ @@ -1560,7 +1579,7 @@ Example: const orderedFieldNames = this.lockManager.reconcileMessageFieldOrder(type.name, fieldNames); for (const fieldName of orderedFieldNames) { - if (!fields[fieldName]) continue; + if (!fields[fieldName]) { continue; } // ignore fields with arguments as those are handled in separate resolver rpcs const field = fields[fieldName]; @@ -1705,7 +1724,7 @@ Example: const orderedFieldNames = this.lockManager.reconcileMessageFieldOrder(type.name, fieldNames); for (const fieldName of orderedFieldNames) { - if (!fields[fieldName]) continue; + if (!fields[fieldName]) { continue; } const field = fields[fieldName]; const fieldType = this.getProtoTypeFromGraphQL(field.type); @@ -1762,7 +1781,7 @@ Example: this.processedTypes.add(type.name); const implementingTypes = Object.values(this.schema.getTypeMap()) - .filter(isObjectType) + .filter((t) => isObjectType(t)) .filter((t) => t.getInterfaces().some((i) => i.name === type.name)); if (implementingTypes.length === 0) { @@ -1789,10 +1808,9 @@ Example: const typeNames = implementingTypes.map((t) => t.name); const orderedTypeNames = this.lockManager.reconcileMessageFieldOrder(`${type.name}Implementations`, typeNames); - for (let i = 0; i < orderedTypeNames.length; i++) { - const typeName = orderedTypeNames[i]; + for (const [i, typeName] of orderedTypeNames.entries()) { const implType = implementingTypes.find((t) => t.name === typeName); - if (!implType) continue; + if (!implType) { continue; } // Add implementing type description as comment if available if (implType.description) { @@ -1848,10 +1866,9 @@ Example: const typeNames = types.map((t) => t.name); const orderedTypeNames = this.lockManager.reconcileMessageFieldOrder(`${type.name}Members`, typeNames); - for (let i = 0; i < orderedTypeNames.length; i++) { - const typeName = orderedTypeNames[i]; + for (const [i, typeName] of orderedTypeNames.entries()) { const memberType = types.find((t) => t.name === typeName); - if (!memberType) continue; + if (!memberType) { continue; } // Add member type description as comment if available if (memberType.description) { @@ -1917,7 +1934,7 @@ Example: for (const valueName of orderedValueNames) { const value = values.find((v) => v.name === valueName); - if (!value) continue; + if (!value) { continue; } const protoEnumValue = graphqlEnumValueToProtoEnumValue(type.name, value.name); @@ -1967,7 +1984,7 @@ Example: * @param ignoreWrapperTypes - If true, do not use wrapper types for nullable scalar fields * @returns The corresponding Protocol Buffer type name */ - private getProtoTypeFromGraphQL(graphqlType: GraphQLType, ignoreWrapperTypes: boolean = false): ProtoFieldType { + private getProtoTypeFromGraphQL(graphqlType: GraphQLType, ignoreWrapperTypes = false): ProtoFieldType { const protoFieldType = getProtoTypeFromGraphQL(this.includeComments, graphqlType, ignoreWrapperTypes); if (!ignoreWrapperTypes && protoFieldType.isWrapper) { this.usesWrapperTypes = true; @@ -2009,7 +2026,7 @@ Example: * @returns A formatted string for the reserved statement */ private formatReservedNumbers(numbers: number[]): string { - if (numbers.length === 0) return ''; + if (numbers.length === 0) { return ''; } // Sort numbers for better readability const sortedNumbers = [...numbers].sort((a, b) => a - b); @@ -2042,11 +2059,7 @@ Example: // Format the ranges return ranges .map(([start, end]) => { - if (start === end) { - return start.toString(); - } else { - return `${start} to ${end}`; - } + return start === end ? start.toString() : `${start} to ${end}`; }) .join(', '); } @@ -2057,7 +2070,7 @@ Example: * @param indentLevel - The level of indentation for the comment (in number of 2-space blocks) * @returns Array of comment lines with proper indentation */ - private formatComment(description: string | undefined | null, indentLevel: number = 0): string[] { + private formatComment(description: string | undefined | null, indentLevel = 0): string[] { return formatComment(this.includeComments, description, indentLevel); } diff --git a/protographic/src/sdl-validation-visitor.ts b/protographic/src/sdl-validation-visitor.ts index 6c6cf352dd..792baea653 100644 --- a/protographic/src/sdl-validation-visitor.ts +++ b/protographic/src/sdl-validation-visitor.ts @@ -193,7 +193,7 @@ export class SDLValidationVisitor { return this.validationResult; } catch (error) { if (error instanceof Error) { - throw new Error(`Failed to parse GraphQL schema: ${error.message}`); + throw new TypeError(`Failed to parse GraphQL schema: ${error.message}`); } throw new Error('Failed to parse GraphQL schema: Unknown error'); } @@ -223,7 +223,7 @@ export class SDLValidationVisitor { * Handle object type definition nodes - validate directives */ ObjectTypeDefinition: (node, key, parent, path, ancestors) => { - this.executeValidationRules({ node: node, key, parent, path, ancestors }); + this.executeValidationRules({ node, key, parent, path, ancestors }); return node; }, @@ -264,15 +264,17 @@ export class SDLValidationVisitor { currentNode = currentNode.type; switch (currentNode.kind) { - case Kind.NON_NULL_TYPE: + case Kind.NON_NULL_TYPE: { // If we have a non-null type wrapping another list, return if (currentNode.type.kind === Kind.LIST_TYPE) { return; } break; - case Kind.LIST_TYPE: + } + case Kind.LIST_TYPE: { // Nested list found, return return; + } } } @@ -358,7 +360,7 @@ export class SDLValidationVisitor { return; } - const parent = ctx.ancestors[ctx.ancestors.length - 1]; + const parent = ctx.ancestors.at(-1); // If the parent is not an object type definition node, we don't need to continue with the validation if (!this.isASTObjectTypeNode(parent)) { return; @@ -381,16 +383,19 @@ export class SDLValidationVisitor { const idFields = parent.fields?.filter((field) => this.getUnderlyingType(field.type).name.value === GraphQLID.name) ?? []; switch (idFields.length) { - case 1: + case 1: { return; - case 0: + } + case 0: { this.addError('Invalid context provided for resolver. No fields with type ID found', ctx.node.loc); return; - default: + } + default: { this.addError( `Invalid context provided for resolver. Multiple fields with type ID found - provide a context with the fields you want to use in the @${CONNECT_FIELD_RESOLVER} directive`, ctx.node.loc, ); + } } } @@ -398,14 +403,14 @@ export class SDLValidationVisitor { const requiredDirective = ctx.node.directives?.find( (directive) => directive.name.value === REQUIRES_DIRECTIVE_NAME, ); - if (!requiredDirective) return; + if (!requiredDirective) { return; } const fieldSelections = requiredDirective.arguments?.find((arg) => arg.name.value === FIELDS)?.value; - if (!fieldSelections || fieldSelections.kind !== Kind.STRING) return; + if (!fieldSelections || fieldSelections.kind !== Kind.STRING) { return; } - const parentType = ctx.ancestors[ctx.ancestors.length - 1]; + const parentType = ctx.ancestors.at(-1); - if (!this.isASTObjectTypeNode(parentType)) return; + if (!this.isASTObjectTypeNode(parentType)) { return; } let operationDoc; try { @@ -455,7 +460,7 @@ export class SDLValidationVisitor { } const fieldNames = this.getContextFields(node); - if (fieldNames.length === 0) return true; + if (fieldNames.length === 0) { return true; } const parentFields = this.getParentFields(parent); if (parentFields.error) { @@ -497,15 +502,15 @@ export class SDLValidationVisitor { * @private */ private getContextFields(node: ConstArgumentNode | undefined): string[] { - if (!node) return []; + if (!node) { return []; } - let value = node?.value.kind === Kind.STRING ? node.value.value.trim() : ''; + const value = node?.value.kind === Kind.STRING ? node.value.value.trim() : ''; if (value.length === 0) { return []; } return value - .split(/[,\s]+/) + .split(/[\s,]+/) .filter((field) => field.length > 0) .map((field) => field.trim()); } @@ -523,7 +528,7 @@ export class SDLValidationVisitor { contextFields: string[], typeFields: FieldDefinitionNode[], ): { hasCycle: boolean; path: string } { - let visited = new Set(); + const visited = new Set(); return this.checkFieldCycle(field, contextFields, typeFields, visited, []); } @@ -542,13 +547,13 @@ export class SDLValidationVisitor { currentPath.push(fieldName); visited.add(fieldName); for (const contextField of contextFields) { - if (contextField === fieldName) continue; + if (contextField === fieldName) { continue; } - let typeField = typeFields.find((p) => p.name.value === contextField); - if (!typeField) continue; + const typeField = typeFields.find((p) => p.name.value === contextField); + if (!typeField) { continue; } const typeFieldContext = this.getResolverContext(typeField); - if (!typeFieldContext) continue; + if (!typeFieldContext) { continue; } const typeFieldContextFields = this.getContextFields(typeFieldContext); if (typeFieldContextFields.includes(fieldName)) { @@ -606,7 +611,7 @@ export class SDLValidationVisitor { return result; } - result.fields = Array.from(parent.fields ?? []); + result.fields = [...(parent.fields ?? [])]; return result; } diff --git a/protographic/src/selection-set-validation-visitor.ts b/protographic/src/selection-set-validation-visitor.ts index 39e612e24e..e6d5646f5c 100644 --- a/protographic/src/selection-set-validation-visitor.ts +++ b/protographic/src/selection-set-validation-visitor.ts @@ -163,7 +163,7 @@ export class SelectionSetValidationVisitor { * @returns BREAK if validation fails to stop traversal, undefined otherwise */ private onEnterSelectionSet(ctx: VisitContext): any { - if (!ctx.parent) return; + if (!ctx.parent) { return; } if (this.isInlineFragment(ctx.parent)) { this.validationResult.errors.push('Inline fragments are not allowed in requires directives'); @@ -183,7 +183,6 @@ export class SelectionSetValidationVisitor { if (isObjectType(namedType)) { this.ancestors.push(this.currentType); this.currentType = namedType; - return; } } @@ -194,7 +193,7 @@ export class SelectionSetValidationVisitor { * @param ctx - The visit context containing the selection set node and its parent */ private onLeaveSelectionSet(ctx: VisitContext): void { - if (!ctx.parent) return; + if (!ctx.parent) { return; } if (!this.isFieldNode(ctx.parent)) { return; @@ -224,7 +223,7 @@ export class SelectionSetValidationVisitor { * @returns True if the node is a FieldNode */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { - if (Array.isArray(node)) return false; + if (Array.isArray(node)) { return false; } return (node as ASTNode).kind === Kind.FIELD; } diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index 2721fe96c2..ca5a50a210 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { RequiredFieldsVisitor } from '../../src'; import { buildSchema, GraphQLField, GraphQLObjectType, GraphQLSchema, StringValueNode } from 'graphql'; -import { buildProtoMessage } from '../../src/proto-utils'; +import { RequiredFieldsVisitor } from '../../src/index.js'; +import { buildProtoMessage } from '../../src/proto-utils.js'; import { CompositeMessageKind, InterfaceMessageDefinition, @@ -11,8 +11,8 @@ import { ProtoMessageField, RPCMethod, UnionMessageDefinition, -} from '../../src/types'; -import { RequiredFieldMapping } from '../../src/required-fields-visitor'; +} from '../../src/types.js'; +import { RequiredFieldMapping } from '../../src/required-fields-visitor.js'; /** * Options for creating a RequiredFieldsVisitor test setup. diff --git a/protographic/tests/naming-conventions.test.ts b/protographic/tests/naming-conventions.test.ts index 2d1d4406d1..05ba53f571 100644 --- a/protographic/tests/naming-conventions.test.ts +++ b/protographic/tests/naming-conventions.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { formatKeyElements, createMethodSuffixFromEntityKey } from '../src/naming-conventions'; +import { formatKeyElements, createMethodSuffixFromEntityKey } from '../src/naming-conventions.js'; describe('formatKeyElements', () => { it('handles comma-separated keys', () => { diff --git a/protographic/tests/operations/enum-support.test.ts b/protographic/tests/operations/enum-support.test.ts index 7360b81955..03ea4a5140 100644 --- a/protographic/tests/operations/enum-support.test.ts +++ b/protographic/tests/operations/enum-support.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileOperationsToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('Enum Support', () => { describe('Enums in Query Variables', () => { @@ -1021,7 +1021,7 @@ describe('Enum Support', () => { expectValidProto(proto); // Count occurrences of "enum UserStatus" - should only appear once - const enumDeclarations = proto.match(/enum UserStatus \{/g); + const enumDeclarations = proto.match(/enum UserStatus {/g); expect(enumDeclarations).toHaveLength(1); expect(proto).toMatchInlineSnapshot(` @@ -1103,7 +1103,7 @@ describe('Enum Support', () => { expectValidProto(proto); // Count occurrences of "enum Visibility" - should only appear once - const enumDeclarations = proto.match(/enum Visibility \{/g); + const enumDeclarations = proto.match(/enum Visibility {/g); expect(enumDeclarations).toHaveLength(1); expect(proto).toMatchInlineSnapshot(` diff --git a/protographic/tests/operations/field-numbering.test.ts b/protographic/tests/operations/field-numbering.test.ts index 6fa1f9b8da..0dea4ddbec 100644 --- a/protographic/tests/operations/field-numbering.test.ts +++ b/protographic/tests/operations/field-numbering.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { createFieldNumberManager } from '../../src'; +import { createFieldNumberManager } from '../../src/index.js'; describe('Field Numbering', () => { describe('createFieldNumberManager', () => { diff --git a/protographic/tests/operations/field-ordering-stability.test.ts b/protographic/tests/operations/field-ordering-stability.test.ts index 77b59854be..74a93e497b 100644 --- a/protographic/tests/operations/field-ordering-stability.test.ts +++ b/protographic/tests/operations/field-ordering-stability.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; -import { expectValidProto, getFieldNumbersFromMessage, loadProtoFromText } from '../util'; +import { compileOperationsToProto } from '../../src/index.js'; +import { expectValidProto, getFieldNumbersFromMessage, loadProtoFromText } from '../util.js'; describe('Operations Field Ordering Stability', () => { describe('Response Message Field Ordering', () => { @@ -154,8 +154,8 @@ describe('Operations Field Ordering Stability', () => { const root1 = loadProtoFromText(result1.proto); const productFields1 = getFieldNumbersFromMessage(root1, 'GetProductResponse.Product'); - const idNumber = productFields1['id']; - const priceNumber = productFields1['price']; + const idNumber = productFields1.id; + const priceNumber = productFields1.price; // Second operation with some fields removed const operation2 = ` @@ -176,13 +176,13 @@ describe('Operations Field Ordering Stability', () => { const productFields2 = getFieldNumbersFromMessage(root2, 'GetProductResponse.Product'); // Verify preserved fields kept their numbers - expect(productFields2['id']).toBe(idNumber); - expect(productFields2['price']).toBe(priceNumber); + expect(productFields2.id).toBe(idNumber); + expect(productFields2.price).toBe(priceNumber); // Verify removed fields are not present - expect(productFields2['name']).toBeUndefined(); - expect(productFields2['description']).toBeUndefined(); - expect(productFields2['in_stock']).toBeUndefined(); + expect(productFields2.name).toBeUndefined(); + expect(productFields2.description).toBeUndefined(); + expect(productFields2.in_stock).toBeUndefined(); // Third operation with fields re-added and new field const operation3 = ` @@ -235,19 +235,19 @@ describe('Operations Field Ordering Stability', () => { const productFields3 = getFieldNumbersFromMessage(root3, 'GetProductResponse.Product'); // Verify original fields still have same numbers - expect(productFields3['id']).toBe(idNumber); - expect(productFields3['price']).toBe(priceNumber); + expect(productFields3.id).toBe(idNumber); + expect(productFields3.price).toBe(priceNumber); // Verify re-added fields exist (they get new numbers, not reusing old ones) - expect(productFields3['name']).toBeDefined(); - expect(productFields3['description']).toBeDefined(); + expect(productFields3.name).toBeDefined(); + expect(productFields3.description).toBeDefined(); // Verify new field exists - expect(productFields3['category']).toBeDefined(); + expect(productFields3.category).toBeDefined(); // Re-added fields should have higher numbers than original fields - expect(productFields3['name']).toBeGreaterThan(priceNumber); - expect(productFields3['description']).toBeGreaterThan(priceNumber); + expect(productFields3.name).toBeGreaterThan(priceNumber); + expect(productFields3.description).toBeGreaterThan(priceNumber); }); test('should handle nested object field ordering', () => { @@ -316,13 +316,13 @@ describe('Operations Field Ordering Stability', () => { const profileFields2 = getFieldNumbersFromMessage(root2, 'GetUserResponse.User.Profile'); // Verify both parent and nested field numbers are preserved - expect(userFields2['id']).toBe(userFields1['id']); - expect(userFields2['name']).toBe(userFields1['name']); - expect(userFields2['profile']).toBe(userFields1['profile']); + expect(userFields2.id).toBe(userFields1.id); + expect(userFields2.name).toBe(userFields1.name); + expect(userFields2.profile).toBe(userFields1.profile); - expect(profileFields2['bio']).toBe(profileFields1['bio']); - expect(profileFields2['avatar']).toBe(profileFields1['avatar']); - expect(profileFields2['location']).toBe(profileFields1['location']); + expect(profileFields2.bio).toBe(profileFields1.bio); + expect(profileFields2.avatar).toBe(profileFields1.avatar); + expect(profileFields2.location).toBe(profileFields1.location); }); }); @@ -355,10 +355,10 @@ describe('Operations Field Ordering Stability', () => { const root1 = loadProtoFromText(result1.proto); const requestFields1 = getFieldNumbersFromMessage(root1, 'SearchUsersRequest'); - const idNumber = requestFields1['id']; - const nameNumber = requestFields1['name']; - const emailNumber = requestFields1['email']; - const ageNumber = requestFields1['age']; + const idNumber = requestFields1.id; + const nameNumber = requestFields1.name; + const emailNumber = requestFields1.email; + const ageNumber = requestFields1.age; // Second operation with completely different variable order const operation2 = ` @@ -379,10 +379,10 @@ describe('Operations Field Ordering Stability', () => { const requestFields2 = getFieldNumbersFromMessage(root2, 'SearchUsersRequest'); // Verify field numbers are preserved - expect(requestFields2['id']).toBe(idNumber); - expect(requestFields2['name']).toBe(nameNumber); - expect(requestFields2['email']).toBe(emailNumber); - expect(requestFields2['age']).toBe(ageNumber); + expect(requestFields2.id).toBe(idNumber); + expect(requestFields2.name).toBe(nameNumber); + expect(requestFields2.email).toBe(emailNumber); + expect(requestFields2.age).toBe(ageNumber); }); test('should handle adding and removing variables', () => { @@ -413,8 +413,8 @@ describe('Operations Field Ordering Stability', () => { const root1 = loadProtoFromText(result1.proto); const requestFields1 = getFieldNumbersFromMessage(root1, 'FilterUsersRequest'); - const nameNumber = requestFields1['name']; - const activeNumber = requestFields1['active']; + const nameNumber = requestFields1.name; + const activeNumber = requestFields1.active; // Second operation with some variables removed const operation2 = ` @@ -435,13 +435,13 @@ describe('Operations Field Ordering Stability', () => { const requestFields2 = getFieldNumbersFromMessage(root2, 'FilterUsersRequest'); // Verify preserved variables kept their numbers - expect(requestFields2['name']).toBe(nameNumber); - expect(requestFields2['active']).toBe(activeNumber); + expect(requestFields2.name).toBe(nameNumber); + expect(requestFields2.active).toBe(activeNumber); // Verify removed variables are not present - expect(requestFields2['id']).toBeUndefined(); - expect(requestFields2['age']).toBeUndefined(); - expect(requestFields2['email']).toBeUndefined(); + expect(requestFields2.id).toBeUndefined(); + expect(requestFields2.age).toBeUndefined(); + expect(requestFields2.email).toBeUndefined(); // Third operation with variables re-added (no unused variables) const operation3 = ` @@ -489,12 +489,12 @@ describe('Operations Field Ordering Stability', () => { const requestFields3 = getFieldNumbersFromMessage(root3, 'FilterUsersRequest'); // Verify original variables still have same numbers - expect(requestFields3['name']).toBe(nameNumber); - expect(requestFields3['active']).toBe(activeNumber); + expect(requestFields3.name).toBe(nameNumber); + expect(requestFields3.active).toBe(activeNumber); // Verify re-added variable exists (gets new number, not reusing old one) - expect(requestFields3['id']).toBeDefined(); - expect(requestFields3['id']).toBeGreaterThan(activeNumber); + expect(requestFields3.id).toBeDefined(); + expect(requestFields3.id).toBeGreaterThan(activeNumber); }); }); @@ -538,10 +538,10 @@ describe('Operations Field Ordering Stability', () => { const root1 = loadProtoFromText(result1.proto); const inputFields1 = getFieldNumbersFromMessage(root1, 'UserInput'); - const nameNumber = inputFields1['name']; - const emailNumber = inputFields1['email']; - const ageNumber = inputFields1['age']; - const activeNumber = inputFields1['active']; + const nameNumber = inputFields1.name; + const emailNumber = inputFields1.email; + const ageNumber = inputFields1.age; + const activeNumber = inputFields1.active; // Second operation - same input type should preserve field numbers const operation2 = ` @@ -562,10 +562,10 @@ describe('Operations Field Ordering Stability', () => { const inputFields2 = getFieldNumbersFromMessage(root2, 'UserInput'); // Verify field numbers are preserved - expect(inputFields2['name']).toBe(nameNumber); - expect(inputFields2['email']).toBe(emailNumber); - expect(inputFields2['age']).toBe(ageNumber); - expect(inputFields2['active']).toBe(activeNumber); + expect(inputFields2.name).toBe(nameNumber); + expect(inputFields2.email).toBe(emailNumber); + expect(inputFields2.age).toBe(ageNumber); + expect(inputFields2.active).toBe(activeNumber); }); test('should handle nested input objects with field reordering', () => { @@ -621,17 +621,17 @@ describe('Operations Field Ordering Stability', () => { const prefsFields1 = getFieldNumbersFromMessage(root1, 'UserPreferences'); // Store original field numbers - const filterBasicNumber = filterFields1['basic']; - const filterPrefsNumber = filterFields1['preferences']; - const filterMetadataNumber = filterFields1['metadata']; + const filterBasicNumber = filterFields1.basic; + const filterPrefsNumber = filterFields1.preferences; + const filterMetadataNumber = filterFields1.metadata; - const basicIdNumber = basicFields1['id']; - const basicNameNumber = basicFields1['name']; - const basicEmailNumber = basicFields1['email']; + const basicIdNumber = basicFields1.id; + const basicNameNumber = basicFields1.name; + const basicEmailNumber = basicFields1.email; - const prefsActiveNumber = prefsFields1['active']; - const prefsNotificationsNumber = prefsFields1['notifications']; - const prefsThemeNumber = prefsFields1['theme']; + const prefsActiveNumber = prefsFields1.active; + const prefsNotificationsNumber = prefsFields1.notifications; + const prefsThemeNumber = prefsFields1.theme; // Get the generated lock data const lockData = result1.lockData; @@ -648,7 +648,7 @@ describe('Operations Field Ordering Stability', () => { `; const result2 = compileOperationsToProto(operation2, schema, { - lockData: lockData, + lockData, }); expectValidProto(result2.proto); @@ -658,19 +658,19 @@ describe('Operations Field Ordering Stability', () => { const prefsFields2 = getFieldNumbersFromMessage(root2, 'UserPreferences'); // Verify parent input object field numbers are preserved - expect(filterFields2['basic']).toBe(filterBasicNumber); - expect(filterFields2['preferences']).toBe(filterPrefsNumber); - expect(filterFields2['metadata']).toBe(filterMetadataNumber); + expect(filterFields2.basic).toBe(filterBasicNumber); + expect(filterFields2.preferences).toBe(filterPrefsNumber); + expect(filterFields2.metadata).toBe(filterMetadataNumber); // Verify nested BasicInfo field numbers are preserved - expect(basicFields2['id']).toBe(basicIdNumber); - expect(basicFields2['name']).toBe(basicNameNumber); - expect(basicFields2['email']).toBe(basicEmailNumber); + expect(basicFields2.id).toBe(basicIdNumber); + expect(basicFields2.name).toBe(basicNameNumber); + expect(basicFields2.email).toBe(basicEmailNumber); // Verify nested UserPreferences field numbers are preserved - expect(prefsFields2['active']).toBe(prefsActiveNumber); - expect(prefsFields2['notifications']).toBe(prefsNotificationsNumber); - expect(prefsFields2['theme']).toBe(prefsThemeNumber); + expect(prefsFields2.active).toBe(prefsActiveNumber); + expect(prefsFields2.notifications).toBe(prefsNotificationsNumber); + expect(prefsFields2.theme).toBe(prefsThemeNumber); }); test('should handle adding and removing fields in nested input objects', () => { @@ -725,9 +725,9 @@ describe('Operations Field Ordering Stability', () => { const prefsFields1 = getFieldNumbersFromMessage(root1, 'UserPreferences'); // Store original field numbers - const basicIdNumber = basicFields1['id']; - const basicEmailNumber = basicFields1['email']; - const prefsActiveNumber = prefsFields1['active']; + const basicIdNumber = basicFields1.id; + const basicEmailNumber = basicFields1.email; + const prefsActiveNumber = prefsFields1.active; const lockData1 = result1.lockData; @@ -784,15 +784,15 @@ describe('Operations Field Ordering Stability', () => { const prefsFields2 = getFieldNumbersFromMessage(root2, 'UserPreferences'); // Verify preserved fields kept their numbers - expect(basicFields2['id']).toBe(basicIdNumber); - expect(basicFields2['email']).toBe(basicEmailNumber); - expect(prefsFields2['active']).toBe(prefsActiveNumber); + expect(basicFields2.id).toBe(basicIdNumber); + expect(basicFields2.email).toBe(basicEmailNumber); + expect(prefsFields2.active).toBe(prefsActiveNumber); // Verify removed fields are not present - expect(basicFields2['name']).toBeUndefined(); - expect(basicFields2['phone']).toBeUndefined(); - expect(prefsFields2['notifications']).toBeUndefined(); - expect(prefsFields2['theme']).toBeUndefined(); + expect(basicFields2.name).toBeUndefined(); + expect(basicFields2.phone).toBeUndefined(); + expect(prefsFields2.notifications).toBeUndefined(); + expect(prefsFields2.theme).toBeUndefined(); const lockData2 = result2.lockData; @@ -851,24 +851,24 @@ describe('Operations Field Ordering Stability', () => { const prefsFields3 = getFieldNumbersFromMessage(root3, 'UserPreferences'); // Verify original fields still have same numbers - expect(basicFields3['id']).toBe(basicIdNumber); - expect(basicFields3['email']).toBe(basicEmailNumber); - expect(prefsFields3['active']).toBe(prefsActiveNumber); + expect(basicFields3.id).toBe(basicIdNumber); + expect(basicFields3.email).toBe(basicEmailNumber); + expect(prefsFields3.active).toBe(prefsActiveNumber); // Verify re-added fields exist (they get new numbers) - expect(basicFields3['name']).toBeDefined(); - expect(basicFields3['phone']).toBeDefined(); - expect(prefsFields3['notifications']).toBeDefined(); - expect(prefsFields3['theme']).toBeDefined(); + expect(basicFields3.name).toBeDefined(); + expect(basicFields3.phone).toBeDefined(); + expect(prefsFields3.notifications).toBeDefined(); + expect(prefsFields3.theme).toBeDefined(); // Verify new fields exist - expect(basicFields3['address']).toBeDefined(); - expect(prefsFields3['language']).toBeDefined(); + expect(basicFields3.address).toBeDefined(); + expect(prefsFields3.language).toBeDefined(); // Re-added and new fields should have higher numbers than original fields - expect(basicFields3['name']).toBeGreaterThan(basicEmailNumber); - expect(basicFields3['address']).toBeGreaterThan(basicEmailNumber); - expect(prefsFields3['language']).toBeGreaterThan(prefsActiveNumber); + expect(basicFields3.name).toBeGreaterThan(basicEmailNumber); + expect(basicFields3.address).toBeGreaterThan(basicEmailNumber); + expect(prefsFields3.language).toBeGreaterThan(prefsActiveNumber); }); test('should handle deeply nested input objects (3 levels)', () => { @@ -936,21 +936,21 @@ describe('Operations Field Ordering Stability', () => { const sortFields1 = getFieldNumbersFromMessage(root1, 'SortOptions'); // Store original field numbers at each level - const criteriaFiltersNumber = criteriaFields1['filters']; - const criteriaSortingNumber = criteriaFields1['sorting']; + const criteriaFiltersNumber = criteriaFields1.filters; + const criteriaSortingNumber = criteriaFields1.sorting; - const filterGroupUserNumber = filterGroupFields1['user']; - const filterGroupDateNumber = filterGroupFields1['date']; + const filterGroupUserNumber = filterGroupFields1.user; + const filterGroupDateNumber = filterGroupFields1.date; - const userFiltersNameNumber = userFiltersFields1['name']; - const userFiltersEmailNumber = userFiltersFields1['email']; - const userFiltersActiveNumber = userFiltersFields1['active']; + const userFiltersNameNumber = userFiltersFields1.name; + const userFiltersEmailNumber = userFiltersFields1.email; + const userFiltersActiveNumber = userFiltersFields1.active; - const dateFiltersFromNumber = dateFiltersFields1['from']; - const dateFiltersToNumber = dateFiltersFields1['to']; + const dateFiltersFromNumber = dateFiltersFields1.from; + const dateFiltersToNumber = dateFiltersFields1.to; - const sortFieldNumber = sortFields1['field']; - const sortDirectionNumber = sortFields1['direction']; + const sortFieldNumber = sortFields1.field; + const sortDirectionNumber = sortFields1.direction; const lockData = result1.lockData; @@ -965,7 +965,7 @@ describe('Operations Field Ordering Stability', () => { `; const result2 = compileOperationsToProto(operation2, schema, { - lockData: lockData, + lockData, }); expectValidProto(result2.proto); @@ -1029,21 +1029,21 @@ describe('Operations Field Ordering Stability', () => { const sortFields2 = getFieldNumbersFromMessage(root2, 'SortOptions'); // Verify all field numbers are preserved at all nesting levels - expect(criteriaFields2['filters']).toBe(criteriaFiltersNumber); - expect(criteriaFields2['sorting']).toBe(criteriaSortingNumber); + expect(criteriaFields2.filters).toBe(criteriaFiltersNumber); + expect(criteriaFields2.sorting).toBe(criteriaSortingNumber); - expect(filterGroupFields2['user']).toBe(filterGroupUserNumber); - expect(filterGroupFields2['date']).toBe(filterGroupDateNumber); + expect(filterGroupFields2.user).toBe(filterGroupUserNumber); + expect(filterGroupFields2.date).toBe(filterGroupDateNumber); - expect(userFiltersFields2['name']).toBe(userFiltersNameNumber); - expect(userFiltersFields2['email']).toBe(userFiltersEmailNumber); - expect(userFiltersFields2['active']).toBe(userFiltersActiveNumber); + expect(userFiltersFields2.name).toBe(userFiltersNameNumber); + expect(userFiltersFields2.email).toBe(userFiltersEmailNumber); + expect(userFiltersFields2.active).toBe(userFiltersActiveNumber); - expect(dateFiltersFields2['from']).toBe(dateFiltersFromNumber); - expect(dateFiltersFields2['to']).toBe(dateFiltersToNumber); + expect(dateFiltersFields2.from).toBe(dateFiltersFromNumber); + expect(dateFiltersFields2.to).toBe(dateFiltersToNumber); - expect(sortFields2['field']).toBe(sortFieldNumber); - expect(sortFields2['direction']).toBe(sortDirectionNumber); + expect(sortFields2.field).toBe(sortFieldNumber); + expect(sortFields2.direction).toBe(sortDirectionNumber); }); }); @@ -1084,10 +1084,10 @@ describe('Operations Field Ordering Stability', () => { const root1 = loadProtoFromText(result1.proto); const userFields1 = getFieldNumbersFromMessage(root1, 'GetUserResponse.User'); - const idNumber = userFields1['id']; - const nameNumber = userFields1['name']; - const emailNumber = userFields1['email']; - const ageNumber = userFields1['age']; + const idNumber = userFields1.id; + const nameNumber = userFields1.name; + const emailNumber = userFields1.email; + const ageNumber = userFields1.age; // Second operation with reordered fragment fields const operation2 = ` @@ -1114,10 +1114,10 @@ describe('Operations Field Ordering Stability', () => { const userFields2 = getFieldNumbersFromMessage(root2, 'GetUserResponse.User'); // Verify field numbers are preserved - expect(userFields2['id']).toBe(idNumber); - expect(userFields2['name']).toBe(nameNumber); - expect(userFields2['email']).toBe(emailNumber); - expect(userFields2['age']).toBe(ageNumber); + expect(userFields2.id).toBe(idNumber); + expect(userFields2.name).toBe(nameNumber); + expect(userFields2.email).toBe(emailNumber); + expect(userFields2.age).toBe(ageNumber); }); test('should handle mixed fragment spreads and inline fields with reordering', () => { @@ -1391,9 +1391,9 @@ describe('Operations Field Ordering Stability', () => { const settingsFields2 = getFieldNumbersFromMessage(root2, 'GetUserResponse.User.Profile.Settings'); // Verify deeply nested field numbers are preserved - expect(settingsFields2['theme']).toBe(settingsFields1['theme']); - expect(settingsFields2['notifications']).toBe(settingsFields1['notifications']); - expect(settingsFields2['language']).toBe(settingsFields1['language']); + expect(settingsFields2.theme).toBe(settingsFields1.theme); + expect(settingsFields2.notifications).toBe(settingsFields1.notifications); + expect(settingsFields2.language).toBe(settingsFields1.language); }); test('should handle operations with both variable and response field reordering', () => { @@ -1587,8 +1587,8 @@ describe('Operations Field Ordering Stability', () => { const userFields1 = getFieldNumbersFromMessage(root1, 'GetUserResponse.User'); const userFields2 = getFieldNumbersFromMessage(root2, 'GetUserResponse.User'); - expect(userFields2['id']).toBe(userFields1['id']); - expect(userFields2['name']).toBe(userFields1['name']); + expect(userFields2.id).toBe(userFields1.id); + expect(userFields2.name).toBe(userFields1.name); }); test('should produce consistent output when run multiple times with same operation', () => { diff --git a/protographic/tests/operations/fragment-spreads-interface-union.test.ts b/protographic/tests/operations/fragment-spreads-interface-union.test.ts index c313957ff6..bddfb1f279 100644 --- a/protographic/tests/operations/fragment-spreads-interface-union.test.ts +++ b/protographic/tests/operations/fragment-spreads-interface-union.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; +import { compileOperationsToProto } from '../../src/index.js'; import { expectValidProto } from '../util.js'; describe('Fragment Spreads on Interfaces and Unions', () => { diff --git a/protographic/tests/operations/fragments.test.ts b/protographic/tests/operations/fragments.test.ts index d742496222..62c7be3c4b 100644 --- a/protographic/tests/operations/fragments.test.ts +++ b/protographic/tests/operations/fragments.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; +import { compileOperationsToProto } from '../../src/index.js'; import { expectValidProto } from '../util.js'; describe('Fragment Support', () => { diff --git a/protographic/tests/operations/message-builder.test.ts b/protographic/tests/operations/message-builder.test.ts index 27e1299a5f..67cddff19e 100644 --- a/protographic/tests/operations/message-builder.test.ts +++ b/protographic/tests/operations/message-builder.test.ts @@ -16,7 +16,7 @@ import { buildFieldDefinition, buildNestedMessage, createFieldNumberManager, -} from '../../src'; +} from '../../src/index.js'; describe('Message Builder', () => { describe('buildFieldDefinition', () => { diff --git a/protographic/tests/operations/nested-message-field-numbering.test.ts b/protographic/tests/operations/nested-message-field-numbering.test.ts index 6b7302d8d6..dc3f6ad605 100644 --- a/protographic/tests/operations/nested-message-field-numbering.test.ts +++ b/protographic/tests/operations/nested-message-field-numbering.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileOperationsToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('Nested Message Field Numbering', () => { test('should assign field numbers starting from 1 in a simple nested message', () => { diff --git a/protographic/tests/operations/operation-to-proto.test.ts b/protographic/tests/operations/operation-to-proto.test.ts index b5071c12ba..d127bf96a0 100644 --- a/protographic/tests/operations/operation-to-proto.test.ts +++ b/protographic/tests/operations/operation-to-proto.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; -import { expectValidProto } from '../util'; import * as protobuf from 'protobufjs'; +import { compileOperationsToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('Operation to Proto - Integration Tests', () => { describe('query operations', () => { diff --git a/protographic/tests/operations/operation-validation.test.ts b/protographic/tests/operations/operation-validation.test.ts index 004882ab85..a733500157 100644 --- a/protographic/tests/operations/operation-validation.test.ts +++ b/protographic/tests/operations/operation-validation.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; +import { compileOperationsToProto } from '../../src/index.js'; describe('Operation Validation', () => { const schema = ` diff --git a/protographic/tests/operations/proto-text-generator.test.ts b/protographic/tests/operations/proto-text-generator.test.ts index 32d4c88fb5..ce29c60700 100644 --- a/protographic/tests/operations/proto-text-generator.test.ts +++ b/protographic/tests/operations/proto-text-generator.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; import * as protobuf from 'protobufjs'; -import { rootToProtoText, serviceToProtoText, messageToProtoText, enumToProtoText, formatField } from '../../src'; -import { expectValidProto } from '../util'; +import { rootToProtoText, serviceToProtoText, messageToProtoText, enumToProtoText, formatField } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; /** * Extended Method interface that includes custom properties diff --git a/protographic/tests/operations/recursion-protection.test.ts b/protographic/tests/operations/recursion-protection.test.ts index b750541f11..3311801a1e 100644 --- a/protographic/tests/operations/recursion-protection.test.ts +++ b/protographic/tests/operations/recursion-protection.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileOperationsToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('Recursion Protection', () => { describe('Maximum Depth Protection', () => { @@ -286,7 +286,7 @@ describe('Recursion Protection', () => { `; // Should be rejected by GraphQL validation as circular fragment reference - expect(() => compileOperationsToProto(operation, schema)).toThrow(/Cannot spread fragment.*within itself/i); + expect(() => compileOperationsToProto(operation, schema)).toThrow(/cannot spread fragment.*within itself/i); }); }); diff --git a/protographic/tests/operations/request-builder.test.ts b/protographic/tests/operations/request-builder.test.ts index 21dbe21838..312507b0e8 100644 --- a/protographic/tests/operations/request-builder.test.ts +++ b/protographic/tests/operations/request-builder.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; import { buildSchema, parse, GraphQLInputObjectType, GraphQLEnumType } from 'graphql'; -import { buildRequestMessage, buildInputObjectMessage, buildEnumType, createFieldNumberManager } from '../../src'; +import { buildRequestMessage, buildInputObjectMessage, buildEnumType, createFieldNumberManager } from '../../src/index.js'; describe('Request Builder', () => { describe('buildRequestMessage', () => { diff --git a/protographic/tests/operations/type-mapper.test.ts b/protographic/tests/operations/type-mapper.test.ts index 37cfd78bf1..1d519632ff 100644 --- a/protographic/tests/operations/type-mapper.test.ts +++ b/protographic/tests/operations/type-mapper.test.ts @@ -17,7 +17,7 @@ import { isGraphQLScalarType, requiresWrapperType, getRequiredImports, -} from '../../src'; +} from '../../src/index.js'; describe('Type Mapper', () => { describe('mapGraphQLTypeToProto', () => { @@ -410,7 +410,7 @@ describe('Type Mapper', () => { test('should return unique imports', () => { const imports = getRequiredImports([GraphQLString, GraphQLInt, GraphQLBoolean]); - const uniqueImports = Array.from(new Set(imports)); + const uniqueImports = [...new Set(imports)]; expect(imports.length).toBe(uniqueImports.length); }); }); diff --git a/protographic/tests/operations/validation.test.ts b/protographic/tests/operations/validation.test.ts index df3f061c0b..d06053bec9 100644 --- a/protographic/tests/operations/validation.test.ts +++ b/protographic/tests/operations/validation.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { compileOperationsToProto } from '../../src'; +import { compileOperationsToProto } from '../../src/index.js'; describe('GraphQL Operation Validation', () => { const schema = ` @@ -31,7 +31,7 @@ describe('GraphQL Operation Validation', () => { } `; - expect(() => compileOperationsToProto(operation, schema)).toThrow(/Cannot spread fragment.*within itself/i); + expect(() => compileOperationsToProto(operation, schema)).toThrow(/cannot spread fragment.*within itself/i); }); test('should reject unknown types', () => { diff --git a/protographic/tests/sdl-to-mapping/01-basics.test.ts b/protographic/tests/sdl-to-mapping/01-basics.test.ts index b50cc2389d..dd0451e06f 100644 --- a/protographic/tests/sdl-to-mapping/01-basics.test.ts +++ b/protographic/tests/sdl-to-mapping/01-basics.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToMapping } from '../../src'; +import { compileGraphQLToMapping } from '../../src/index.js'; describe('Basic GraphQL Schema to Proto Mapping', () => { it('maps a simple schema with scalar fields', () => { diff --git a/protographic/tests/sdl-to-mapping/02-complex-types.test.ts b/protographic/tests/sdl-to-mapping/02-complex-types.test.ts index c4b1b93c8c..5f785d87b6 100644 --- a/protographic/tests/sdl-to-mapping/02-complex-types.test.ts +++ b/protographic/tests/sdl-to-mapping/02-complex-types.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToMapping } from '../../src'; +import { compileGraphQLToMapping } from '../../src/index.js'; describe('Complex GraphQL Types to Proto Mapping', () => { it('maps enum types correctly', () => { diff --git a/protographic/tests/sdl-to-mapping/03-federation.test.ts b/protographic/tests/sdl-to-mapping/03-federation.test.ts index 18bcaa1233..e76ac2daf9 100644 --- a/protographic/tests/sdl-to-mapping/03-federation.test.ts +++ b/protographic/tests/sdl-to-mapping/03-federation.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, test } from 'vitest'; -import { compileGraphQLToMapping } from '../../src'; +import { compileGraphQLToMapping } from '../../src/index.js'; describe('GraphQL Federation to Proto Mapping', () => { it('maps basic federation entity with @key directive', () => { diff --git a/protographic/tests/sdl-to-mapping/04-field-resolvers.test.ts b/protographic/tests/sdl-to-mapping/04-field-resolvers.test.ts index 121521ceea..1dcebf1056 100644 --- a/protographic/tests/sdl-to-mapping/04-field-resolvers.test.ts +++ b/protographic/tests/sdl-to-mapping/04-field-resolvers.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToMapping } from '../../src'; +import { compileGraphQLToMapping } from '../../src/index.js'; describe('SDL to Mapping Field Resolvers', () => { it('should correctly handle field resolvers', () => { diff --git a/protographic/tests/sdl-to-mapping/sdl-to-mapping.bench.ts b/protographic/tests/sdl-to-mapping/sdl-to-mapping.bench.ts index 0220d91722..1dc8cc2aee 100644 --- a/protographic/tests/sdl-to-mapping/sdl-to-mapping.bench.ts +++ b/protographic/tests/sdl-to-mapping/sdl-to-mapping.bench.ts @@ -1,6 +1,6 @@ import { bench, describe } from 'vitest'; -import { compileGraphQLToMapping } from '../../src'; import { buildSchema } from 'graphql'; +import { compileGraphQLToMapping } from '../../src/index.js'; // Simple schema for benchmarking const simpleSchema = ` diff --git a/protographic/tests/sdl-to-proto/01-basic-types.test.ts b/protographic/tests/sdl-to-proto/01-basic-types.test.ts index daa2772350..1231a96b46 100644 --- a/protographic/tests/sdl-to-proto/01-basic-types.test.ts +++ b/protographic/tests/sdl-to-proto/01-basic-types.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it, test } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto - Basic Types', () => { test('should convert scalar types correctly', () => { diff --git a/protographic/tests/sdl-to-proto/02-complex-types.test.ts b/protographic/tests/sdl-to-proto/02-complex-types.test.ts index ce7d93f6e8..599b78f746 100644 --- a/protographic/tests/sdl-to-proto/02-complex-types.test.ts +++ b/protographic/tests/sdl-to-proto/02-complex-types.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto - Complex Types', () => { test('should convert enum types correctly', () => { diff --git a/protographic/tests/sdl-to-proto/03-interfaces-unions.test.ts b/protographic/tests/sdl-to-proto/03-interfaces-unions.test.ts index e6f06a0e83..986884b012 100644 --- a/protographic/tests/sdl-to-proto/03-interfaces-unions.test.ts +++ b/protographic/tests/sdl-to-proto/03-interfaces-unions.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto - Interfaces and Unions', () => { test('should convert interfaces correctly', () => { diff --git a/protographic/tests/sdl-to-proto/04-federation.test.ts b/protographic/tests/sdl-to-proto/04-federation.test.ts index 3fd5ffe6e2..70b612f6cc 100644 --- a/protographic/tests/sdl-to-proto/04-federation.test.ts +++ b/protographic/tests/sdl-to-proto/04-federation.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto - Federation and Special Types', () => { test('should handle entity types with @key directive', () => { diff --git a/protographic/tests/sdl-to-proto/05-edge-cases.test.ts b/protographic/tests/sdl-to-proto/05-edge-cases.test.ts index e0b8ec8500..dbd80ddd16 100644 --- a/protographic/tests/sdl-to-proto/05-edge-cases.test.ts +++ b/protographic/tests/sdl-to-proto/05-edge-cases.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto - Edge Cases and Error Handling', () => { test('should handle schema with only scalar fields correctly', () => { diff --git a/protographic/tests/sdl-to-proto/06-field-ordering.test.ts b/protographic/tests/sdl-to-proto/06-field-ordering.test.ts index ad504536d6..d5c8699f28 100644 --- a/protographic/tests/sdl-to-proto/06-field-ordering.test.ts +++ b/protographic/tests/sdl-to-proto/06-field-ordering.test.ts @@ -1,6 +1,7 @@ import { describe, expect, test } from 'vitest'; import { buildSchema } from 'graphql'; -import { GraphQLToProtoTextVisitor } from '../../src/sdl-to-proto-visitor'; +import { isNull } from 'lodash-es'; +import { GraphQLToProtoTextVisitor } from '../../src/sdl-to-proto-visitor.js'; import { getEnumValuesWithNumbers, getFieldNumbersFromMessage, @@ -9,8 +10,7 @@ import { getEnumContent, getServiceMethods, getReservedNumbers, -} from '../util'; -import { isNull } from 'lodash-es'; +} from '../util.js'; describe('Field Ordering and Preservation', () => { describe('Basic Message Field Ordering', () => { @@ -72,9 +72,9 @@ describe('Field Ordering and Preservation', () => { // Verify that each field has the same number in both protos expect(Object.keys(userFields1).length).toBe(3); - expect(userFields1['id']).toBe(userFields2['id']); - expect(userFields1['name']).toBe(userFields2['name']); - expect(userFields1['email']).toBe(userFields2['email']); + expect(userFields1.id).toBe(userFields2.id); + expect(userFields1.name).toBe(userFields2.name); + expect(userFields1.email).toBe(userFields2.email); }); test('should handle adding and removing fields while preserving field numbers', () => { @@ -105,8 +105,8 @@ describe('Field Ordering and Preservation', () => { const productFields1 = getFieldNumbersFromMessage(root1, 'Product'); // Store original field numbers - const idNumber = productFields1['id']; - const priceNumber = productFields1['price']; + const idNumber = productFields1.id; + const priceNumber = productFields1.price; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -142,16 +142,16 @@ describe('Field Ordering and Preservation', () => { const productFields2 = getFieldNumbersFromMessage(root2, 'Product'); // Verify that preserved fields kept the same numbers - expect(productFields2['id']).toBe(idNumber); - expect(productFields2['price']).toBe(priceNumber); + expect(productFields2.id).toBe(idNumber); + expect(productFields2.price).toBe(priceNumber); // Verify removed fields are not present - expect(productFields2['name']).toBeUndefined(); - expect(productFields2['description']).toBeUndefined(); + expect(productFields2.name).toBeUndefined(); + expect(productFields2.description).toBeUndefined(); // Verify new fields have been added - expect(productFields2['category']).toBeDefined(); - expect(productFields2['in_stock']).toBeDefined(); + expect(productFields2.category).toBeDefined(); + expect(productFields2.in_stock).toBeDefined(); }); }); @@ -185,9 +185,9 @@ describe('Field Ordering and Preservation', () => { const postFields1 = getFieldNumbersFromMessage(root1, 'Post'); // Store original field numbers - const idNumber = postFields1['id']; - const titleNumber = postFields1['title']; - const publishedNumber = postFields1['published']; + const idNumber = postFields1.id; + const titleNumber = postFields1.title; + const publishedNumber = postFields1.published; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -222,13 +222,13 @@ describe('Field Ordering and Preservation', () => { const postFields2 = getFieldNumbersFromMessage(root2, 'Post'); // Verify fields were removed - expect(postFields2['content']).toBeUndefined(); - expect(postFields2['tags']).toBeUndefined(); + expect(postFields2.content).toBeUndefined(); + expect(postFields2.tags).toBeUndefined(); // Verify remaining fields kept their numbers - expect(postFields2['id']).toBe(idNumber); - expect(postFields2['title']).toBe(titleNumber); - expect(postFields2['published']).toBe(publishedNumber); + expect(postFields2.id).toBe(idNumber); + expect(postFields2.title).toBe(titleNumber); + expect(postFields2.published).toBe(publishedNumber); // Schema with re-added fields and new fields const modifiedSchema2 = buildSchema(` @@ -260,16 +260,16 @@ describe('Field Ordering and Preservation', () => { const postFields3 = getFieldNumbersFromMessage(root3, 'Post'); // Verify that all fields have assigned numbers - expect(postFields3['id']).toBe(idNumber); - expect(postFields3['title']).toBe(titleNumber); - expect(postFields3['published']).toBe(publishedNumber); + expect(postFields3.id).toBe(idNumber); + expect(postFields3.title).toBe(titleNumber); + expect(postFields3.published).toBe(publishedNumber); // Re-added fields get new numbers in the current implementation - expect(postFields3['content']).toBeDefined(); - expect(postFields3['tags']).toBeDefined(); + expect(postFields3.content).toBeDefined(); + expect(postFields3.tags).toBeDefined(); // Verify new field has been added - expect(postFields3['author']).toBeDefined(); + expect(postFields3.author).toBeDefined(); }); test('should add reserved tag when fields are removed in first operation', () => { @@ -333,8 +333,8 @@ describe('Field Ordering and Preservation', () => { // Get updated lock data and verify it contains reserved numbers const lockData2 = visitor2.getGeneratedLockData(); - expect(lockData2!.messages['User'].reservedNumbers).toBeDefined(); - expect(lockData2!.messages['User'].reservedNumbers!.length).toBeGreaterThan(0); + expect(lockData2!.messages.User.reservedNumbers).toBeDefined(); + expect(lockData2!.messages.User.reservedNumbers!.length).toBeGreaterThan(0); // Now add a field back and add a new field const modifiedSchema2 = buildSchema(` @@ -371,9 +371,9 @@ describe('Field Ordering and Preservation', () => { expect(userContent.reserved.length).toBeGreaterThan(0); // Verify fields exist - expect(userContent.fields['email']).toBeDefined(); - expect(userContent.fields['phone']).toBeDefined(); - expect(userContent.fields['age']).toBeUndefined(); + expect(userContent.fields.email).toBeDefined(); + expect(userContent.fields.phone).toBeDefined(); + expect(userContent.fields.age).toBeUndefined(); }); }); @@ -410,9 +410,9 @@ describe('Field Ordering and Preservation', () => { const enumValues1 = getEnumValuesWithNumbers(root1, 'UserRole'); // Store original enum value numbers - const adminNumber = enumValues1['USER_ROLE_ADMIN']; - const editorNumber = enumValues1['USER_ROLE_EDITOR']; - const viewerNumber = enumValues1['USER_ROLE_VIEWER']; + const adminNumber = enumValues1.USER_ROLE_ADMIN; + const editorNumber = enumValues1.USER_ROLE_EDITOR; + const viewerNumber = enumValues1.USER_ROLE_VIEWER; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -450,9 +450,9 @@ describe('Field Ordering and Preservation', () => { const enumValues2 = getEnumValuesWithNumbers(root2, 'UserRole'); // Verify that enum values kept their numbers - expect(enumValues2['USER_ROLE_ADMIN']).toBe(adminNumber); - expect(enumValues2['USER_ROLE_EDITOR']).toBe(editorNumber); - expect(enumValues2['USER_ROLE_VIEWER']).toBe(viewerNumber); + expect(enumValues2.USER_ROLE_ADMIN).toBe(adminNumber); + expect(enumValues2.USER_ROLE_EDITOR).toBe(editorNumber); + expect(enumValues2.USER_ROLE_VIEWER).toBe(viewerNumber); }); test('should handle adding, removing, and re-adding enum values', () => { @@ -483,8 +483,8 @@ describe('Field Ordering and Preservation', () => { const enumValues1 = getEnumValuesWithNumbers(root1, 'Status'); // Store original enum value numbers - const pendingNumber = enumValues1['STATUS_PENDING']; - const inactiveNumber = enumValues1['STATUS_INACTIVE']; + const pendingNumber = enumValues1.STATUS_PENDING; + const inactiveNumber = enumValues1.STATUS_INACTIVE; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -518,12 +518,12 @@ describe('Field Ordering and Preservation', () => { const enumValues2 = getEnumValuesWithNumbers(root2, 'Status'); // Verify remaining enum values kept their numbers - expect(enumValues2['STATUS_PENDING']).toBe(pendingNumber); - expect(enumValues2['STATUS_INACTIVE']).toBe(inactiveNumber); + expect(enumValues2.STATUS_PENDING).toBe(pendingNumber); + expect(enumValues2.STATUS_INACTIVE).toBe(inactiveNumber); // Verify removed enum values are gone - expect(enumValues2['STATUS_ACTIVE']).toBeUndefined(); - expect(enumValues2['STATUS_DELETED']).toBeUndefined(); + expect(enumValues2.STATUS_ACTIVE).toBeUndefined(); + expect(enumValues2.STATUS_DELETED).toBeUndefined(); // Third schema with re-added values and new values const modifiedSchema2 = buildSchema(` @@ -554,15 +554,15 @@ describe('Field Ordering and Preservation', () => { const enumValues3 = getEnumValuesWithNumbers(root3, 'Status'); // Verify enum values have consistent numbers - expect(enumValues3['STATUS_PENDING']).toBe(pendingNumber); - expect(enumValues3['STATUS_INACTIVE']).toBe(inactiveNumber); + expect(enumValues3.STATUS_PENDING).toBe(pendingNumber); + expect(enumValues3.STATUS_INACTIVE).toBe(inactiveNumber); // Re-added enum values get new numbers in the current implementation - expect(enumValues3['STATUS_ACTIVE']).toBeDefined(); - expect(enumValues3['STATUS_DELETED']).toBeDefined(); + expect(enumValues3.STATUS_ACTIVE).toBeDefined(); + expect(enumValues3.STATUS_DELETED).toBeDefined(); // Verify new enum value has been added - expect(enumValues3['STATUS_ARCHIVED']).toBeDefined(); + expect(enumValues3.STATUS_ARCHIVED).toBeDefined(); }); test('should add reserved tag when enum values are removed', () => { @@ -629,7 +629,7 @@ describe('Field Ordering and Preservation', () => { const lockData2 = visitor2.getGeneratedLockData(); // Verify the lock data contains reserved numbers for the removed enum values - expect(lockData2!.enums['UserRole'].reservedNumbers).toBeDefined(); + expect(lockData2!.enums.UserRole.reservedNumbers).toBeDefined(); // Third schema with one removed value re-added const modifiedSchema2 = buildSchema(` @@ -669,10 +669,10 @@ describe('Field Ordering and Preservation', () => { expect(enumContent.reserved.length).toBeGreaterThan(0); // Verify VIEWER is present in the enum values - expect(enumContent.values['USER_ROLE_VIEWER']).toBeDefined(); + expect(enumContent.values.USER_ROLE_VIEWER).toBeDefined(); // Verify new value exists - expect(enumContent.values['USER_ROLE_MODERATOR']).toBeDefined(); + expect(enumContent.values.USER_ROLE_MODERATOR).toBeDefined(); }); }); @@ -917,14 +917,14 @@ describe('Field Ordering and Preservation', () => { const addressFields1 = getFieldNumbersFromMessage(root1, 'Address'); // Store original field numbers - const userIdNumber = userFields1['id']; - const userNameNumber = userFields1['name']; - const userAddressNumber = userFields1['address']; + const userIdNumber = userFields1.id; + const userNameNumber = userFields1.name; + const userAddressNumber = userFields1.address; - const streetNumber = addressFields1['street']; - const cityNumber = addressFields1['city']; - const stateNumber = addressFields1['state']; - const zipNumber = addressFields1['zip']; + const streetNumber = addressFields1.street; + const cityNumber = addressFields1.city; + const stateNumber = addressFields1.state; + const zipNumber = addressFields1.zip; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -965,15 +965,15 @@ describe('Field Ordering and Preservation', () => { const addressFields2 = getFieldNumbersFromMessage(root2, 'Address'); // Verify that field numbers are preserved in User - expect(userFields2['id']).toBe(userIdNumber); - expect(userFields2['name']).toBe(userNameNumber); - expect(userFields2['address']).toBe(userAddressNumber); + expect(userFields2.id).toBe(userIdNumber); + expect(userFields2.name).toBe(userNameNumber); + expect(userFields2.address).toBe(userAddressNumber); // Verify that field numbers are preserved in Address - expect(addressFields2['street']).toBe(streetNumber); - expect(addressFields2['city']).toBe(cityNumber); - expect(addressFields2['state']).toBe(stateNumber); - expect(addressFields2['zip']).toBe(zipNumber); + expect(addressFields2.street).toBe(streetNumber); + expect(addressFields2.city).toBe(cityNumber); + expect(addressFields2.state).toBe(stateNumber); + expect(addressFields2.zip).toBe(zipNumber); }); test('should handle nested message types with mutations', () => { @@ -1026,27 +1026,27 @@ describe('Field Ordering and Preservation', () => { // Store original field numbers // Create product mutation - const createNameNumber = createProductFields['name']; - const createPriceNumber = createProductFields['price']; - const createDescNumber = createProductFields['description']; + const createNameNumber = createProductFields.name; + const createPriceNumber = createProductFields.price; + const createDescNumber = createProductFields.description; // Update product mutation - const updateIdNumber = updateProductFields['id']; - const updateNameNumber = updateProductFields['name']; - const updatePriceNumber = updateProductFields['price']; + const updateIdNumber = updateProductFields.id; + const updateNameNumber = updateProductFields.name; + const updatePriceNumber = updateProductFields.price; // Filter products mutation - const filterNumber = filterProductsFields['filter']; + const filterNumber = filterProductsFields.filter; // ProductFilter input type - const nameContainsNumber = productFilterFields['name_contains']; - const priceRangeNumber = productFilterFields['price_range']; - const inStockNumber = productFilterFields['in_stock']; + const nameContainsNumber = productFilterFields.name_contains; + const priceRangeNumber = productFilterFields.price_range; + const inStockNumber = productFilterFields.in_stock; // PriceRange input type - const minNumber = priceRangeFields['min']; - const maxNumber = priceRangeFields['max']; - const currencyNumber = priceRangeFields['currency']; + const minNumber = priceRangeFields.min; + const maxNumber = priceRangeFields.max; + const currencyNumber = priceRangeFields.currency; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -1100,28 +1100,28 @@ describe('Field Ordering and Preservation', () => { // Verify mutation field numbers are preserved // Create product - expect(createProductFields2['name']).toBe(createNameNumber); - expect(createProductFields2['price']).toBe(createPriceNumber); - expect(createProductFields2['description']).toBe(createDescNumber); + expect(createProductFields2.name).toBe(createNameNumber); + expect(createProductFields2.price).toBe(createPriceNumber); + expect(createProductFields2.description).toBe(createDescNumber); // Update product - expect(updateProductFields2['id']).toBe(updateIdNumber); - expect(updateProductFields2['name']).toBe(updateNameNumber); - expect(updateProductFields2['price']).toBe(updatePriceNumber); + expect(updateProductFields2.id).toBe(updateIdNumber); + expect(updateProductFields2.name).toBe(updateNameNumber); + expect(updateProductFields2.price).toBe(updatePriceNumber); // Filter products - expect(filterProductsFields2['filter']).toBe(filterNumber); + expect(filterProductsFields2.filter).toBe(filterNumber); // Verify nested input type field numbers are preserved // ProductFilter - expect(productFilterFields2['name_contains']).toBe(nameContainsNumber); - expect(productFilterFields2['price_range']).toBe(priceRangeNumber); - expect(productFilterFields2['in_stock']).toBe(inStockNumber); + expect(productFilterFields2.name_contains).toBe(nameContainsNumber); + expect(productFilterFields2.price_range).toBe(priceRangeNumber); + expect(productFilterFields2.in_stock).toBe(inStockNumber); // PriceRange - expect(priceRangeFields2['min']).toBe(minNumber); - expect(priceRangeFields2['max']).toBe(maxNumber); - expect(priceRangeFields2['currency']).toBe(currencyNumber); + expect(priceRangeFields2.min).toBe(minNumber); + expect(priceRangeFields2.max).toBe(maxNumber); + expect(priceRangeFields2.currency).toBe(currencyNumber); }); }); @@ -1168,14 +1168,14 @@ describe('Field Ordering and Preservation', () => { const userListFields = getFieldNumbersFromMessage(userListType.root, 'List'); // Store original field numbers for wrapper types (outer 'list' field) - const stringWrapperListFieldNumber = listOfStringWrapperFields['list']; - const intWrapperListFieldNumber = listOfIntWrapperFields['list']; - const userWrapperListFieldNumber = listOfUserWrapperFields['list']; + const stringWrapperListFieldNumber = listOfStringWrapperFields.list; + const intWrapperListFieldNumber = listOfIntWrapperFields.list; + const userWrapperListFieldNumber = listOfUserWrapperFields.list; // Store original field numbers for inner List types ('items' field) - const stringListItemsFieldNumber = stringListFields['items']; - const intListItemsFieldNumber = intListFields['items']; - const userListItemsFieldNumber = userListFields['items']; + const stringListItemsFieldNumber = stringListFields.items; + const intListItemsFieldNumber = intListFields.items; + const userListItemsFieldNumber = userListFields.items; // Verify all wrapper types have the 'list' field with field number 1 expect(stringWrapperListFieldNumber).toBe(1); @@ -1192,9 +1192,9 @@ describe('Field Ordering and Preservation', () => { expect(lockData).not.toBeNull(); // Verify wrapper types are NOT in lock data (they're auto-generated with deterministic field numbers) - expect(lockData!.messages['ListOfString']).toBeUndefined(); - expect(lockData!.messages['ListOfInt']).toBeUndefined(); - expect(lockData!.messages['ListOfUser']).toBeUndefined(); + expect(lockData!.messages.ListOfString).toBeUndefined(); + expect(lockData!.messages.ListOfInt).toBeUndefined(); + expect(lockData!.messages.ListOfUser).toBeUndefined(); // Modified schema with additional nullable lists (triggers regeneration) const modifiedSchema = buildSchema(` @@ -1242,18 +1242,18 @@ describe('Field Ordering and Preservation', () => { const floatListFields2 = getFieldNumbersFromMessage(floatListType2.root, 'List'); // Verify wrapper field numbers are preserved (outer 'list' field) - expect(listOfStringWrapperFields2['list']).toBe(stringWrapperListFieldNumber); - expect(listOfIntWrapperFields2['list']).toBe(intWrapperListFieldNumber); - expect(listOfUserWrapperFields2['list']).toBe(userWrapperListFieldNumber); + expect(listOfStringWrapperFields2.list).toBe(stringWrapperListFieldNumber); + expect(listOfIntWrapperFields2.list).toBe(intWrapperListFieldNumber); + expect(listOfUserWrapperFields2.list).toBe(userWrapperListFieldNumber); // Verify inner List field numbers are preserved ('items' field) - expect(stringListFields2['items']).toBe(stringListItemsFieldNumber); - expect(intListFields2['items']).toBe(intListItemsFieldNumber); - expect(userListFields2['items']).toBe(userListItemsFieldNumber); + expect(stringListFields2.items).toBe(stringListItemsFieldNumber); + expect(intListFields2.items).toBe(intListItemsFieldNumber); + expect(userListFields2.items).toBe(userListItemsFieldNumber); // Verify new wrapper types have field number 1 - expect(listOfFloatWrapperFields2['list']).toBe(1); - expect(floatListFields2['items']).toBe(1); + expect(listOfFloatWrapperFields2.list).toBe(1); + expect(floatListFields2.items).toBe(1); }); test('should preserve field numbers for nested list wrapper types', () => { @@ -1287,8 +1287,8 @@ describe('Field Ordering and Preservation', () => { const listOfListOfIntWrapperFields = getFieldNumbersFromMessage(root1, 'ListOfListOfInt'); // For nested wrappers, they should have a 'list' field at the outer level - const nestedStringWrapperListFieldNumber = listOfListOfStringWrapperFields['list']; - const nestedIntWrapperListFieldNumber = listOfListOfIntWrapperFields['list']; + const nestedStringWrapperListFieldNumber = listOfListOfStringWrapperFields.list; + const nestedIntWrapperListFieldNumber = listOfListOfIntWrapperFields.list; // Verify nested wrapper types have the 'list' field with field number 1 expect(nestedStringWrapperListFieldNumber).toBe(1); @@ -1305,10 +1305,10 @@ describe('Field Ordering and Preservation', () => { const stringListFields = getFieldNumbersFromMessage(stringListType.root, 'List'); const intListFields = getFieldNumbersFromMessage(intListType.root, 'List'); - const simpleStringWrapperListFieldNumber = listOfStringWrapperFields['list']; - const simpleIntWrapperListFieldNumber = listOfIntWrapperFields['list']; - const stringListItemsFieldNumber = stringListFields['items']; - const intListItemsFieldNumber = intListFields['items']; + const simpleStringWrapperListFieldNumber = listOfStringWrapperFields.list; + const simpleIntWrapperListFieldNumber = listOfIntWrapperFields.list; + const stringListItemsFieldNumber = stringListFields.items; + const intListItemsFieldNumber = intListFields.items; expect(simpleStringWrapperListFieldNumber).toBe(1); expect(simpleIntWrapperListFieldNumber).toBe(1); @@ -1320,10 +1320,10 @@ describe('Field Ordering and Preservation', () => { expect(lockData).not.toBeNull(); // Verify wrapper types are NOT in lock data (they're auto-generated with deterministic field numbers) - expect(lockData!.messages['ListOfListOfString']).toBeUndefined(); - expect(lockData!.messages['ListOfListOfInt']).toBeUndefined(); - expect(lockData!.messages['ListOfString']).toBeUndefined(); - expect(lockData!.messages['ListOfInt']).toBeUndefined(); + expect(lockData!.messages.ListOfListOfString).toBeUndefined(); + expect(lockData!.messages.ListOfListOfInt).toBeUndefined(); + expect(lockData!.messages.ListOfString).toBeUndefined(); + expect(lockData!.messages.ListOfInt).toBeUndefined(); // Modified schema with additional nested lists const modifiedSchema = buildSchema(` @@ -1358,11 +1358,11 @@ describe('Field Ordering and Preservation', () => { const listOfListOfUserWrapperFields2 = getFieldNumbersFromMessage(root2, 'ListOfListOfUser'); // Verify existing nested wrapper field numbers are preserved - expect(listOfListOfStringWrapperFields2['list']).toBe(nestedStringWrapperListFieldNumber); - expect(listOfListOfIntWrapperFields2['list']).toBe(nestedIntWrapperListFieldNumber); + expect(listOfListOfStringWrapperFields2.list).toBe(nestedStringWrapperListFieldNumber); + expect(listOfListOfIntWrapperFields2.list).toBe(nestedIntWrapperListFieldNumber); // Verify new nested wrapper type has field number 1 - expect(listOfListOfUserWrapperFields2['list']).toBe(1); + expect(listOfListOfUserWrapperFields2.list).toBe(1); // Verify simple wrapper types are still preserved const listOfStringWrapperFields2 = getFieldNumbersFromMessage(root2, 'ListOfString'); @@ -1378,12 +1378,12 @@ describe('Field Ordering and Preservation', () => { const intListFields2 = getFieldNumbersFromMessage(intListType2.root, 'List'); const userListFields2 = getFieldNumbersFromMessage(userListType2.root, 'List'); - expect(listOfStringWrapperFields2['list']).toBe(simpleStringWrapperListFieldNumber); - expect(listOfIntWrapperFields2['list']).toBe(simpleIntWrapperListFieldNumber); - expect(stringListFields2['items']).toBe(stringListItemsFieldNumber); - expect(intListFields2['items']).toBe(intListItemsFieldNumber); - expect(listOfUserWrapperFields2['list']).toBe(1); // New simple wrapper for User - expect(userListFields2['items']).toBe(1); // New simple wrapper inner List for User + expect(listOfStringWrapperFields2.list).toBe(simpleStringWrapperListFieldNumber); + expect(listOfIntWrapperFields2.list).toBe(simpleIntWrapperListFieldNumber); + expect(stringListFields2.items).toBe(stringListItemsFieldNumber); + expect(intListFields2.items).toBe(intListItemsFieldNumber); + expect(listOfUserWrapperFields2.list).toBe(1); // New simple wrapper for User + expect(userListFields2.items).toBe(1); // New simple wrapper inner List for User }); test('should handle mixed simple and nested wrapper types with field preservation', () => { @@ -1428,14 +1428,14 @@ describe('Field Ordering and Preservation', () => { const userListFields = getFieldNumbersFromMessage(userListType.root, 'List'); // Store original field numbers for wrapper types (outer 'list' field) - const simpleStringWrapperListFieldNumber = listOfStringWrapperFields['list']; - const simpleUserWrapperListFieldNumber = listOfUserWrapperFields['list']; - const nestedStringWrapperListFieldNumber = listOfListOfStringWrapperFields['list']; - const nestedUserWrapperListFieldNumber = listOfListOfUserWrapperFields['list']; + const simpleStringWrapperListFieldNumber = listOfStringWrapperFields.list; + const simpleUserWrapperListFieldNumber = listOfUserWrapperFields.list; + const nestedStringWrapperListFieldNumber = listOfListOfStringWrapperFields.list; + const nestedUserWrapperListFieldNumber = listOfListOfUserWrapperFields.list; // Store original field numbers for inner List types ('items' field) - const stringListItemsFieldNumber = stringListFields['items']; - const userListItemsFieldNumber = userListFields['items']; + const stringListItemsFieldNumber = stringListFields.items; + const userListItemsFieldNumber = userListFields.items; // Verify correct field numbers for different wrapper levels expect(simpleStringWrapperListFieldNumber).toBe(1); // Simple wrapper outer 'list' field @@ -1450,10 +1450,10 @@ describe('Field Ordering and Preservation', () => { expect(lockData).not.toBeNull(); // Verify wrapper types are NOT in lock data (they're auto-generated with deterministic field numbers) - expect(lockData!.messages['ListOfString']).toBeUndefined(); - expect(lockData!.messages['ListOfListOfString']).toBeUndefined(); - expect(lockData!.messages['ListOfUser']).toBeUndefined(); - expect(lockData!.messages['ListOfListOfUser']).toBeUndefined(); + expect(lockData!.messages.ListOfString).toBeUndefined(); + expect(lockData!.messages.ListOfListOfString).toBeUndefined(); + expect(lockData!.messages.ListOfUser).toBeUndefined(); + expect(lockData!.messages.ListOfListOfUser).toBeUndefined(); // Modified schema with some lists removed and new ones added const modifiedSchema = buildSchema(` @@ -1501,17 +1501,17 @@ describe('Field Ordering and Preservation', () => { const intListFields2 = getFieldNumbersFromMessage(intListType2.root, 'List'); // Verify wrapper field numbers are preserved (outer 'list' field) - expect(listOfStringWrapperFields2['list']).toBe(simpleStringWrapperListFieldNumber); - expect(listOfUserWrapperFields2['list']).toBe(simpleUserWrapperListFieldNumber); - expect(listOfListOfUserWrapperFields2['list']).toBe(nestedUserWrapperListFieldNumber); + expect(listOfStringWrapperFields2.list).toBe(simpleStringWrapperListFieldNumber); + expect(listOfUserWrapperFields2.list).toBe(simpleUserWrapperListFieldNumber); + expect(listOfListOfUserWrapperFields2.list).toBe(nestedUserWrapperListFieldNumber); // Verify inner List field numbers are preserved ('items' field) - expect(stringListFields2['items']).toBe(stringListItemsFieldNumber); - expect(userListFields2['items']).toBe(userListItemsFieldNumber); + expect(stringListFields2.items).toBe(stringListItemsFieldNumber); + expect(userListFields2.items).toBe(userListItemsFieldNumber); // Verify new wrapper types have field number 1 - expect(listOfIntWrapperFields2['list']).toBe(1); - expect(intListFields2['items']).toBe(1); + expect(listOfIntWrapperFields2.list).toBe(1); + expect(intListFields2.items).toBe(1); // Verify removed wrapper type is not present // Check if the removed wrapper type exists in the proto @@ -1519,7 +1519,7 @@ describe('Field Ordering and Preservation', () => { try { root2.lookupType('ListOfListOfString'); listOfListOfStringExists = true; - } catch (e) { + } catch { // Type doesn't exist, which is expected when the field is removed listOfListOfStringExists = false; } diff --git a/protographic/tests/sdl-to-proto/07-argument-ordering.test.ts b/protographic/tests/sdl-to-proto/07-argument-ordering.test.ts index cc11b5b04c..0038855353 100644 --- a/protographic/tests/sdl-to-proto/07-argument-ordering.test.ts +++ b/protographic/tests/sdl-to-proto/07-argument-ordering.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; import { buildSchema } from 'graphql'; -import { GraphQLToProtoTextVisitor } from '../../src/sdl-to-proto-visitor'; -import { getEnumValuesWithNumbers, getFieldNumbersFromMessage, loadProtoFromText } from '../util'; +import { GraphQLToProtoTextVisitor } from '../../src/sdl-to-proto-visitor.js'; +import { getEnumValuesWithNumbers, getFieldNumbersFromMessage, loadProtoFromText } from '../util.js'; describe('Argument Ordering and Field Numbers', () => { describe('Basic Argument Ordering', () => { @@ -136,17 +136,17 @@ describe('Argument Ordering and Field Numbers', () => { const filterRequestFields2 = getFieldNumbersFromMessage(root2, 'QueryFilterUsersRequest'); // Verify that 'id' field kept its number - expect(filterRequestFields2['id']).toBe(filterRequestFields1['id']); + expect(filterRequestFields2.id).toBe(filterRequestFields1.id); // Verify that 'age' field kept its number - expect(filterRequestFields2['age']).toBe(filterRequestFields1['age']); + expect(filterRequestFields2.age).toBe(filterRequestFields1.age); // Verify that 'name' field is not present anymore - expect(filterRequestFields2['name']).toBeUndefined(); + expect(filterRequestFields2.name).toBeUndefined(); // Verify that the new 'email' field has been added with a higher number const existingNumbers = Object.values(filterRequestFields1); - expect(filterRequestFields2['email']).toBeGreaterThan(Math.max(...existingNumbers)); + expect(filterRequestFields2.email).toBeGreaterThan(Math.max(...existingNumbers)); }); }); @@ -180,9 +180,9 @@ describe('Argument Ordering and Field Numbers', () => { const searchRequestFields1 = getFieldNumbersFromMessage(root1, 'QueryAdvancedSearchRequest'); // Remember original field numbers - const queryNumber = searchRequestFields1['query']; - const limitNumber = searchRequestFields1['limit']; - const offsetNumber = searchRequestFields1['offset']; + const queryNumber = searchRequestFields1.query; + const limitNumber = searchRequestFields1.limit; + const offsetNumber = searchRequestFields1.offset; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -215,11 +215,11 @@ describe('Argument Ordering and Field Numbers', () => { // Parse the proto to verify limit field is removed const root2 = loadProtoFromText(proto2); const searchRequestFields2 = getFieldNumbersFromMessage(root2, 'QueryAdvancedSearchRequest'); - expect(searchRequestFields2['limit']).toBeUndefined(); + expect(searchRequestFields2.limit).toBeUndefined(); // But the existing fields should maintain their numbers - expect(searchRequestFields2['query']).toBe(queryNumber); - expect(searchRequestFields2['offset']).toBe(offsetNumber); + expect(searchRequestFields2.query).toBe(queryNumber); + expect(searchRequestFields2.offset).toBe(offsetNumber); // Third schema with removed argument re-added const modifiedSchema2 = buildSchema(` @@ -251,15 +251,15 @@ describe('Argument Ordering and Field Numbers', () => { const searchRequestFields3 = getFieldNumbersFromMessage(root3, 'QueryAdvancedSearchRequest'); // Verify re-added field gets a new number - expect(searchRequestFields3['limit']).toBeDefined(); + expect(searchRequestFields3.limit).toBeDefined(); // Verify existing fields have the same numbers - expect(searchRequestFields3['query']).toBe(queryNumber); - expect(searchRequestFields3['offset']).toBe(offsetNumber); + expect(searchRequestFields3.query).toBe(queryNumber); + expect(searchRequestFields3.offset).toBe(offsetNumber); // Verify new field has a higher number than any existing field const maxNumber = Math.max(queryNumber, offsetNumber); - expect(searchRequestFields3['filter_by']).toBeGreaterThan(maxNumber); + expect(searchRequestFields3.filter_by).toBeGreaterThan(maxNumber); }); test('should verify field numbers are preserved when fields are removed and reserved tags are added', () => { @@ -294,11 +294,11 @@ describe('Argument Ordering and Field Numbers', () => { const findRequestFields1 = getFieldNumbersFromMessage(root1, 'QueryFindUsersRequest'); // Remember original field numbers - const idNumber = findRequestFields1['id']; - const nameNumber = findRequestFields1['name']; - const ageNumber = findRequestFields1['age']; - const emailNumber = findRequestFields1['email']; - const activeNumber = findRequestFields1['active']; + const idNumber = findRequestFields1.id; + const nameNumber = findRequestFields1.name; + const ageNumber = findRequestFields1.age; + const emailNumber = findRequestFields1.email; + const activeNumber = findRequestFields1.active; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -337,17 +337,17 @@ describe('Argument Ordering and Field Numbers', () => { const findRequestFields2 = getFieldNumbersFromMessage(root2, 'QueryFindUsersRequest'); // Preserved fields should maintain their numbers despite reordering - expect(findRequestFields2['name']).toBe(nameNumber); - expect(findRequestFields2['active']).toBe(activeNumber); + expect(findRequestFields2.name).toBe(nameNumber); + expect(findRequestFields2.active).toBe(activeNumber); // Removed fields should not be present - expect(findRequestFields2['id']).toBeUndefined(); - expect(findRequestFields2['age']).toBeUndefined(); - expect(findRequestFields2['email']).toBeUndefined(); + expect(findRequestFields2.id).toBeUndefined(); + expect(findRequestFields2.age).toBeUndefined(); + expect(findRequestFields2.email).toBeUndefined(); // New field should have a higher number than any existing field const maxNumber = Math.max(idNumber, nameNumber, ageNumber, emailNumber, activeNumber); - expect(findRequestFields2['status']).toBeGreaterThan(maxNumber); + expect(findRequestFields2.status).toBeGreaterThan(maxNumber); // Check for reserved tag in the proto text expect(proto2).toContain('reserved'); @@ -386,11 +386,11 @@ describe('Argument Ordering and Field Numbers', () => { const findRequestFields3 = getFieldNumbersFromMessage(root3, 'QueryFindUsersRequest'); // Check that existing fields still maintain their numbers - expect(findRequestFields3['name']).toBe(nameNumber); - expect(findRequestFields3['active']).toBe(activeNumber); + expect(findRequestFields3.name).toBe(nameNumber); + expect(findRequestFields3.active).toBe(activeNumber); // The status field from the second version should still have its number - expect(findRequestFields3['status']).toBe(findRequestFields2['status']); + expect(findRequestFields3.status).toBe(findRequestFields2.status); }); }); @@ -428,10 +428,10 @@ describe('Argument Ordering and Field Numbers', () => { const filterOptionsFields1 = getFieldNumbersFromMessage(root1, 'FilterOptions'); // Remember original field numbers - const filterNumber = searchRequestFields1['filter']; - const minPriceNumber = filterOptionsFields1['min_price']; - const maxPriceNumber = filterOptionsFields1['max_price']; - const categoryNumber = filterOptionsFields1['category']; + const filterNumber = searchRequestFields1.filter; + const minPriceNumber = filterOptionsFields1.min_price; + const maxPriceNumber = filterOptionsFields1.max_price; + const categoryNumber = filterOptionsFields1.category; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -471,18 +471,18 @@ describe('Argument Ordering and Field Numbers', () => { const filterOptionsFields2 = getFieldNumbersFromMessage(root2, 'FilterOptions'); // Verify argument field number is preserved in request - expect(searchRequestFields2['filter']).toBe(filterNumber); + expect(searchRequestFields2.filter).toBe(filterNumber); // Verify input object field numbers are preserved - expect(filterOptionsFields2['max_price']).toBe(maxPriceNumber); - expect(filterOptionsFields2['category']).toBe(categoryNumber); + expect(filterOptionsFields2.max_price).toBe(maxPriceNumber); + expect(filterOptionsFields2.category).toBe(categoryNumber); // Verify removed field is gone - expect(filterOptionsFields2['min_price']).toBeUndefined(); + expect(filterOptionsFields2.min_price).toBeUndefined(); // Verify new field has a higher number than existing fields const maxFieldNumber = Math.max(maxPriceNumber, categoryNumber); - expect(filterOptionsFields2['in_stock']).toBeGreaterThan(maxFieldNumber); + expect(filterOptionsFields2.in_stock).toBeGreaterThan(maxFieldNumber); }); test('should handle nested input object arguments', () => { @@ -530,14 +530,14 @@ describe('Argument Ordering and Field Numbers', () => { const sortOptionsFields1 = getFieldNumbersFromMessage(root1, 'SortOptions'); // Remember original field numbers - const optionsNumber = searchRequestFields1['options']; - const queryNumber = searchOptionsFields1['query']; - const paginationNumber = searchOptionsFields1['pagination']; - const sortNumber = searchOptionsFields1['sort']; - const pageNumber = paginationOptionsFields1['page']; - const perPageNumber = paginationOptionsFields1['per_page']; - const fieldNumber = sortOptionsFields1['field']; - const directionNumber = sortOptionsFields1['direction']; + const optionsNumber = searchRequestFields1.options; + const queryNumber = searchOptionsFields1.query; + const paginationNumber = searchOptionsFields1.pagination; + const sortNumber = searchOptionsFields1.sort; + const pageNumber = paginationOptionsFields1.page; + const perPageNumber = paginationOptionsFields1.per_page; + const fieldNumber = sortOptionsFields1.field; + const directionNumber = sortOptionsFields1.direction; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -592,23 +592,23 @@ describe('Argument Ordering and Field Numbers', () => { // Verify all field numbers are preserved at each level // 1. Top-level request - expect(searchRequestFields2['options']).toBe(optionsNumber); + expect(searchRequestFields2.options).toBe(optionsNumber); // 2. SearchOptions - expect(searchOptionsFields2['query']).toBe(queryNumber); - expect(searchOptionsFields2['pagination']).toBe(paginationNumber); - expect(searchOptionsFields2['sort']).toBe(sortNumber); - expect(searchOptionsFields2['filters']).toBeGreaterThan(Math.max(queryNumber, paginationNumber, sortNumber)); + expect(searchOptionsFields2.query).toBe(queryNumber); + expect(searchOptionsFields2.pagination).toBe(paginationNumber); + expect(searchOptionsFields2.sort).toBe(sortNumber); + expect(searchOptionsFields2.filters).toBeGreaterThan(Math.max(queryNumber, paginationNumber, sortNumber)); // 3. PaginationOptions - expect(paginationOptionsFields2['page']).toBe(pageNumber); - expect(paginationOptionsFields2['per_page']).toBe(perPageNumber); - expect(paginationOptionsFields2['offset']).toBeGreaterThan(Math.max(pageNumber, perPageNumber)); + expect(paginationOptionsFields2.page).toBe(pageNumber); + expect(paginationOptionsFields2.per_page).toBe(perPageNumber); + expect(paginationOptionsFields2.offset).toBeGreaterThan(Math.max(pageNumber, perPageNumber)); // 4. SortOptions - expect(sortOptionsFields2['field']).toBeUndefined(); // Removed field - expect(sortOptionsFields2['direction']).toBe(directionNumber); - expect(sortOptionsFields2['order']).toBeGreaterThan(directionNumber); + expect(sortOptionsFields2.field).toBeUndefined(); // Removed field + expect(sortOptionsFields2.direction).toBe(directionNumber); + expect(sortOptionsFields2.order).toBeGreaterThan(directionNumber); }); }); @@ -645,9 +645,9 @@ describe('Argument Ordering and Field Numbers', () => { const enumValues1 = getEnumValuesWithNumbers(root1, 'SortDirection'); // Remember original enum values numbers - const ascNumber = enumValues1['SORT_DIRECTION_ASC']; - const descNumber = enumValues1['SORT_DIRECTION_DESC']; - const neutralNumber = enumValues1['SORT_DIRECTION_NEUTRAL']; + const ascNumber = enumValues1.SORT_DIRECTION_ASC; + const descNumber = enumValues1.SORT_DIRECTION_DESC; + const neutralNumber = enumValues1.SORT_DIRECTION_NEUTRAL; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -685,17 +685,17 @@ describe('Argument Ordering and Field Numbers', () => { const enumValues2 = getEnumValuesWithNumbers(root2, 'SortDirection'); // Verify that existing enum values keep their numbers - expect(enumValues2['SORT_DIRECTION_ASC']).toBe(ascNumber); - expect(enumValues2['SORT_DIRECTION_DESC']).toBe(descNumber); + expect(enumValues2.SORT_DIRECTION_ASC).toBe(ascNumber); + expect(enumValues2.SORT_DIRECTION_DESC).toBe(descNumber); // Verify that the deleted enum value is not present - expect(enumValues2['SORT_DIRECTION_NEUTRAL']).toBeUndefined(); + expect(enumValues2.SORT_DIRECTION_NEUTRAL).toBeUndefined(); // Get updated lock data with the NEUTRAL value removed const lockData2 = visitor2.getGeneratedLockData(); // Verify that NEUTRAL's number is now in the reserved list - expect(lockData2!.enums['SortDirection'].reservedNumbers).toContain(neutralNumber); + expect(lockData2!.enums.SortDirection.reservedNumbers).toContain(neutralNumber); // Third schema with removed value re-added and a new value added const modifiedSchema2 = buildSchema(` @@ -730,17 +730,17 @@ describe('Argument Ordering and Field Numbers', () => { const enumValues3 = getEnumValuesWithNumbers(root3, 'SortDirection'); // Verify that all original enum values keep their numbers - expect(enumValues3['SORT_DIRECTION_ASC']).toBe(ascNumber); - expect(enumValues3['SORT_DIRECTION_DESC']).toBe(descNumber); + expect(enumValues3.SORT_DIRECTION_ASC).toBe(ascNumber); + expect(enumValues3.SORT_DIRECTION_DESC).toBe(descNumber); // The NEUTRAL value gets a new number since the original enum value was actually removed // from the lock data, not just marked as reserved - const neutralValue = enumValues3['SORT_DIRECTION_NEUTRAL']; + const neutralValue = enumValues3.SORT_DIRECTION_NEUTRAL; expect(neutralValue).toBeGreaterThan(Math.max(ascNumber, descNumber)); // Verify that new enum value has a higher number than all others const maxEnumNumber = Math.max(ascNumber, descNumber, neutralValue); - expect(enumValues3['SORT_DIRECTION_RANDOM']).toBeGreaterThan(maxEnumNumber); + expect(enumValues3.SORT_DIRECTION_RANDOM).toBeGreaterThan(maxEnumNumber); }); }); @@ -779,10 +779,10 @@ describe('Argument Ordering and Field Numbers', () => { const userInputFields1 = getFieldNumbersFromMessage(root1, 'UserInput'); // Remember original field numbers - const inputNumber = mutationFields1['input']; - const nameNumber = userInputFields1['name']; - const emailNumber = userInputFields1['email']; - const ageNumber = userInputFields1['age']; + const inputNumber = mutationFields1.input; + const nameNumber = userInputFields1.name; + const emailNumber = userInputFields1.email; + const ageNumber = userInputFields1.age; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -823,16 +823,16 @@ describe('Argument Ordering and Field Numbers', () => { const userInputFields2 = getFieldNumbersFromMessage(root2, 'UserInput'); // Verify that field numbers are preserved - expect(mutationFields2['input']).toBe(inputNumber); - expect(userInputFields2['name']).toBe(nameNumber); - expect(userInputFields2['email']).toBe(emailNumber); + expect(mutationFields2.input).toBe(inputNumber); + expect(userInputFields2.name).toBe(nameNumber); + expect(userInputFields2.email).toBe(emailNumber); // Verify that the removed field is not present - expect(userInputFields2['age']).toBeUndefined(); + expect(userInputFields2.age).toBeUndefined(); // Verify that the new field has a higher number const maxFieldNumber = Math.max(nameNumber, emailNumber, ageNumber || 0); - expect(userInputFields2['active']).toBeGreaterThan(maxFieldNumber); + expect(userInputFields2.active).toBeGreaterThan(maxFieldNumber); }); test('should handle multiple mutations with different argument sets', () => { @@ -876,15 +876,15 @@ describe('Argument Ordering and Field Numbers', () => { const updateInputFields1 = getFieldNumbersFromMessage(root1, 'UpdateUserInput'); // Remember original field numbers - const createInputNumber = createFields1['input']; - const updateInputNumber = updateFields1['input']; + const createInputNumber = createFields1.input; + const updateInputNumber = updateFields1.input; - const createNameNumber = createInputFields1['name']; - const createEmailNumber = createInputFields1['email']; + const createNameNumber = createInputFields1.name; + const createEmailNumber = createInputFields1.email; - const updateIdNumber = updateInputFields1['id']; - const updateNameNumber = updateInputFields1['name']; - const updateEmailNumber = updateInputFields1['email']; + const updateIdNumber = updateInputFields1.id; + const updateNameNumber = updateInputFields1.name; + const updateEmailNumber = updateInputFields1.email; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -935,22 +935,22 @@ describe('Argument Ordering and Field Numbers', () => { const updateInputFields2 = getFieldNumbersFromMessage(root2, 'UpdateUserInput'); // Verify that all field numbers are preserved at top level - expect(createFields2['input']).toBe(createInputNumber); - expect(updateFields2['input']).toBe(updateInputNumber); + expect(createFields2.input).toBe(createInputNumber); + expect(updateFields2.input).toBe(updateInputNumber); // Verify that field numbers in CreateUserInput are preserved - expect(createInputFields2['name']).toBe(createNameNumber); - expect(createInputFields2['email']).toBe(createEmailNumber); - expect(createInputFields2['role']).toBeGreaterThan(Math.max(createNameNumber, createEmailNumber)); + expect(createInputFields2.name).toBe(createNameNumber); + expect(createInputFields2.email).toBe(createEmailNumber); + expect(createInputFields2.role).toBeGreaterThan(Math.max(createNameNumber, createEmailNumber)); // Verify that field numbers in UpdateUserInput are preserved - expect(updateInputFields2['id']).toBe(updateIdNumber); - expect(updateInputFields2['name']).toBeUndefined(); // removed - expect(updateInputFields2['email']).toBe(updateEmailNumber); - expect(updateInputFields2['active']).toBeGreaterThan(Math.max(updateIdNumber, updateEmailNumber)); + expect(updateInputFields2.id).toBe(updateIdNumber); + expect(updateInputFields2.name).toBeUndefined(); // removed + expect(updateInputFields2.email).toBe(updateEmailNumber); + expect(updateInputFields2.active).toBeGreaterThan(Math.max(updateIdNumber, updateEmailNumber)); // Verify new mutation has a field - expect(deleteFields['id']).toBeDefined(); + expect(deleteFields.id).toBeDefined(); }); }); @@ -1011,23 +1011,23 @@ describe('Argument Ordering and Field Numbers', () => { const sortOptionsFields1 = getFieldNumbersFromMessage(root1, 'SortOptions'); // Remember top-level argument field numbers - const filterNumber = searchRequestFields1['filter']; - const paginationNumber = searchRequestFields1['pagination']; - const sortNumber = searchRequestFields1['sort']; + const filterNumber = searchRequestFields1.filter; + const paginationNumber = searchRequestFields1.pagination; + const sortNumber = searchRequestFields1.sort; // Remember original field numbers for all input types - const categoryNumber = filterOptionsFields1['category']; - const minPriceNumber = filterOptionsFields1['min_price']; - const maxPriceNumber = filterOptionsFields1['max_price']; - const inStockNumber = filterOptionsFields1['in_stock']; + const categoryNumber = filterOptionsFields1.category; + const minPriceNumber = filterOptionsFields1.min_price; + const maxPriceNumber = filterOptionsFields1.max_price; + const inStockNumber = filterOptionsFields1.in_stock; - const pageNumber = paginationOptionsFields1['page']; - const perPageNumber = paginationOptionsFields1['per_page']; - const offsetNumber = paginationOptionsFields1['offset']; + const pageNumber = paginationOptionsFields1.page; + const perPageNumber = paginationOptionsFields1.per_page; + const offsetNumber = paginationOptionsFields1.offset; - const fieldNumber = sortOptionsFields1['field']; - const directionNumber = sortOptionsFields1['direction']; - const priorityNumber = sortOptionsFields1['priority']; + const fieldNumber = sortOptionsFields1.field; + const directionNumber = sortOptionsFields1.direction; + const priorityNumber = sortOptionsFields1.priority; // Get the generated lock data const lockData = visitor1.getGeneratedLockData(); @@ -1099,47 +1099,47 @@ describe('Argument Ordering and Field Numbers', () => { const sortOptionsFields2 = getFieldNumbersFromMessage(root2, 'SortOptions'); // Verify that top-level argument field numbers are preserved despite reordering - expect(searchRequestFields2['filter']).toBe(filterNumber); - expect(searchRequestFields2['pagination']).toBe(paginationNumber); - expect(searchRequestFields2['sort']).toBe(sortNumber); + expect(searchRequestFields2.filter).toBe(filterNumber); + expect(searchRequestFields2.pagination).toBe(paginationNumber); + expect(searchRequestFields2.sort).toBe(sortNumber); // Verify that new top-level argument gets a higher number const maxTopLevelNumber = Math.max(filterNumber, paginationNumber, sortNumber); - expect(searchRequestFields2['additional_filter']).toBeGreaterThan(maxTopLevelNumber); + expect(searchRequestFields2.additional_filter).toBeGreaterThan(maxTopLevelNumber); // Verify FilterOptions field numbers - expect(filterOptionsFields2['category']).toBe(categoryNumber); - expect(filterOptionsFields2['max_price']).toBe(maxPriceNumber); - expect(filterOptionsFields2['min_price']).toBeUndefined(); // Removed - expect(filterOptionsFields2['in_stock']).toBeUndefined(); // Removed + expect(filterOptionsFields2.category).toBe(categoryNumber); + expect(filterOptionsFields2.max_price).toBe(maxPriceNumber); + expect(filterOptionsFields2.min_price).toBeUndefined(); // Removed + expect(filterOptionsFields2.in_stock).toBeUndefined(); // Removed // New field should have higher number const maxFilterNumber = Math.max(categoryNumber, maxPriceNumber, minPriceNumber, inStockNumber); - expect(filterOptionsFields2['brand']).toBeGreaterThan(maxFilterNumber); + expect(filterOptionsFields2.brand).toBeGreaterThan(maxFilterNumber); // Moved field should have a new field number in the new input type - expect(filterOptionsFields2['priority']).toBeGreaterThan(maxFilterNumber); + expect(filterOptionsFields2.priority).toBeGreaterThan(maxFilterNumber); // Verify PaginationOptions field numbers - expect(paginationOptionsFields2['page']).toBe(pageNumber); - expect(paginationOptionsFields2['per_page']).toBe(perPageNumber); - expect(paginationOptionsFields2['offset']).toBeUndefined(); // Removed + expect(paginationOptionsFields2.page).toBe(pageNumber); + expect(paginationOptionsFields2.per_page).toBe(perPageNumber); + expect(paginationOptionsFields2.offset).toBeUndefined(); // Removed // New field should have higher number const maxPaginationNumber = Math.max(pageNumber, perPageNumber, offsetNumber); - expect(paginationOptionsFields2['total_count']).toBeGreaterThan(maxPaginationNumber); + expect(paginationOptionsFields2.total_count).toBeGreaterThan(maxPaginationNumber); // Verify SortOptions field numbers - expect(sortOptionsFields2['direction']).toBe(directionNumber); - expect(sortOptionsFields2['field']).toBeUndefined(); // Removed - expect(sortOptionsFields2['priority']).toBeUndefined(); // Moved + expect(sortOptionsFields2.direction).toBe(directionNumber); + expect(sortOptionsFields2.field).toBeUndefined(); // Removed + expect(sortOptionsFields2.priority).toBeUndefined(); // Moved // New field should have higher number const maxSortNumber = Math.max(fieldNumber, directionNumber, priorityNumber); - expect(sortOptionsFields2['ascending']).toBeGreaterThan(maxSortNumber); + expect(sortOptionsFields2.ascending).toBeGreaterThan(maxSortNumber); // Moved field should have a new field number in the new input type - expect(sortOptionsFields2['in_stock']).toBeGreaterThan(maxSortNumber); + expect(sortOptionsFields2.in_stock).toBeGreaterThan(maxSortNumber); }); }); }); diff --git a/protographic/tests/sdl-to-proto/08-proto-lock-manager.test.ts b/protographic/tests/sdl-to-proto/08-proto-lock-manager.test.ts index 4398400df3..069f8e035c 100644 --- a/protographic/tests/sdl-to-proto/08-proto-lock-manager.test.ts +++ b/protographic/tests/sdl-to-proto/08-proto-lock-manager.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { ProtoLockManager } from '../../src/proto-lock'; -import { compileGraphQLToProto } from '../../src'; +import { ProtoLockManager } from '../../src/proto-lock.js'; +import { compileGraphQLToProto } from '../../src/index.js'; describe('ProtoLockManager', () => { test('should correctly initialize lock data with ordered fields', () => { diff --git a/protographic/tests/sdl-to-proto/09-comments.test.ts b/protographic/tests/sdl-to-proto/09-comments.test.ts index b6323d1e28..281b0cafa0 100644 --- a/protographic/tests/sdl-to-proto/09-comments.test.ts +++ b/protographic/tests/sdl-to-proto/09-comments.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto Comments', () => { it('should convert GraphQL type descriptions to Proto comments', () => { diff --git a/protographic/tests/sdl-to-proto/10-options.test.ts b/protographic/tests/sdl-to-proto/10-options.test.ts index 351fee90a7..ba77133848 100644 --- a/protographic/tests/sdl-to-proto/10-options.test.ts +++ b/protographic/tests/sdl-to-proto/10-options.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto Options', () => { const simpleSDL = ` diff --git a/protographic/tests/sdl-to-proto/11-lists.test.ts b/protographic/tests/sdl-to-proto/11-lists.test.ts index a6741fca19..1222ab27b3 100644 --- a/protographic/tests/sdl-to-proto/11-lists.test.ts +++ b/protographic/tests/sdl-to-proto/11-lists.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto Lists', () => { it('should correctly generate protobuf for types with a single non nullable list', () => { diff --git a/protographic/tests/sdl-to-proto/12-directive.test.ts b/protographic/tests/sdl-to-proto/12-directive.test.ts index bc9ce72f26..0abd480c61 100644 --- a/protographic/tests/sdl-to-proto/12-directive.test.ts +++ b/protographic/tests/sdl-to-proto/12-directive.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto Directive', () => { it('should correctly include a deprecation field option on a field', () => { diff --git a/protographic/tests/sdl-to-proto/13-field-arguments.test.ts b/protographic/tests/sdl-to-proto/13-field-arguments.test.ts index 5a00ecf0cb..d7932ec087 100644 --- a/protographic/tests/sdl-to-proto/13-field-arguments.test.ts +++ b/protographic/tests/sdl-to-proto/13-field-arguments.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; -import { expectValidProto } from '../util'; +import { compileGraphQLToProto } from '../../src/index.js'; +import { expectValidProto } from '../util.js'; describe('SDL to Proto Field Arguments', () => { it('should correctly include field arguments', () => { diff --git a/protographic/tests/sdl-to-proto/sdl-to-proto.bench.ts b/protographic/tests/sdl-to-proto/sdl-to-proto.bench.ts index 622c8cad9b..2c501349b4 100644 --- a/protographic/tests/sdl-to-proto/sdl-to-proto.bench.ts +++ b/protographic/tests/sdl-to-proto/sdl-to-proto.bench.ts @@ -1,6 +1,6 @@ import { bench, describe } from 'vitest'; -import { compileGraphQLToProto } from '../../src'; import { buildSchema } from 'graphql'; +import { compileGraphQLToProto } from '../../src/index.js'; // Simple schema for benchmarking const simpleSchema = ` diff --git a/protographic/tests/sdl-validation/01-basic-validation.test.ts b/protographic/tests/sdl-validation/01-basic-validation.test.ts index 81bb465096..2db5b78139 100644 --- a/protographic/tests/sdl-validation/01-basic-validation.test.ts +++ b/protographic/tests/sdl-validation/01-basic-validation.test.ts @@ -1,6 +1,6 @@ import { buildSchema } from 'graphql'; import { describe, expect, test } from 'vitest'; -import { SDLValidationVisitor } from '../../src/sdl-validation-visitor'; +import { SDLValidationVisitor } from '../../src/sdl-validation-visitor.js'; describe('SDL Validation', () => { test('should validate a basic schema', () => { diff --git a/protographic/tests/util.ts b/protographic/tests/util.ts index 64dde73ad2..bf7e597f42 100644 --- a/protographic/tests/util.ts +++ b/protographic/tests/util.ts @@ -59,7 +59,7 @@ export function getFieldNumbersFromMessage(root: protobufjs.Root, messagePath: s } return fieldNumbers; - } catch (error) { + } catch { // Provide helpful error message with available types const availableTypes = getAllNestedTypeNames(root); throw new Error(`Could not find message "${messagePath}". ` + `Available types: ${availableTypes.join(', ')}`); @@ -72,7 +72,7 @@ export function getFieldNumbersFromMessage(root: protobufjs.Root, messagePath: s function getAllNestedTypeNames(root: protobufjs.Root): string[] { const names: string[] = []; - function collectNames(obj: protobufjs.ReflectionObject, prefix: string = '') { + function collectNames(obj: protobufjs.ReflectionObject, prefix = '') { if ('nested' in obj && obj.nested) { for (const [name, nested] of Object.entries(obj.nested)) { const fullName = prefix ? `${prefix}.${name}` : name; From c8b3469dbcd641d0d92e05b8146b48d7c5f7e850 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 17:30:45 +0100 Subject: [PATCH 25/32] chore: more lint updates --- .../src/abstract-selection-rewriter.ts | 24 +++++-- .../src/operations/field-numbering.ts | 12 +++- .../src/operations/message-builder.ts | 68 +++++++++---------- .../src/operations/proto-text-generator.ts | 24 ++++--- .../src/operations/request-builder.ts | 8 ++- protographic/src/proto-utils.ts | 31 ++++----- protographic/src/required-fields-visitor.ts | 52 ++++++++++---- protographic/src/sdl-to-proto-visitor.ts | 56 +++++++++++---- protographic/src/sdl-validation-visitor.ts | 38 ++++++++--- .../src/selection-set-validation-visitor.ts | 12 +++- 10 files changed, 216 insertions(+), 109 deletions(-) diff --git a/protographic/src/abstract-selection-rewriter.ts b/protographic/src/abstract-selection-rewriter.ts index fc39f90f97..73413aeace 100644 --- a/protographic/src/abstract-selection-rewriter.ts +++ b/protographic/src/abstract-selection-rewriter.ts @@ -108,11 +108,17 @@ export class AbstractSelectionRewriter { * @param ctx - The visitor context containing the current node and its position in the AST */ private onEnterSelectionSet(ctx: VisitContext): void { - if (!ctx.parent) { return; } - if (!this.isFieldNode(ctx.parent)) { return; } + if (!ctx.parent) { + return; + } + if (!this.isFieldNode(ctx.parent)) { + return; + } const currentType = this.findNamedTypeForField(ctx.parent.name.value); - if (!currentType) { return; } + if (!currentType) { + return; + } // Only process selection sets for interface types if (!isInterfaceType(currentType)) { @@ -122,7 +128,9 @@ export class AbstractSelectionRewriter { const fields = ctx.node.selections.filter((s) => s.kind === Kind.FIELD); const inlineFragments = ctx.node.selections.filter((s) => s.kind === Kind.INLINE_FRAGMENT); - if (fields.length === 0) { return; } + if (fields.length === 0) { + return; + } // Remove the interface-level fields from the selection set, keeping only inline fragments ctx.node.selections = [...inlineFragments]; @@ -162,7 +170,9 @@ export class AbstractSelectionRewriter { * @returns true if the node is a FieldNode, false otherwise */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { - if (Array.isArray(node)) { return false; } + if (Array.isArray(node)) { + return false; + } return (node as ASTNode).kind === Kind.FIELD; } @@ -188,7 +198,9 @@ export class AbstractSelectionRewriter { private findNamedTypeForField(fieldName: string): GraphQLType | undefined { const fields = this.currentType.getFields(); const field = fields[fieldName]; - if (!field) { return undefined; } + if (!field) { + return undefined; + } return getNamedType(field.type); } diff --git a/protographic/src/operations/field-numbering.ts b/protographic/src/operations/field-numbering.ts index 1186fc9bbb..5a2e81cfb2 100644 --- a/protographic/src/operations/field-numbering.ts +++ b/protographic/src/operations/field-numbering.ts @@ -215,14 +215,20 @@ export function assignFieldNumbersFromLockData( fieldNumberManager?: FieldNumberManager, ): void { const lockData = fieldNumberManager?.getLockManager()?.getLockData(); - if (!lockData || !fieldNumberManager) { return; } + if (!lockData || !fieldNumberManager) { + return; + } const messageData = lockData.messages[messageName]; - if (!messageData) { return; } + if (!messageData) { + return; + } for (const protoFieldName of fieldNames) { const fieldNumber = messageData.fields[protoFieldName]; - if (!fieldNumber) { continue; } + if (!fieldNumber) { + continue; + } fieldNumberManager.assignFieldNumber(messageName, protoFieldName, fieldNumber); } diff --git a/protographic/src/operations/message-builder.ts b/protographic/src/operations/message-builder.ts index 8fdab80b8a..e133f9492b 100644 --- a/protographic/src/operations/message-builder.ts +++ b/protographic/src/operations/message-builder.ts @@ -449,23 +449,23 @@ function processInlineFragment( if (fragment.selectionSet) { for (const selection of fragment.selectionSet.selections) { switch (selection.kind) { - case 'Field': { - processFieldSelection(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); - - break; - } - case 'InlineFragment': { - // Nested inline fragment - processInlineFragment(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); - - break; - } - case 'FragmentSpread': { - processFragmentSpread(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); - - break; - } - // No default + case 'Field': { + processFieldSelection(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + case 'InlineFragment': { + // Nested inline fragment + processInlineFragment(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + case 'FragmentSpread': { + processFragmentSpread(selection, message, fragmentType, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + // No default } } } @@ -516,23 +516,23 @@ function processFragmentSpread( // Process the fragment's selection set with the resolved type for (const selection of fragmentDef.selectionSet.selections) { switch (selection.kind) { - case 'Field': { - processFieldSelection(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); - - break; - } - case 'InlineFragment': { - processInlineFragment(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); - - break; - } - case 'FragmentSpread': { - // Nested fragment spread (fragment inside fragment) - processFragmentSpread(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); - - break; - } - // No default + case 'Field': { + processFieldSelection(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + case 'InlineFragment': { + processInlineFragment(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + case 'FragmentSpread': { + // Nested fragment spread (fragment inside fragment) + processFragmentSpread(selection, message, type, typeInfo, options, fieldNumberManager, messagePath); + + break; + } + // No default } } } diff --git a/protographic/src/operations/proto-text-generator.ts b/protographic/src/operations/proto-text-generator.ts index 4230deb98c..aa9d07a1f2 100644 --- a/protographic/src/operations/proto-text-generator.ts +++ b/protographic/src/operations/proto-text-generator.ts @@ -109,7 +109,9 @@ function generateHeader(root: protobuf.Root, options?: ProtoTextOptions): string // Add custom imports if (options?.imports) { - for (const imp of options.imports) { imports.add(imp); } + for (const imp of options.imports) { + imports.add(imp); + } } for (const imp of [...imports].sort()) { @@ -372,7 +374,9 @@ export function formatReserved(reserved: Array, indent = 1): * Handles both individual numbers and ranges (e.g., "2, 5 to 10, 15") */ function formatReservedNumbers(numbers: number[]): string { - if (numbers.length === 0) { return ''; } + if (numbers.length === 0) { + return ''; + } // Sort and deduplicate numbers const sortedNumbers = [...new Set(numbers)].sort((a, b) => a - b); @@ -416,8 +420,8 @@ function formatReservedNumbers(numbers: number[]): string { function detectWrapperTypeUsage(root: protobuf.Root): boolean { for (const nested of root.nestedArray) { if (nested instanceof protobuf.Type && messageUsesWrapperTypes(nested)) { - return true; - } + return true; + } } return false; } @@ -436,8 +440,8 @@ function messageUsesWrapperTypes(message: protobuf.Type): boolean { // Check nested messages recursively for (const nested of message.nestedArray) { if (nested instanceof protobuf.Type && messageUsesWrapperTypes(nested)) { - return true; - } + return true; + } } return false; @@ -449,8 +453,8 @@ function messageUsesWrapperTypes(message: protobuf.Type): boolean { function detectGraphQLVariableNameUsage(root: protobuf.Root): boolean { for (const nested of root.nestedArray) { if (nested instanceof protobuf.Type && messageUsesGraphQLVariableName(nested)) { - return true; - } + return true; + } } return false; } @@ -469,8 +473,8 @@ function messageUsesGraphQLVariableName(message: protobuf.Type): boolean { // Check nested messages recursively for (const nested of message.nestedArray) { if (nested instanceof protobuf.Type && messageUsesGraphQLVariableName(nested)) { - return true; - } + return true; + } } return false; diff --git a/protographic/src/operations/request-builder.ts b/protographic/src/operations/request-builder.ts index dc629e9f07..238eac870e 100644 --- a/protographic/src/operations/request-builder.ts +++ b/protographic/src/operations/request-builder.ts @@ -79,7 +79,9 @@ export function buildRequestMessage( let fieldNumber = 1; for (const protoVariableName of orderedVariableNames) { const variable = variableMap.get(protoVariableName); - if (!variable) { continue; } + if (!variable) { + continue; + } const variableName = variable.variable.name.value; const field = buildVariableField(variableName, variable.type, schema, messageName, options, fieldNumber); @@ -209,7 +211,9 @@ export function buildInputObjectMessage( // Process fields in reconciled order for (const protoFieldName of orderedFieldNames) { const inputField = fieldMap.get(protoFieldName); - if (!inputField) { continue; } + if (!inputField) { + continue; + } const typeInfo = mapGraphQLTypeToProto(inputField.type, { customScalarMappings: options?.customScalarMappings, diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts index 9b7468ac73..5b785fcb2a 100644 --- a/protographic/src/proto-utils.ts +++ b/protographic/src/proto-utils.ts @@ -160,12 +160,12 @@ export function formatComment( const lines = description.trim().split('\n'); return lines.length === 1 -? [`${indent}${LINE_COMMENT_PREFIX}${lines[0]}`] -: [ - `${indent}${BLOCK_COMMENT_START}`, - ...lines.map((line) => `${indent} * ${line}`), - `${indent} ${BLOCK_COMMENT_END}`, - ]; + ? [`${indent}${LINE_COMMENT_PREFIX}${lines[0]}`] + : [ + `${indent}${BLOCK_COMMENT_START}`, + ...lines.map((line) => `${indent} * ${line}`), + `${indent} ${BLOCK_COMMENT_END}`, + ]; } export function renderRPCMethod(includeComments: boolean, rpcMethod: RPCMethod): string[] { @@ -328,20 +328,19 @@ function buildWrapperMessage( lines.push(...formatComment(includeComments, `Wrapper message for a list of ${baseType.name}.`, 0)); } - const formatIndent = (indent: number, content: string) => { - return ' '.repeat(indent) + content; - }; - lines.push(`message ${wrapperName} {`); let innerWrapperName = ''; - innerWrapperName = level > 1 ? `${'ListOf'.repeat(level - 1)}${baseType.name}` : getProtoTypeFromGraphQL(includeComments, baseType, true).typeName; + innerWrapperName = + level > 1 + ? `${'ListOf'.repeat(level - 1)}${baseType.name}` + : getProtoTypeFromGraphQL(includeComments, baseType, true).typeName; lines.push( - formatIndent(1, `message List {`), - formatIndent(2, `repeated ${innerWrapperName} items = 1;`), - formatIndent(1, `}`), - formatIndent(1, `List list = 1;`), - formatIndent(0, `}`), + indentContent(1, `message List {`), + indentContent(2, `repeated ${innerWrapperName} items = 1;`), + indentContent(1, `}`), + indentContent(1, `List list = 1;`), + `}`, ); return lines; diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 081b2ffea9..0c2fc75f54 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -365,10 +365,14 @@ export class RequiredFieldsVisitor { * @throws Error if the field definition is not found on the current type */ private onEnterField(ctx: VisitContext): void { - if (!this.current) { return; } + if (!this.current) { + return; + } const fieldDefinition = this.fieldDefinition(ctx.node.name.value); - if (!fieldDefinition) { throw new Error(`Field definition not found for field ${ctx.node.name.value}`); } + if (!fieldDefinition) { + throw new Error(`Field definition not found for field ${ctx.node.name.value}`); + } if (this.isCompositeType(fieldDefinition.type)) { this.handleCompositeType(fieldDefinition); @@ -415,7 +419,9 @@ export class RequiredFieldsVisitor { const currentInlineFragment = this.currentInlineFragment; this.currentInlineFragment = this.inlineFragmentStack.pop() ?? undefined; - if (!this.current || !this.current.compositeType) { return; } + if (!this.current || !this.current.compositeType) { + return; + } if (this.current.compositeType.kind === CompositeMessageKind.UNION) { this.current.compositeType.memberTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); @@ -430,7 +436,9 @@ export class RequiredFieldsVisitor { * @param ctx - The visit context containing the selection set node and its parent */ private onEnterSelectionSet(ctx: VisitContext): void { - if (!ctx.parent || !this.current) { return; } + if (!ctx.parent || !this.current) { + return; + } let currentType: GraphQLType | undefined; if (this.isFieldNode(ctx.parent)) { @@ -441,14 +449,18 @@ export class RequiredFieldsVisitor { } } else if (this.isInlineFragmentNode(ctx.parent)) { const typeName = ctx.parent.typeCondition?.name.value; - if (!typeName) { return; } + if (!typeName) { + return; + } currentType = this.findObjectType(typeName) ?? undefined; } else { return; } - if (!this.currentType) { return; } + if (!this.currentType) { + return; + } this.ancestors.push(this.currentType); this.currentType = currentType; @@ -495,7 +507,9 @@ export class RequiredFieldsVisitor { * @param fieldDefinition - The field definition with a composite type */ private handleCompositeType(fieldDefinition: GraphQLField): void { - if (!this.current) { return; } + if (!this.current) { + return; + } const compositeType = getNamedType(fieldDefinition.type); if (isInterfaceType(compositeType)) { @@ -524,7 +538,9 @@ export class RequiredFieldsVisitor { * @returns True if the node is a FieldNode */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { - if (Array.isArray(node)) { return false; } + if (Array.isArray(node)) { + return false; + } return (node as ASTNode).kind === Kind.FIELD; } @@ -535,7 +551,9 @@ export class RequiredFieldsVisitor { * @returns True if the node is an InlineFragmentNode */ private isInlineFragmentNode(node: ASTNode | ReadonlyArray): node is InlineFragmentNode { - if (Array.isArray(node)) { return false; } + if (Array.isArray(node)) { + return false; + } return (node as ASTNode).kind === Kind.INLINE_FRAGMENT; } @@ -548,7 +566,9 @@ export class RequiredFieldsVisitor { private findObjectTypeForField(fieldName: string): GraphQLObjectType | undefined { const fields = this.currentType?.getFields() ?? {}; const field = fields[fieldName]; - if (!field) { return undefined; } + if (!field) { + return undefined; + } const namedType = getNamedType(field.type); if (isObjectType(namedType)) { @@ -576,9 +596,13 @@ export class RequiredFieldsVisitor { */ private findObjectType(typeName: string): GraphQLObjectType | undefined { const type = this.schema.getTypeMap()[typeName]; - if (!type) { return undefined; } + if (!type) { + return undefined; + } - if (!isObjectType(type)) { return undefined; } + if (!isObjectType(type)) { + return undefined; + } return type; } @@ -590,7 +614,9 @@ export class RequiredFieldsVisitor { */ private getKeyFieldsString(directive: DirectiveNode): string { const fieldsArg = directive.arguments?.find((arg) => arg.name.value === 'fields'); - if (!fieldsArg) { return ''; } + if (!fieldsArg) { + return ''; + } return fieldsArg.value.kind === Kind.STRING ? fieldsArg.value.value : ''; } diff --git a/protographic/src/sdl-to-proto-visitor.ts b/protographic/src/sdl-to-proto-visitor.ts index d1ddb17149..7306a1fc4c 100644 --- a/protographic/src/sdl-to-proto-visitor.ts +++ b/protographic/src/sdl-to-proto-visitor.ts @@ -620,10 +620,14 @@ export class GraphQLToProtoTextVisitor { } // Skip non-object types - if (!isObjectType(type)) { continue; } + if (!isObjectType(type)) { + continue; + } const keyDirectives = this.getKeyDirectives(type); // Skip types that don't have @key directives - if (keyDirectives.length === 0) { continue; } + if (keyDirectives.length === 0) { + continue; + } // Queue this type for message generation (only once) this.queueTypeForProcessing(type); @@ -633,10 +637,14 @@ export class GraphQLToProtoTextVisitor { const normalizedKeysSet = new Set(); for (const keyDirective of keyDirectives) { const keyInfo = this.getKeyInfoFromDirective(keyDirective); - if (!keyInfo) { continue; } + if (!keyInfo) { + continue; + } const { keyString, resolvable } = keyInfo; - if (!resolvable) { continue; } + if (!resolvable) { + continue; + } const normalizedKey = keyString .split(/[\s,]+/) @@ -701,7 +709,9 @@ export class GraphQLToProtoTextVisitor { // Get the root operation type (Query or Mutation) const rootType = operationType === 'Query' ? this.schema.getQueryType() : this.schema.getMutationType(); - if (!rootType) { return result; } + if (!rootType) { + return result; + } const fields = rootType.getFields(); @@ -711,9 +721,13 @@ export class GraphQLToProtoTextVisitor { for (const fieldName of orderedFieldNames) { // Skip special fields like _entities - if (fieldName === '_entities') { continue; } + if (fieldName === '_entities') { + continue; + } - if (!fields[fieldName]) { continue; } + if (!fields[fieldName]) { + continue; + } const field = fields[fieldName]; const mappedName = createOperationMethodName(operationType, fieldName); @@ -970,7 +984,9 @@ Example: // Process arguments in the order specified by the lock manager for (const argName of orderedArgNames) { const arg = field.args.find((a) => a.name === argName); - if (!arg) { continue; } + if (!arg) { + continue; + } const argType = this.getProtoTypeFromGraphQL(arg.type); const argProtoName = graphqlFieldToProtoField(arg.name); @@ -1579,7 +1595,9 @@ Example: const orderedFieldNames = this.lockManager.reconcileMessageFieldOrder(type.name, fieldNames); for (const fieldName of orderedFieldNames) { - if (!fields[fieldName]) { continue; } + if (!fields[fieldName]) { + continue; + } // ignore fields with arguments as those are handled in separate resolver rpcs const field = fields[fieldName]; @@ -1724,7 +1742,9 @@ Example: const orderedFieldNames = this.lockManager.reconcileMessageFieldOrder(type.name, fieldNames); for (const fieldName of orderedFieldNames) { - if (!fields[fieldName]) { continue; } + if (!fields[fieldName]) { + continue; + } const field = fields[fieldName]; const fieldType = this.getProtoTypeFromGraphQL(field.type); @@ -1810,7 +1830,9 @@ Example: for (const [i, typeName] of orderedTypeNames.entries()) { const implType = implementingTypes.find((t) => t.name === typeName); - if (!implType) { continue; } + if (!implType) { + continue; + } // Add implementing type description as comment if available if (implType.description) { @@ -1868,7 +1890,9 @@ Example: for (const [i, typeName] of orderedTypeNames.entries()) { const memberType = types.find((t) => t.name === typeName); - if (!memberType) { continue; } + if (!memberType) { + continue; + } // Add member type description as comment if available if (memberType.description) { @@ -1934,7 +1958,9 @@ Example: for (const valueName of orderedValueNames) { const value = values.find((v) => v.name === valueName); - if (!value) { continue; } + if (!value) { + continue; + } const protoEnumValue = graphqlEnumValueToProtoEnumValue(type.name, value.name); @@ -2026,7 +2052,9 @@ Example: * @returns A formatted string for the reserved statement */ private formatReservedNumbers(numbers: number[]): string { - if (numbers.length === 0) { return ''; } + if (numbers.length === 0) { + return ''; + } // Sort numbers for better readability const sortedNumbers = [...numbers].sort((a, b) => a - b); diff --git a/protographic/src/sdl-validation-visitor.ts b/protographic/src/sdl-validation-visitor.ts index 792baea653..979c57193c 100644 --- a/protographic/src/sdl-validation-visitor.ts +++ b/protographic/src/sdl-validation-visitor.ts @@ -361,6 +361,9 @@ export class SDLValidationVisitor { } const parent = ctx.ancestors.at(-1); + if (!parent) { + return; + } // If the parent is not an object type definition node, we don't need to continue with the validation if (!this.isASTObjectTypeNode(parent)) { return; @@ -403,14 +406,23 @@ export class SDLValidationVisitor { const requiredDirective = ctx.node.directives?.find( (directive) => directive.name.value === REQUIRES_DIRECTIVE_NAME, ); - if (!requiredDirective) { return; } + if (!requiredDirective) { + return; + } const fieldSelections = requiredDirective.arguments?.find((arg) => arg.name.value === FIELDS)?.value; - if (!fieldSelections || fieldSelections.kind !== Kind.STRING) { return; } + if (!fieldSelections || fieldSelections.kind !== Kind.STRING) { + return; + } const parentType = ctx.ancestors.at(-1); + if (!parentType) { + return; + } - if (!this.isASTObjectTypeNode(parentType)) { return; } + if (!this.isASTObjectTypeNode(parentType)) { + return; + } let operationDoc; try { @@ -460,7 +472,9 @@ export class SDLValidationVisitor { } const fieldNames = this.getContextFields(node); - if (fieldNames.length === 0) { return true; } + if (fieldNames.length === 0) { + return true; + } const parentFields = this.getParentFields(parent); if (parentFields.error) { @@ -502,7 +516,9 @@ export class SDLValidationVisitor { * @private */ private getContextFields(node: ConstArgumentNode | undefined): string[] { - if (!node) { return []; } + if (!node) { + return []; + } const value = node?.value.kind === Kind.STRING ? node.value.value.trim() : ''; if (value.length === 0) { @@ -547,13 +563,19 @@ export class SDLValidationVisitor { currentPath.push(fieldName); visited.add(fieldName); for (const contextField of contextFields) { - if (contextField === fieldName) { continue; } + if (contextField === fieldName) { + continue; + } const typeField = typeFields.find((p) => p.name.value === contextField); - if (!typeField) { continue; } + if (!typeField) { + continue; + } const typeFieldContext = this.getResolverContext(typeField); - if (!typeFieldContext) { continue; } + if (!typeFieldContext) { + continue; + } const typeFieldContextFields = this.getContextFields(typeFieldContext); if (typeFieldContextFields.includes(fieldName)) { diff --git a/protographic/src/selection-set-validation-visitor.ts b/protographic/src/selection-set-validation-visitor.ts index e6d5646f5c..ca718f3dd7 100644 --- a/protographic/src/selection-set-validation-visitor.ts +++ b/protographic/src/selection-set-validation-visitor.ts @@ -163,7 +163,9 @@ export class SelectionSetValidationVisitor { * @returns BREAK if validation fails to stop traversal, undefined otherwise */ private onEnterSelectionSet(ctx: VisitContext): any { - if (!ctx.parent) { return; } + if (!ctx.parent) { + return; + } if (this.isInlineFragment(ctx.parent)) { this.validationResult.errors.push('Inline fragments are not allowed in requires directives'); @@ -193,7 +195,9 @@ export class SelectionSetValidationVisitor { * @param ctx - The visit context containing the selection set node and its parent */ private onLeaveSelectionSet(ctx: VisitContext): void { - if (!ctx.parent) { return; } + if (!ctx.parent) { + return; + } if (!this.isFieldNode(ctx.parent)) { return; @@ -223,7 +227,9 @@ export class SelectionSetValidationVisitor { * @returns True if the node is a FieldNode */ private isFieldNode(node: ASTNode | ReadonlyArray): node is FieldNode { - if (Array.isArray(node)) { return false; } + if (Array.isArray(node)) { + return false; + } return (node as ASTNode).kind === Kind.FIELD; } From 417462527b797a876af2c567a2456c54bd357c50 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 17:41:07 +0100 Subject: [PATCH 26/32] chore: sanitize comments --- protographic/src/proto-utils.ts | 13 +++- .../tests/sdl-to-proto/09-comments.test.ts | 70 +++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts index 5b785fcb2a..dfe2b85ae4 100644 --- a/protographic/src/proto-utils.ts +++ b/protographic/src/proto-utils.ts @@ -155,9 +155,14 @@ export function formatComment( return []; } + // Sanitize description to prevent breaking block comments. + // Replace "/*" and "*/" with safe alternatives so they don't interfere + // with the BLOCK_COMMENT_START/BLOCK_COMMENT_END markers. + const sanitized = description.replace(/\/\*/g, '/ *').replace(/\*\//g, '* /'); + // Use 2-space indentation consistently const indent = SPACE_INDENT.repeat(indentLevel); - const lines = description.trim().split('\n'); + const lines = sanitized.trim().split('\n'); return lines.length === 1 ? [`${indent}${LINE_COMMENT_PREFIX}${lines[0]}`] @@ -303,9 +308,13 @@ export function listNameByNestingLevel(nestingLevel: number, baseType: GraphQLNa * List list = 1; * } * + * @param includeComments - Whether to include descriptive comments in the output * @param level - The nesting level (1 for simple wrapper, >1 for nested structures) * @param baseType - The GraphQL base type being wrapped (e.g., String, User, etc.) - * @returns The generated wrapper message name (e.g., "ListOfString", "ListOfListOfUser") + * @returns The generated wrapper message definition as a proto message string. + * Constructs a `wrapperName` (e.g., "ListOfString", "ListOfListOfUser") and + * uses `buildWrapperMessage(includeComments, wrapperName, level, baseType)` + * to render the full message text. */ export function createNestedListWrapper(includeComments: boolean, level: number, baseType: GraphQLNamedType): string { const wrapperName = `${'ListOf'.repeat(level)}${baseType.name}`; diff --git a/protographic/tests/sdl-to-proto/09-comments.test.ts b/protographic/tests/sdl-to-proto/09-comments.test.ts index 281b0cafa0..2242474bc1 100644 --- a/protographic/tests/sdl-to-proto/09-comments.test.ts +++ b/protographic/tests/sdl-to-proto/09-comments.test.ts @@ -316,6 +316,76 @@ describe('SDL to Proto Comments', () => { `); }); + it('should sanitize block comment markers in descriptions', () => { + // Descriptions containing /* and */ should be sanitized to prevent breaking proto comments + const sdl = ` + """ + This type has problematic markers: /* start */ and more text. + Also handles nested /* comments */ in the middle. + """ + type User { + "Field with /* inline markers */ in description" + id: ID! + + """ + Multi-line with */closing first + and /*opening second + """ + name: String! + } + + type Query { + "Query with /* block */ markers" + user: User + } + `; + + const { proto: protoText } = compileGraphQLToProto(sdl); + + // Validate Proto definition - this would fail if /* or */ were not sanitized in content + expectValidProto(protoText); + + // Check that the sanitized versions are present in the comment content + // The original "/* start */" should become "/ * start * /" + expect(protoText).toContain('/ * start * /'); + expect(protoText).toContain('/ * inline markers * /'); + expect(protoText).toContain('/ * block * /'); + + expect(protoText).toMatchInlineSnapshot(` + "syntax = "proto3"; + package service.v1; + + // Service definition for DefaultService + service DefaultService { + // Query with / * block * / markers + rpc QueryUser(QueryUserRequest) returns (QueryUserResponse) {} + } + + // Request message for user operation: Query with / * block * / markers. + message QueryUserRequest { + } + // Response message for user operation: Query with / * block * / markers. + message QueryUserResponse { + // Query with / * block * / markers + User user = 1; + } + + /* + * This type has problematic markers: / * start * / and more text. + * Also handles nested / * comments * / in the middle. + */ + message User { + // Field with / * inline markers * / in description + string id = 1; + /* + * Multi-line with * /closing first + * and / *opening second + */ + string name = 2; + }" + `); + }); + it('should add comments to entity lookup messages for federation types', () => { // Define federation directives first const sdl = ` From cb8ee4601e4533e7ef118b9959ff5407386128b7 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Tue, 3 Feb 2026 17:46:39 +0100 Subject: [PATCH 27/32] chore: update comment --- protographic/tests/field-set/01-basics.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index ca5a50a210..554b8897d6 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -20,7 +20,7 @@ import { RequiredFieldMapping } from '../../src/required-fields-visitor.js'; interface CreateVisitorOptions { /** The GraphQL SDL to build the schema from */ sdl: string; - /** The name of the entity type (defaults to finding the type with @key directive) */ + /** The name of the entity type */ entityName: string; /** The name of the field with the @requires directive */ requiredFieldName: string; From 90a5b672b9c3187be234aa4a53bfa790104e4255 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Wed, 4 Feb 2026 12:08:04 +0100 Subject: [PATCH 28/32] chore: properly handle composite types on field level --- protographic/src/proto-utils.ts | 38 +- protographic/src/required-fields-visitor.ts | 29 +- protographic/src/types.ts | 7 +- .../tests/field-set/01-basics.test.ts | 8 +- .../proto-utils/build-proto-message.test.ts | 802 ++++++++++++++++++ 5 files changed, 853 insertions(+), 31 deletions(-) create mode 100644 protographic/tests/proto-utils/build-proto-message.test.ts diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts index dfe2b85ae4..3af188405d 100644 --- a/protographic/src/proto-utils.ts +++ b/protographic/src/proto-utils.ts @@ -32,7 +32,7 @@ const BLOCK_COMMENT_END = '*/'; * @returns The message definition */ export function buildProtoMessage(includeComments: boolean, message: ProtoMessage): string[] { - return buildProtoMessageWithIndent(includeComments, message, 0); + return buildProtoMessageWithIndent(includeComments, message, 0, new Set()); } /** @@ -42,25 +42,41 @@ export function buildProtoMessage(includeComments: boolean, message: ProtoMessag * @param indent - The indent level * @returns The message lines */ -function buildProtoMessageWithIndent(includeComments: boolean, message: ProtoMessage, indent: number): string[] { +function buildProtoMessageWithIndent( + includeComments: boolean, + message: ProtoMessage, + indent: number, + seenTypes: Set, +): string[] { const messageLines = formatComment(includeComments, message.description, indent); + + if (seenTypes.has(message.messageName)) { + throw new Error(`Duplicate nested message name: ${message.messageName}`); + } + + seenTypes.add(message.messageName); messageLines.push(indentContent(indent, `message ${message.messageName} {`)); - // if we have nested messages, we need to build them first + // Build nested messages first - use a new Set for this level since + // protobuf allows the same message name at different nesting levels if (message.nestedMessages && message.nestedMessages.length > 0) { + const nestedSeenTypes = new Set(); for (const nestedMessage of message.nestedMessages) { - messageLines.push(...buildProtoMessageWithIndent(includeComments, nestedMessage, indent + 1)); + messageLines.push(...buildProtoMessageWithIndent(includeComments, nestedMessage, indent + 1, nestedSeenTypes)); } } - if (message.compositeType) { - messageLines.push(...buildCompositeTypeMessage(includeComments, message.compositeType, indent + 1)); - } - if (message.reservedNumbers && message.reservedNumbers.length > 0) { messageLines.push(indentContent(indent + 1, `reserved ${message.reservedNumbers};`)); } + const compositeTypeFields = message.fields.filter((f) => f.compositeType); + for (const compositeTypeField of compositeTypeFields) { + messageLines.push( + ...buildCompositeTypeMessage(includeComments, compositeTypeField.compositeType!, indent + 1, seenTypes), + ); + } + for (const field of message.fields) { if (field.description) { messageLines.push(...formatComment(includeComments, field.description, indent + 1)); @@ -105,7 +121,13 @@ function buildCompositeTypeMessage( includeComments: boolean, compositeType: CompositeMessageDefinition, indent: number, + seenTypes: Set, ): string[] { + if (seenTypes.has(compositeType.typeName)) { + return []; + } + + seenTypes.add(compositeType.typeName); const lines: string[] = []; if (includeComments && compositeType.description) { diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 0c2fc75f54..618b416831 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -19,7 +19,7 @@ import { visit, } from 'graphql'; import { FieldMapping } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; -import { CompositeMessageKind, ProtoMessage, RPCMethod, VisitContext } from './types.js'; +import { CompositeMessageDefinition, CompositeMessageKind, ProtoMessage, RPCMethod, VisitContext } from './types.js'; import { KEY_DIRECTIVE_NAME } from './string-constants.js'; import { createEntityLookupRequestKeyMessageName, @@ -374,8 +374,9 @@ export class RequiredFieldsVisitor { throw new Error(`Field definition not found for field ${ctx.node.name.value}`); } + let compositeType: CompositeMessageDefinition | undefined; if (this.isCompositeType(fieldDefinition.type)) { - this.handleCompositeType(fieldDefinition); + compositeType = this.handleCompositeType(fieldDefinition); } const protoFieldName = graphqlFieldToProtoField(fieldDefinition.name); @@ -392,6 +393,7 @@ export class RequiredFieldsVisitor { fieldNumber: this.current?.fields.length + 1, isRepeated: typeInfo.isRepeated, graphqlName: fieldDefinition.name, + compositeType, }); } @@ -416,16 +418,7 @@ export class RequiredFieldsVisitor { * @param ctx - The visit context containing the inline fragment node */ private onLeaveInlineFragment(ctx: VisitContext): void { - const currentInlineFragment = this.currentInlineFragment; this.currentInlineFragment = this.inlineFragmentStack.pop() ?? undefined; - - if (!this.current || !this.current.compositeType) { - return; - } - - if (this.current.compositeType.kind === CompositeMessageKind.UNION) { - this.current.compositeType.memberTypes.push(currentInlineFragment?.typeCondition?.name.value ?? ''); - } } /** @@ -506,29 +499,29 @@ export class RequiredFieldsVisitor { * * @param fieldDefinition - The field definition with a composite type */ - private handleCompositeType(fieldDefinition: GraphQLField): void { + private handleCompositeType(fieldDefinition: GraphQLField): CompositeMessageDefinition | undefined { if (!this.current) { - return; + return undefined; } const compositeType = getNamedType(fieldDefinition.type); if (isInterfaceType(compositeType)) { - this.current.compositeType = { + return { kind: CompositeMessageKind.INTERFACE, implementingTypes: this.schema.getImplementations(compositeType).objects.map((o) => o.name), typeName: compositeType.name, }; - - return; } if (isUnionType(compositeType)) { - this.current.compositeType = { + return { kind: CompositeMessageKind.UNION, - memberTypes: [], + memberTypes: this.schema.getPossibleTypes(compositeType).map((t) => t.name), typeName: compositeType.name, }; } + + return undefined; } /** diff --git a/protographic/src/types.ts b/protographic/src/types.ts index 282ea0718f..8c8d0f5d6d 100644 --- a/protographic/src/types.ts +++ b/protographic/src/types.ts @@ -73,6 +73,12 @@ export interface ProtoMessageField { description?: string; // The original name of the field in the GraphQL schema graphqlName?: string; + + /** + * The composite type of the field. When building a proto message + * this is used to create the composite type messages as nested messages. + */ + compositeType?: CompositeMessageDefinition; } /** @@ -96,7 +102,6 @@ export interface ProtoMessage { * Address address = 1; */ nestedMessages?: ProtoMessage[]; - compositeType?: CompositeMessageDefinition; } export interface ListWrapper { diff --git a/protographic/tests/field-set/01-basics.test.ts b/protographic/tests/field-set/01-basics.test.ts index 554b8897d6..72d00bd541 100644 --- a/protographic/tests/field-set/01-basics.test.ts +++ b/protographic/tests/field-set/01-basics.test.ts @@ -623,7 +623,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - const compositeType = fieldMessage?.compositeType; + const compositeType = fieldMessage?.fields[0].compositeType; expect(compositeType).toBeDefined(); expect(compositeType?.kind).toBe(CompositeMessageKind.UNION); expect(compositeType?.typeName).toBe('Animal'); @@ -725,7 +725,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - const compositeType = fieldMessage?.compositeType; + const compositeType = fieldMessage?.fields[0].compositeType; expect(compositeType).toBeDefined(); expect(compositeType?.kind).toBe(CompositeMessageKind.INTERFACE); expect(compositeType?.typeName).toBe('Animal'); @@ -827,7 +827,7 @@ describe('Field Set Visitor', () => { isRepeated: false, }); - const compositeType = fieldMessage?.compositeType; + const compositeType = fieldMessage?.fields[0].compositeType; expect(compositeType).toBeDefined(); expect(compositeType?.kind).toBe(CompositeMessageKind.INTERFACE); expect(compositeType?.typeName).toBe('Animal'); @@ -951,7 +951,7 @@ describe('Field Set Visitor', () => { }); // Check for union composite type on Description message - const compositeType = descriptionMessage?.compositeType; + const compositeType = descriptionMessage?.fields[2].compositeType; expect(compositeType).toBeDefined(); expect(compositeType?.kind).toBe(CompositeMessageKind.UNION); expect(compositeType?.typeName).toBe('Animal'); diff --git a/protographic/tests/proto-utils/build-proto-message.test.ts b/protographic/tests/proto-utils/build-proto-message.test.ts new file mode 100644 index 0000000000..1501fea7c9 --- /dev/null +++ b/protographic/tests/proto-utils/build-proto-message.test.ts @@ -0,0 +1,802 @@ +import { describe, expect, it } from 'vitest'; +import { buildProtoMessage } from '../../src/proto-utils.js'; +import { ProtoMessage, CompositeMessageKind } from '../../src/types.js'; + +describe('buildProtoMessage', () => { + describe('basic message generation', () => { + it('should generate a simple message with scalar fields', () => { + const message: ProtoMessage = { + messageName: 'User', + fields: [ + { fieldName: 'id', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'name', typeName: 'string', fieldNumber: 2 }, + { fieldName: 'age', typeName: 'int32', fieldNumber: 3 }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message User { + string id = 1; + string name = 2; + int32 age = 3; + } + " + `); + }); + + it('should generate a message with different field types', () => { + const message: ProtoMessage = { + messageName: 'Settings', + fields: [ + { fieldName: 'enabled', typeName: 'bool', fieldNumber: 1 }, + { fieldName: 'count', typeName: 'int32', fieldNumber: 2 }, + { fieldName: 'ratio', typeName: 'double', fieldNumber: 3 }, + { fieldName: 'label', typeName: 'google.protobuf.StringValue', fieldNumber: 4 }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message Settings { + bool enabled = 1; + int32 count = 2; + double ratio = 3; + google.protobuf.StringValue label = 4; + } + " + `); + }); + + it('should generate a message with repeated fields', () => { + const message: ProtoMessage = { + messageName: 'TagList', + fields: [ + { fieldName: 'tags', typeName: 'string', fieldNumber: 1, isRepeated: true }, + { fieldName: 'scores', typeName: 'int32', fieldNumber: 2, isRepeated: true }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message TagList { + repeated string tags = 1; + repeated int32 scores = 2; + } + " + `); + }); + }); + + describe('nested messages', () => { + it('should generate a message with a nested message', () => { + const message: ProtoMessage = { + messageName: 'UserResponse', + fields: [{ fieldName: 'address', typeName: 'Address', fieldNumber: 1 }], + nestedMessages: [ + { + messageName: 'Address', + fields: [ + { fieldName: 'street', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'city', typeName: 'string', fieldNumber: 2 }, + ], + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message UserResponse { + message Address { + string street = 1; + string city = 2; + } + + Address address = 1; + } + " + `); + }); + + it('should generate multiple levels of nested messages', () => { + const message: ProtoMessage = { + messageName: 'Company', + fields: [{ fieldName: 'headquarters', typeName: 'Location', fieldNumber: 1 }], + nestedMessages: [ + { + messageName: 'Location', + fields: [{ fieldName: 'address', typeName: 'Address', fieldNumber: 1 }], + nestedMessages: [ + { + messageName: 'Address', + fields: [ + { fieldName: 'street', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'zip', typeName: 'string', fieldNumber: 2 }, + ], + }, + ], + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message Company { + message Location { + message Address { + string street = 1; + string zip = 2; + } + + Address address = 1; + } + + Location headquarters = 1; + } + " + `); + }); + + it('should throw error for duplicate nested messages with the same name', () => { + const message: ProtoMessage = { + messageName: 'UserResponse', + fields: [ + { fieldName: 'home_address', typeName: 'Address', fieldNumber: 1 }, + { fieldName: 'work_address', typeName: 'Address', fieldNumber: 2 }, + ], + nestedMessages: [ + { + messageName: 'Address', + fields: [ + { fieldName: 'street', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'city', typeName: 'string', fieldNumber: 2 }, + ], + }, + { + messageName: 'Address', + fields: [ + { fieldName: 'street', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'city', typeName: 'string', fieldNumber: 2 }, + ], + }, + ], + }; + + expect(() => buildProtoMessage(false, message)).toThrow('Duplicate nested message name: Address'); + }); + + it('should throw error for nested messages with the same name but different fields', () => { + const message: ProtoMessage = { + messageName: 'Response', + fields: [ + { fieldName: 'primary', typeName: 'Details', fieldNumber: 1 }, + { fieldName: 'secondary', typeName: 'Details', fieldNumber: 2 }, + ], + nestedMessages: [ + { + messageName: 'Details', + fields: [ + { fieldName: 'name', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'value', typeName: 'string', fieldNumber: 2 }, + ], + }, + { + messageName: 'Details', + fields: [ + { fieldName: 'id', typeName: 'int32', fieldNumber: 1 }, + { fieldName: 'count', typeName: 'int32', fieldNumber: 2 }, + { fieldName: 'active', typeName: 'bool', fieldNumber: 3 }, + ], + }, + ], + }; + + expect(() => buildProtoMessage(false, message)).toThrow('Duplicate nested message name: Details'); + }); + + it('should allow same message name at different nesting levels', () => { + // In protobuf, the same message name at different nesting levels is valid + // because they are scoped differently + const message: ProtoMessage = { + messageName: 'Outer', + fields: [ + { fieldName: 'data', typeName: 'Data', fieldNumber: 1 }, + { fieldName: 'inner', typeName: 'Inner', fieldNumber: 2 }, + ], + nestedMessages: [ + { + messageName: 'Data', + fields: [{ fieldName: 'value', typeName: 'string', fieldNumber: 1 }], + }, + { + messageName: 'Inner', + fields: [{ fieldName: 'nested_data', typeName: 'Data', fieldNumber: 1 }], + nestedMessages: [ + { + // Same name "Data" but at a different nesting level - this is valid + messageName: 'Data', + fields: [{ fieldName: 'id', typeName: 'int32', fieldNumber: 1 }], + }, + ], + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message Outer { + message Data { + string value = 1; + } + + message Inner { + message Data { + int32 id = 1; + } + + Data nested_data = 1; + } + + Data data = 1; + Inner inner = 2; + } + " + `); + }); + }); + + describe('composite types on fields', () => { + it('should generate a field with an interface composite type (oneof instance)', () => { + const message: ProtoMessage = { + messageName: 'AnimalResponse', + fields: [ + { + fieldName: 'animal', + typeName: 'Animal', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Animal', + implementingTypes: ['Cat', 'Dog'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message AnimalResponse { + message Animal { + oneof instance { + Cat cat = 1; + Dog dog = 2; + } + } + Animal animal = 1; + } + " + `); + }); + + it('should generate a field with a union composite type (oneof value)', () => { + const message: ProtoMessage = { + messageName: 'SearchResponse', + fields: [ + { + fieldName: 'result', + typeName: 'SearchResult', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'SearchResult', + memberTypes: ['User', 'Product', 'Order'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message SearchResponse { + message SearchResult { + oneof value { + User user = 1; + Product product = 2; + Order order = 3; + } + } + SearchResult result = 1; + } + " + `); + }); + }); + + describe('multiple composite types on different fields', () => { + it('should generate multiple fields with different composite types', () => { + const message: ProtoMessage = { + messageName: 'MixedResponse', + fields: [ + { + fieldName: 'pet', + typeName: 'Pet', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Pet', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { + fieldName: 'item', + typeName: 'ShopItem', + fieldNumber: 2, + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'ShopItem', + memberTypes: ['Book', 'Electronics'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message MixedResponse { + message Pet { + oneof instance { + Cat cat = 1; + Dog dog = 2; + } + } + message ShopItem { + oneof value { + Book book = 1; + Electronics electronics = 2; + } + } + Pet pet = 1; + ShopItem item = 2; + } + " + `); + }); + + it('should handle multiple interface composite types on different fields', () => { + const message: ProtoMessage = { + messageName: 'Dashboard', + fields: [ + { + fieldName: 'primary_widget', + typeName: 'Widget', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Widget', + implementingTypes: ['Chart', 'Table', 'Counter'], + }, + }, + { + fieldName: 'data_source', + typeName: 'DataSource', + fieldNumber: 2, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'DataSource', + implementingTypes: ['Database', 'API', 'File'], + }, + }, + { fieldName: 'title', typeName: 'string', fieldNumber: 3 }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message Dashboard { + message Widget { + oneof instance { + Chart chart = 1; + Table table = 2; + Counter counter = 3; + } + } + message DataSource { + oneof instance { + Database database = 1; + API api = 2; + File file = 3; + } + } + Widget primary_widget = 1; + DataSource data_source = 2; + string title = 3; + } + " + `); + }); + }); + + describe('composite type deduplication', () => { + it('should not duplicate composite type when same type is referenced by multiple fields', () => { + const message: ProtoMessage = { + messageName: 'Response', + fields: [ + { + fieldName: 'primary_result', + typeName: 'SearchResult', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'SearchResult', + memberTypes: ['User', 'Product'], + }, + }, + { + fieldName: 'secondary_result', + typeName: 'SearchResult', + fieldNumber: 2, + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'SearchResult', + memberTypes: ['User', 'Product'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message); + + // SearchResult should only appear once, not twice + expect(result.join('\n')).toMatchInlineSnapshot(` + "message Response { + message SearchResult { + oneof value { + User user = 1; + Product product = 2; + } + } + SearchResult primary_result = 1; + SearchResult secondary_result = 2; + } + " + `); + }); + + it('should count exactly one message definition when multiple fields reference same composite type', () => { + const message: ProtoMessage = { + messageName: 'MultiFieldResponse', + fields: [ + { + fieldName: 'first', + typeName: 'Animal', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Animal', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { + fieldName: 'second', + typeName: 'Animal', + fieldNumber: 2, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Animal', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { + fieldName: 'third', + typeName: 'Animal', + fieldNumber: 3, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Animal', + implementingTypes: ['Cat', 'Dog'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message).join('\n'); + + // Count occurrences of "message Animal {" - should be exactly 1 + const messageDefinitions = result.match(/message Animal {/g); + expect(messageDefinitions).toHaveLength(1); + + expect(result).toMatchInlineSnapshot(` + "message MultiFieldResponse { + message Animal { + oneof instance { + Cat cat = 1; + Dog dog = 2; + } + } + Animal first = 1; + Animal second = 2; + Animal third = 3; + } + " + `); + }); + + it('should deduplicate composite types with same name even when defined on different fields', () => { + const message: ProtoMessage = { + messageName: 'ComplexResponse', + fields: [ + { + fieldName: 'pet', + typeName: 'Pet', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Pet', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { fieldName: 'name', typeName: 'string', fieldNumber: 2 }, + { + fieldName: 'another_pet', + typeName: 'Pet', + fieldNumber: 3, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Pet', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { fieldName: 'count', typeName: 'int32', fieldNumber: 4 }, + { + fieldName: 'favorite_pet', + typeName: 'Pet', + fieldNumber: 5, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Pet', + implementingTypes: ['Cat', 'Dog'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message ComplexResponse { + message Pet { + oneof instance { + Cat cat = 1; + Dog dog = 2; + } + } + Pet pet = 1; + string name = 2; + Pet another_pet = 3; + int32 count = 4; + Pet favorite_pet = 5; + } + " + `); + }); + + it('should handle mixed composite types without cross-contamination', () => { + const message: ProtoMessage = { + messageName: 'MixedDedup', + fields: [ + { + fieldName: 'animal1', + typeName: 'Animal', + fieldNumber: 1, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Animal', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { + fieldName: 'search1', + typeName: 'SearchResult', + fieldNumber: 2, + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'SearchResult', + memberTypes: ['User', 'Product'], + }, + }, + { + fieldName: 'animal2', + typeName: 'Animal', + fieldNumber: 3, + compositeType: { + kind: CompositeMessageKind.INTERFACE, + typeName: 'Animal', + implementingTypes: ['Cat', 'Dog'], + }, + }, + { + fieldName: 'search2', + typeName: 'SearchResult', + fieldNumber: 4, + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'SearchResult', + memberTypes: ['User', 'Product'], + }, + }, + ], + }; + + const result = buildProtoMessage(false, message).join('\n'); + + // Should have exactly one Animal message and one SearchResult message + const animalDefinitions = result.match(/message Animal {/g); + const searchResultDefinitions = result.match(/message SearchResult {/g); + + expect(animalDefinitions).toHaveLength(1); + expect(searchResultDefinitions).toHaveLength(1); + + expect(result).toMatchInlineSnapshot(` + "message MixedDedup { + message Animal { + oneof instance { + Cat cat = 1; + Dog dog = 2; + } + } + message SearchResult { + oneof value { + User user = 1; + Product product = 2; + } + } + Animal animal1 = 1; + SearchResult search1 = 2; + Animal animal2 = 3; + SearchResult search2 = 4; + } + " + `); + }); + }); + + describe('reserved field numbers', () => { + it('should include reserved numbers in the message', () => { + const message: ProtoMessage = { + messageName: 'User', + reservedNumbers: '4, 5, 10 to 15', + fields: [ + { fieldName: 'id', typeName: 'string', fieldNumber: 1 }, + { fieldName: 'name', typeName: 'string', fieldNumber: 2 }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message User { + reserved 4, 5, 10 to 15; + string id = 1; + string name = 2; + } + " + `); + }); + }); + + describe('comments', () => { + it('should include message and field descriptions when includeComments is true', () => { + const message: ProtoMessage = { + messageName: 'User', + description: 'Represents a user in the system', + fields: [ + { fieldName: 'id', typeName: 'string', fieldNumber: 1, description: 'Unique identifier' }, + { fieldName: 'name', typeName: 'string', fieldNumber: 2, description: 'Display name' }, + ], + }; + + const result = buildProtoMessage(true, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "// Represents a user in the system + message User { + // Unique identifier + string id = 1; + // Display name + string name = 2; + } + " + `); + }); + + it('should exclude descriptions when includeComments is false', () => { + const message: ProtoMessage = { + messageName: 'User', + description: 'Represents a user in the system', + fields: [ + { fieldName: 'id', typeName: 'string', fieldNumber: 1, description: 'Unique identifier' }, + { fieldName: 'name', typeName: 'string', fieldNumber: 2, description: 'Display name' }, + ], + }; + + const result = buildProtoMessage(false, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message User { + string id = 1; + string name = 2; + } + " + `); + }); + + it('should format multi-line descriptions as block comments', () => { + const message: ProtoMessage = { + messageName: 'User', + description: 'Represents a user in the system.\nThis is a second line.\nAnd a third.', + fields: [{ fieldName: 'id', typeName: 'string', fieldNumber: 1 }], + }; + + const result = buildProtoMessage(true, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "/* + * Represents a user in the system. + * This is a second line. + * And a third. + */ + message User { + string id = 1; + } + " + `); + }); + + it('should include composite type descriptions', () => { + const message: ProtoMessage = { + messageName: 'Response', + fields: [ + { + fieldName: 'result', + typeName: 'SearchResult', + fieldNumber: 1, + description: 'The search result', + compositeType: { + kind: CompositeMessageKind.UNION, + typeName: 'SearchResult', + description: 'Union of possible search results', + memberTypes: ['User', 'Product'], + }, + }, + ], + }; + + const result = buildProtoMessage(true, message); + + expect(result.join('\n')).toMatchInlineSnapshot(` + "message Response { + // Union of possible search results + message SearchResult { + oneof value { + User user = 1; + Product product = 2; + } + } + // The search result + SearchResult result = 1; + } + " + `); + }); + }); +}); From b0b4390feb35f6557089c6fd77bce7517e1a9d02 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Wed, 4 Feb 2026 12:17:39 +0100 Subject: [PATCH 29/32] chore: lint --- protographic/src/selection-set-validation-visitor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protographic/src/selection-set-validation-visitor.ts b/protographic/src/selection-set-validation-visitor.ts index ca718f3dd7..7159f9f823 100644 --- a/protographic/src/selection-set-validation-visitor.ts +++ b/protographic/src/selection-set-validation-visitor.ts @@ -110,7 +110,7 @@ export class SelectionSetValidationVisitor { private onEnterField(ctx: VisitContext): any { const fieldDefinition = this.getFieldDefinition(ctx.node); if (!fieldDefinition) { - return; + return false; } const namedType = this.getUnderlyingType(fieldDefinition.type); From 20ca49df3586ee9bd89fe0511e9eb061c3c64ad4 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Wed, 4 Feb 2026 12:39:37 +0100 Subject: [PATCH 30/32] chore: balance pop --- protographic/src/required-fields-visitor.ts | 25 +++++++++------------ 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/protographic/src/required-fields-visitor.ts b/protographic/src/required-fields-visitor.ts index 618b416831..03cdc01d55 100644 --- a/protographic/src/required-fields-visitor.ts +++ b/protographic/src/required-fields-visitor.ts @@ -428,31 +428,25 @@ export class RequiredFieldsVisitor { * * @param ctx - The visit context containing the selection set node and its parent */ - private onEnterSelectionSet(ctx: VisitContext): void { + private onEnterSelectionSet(ctx: VisitContext): any { if (!ctx.parent || !this.current) { - return; + return false; } - let currentType: GraphQLType | undefined; + let currentType: GraphQLObjectType | undefined; if (this.isFieldNode(ctx.parent)) { currentType = this.findObjectTypeForField(ctx.parent.name.value) ?? undefined; - if (!currentType) { - // TODO: handle this case. Could be a union or interface type. - return; - } } else if (this.isInlineFragmentNode(ctx.parent)) { const typeName = ctx.parent.typeCondition?.name.value; - if (!typeName) { - return; + if (typeName) { + currentType = this.findObjectType(typeName); } - - currentType = this.findObjectType(typeName) ?? undefined; } else { - return; + return false; } - if (!this.currentType) { - return; + if (!this.currentType || !currentType) { + return false; } this.ancestors.push(this.currentType); @@ -484,7 +478,8 @@ export class RequiredFieldsVisitor { /** * Handles leaving a selection set node. - * Restores the previous type and message context when ascending the tree. + * Restores the previous type and message context when ascending the tree, + * but only if onEnterSelectionSet actually pushed state. * * @param ctx - The visit context containing the selection set node */ From d9169fb1ea239f38f7a6d6036a4fd707bb09543f Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Wed, 4 Feb 2026 15:14:34 +0100 Subject: [PATCH 31/32] chore: add eslint dependency --- pnpm-lock.yaml | 66 +++++++++++++++++++++++---------------- protographic/package.json | 3 ++ 2 files changed, 42 insertions(+), 27 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1a6de8615..56632e71c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -906,6 +906,15 @@ importers: '@vitest/coverage-v8': specifier: 3.2.4 version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.12.12)(jsdom@27.2.0)(terser@5.44.1)) + eslint: + specifier: 8.57.1 + version: 8.57.1 + eslint-config-unjs: + specifier: 0.2.1 + version: 0.2.1(eslint@8.57.1)(typescript@5.5.2) + eslint-plugin-require-extensions: + specifier: 0.1.3 + version: 0.1.3(eslint@8.57.1) typescript: specifier: ^5.0.0 version: 5.5.2 @@ -11335,10 +11344,6 @@ packages: js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - js-yaml@4.1.1: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true @@ -17976,12 +17981,12 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.4.1 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.1 - js-yaml: 4.1.0 + js-yaml: 4.1.1 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -18356,7 +18361,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 + debug: 4.4.1 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -23255,7 +23260,7 @@ snapshots: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.5.2) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.5.2) - debug: 4.3.7 + debug: 4.4.1 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.1 @@ -23288,7 +23293,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.5.2) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.5.2) - debug: 4.3.7 + debug: 4.4.1 eslint: 8.57.1 tsutils: 3.21.0(typescript@5.5.2) optionalDependencies: @@ -25520,7 +25525,7 @@ snapshots: eslint: 8.57.1 eslint-import-resolver-node: 0.3.7 eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.57.1) eslint-plugin-react: 7.33.0(eslint@8.57.1) eslint-plugin-react-hooks: 4.6.0(eslint@8.57.1) @@ -25537,7 +25542,7 @@ snapshots: eslint-config-standard@17.1.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1): dependencies: eslint: 8.57.1 - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint@8.57.1) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) eslint-plugin-n: 16.6.2(eslint@8.57.1) eslint-plugin-promise: 6.6.0(eslint@8.57.1) @@ -25549,7 +25554,7 @@ snapshots: eslint-config-prettier: 8.10.0(eslint@8.57.1) eslint-config-standard: 17.1.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1) eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-plugin-import@2.27.5)(eslint@8.57.1) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint@8.57.1) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) eslint-plugin-n: 16.6.2(eslint@8.57.1) eslint-plugin-node: 11.1.0(eslint@8.57.1) eslint-plugin-promise: 6.6.0(eslint@8.57.1) @@ -25573,8 +25578,8 @@ snapshots: debug: 4.3.7 enhanced-resolve: 5.15.0 eslint: 8.57.1 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) get-tsconfig: 4.7.2 globby: 13.2.2 is-core-module: 2.12.1 @@ -25592,7 +25597,7 @@ snapshots: enhanced-resolve: 5.15.0 eslint: 8.57.1 eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint@8.57.1) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) get-tsconfig: 4.7.2 globby: 13.2.2 is-core-module: 2.12.1 @@ -25604,6 +25609,17 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): + dependencies: + debug: 4.3.7 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.5.2) + eslint: 8.57.1 + eslint-import-resolver-node: 0.3.7 + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1) + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1): dependencies: debug: 4.3.7 @@ -25638,7 +25654,7 @@ snapshots: eslint-utils: 2.1.0 regexpp: 3.2.0 - eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1): + eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): dependencies: array-includes: 3.1.6 array.prototype.flat: 1.3.1 @@ -25647,7 +25663,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) has: 1.0.3 is-core-module: 2.12.1 is-glob: 4.0.3 @@ -25663,7 +25679,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint@8.57.1): + eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.5.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.1): dependencies: array-includes: 3.1.6 array.prototype.flat: 1.3.1 @@ -25720,7 +25736,7 @@ snapshots: is-builtin-module: 3.2.1 is-core-module: 2.16.1 minimatch: 3.1.2 - resolve: 1.22.10 + resolve: 1.22.11 semver: 7.7.1 eslint-plugin-node@11.1.0(eslint@8.57.1): @@ -25730,7 +25746,7 @@ snapshots: eslint-utils: 2.1.0 ignore: 5.3.1 minimatch: 3.1.2 - resolve: 1.22.10 + resolve: 1.22.11 semver: 6.3.1 eslint-plugin-promise@6.6.0(eslint@8.57.1): @@ -25815,7 +25831,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.3.7 + debug: 4.4.1 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -25833,7 +25849,7 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 + js-yaml: 4.1.1 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -27271,10 +27287,6 @@ snapshots: js-tokens@9.0.1: {} - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - js-yaml@4.1.1: dependencies: argparse: 2.0.1 @@ -28368,7 +28380,7 @@ snapshots: normalize-package-data@2.5.0: dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.10 + resolve: 1.22.11 semver: 5.7.2 validate-npm-package-license: 3.0.4 diff --git a/protographic/package.json b/protographic/package.json index cc75ed1edd..08f56559e0 100644 --- a/protographic/package.json +++ b/protographic/package.json @@ -33,6 +33,9 @@ "@types/lodash-es": "4.17.12", "@types/node": "^20.11.5", "@vitest/coverage-v8": "3.2.4", + "eslint": "8.57.1", + "eslint-config-unjs": "0.2.1", + "eslint-plugin-require-extensions": "0.1.3", "typescript": "^5.0.0", "vitest": "^3.2.4" }, From a7264e3e00081db25a89c2a8432f17a8e7a8bdc6 Mon Sep 17 00:00:00 2001 From: Ludwig Bedacht Date: Wed, 4 Feb 2026 16:49:14 +0100 Subject: [PATCH 32/32] chore: make composite member type order deterministic --- protographic/src/proto-utils.ts | 3 +++ .../proto-utils/build-proto-message.test.ts | 24 +++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/protographic/src/proto-utils.ts b/protographic/src/proto-utils.ts index 3af188405d..cc471cc7f2 100644 --- a/protographic/src/proto-utils.ts +++ b/protographic/src/proto-utils.ts @@ -145,6 +145,9 @@ function buildCompositeTypeMessage( compositeTypes = compositeType.implementingTypes; } + // Create a sorted copy to ensure deterministic field numbers without mutating the input. + compositeTypes = [...compositeTypes].sort((a, b) => a.localeCompare(b)); + lines.push( indentContent(indent, `message ${compositeType.typeName} {`), indentContent(indent + 1, `oneof ${oneOfName} {`), diff --git a/protographic/tests/proto-utils/build-proto-message.test.ts b/protographic/tests/proto-utils/build-proto-message.test.ts index 1501fea7c9..1c9a3e38d4 100644 --- a/protographic/tests/proto-utils/build-proto-message.test.ts +++ b/protographic/tests/proto-utils/build-proto-message.test.ts @@ -308,9 +308,9 @@ describe('buildProtoMessage', () => { "message SearchResponse { message SearchResult { oneof value { - User user = 1; + Order order = 1; Product product = 2; - Order order = 3; + User user = 3; } } SearchResult result = 1; @@ -406,14 +406,14 @@ describe('buildProtoMessage', () => { message Widget { oneof instance { Chart chart = 1; - Table table = 2; - Counter counter = 3; + Counter counter = 2; + Table table = 3; } } message DataSource { oneof instance { - Database database = 1; - API api = 2; + API api = 1; + Database database = 2; File file = 3; } } @@ -461,8 +461,8 @@ describe('buildProtoMessage', () => { "message Response { message SearchResult { oneof value { - User user = 1; - Product product = 2; + Product product = 1; + User user = 2; } } SearchResult primary_result = 1; @@ -656,8 +656,8 @@ describe('buildProtoMessage', () => { } message SearchResult { oneof value { - User user = 1; - Product product = 2; + Product product = 1; + User user = 2; } } Animal animal1 = 1; @@ -788,8 +788,8 @@ describe('buildProtoMessage', () => { // Union of possible search results message SearchResult { oneof value { - User user = 1; - Product product = 2; + Product product = 1; + User user = 2; } } // The search result